]> Pileus Git - ~andy/gtk/blob - docs/reference/gdk/tmpl/colors.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gdk / tmpl / colors.sgml
1 <!-- ##### SECTION Title ##### -->
2 Colormaps and Colors
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Manipulation of colors and colormaps
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 These functions are used to modify colormaps.
10 A colormap is an object that contains the mapping
11 between the color values stored in memory and
12 the RGB values that are used to display color
13 values. In general, colormaps only contain
14 significant information for pseudo-color visuals,
15 but even for other visual types, a colormap object
16 is required in some circumstances.
17 </para>
18
19 <para>
20 There are a couple of special colormaps that can
21 be retrieved. The system colormap (retrieved 
22 with gdk_colormap_get_system()) is the default
23 colormap of the system. If you are using GdkRGB,
24 there is another colormap that is important - the
25 colormap in which GdkRGB works, retrieved with
26 gdk_rgb_get_colormap(). However, when using GdkRGB, 
27 it is not generally necessary to allocate colors
28 directly.
29 </para>
30
31 <para>
32 In previous revisions of this interface, a number
33 of functions that take a #GdkColormap parameter
34 were replaced with functions whose names began
35 with "gdk_colormap_". This process will probably
36 be extended somewhat in the future - 
37 gdk_color_white(), gdk_color_black(), and 
38 gdk_color_change() will probably become aliases.
39 </para>
40
41 <!-- ##### SECTION See_Also ##### -->
42 <para>
43
44 </para>
45
46 <!-- ##### SECTION Stability_Level ##### -->
47
48
49 <!-- ##### SECTION Image ##### -->
50
51
52 <!-- ##### STRUCT GdkColor ##### -->
53 <para>
54 The #GdkColor structure is used to describe an 
55 allocated or unallocated color.
56 </para>
57
58 @pixel: For allocated colors, the value used to
59   draw this color on the screen.
60 @red: The red component of the color. This is
61   a value between 0 and 65535, with 65535 indicating
62   full intensitiy.
63 @green: The blue component of the color.
64 @blue: The green component of the color.
65
66 <!-- ##### STRUCT GdkColormap ##### -->
67 <para>
68 The colormap structure contains the following public fields.
69 </para>
70
71 @size: For pseudo-color colormaps, the number of colors
72   in the colormap.
73 @colors: An array containing the current values in the
74   colormap. This can be used to map from pixel values
75   back to RGB values. This is only meaningful for
76   pseudo-color colormaps.
77
78 <!-- ##### FUNCTION gdk_colormap_new ##### -->
79 <para>
80 </para>
81
82 @visual: 
83 @allocate: 
84 @Returns: 
85
86
87 <!-- ##### FUNCTION gdk_colormap_ref ##### -->
88 <para>
89
90 </para>
91
92 @cmap: 
93 @Returns: 
94
95
96 <!-- ##### FUNCTION gdk_colormap_unref ##### -->
97 <para>
98
99 </para>
100
101 @cmap: 
102
103
104 <!-- ##### FUNCTION gdk_colormap_get_system ##### -->
105 <para>
106 </para>
107
108 @void: 
109 @Returns: 
110
111
112 <!-- ##### FUNCTION gdk_colormap_get_system_size ##### -->
113 <para>
114 </para>
115
116 @void: 
117 @Returns: 
118
119
120 <!-- ##### FUNCTION gdk_colormap_change ##### -->
121 <para>
122 </para>
123
124 @colormap: 
125 @ncolors: 
126
127
128 <!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
129 <para>
130 </para>
131
132 @colormap: 
133 @colors: 
134 @n_colors: 
135 @writeable: 
136 @best_match: 
137 @success: 
138 @Returns: 
139
140
141 <!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
142 <para>
143 </para>
144
145 @colormap: 
146 @color: 
147 @writeable: 
148 @best_match: 
149 @Returns: 
150
151
152 <!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
153 <para>
154 </para>
155
156 @colormap: 
157 @colors: 
158 @n_colors: 
159
160
161 <!-- ##### FUNCTION gdk_colormap_query_color ##### -->
162 <para>
163
164 </para>
165
166 @colormap: 
167 @pixel: 
168 @result: 
169
170
171 <!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
172 <para>
173 </para>
174
175 @colormap: 
176 @Returns: 
177
178
179 <!-- ##### FUNCTION gdk_colormap_get_screen ##### -->
180 <para>
181
182 </para>
183
184 @cmap: 
185 @Returns: 
186
187
188 <!-- ##### FUNCTION gdk_colors_store ##### -->
189 <para>
190 </para>
191
192 @colormap: 
193 @colors: 
194 @ncolors: 
195
196
197 <!-- ##### FUNCTION gdk_color_copy ##### -->
198 <para>
199 </para>
200
201 @color: 
202 @Returns: 
203
204
205 <!-- ##### FUNCTION gdk_color_free ##### -->
206 <para>
207 </para>
208
209 @color: 
210
211
212 <!-- ##### FUNCTION gdk_colors_alloc ##### -->
213 <para>
214 </para>
215
216 @colormap: 
217 @contiguous: 
218 @planes: 
219 @nplanes: 
220 @pixels: 
221 @npixels: 
222 @Returns: 
223
224
225 <!-- ##### FUNCTION gdk_colors_free ##### -->
226 <para>
227 </para>
228
229 @colormap: 
230 @pixels: 
231 @npixels: 
232 @planes: 
233
234
235 <!-- ##### FUNCTION gdk_color_white ##### -->
236 <para>
237 </para>
238
239 @colormap: 
240 @color: 
241 @Returns: 
242
243
244 <!-- ##### FUNCTION gdk_color_black ##### -->
245 <para>
246 </para>
247
248 @colormap: 
249 @color: 
250 @Returns: 
251
252
253 <!-- ##### FUNCTION gdk_color_parse ##### -->
254 <para>
255 </para>
256
257 @spec: 
258 @color: 
259 @Returns: 
260
261
262 <!-- ##### FUNCTION gdk_color_alloc ##### -->
263 <para>
264 </para>
265
266 @colormap: 
267 @color: 
268 @Returns: 
269
270
271 <!-- ##### FUNCTION gdk_color_change ##### -->
272 <para>
273 </para>
274
275 @colormap: 
276 @color: 
277 @Returns: 
278
279
280 <!-- ##### FUNCTION gdk_color_equal ##### -->
281 <para>
282 </para>
283
284 @colora: 
285 @colorb: 
286 @Returns: 
287
288
289 <!-- ##### FUNCTION gdk_color_hash ##### -->
290 <para>
291 </para>
292
293 @colora: 
294 @Returns: 
295
296
297 <!-- ##### FUNCTION gdk_color_to_string ##### -->
298 <para>
299
300 </para>
301
302 @color: 
303 @Returns: 
304
305