Debian Codegraph @

nx-X11/lib/src/xcms/QuCols.c

raw
1
2 /*
3 * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
4 * All Rights Reserved
5 *
6 * This file is a component of an X Window System-specific implementation
7 * of Xcms based on the TekColor Color Management System. Permission is
8 * hereby granted to use, copy, modify, sell, and otherwise distribute this
9 * software and its documentation for any purpose and without fee, provided
10 * that this copyright, permission, and disclaimer notice is reproduced in
11 * all copies of this software and in supporting documentation. TekColor
12 * is a trademark of Tektronix, Inc.
13 *
14 * Tektronix makes no representation about the suitability of this software
15 * for any purpose. It is provided "as is" and with all faults.
16 *
17 * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
18 * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
19 * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
20 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
21 * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
22 * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
23 * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
24 *
25 *
26 * NAME
27 * XcmsQuCol.c
28 *
29 * DESCRIPTION
30 * Source for XcmsQueryColors
31 *
32 *
33 */
34
35 #ifdef HAVE_CONFIG_H
36 #include <config.h>
37 #endif
38 #include "Xlibint.h"
39 #include "Xcmsint.h"
40 #include "Cv.h"
41
42
43 /************************************************************************
44 * *
45 * PUBLIC ROUTINES *
46 * *
47 ************************************************************************/
48 /*
49 * NAME
50 * XcmsQueryColors - Query Colors
51 *
52 * SYNOPSIS
53 */
54 Status
55 XcmsQueryColors(
56 Display *dpy,
57 Colormap colormap,
58 XcmsColor *pXcmsColors_in_out,
59 unsigned int nColors,
60 XcmsColorFormat result_format)
61 /*
62 * DESCRIPTION
63 * This routine uses XQueryColors to obtain the X RGB values
64 * stored in the specified colormap for the specified pixels.
65 * The X RGB values are then converted to the target format as
66 * specified by the format component of the XcmsColor structure.
67 *
68 * RETURNS
69 * XcmsFailure if failed;
70 * XcmsSuccess if it succeeded.
71 *
72 * Returns the color specifications of the colors stored in the
73 * specified pixels.
74 */
75 {
76 return(_XcmsSetGetColors(XQueryColors, dpy, colormap,
77 pXcmsColors_in_out, nColors, result_format, (Bool *) NULL));
78 }