1XcmsStoreColor(3) XLIB FUNCTIONS XcmsStoreColor(3)
2
3
4
6 XcmsStoreColor, XcmsStoreColors - set colors
7
9 Status XcmsStoreColor(Display *display, Colormap colormap, XcmsColor
10 *color);
11
12 Status XcmsStoreColors(Display *display, Colormap colormap, XcmsColor
13 colors[], int ncolors, Bool compression_flags_return[]);
14
16 display Specifies the connection to the X server.
17
18 color Specifies the color cell and the color to store. Values
19 specified in this XcmsColor structure remain unchanged on
20 return.
21
22 colors Specifies the color specification array of XcmsColor struc‐
23 tures, each specifying a color cell and the color to store in
24 that cell. Values specified in the array remain unchanged
25 upon return.
26
27 colormap Specifies the colormap.
28
29 compression_flags_return
30 Returns an array of Boolean values indicating compression
31 status. If a non-NULL pointer is supplied, each element of
32 the array is set to True if the corresponding color was com‐
33 pressed and False otherwise. Pass NULL if the compression
34 status is not useful.
35
36 ncolors Specifies the number of XcmsColor structures in the color-
37 specification array.
38
40 The XcmsStoreColor function converts the color specified in the Xcms‐
41 Color structure into RGB values. It then uses this RGB specification
42 in an XColor structure, whose three flags (DoRed, DoGreen, and DoBlue)
43 are set, in a call to XStoreColor to change the color cell specified by
44 the pixel member of the XcmsColor structure. This pixel value must be
45 a valid index for the specified colormap, and the color cell specified
46 by the pixel value must be a read/write cell. If the pixel value is
47 not a valid index, a BadValue error results. If the color cell is
48 unallocated or is allocated read-only, a BadAccess error results. If
49 the colormap is an installed map for its screen, the changes are visi‐
50 ble immediately.
51
52 Note that XStoreColor has no return value; therefore, an XcmsSuccess
53 return value from this function indicates that the conversion to RGB
54 succeeded and the call to XStoreColor was made. To obtain the actual
55 color stored, use XcmsQueryColor. Because of the screen's hardware
56 limitations or gamut compression, the color stored in the colormap may
57 not be identical to the color specified.
58
59 XcmsStoreColor can generate BadAccess, BadColor, and BadValue errors.
60
61 The XcmsStoreColors function converts the colors specified in the array
62 of XcmsColor structures into RGB values and then uses these RGB speci‐
63 fications in XColor structures, whose three flags (DoRed, DoGreen, and
64 DoBlue) are set, in a call to XStoreColors to change the color cells
65 specified by the pixel member of the corresponding XcmsColor structure.
66 Each pixel value must be a valid index for the specified colormap, and
67 the color cell specified by each pixel value must be a read/write cell.
68 If a pixel value is not a valid index, a BadValue error results. If a
69 color cell is unallocated or is allocated read-only, a BadAccess error
70 results. If more than one pixel is in error, the one that gets
71 reported is arbitrary. If the colormap is an installed map for its
72 screen, the changes are visible immediately.
73
74 Note that XStoreColors has no return value; therefore, an XcmsSuccess
75 return value from this function indicates that conversions to RGB suc‐
76 ceeded and the call to XStoreColors was made. To obtain the actual
77 colors stored, use XcmsQueryColors. Because of the screen's hardware
78 limitations or gamut compression, the colors stored in the colormap may
79 not be identical to the colors specified.
80
81 XcmsStoreColors can generate BadAccess, BadColor, and BadValue errors.
82
84 BadAccess A client attempted to free a color map entry that it did not
85 already allocate.
86
87 BadAccess A client attempted to store into a read-only color map entry.
88
89 BadColor A value for a Colormap argument does not name a defined Col‐
90 ormap.
91
92 BadValue Some numeric value falls outside the range of values accepted
93 by the request. Unless a specific range is specified for an
94 argument, the full range defined by the argument's type is
95 accepted. Any argument defined as a set of alternatives can
96 generate this error.
97
99 XcmsAllocColor(3), XcmsQueryColor(3)
100 Xlib - C Language X Interface
101
102
103
104X Version 11 libX11 1.6.7 XcmsStoreColor(3)