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