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