4 #pragma GCC system_header
11 #if (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500)
12 #define MAX_COLOR_CHANNELS 8
13 #define PROFILE_FILENAME 1
14 #define PROFILE_MEMBUFFER 2
15 #define PROFILE_READ 1
16 #define PROFILE_READWRITE 2
17 #define CLASS_SCANNER 0x73636E72
18 #define CLASS_MONITOR 0x6D6E7472
19 #define CLASS_PRINTER 0x70727472
20 #define CLASS_LINK 0x6C696E6B
21 #define CLASS_COLORSPAC 0x73706163
22 #define CLASS_ABSTRACT 0x61627374
23 #define CLASS_NAMED 0x6E6D636C
24 #define SPACE_XYZ 0x58595A20
25 #define SPACE_Lab 0x4C616220
26 #define SPACE_Luv 0x4C757620
27 #define SPACE_YCbCr 0x59436272
28 #define SPACE_Yxy 0x59787920
29 #define SPACE_RGB 0x52474220
30 #define SPACE_GRAY 0x47524159
31 #define SPACE_HSV 0x48535620
32 #define SPACE_HLS 0x484C5320
33 #define SPACE_CMYK 0x434D594B
34 #define SPACE_CMY 0x434D5920
35 #define SPACE_2_CHANNEL 0x32434C52
36 #define SPACE_3_CHANNEL 0x33434C52
37 #define SPACE_4_CHANNEL 0x34434C52
38 #define SPACE_5_CHANNEL 0x35434C52
39 #define SPACE_6_CHANNEL 0x36434C52
40 #define SPACE_7_CHANNEL 0x37434C52
41 #define SPACE_8_CHANNEL 0x38434C52
42 #define FLAG_EMBEDDEDPROFILE 1
43 #define FLAG_DEPENDENTONDATA 2
44 #define ATTRIB_TRANSPARENCY 1
45 #define ATTRIB_MATTE 2
46 #define INTENT_PERCEPTUAL 0
47 #define INTENT_RELATIVE_COLORIMETRIC 1
48 #define INTENT_SATURATION 2
49 #define INTENT_ABSOLUTE_COLORIMETRIC 3
50 #define COLOR_MATCH_VERSION 0x200
51 #define CMS_DISABLEICM 0x1
52 #define CMS_ENABLEPROOFING 0x2
53 #define CMS_SETRENDERINTENT 0x4
54 #define CMS_SETPROOFINTENT 0x8
55 #define CMS_SETMONITORPROFILE 0x10
56 #define CMS_SETPRINTERPROFILE 0x20
57 #define CMS_SETTARGETPROFILE 0x40
58 #define CMS_USEHOOK 0x80
59 #define CMS_USEAPPLYCALLBACK 0x100
60 #define CMS_USEDESCRIPTION 0x200
61 #define CMS_TARGETOVERFLOW 0x20000000
62 #define CMS_PRINTERROVERFLOW 0x40000000
63 #define CMS_MONITOROVERFLOW 0x80000000
65 DECLARE_HANDLE(HPROFILE
);
66 typedef HPROFILE
*PHPROFILE
,*LPHPROFILE
;
67 DECLARE_HANDLE(HTRANSFORM
);\
69 typedef BOOL (CALLBACK
*PBMCALLBACKFN
)(ULONG
,ULONG
,LPARAM
);
70 struct _tagCOLORMATCHSETUPA
;
71 struct _tagCOLORMATCHSETUPW
;
72 typedef BOOL (CALLBACK
*PCMSCALLBACKA
)(struct _tagCOLORMATCHSETUPA
*,LPARAM
);
73 typedef BOOL (CALLBACK
*PCMSCALLBACKW
)(struct _tagCOLORMATCHSETUPW
*,LPARAM
);
75 typedef CHAR COLOR_NAME
[32];
76 typedef COLOR_NAME
*PCOLOR_NAME
,*LPCOLOR_NAME
;
77 typedef DWORD TAGTYPE
,*PTAGTYPE
,*LPTAGTYPE
;
85 BM_RGBTRIPLETS
= 0x0002,
86 BM_BGRTRIPLETS
= 0x0004,
87 BM_XYZTRIPLETS
= 0x0201,
96 BM_xRGBQUADS
= 0x0008,
97 BM_xBGRQUADS
= 0x0010,
98 BM_xG3CHQUADS
= 0x0304,
100 BM_CMYKQUADS
= 0x0020,
114 } BMFORMAT
,*PBMFORMAT
,*LPBMFORMAT
;
129 } COLORTYPE
,*PCOLORTYPE
,*LPCOLORTYPE
;
159 struct GENERIC3CHANNEL
{
168 BYTE channel
[MAX_COLOR_CHANNELS
];
170 typedef union tagCOLOR
{
171 struct GRAYCOLOR gray
;
173 struct CMYKCOLOR cmyk
;
177 struct GENERIC3CHANNEL gen3ch
;
178 struct NAMEDCOLOR named
;
179 struct HiFiCOLOR hifi
;
180 } COLOR
,*PCOLOR
,*LPCOLOR
;
181 typedef struct _tagCOLORMATCHSETUPA
{
189 DWORD dwRenderIntent
;
190 DWORD dwProofingIntent
;
191 PSTR pMonitorProfile
;
192 DWORD ccMonitorProfile
;
193 PSTR pPrinterProfile
;
194 DWORD ccPrinterProfile
;
196 DWORD ccTargetProfile
;
199 PCMSCALLBACKA lpfnApplyCallback
;
200 LPARAM lParamApplyCallback
;
201 } COLORMATCHSETUPA
,*PCOLORMATCHSETUPA
,*LPCOLORMATCHSETUPA
;
202 typedef struct _tagCOLORMATCHSETUPW
{
210 DWORD dwRenderIntent
;
211 DWORD dwProofingIntent
;
212 PWSTR pMonitorProfile
;
213 DWORD ccMonitorProfile
;
214 PWSTR pPrinterProfile
;
215 DWORD ccPrinterProfile
;
216 PWSTR pTargetProfile
;
217 DWORD ccTargetProfile
;
220 PCMSCALLBACKW lpfnApplyCallback
;
221 LPARAM lParamApplyCallback
;
222 } COLORMATCHSETUPW
,*PCOLORMATCHSETUPW
,*LPCOLORMATCHSETUPW
;
223 typedef struct tagENUMTYPEW
{
229 DWORD dwDitheringMode
;
230 DWORD dwResolution
[2];
233 DWORD dwDataColorSpace
;
234 DWORD dwConnectionSpace
;
237 DWORD dwProfileFlags
;
238 DWORD dwManufacturer
;
240 DWORD dwAttributes
[2];
241 DWORD dwRenderingIntent
;
244 } ENUMTYPEW
,*PENUMTYPEW
,*LPENUMTYPEW
;
245 typedef struct tagENUMTYPEA
{
251 DWORD dwDitheringMode
;
252 DWORD dwResolution
[2];
255 DWORD dwDataColorSpace
;
256 DWORD dwConnectionSpace
;
259 DWORD dwProfileFlags
;
260 DWORD dwManufacturer
;
262 DWORD dwAttributes
[2];
263 DWORD dwRenderingIntent
;
266 } ENUMTYPEA
,*PENUMTYPEA
,*LPENUMTYPEA
;
267 typedef struct tagNAMED_PROFILE_INFO
{
270 DWORD dwCountDevCoordinates
;
273 } NAMED_PROFILE_INFO
,*PNAMED_PROFILE_INFO
,*LPNAMED_PROFILE_INFO
;
274 typedef struct tagPROFILE
{
278 } PROFILE
,*PPROFILE
,*LPPROFILE
;
279 typedef struct tagPROFILEHEADER
{
284 DWORD phDataColorSpace
;
285 DWORD phConnectionSpace
;
289 DWORD phProfileFlags
;
290 DWORD phManufacturer
;
292 DWORD phAttributes
[2];
293 DWORD phRenderingIntent
;
297 } PROFILEHEADER
,*PPROFILEHEADER
,*LPPROFILEHEADER
;
299 BOOL WINAPI
AssociateColorProfileWithDeviceA(PCSTR
,PCSTR
,PCSTR
);
300 BOOL WINAPI
AssociateColorProfileWithDeviceW(PCWSTR
,PCWSTR
,PCWSTR
);
301 BOOL WINAPI
CheckBitmapBits(HTRANSFORM
,PVOID
,BMFORMAT
,DWORD
,DWORD
,DWORD
,PBYTE
,PBMCALLBACKFN
,LPARAM
);
302 BOOL WINAPI
CheckColors(HTRANSFORM
,PCOLOR
,DWORD
,COLORTYPE
,PBYTE
);
303 BOOL WINAPI
CloseColorProfile(HPROFILE
);
304 BOOL WINAPI
ConvertColorNameToIndex(HPROFILE
,PCOLOR_NAME
,PDWORD
,DWORD
);
305 BOOL WINAPI
ConvertIndexToColorName(HPROFILE
,PDWORD
,PCOLOR_NAME
,DWORD
);
306 HTRANSFORM WINAPI
CreateColorTransformA(LPLOGCOLORSPACEA
,HPROFILE
,HPROFILE
,DWORD
);
307 HTRANSFORM WINAPI
CreateColorTransformW(LPLOGCOLORSPACEW
,HPROFILE
,HPROFILE
,DWORD
);
308 BOOL WINAPI
CreateDeviceLinkProfile(PHPROFILE
,DWORD
,PDWORD
,DWORD
,DWORD
,PBYTE
*,DWORD
);
309 HTRANSFORM WINAPI
CreateMultiProfileTransform(PHPROFILE
,DWORD
,PDWORD
,DWORD
,DWORD
,DWORD
);
310 BOOL WINAPI
CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA
,PBYTE
*);
311 BOOL WINAPI
CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW
,PBYTE
*);
312 BOOL WINAPI
DeleteColorTransform(HTRANSFORM
);
313 BOOL WINAPI
DisassociateColorProfileFromDeviceA(PCSTR
,PCSTR
,PCSTR
);
314 BOOL WINAPI
DisassociateColorProfileFromDeviceW(PCWSTR
,PCWSTR
,PCWSTR
);
315 BOOL WINAPI
EnumColorProfilesA(PCSTR
,PENUMTYPEA
,PBYTE
,PDWORD
,PDWORD
);
316 BOOL WINAPI
EnumColorProfilesW(PCWSTR
,PENUMTYPEW
,PBYTE
,PDWORD
,PDWORD
);
317 DWORD WINAPI
GetCMMInfo(HTRANSFORM
,DWORD
);
318 BOOL WINAPI
GetColorDirectoryA(PCSTR
,PSTR
,PDWORD
);
319 BOOL WINAPI
GetColorDirectoryW(PCWSTR
,PWSTR
,PDWORD
);
320 BOOL WINAPI
GetColorProfileElement(HPROFILE
,TAGTYPE
,DWORD
,PDWORD
,PVOID
,PBOOL
);
321 BOOL WINAPI
GetColorProfileElementTag(HPROFILE
,DWORD
,PTAGTYPE
);
322 BOOL WINAPI
GetColorProfileFromHandle(HPROFILE
,PBYTE
,PDWORD
);
323 BOOL WINAPI
GetColorProfileHeader(HPROFILE
,PPROFILEHEADER
);
324 BOOL WINAPI
GetCountColorProfileElements(HPROFILE
,PDWORD
);
325 BOOL WINAPI
GetNamedProfileInfo(HPROFILE
,PNAMED_PROFILE_INFO
);
326 BOOL WINAPI
GetPS2ColorRenderingDictionary(HPROFILE
,DWORD
,PBYTE
,PDWORD
,PBOOL
);
327 BOOL WINAPI
GetPS2ColorRenderingIntent(HPROFILE
,DWORD
,PBYTE
,PDWORD
);
328 BOOL WINAPI
GetPS2ColorSpaceArray(HPROFILE
,DWORD
,DWORD
,PBYTE
,PDWORD
,PBOOL
);
329 BOOL WINAPI
GetStandardColorSpaceProfileA(PCSTR
,DWORD
,PSTR
,PDWORD
);
330 BOOL WINAPI
GetStandardColorSpaceProfileW(PCWSTR
,DWORD
,PWSTR
,PDWORD
);
331 BOOL WINAPI
InstallColorProfileA(PCSTR
,PCSTR
);
332 BOOL WINAPI
InstallColorProfileW(PCWSTR
,PCWSTR
);
333 BOOL WINAPI
IsColorProfileTagPresent(HPROFILE
,TAGTYPE
,PBOOL
);
334 BOOL WINAPI
IsColorProfileValid(HPROFILE
,PBOOL
);
335 HPROFILE WINAPI
OpenColorProfileA(PPROFILE
,DWORD
,DWORD
,DWORD
);
336 HPROFILE WINAPI
OpenColorProfileW(PPROFILE
,DWORD
,DWORD
,DWORD
);
337 BOOL WINAPI
RegisterCMMA(PCSTR
,DWORD
,PCSTR
);
338 BOOL WINAPI
RegisterCMMW(PCWSTR
,DWORD
,PCWSTR
);
339 BOOL WINAPI
SelectCMM(DWORD
);
340 BOOL WINAPI
SetColorProfileElement(HPROFILE
,TAGTYPE
,DWORD
,PDWORD
,PVOID
);
341 BOOL WINAPI
SetColorProfileElementReference(HPROFILE
,TAGTYPE
,TAGTYPE
);
342 BOOL WINAPI
SetColorProfileElementSize(HPROFILE
,TAGTYPE
,DWORD
);
343 BOOL WINAPI
SetColorProfileHeader(HPROFILE
,PPROFILEHEADER
);
344 BOOL WINAPI
SetStandardColorSpaceProfileA(PCSTR
,DWORD
,PCSTR
);
345 BOOL WINAPI
SetStandardColorSpaceProfileW(PCWSTR
,DWORD
,PCSTR
);
346 BOOL WINAPI
SetupColorMatchingA(PCOLORMATCHSETUPA
);
347 BOOL WINAPI
SetupColorMatchingW(PCOLORMATCHSETUPW
);
348 BOOL WINAPI
TranslateBitmapBits(HTRANSFORM
,PVOID
,BMFORMAT
,DWORD
,DWORD
,DWORD
,PVOID
,BMFORMAT
,DWORD
,PBMCALLBACKFN
,ULONG
);
349 BOOL WINAPI
TranslateColors(HTRANSFORM
,PCOLOR
,DWORD
,COLORTYPE
,PCOLOR
,COLORTYPE
);
350 BOOL WINAPI
UninstallColorProfileA(PCSTR
,PCSTR
,BOOL
);
351 BOOL WINAPI
UninstallColorProfileW(PCWSTR
,PCWSTR
,BOOL
);
352 BOOL WINAPI
UnregisterCMMA(PCSTR
,DWORD
);
353 BOOL WINAPI
UnregisterCMMW(PCWSTR
,DWORD
);
356 typedef PCMSCALLBACKW PCMSCALLBACK
;
357 typedef COLORMATCHSETUPW COLORMATCHSETUP
,*PCOLORMATCHSETUP
,*LPCOLORMATCHSETUP
;
358 typedef ENUMTYPEW ENUMTYPE
,*PENUMTYPE
,*LPENUMTYPE
;
359 #define AssociateColorProfileWithDevice AssociateColorProfileWithDeviceW
360 #define CreateColorTransform CreateColorTransformW
361 #define CreateProfileFromLogColorSpace CreateProfileFromLogColorSpaceW
362 #define DisassociateColorProfileFromDevice DisassociateColorProfileFromDeviceW
363 #define EnumColorProfiles EnumColorProfilesW
364 #define GetColorDirectory GetColorDirectoryW
365 #define GetStandardColorSpaceProfile GetStandardColorSpaceProfileW
366 #define InstallColorProfile InstallColorProfileW
367 #define OpenColorProfile OpenColorProfileW
368 #define RegisterCMM RegisterCMMW
369 #define SetStandardColorSpaceProfile SetStandardColorSpaceProfileW
370 #define SetupColorMatching SetupColorMatchingW
371 #define UninstallColorProfile UninstallColorProfileW
372 #define UnregisterCMM UnregisterCMMW
374 typedef PCMSCALLBACKA PCMSCALLBACK
;
375 typedef COLORMATCHSETUPA COLORMATCHSETUP
,*PCOLORMATCHSETUP
,*LPCOLORMATCHSETUP
;
376 typedef ENUMTYPEA ENUMTYPE
,*PENUMTYPE
,*LPENUMTYPE
;
377 #define AssociateColorProfileWithDevice AssociateColorProfileWithDeviceA
378 #define CreateColorTransform CreateColorTransformA
379 #define CreateProfileFromLogColorSpace CreateProfileFromLogColorSpaceA
380 #define DisassociateColorProfileFromDevice DisassociateColorProfileFromDeviceA
381 #define EnumColorProfiles EnumColorProfilesA
382 #define GetColorDirectory GetColorDirectoryA
383 #define GetStandardColorSpaceProfile GetStandardColorSpaceProfileA
384 #define InstallColorProfile InstallColorProfileA
385 #define OpenColorProfile OpenColorProfileA
386 #define RegisterCMM RegisterCMMA
387 #define SetStandardColorSpaceProfile SetStandardColorSpaceProfileA
388 #define SetupColorMatching SetupColorMatchingA
389 #define UninstallColorProfile UninstallColorProfileA
390 #define UnregisterCMM UnregisterCMMA
391 #endif /* !UNICODE */
393 #endif /* (_WIN32_WINDOWS >= 0x0410 || _WIN32_WINNT >= 0x0500) */