2 * Copyright 2004 (C) Mike McCormack
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 typedef HANDLE HPROFILE
;
27 typedef HPROFILE
*PHPROFILE
;
28 typedef HANDLE HTRANSFORM
;
30 typedef DWORD TAGTYPE
, *PTAGTYPE
, *LPTAGTYPE
;
32 typedef char COLOR_NAME
[32];
33 typedef COLOR_NAME
*PCOLOR_NAME
, *LPCOLOR_NAME
;
35 typedef struct tagNAMED_PROFILE_INFO
39 DWORD dwCountDevCoordinates
;
42 } NAMED_PROFILE_INFO
, *PNAMED_PROFILE_INFO
, *LPNAMED_PROFILE_INFO
;
44 #define MAX_COLOR_CHANNELS 8
87 struct GENERIC3CHANNEL
101 BYTE channel
[MAX_COLOR_CHANNELS
];
104 typedef union tagCOLOR
106 struct GRAYCOLOR gray
;
108 struct CMYKCOLOR cmyk
;
112 struct GENERIC3CHANNEL gen3ch
;
113 struct NAMEDCOLOR named
;
114 struct HiFiCOLOR hifi
;
120 } COLOR
, *PCOLOR
, *LPCOLOR
;
136 } COLORTYPE
, *PCOLORTYPE
, *LPCOLORTYPE
;
142 BM_RGBTRIPLETS
= 0x0002,
143 BM_BGRTRIPLETS
= 0x0004,
144 BM_xRGBQUADS
= 0x0008,
147 BM_xBGRQUADS
= 0x0010,
148 BM_CMYKQUADS
= 0x0020,
153 BM_XYZTRIPLETS
= 0x0201,
162 BM_xXYZQUADS
= 0x0301,
177 BM_32b_scRGB
= 0x0601,
179 BM_S2DOT13FIXED_scRGB
,
180 BM_S2DOT13FIXED_scARGB
,
181 BM_R10G10B10A2
= 0x0701,
183 BM_R16G16B16A16_FLOAT
184 } BMFORMAT
, *PBMFORMAT
, *LPBMFORMAT
;
188 WCS_PROFILE_MANAGEMENT_SCOPE_SYSTEM_WIDE
,
189 WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER
190 } WCS_PROFILE_MANAGEMENT_SCOPE
;
192 #define DONT_USE_EMBEDDED_WCS_PROFILES 0x00000001
194 #define PROOF_MODE 0x00000001
195 #define NORMAL_MODE 0x00000002
196 #define BEST_MODE 0x00000003
197 #define ENABLE_GAMUT_CHECKING 0x00010000
198 #define USE_RELATIVE_COLORIMETRIC 0x00020000
199 #define FAST_TRANSLATE 0x00040000
200 #define PRESERVEBLACK 0x00100000
201 #define WCS_ALWAYS 0x00200000
202 #define RESERVED 0x80000000
203 #define SEQUENTIAL_TRANSFORM 0x80800000
214 #define CMM_WIN_VERSION 0
216 #define CMM_DRIVER_VERSION 2
217 #define CMM_DLL_VERSION 3
218 #define CMM_VERSION 4
219 #define CMM_DESCRIPTION 5
220 #define CMM_LOGOICON 6
222 typedef BOOL (CALLBACK
*PBMCALLBACKFN
)(ULONG
,ULONG
,LPARAM
);
223 typedef PBMCALLBACKFN LPPBMCALLBACKFN
;
225 #define INTENT_PERCEPTUAL 0
226 #define INTENT_RELATIVE_COLORIMETRIC 1
227 #define INTENT_SATURATION 2
228 #define INTENT_ABSOLUTE_COLORIMETRIC 3
236 } COLORPROFILETYPE
, *PCOLORPROFILETYPE
, *LPCOLORPROFILETYPE
;
240 CPST_PERCEPTUAL
= INTENT_PERCEPTUAL
,
241 CPST_RELATIVE_COLORIMETRIC
= INTENT_RELATIVE_COLORIMETRIC
,
242 CPST_SATURATION
= INTENT_SATURATION
,
243 CPST_ABSOLUTE_COLORIMETRIC
= INTENT_ABSOLUTE_COLORIMETRIC
,
245 CPST_RGB_WORKING_SPACE
,
246 CPST_CUSTOM_WORKING_SPACE
,
247 CPST_STANDARD_DISPLAY_COLOR_MODE
,
248 CPST_EXTENDED_DISPLAY_COLOR_MODE
249 } COLORPROFILESUBTYPE
, *PCOLORPROFILESUBTYPE
, *LPCOLORPROFILESUBTYPE
;
257 COLOR_10b_R10G10B10A2
,
258 COLOR_10b_R10G10B10A2_XR
,
260 } COLORDATATYPE
, *PCOLORDATATYPE
, *LPCOLORDATATYPE
;
262 typedef struct tagPROFILEHEADER
268 DWORD phDataColorSpace
;
269 DWORD phConnectionSpace
;
273 DWORD phProfileFlags
;
274 DWORD phManufacturer
;
276 DWORD phAttributes
[2];
277 DWORD phRenderingIntent
;
281 } PROFILEHEADER
, *PPROFILEHEADER
, *LPPROFILEHEADER
;
283 typedef struct tagPROFILE
288 } PROFILE
, *PPROFILE
, *LPPROFILE
;
290 #define ENUM_TYPE_VERSION 0x0300
292 typedef struct tagENUMTYPEA
299 DWORD dwDitheringMode
;
300 DWORD dwResolution
[2];
303 DWORD dwDataColorSpace
;
304 DWORD dwConnectionSpace
;
307 DWORD dwProfileFlags
;
308 DWORD dwManufacturer
;
310 DWORD dwAttributes
[2];
311 DWORD dwRenderingIntent
;
314 } ENUMTYPEA
, *PENUMTYPEA
, *LPENUMTYPEA
;
316 typedef struct tagENUMTYPEW
323 DWORD dwDitheringMode
;
324 DWORD dwResolution
[2];
327 DWORD dwDataColorSpace
;
328 DWORD dwConnectionSpace
;
331 DWORD dwProfileFlags
;
332 DWORD dwManufacturer
;
334 DWORD dwAttributes
[2];
335 DWORD dwRenderingIntent
;
338 } ENUMTYPEW
, *PENUMTYPEW
, *LPENUMTYPEW
;
340 #define ET_DEVICENAME 0x00000001
341 #define ET_MEDIATYPE 0x00000002
342 #define ET_DITHERMODE 0x00000004
343 #define ET_RESOLUTION 0x00000008
344 #define ET_CMMTYPE 0x00000010
345 #define ET_CLASS 0x00000020
346 #define ET_DATACOLORSPACE 0x00000040
347 #define ET_CONNECTIONSPACE 0x00000080
348 #define ET_SIGNATURE 0x00000100
349 #define ET_PLATFORM 0x00000200
350 #define ET_PROFILEFLAGS 0x00000400
351 #define ET_MANUFACTURER 0x00000800
352 #define ET_MODEL 0x00001000
353 #define ET_ATTRIBUTES 0x00002000
354 #define ET_RENDERINGINTENT 0x00004000
355 #define ET_CREATOR 0x00008000
356 #define ET_DEVICECLASS 0x00010000
357 #define ET_STANDARDDISPLAYCOLOR 0x00020000
358 #define ET_EXTENDEDDISPLAYCOLOR 0x00040000
360 #define COLOR_MATCH_VERSION 0x0200
362 #define CMS_DISABLEICM 0x00000001
363 #define CMS_ENABLEPROOFING 0x00000002
364 #define CMS_SETRENDERINTENT 0x00000004
365 #define CMS_SETPROOFINTENT 0x00000008
366 #define CMS_SETMONITORPROFILE 0x00000010
367 #define CMS_SETPRINTERPROFILE 0x00000020
368 #define CMS_SETTARGETPROFILE 0x00000040
369 #define CMS_USEHOOK 0x00000080
370 #define CMS_USEAPPLYCALLBACK 0x00000100
371 #define CMS_USEDESCRIPTION 0x00000200
372 #define CMS_DISABLEINTENT 0x00000400
373 #define CMS_DISABLERENDERINTENT 0x00000800
374 #define CMS_TARGETOVERFLOW 0x20000000
375 #define CMS_PRINTERROVERFLOW 0x40000000
376 #define CMS_MONITOROVERFLOW 0x80000000
378 struct _tagCOLORMATCHSETUPA
;
379 struct _tagCOLORMATCHSETUPW
;
381 typedef BOOL (WINAPI
*PCMSCALLBACKA
)(struct _tagCOLORMATCHSETUPA
*,LPARAM
);
382 typedef BOOL (WINAPI
*PCMSCALLBACKW
)(struct _tagCOLORMATCHSETUPW
*,LPARAM
);
384 typedef struct _tagCOLORMATCHSETUPA
393 DWORD dwRenderIntent
;
394 DWORD dwProofingIntent
;
395 PSTR pMonitorProfile
;
396 DWORD ccMonitorProfile
;
397 PSTR pPrinterProfile
;
398 DWORD ccPrinterProfile
;
400 DWORD ccTargetProfile
;
403 PCMSCALLBACKA lpfnApplyCallback
;
404 LPARAM lParamApplyCallback
;
405 } COLORMATCHSETUPA
, *PCOLORMATCHSETUPA
, *LPCOLORMATCHSETUPA
;
407 typedef struct _tagCOLORMATCHSETUPW
416 DWORD dwRenderIntent
;
417 DWORD dwProofingIntent
;
418 PWSTR pMonitorProfile
;
419 DWORD ccMonitorProfile
;
420 PWSTR pPrinterProfile
;
421 DWORD ccPrinterProfile
;
422 PWSTR pTargetProfile
;
423 DWORD ccTargetProfile
;
426 PCMSCALLBACKW lpfnApplyCallback
;
427 LPARAM lParamApplyCallback
;
428 } COLORMATCHSETUPW
, *PCOLORMATCHSETUPW
, *LPCOLORMATCHSETUPW
;
430 BOOL WINAPI
AssociateColorProfileWithDeviceA(PCSTR
,PCSTR
,PCSTR
);
431 BOOL WINAPI
AssociateColorProfileWithDeviceW(PCWSTR
,PCWSTR
,PCWSTR
);
432 #define AssociateColorProfileWithDevice WINELIB_NAME_AW(AssociateColorProfileWithDevice)
433 BOOL WINAPI
CheckBitmapBits(HTRANSFORM
,PVOID
,BMFORMAT
,DWORD
,DWORD
,DWORD
,PBYTE
,PBMCALLBACKFN
,LPARAM
);
434 BOOL WINAPI
CheckColors(HTRANSFORM
,PCOLOR
,DWORD
,COLORTYPE
,PBYTE
);
435 BOOL WINAPI
ConvertColorNameToIndex(HPROFILE
,PCOLOR_NAME
,PDWORD
,DWORD
);
436 BOOL WINAPI
ConvertIndexToColorName(HPROFILE
,PDWORD
,PCOLOR_NAME
,DWORD
);
437 BOOL WINAPI
CloseColorProfile(HPROFILE
);
438 HTRANSFORM WINAPI
CreateColorTransformA(LPLOGCOLORSPACEA
,HPROFILE
,HPROFILE
,DWORD
);
439 HTRANSFORM WINAPI
CreateColorTransformW(LPLOGCOLORSPACEW
,HPROFILE
,HPROFILE
,DWORD
);
440 #define CreateColorTransform WINELIB_NAME_AW(CreateColorTransform)
441 BOOL WINAPI
CreateDeviceLinkProfile(PHPROFILE
,DWORD
,PDWORD
,DWORD
,DWORD
,PBYTE
*,DWORD
);
442 HTRANSFORM WINAPI
CreateMultiProfileTransform(PHPROFILE
,DWORD
,PDWORD
,DWORD
,DWORD
,DWORD
);
443 BOOL WINAPI
CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA
,PBYTE
*);
444 BOOL WINAPI
CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW
,PBYTE
*);
445 #define CreateProfileFromLogColorSpace WINELIB_NAME_AW(CreateProfileFromLogColorSpace)
446 BOOL WINAPI
DeleteColorTransform(HTRANSFORM
);
447 BOOL WINAPI
DisassociateColorProfileFromDeviceA(PCSTR
,PCSTR
,PCSTR
);
448 BOOL WINAPI
DisassociateColorProfileFromDeviceW(PCWSTR
,PCWSTR
,PCWSTR
);
449 #define DisassociateColorProfileFromDevice WINELIB_NAME_AW(DisassociateColorProfileFromDevice)
450 BOOL WINAPI
EnumColorProfilesA(PCSTR
,PENUMTYPEA
,PBYTE
,PDWORD
,PDWORD
);
451 BOOL WINAPI
EnumColorProfilesW(PCWSTR
,PENUMTYPEW
,PBYTE
,PDWORD
,PDWORD
);
452 #define EnumColorProfiles WINELIB_NAME_AW(EnumColorProfiles)
453 DWORD WINAPI
GenerateCopyFilePaths(LPCWSTR
,LPCWSTR
,LPBYTE
,DWORD
,LPWSTR
,LPDWORD
,LPWSTR
,LPDWORD
,DWORD
);
454 DWORD WINAPI
GetCMMInfo(HTRANSFORM
,DWORD
);
455 BOOL WINAPI
GetColorDirectoryA(PCSTR
,PSTR
,PDWORD
);
456 BOOL WINAPI
GetColorDirectoryW(PCWSTR
,PWSTR
,PDWORD
);
457 #define GetColorDirectory WINELIB_NAME_AW(GetColorDirectory)
458 BOOL WINAPI
GetColorProfileElement(HPROFILE
,TAGTYPE
,DWORD
,PDWORD
,PVOID
,PBOOL
);
459 BOOL WINAPI
GetColorProfileElementTag(HPROFILE
,DWORD
,PTAGTYPE
);
460 BOOL WINAPI
GetColorProfileFromHandle(HPROFILE
,PBYTE
,PDWORD
);
461 BOOL WINAPI
GetColorProfileHeader(HPROFILE
,PPROFILEHEADER
);
462 BOOL WINAPI
GetCountColorProfileElements(HPROFILE
,PDWORD
);
463 BOOL WINAPI
GetNamedProfileInfo(HPROFILE
,PNAMED_PROFILE_INFO
);
464 BOOL WINAPI
GetPS2ColorRenderingDictionary(HPROFILE
,DWORD
,PBYTE
,PDWORD
,PBOOL
);
465 BOOL WINAPI
GetPS2ColorRenderingIntent(HPROFILE
,DWORD
,PBYTE
,PDWORD
);
466 BOOL WINAPI
GetPS2ColorSpaceArray(HPROFILE
,DWORD
,DWORD
,PBYTE
,PDWORD
,PBOOL
);
467 BOOL WINAPI
GetStandardColorSpaceProfileA(PCSTR
,DWORD
,PSTR
,PDWORD
);
468 BOOL WINAPI
GetStandardColorSpaceProfileW(PCWSTR
,DWORD
,PWSTR
,PDWORD
);
469 #define GetStandardColorSpaceProfile WINELIB_NAME_AW(GetStandardColorSpaceProfile)
470 BOOL WINAPI
InstallColorProfileA(PCSTR
,PCSTR
);
471 BOOL WINAPI
InstallColorProfileW(PCWSTR
,PCWSTR
);
472 #define InstallColorProfile WINELIB_NAME_AW(InstallColorProfile)
473 BOOL WINAPI
IsColorProfileTagPresent(HPROFILE
,TAGTYPE
,PBOOL
);
474 BOOL WINAPI
IsColorProfileValid(HPROFILE
,PBOOL
);
475 HPROFILE WINAPI
OpenColorProfileA(PPROFILE
,DWORD
,DWORD
,DWORD
);
476 HPROFILE WINAPI
OpenColorProfileW(PPROFILE
,DWORD
,DWORD
,DWORD
);
477 #define OpenColorProfile WINELIB_NAME_AW(OpenColorProfile)
478 BOOL WINAPI
RegisterCMMA(PCSTR
,DWORD
,PCSTR
);
479 BOOL WINAPI
RegisterCMMW(PCWSTR
,DWORD
,PCWSTR
);
480 #define RegisterCMM WINELIB_NAME_AW(RegisterCMM)
481 BOOL WINAPI
SelectCMM(DWORD id
);
482 BOOL WINAPI
SetColorProfileElement(HPROFILE
,TAGTYPE
,DWORD
,PDWORD
,PVOID
);
483 BOOL WINAPI
SetColorProfileElementReference(HPROFILE
,TAGTYPE
,TAGTYPE
);
484 BOOL WINAPI
SetColorProfileElementSize(HPROFILE
,TAGTYPE
,DWORD
);
485 BOOL WINAPI
SetColorProfileHeader(HPROFILE
,PPROFILEHEADER
);
486 BOOL WINAPI
SetStandardColorSpaceProfileA(PCSTR
,DWORD
,PSTR
);
487 BOOL WINAPI
SetStandardColorSpaceProfileW(PCWSTR
,DWORD
,PWSTR
);
488 #define SetStandardColorSpaceProfile WINELIB_NAME_AW(SetStandardColorSpaceProfile)
489 BOOL WINAPI
SetupColorMatchingA(PCOLORMATCHSETUPA
);
490 BOOL WINAPI
SetupColorMatchingW(PCOLORMATCHSETUPW
);
491 #define SetupColorMatching WINELIB_NAME_AW(SetupColorMatching)
492 BOOL WINAPI
SpoolerCopyFileEvent(LPWSTR
,LPWSTR
,DWORD
);
493 BOOL WINAPI
TranslateBitmapBits(HTRANSFORM
,PVOID
,BMFORMAT
,DWORD
,DWORD
,DWORD
,PVOID
,BMFORMAT
,DWORD
,PBMCALLBACKFN
,ULONG
);
494 BOOL WINAPI
TranslateColors(HTRANSFORM
,PCOLOR
,DWORD
,COLORTYPE
,PCOLOR
,COLORTYPE
);
495 BOOL WINAPI
UninstallColorProfileA(PCSTR
,PCSTR
,BOOL
);
496 BOOL WINAPI
UninstallColorProfileW(PCWSTR
,PCWSTR
,BOOL
);
497 #define UninstallColorProfile WINELIB_NAME_AW(UninstallColorProfile)
498 BOOL WINAPI
UnregisterCMMA(PCSTR
,DWORD
);
499 BOOL WINAPI
UnregisterCMMW(PCWSTR
,DWORD
);
500 #define UnregisterCMM WINELIB_NAME_AW(UnregisterCMM)
501 BOOL WINAPI
WcsEnumColorProfilesSize(WCS_PROFILE_MANAGEMENT_SCOPE
,ENUMTYPEW
*,DWORD
*);
502 BOOL WINAPI
WcsGetDefaultColorProfile(WCS_PROFILE_MANAGEMENT_SCOPE
,const WCHAR
*,COLORPROFILETYPE
,COLORPROFILESUBTYPE
,DWORD
,DWORD
,LPWSTR
);
503 BOOL WINAPI
WcsGetDefaultColorProfileSize(WCS_PROFILE_MANAGEMENT_SCOPE
,const WCHAR
*,COLORPROFILETYPE
,COLORPROFILESUBTYPE
,DWORD
,DWORD
*);
504 BOOL WINAPI
WcsGetDefaultRenderingIntent(WCS_PROFILE_MANAGEMENT_SCOPE
,DWORD
*);
505 BOOL WINAPI
WcsGetUsePerUserProfiles(const WCHAR
*,DWORD
,BOOL
*);
506 HPROFILE WINAPI
WcsOpenColorProfileA(PROFILE
*,PROFILE
*,PROFILE
*,DWORD
,DWORD
,DWORD
,DWORD
);
507 HPROFILE WINAPI
WcsOpenColorProfileW(PROFILE
*,PROFILE
*,PROFILE
*,DWORD
,DWORD
,DWORD
,DWORD
);
509 #define PROFILE_FILENAME 1
510 #define PROFILE_MEMBUFFER 2
512 #define PROFILE_READ 1
513 #define PROFILE_READWRITE 2
515 #define FLAG_EMBEDDEDPROFILE 0x00000001
516 #define FLAG_DEPENDENTONDATA 0x00000002
517 #define FLAG_ENABLE_CHROMATIC_ADAPTATION 0x02000000
519 #define ATTRIB_TRANSPARENCY 0x00000001
520 #define ATTRIB_MATTE 0x00000002
522 #define CLASS_MONITOR 0x6D6E7472 /* 'mntr' */
523 #define CLASS_PRINTER 0x70727472 /* 'prtr' */
524 #define CLASS_SCANNER 0x73636E72 /* 'scnr' */
525 #define CLASS_LINK 0x6C696E6B /* 'link' */
526 #define CLASS_ABSTRACT 0x61627374 /* 'abst' */
527 #define CLASS_COLORSPACE 0x73617063 /* 'spac' */
528 #define CLASS_NAMED 0x6E6D636C /* 'nmcl' */
529 #define CLASS_CAMP 0x63616D70 /* 'camp' */
530 #define CLASS_GMMP 0x676D6D70 /* 'gmmp' */
532 #define SPACE_XYZ 0x58595A20 /* 'XYZ ' */
533 #define SPACE_Lab 0x4C616220 /* 'Lab ' */
534 #define SPACE_Luv 0x4C757620 /* 'Luv ' */
535 #define SPACE_YCbCr 0x59436272 /* 'YCbr' */
536 #define SPACE_Yxy 0x59787920 /* 'Yxy ' */
537 #define SPACE_RGB 0x52474220 /* 'RGB ' */
538 #define SPACE_GRAY 0x47524159 /* 'GRAY' */
539 #define SPACE_HSV 0x48535620 /* 'HSV ' */
540 #define SPACE_HLS 0x484C5320 /* 'HLS ' */
541 #define SPACE_CMYK 0x434D594B /* 'CMYK' */
542 #define SPACE_CMY 0x434D5920 /* 'CMY ' */
543 #define SPACE_2_CHANNEL 0x32434c52 /* '2CLR' */
544 #define SPACE_3_CHANNEL 0x33434c52 /* '3CLR' */
545 #define SPACE_4_CHANNEL 0x34434c52 /* '4CLR' */
546 #define SPACE_5_CHANNEL 0x35434c52 /* '5CLR' */
547 #define SPACE_6_CHANNEL 0x36434c52 /* '6CLR' */
548 #define SPACE_7_CHANNEL 0x37434c52 /* '7CLR' */
549 #define SPACE_8_CHANNEL 0x38434c52 /* '8CLR' */
555 #endif /* __WINE_ICM_H */