cmsAllCol.c revision 1ab64890
1/* $Xorg: cmsAllCol.c,v 1.3 2000/08/17 19:45:08 cpqbld Exp $ */
2
3/*
4 * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
5 * 	All Rights Reserved
6 *
7 * This file is a component of an X Window System-specific implementation
8 * of Xcms based on the TekColor Color Management System.  Permission is
9 * hereby granted to use, copy, modify, sell, and otherwise distribute this
10 * software and its documentation for any purpose and without fee, provided
11 * that this copyright, permission, and disclaimer notice is reproduced in
12 * all copies of this software and in supporting documentation.  TekColor
13 * is a trademark of Tektronix, Inc.
14 *
15 * Tektronix makes no representation about the suitability of this software
16 * for any purpose.  It is provided "as is" and with all faults.
17 *
18 * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
19 * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20 * PARTICULAR PURPOSE.  IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
21 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
22 * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
23 * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
24 * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
25 *
26 *
27 *	NAME
28 *		XcmsAllCol.c
29 *
30 *	DESCRIPTION
31 *		Source for XcmsAllocColor
32 *
33 *
34 */
35/* $XFree86: xc/lib/X11/cmsAllCol.c,v 1.3 2001/01/17 19:41:50 dawes Exp $ */
36
37#ifdef HAVE_CONFIG_H
38#include <config.h>
39#endif
40#include "Xlibint.h"
41#include "Xcmsint.h"
42#include "Cv.h"
43
44
45/*
46 *	NAME
47 *		XcmsAllocColor - Allocate Color
48 *
49 *	SYNOPSIS
50 */
51Status
52XcmsAllocColor(
53    Display *dpy,
54    Colormap colormap,
55    XcmsColor *pXcmsColor_in_out,
56    XcmsColorFormat result_format)
57/*
58 *	DESCRIPTION
59 *		Given a device-dependent or device-independent color
60 *		specification, XcmsAllocColor will convert it to X RGB
61 *		values then use it in a call to XAllocColor.
62 *
63 *	RETURNS
64 *		XcmsFailure if failed;
65 *		XcmsSuccess if it succeeded without gamut compression;
66 *		XcmsSuccessWithCompression if it succeeded with gamut
67 *			compression;
68 *
69 *		Also returns the pixel value of the color cell and a color
70 *		specification of the color actually stored.
71 *
72 */
73{
74    return(_XcmsSetGetColor(XAllocColor, dpy, colormap, pXcmsColor_in_out,
75	    result_format, (Bool *)NULL));
76}
77