summaryrefslogtreecommitdiff
path: root/docs/reference/gdk/tmpl/colors.sgml
blob: 163dc3116c708c66b442b1f90ce4eac675842310 (plain)
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
<!-- ##### SECTION Title ##### -->
Colormaps and Colors

<!-- ##### SECTION Short_Description ##### -->
Manipulation of colors and colormaps

<!-- ##### SECTION Long_Description ##### -->
<para>
These functions are used to modify colormaps.
A colormap 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. 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.
</para>

<para>
There are a couple of special colormaps that can
be retrieved. The system colormap (retrieved 
with gdk_colormap_get_system()) 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
gdk_rgb_get_cmap(). However, when using GdkRGB, 
it is not generally necessary to allocate colors
directly.
</para>

<para>
In previous revisions of this interface, a number
of functions that take a #GdkColormap parameter
were replaced with functions whose names began
with "gdk_colormap_". This process will probably
be extended somewhat in the future - 
gdk_color_white(), gdk_color_black(), and 
gdk_color_change() will probably become aliases.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### STRUCT GdkColor ##### -->
<para>
The #GdkColor structure is used to describe an 
allocated or unallocated color.
</para>

@pixel: For allocated colors, the value used to
  draw this color on the screen.
@red: The red component of the color. This is
  a value between 0 and 65535, with 65535 indicating
  full intensitiy.
@green: The blue component of the color.
@blue: The green component of the color.

<!-- ##### STRUCT GdkColormap ##### -->
<para>
The colormap structure contains the following public fields.
</para>

@parent_instance: 
@size: For pseudo-color colormaps, the number of colors
  in the colormap.
@colors: An array containing the current values in the
  colormap. This can be used to map from pixel values
  back to RGB values. This is only meaningful for
  pseudo-color colormaps.

<!-- ##### FUNCTION gdk_colormap_new ##### -->
<para>
</para>

@visual: 
@allocate: 
@Returns: 


<!-- ##### FUNCTION gdk_colormap_ref ##### -->
<para>

</para>

@cmap: 
@Returns: 


<!-- ##### FUNCTION gdk_colormap_unref ##### -->
<para>

</para>

@cmap: 


<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
<para>
</para>

@Returns: 


<!-- ##### FUNCTION gdk_colormap_get_system_size ##### -->
<para>
</para>

@Returns: 


<!-- ##### FUNCTION gdk_colormap_change ##### -->
<para>
</para>

@colormap: 
@ncolors: 


<!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
<para>
</para>

@colormap: 
@colors: 
@ncolors: 
@writeable: 
@best_match: 
@success: 
@Returns: 


<!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
<para>
</para>

@colormap: 
@color: 
@writeable: 
@best_match: 
@Returns: 


<!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
<para>
</para>

@colormap: 
@colors: 
@ncolors: 


<!-- ##### FUNCTION gdk_colormap_query_color ##### -->
<para>

</para>

@colormap: 
@pixel: 
@result: 


<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
<para>
</para>

@colormap: 
@Returns: 


<!-- ##### FUNCTION gdk_colormap_get_screen ##### -->
<para>

</para>

@cmap: 
@Returns: 


<!-- ##### FUNCTION gdk_colors_store ##### -->
<para>
</para>

@colormap: 
@colors: 
@ncolors: 


<!-- ##### FUNCTION gdk_color_copy ##### -->
<para>
</para>

@color: 
@Returns: 


<!-- ##### FUNCTION gdk_color_free ##### -->
<para>
</para>

@color: 


<!-- ##### FUNCTION gdk_colors_alloc ##### -->
<para>
</para>

@colormap: 
@contiguous: 
@planes: 
@nplanes: 
@pixels: 
@npixels: 
@Returns: 


<!-- ##### FUNCTION gdk_colors_free ##### -->
<para>
</para>

@colormap: 
@pixels: 
@npixels: 
@planes: 


<!-- ##### FUNCTION gdk_color_white ##### -->
<para>
</para>

@colormap: 
@color: 
@Returns: 


<!-- ##### FUNCTION gdk_color_black ##### -->
<para>
</para>

@colormap: 
@color: 
@Returns: 


<!-- ##### FUNCTION gdk_color_parse ##### -->
<para>
</para>

@spec: 
@color: 
@Returns: 


<!-- ##### FUNCTION gdk_color_alloc ##### -->
<para>
</para>

@colormap: 
@color: 
@Returns: 


<!-- ##### FUNCTION gdk_color_change ##### -->
<para>
</para>

@colormap: 
@color: 
@Returns: 


<!-- ##### FUNCTION gdk_color_equal ##### -->
<para>
</para>

@colora: 
@colorb: 
@Returns: 


<!-- ##### FUNCTION gdk_color_hash ##### -->
<para>
</para>

@colora: 
@Returns: