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  *		XcmsGlobls.c
28  *
29  *	DESCRIPTION
30  *		Source file containing Xcms globals
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  *      GLOBALS
44  *              Variables declared in this package that are allowed
45  *		to be used globally.
46  */
47 
48     /*
49      * Initial array of Device Independent Color Spaces
50      */
51 XcmsColorSpace *_XcmsDIColorSpacesInit[] = {
52     &XcmsCIEXYZColorSpace,
53     &XcmsCIEuvYColorSpace,
54     &XcmsCIExyYColorSpace,
55     &XcmsCIELabColorSpace,
56     &XcmsCIELuvColorSpace,
57     &XcmsTekHVCColorSpace,
58     &XcmsUNDEFINEDColorSpace,
59     NULL
60 };
61     /*
62      * Pointer to the array of pointers to XcmsColorSpace structures for
63      * Device-Independent Color Spaces that are currently accessible by
64      * the color management system.  End of list is indicated by a NULL pointer.
65      */
66 XcmsColorSpace **_XcmsDIColorSpaces = _XcmsDIColorSpacesInit;
67 
68     /*
69      * Initial array of Device Dependent Color Spaces
70      */
71 XcmsColorSpace *_XcmsDDColorSpacesInit[] = {
72     &XcmsRGBColorSpace,
73     &XcmsRGBiColorSpace,
74     NULL
75 };
76     /*
77      * Pointer to the array of pointers to XcmsColorSpace structures for
78      * Device-Dependent Color Spaces that are currently accessible by
79      * the color management system.  End of list is indicated by a NULL pointer.
80      */
81 XcmsColorSpace **_XcmsDDColorSpaces = &_XcmsDDColorSpacesInit[0];
82 
83     /*
84      * Initial array of Screen Color Characterization Function Sets
85      */
86 XcmsFunctionSet	*_XcmsSCCFuncSetsInit[] = {
87 	&XcmsLinearRGBFunctionSet,
88 #ifdef GRAY
89 	&XcmsGrayFunctionSet,
90 #endif /* GRAY */
91 	NULL};
92     /*
93      * Pointer to the array of pointers to XcmsSCCFuncSet structures
94      * (Screen Color Characterization Function Sets) that are currently
95      * accessible by the color management system.  End of list is
96      * indicated by a NULL pointer.
97      */
98 XcmsFunctionSet **_XcmsSCCFuncSets = _XcmsSCCFuncSetsInit;
99 
100     /*
101      * X Consortium Registered Device-Independent Color Spaces
102      *	Note that prefix must be in lowercase.
103      */
104 const char	_XcmsCIEXYZ_prefix[] = "ciexyz";
105 const char	_XcmsCIEuvY_prefix[] = "cieuvy";
106 const char	_XcmsCIExyY_prefix[] = "ciexyy";
107 const char	_XcmsCIELab_prefix[] = "cielab";
108 const char 	_XcmsCIELuv_prefix[] = "cieluv";
109 const char	_XcmsTekHVC_prefix[] = "tekhvc";
110     /*
111      * Registered Device-Dependent Color Spaces
112      */
113 const char	_XcmsRGBi_prefix[] = "rgbi";
114 const char	_XcmsRGB_prefix[] = "rgb";
115 
116 XcmsRegColorSpaceEntry _XcmsRegColorSpaces[] = {
117     { _XcmsCIEXYZ_prefix, XcmsCIEXYZFormat },
118     { _XcmsCIEuvY_prefix, XcmsCIEuvYFormat },
119     { _XcmsCIExyY_prefix, XcmsCIExyYFormat },
120     { _XcmsCIELab_prefix, XcmsCIELabFormat },
121     { _XcmsCIELuv_prefix, XcmsCIELuvFormat },
122     { _XcmsTekHVC_prefix, XcmsTekHVCFormat },
123     { _XcmsRGB_prefix, XcmsRGBFormat },
124     { _XcmsRGBi_prefix,	XcmsRGBiFormat },
125     { NULL, 0 }
126 };
127