3db448f3f9cca18dc038320ebc7473d2261fc33e
[framework/uifw/xorg/lib/libxext.git] / man / XcupStoreColors.man
1 .\" Copyright \(co 1986-1997   The Open Group    All Rights Reserved
2 .\" Copyright 1999, 2005 Sun Microsystems, Inc.  All rights reserved.
3 .\"
4 .\" Permission is hereby granted, free of charge, to any person obtaining a
5 .\" copy of this software and associated documentation files (the "Software"),
6 .\" to deal in the Software without restriction, including without limitation
7 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 .\" and/or sell copies of the Software, and to permit persons to whom the
9 .\" Software is furnished to do so, subject to the following conditions:
10 .\"
11 .\" The above copyright notice and this permission notice (including the next
12 .\" paragraph) shall be included in all copies or substantial portions of the
13 .\" Software.
14 .\"
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18 .\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 .\" DEALINGS IN THE SOFTWARE.
22 .\" 
23 .\" X Window System is a trademark of The Open Group.
24 .\" 
25 .de ZN
26 .ie t \fB\^\\$1\^\fR\\$2
27 .el \fI\^\\$1\^\fP\\$2
28 ..
29 .TH XcupStoreColors __libmansuffix__ __xorgversion__ "X FUNCTIONS"
30 .SH NAME
31 XcupStoreColors \- initialize shareable colormap entries at specific locations
32 .SH SYNOPSIS
33 .PP
34 .nf
35 \fBcc\fR [ \fIflag\fR \&.\&.\&. ] \fIfile\fR \&.\&.\&. -\fBlXext\fR [ \fIlibrary\fR \&.\&.\&. ]
36 \&#include <X11/extensions/Xcup.h>
37 .HP
38 Status \fBXcupStoreColors\fP\^(\^Display *\fIdisplay\fP\^, Colormap \fIcolormap\fP\^,
39 XColor *\fIcolors_in_out\fP\^, int \fIncolors\fP\^);
40 .if n .ti +5n
41 .if t .ti +.5i
42 .SH ARGUMENTS
43 .IP \fIdisplay\fP 1i
44 Specifies the connection to the X server
45 .IP \fIcolormap\fP 1i
46 Specifies the colormap
47 .IP \fIcolors_in_out\fP 1i
48 Specifies and returns the values actually used in the colormap
49 .IP \fIncolors\fP 1i
50 Specifies the number of items in colors_in_out
51 .SH DESCRIPTION
52 .LP
53 The 
54 .ZN XcupStoreColors 
55 function changes the colormap entries of the pixel values in the pixel
56 members of the XColor structures. The colormap entries are allocated
57 as if an AllocColor has been used instead, i.e. the colors are
58 read-only (shareable).
59 .ZN XcupStoreColors 
60 returns the number of colors that were successfully allocated in the colormap.
61 .LP
62
63 .ZN Value 
64 error is generated if a pixel is not a valid index into the colormap. A
65 .ZN BadMatch 
66 error is generated if the colormap does not belong to a GrayScale,
67 PseudoColor, or DirectColor visual.
68 .LP
69 Applications which allocate many colors in a screen's default colormap, e.g.
70 a color-cube or a gray-ramp, should allocate them with 
71 .ZN XCupStoreColors .
72 By using XCupStoreColors the colors will be allocated sharable (read-only) 
73 and any other application which allocates the same color will share that 
74 color cell.
75 .SH "SEE ALSO"
76 .BR XcupQueryVersion (3Xext),
77 .BR XcupGetReservedColormapEntries (3Xext),
78 .br
79 \fIColormap Utilization Policy and Extension\fP