]> git.sesse.net Git - rdpsrv/blob - Xserver/lib/X11/Xcms.h
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / lib / X11 / Xcms.h
1 /* $XConsortium: Xcms.h,v 1.15 92/11/19 16:43:04 rws 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  *      DESCRIPTION
28  *              Public include file for X Color Management System
29  */
30 #ifndef _XCMS_H_
31 #define _XCMS_H_
32
33     /*
34      * XCMS Status Values
35      */
36 #define XcmsFailure                     0
37 #define XcmsSuccess                     1
38 #define XcmsSuccessWithCompression      2
39
40     /*
41      * Color Space Format ID's
42      *    Color Space ID's are of XcmsColorFormat type.
43      *
44      *    bit 31
45      *      0 == Device-Independent
46      *      1 == Device-Dependent
47      *
48      *    bit 30:
49      *      0 == Registered with X Consortium
50      *      1 == Unregistered
51      */
52 #define XcmsUndefinedFormat     (XcmsColorFormat)0x00000000
53 #define XcmsCIEXYZFormat        (XcmsColorFormat)0x00000001
54 #define XcmsCIEuvYFormat        (XcmsColorFormat)0x00000002
55 #define XcmsCIExyYFormat        (XcmsColorFormat)0x00000003
56 #define XcmsCIELabFormat        (XcmsColorFormat)0x00000004
57 #define XcmsCIELuvFormat        (XcmsColorFormat)0x00000005
58 #define XcmsTekHVCFormat        (XcmsColorFormat)0x00000006
59 #define XcmsRGBFormat           (XcmsColorFormat)0x80000000
60 #define XcmsRGBiFormat          (XcmsColorFormat)0x80000001
61
62     /*
63      * State of XcmsPerScrnInfo
64      */
65 #define XcmsInitNone            0x00    /* no initialization attempted */
66 #define XcmsInitSuccess         0x01    /* initialization successful */
67 #define XcmsInitFailure         0xff    /* failure, use defaults */
68
69 #define DisplayOfCCC(ccc)               ((ccc)->dpy)
70 #define ScreenNumberOfCCC(ccc)          ((ccc)->screenNumber)
71 #define VisualOfCCC(ccc)                ((ccc)->visual)
72 #define ClientWhitePointOfCCC(ccc)      (&(ccc)->clientWhitePt)
73 #define ScreenWhitePointOfCCC(ccc)      (&(ccc)->pPerScrnInfo->screenWhitePt)
74 #define FunctionSetOfCCC(ccc)           ((ccc)->pPerScrnInfo->functionSet)
75
76 typedef unsigned long XcmsColorFormat;  /* Color Space Format ID */
77
78 typedef double XcmsFloat;
79
80     /*
81      * Device RGB
82      */
83 typedef struct {
84     unsigned short red;         /* scaled from 0x0000 to 0xffff */
85     unsigned short green;       /* scaled from 0x0000 to 0xffff */
86     unsigned short blue;        /* scaled from 0x0000 to 0xffff */
87 } XcmsRGB;
88
89     /*
90      * RGB Intensity
91      */
92 typedef struct {
93     XcmsFloat red;      /* 0.0 - 1.0 */
94     XcmsFloat green;    /* 0.0 - 1.0 */
95     XcmsFloat blue;     /* 0.0 - 1.0 */
96 } XcmsRGBi;
97
98     /*
99      * CIE XYZ
100      */
101 typedef struct {
102     XcmsFloat X;
103     XcmsFloat Y;
104     XcmsFloat Z;
105 } XcmsCIEXYZ;
106
107     /*
108      * CIE u'v'Y
109      */
110 typedef struct {
111     XcmsFloat u_prime;          /* 0.0 - 1.0 */
112     XcmsFloat v_prime;          /* 0.0 - 1.0 */
113     XcmsFloat Y;                /* 0.0 - 1.0 */
114 } XcmsCIEuvY;
115
116     /*
117      * CIE xyY
118      */
119 typedef struct {
120     XcmsFloat x;                /* 0.0 - 1.0 */
121     XcmsFloat y;                /* 0.0 - 1.0 */
122     XcmsFloat Y;                /* 0.0 - 1.0 */
123 } XcmsCIExyY;
124
125     /*
126      * CIE L*a*b*
127      */
128 typedef struct {
129     XcmsFloat L_star;           /* 0.0 - 100.0 */
130     XcmsFloat a_star;
131     XcmsFloat b_star;
132 } XcmsCIELab;
133
134     /*
135      * CIE L*u*v*
136      */
137 typedef struct {
138     XcmsFloat L_star;           /* 0.0 - 100.0 */
139     XcmsFloat u_star;
140     XcmsFloat v_star;
141 } XcmsCIELuv;
142
143     /*
144      * TekHVC
145      */
146 typedef struct {
147     XcmsFloat H;                /* 0.0 - 360.0 */
148     XcmsFloat V;                /* 0.0 - 100.0 */
149     XcmsFloat C;                /* 0.0 - 100.0 */
150 } XcmsTekHVC;
151
152     /*
153      * PAD
154      */
155 typedef struct {
156     XcmsFloat pad0;
157     XcmsFloat pad1;
158     XcmsFloat pad2;
159     XcmsFloat pad3;
160 } XcmsPad;
161
162
163     /*
164      * XCMS Color Structure
165      */
166 typedef struct {
167     union {
168         XcmsRGB RGB;
169         XcmsRGBi RGBi;
170         XcmsCIEXYZ CIEXYZ;
171         XcmsCIEuvY CIEuvY;
172         XcmsCIExyY CIExyY;
173         XcmsCIELab CIELab;
174         XcmsCIELuv CIELuv;
175         XcmsTekHVC TekHVC;
176         XcmsPad Pad;
177     } spec;                     /* the color specification      */
178     unsigned long pixel;        /* pixel value (as needed)      */
179     XcmsColorFormat     format;         /* the specification format     */
180 } XcmsColor;
181
182
183     /*
184      * XCMS Per Screen related data
185      */
186
187 typedef struct _XcmsPerScrnInfo {
188     XcmsColor   screenWhitePt;  /* Screen White point */
189     XPointer    functionSet;    /* pointer to Screen Color Characterization */
190                                 /*      Function Set structure          */
191     XPointer    screenData;     /* pointer to corresponding Screen Color*/
192                                 /*      Characterization Data           */
193     unsigned char state;   /* XcmsInitNone, XcmsInitSuccess, XcmsInitFailure */
194     char        pad[3];
195 } XcmsPerScrnInfo;
196
197 typedef struct _XcmsCCC *XcmsCCC;
198
199 typedef Status (*XcmsCompressionProc)(          /* Gamut Compression Proc */
200 #if NeedFunctionPrototypes
201     XcmsCCC             /* ccc */,
202     XcmsColor*          /* colors_in_out */,
203     unsigned int        /* ncolors */,
204     unsigned int        /* index */,
205     Bool*               /* compression_flags_return */
206 #endif
207 );
208
209 typedef Status (*XcmsWhiteAdjustProc)(          /* White Point Adjust Proc */
210 #if NeedFunctionPrototypes
211     XcmsCCC             /* ccc */,
212     XcmsColor*          /* initial_white_point*/,
213     XcmsColor*          /* target_white_point*/,
214     XcmsColorFormat     /* target_format */,
215     XcmsColor*          /* colors_in_out */,
216     unsigned int        /* ncolors */,
217     Bool*               /* compression_flags_return */
218 #endif
219 );
220
221     /*
222      * XCMS Color Conversion Context
223      */
224 typedef struct _XcmsCCC {
225     Display     *dpy;                   /* X Display */
226     int         screenNumber;           /* X screen number */
227     Visual      *visual;                /* X Visual */
228     XcmsColor   clientWhitePt;          /* Client White Point */
229     XcmsCompressionProc gamutCompProc;  /* Gamut Compression Function */
230     XPointer    gamutCompClientData;    /* Gamut Comp Func Client Data */
231     XcmsWhiteAdjustProc whitePtAdjProc; /* White Point Adjustment Function */
232     XPointer    whitePtAdjClientData;   /* White Pt Adj Func Client Data */
233     XcmsPerScrnInfo *pPerScrnInfo;      /* pointer to per screen information */
234                                         /*  associated with the above display */
235                                         /*  screenNumber */
236 } XcmsCCCRec;
237
238 typedef Status (*XcmsScreenInitProc)(   /* Screen Initialization Proc */
239 #if NeedFunctionPrototypes
240     Display*            /* dpy */,
241     int                 /* screen_number */,
242     XcmsPerScrnInfo*    /* screen_info */
243 #endif
244 );
245
246 typedef void (*XcmsScreenFreeProc)(
247 #if NeedFunctionPrototypes
248     XPointer            /* screenData */
249 #endif
250 );
251
252     /*
253      * Function List Pointer -- pointer to an array of function pointers.
254      *    The end of list is indicated by a NULL pointer.
255      */
256 typedef Status (*XcmsConversionProc)();
257 typedef XcmsConversionProc *XcmsFuncListPtr;
258
259 typedef int (*XcmsParseStringProc)(     /* Color String Parsing Proc */
260 #if NeedFunctionPrototypes
261     char*               /* color_string */,
262     XcmsColor*          /* color_return */
263 #endif
264 );
265
266     /*
267      * Color Space -- per Color Space related data (Device-Independent
268      *    or Device-Dependent)
269      */
270 typedef struct _XcmsColorSpace {
271     char *prefix;               /* Prefix of string format.             */
272     XcmsColorFormat id;         /* Format ID number.                    */
273     XcmsParseStringProc parseString;
274                                 /* String format parsing function       */
275     XcmsFuncListPtr to_CIEXYZ;  /* Pointer to an array of function      */
276                                 /*   pointers such that when the        */
277                                 /*   functions are executed in sequence */
278                                 /*   will convert a XcmsColor structure */
279                                 /*   from this color space to CIEXYZ    */
280                                 /*   space.                             */
281     XcmsFuncListPtr from_CIEXYZ;/* Pointer to an array of function      */
282                                 /*   pointers such that when the        */
283                                 /*   functions are executed in sequence */
284                                 /*   will convert a XcmsColor structure */
285                                 /*   from CIEXYZ space to this color    */
286                                 /*   space.                             */
287     int inverse_flag;           /* If 1, indicates that for 0 <= i < n  */
288                                 /*   where n is the number of function  */
289                                 /*   pointers in the lists to_CIEXYZ    */
290                                 /*   and from_CIEXYZ; for each function */
291                                 /*   to_CIEXYZ[i] its inverse function  */
292                                 /*   is from_CIEXYZ[n - i].             */
293
294 } XcmsColorSpace;
295
296     /*
297      * Screen Color Characterization Function Set -- per device class
298      *    color space conversion functions.
299      */
300 typedef struct _XcmsFunctionSet {
301     XcmsColorSpace **DDColorSpaces;
302                                 /* Pointer to an array of pointers to   */
303                                 /*   Device-DEPENDENT color spaces      */
304                                 /*   understood by this SCCFuncSet.     */
305     XcmsScreenInitProc screenInitProc;
306                                 /* Screen initialization function that  */
307                                 /*   reads Screen Color Characterization*/
308                                 /*   Data off properties on the screen's*/
309                                 /*   root window.                       */
310     XcmsScreenFreeProc screenFreeProc;
311                                 /* Function that frees the SCCData      */
312                                 /*   structures.                        */
313 } XcmsFunctionSet;
314
315 _XFUNCPROTOBEGIN
316
317 extern Status XcmsAddColorSpace (
318 #if NeedFunctionPrototypes
319     XcmsColorSpace*     /* pColorSpace */
320 #endif
321 );
322
323 extern Status XcmsAddFunctionSet (
324 #if NeedFunctionPrototypes
325     XcmsFunctionSet*    /* functionSet */
326 #endif
327 );
328
329 extern Status XcmsAllocColor (
330 #if NeedFunctionPrototypes
331     Display*            /* dpy */,
332     Colormap            /* colormap */,
333     XcmsColor*          /* color_in_out */,
334     XcmsColorFormat             /* result_format */
335 #endif
336 );
337
338 extern Status XcmsAllocNamedColor (
339 #if NeedFunctionPrototypes
340     Display*            /* dpy */,
341     Colormap            /* colormap */,
342     _Xconst char*       /* color_string */,
343     XcmsColor*          /* color_scrn_return */,
344     XcmsColor*          /* color_exact_return */,
345     XcmsColorFormat             /* result_format */
346 #endif
347 );
348
349 extern XcmsCCC XcmsCCCOfColormap (
350 #if NeedFunctionPrototypes
351     Display*            /* dpy */,
352     Colormap            /* colormap */
353 #endif
354 );
355
356 extern Status XcmsCIELabClipab(
357 #if NeedFunctionPrototypes
358     XcmsCCC             /* ccc */,
359     XcmsColor*          /* colors_in_out */,
360     unsigned int        /* ncolors */,
361     unsigned int        /* index */,
362     Bool*               /* compression_flags_return */
363 #endif
364 );
365
366 extern Status XcmsCIELabClipL(
367 #if NeedFunctionPrototypes
368     XcmsCCC             /* ccc */,
369     XcmsColor*          /* colors_in_out */,
370     unsigned int        /* ncolors */,
371     unsigned int        /* index */,
372     Bool*               /* compression_flags_return */
373 #endif
374 );
375
376 extern Status XcmsCIELabClipLab(
377 #if NeedFunctionPrototypes
378     XcmsCCC             /* ccc */,
379     XcmsColor*          /* colors_in_out */,
380     unsigned int        /* ncolors */,
381     unsigned int        /* index */,
382     Bool*               /* compression_flags_return */
383 #endif
384 );
385
386 extern Status XcmsCIELabQueryMaxC (
387 #if NeedFunctionPrototypes
388     XcmsCCC             /* ccc */,
389     XcmsFloat           /* hue_angle */,
390     XcmsFloat           /* L_star */,
391     XcmsColor*          /* color_return */
392 #endif
393 );
394
395 extern Status XcmsCIELabQueryMaxL (
396 #if NeedFunctionPrototypes
397     XcmsCCC             /* ccc */,
398     XcmsFloat           /* hue_angle */,
399     XcmsFloat           /* chroma */,
400     XcmsColor*          /* color_return */
401 #endif
402 );
403
404 extern Status XcmsCIELabQueryMaxLC (
405 #if NeedFunctionPrototypes
406     XcmsCCC             /* ccc */,
407     XcmsFloat           /* hue_angle */,
408     XcmsColor*          /* color_return */
409 #endif
410 );
411
412 extern Status XcmsCIELabQueryMinL (
413 #if NeedFunctionPrototypes
414     XcmsCCC             /* ccc */,
415     XcmsFloat           /* hue_angle */,
416     XcmsFloat           /* chroma */,
417     XcmsColor*          /* color_return */
418 #endif
419 );
420
421 extern Status XcmsCIELabToCIEXYZ (
422 #if NeedFunctionPrototypes
423     XcmsCCC             /* ccc */,
424     XcmsColor*          /* white_point */,
425     XcmsColor*          /* colors */,
426     unsigned int        /* ncolors */
427 #endif
428 );
429
430 extern Status XcmsCIELabWhiteShiftColors(
431 #if NeedFunctionPrototypes
432     XcmsCCC             /* ccc */,
433     XcmsColor*          /* initial_white_point*/,
434     XcmsColor*          /* target_white_point*/,
435     XcmsColorFormat     /* target_format */,
436     XcmsColor*          /* colors_in_out */,
437     unsigned int        /* ncolors */,
438     Bool*               /* compression_flags_return */
439 #endif
440 );
441
442 extern Status XcmsCIELuvClipL(
443 #if NeedFunctionPrototypes
444     XcmsCCC             /* ccc */,
445     XcmsColor*          /* colors_in_out */,
446     unsigned int        /* ncolors */,
447     unsigned int        /* index */,
448     Bool*               /* compression_flags_return */
449 #endif
450 );
451
452 extern Status XcmsCIELuvClipLuv(
453 #if NeedFunctionPrototypes
454     XcmsCCC             /* ccc */,
455     XcmsColor*          /* colors_in_out */,
456     unsigned int        /* ncolors */,
457     unsigned int        /* index */,
458     Bool*               /* compression_flags_return */
459 #endif
460 );
461
462 extern Status XcmsCIELuvClipuv(
463 #if NeedFunctionPrototypes
464     XcmsCCC             /* ccc */,
465     XcmsColor*          /* colors_in_out */,
466     unsigned int        /* ncolors */,
467     unsigned int        /* index */,
468     Bool*               /* compression_flags_return */
469 #endif
470 );
471
472 extern Status XcmsCIELuvQueryMaxC (
473 #if NeedFunctionPrototypes
474     XcmsCCC             /* ccc */,
475     XcmsFloat           /* hue_angle */,
476     XcmsFloat           /* L_star */,
477     XcmsColor*          /* color_return */
478 #endif
479 );
480
481 extern Status XcmsCIELuvQueryMaxL (
482 #if NeedFunctionPrototypes
483     XcmsCCC             /* ccc */,
484     XcmsFloat           /* hue_angle */,
485     XcmsFloat           /* chroma */,
486     XcmsColor*          /* color_return */
487 #endif
488 );
489
490 extern Status XcmsCIELuvQueryMaxLC (
491 #if NeedFunctionPrototypes
492     XcmsCCC             /* ccc */,
493     XcmsFloat           /* hue_angle */,
494     XcmsColor*          /* color_return */
495 #endif
496 );
497
498 extern Status XcmsCIELuvQueryMinL (
499 #if NeedFunctionPrototypes
500     XcmsCCC             /* ccc */,
501     XcmsFloat           /* hue_angle */,
502     XcmsFloat           /* chroma */,
503     XcmsColor*          /* color_return */
504 #endif
505 );
506
507 extern Status XcmsCIELuvToCIEuvY (
508 #if NeedFunctionPrototypes
509     XcmsCCC             /* ccc */,
510     XcmsColor*          /* white_point */,
511     XcmsColor*          /* colors */,
512     unsigned int        /* ncolors */
513 #endif
514 );
515
516 extern Status XcmsCIELuvWhiteShiftColors(
517 #if NeedFunctionPrototypes
518     XcmsCCC             /* ccc */,
519     XcmsColor*          /* initial_white_point*/,
520     XcmsColor*          /* target_white_point*/,
521     XcmsColorFormat     /* target_format */,
522     XcmsColor*          /* colors_in_out */,
523     unsigned int        /* ncolors */,
524     Bool*               /* compression_flags_return */
525 #endif
526 );
527
528 extern Status XcmsCIEXYZToCIELab (
529 #if NeedFunctionPrototypes
530     XcmsCCC             /* ccc */,
531     XcmsColor*          /* white_point */,
532     XcmsColor*          /* colors */,
533     unsigned int        /* ncolors */
534 #endif
535 );
536
537 extern Status XcmsCIEXYZToCIEuvY (
538 #if NeedFunctionPrototypes
539     XcmsCCC             /* ccc */,
540     XcmsColor*          /* white_point */,
541     XcmsColor*          /* colors */,
542     unsigned int        /* ncolors */
543 #endif
544 );
545
546 extern Status XcmsCIEXYZToCIExyY (
547 #if NeedFunctionPrototypes
548     XcmsCCC             /* ccc */,
549     XcmsColor*          /* white_point */,
550     XcmsColor*          /* colors */,
551     unsigned int        /* ncolors */
552 #endif
553 );
554
555 extern Status XcmsCIEXYZToRGBi (
556 #if NeedFunctionPrototypes
557     XcmsCCC             /* ccc */,
558     XcmsColor*          /* colors */,
559     unsigned int        /* ncolors */,
560     Bool*               /* compression_flags_return */
561 #endif
562 );
563
564 extern Status XcmsCIEuvYToCIELuv (
565 #if NeedFunctionPrototypes
566     XcmsCCC             /* ccc */,
567     XcmsColor*          /* white_point */,
568     XcmsColor*          /* colors */,
569     unsigned int        /* ncolors */
570 #endif
571 );
572
573 extern Status XcmsCIEuvYToCIEXYZ (
574 #if NeedFunctionPrototypes
575     XcmsCCC             /* ccc */,
576     XcmsColor*          /* white_point */,
577     XcmsColor*          /* colors */,
578     unsigned int        /* ncolors */
579 #endif
580 );
581
582 extern Status XcmsCIEuvYToTekHVC (
583 #if NeedFunctionPrototypes
584     XcmsCCC             /* ccc */,
585     XcmsColor*          /* white_point */,
586     XcmsColor*          /* colors */,
587     unsigned int        /* ncolors */
588 #endif
589 );
590
591 extern Status XcmsCIExyYToCIEXYZ (
592 #if NeedFunctionPrototypes
593     XcmsCCC             /* ccc */,
594     XcmsColor*          /* white_point */,
595     XcmsColor*          /* colors */,
596     unsigned int        /* ncolors */
597 #endif
598 );
599
600 extern XcmsColor *XcmsClientWhitePointOfCCC (
601 #if NeedFunctionPrototypes
602     XcmsCCC             /* ccc */
603 #endif
604 );
605
606 extern Status XcmsConvertColors (
607 #if NeedFunctionPrototypes
608     XcmsCCC             /* ccc */,
609     XcmsColor*          /* colorArry_in_out */,
610     unsigned int        /* nColors */,
611     XcmsColorFormat             /* targetFormat */,
612     Bool*               /* compArry_return */
613 #endif
614 );
615
616 extern XcmsCCC XcmsCreateCCC (
617 #if NeedFunctionPrototypes
618     Display*            /* dpy */,
619     int                 /* screenNumber */,
620     Visual*             /* visual */,
621     XcmsColor*          /* clientWhitePt */,
622     XcmsCompressionProc /* gamutCompProc */,
623     XPointer            /* gamutCompClientData */,
624     XcmsWhiteAdjustProc /* whitePtAdjProc */,
625     XPointer            /* whitePtAdjClientData */
626 #endif
627 );
628
629 extern XcmsCCC XcmsDefaultCCC (
630 #if NeedFunctionPrototypes
631     Display*            /* dpy */,
632     int                 /* screenNumber */
633 #endif
634 );
635
636 extern Display *XcmsDisplayOfCCC (
637 #if NeedFunctionPrototypes
638     XcmsCCC             /* ccc */
639 #endif
640 );
641
642 extern XcmsColorFormat XcmsFormatOfPrefix (
643 #if NeedFunctionPrototypes
644     char*               /* prefix */
645 #endif
646 );
647
648 extern void XcmsFreeCCC (
649 #if NeedFunctionPrototypes
650     XcmsCCC             /* ccc */
651 #endif
652 );
653
654 extern Status XcmsLookupColor (
655 #if NeedFunctionPrototypes
656     Display*            /* dpy */,
657     Colormap            /* colormap */,
658     _Xconst char*       /* color_string */,
659     XcmsColor*          /* pColor_exact_in_out */,
660     XcmsColor*          /* pColor_scrn_in_out */,
661     XcmsColorFormat             /* result_format */
662 #endif
663 );
664
665 extern char *XcmsPrefixOfFormat (
666 #if NeedFunctionPrototypes
667     XcmsColorFormat             /* id */
668 #endif
669 );
670
671 extern Status XcmsQueryBlack (
672 #if NeedFunctionPrototypes
673     XcmsCCC             /* ccc */,
674     XcmsColorFormat     /* target_format */,
675     XcmsColor*          /* color_return */
676 #endif
677 );
678
679 extern Status XcmsQueryBlue (
680 #if NeedFunctionPrototypes
681     XcmsCCC             /* ccc */,
682     XcmsColorFormat     /* target_format */,
683     XcmsColor*          /* color_return */
684 #endif
685 );
686
687 extern Status XcmsQueryColor (
688 #if NeedFunctionPrototypes
689     Display*            /* dpy */,
690     Colormap            /* colormap */,
691     XcmsColor*          /* pColor_in_out */,
692     XcmsColorFormat             /* result_format */
693 #endif
694 );
695
696 extern Status XcmsQueryColors (
697 #if NeedFunctionPrototypes
698     Display*            /* dpy */,
699     Colormap            /* colormap */,
700     XcmsColor*          /* colorArry_in_out */,
701     unsigned int        /* nColors */,
702     XcmsColorFormat     /* result_format */
703 #endif
704 );
705
706 extern Status XcmsQueryGreen (
707 #if NeedFunctionPrototypes
708     XcmsCCC             /* ccc */,
709     XcmsColorFormat     /* target_format */,
710     XcmsColor*          /* color_return */
711 #endif
712 );
713
714 extern Status XcmsQueryRed (
715 #if NeedFunctionPrototypes
716     XcmsCCC             /* ccc */,
717     XcmsColorFormat     /* target_format */,
718     XcmsColor*          /* color_return */
719 #endif
720 );
721
722 extern Status XcmsQueryWhite (
723 #if NeedFunctionPrototypes
724     XcmsCCC             /* ccc */,
725     XcmsColorFormat     /* target_format */,
726     XcmsColor*          /* color_return */
727 #endif
728 );
729
730 extern Status XcmsRGBiToCIEXYZ (
731 #if NeedFunctionPrototypes
732     XcmsCCC             /* ccc */,
733     XcmsColor*          /* colors */,
734     unsigned int        /* ncolors */,
735     Bool*               /* compression_flags_return */
736 #endif
737 );
738
739 extern Status XcmsRGBiToRGB (
740 #if NeedFunctionPrototypes
741     XcmsCCC             /* ccc */,
742     XcmsColor*          /* colors */,
743     unsigned int        /* ncolors */,
744     Bool*               /* compression_flags_return */
745 #endif
746 );
747
748 extern Status XcmsRGBToRGBi (
749 #if NeedFunctionPrototypes
750     XcmsCCC             /* ccc */,
751     XcmsColor*          /* colors */,
752     unsigned int        /* ncolors */,
753     Bool*               /* compression_flags_return */
754 #endif
755 );
756
757 extern int XcmsScreenNumberOfCCC (
758 #if NeedFunctionPrototypes
759     XcmsCCC             /* ccc */
760 #endif
761 );
762
763 extern XcmsColor *XcmsScreenWhitePointOfCCC (
764 #if NeedFunctionPrototypes
765     XcmsCCC             /* ccc */
766 #endif
767 );
768
769 extern XcmsCCC XcmsSetCCCOfColormap(
770 #if NeedFunctionPrototypes
771     Display*            /* dpy */,
772     Colormap            /* colormap */,
773     XcmsCCC             /* ccc */
774 #endif
775 );
776
777 extern XcmsCompressionProc XcmsSetCompressionProc (
778 #if NeedFunctionPrototypes
779     XcmsCCC             /* ccc */,
780     XcmsCompressionProc /* compression_proc */,
781     XPointer            /* client_data */
782 #endif
783 );
784
785 extern XcmsWhiteAdjustProc XcmsSetWhiteAdjustProc (
786 #if NeedFunctionPrototypes
787     XcmsCCC             /* ccc */,
788     XcmsWhiteAdjustProc /* white_adjust_proc */,
789     XPointer            /* client_data */
790 #endif
791 );
792
793 extern Status XcmsSetWhitePoint (
794 #if NeedFunctionPrototypes
795     XcmsCCC             /* ccc */,
796     XcmsColor*          /* color */
797 #endif
798 );
799
800 extern Status XcmsStoreColor (
801 #if NeedFunctionPrototypes
802     Display*            /* dpy */,
803     Colormap            /* colormap */,
804     XcmsColor*          /* pColor_in */
805 #endif
806 );
807
808 extern Status XcmsStoreColors (
809 #if NeedFunctionPrototypes
810     Display*            /* dpy */,
811     Colormap            /* colormap */,
812     XcmsColor*          /* colorArry_in */,
813     unsigned int        /* nColors */,
814     Bool*               /* compArry_return */
815 #endif
816 );
817
818 extern Status XcmsTekHVCClipC(
819 #if NeedFunctionPrototypes
820     XcmsCCC             /* ccc */,
821     XcmsColor*          /* colors_in_out */,
822     unsigned int        /* ncolors */,
823     unsigned int        /* index */,
824     Bool*               /* compression_flags_return */
825 #endif
826 );
827
828 extern Status XcmsTekHVCClipV(
829 #if NeedFunctionPrototypes
830     XcmsCCC             /* ccc */,
831     XcmsColor*          /* colors_in_out */,
832     unsigned int        /* ncolors */,
833     unsigned int        /* index */,
834     Bool*               /* compression_flags_return */
835 #endif
836 );
837
838 extern Status XcmsTekHVCClipVC(
839 #if NeedFunctionPrototypes
840     XcmsCCC             /* ccc */,
841     XcmsColor*          /* colors_in_out */,
842     unsigned int        /* ncolors */,
843     unsigned int        /* index */,
844     Bool*               /* compression_flags_return */
845 #endif
846 );
847
848 extern Status XcmsTekHVCQueryMaxC (
849 #if NeedFunctionPrototypes
850     XcmsCCC             /* ccc */,
851     XcmsFloat           /* hue */,
852     XcmsFloat           /* value */,
853     XcmsColor*          /* color_return */
854 #endif
855 );
856
857 extern Status XcmsTekHVCQueryMaxV (
858 #if NeedFunctionPrototypes
859     XcmsCCC             /* ccc */,
860     XcmsFloat           /* hue */,
861     XcmsFloat           /* chroma */,
862     XcmsColor*          /* color_return */
863 #endif
864 );
865
866 extern Status XcmsTekHVCQueryMaxVC (
867 #if NeedFunctionPrototypes
868     XcmsCCC             /* ccc */,
869     XcmsFloat           /* hue */,
870     XcmsColor*          /* color_return */
871 #endif
872 );
873
874 extern Status XcmsTekHVCQueryMaxVSamples (
875 #if NeedFunctionPrototypes
876     XcmsCCC             /* ccc */,
877     XcmsFloat           /* hue */,
878     XcmsColor*          /* colors_return */,
879     unsigned int        /* nsamples */
880 #endif
881 );
882
883 extern Status XcmsTekHVCQueryMinV (
884 #if NeedFunctionPrototypes
885     XcmsCCC             /* ccc */,
886     XcmsFloat           /* hue */,
887     XcmsFloat           /* chroma */,
888     XcmsColor*          /* color_return */
889 #endif
890 );
891
892 extern Status XcmsTekHVCToCIEuvY (
893 #if NeedFunctionPrototypes
894     XcmsCCC             /* ccc */,
895     XcmsColor*          /* white_point */,
896     XcmsColor*          /* colors */,
897     unsigned int        /* ncolors */
898 #endif
899 );
900
901 extern Status XcmsTekHVCWhiteShiftColors(
902 #if NeedFunctionPrototypes
903     XcmsCCC             /* ccc */,
904     XcmsColor*          /* initial_white_point*/,
905     XcmsColor*          /* target_white_point*/,
906     XcmsColorFormat     /* target_format */,
907     XcmsColor*          /* colors_in_out */,
908     unsigned int        /* ncolors */,
909     Bool*               /* compression_flags_return */
910 #endif
911 );
912
913 extern Visual *XcmsVisualOfCCC (
914 #if NeedFunctionPrototypes
915     XcmsCCC             /* ccc */
916 #endif
917 );
918
919 _XFUNCPROTOEND
920
921 #endif /* _XCMS_H_ */