Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:32

0001 
0002 /*
0003  * Code and supporting documentation (c) Copyright 1990 1991 Tektronix, Inc.
0004  *  All Rights Reserved
0005  *
0006  * This file is a component of an X Window System-specific implementation
0007  * of Xcms based on the TekColor Color Management System.  Permission is
0008  * hereby granted to use, copy, modify, sell, and otherwise distribute this
0009  * software and its documentation for any purpose and without fee, provided
0010  * that this copyright, permission, and disclaimer notice is reproduced in
0011  * all copies of this software and in supporting documentation.  TekColor
0012  * is a trademark of Tektronix, Inc.
0013  *
0014  * Tektronix makes no representation about the suitability of this software
0015  * for any purpose.  It is provided "as is" and with all faults.
0016  *
0017  * TEKTRONIX DISCLAIMS ALL WARRANTIES APPLICABLE TO THIS SOFTWARE,
0018  * INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
0019  * PARTICULAR PURPOSE.  IN NO EVENT SHALL TEKTRONIX BE LIABLE FOR ANY
0020  * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
0021  * RESULTING FROM LOSS OF USE, DATA, OR PROFITS, WHETHER IN AN ACTION OF
0022  * CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
0023  * CONNECTION WITH THE USE OR THE PERFORMANCE OF THIS SOFTWARE.
0024  *
0025  *
0026  *  DESCRIPTION
0027  *      Public include file for X Color Management System
0028  */
0029 #ifndef _X11_XCMS_H_
0030 #define _X11_XCMS_H_
0031 
0032 #include <X11/Xlib.h>
0033 
0034 /* The Xcms structs are full of implicit padding to properly align members.
0035    We can't clean that up without breaking ABI, so tell clang not to bother
0036    complaining about it. */
0037 #ifdef __clang__
0038 #pragma clang diagnostic push
0039 #pragma clang diagnostic ignored "-Wpadded"
0040 #endif
0041 
0042     /*
0043      * XCMS Status Values
0044      */
0045 #define XcmsFailure         0
0046 #define XcmsSuccess         1
0047 #define XcmsSuccessWithCompression  2
0048 
0049     /*
0050      * Color Space Format ID's
0051      *    Color Space ID's are of XcmsColorFormat type.
0052      *
0053      *    bit 31
0054      *      0 == Device-Independent
0055      *      1 == Device-Dependent
0056      *
0057      *    bit 30:
0058      *      0 == Registered with X Consortium
0059      *      1 == Unregistered
0060      */
0061 #define XcmsUndefinedFormat (XcmsColorFormat)0x00000000
0062 #define XcmsCIEXYZFormat    (XcmsColorFormat)0x00000001
0063 #define XcmsCIEuvYFormat    (XcmsColorFormat)0x00000002
0064 #define XcmsCIExyYFormat    (XcmsColorFormat)0x00000003
0065 #define XcmsCIELabFormat    (XcmsColorFormat)0x00000004
0066 #define XcmsCIELuvFormat    (XcmsColorFormat)0x00000005
0067 #define XcmsTekHVCFormat    (XcmsColorFormat)0x00000006
0068 #define XcmsRGBFormat       (XcmsColorFormat)0x80000000
0069 #define XcmsRGBiFormat      (XcmsColorFormat)0x80000001
0070 
0071     /*
0072      * State of XcmsPerScrnInfo
0073      */
0074 #define XcmsInitNone        0x00    /* no initialization attempted */
0075 #define XcmsInitSuccess     0x01    /* initialization successful */
0076 #define XcmsInitFailure     0xff    /* failure, use defaults */
0077 
0078 #define DisplayOfCCC(ccc)       ((ccc)->dpy)
0079 #define ScreenNumberOfCCC(ccc)      ((ccc)->screenNumber)
0080 #define VisualOfCCC(ccc)        ((ccc)->visual)
0081 #define ClientWhitePointOfCCC(ccc)  (&(ccc)->clientWhitePt)
0082 #define ScreenWhitePointOfCCC(ccc)  (&(ccc)->pPerScrnInfo->screenWhitePt)
0083 #define FunctionSetOfCCC(ccc)       ((ccc)->pPerScrnInfo->functionSet)
0084 
0085 typedef unsigned long XcmsColorFormat;  /* Color Space Format ID */
0086 
0087 typedef double XcmsFloat;
0088 
0089     /*
0090      * Device RGB
0091      */
0092 typedef struct {
0093     unsigned short red;     /* scaled from 0x0000 to 0xffff */
0094     unsigned short green;   /* scaled from 0x0000 to 0xffff */
0095     unsigned short blue;    /* scaled from 0x0000 to 0xffff */
0096 } XcmsRGB;
0097 
0098     /*
0099      * RGB Intensity
0100      */
0101 typedef struct {
0102     XcmsFloat red;  /* 0.0 - 1.0 */
0103     XcmsFloat green;    /* 0.0 - 1.0 */
0104     XcmsFloat blue; /* 0.0 - 1.0 */
0105 } XcmsRGBi;
0106 
0107     /*
0108      * CIE XYZ
0109      */
0110 typedef struct {
0111     XcmsFloat X;
0112     XcmsFloat Y;
0113     XcmsFloat Z;
0114 } XcmsCIEXYZ;
0115 
0116     /*
0117      * CIE u'v'Y
0118      */
0119 typedef struct {
0120     XcmsFloat u_prime;      /* 0.0 - 1.0 */
0121     XcmsFloat v_prime;      /* 0.0 - 1.0 */
0122     XcmsFloat Y;        /* 0.0 - 1.0 */
0123 } XcmsCIEuvY;
0124 
0125     /*
0126      * CIE xyY
0127      */
0128 typedef struct {
0129     XcmsFloat x;        /* 0.0 - 1.0 */
0130     XcmsFloat y;        /* 0.0 - 1.0 */
0131     XcmsFloat Y;        /* 0.0 - 1.0 */
0132 } XcmsCIExyY;
0133 
0134     /*
0135      * CIE L*a*b*
0136      */
0137 typedef struct {
0138     XcmsFloat L_star;       /* 0.0 - 100.0 */
0139     XcmsFloat a_star;
0140     XcmsFloat b_star;
0141 } XcmsCIELab;
0142 
0143     /*
0144      * CIE L*u*v*
0145      */
0146 typedef struct {
0147     XcmsFloat L_star;       /* 0.0 - 100.0 */
0148     XcmsFloat u_star;
0149     XcmsFloat v_star;
0150 } XcmsCIELuv;
0151 
0152     /*
0153      * TekHVC
0154      */
0155 typedef struct {
0156     XcmsFloat H;        /* 0.0 - 360.0 */
0157     XcmsFloat V;        /* 0.0 - 100.0 */
0158     XcmsFloat C;        /* 0.0 - 100.0 */
0159 } XcmsTekHVC;
0160 
0161     /*
0162      * PAD
0163      */
0164 typedef struct {
0165     XcmsFloat pad0;
0166     XcmsFloat pad1;
0167     XcmsFloat pad2;
0168     XcmsFloat pad3;
0169 } XcmsPad;
0170 
0171 
0172     /*
0173      * XCMS Color Structure
0174      */
0175 typedef struct {
0176     union {
0177     XcmsRGB RGB;
0178     XcmsRGBi RGBi;
0179     XcmsCIEXYZ CIEXYZ;
0180     XcmsCIEuvY CIEuvY;
0181     XcmsCIExyY CIExyY;
0182     XcmsCIELab CIELab;
0183     XcmsCIELuv CIELuv;
0184     XcmsTekHVC TekHVC;
0185     XcmsPad Pad;
0186     } spec;         /* the color specification  */
0187     unsigned long pixel;    /* pixel value (as needed)  */
0188     XcmsColorFormat format;     /* the specification format */
0189 } XcmsColor;
0190 
0191 
0192     /*
0193      * XCMS Per Screen related data
0194      */
0195 
0196 typedef struct _XcmsPerScrnInfo {
0197     XcmsColor   screenWhitePt;  /* Screen White point */
0198     XPointer    functionSet;    /* pointer to Screen Color Characterization */
0199                 /*      Function Set structure      */
0200     XPointer    screenData; /* pointer to corresponding Screen Color*/
0201                 /*  Characterization Data       */
0202     unsigned char state;   /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */
0203     char    pad[3];
0204 } XcmsPerScrnInfo;
0205 
0206 typedef struct _XcmsCCC *XcmsCCC;
0207 
0208 typedef Status (*XcmsCompressionProc)(      /* Gamut Compression Proc */
0209     XcmsCCC     /* ccc */,
0210     XcmsColor*      /* colors_in_out */,
0211     unsigned int    /* ncolors */,
0212     unsigned int    /* index */,
0213     Bool*       /* compression_flags_return */
0214 );
0215 
0216 typedef Status (*XcmsWhiteAdjustProc)(      /* White Point Adjust Proc */
0217     XcmsCCC     /* ccc */,
0218     XcmsColor*      /* initial_white_point*/,
0219     XcmsColor*      /* target_white_point*/,
0220     XcmsColorFormat /* target_format */,
0221     XcmsColor*      /* colors_in_out */,
0222     unsigned int    /* ncolors */,
0223     Bool*       /* compression_flags_return */
0224 );
0225 
0226     /*
0227      * XCMS Color Conversion Context
0228      */
0229 typedef struct _XcmsCCC {
0230     Display *dpy;           /* X Display */
0231     int     screenNumber;       /* X screen number */
0232     Visual  *visual;        /* X Visual */
0233     XcmsColor   clientWhitePt;      /* Client White Point */
0234     XcmsCompressionProc gamutCompProc;  /* Gamut Compression Function */
0235     XPointer    gamutCompClientData;    /* Gamut Comp Func Client Data */
0236     XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */
0237     XPointer    whitePtAdjClientData;   /* White Pt Adj Func Client Data */
0238     XcmsPerScrnInfo *pPerScrnInfo;  /* pointer to per screen information */
0239                     /*  associated with the above display */
0240                     /*  screenNumber */
0241 } XcmsCCCRec;
0242 
0243 typedef Status (*XcmsScreenInitProc)(   /* Screen Initialization Proc */
0244     Display*        /* dpy */,
0245     int         /* screen_number */,
0246     XcmsPerScrnInfo*    /* screen_info */
0247 );
0248 
0249 typedef void (*XcmsScreenFreeProc)(
0250     XPointer        /* screenData */
0251 );
0252 
0253     /*
0254      * Function List Pointer -- pointer to an array of function pointers.
0255      *    The end of list is indicated by a NULL pointer.
0256      */
0257 /*
0258  * XXX:  The use of the XcmsConversionProc type is broken.  The
0259  *       device-independent colour conversion code uses it as:
0260 
0261 typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, XcmsColor *,
0262                      unsigned int);
0263 
0264  *       while the device-dependent code uses it as:
0265 
0266 typedef Status (*XcmsConversionProc)(XcmsCCC, XcmsColor *, unsigned int,
0267                      Bool *);
0268 
0269  *       Until this is reworked, it's probably best to leave it unprotoized.
0270  *       The code works regardless.
0271  */
0272 typedef Status (*XcmsDDConversionProc)( /* using device-dependent version */
0273     XcmsCCC             /* ccc */,
0274     XcmsColor*          /* pcolors_in_out */,
0275     unsigned int        /* ncolors */,
0276     Bool*               /* pCompressed */
0277     );
0278 
0279 typedef Status (*XcmsDIConversionProc)( /* using device-independent version */
0280     XcmsCCC             /* ccc */,
0281     XcmsColor*          /* white_point */,
0282     XcmsColor*          /* pcolors_in_out */,
0283     unsigned int        /* ncolors */
0284     );
0285 
0286 typedef XcmsDIConversionProc XcmsConversionProc;
0287 typedef XcmsConversionProc *XcmsFuncListPtr;
0288 
0289 typedef int (*XcmsParseStringProc)( /* Color String Parsing Proc */
0290     char*       /* color_string */,
0291     XcmsColor*      /* color_return */
0292 );
0293 
0294     /*
0295      * Color Space -- per Color Space related data (Device-Independent
0296      *    or Device-Dependent)
0297      */
0298 typedef struct _XcmsColorSpace {
0299     const char *prefix;     /* Prefix of string format.     */
0300     XcmsColorFormat id;     /* Format ID number.            */
0301     XcmsParseStringProc parseString;
0302                 /* String format parsing function   */
0303     XcmsFuncListPtr to_CIEXYZ;  /* Pointer to an array of function  */
0304                 /*   pointers such that when the    */
0305                 /*   functions are executed in sequence */
0306                 /*   will convert a XcmsColor structure */
0307                 /*   from this color space to CIEXYZ    */
0308                 /*   space.             */
0309     XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function  */
0310                 /*   pointers such that when the    */
0311                 /*   functions are executed in sequence */
0312                 /*   will convert a XcmsColor structure */
0313                 /*   from CIEXYZ space to this color    */
0314                 /*   space.             */
0315     int inverse_flag;       /* If 1, indicates that for 0 <= i < n  */
0316                 /*   where n is the number of function  */
0317                 /*   pointers in the lists to_CIEXYZ    */
0318                 /*   and from_CIEXYZ; for each function */
0319                 /*   to_CIEXYZ[i] its inverse function  */
0320                 /*   is from_CIEXYZ[n - i].     */
0321 
0322 } XcmsColorSpace;
0323 
0324     /*
0325      * Screen Color Characterization Function Set -- per device class
0326      *    color space conversion functions.
0327      */
0328 typedef struct _XcmsFunctionSet {
0329     XcmsColorSpace **DDColorSpaces;
0330                 /* Pointer to an array of pointers to   */
0331                 /*   Device-DEPENDENT color spaces  */
0332                 /*   understood by this SCCFuncSet. */
0333     XcmsScreenInitProc screenInitProc;
0334                 /* Screen initialization function that  */
0335                 /*   reads Screen Color Characterization*/
0336                 /*   Data off properties on the screen's*/
0337                 /*   root window.           */
0338     XcmsScreenFreeProc screenFreeProc;
0339                 /* Function that frees the SCCData  */
0340                 /*   structures.            */
0341 } XcmsFunctionSet;
0342 
0343 _XFUNCPROTOBEGIN
0344 
0345 extern Status XcmsAddColorSpace (
0346     XcmsColorSpace* /* pColorSpace */
0347 );
0348 
0349 extern Status XcmsAddFunctionSet (
0350     XcmsFunctionSet*    /* functionSet */
0351 );
0352 
0353 extern Status XcmsAllocColor (
0354     Display*        /* dpy */,
0355     Colormap        /* colormap */,
0356     XcmsColor*      /* color_in_out */,
0357     XcmsColorFormat     /* result_format */
0358 );
0359 
0360 extern Status XcmsAllocNamedColor (
0361     Display*        /* dpy */,
0362     Colormap        /* colormap */,
0363     _Xconst char*   /* color_string */,
0364     XcmsColor*      /* color_scrn_return */,
0365     XcmsColor*      /* color_exact_return */,
0366     XcmsColorFormat     /* result_format */
0367 );
0368 
0369 extern XcmsCCC XcmsCCCOfColormap (
0370     Display*        /* dpy */,
0371     Colormap        /* colormap */
0372 );
0373 
0374 extern Status XcmsCIELabClipab(
0375     XcmsCCC     /* ccc */,
0376     XcmsColor*      /* colors_in_out */,
0377     unsigned int    /* ncolors */,
0378     unsigned int    /* index */,
0379     Bool*       /* compression_flags_return */
0380 );
0381 
0382 extern Status XcmsCIELabClipL(
0383     XcmsCCC     /* ccc */,
0384     XcmsColor*      /* colors_in_out */,
0385     unsigned int    /* ncolors */,
0386     unsigned int    /* index */,
0387     Bool*       /* compression_flags_return */
0388 );
0389 
0390 extern Status XcmsCIELabClipLab(
0391     XcmsCCC     /* ccc */,
0392     XcmsColor*      /* colors_in_out */,
0393     unsigned int    /* ncolors */,
0394     unsigned int    /* index */,
0395     Bool*       /* compression_flags_return */
0396 );
0397 
0398 extern Status XcmsCIELabQueryMaxC (
0399     XcmsCCC     /* ccc */,
0400     XcmsFloat       /* hue_angle */,
0401     XcmsFloat       /* L_star */,
0402     XcmsColor*      /* color_return */
0403 );
0404 
0405 extern Status XcmsCIELabQueryMaxL (
0406     XcmsCCC     /* ccc */,
0407     XcmsFloat       /* hue_angle */,
0408     XcmsFloat       /* chroma */,
0409     XcmsColor*      /* color_return */
0410 );
0411 
0412 extern Status XcmsCIELabQueryMaxLC (
0413     XcmsCCC     /* ccc */,
0414     XcmsFloat       /* hue_angle */,
0415     XcmsColor*      /* color_return */
0416 );
0417 
0418 extern Status XcmsCIELabQueryMinL (
0419     XcmsCCC     /* ccc */,
0420     XcmsFloat       /* hue_angle */,
0421     XcmsFloat       /* chroma */,
0422     XcmsColor*      /* color_return */
0423 );
0424 
0425 extern Status XcmsCIELabToCIEXYZ (
0426     XcmsCCC     /* ccc */,
0427     XcmsColor*      /* white_point */,
0428     XcmsColor*      /* colors */,
0429     unsigned int    /* ncolors */
0430 );
0431 
0432 extern Status XcmsCIELabWhiteShiftColors(
0433     XcmsCCC     /* ccc */,
0434     XcmsColor*      /* initial_white_point*/,
0435     XcmsColor*      /* target_white_point*/,
0436     XcmsColorFormat /* target_format */,
0437     XcmsColor*      /* colors_in_out */,
0438     unsigned int    /* ncolors */,
0439     Bool*       /* compression_flags_return */
0440 );
0441 
0442 extern Status XcmsCIELuvClipL(
0443     XcmsCCC     /* ccc */,
0444     XcmsColor*      /* colors_in_out */,
0445     unsigned int    /* ncolors */,
0446     unsigned int    /* index */,
0447     Bool*       /* compression_flags_return */
0448 );
0449 
0450 extern Status XcmsCIELuvClipLuv(
0451     XcmsCCC     /* ccc */,
0452     XcmsColor*      /* colors_in_out */,
0453     unsigned int    /* ncolors */,
0454     unsigned int    /* index */,
0455     Bool*       /* compression_flags_return */
0456 );
0457 
0458 extern Status XcmsCIELuvClipuv(
0459     XcmsCCC     /* ccc */,
0460     XcmsColor*      /* colors_in_out */,
0461     unsigned int    /* ncolors */,
0462     unsigned int    /* index */,
0463     Bool*       /* compression_flags_return */
0464 );
0465 
0466 extern Status XcmsCIELuvQueryMaxC (
0467     XcmsCCC     /* ccc */,
0468     XcmsFloat       /* hue_angle */,
0469     XcmsFloat       /* L_star */,
0470     XcmsColor*      /* color_return */
0471 );
0472 
0473 extern Status XcmsCIELuvQueryMaxL (
0474     XcmsCCC     /* ccc */,
0475     XcmsFloat       /* hue_angle */,
0476     XcmsFloat       /* chroma */,
0477     XcmsColor*      /* color_return */
0478 );
0479 
0480 extern Status XcmsCIELuvQueryMaxLC (
0481     XcmsCCC     /* ccc */,
0482     XcmsFloat       /* hue_angle */,
0483     XcmsColor*      /* color_return */
0484 );
0485 
0486 extern Status XcmsCIELuvQueryMinL (
0487     XcmsCCC     /* ccc */,
0488     XcmsFloat       /* hue_angle */,
0489     XcmsFloat       /* chroma */,
0490     XcmsColor*      /* color_return */
0491 );
0492 
0493 extern Status XcmsCIELuvToCIEuvY (
0494     XcmsCCC     /* ccc */,
0495     XcmsColor*      /* white_point */,
0496     XcmsColor*      /* colors */,
0497     unsigned int    /* ncolors */
0498 );
0499 
0500 extern Status XcmsCIELuvWhiteShiftColors(
0501     XcmsCCC     /* ccc */,
0502     XcmsColor*      /* initial_white_point*/,
0503     XcmsColor*      /* target_white_point*/,
0504     XcmsColorFormat /* target_format */,
0505     XcmsColor*      /* colors_in_out */,
0506     unsigned int    /* ncolors */,
0507     Bool*       /* compression_flags_return */
0508 );
0509 
0510 extern Status XcmsCIEXYZToCIELab (
0511     XcmsCCC     /* ccc */,
0512     XcmsColor*      /* white_point */,
0513     XcmsColor*      /* colors */,
0514     unsigned int    /* ncolors */
0515 );
0516 
0517 extern Status XcmsCIEXYZToCIEuvY (
0518     XcmsCCC     /* ccc */,
0519     XcmsColor*      /* white_point */,
0520     XcmsColor*      /* colors */,
0521     unsigned int    /* ncolors */
0522 );
0523 
0524 extern Status XcmsCIEXYZToCIExyY (
0525     XcmsCCC     /* ccc */,
0526     XcmsColor*      /* white_point */,
0527     XcmsColor*      /* colors */,
0528     unsigned int    /* ncolors */
0529 );
0530 
0531 extern Status XcmsCIEXYZToRGBi (
0532     XcmsCCC     /* ccc */,
0533     XcmsColor*      /* colors */,
0534     unsigned int    /* ncolors */,
0535     Bool*       /* compression_flags_return */
0536 );
0537 
0538 extern Status XcmsCIEuvYToCIELuv (
0539     XcmsCCC     /* ccc */,
0540     XcmsColor*      /* white_point */,
0541     XcmsColor*      /* colors */,
0542     unsigned int    /* ncolors */
0543 );
0544 
0545 extern Status XcmsCIEuvYToCIEXYZ (
0546     XcmsCCC     /* ccc */,
0547     XcmsColor*      /* white_point */,
0548     XcmsColor*      /* colors */,
0549     unsigned int    /* ncolors */
0550 );
0551 
0552 extern Status XcmsCIEuvYToTekHVC (
0553     XcmsCCC     /* ccc */,
0554     XcmsColor*      /* white_point */,
0555     XcmsColor*      /* colors */,
0556     unsigned int    /* ncolors */
0557 );
0558 
0559 extern Status XcmsCIExyYToCIEXYZ (
0560     XcmsCCC     /* ccc */,
0561     XcmsColor*      /* white_point */,
0562     XcmsColor*      /* colors */,
0563     unsigned int    /* ncolors */
0564 );
0565 
0566 extern XcmsColor *XcmsClientWhitePointOfCCC (
0567     XcmsCCC     /* ccc */
0568 );
0569 
0570 extern Status XcmsConvertColors (
0571     XcmsCCC     /* ccc */,
0572     XcmsColor*      /* colorArry_in_out */,
0573     unsigned int    /* nColors */,
0574     XcmsColorFormat     /* targetFormat */,
0575     Bool*       /* compArry_return */
0576 );
0577 
0578 extern XcmsCCC XcmsCreateCCC (
0579     Display*        /* dpy */,
0580     int         /* screenNumber */,
0581     Visual*     /* visual */,
0582     XcmsColor*      /* clientWhitePt */,
0583     XcmsCompressionProc /* gamutCompProc */,
0584     XPointer        /* gamutCompClientData */,
0585     XcmsWhiteAdjustProc /* whitePtAdjProc */,
0586     XPointer        /* whitePtAdjClientData */
0587 );
0588 
0589 extern XcmsCCC XcmsDefaultCCC (
0590     Display*        /* dpy */,
0591     int         /* screenNumber */
0592 );
0593 
0594 extern Display *XcmsDisplayOfCCC (
0595     XcmsCCC     /* ccc */
0596 );
0597 
0598 extern XcmsColorFormat XcmsFormatOfPrefix (
0599     char*       /* prefix */
0600 );
0601 
0602 extern void XcmsFreeCCC (
0603     XcmsCCC     /* ccc */
0604 );
0605 
0606 extern Status XcmsLookupColor (
0607     Display*        /* dpy */,
0608     Colormap        /* colormap */,
0609     _Xconst char*   /* color_string */,
0610     XcmsColor*      /* pColor_exact_in_out */,
0611     XcmsColor*      /* pColor_scrn_in_out */,
0612     XcmsColorFormat     /* result_format */
0613 );
0614 
0615 extern char *XcmsPrefixOfFormat (
0616     XcmsColorFormat     /* id */
0617 );
0618 
0619 extern Status XcmsQueryBlack (
0620     XcmsCCC     /* ccc */,
0621     XcmsColorFormat /* target_format */,
0622     XcmsColor*      /* color_return */
0623 );
0624 
0625 extern Status XcmsQueryBlue (
0626     XcmsCCC     /* ccc */,
0627     XcmsColorFormat /* target_format */,
0628     XcmsColor*      /* color_return */
0629 );
0630 
0631 extern Status XcmsQueryColor (
0632     Display*        /* dpy */,
0633     Colormap        /* colormap */,
0634     XcmsColor*      /* pColor_in_out */,
0635     XcmsColorFormat     /* result_format */
0636 );
0637 
0638 extern Status XcmsQueryColors (
0639     Display*        /* dpy */,
0640     Colormap        /* colormap */,
0641     XcmsColor*      /* colorArry_in_out */,
0642     unsigned int    /* nColors */,
0643     XcmsColorFormat /* result_format */
0644 );
0645 
0646 extern Status XcmsQueryGreen (
0647     XcmsCCC     /* ccc */,
0648     XcmsColorFormat /* target_format */,
0649     XcmsColor*      /* color_return */
0650 );
0651 
0652 extern Status XcmsQueryRed (
0653     XcmsCCC     /* ccc */,
0654     XcmsColorFormat /* target_format */,
0655     XcmsColor*      /* color_return */
0656 );
0657 
0658 extern Status XcmsQueryWhite (
0659     XcmsCCC     /* ccc */,
0660     XcmsColorFormat /* target_format */,
0661     XcmsColor*      /* color_return */
0662 );
0663 
0664 extern Status XcmsRGBiToCIEXYZ (
0665     XcmsCCC     /* ccc */,
0666     XcmsColor*      /* colors */,
0667     unsigned int    /* ncolors */,
0668     Bool*       /* compression_flags_return */
0669 );
0670 
0671 extern Status XcmsRGBiToRGB (
0672     XcmsCCC     /* ccc */,
0673     XcmsColor*      /* colors */,
0674     unsigned int    /* ncolors */,
0675     Bool*       /* compression_flags_return */
0676 );
0677 
0678 extern Status XcmsRGBToRGBi (
0679     XcmsCCC     /* ccc */,
0680     XcmsColor*      /* colors */,
0681     unsigned int    /* ncolors */,
0682     Bool*       /* compression_flags_return */
0683 );
0684 
0685 extern int XcmsScreenNumberOfCCC (
0686     XcmsCCC     /* ccc */
0687 );
0688 
0689 extern XcmsColor *XcmsScreenWhitePointOfCCC (
0690     XcmsCCC     /* ccc */
0691 );
0692 
0693 extern XcmsCCC XcmsSetCCCOfColormap(
0694     Display*        /* dpy */,
0695     Colormap        /* colormap */,
0696     XcmsCCC     /* ccc */
0697 );
0698 
0699 extern XcmsCompressionProc XcmsSetCompressionProc (
0700     XcmsCCC     /* ccc */,
0701     XcmsCompressionProc /* compression_proc */,
0702     XPointer        /* client_data */
0703 );
0704 
0705 extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc (
0706     XcmsCCC     /* ccc */,
0707     XcmsWhiteAdjustProc /* white_adjust_proc */,
0708     XPointer        /* client_data */
0709 );
0710 
0711 extern Status XcmsSetWhitePoint (
0712     XcmsCCC     /* ccc */,
0713     XcmsColor*      /* color */
0714 );
0715 
0716 extern Status XcmsStoreColor (
0717     Display*        /* dpy */,
0718     Colormap        /* colormap */,
0719     XcmsColor*      /* pColor_in */
0720 );
0721 
0722 extern Status XcmsStoreColors (
0723     Display*        /* dpy */,
0724     Colormap        /* colormap */,
0725     XcmsColor*      /* colorArry_in */,
0726     unsigned int    /* nColors */,
0727     Bool*       /* compArry_return */
0728 );
0729 
0730 extern Status XcmsTekHVCClipC(
0731     XcmsCCC     /* ccc */,
0732     XcmsColor*      /* colors_in_out */,
0733     unsigned int    /* ncolors */,
0734     unsigned int    /* index */,
0735     Bool*       /* compression_flags_return */
0736 );
0737 
0738 extern Status XcmsTekHVCClipV(
0739     XcmsCCC     /* ccc */,
0740     XcmsColor*      /* colors_in_out */,
0741     unsigned int    /* ncolors */,
0742     unsigned int    /* index */,
0743     Bool*       /* compression_flags_return */
0744 );
0745 
0746 extern Status XcmsTekHVCClipVC(
0747     XcmsCCC     /* ccc */,
0748     XcmsColor*      /* colors_in_out */,
0749     unsigned int    /* ncolors */,
0750     unsigned int    /* index */,
0751     Bool*       /* compression_flags_return */
0752 );
0753 
0754 extern Status XcmsTekHVCQueryMaxC (
0755     XcmsCCC     /* ccc */,
0756     XcmsFloat       /* hue */,
0757     XcmsFloat       /* value */,
0758     XcmsColor*      /* color_return */
0759 );
0760 
0761 extern Status XcmsTekHVCQueryMaxV (
0762     XcmsCCC     /* ccc */,
0763     XcmsFloat       /* hue */,
0764     XcmsFloat       /* chroma */,
0765     XcmsColor*      /* color_return */
0766 );
0767 
0768 extern Status XcmsTekHVCQueryMaxVC (
0769     XcmsCCC     /* ccc */,
0770     XcmsFloat       /* hue */,
0771     XcmsColor*      /* color_return */
0772 );
0773 
0774 extern Status XcmsTekHVCQueryMaxVSamples (
0775     XcmsCCC     /* ccc */,
0776     XcmsFloat       /* hue */,
0777     XcmsColor*      /* colors_return */,
0778     unsigned int    /* nsamples */
0779 );
0780 
0781 extern Status XcmsTekHVCQueryMinV (
0782     XcmsCCC     /* ccc */,
0783     XcmsFloat       /* hue */,
0784     XcmsFloat       /* chroma */,
0785     XcmsColor*      /* color_return */
0786 );
0787 
0788 extern Status XcmsTekHVCToCIEuvY (
0789     XcmsCCC     /* ccc */,
0790     XcmsColor*      /* white_point */,
0791     XcmsColor*      /* colors */,
0792     unsigned int    /* ncolors */
0793 );
0794 
0795 extern Status XcmsTekHVCWhiteShiftColors(
0796     XcmsCCC     /* ccc */,
0797     XcmsColor*      /* initial_white_point*/,
0798     XcmsColor*      /* target_white_point*/,
0799     XcmsColorFormat /* target_format */,
0800     XcmsColor*      /* colors_in_out */,
0801     unsigned int    /* ncolors */,
0802     Bool*       /* compression_flags_return */
0803 );
0804 
0805 extern Visual *XcmsVisualOfCCC (
0806     XcmsCCC     /* ccc */
0807 );
0808 
0809 #ifdef __clang__
0810 #pragma clang diagnostic pop
0811 #endif
0812 
0813 _XFUNCPROTOEND
0814 
0815 #endif /* _X11_XCMS_H_ */