1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>gtkmm: Gdk::Colormap Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="namespaceGdk.html">Gdk</a>::<a class="el" href="classGdk_1_1Colormap.html">Colormap</a>
</div>
</div>
<div class="contents">
<h1>Gdk::Colormap Class Reference</h1><!-- doxytag: class="Gdk::Colormap" --><!-- doxytag: inherits="Glib::Object" -->
<p>A <a class="el" href="classGdk_1_1Colormap.html" title="A Colormap is an object that contains the mapping between the color values stored...">Colormap</a> is an object that contains the mapping between the color values stored in memory and the RGB values that are used to display color values. <a href="#_details">More...</a></p>
<p>Inherits <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Object.html">Glib::Object</a>.</p>
<div class="dynheader">
Collaboration diagram for Gdk::Colormap:</div>
<div class="dynsection">
<div class="center"><img src="classGdk_1_1Colormap__coll__graph.png" border="0" usemap="#Gdk_1_1Colormap_coll__map" alt="Collaboration graph"/></div>
<map name="Gdk_1_1Colormap_coll__map" id="Gdk_1_1Colormap_coll__map">
<area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="20,160,111,189"/><area shape="rect" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="5,83,125,112"/><area shape="rect" doxygen="libsigc++-2.0.tag:http://library.gnome.org/devel/libsigc++/unstable/" href="http://library.gnome.org/devel/libsigc++/unstable/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="12,5,119,35"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<p><a href="classGdk_1_1Colormap-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a527fe5eab97c19bb3d1fcedb933ecd13">~Colormap</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GdkColormap* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a8e073a91f54ca4f7443db9e1d514bb52">gobj</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a8e073a91f54ca4f7443db9e1d514bb52"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const GdkColormap* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a5120e898c1cb3dfa9135d1548024da5d">gobj</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a5120e898c1cb3dfa9135d1548024da5d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">GdkColormap* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a8bc022fb6ea4673159155bca8e730a39">gobj_copy</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#a8bc022fb6ea4673159155bca8e730a39"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a572fe8fade77afbdcc7f7cf56ff489f6">alloc_colors</a> (<a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ArrayHandle.html">ArrayHandle_Color</a>& colors, int ncolors, bool writeable, bool best_match, <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ArrayHandle.html">Glib::ArrayHandle</a>< bool >& success)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a79d4fec03cb95c71b64d4a0bc6282fe6">free_colors</a> (<a class="el" href="classGdk_1_1Color.html">Color</a>& colors, int ncolors)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a798a90a164bd95a865360b573455407c">alloc_color</a> (<a class="el" href="classGdk_1_1Color.html">Color</a>& color, bool writeable=false, bool best_match=true)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocates a single color from a colormap. <a href="#a798a90a164bd95a865360b573455407c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#aabb71a757b4f69a90d0fca884a6b4c62">free_color</a> (<a class="el" href="classGdk_1_1Color.html">Color</a>& color)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#ac3c3335c6f0ceab1ab75d3f9bd25f53f">query_color</a> (gulong pixel, <a class="el" href="classGdk_1_1Color.html">Color</a>& result)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Locates the RGB color in <em>colormap</em> corresponding to the given hardware pixel <em>pixel</em>. <a href="#ac3c3335c6f0ceab1ab75d3f9bd25f53f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a90d5e438d78992e2030832a196ac222b">get_visual</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the visual for which a given colormap was created. <a href="#a90d5e438d78992e2030832a196ac222b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< const <a class="el" href="classGdk_1_1Visual.html">Visual</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a0056f8871c2da5e8c72a9a272de21c5c">get_visual</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the visual for which a given colormap was created. <a href="#a0056f8871c2da5e8c72a9a272de21c5c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Screen.html">Screen</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a0de4faa551cfccf109947e9af4dee7ff">get_screen</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the screen for which this colormap was created. <a href="#a0de4faa551cfccf109947e9af4dee7ff"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< const <a class="el" href="classGdk_1_1Screen.html">Screen</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a98526be53c38ac403790dcb2a8db55db">get_screen</a> () const </td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the screen for which this colormap was created. <a href="#a98526be53c38ac403790dcb2a8db55db"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Colormap.html">Colormap</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a9447b914e4f6d73ff2d041350791ade1">create</a> (const <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> >& visual, bool allocate)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Colormap.html">Colormap</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a78c9dfeafac5833684299e8b1b5ce016">get_system</a> ()</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the system's default colormap for the default screen. <a href="#a78c9dfeafac5833684299e8b1b5ce016"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#ab617d305ec0582e6a762ed97016dac09">Colormap</a> (const <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> >& visual, bool allocate)</td></tr>
<tr><td colspan="2"><h2>Related Functions</h2></td></tr>
<tr><td colspan="2"><p>(Note that these are not member functions.) </p>
<br/><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Colormap.html">Gdk::Colormap</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGdk_1_1Colormap.html#a73e55bc63cbc380d36c3d382a47be80a">wrap</a> (GdkColormap* object, bool take_copy=false)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a73e55bc63cbc380d36c3d382a47be80a"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A <a class="el" href="classGdk_1_1Colormap.html" title="A Colormap is an object that contains the mapping between the color values stored...">Colormap</a> is an object that contains the mapping between the color values stored in memory and the RGB values that are used to display color values. </p>
<p>In general, colormaps only contain significant information for pseudo-color visuals, but even for other visual types, a colormap object is required in some circumstances.</p>
<p>There are a couple of special colormaps that can be retrieved. The system colormap (retrieved with <a class="el" href="classGdk_1_1Colormap.html#a78c9dfeafac5833684299e8b1b5ce016" title="Gets the system's default colormap for the default screen.">get_system()</a>) is the default colormap of the system. If you are using GdkRGB, there is another colormap that is important - the colormap in which GdkRGB works, retrieved with <a class="el" href="namespaceGdk.html#a37e62b12aa3ddf44b4f69e05d8893b5a" title="Get the preferred colormap for rendering image data.">Gdk::rgb_get_colormap()</a>. However, when using GdkRGB, it is not generally necessary to allocate colors directly. </p>
<hr/><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" id="a527fe5eab97c19bb3d1fcedb933ecd13"></a><!-- doxytag: member="Gdk::Colormap::~Colormap" ref="a527fe5eab97c19bb3d1fcedb933ecd13" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual Gdk::Colormap::~Colormap </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [virtual]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="ab617d305ec0582e6a762ed97016dac09"></a><!-- doxytag: member="Gdk::Colormap::Colormap" ref="ab617d305ec0582e6a762ed97016dac09" args="(const Glib::RefPtr< Visual > &visual, bool allocate)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">Gdk::Colormap::Colormap </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> >& </td>
<td class="paramname"> <em>visual</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>allocate</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [explicit, protected]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a798a90a164bd95a865360b573455407c"></a><!-- doxytag: member="Gdk::Colormap::alloc_color" ref="a798a90a164bd95a865360b573455407c" args="(Color &color, bool writeable=false, bool best_match=true)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool Gdk::Colormap::alloc_color </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classGdk_1_1Color.html">Color</a>& </td>
<td class="paramname"> <em>color</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>writeable</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>best_match</em> = <code>true</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Allocates a single color from a colormap. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>color</em> </td><td>The color to allocate. On return the <structfield>pixel</structfield> field will be filled in if allocation succeeds. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>writeable</em> </td><td>If <code>true</code>, the color is allocated writeable (their values can later be changed using gdk_color_change()). Writeable colors cannot be shared between applications. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>best_match</em> </td><td>If <code>true</code>, GDK will attempt to do matching against existing colors if the color cannot be allocated as requested. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the allocation succeeded. </dd></dl>
</div>
</div>
<a class="anchor" id="a572fe8fade77afbdcc7f7cf56ff489f6"></a><!-- doxytag: member="Gdk::Colormap::alloc_colors" ref="a572fe8fade77afbdcc7f7cf56ff489f6" args="(ArrayHandle_Color &colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle< bool > &success)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int Gdk::Colormap::alloc_colors </td>
<td>(</td>
<td class="paramtype"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ArrayHandle.html">ArrayHandle_Color</a> & </td>
<td class="paramname"> <em>colors</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>ncolors</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>writeable</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>best_match</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ArrayHandle.html">Glib::ArrayHandle</a>< bool > & </td>
<td class="paramname"> <em>success</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>Use <a class="el" href="classGdk_1_1Colormap.html#a798a90a164bd95a865360b573455407c" title="Allocates a single color from a colormap.">alloc_color()</a>. </dd></dl>
</div>
</div>
<a class="anchor" id="a9447b914e4f6d73ff2d041350791ade1"></a><!-- doxytag: member="Gdk::Colormap::create" ref="a9447b914e4f6d73ff2d041350791ade1" args="(const Glib::RefPtr< Visual > &visual, bool allocate)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGdk_1_1Colormap.html">Colormap</a>> Gdk::Colormap::create </td>
<td>(</td>
<td class="paramtype">const <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> >& </td>
<td class="paramname"> <em>visual</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>allocate</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="aabb71a757b4f69a90d0fca884a6b4c62"></a><!-- doxytag: member="Gdk::Colormap::free_color" ref="aabb71a757b4f69a90d0fca884a6b4c62" args="(Color &color)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Gdk::Colormap::free_color </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classGdk_1_1Color.html">Color</a>& </td>
<td class="paramname"> <em>color</em></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
</div>
</div>
<a class="anchor" id="a79d4fec03cb95c71b64d4a0bc6282fe6"></a><!-- doxytag: member="Gdk::Colormap::free_colors" ref="a79d4fec03cb95c71b64d4a0bc6282fe6" args="(Color &colors, int ncolors)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Gdk::Colormap::free_colors </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classGdk_1_1Color.html">Color</a>& </td>
<td class="paramname"> <em>colors</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"> <em>ncolors</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>Use <a class="el" href="classGdk_1_1Colormap.html#aabb71a757b4f69a90d0fca884a6b4c62">free_color()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="a98526be53c38ac403790dcb2a8db55db"></a><!-- doxytag: member="Gdk::Colormap::get_screen" ref="a98526be53c38ac403790dcb2a8db55db" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a><const <a class="el" href="classGdk_1_1Screen.html">Screen</a>> Gdk::Colormap::get_screen </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the screen for which this colormap was created. </p>
<dl class="since_2_2"><dt><b><a class="el" href="since_2_2.html#_since_2_2000002">Since gtkmm 2.2:</a></b></dt><dd></dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The screen for which this colormap was created. </dd></dl>
</div>
</div>
<a class="anchor" id="a0de4faa551cfccf109947e9af4dee7ff"></a><!-- doxytag: member="Gdk::Colormap::get_screen" ref="a0de4faa551cfccf109947e9af4dee7ff" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGdk_1_1Screen.html">Screen</a>> Gdk::Colormap::get_screen </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the screen for which this colormap was created. </p>
<dl class="since_2_2"><dt><b><a class="el" href="since_2_2.html#_since_2_2000001">Since gtkmm 2.2:</a></b></dt><dd></dd></dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The screen for which this colormap was created. </dd></dl>
</div>
</div>
<a class="anchor" id="a78c9dfeafac5833684299e8b1b5ce016"></a><!-- doxytag: member="Gdk::Colormap::get_system" ref="a78c9dfeafac5833684299e8b1b5ce016" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGdk_1_1Colormap.html">Colormap</a>> Gdk::Colormap::get_system </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Gets the system's default colormap for the default screen. </p>
<p>(See gdk_colormap_get_system_for_screen()) </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The default colormap. </dd></dl>
</div>
</div>
<a class="anchor" id="a0056f8871c2da5e8c72a9a272de21c5c"></a><!-- doxytag: member="Gdk::Colormap::get_visual" ref="a0056f8871c2da5e8c72a9a272de21c5c" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a><const <a class="el" href="classGdk_1_1Visual.html">Visual</a>> Gdk::Colormap::get_visual </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const</td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the visual for which a given colormap was created. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The visual of the colormap. </dd></dl>
</div>
</div>
<a class="anchor" id="a90d5e438d78992e2030832a196ac222b"></a><!-- doxytag: member="Gdk::Colormap::get_visual" ref="a90d5e438d78992e2030832a196ac222b" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGdk_1_1Visual.html">Visual</a>> Gdk::Colormap::get_visual </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Returns the visual for which a given colormap was created. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The visual of the colormap. </dd></dl>
</div>
</div>
<a class="anchor" id="a5120e898c1cb3dfa9135d1548024da5d"></a><!-- doxytag: member="Gdk::Colormap::gobj" ref="a5120e898c1cb3dfa9135d1548024da5d" args="() const " -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const GdkColormap* Gdk::Colormap::gobj </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td> const<code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Provides access to the underlying C GObject. </p>
<p>Reimplemented from <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ObjectBase.html#a778a94181132976bbfb0519793f3b32e">Glib::ObjectBase</a>.</p>
</div>
</div>
<a class="anchor" id="a8e073a91f54ca4f7443db9e1d514bb52"></a><!-- doxytag: member="Gdk::Colormap::gobj" ref="a8e073a91f54ca4f7443db9e1d514bb52" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">GdkColormap* Gdk::Colormap::gobj </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Provides access to the underlying C GObject. </p>
<p>Reimplemented from <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ObjectBase.html#a4c6efc18be8cb9c56e58fc0bd20fafbe">Glib::ObjectBase</a>.</p>
</div>
</div>
<a class="anchor" id="a8bc022fb6ea4673159155bca8e730a39"></a><!-- doxytag: member="Gdk::Colormap::gobj_copy" ref="a8bc022fb6ea4673159155bca8e730a39" args="()" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">GdkColormap* Gdk::Colormap::gobj_copy </td>
<td>(</td>
<td class="paramname"></td>
<td> ) </td>
<td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p>
</div>
</div>
<a class="anchor" id="ac3c3335c6f0ceab1ab75d3f9bd25f53f"></a><!-- doxytag: member="Gdk::Colormap::query_color" ref="ac3c3335c6f0ceab1ab75d3f9bd25f53f" args="(gulong pixel, Color &result)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void Gdk::Colormap::query_color </td>
<td>(</td>
<td class="paramtype">gulong </td>
<td class="paramname"> <em>pixel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classGdk_1_1Color.html">Color</a>& </td>
<td class="paramname"> <em>result</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Locates the RGB color in <em>colormap</em> corresponding to the given hardware pixel <em>pixel</em>. </p>
<p><em>pixel</em> must be a valid pixel in the colormap; it's a programmer error to call this function with a pixel which is not in the colormap. Hardware pixels are normally obtained from <a class="el" href="classGdk_1_1Colormap.html#a572fe8fade77afbdcc7f7cf56ff489f6">alloc_colors()</a>, or from a <a class="el" href="classGdk_1_1Image.html" title="This represents an area for drawing graphics.">Gdk::Image</a>. (A <a class="el" href="classGdk_1_1Image.html" title="This represents an area for drawing graphics.">Gdk::Image</a> contains image data in hardware format, a <a class="el" href="classGdk_1_1Pixbuf.html">Gdk::Pixbuf</a> contains image data in a canonical 24-bit RGB format.)</p>
<p>This function is rarely useful; it's used for example to implement the eyedropper feature in <a class="el" href="classGtk_1_1ColorSelection.html" title="A widget used to select a color.">Gtk::ColorSelection</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>pixel</em> </td><td>Pixel value in hardware display format. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>result</em> </td><td><a class="el" href="classGdk_1_1Color.html" title="Gdk::Color is used to describe an allocated or unallocated color.">Gdk::Color</a> with red, green, blue fields initialized. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a73e55bc63cbc380d36c3d382a47be80a"></a><!-- doxytag: member="Gdk::Colormap::wrap" ref="a73e55bc63cbc380d36c3d382a47be80a" args="(GdkColormap *object, bool take_copy=false)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Colormap.html">Gdk::Colormap</a> > wrap </td>
<td>(</td>
<td class="paramtype">GdkColormap * </td>
<td class="paramname"> <em>object</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"> <em>take_copy</em> = <code>false</code></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [related]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>A <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>object</em> </td><td>The C instance. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>take_copy</em> </td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr>
</table>
</dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>gdkmm/colormap.h</li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue May 4 13:21:43 2010 for gtkmm by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>
|