1
<!-- ##### SECTION Title ##### -->
4
<!-- ##### SECTION Short_Description ##### -->
5
Manipulation of colors and colormaps
7
<!-- ##### SECTION Long_Description ##### -->
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.
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_cmap(). However, when using GdkRGB,
27
it is not generally necessary to allocate colors
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.
41
<!-- ##### SECTION See_Also ##### -->
46
<!-- ##### SECTION Stability_Level ##### -->
49
<!-- ##### STRUCT GdkColor ##### -->
51
The #GdkColor structure is used to describe an
52
allocated or unallocated color.
55
@pixel: For allocated colors, the value used to
56
draw this color on the screen.
57
@red: The red component of the color. This is
58
a value between 0 and 65535, with 65535 indicating
60
@green: The blue component of the color.
61
@blue: The green component of the color.
63
<!-- ##### STRUCT GdkColormap ##### -->
65
The colormap structure contains the following public fields.
68
@size: For pseudo-color colormaps, the number of colors
70
@colors: An array containing the current values in the
71
colormap. This can be used to map from pixel values
72
back to RGB values. This is only meaningful for
73
pseudo-color colormaps.
75
<!-- ##### FUNCTION gdk_colormap_new ##### -->
84
<!-- ##### FUNCTION gdk_colormap_ref ##### -->
93
<!-- ##### FUNCTION gdk_colormap_unref ##### -->
101
<!-- ##### FUNCTION gdk_colormap_get_system ##### -->
108
<!-- ##### FUNCTION gdk_colormap_get_system_size ##### -->
115
<!-- ##### FUNCTION gdk_colormap_change ##### -->
123
<!-- ##### FUNCTION gdk_colormap_alloc_colors ##### -->
136
<!-- ##### FUNCTION gdk_colormap_alloc_color ##### -->
147
<!-- ##### FUNCTION gdk_colormap_free_colors ##### -->
156
<!-- ##### FUNCTION gdk_colormap_query_color ##### -->
166
<!-- ##### FUNCTION gdk_colormap_get_visual ##### -->
174
<!-- ##### FUNCTION gdk_colormap_get_screen ##### -->
183
<!-- ##### FUNCTION gdk_colors_store ##### -->
192
<!-- ##### FUNCTION gdk_color_copy ##### -->
200
<!-- ##### FUNCTION gdk_color_free ##### -->
207
<!-- ##### FUNCTION gdk_colors_alloc ##### -->
220
<!-- ##### FUNCTION gdk_colors_free ##### -->
230
<!-- ##### FUNCTION gdk_color_white ##### -->
239
<!-- ##### FUNCTION gdk_color_black ##### -->
248
<!-- ##### FUNCTION gdk_color_parse ##### -->
257
<!-- ##### FUNCTION gdk_color_alloc ##### -->
266
<!-- ##### FUNCTION gdk_color_change ##### -->
275
<!-- ##### FUNCTION gdk_color_equal ##### -->
284
<!-- ##### FUNCTION gdk_color_hash ##### -->