1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
<title>gtkmm: Gdk::Colormap Class Reference</title>
6
<link href="tabs.css" rel="stylesheet" type="text/css"/>
7
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10
<!-- Generated by Doxygen 1.7.3 -->
13
<table cellspacing="0" cellpadding="0">
15
<tr style="height: 56px;">
16
<td style="padding-left: 0.5em;">
17
<div id="projectname">gtkmm <span id="projectnumber">2.24.2</span></div>
23
<div id="navrow1" class="tabs">
25
<li><a href="index.html"><span>Main Page</span></a></li>
26
<li><a href="pages.html"><span>Related Pages</span></a></li>
27
<li><a href="modules.html"><span>Modules</span></a></li>
28
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
29
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
32
<div id="navrow2" class="tabs2">
34
<li><a href="annotated.html"><span>Class List</span></a></li>
35
<li><a href="classes.html"><span>Class Index</span></a></li>
36
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
37
<li><a href="functions.html"><span>Class Members</span></a></li>
40
<div id="nav-path" class="navpath">
42
<li class="navelem"><a class="el" href="namespaceGdk.html">Gdk</a> </li>
43
<li class="navelem"><a class="el" href="classGdk_1_1Colormap.html">Colormap</a> </li>
49
<a href="#pub-methods">Public Member Functions</a> |
50
<a href="#pub-static-methods">Static Public Member Functions</a> |
51
<a href="#pro-methods">Protected Member Functions</a> |
52
<a href="#related">Related Functions</a> </div>
53
<div class="headertitle">
54
<h1>Gdk::Colormap Class Reference</h1> </div>
56
<div class="contents">
57
<!-- doxytag: class="Gdk::Colormap" --><!-- doxytag: inherits="Glib::Object" -->
58
<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 in memory and the R...">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>
59
<div class="dynheader">
60
Inheritance diagram for Gdk::Colormap:</div>
61
<div class="dyncontent">
62
<div class="center"><img src="classGdk_1_1Colormap__inherit__graph.png" border="0" usemap="#Gdk_1_1Colormap_inherit__map" alt="Inheritance graph"/></div>
63
<map name="Gdk_1_1Colormap_inherit__map" id="Gdk_1_1Colormap_inherit__map">
64
<area shape="rect" id="node2" href="../../../glibmm-2.4/reference/html/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="20,166,111,197"/><area shape="rect" id="node4" href="../../../glibmm-2.4/reference/html/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="5,86,125,117"/><area shape="rect" id="node6" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="12,6,119,37"/></map>
65
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
66
<div class="dynheader">
67
Collaboration diagram for Gdk::Colormap:</div>
68
<div class="dyncontent">
69
<div class="center"><img src="classGdk_1_1Colormap__coll__graph.png" border="0" usemap="#Gdk_1_1Colormap_coll__map" alt="Collaboration graph"/></div>
70
<map name="Gdk_1_1Colormap_coll__map" id="Gdk_1_1Colormap_coll__map">
71
<area shape="rect" id="node2" href="../../../glibmm-2.4/reference/html/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="20,166,111,197"/><area shape="rect" id="node4" href="../../../glibmm-2.4/reference/html/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="5,86,125,117"/><area shape="rect" id="node6" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="12,6,119,37"/></map>
72
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
74
<p><a href="classGdk_1_1Colormap-members.html">List of all members.</a></p>
75
<table class="memberdecls">
76
<tr><td colspan="2"><h2><a name="pub-methods"></a>
77
Public Member Functions</h2></td></tr>
78
<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>
79
<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>
80
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a8e073a91f54ca4f7443db9e1d514bb52"></a><br/></td></tr>
81
<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>
82
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a5120e898c1cb3dfa9135d1548024da5d"></a><br/></td></tr>
83
<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>
84
<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>
85
<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" href="../../../glibmm-2.4/reference/html/classGlib_1_1ArrayHandle.html">ArrayHandle_Color</a>& colors, int ncolors, bool writeable, bool best_match, <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ArrayHandle.html">Glib::ArrayHandle</a>< bool >& success)</td></tr>
86
<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>
87
<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>
88
<tr><td class="mdescLeft"> </td><td class="mdescRight">Allocates a single color from a colormap. <a href="#a798a90a164bd95a865360b573455407c"></a><br/></td></tr>
89
<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>
90
<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>
91
<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>
92
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../glibmm-2.4/reference/html/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>
93
<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>
94
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../glibmm-2.4/reference/html/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>
95
<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>
96
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../glibmm-2.4/reference/html/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>
97
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the screen for which this colormap was created. <a href="#a0de4faa551cfccf109947e9af4dee7ff"></a><br/></td></tr>
98
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../glibmm-2.4/reference/html/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>
99
<tr><td class="mdescLeft"> </td><td class="mdescRight">Gets the screen for which this colormap was created. <a href="#a98526be53c38ac403790dcb2a8db55db"></a><br/></td></tr>
100
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
101
Static Public Member Functions</h2></td></tr>
102
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" href="../../../glibmm-2.4/reference/html/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" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> >& visual, bool allocate)</td></tr>
103
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" href="../../../glibmm-2.4/reference/html/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>
104
<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>
105
<tr><td colspan="2"><h2><a name="pro-methods"></a>
106
Protected Member Functions</h2></td></tr>
107
<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" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> >& visual, bool allocate)</td></tr>
108
<tr><td colspan="2"><h2><a name="related"></a>
109
Related Functions</h2></td></tr>
110
<tr><td colspan="2">(Note that these are not member functions.) <br/></td></tr>
111
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../glibmm-2.4/reference/html/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>
112
<tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#a73e55bc63cbc380d36c3d382a47be80a"></a><br/></td></tr>
114
<hr/><a name="_details"></a><h2>Detailed Description</h2>
115
<div class="textblock"><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 in memory and the R...">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>
116
<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>
117
<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>
118
</div><hr/><h2>Constructor & Destructor Documentation</h2>
119
<a class="anchor" id="a527fe5eab97c19bb3d1fcedb933ecd13"></a><!-- doxytag: member="Gdk::Colormap::~Colormap" ref="a527fe5eab97c19bb3d1fcedb933ecd13" args="()" -->
120
<div class="memitem">
121
<div class="memproto">
122
<table class="memname">
124
<td class="memname">virtual Gdk::Colormap::~Colormap </td>
126
<td class="paramname"></td><td>)</td>
127
<td><code> [virtual]</code></td>
135
<a class="anchor" id="ab617d305ec0582e6a762ed97016dac09"></a><!-- doxytag: member="Gdk::Colormap::Colormap" ref="ab617d305ec0582e6a762ed97016dac09" args="(const Glib::RefPtr< Visual > &visual, bool allocate)" -->
136
<div class="memitem">
137
<div class="memproto">
138
<table class="memname">
140
<td class="memname">Gdk::Colormap::Colormap </td>
142
<td class="paramtype">const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> >& </td>
143
<td class="paramname"><em>visual</em>, </td>
146
<td class="paramkey"></td>
148
<td class="paramtype">bool </td>
149
<td class="paramname"><em>allocate</em> </td>
154
<td></td><td><code> [explicit, protected]</code></td>
162
<hr/><h2>Member Function Documentation</h2>
163
<a class="anchor" id="a798a90a164bd95a865360b573455407c"></a><!-- doxytag: member="Gdk::Colormap::alloc_color" ref="a798a90a164bd95a865360b573455407c" args="(Color &color, bool writeable=false, bool best_match=true)" -->
164
<div class="memitem">
165
<div class="memproto">
166
<table class="memname">
168
<td class="memname">bool Gdk::Colormap::alloc_color </td>
170
<td class="paramtype"><a class="el" href="classGdk_1_1Color.html">Color</a>& </td>
171
<td class="paramname"><em>color</em>, </td>
174
<td class="paramkey"></td>
176
<td class="paramtype">bool </td>
177
<td class="paramname"><em>writeable</em> = <code>false</code>, </td>
180
<td class="paramkey"></td>
182
<td class="paramtype">bool </td>
183
<td class="paramname"><em>best_match</em> = <code>true</code> </td>
194
<p>Allocates a single color from a colormap. </p>
195
<dl><dt><b>Parameters:</b></dt><dd>
196
<table class="params">
197
<tr><td class="paramname">color</td><td>The color to allocate. On return the <structfield>pixel</structfield> field will be filled in if allocation succeeds. </td></tr>
198
<tr><td class="paramname">writeable</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>
199
<tr><td class="paramname">best_match</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>
203
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the allocation succeeded. </dd></dl>
207
<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)" -->
208
<div class="memitem">
209
<div class="memproto">
210
<table class="memname">
212
<td class="memname">int Gdk::Colormap::alloc_colors </td>
214
<td class="paramtype"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ArrayHandle.html">ArrayHandle_Color</a> & </td>
215
<td class="paramname"><em>colors</em>, </td>
218
<td class="paramkey"></td>
220
<td class="paramtype">int </td>
221
<td class="paramname"><em>ncolors</em>, </td>
224
<td class="paramkey"></td>
226
<td class="paramtype">bool </td>
227
<td class="paramname"><em>writeable</em>, </td>
230
<td class="paramkey"></td>
232
<td class="paramtype">bool </td>
233
<td class="paramname"><em>best_match</em>, </td>
236
<td class="paramkey"></td>
238
<td class="paramtype"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ArrayHandle.html">Glib::ArrayHandle</a>< bool > & </td>
239
<td class="paramname"><em>success</em> </td>
249
<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#a798a90a164bd95a865360b573455407c" title="Allocates a single color from a colormap.">alloc_color()</a>. </dd></dl>
253
<a class="anchor" id="a9447b914e4f6d73ff2d041350791ade1"></a><!-- doxytag: member="Gdk::Colormap::create" ref="a9447b914e4f6d73ff2d041350791ade1" args="(const Glib::RefPtr< Visual > &visual, bool allocate)" -->
254
<div class="memitem">
255
<div class="memproto">
256
<table class="memname">
258
<td class="memname">static <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGdk_1_1Colormap.html">Colormap</a>> Gdk::Colormap::create </td>
260
<td class="paramtype">const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Visual.html">Visual</a> >& </td>
261
<td class="paramname"><em>visual</em>, </td>
264
<td class="paramkey"></td>
266
<td class="paramtype">bool </td>
267
<td class="paramname"><em>allocate</em> </td>
272
<td></td><td><code> [static]</code></td>
280
<a class="anchor" id="aabb71a757b4f69a90d0fca884a6b4c62"></a><!-- doxytag: member="Gdk::Colormap::free_color" ref="aabb71a757b4f69a90d0fca884a6b4c62" args="(Color &color)" -->
281
<div class="memitem">
282
<div class="memproto">
283
<table class="memname">
285
<td class="memname">void Gdk::Colormap::free_color </td>
287
<td class="paramtype"><a class="el" href="classGdk_1_1Color.html">Color</a>& </td>
288
<td class="paramname"><em>color</em></td><td>)</td>
297
<a class="anchor" id="a79d4fec03cb95c71b64d4a0bc6282fe6"></a><!-- doxytag: member="Gdk::Colormap::free_colors" ref="a79d4fec03cb95c71b64d4a0bc6282fe6" args="(Color &colors, int ncolors)" -->
298
<div class="memitem">
299
<div class="memproto">
300
<table class="memname">
302
<td class="memname">void Gdk::Colormap::free_colors </td>
304
<td class="paramtype"><a class="el" href="classGdk_1_1Color.html">Color</a>& </td>
305
<td class="paramname"><em>colors</em>, </td>
308
<td class="paramkey"></td>
310
<td class="paramtype">int </td>
311
<td class="paramname"><em>ncolors</em> </td>
321
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>Use <a class="el" href="classGdk_1_1Colormap.html#aabb71a757b4f69a90d0fca884a6b4c62">free_color()</a> </dd></dl>
325
<a class="anchor" id="a98526be53c38ac403790dcb2a8db55db"></a><!-- doxytag: member="Gdk::Colormap::get_screen" ref="a98526be53c38ac403790dcb2a8db55db" args="() const " -->
326
<div class="memitem">
327
<div class="memproto">
328
<table class="memname">
330
<td class="memname"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a><const <a class="el" href="classGdk_1_1Screen.html">Screen</a>> Gdk::Colormap::get_screen </td>
332
<td class="paramname"></td><td>)</td>
339
<p>Gets the screen for which this colormap was created. </p>
340
<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>
341
<dl class="return"><dt><b>Returns:</b></dt><dd>The screen for which this colormap was created. </dd></dl>
345
<a class="anchor" id="a0de4faa551cfccf109947e9af4dee7ff"></a><!-- doxytag: member="Gdk::Colormap::get_screen" ref="a0de4faa551cfccf109947e9af4dee7ff" args="()" -->
346
<div class="memitem">
347
<div class="memproto">
348
<table class="memname">
350
<td class="memname"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGdk_1_1Screen.html">Screen</a>> Gdk::Colormap::get_screen </td>
352
<td class="paramname"></td><td>)</td>
359
<p>Gets the screen for which this colormap was created. </p>
360
<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>
361
<dl class="return"><dt><b>Returns:</b></dt><dd>The screen for which this colormap was created. </dd></dl>
365
<a class="anchor" id="a78c9dfeafac5833684299e8b1b5ce016"></a><!-- doxytag: member="Gdk::Colormap::get_system" ref="a78c9dfeafac5833684299e8b1b5ce016" args="()" -->
366
<div class="memitem">
367
<div class="memproto">
368
<table class="memname">
370
<td class="memname">static <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGdk_1_1Colormap.html">Colormap</a>> Gdk::Colormap::get_system </td>
372
<td class="paramname"></td><td>)</td>
373
<td><code> [static]</code></td>
379
<p>Gets the system's default colormap for the default screen. </p>
380
<p>(See gdk_colormap_get_system_for_screen()) </p>
381
<dl class="return"><dt><b>Returns:</b></dt><dd>The default colormap. </dd></dl>
385
<a class="anchor" id="a90d5e438d78992e2030832a196ac222b"></a><!-- doxytag: member="Gdk::Colormap::get_visual" ref="a90d5e438d78992e2030832a196ac222b" args="()" -->
386
<div class="memitem">
387
<div class="memproto">
388
<table class="memname">
390
<td class="memname"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGdk_1_1Visual.html">Visual</a>> Gdk::Colormap::get_visual </td>
392
<td class="paramname"></td><td>)</td>
399
<p>Returns the visual for which a given colormap was created. </p>
400
<dl class="return"><dt><b>Returns:</b></dt><dd>The visual of the colormap. </dd></dl>
404
<a class="anchor" id="a0056f8871c2da5e8c72a9a272de21c5c"></a><!-- doxytag: member="Gdk::Colormap::get_visual" ref="a0056f8871c2da5e8c72a9a272de21c5c" args="() const " -->
405
<div class="memitem">
406
<div class="memproto">
407
<table class="memname">
409
<td class="memname"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a><const <a class="el" href="classGdk_1_1Visual.html">Visual</a>> Gdk::Colormap::get_visual </td>
411
<td class="paramname"></td><td>)</td>
418
<p>Returns the visual for which a given colormap was created. </p>
419
<dl class="return"><dt><b>Returns:</b></dt><dd>The visual of the colormap. </dd></dl>
423
<a class="anchor" id="a5120e898c1cb3dfa9135d1548024da5d"></a><!-- doxytag: member="Gdk::Colormap::gobj" ref="a5120e898c1cb3dfa9135d1548024da5d" args="() const " -->
424
<div class="memitem">
425
<div class="memproto">
426
<table class="memname">
428
<td class="memname">const GdkColormap* Gdk::Colormap::gobj </td>
430
<td class="paramname"></td><td>)</td>
431
<td> const<code> [inline]</code></td>
437
<p>Provides access to the underlying C GObject. </p>
439
<p>Reimplemented from <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ObjectBase.html#a778a94181132976bbfb0519793f3b32e">Glib::ObjectBase</a>.</p>
443
<a class="anchor" id="a8e073a91f54ca4f7443db9e1d514bb52"></a><!-- doxytag: member="Gdk::Colormap::gobj" ref="a8e073a91f54ca4f7443db9e1d514bb52" args="()" -->
444
<div class="memitem">
445
<div class="memproto">
446
<table class="memname">
448
<td class="memname">GdkColormap* Gdk::Colormap::gobj </td>
450
<td class="paramname"></td><td>)</td>
451
<td><code> [inline]</code></td>
457
<p>Provides access to the underlying C GObject. </p>
459
<p>Reimplemented from <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ObjectBase.html#a4c6efc18be8cb9c56e58fc0bd20fafbe">Glib::ObjectBase</a>.</p>
463
<a class="anchor" id="a8bc022fb6ea4673159155bca8e730a39"></a><!-- doxytag: member="Gdk::Colormap::gobj_copy" ref="a8bc022fb6ea4673159155bca8e730a39" args="()" -->
464
<div class="memitem">
465
<div class="memproto">
466
<table class="memname">
468
<td class="memname">GdkColormap* Gdk::Colormap::gobj_copy </td>
470
<td class="paramname"></td><td>)</td>
477
<p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p>
481
<a class="anchor" id="ac3c3335c6f0ceab1ab75d3f9bd25f53f"></a><!-- doxytag: member="Gdk::Colormap::query_color" ref="ac3c3335c6f0ceab1ab75d3f9bd25f53f" args="(gulong pixel, Color &result)" -->
482
<div class="memitem">
483
<div class="memproto">
484
<table class="memname">
486
<td class="memname">void Gdk::Colormap::query_color </td>
488
<td class="paramtype">gulong </td>
489
<td class="paramname"><em>pixel</em>, </td>
492
<td class="paramkey"></td>
494
<td class="paramtype"><a class="el" href="classGdk_1_1Color.html">Color</a>& </td>
495
<td class="paramname"><em>result</em> </td>
506
<p>Locates the RGB color in <em>colormap</em> corresponding to the given hardware pixel <em>pixel</em>. </p>
507
<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>
508
<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>
509
<dl><dt><b>Parameters:</b></dt><dd>
510
<table class="params">
511
<tr><td class="paramname">pixel</td><td>Pixel value in hardware display format. </td></tr>
512
<tr><td class="paramname">result</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>
519
<hr/><h2>Friends And Related Function Documentation</h2>
520
<a class="anchor" id="a73e55bc63cbc380d36c3d382a47be80a"></a><!-- doxytag: member="Gdk::Colormap::wrap" ref="a73e55bc63cbc380d36c3d382a47be80a" args="(GdkColormap *object, bool take_copy=false)" -->
521
<div class="memitem">
522
<div class="memproto">
523
<table class="memname">
525
<td class="memname"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGdk_1_1Colormap.html">Gdk::Colormap</a> > wrap </td>
527
<td class="paramtype">GdkColormap * </td>
528
<td class="paramname"><em>object</em>, </td>
531
<td class="paramkey"></td>
533
<td class="paramtype">bool </td>
534
<td class="paramname"><em>take_copy</em> = <code>false</code> </td>
539
<td></td><td><code> [related]</code></td>
545
<p>A <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p>
546
<dl><dt><b>Parameters:</b></dt><dd>
547
<table class="params">
548
<tr><td class="paramname">object</td><td>The C instance. </td></tr>
549
<tr><td class="paramname">take_copy</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>
553
<dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl>
557
<hr/>The documentation for this class was generated from the following file:<ul>
558
<li>gdkmm/colormap.h</li>
561
<hr class="footer"/><address class="footer"><small>Generated on Fri Jul 8 2011 13:31:43 for gtkmm by 
562
<a href="http://www.doxygen.org/index.html">
563
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>