man-pages/man3/XcupStoreColors.3.html
2021-03-31 01:06:50 +01:00

111 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of XcupStoreColors</TITLE>
</HEAD><BODY>
<H1>XcupStoreColors</H1>
Section: X FUNCTIONS (3)<BR>Updated: libXext 1.3.4<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
XcupStoreColors - initialize shareable colormap entries at specific locations
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<PRE>
<B>cc</B> [ <I>flag</I> ... ] <I>file</I> ... -<B>lXext</B> [ <I>library</I> ... ]
#include &lt;<A HREF="file:///usr/include/X11/extensions/Xcup.h">X11/extensions/Xcup.h</A>&gt;
<DL COMPACT>
<DT id="1"><DD>Status <B>XcupStoreColors</B>(Display *<I>display</I>, Colormap <I>colormap</I>,
XColor *<I>colors_in_out</I>, int <I>ncolors</I>);
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</DL>
</PRE><A NAME="lbAD">&nbsp;</A>
<H2>ARGUMENTS</H2>
<DL COMPACT>
<DT id="2"><I>display</I><DD>
Specifies the connection to the X server
<DT id="3"><I>colormap</I><DD>
Specifies the colormap
<DT id="4"><I>colors_in_out</I><DD>
Specifies and returns the values actually used in the colormap
<DT id="5"><I>ncolors</I><DD>
Specifies the number of items in colors_in_out
</DL>
<A NAME="lbAE">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
The
<I>XcupStoreColors</I>
function changes the colormap entries of the pixel values in the pixel
members of the XColor structures. The colormap entries are allocated
as if an AllocColor has been used instead, i.e. the colors are
read-only (shareable).
<I>XcupStoreColors</I>
returns the number of colors that were successfully allocated in the colormap.
<P>
A
<I>Value</I>
error is generated if a pixel is not a valid index into the colormap. A
<I>BadMatch</I>
error is generated if the colormap does not belong to a GrayScale,
PseudoColor, or DirectColor visual.
<P>
Applications which allocate many colors in a screen's default colormap, e.g.
a color-cube or a gray-ramp, should allocate them with
<I>XCupStoreColors</I>.
By using XCupStoreColors the colors will be allocated sharable (read-only)
and any other application which allocates the same color will share that
color cell.
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?3Xext+XcupQueryVersion">XcupQueryVersion</A></B>(3Xext),
<B><A HREF="/cgi-bin/man/man2html?3Xext+XcupGetReservedColormapEntries">XcupGetReservedColormapEntries</A></B>(3Xext),
<BR>
<I>Colormap Utilization Policy and Extension</I>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
<DT id="7"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="8"><A HREF="#lbAD">ARGUMENTS</A><DD>
<DT id="9"><A HREF="#lbAE">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAF">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:00 GMT, March 31, 2021
</BODY>
</HTML>