11ab64890Smrg 21ab64890Smrg/* 31ab64890Smrg * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc. 41ab64890Smrg * All Rights Reserved 561b2299dSmrg * 61ab64890Smrg * This file is a component of an X Window System-specific implementation 71ab64890Smrg * of Xcms based on the TekColor Color Management System. Permission is 81ab64890Smrg * hereby granted to use, copy, modify, sell, and otherwise distribute this 91ab64890Smrg * software and its documentation for any purpose and without fee, provided 101ab64890Smrg * that this copyright, permission, and disclaimer notice is reproduced in 111ab64890Smrg * all copies of this software and in supporting documentation. TekColor 121ab64890Smrg * is a trademark of Tektronix, Inc. 1361b2299dSmrg * 141ab64890Smrg * Tektronix makes no representation about the suitability of this software 151ab64890Smrg * for any purpose. It is provided "as is" and with all faults. 1661b2299dSmrg * 171ab64890Smrg * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE, 181ab64890Smrg * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 191ab64890Smrg * PARTICULAR PURPOSE. IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY 201ab64890Smrg * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 211ab64890Smrg * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF 221ab64890Smrg * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 231ab64890Smrg * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE. 241ab64890Smrg * 251ab64890Smrg * 261ab64890Smrg * NAME 271ab64890Smrg * XcmsGlobls.c 281ab64890Smrg * 291ab64890Smrg * DESCRIPTION 301ab64890Smrg * Source file containing Xcms globals 311ab64890Smrg * 321ab64890Smrg * 331ab64890Smrg */ 341ab64890Smrg 351ab64890Smrg#ifdef HAVE_CONFIG_H 361ab64890Smrg#include <config.h> 371ab64890Smrg#endif 381ab64890Smrg#include "Xlibint.h" 391ab64890Smrg#include "Xcmsint.h" 401ab64890Smrg#include "Cv.h" 411ab64890Smrg 421ab64890Smrg/* 431ab64890Smrg * GLOBALS 441ab64890Smrg * Variables declared in this package that are allowed 451ab64890Smrg * to be used globally. 461ab64890Smrg */ 471ab64890Smrg 481ab64890Smrg /* 491ab64890Smrg * Initial array of Device Independent Color Spaces 501ab64890Smrg */ 511ab64890SmrgXcmsColorSpace *_XcmsDIColorSpacesInit[] = { 521ab64890Smrg &XcmsCIEXYZColorSpace, 531ab64890Smrg &XcmsCIEuvYColorSpace, 541ab64890Smrg &XcmsCIExyYColorSpace, 551ab64890Smrg &XcmsCIELabColorSpace, 561ab64890Smrg &XcmsCIELuvColorSpace, 571ab64890Smrg &XcmsTekHVCColorSpace, 581ab64890Smrg &XcmsUNDEFINEDColorSpace, 591ab64890Smrg NULL 601ab64890Smrg}; 611ab64890Smrg /* 621ab64890Smrg * Pointer to the array of pointers to XcmsColorSpace structures for 631ab64890Smrg * Device-Independent Color Spaces that are currently accessible by 641ab64890Smrg * the color management system. End of list is indicated by a NULL pointer. 651ab64890Smrg */ 661ab64890SmrgXcmsColorSpace **_XcmsDIColorSpaces = _XcmsDIColorSpacesInit; 671ab64890Smrg 681ab64890Smrg /* 691ab64890Smrg * Initial array of Device Dependent Color Spaces 701ab64890Smrg */ 711ab64890SmrgXcmsColorSpace *_XcmsDDColorSpacesInit[] = { 721ab64890Smrg &XcmsRGBColorSpace, 731ab64890Smrg &XcmsRGBiColorSpace, 741ab64890Smrg NULL 751ab64890Smrg}; 761ab64890Smrg /* 771ab64890Smrg * Pointer to the array of pointers to XcmsColorSpace structures for 781ab64890Smrg * Device-Dependent Color Spaces that are currently accessible by 791ab64890Smrg * the color management system. End of list is indicated by a NULL pointer. 801ab64890Smrg */ 811ab64890SmrgXcmsColorSpace **_XcmsDDColorSpaces = &_XcmsDDColorSpacesInit[0]; 821ab64890Smrg 831ab64890Smrg /* 841ab64890Smrg * Initial array of Screen Color Characterization Function Sets 851ab64890Smrg */ 861ab64890SmrgXcmsFunctionSet *_XcmsSCCFuncSetsInit[] = { 871ab64890Smrg &XcmsLinearRGBFunctionSet, 881ab64890Smrg#ifdef GRAY 891ab64890Smrg &XcmsGrayFunctionSet, 901ab64890Smrg#endif /* GRAY */ 911ab64890Smrg NULL}; 921ab64890Smrg /* 931ab64890Smrg * Pointer to the array of pointers to XcmsSCCFuncSet structures 941ab64890Smrg * (Screen Color Characterization Function Sets) that are currently 951ab64890Smrg * accessible by the color management system. End of list is 961ab64890Smrg * indicated by a NULL pointer. 971ab64890Smrg */ 981ab64890SmrgXcmsFunctionSet **_XcmsSCCFuncSets = _XcmsSCCFuncSetsInit; 991ab64890Smrg 1001ab64890Smrg /* 1011ab64890Smrg * X Consortium Registered Device-Independent Color Spaces 1021ab64890Smrg * Note that prefix must be in lowercase. 1031ab64890Smrg */ 1041ab64890Smrgconst char _XcmsCIEXYZ_prefix[] = "ciexyz"; 1051ab64890Smrgconst char _XcmsCIEuvY_prefix[] = "cieuvy"; 1061ab64890Smrgconst char _XcmsCIExyY_prefix[] = "ciexyy"; 1071ab64890Smrgconst char _XcmsCIELab_prefix[] = "cielab"; 1081ab64890Smrgconst char _XcmsCIELuv_prefix[] = "cieluv"; 1091ab64890Smrgconst char _XcmsTekHVC_prefix[] = "tekhvc"; 1101ab64890Smrg /* 1111ab64890Smrg * Registered Device-Dependent Color Spaces 1121ab64890Smrg */ 1131ab64890Smrgconst char _XcmsRGBi_prefix[] = "rgbi"; 1141ab64890Smrgconst char _XcmsRGB_prefix[] = "rgb"; 1151ab64890Smrg 1161ab64890SmrgXcmsRegColorSpaceEntry _XcmsRegColorSpaces[] = { 1171ab64890Smrg { _XcmsCIEXYZ_prefix, XcmsCIEXYZFormat }, 1181ab64890Smrg { _XcmsCIEuvY_prefix, XcmsCIEuvYFormat }, 1191ab64890Smrg { _XcmsCIExyY_prefix, XcmsCIExyYFormat }, 1201ab64890Smrg { _XcmsCIELab_prefix, XcmsCIELabFormat }, 1211ab64890Smrg { _XcmsCIELuv_prefix, XcmsCIELuvFormat }, 1221ab64890Smrg { _XcmsTekHVC_prefix, XcmsTekHVCFormat }, 1231ab64890Smrg { _XcmsRGB_prefix, XcmsRGBFormat }, 1241ab64890Smrg { _XcmsRGBi_prefix, XcmsRGBiFormat }, 1251ab64890Smrg { NULL, 0 } 1261ab64890Smrg}; 127