Cv.h revision 1ab64890
1/* $XFree86: xc/lib/X11/Cv.h,v 1.1 2003/04/13 19:22:15 dawes Exp $ */ 2 3#ifndef _CV_H_ 4#define _CV_H_ 5 6/* variables */ 7extern const char _XcmsCIEXYZ_prefix[]; 8extern const char _XcmsCIEuvY_prefix[]; 9extern const char _XcmsCIExyY_prefix[]; 10extern const char _XcmsCIELab_prefix[]; 11extern const char _XcmsCIELuv_prefix[]; 12extern const char _XcmsTekHVC_prefix[]; 13extern const char _XcmsRGBi_prefix[]; 14extern const char _XcmsRGB_prefix[]; 15 16extern XcmsColorSpace XcmsUNDEFINEDColorSpace; 17extern XcmsColorSpace XcmsTekHVCColorSpace; 18extern XcmsColorSpace XcmsCIEXYZColorSpace; 19extern XcmsColorSpace XcmsCIEuvYColorSpace; 20extern XcmsColorSpace XcmsCIExyYColorSpace; 21extern XcmsColorSpace XcmsCIELabColorSpace; 22extern XcmsColorSpace XcmsCIELuvColorSpace; 23extern XcmsColorSpace XcmsRGBColorSpace; 24extern XcmsColorSpace XcmsRGBiColorSpace; 25 26extern XcmsColorSpace *_XcmsDIColorSpacesInit[]; 27extern XcmsColorSpace **_XcmsDIColorSpaces; 28 29extern XcmsColorSpace *_XcmsDDColorSpacesInit[]; 30extern XcmsColorSpace **_XcmsDDColorSpaces; 31 32extern XcmsFunctionSet XcmsLinearRGBFunctionSet; 33 34extern XcmsFunctionSet *_XcmsSCCFuncSetsInit[]; 35extern XcmsFunctionSet **_XcmsSCCFuncSets; 36 37extern XcmsRegColorSpaceEntry _XcmsRegColorSpaces[]; 38 39/* functions */ 40extern XPointer * 41_XcmsCopyPointerArray( 42 XPointer *pap); 43extern void 44_XcmsFreePointerArray( 45 XPointer *pap); 46extern XPointer * 47_XcmsPushPointerArray( 48 XPointer *pap, 49 XPointer p, 50 XPointer *papNoFree); 51extern Status 52_XcmsCIEXYZ_ValidSpec( 53 XcmsColor *pColor); 54extern Status 55_XcmsCIEuvY_ValidSpec( 56 XcmsColor *pColor); 57extern int 58_XcmsTekHVC_CheckModify( 59 XcmsColor *pColor); 60 61extern Status 62_XcmsTekHVCQueryMaxVCRGB( 63 XcmsCCC ccc, 64 XcmsFloat hue, 65 XcmsColor *pColor_return, 66 XcmsRGBi *pRGB_return); 67extern Status 68_XcmsCIELabQueryMaxLCRGB( 69 XcmsCCC ccc, 70 XcmsFloat hue, /* hue in radians */ 71 XcmsColor *pColor_return, 72 XcmsRGBi *pRGB_return); 73extern Status 74_XcmsConvertColorsWithWhitePt( 75 XcmsCCC ccc, 76 XcmsColor *pColors_in_out, 77 XcmsColor *pWhitePt, 78 unsigned int nColors, 79 XcmsColorFormat newFormat, 80 Bool *pCompressed); 81 82extern Status 83_XcmsDIConvertColors( 84 XcmsCCC ccc, 85 XcmsColor *pColors_in_out, 86 XcmsColor *pWhitePt, 87 unsigned int nColors, 88 XcmsColorFormat newFormat); 89extern Status 90_XcmsDDConvertColors( 91 XcmsCCC ccc, 92 XcmsColor *pColors_in_out, 93 unsigned int nColors, 94 XcmsColorFormat newFormat, 95 Bool *pCompressed); 96extern XcmsColorFormat 97_XcmsRegFormatOfPrefix( 98 _Xconst char *prefix); 99extern void 100_XColor_to_XcmsRGB( 101 XcmsCCC ccc, 102 XColor *pXColors, 103 XcmsColor *pColors, 104 unsigned int nColors); 105extern Status 106_XcmsSetGetColor( 107 Status (*xColorProc)( 108 Display* /* display */, 109 Colormap /* colormap */, 110 XColor* /* screen_in_out */), 111 Display *dpy, 112 Colormap cmap, 113 XcmsColor *pColors_in_out, 114 XcmsColorFormat result_format, 115 Bool *pCompressed); 116extern Status 117_XcmsSetGetColors( 118 Status (*xColorProc)( 119 Display* /* display */, 120 Colormap /* colormap */, 121 XColor* /* screen_in_out */, 122 int /* nColors */), 123 Display *dpy, 124 Colormap cmap, 125 XcmsColor *pColors_in_out, 126 int nColors, 127 XcmsColorFormat result_format, 128 Bool *pCompressed); 129extern Status 130_XcmsCIELuvQueryMaxLCRGB( 131 XcmsCCC ccc, 132 XcmsFloat hue, /* hue in radians */ 133 XcmsColor *pColor_return, 134 XcmsRGBi *pRGB_return); 135 136extern XcmsIntensityMap * 137_XcmsGetIntensityMap( 138 Display *dpy, 139 Visual *visual); 140extern int 141_XcmsInitDefaultCCCs( 142 Display *dpy); 143extern int 144_XcmsInitScrnInfo( 145 register Display *dpy, 146 int screenNumber); 147extern XcmsCmapRec * 148_XcmsCopyCmapRecAndFree( 149 Display *dpy, 150 Colormap src_cmap, 151 Colormap copy_cmap); 152extern void 153_XcmsCopyISOLatin1Lowered( 154 char *dst, 155 const char *src); 156extern int 157_XcmsEqualWhitePts( 158 XcmsCCC ccc, XcmsColor *pWhitePt1, XcmsColor *pWhitePt2); 159extern int 160_XcmsLRGB_InitScrnDefault( 161 Display *dpy, 162 int screenNumber, 163 XcmsPerScrnInfo *pPerScrnInfo); 164extern void 165_XcmsFreeIntensityMaps( 166 Display *dpy); 167extern int 168_XcmsGetProperty( 169 Display *pDpy, 170 Window w, 171 Atom property, 172 int *pFormat, 173 unsigned long *pNItems, 174 unsigned long *pNBytes, 175 char **pValue); 176extern unsigned long 177_XcmsGetElement( 178 int format, 179 char **pValue, 180 unsigned long *pCount); 181extern void 182_XcmsUnresolveColor( 183 XcmsCCC ccc, 184 XcmsColor *pColor); 185extern void 186_XcmsResolveColor( 187 XcmsCCC ccc, 188 XcmsColor *pXcmsColor); 189 190#endif /* _CV_H_ */ 191