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