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
= 0x02,
143 BM_BGRTRIPLETS
= 0x04,
153 BM_XYZTRIPLETS
= 0x201,
162 BM_xXYZQUADS
= 0x301,
177 } BMFORMAT
, *PBMFORMAT
, *LPBMFORMAT
;
181 WCS_PROFILE_MANAGEMENT_SCOPE_SYSTEM_WIDE
,
182 WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER
183 } WCS_PROFILE_MANAGEMENT_SCOPE
;
185 typedef BOOL (CALLBACK
*PBMCALLBACKFN
)(ULONG
,ULONG
,LPARAM
);
186 typedef PBMCALLBACKFN LPPBMCALLBACKFN
;
188 #define INTENT_PERCEPTUAL 0
189 #define INTENT_RELATIVE_COLORIMETRIC 1
190 #define INTENT_SATURATION 2
191 #define INTENT_ABSOLUTE_COLORIMETRIC 3
193 typedef struct tagPROFILEHEADER
199 DWORD phDataColorSpace
;
200 DWORD phConnectionSpace
;
204 DWORD phProfileFlags
;
205 DWORD phManufacturer
;
207 DWORD phAttributes
[2];
208 DWORD phRenderingIntent
;
212 } PROFILEHEADER
, *PPROFILEHEADER
, *LPPROFILEHEADER
;
214 typedef struct tagPROFILE
219 } PROFILE
, *PPROFILE
, *LPPROFILE
;
221 #define ENUM_TYPE_VERSION 0x0300
223 typedef struct tagENUMTYPEA
230 DWORD dwDitheringMode
;
231 DWORD dwResolution
[2];
234 DWORD dwDataColorSpace
;
235 DWORD dwConnectionSpace
;
238 DWORD dwProfileFlags
;
239 DWORD dwManufacturer
;
241 DWORD dwAttributes
[2];
242 DWORD dwRenderingIntent
;
245 } ENUMTYPEA
, *PENUMTYPEA
, *LPENUMTYPEA
;
247 typedef struct tagENUMTYPEW
254 DWORD dwDitheringMode
;
255 DWORD dwResolution
[2];
258 DWORD dwDataColorSpace
;
259 DWORD dwConnectionSpace
;
262 DWORD dwProfileFlags
;
263 DWORD dwManufacturer
;
265 DWORD dwAttributes
[2];
266 DWORD dwRenderingIntent
;
269 } ENUMTYPEW
, *PENUMTYPEW
, *LPENUMTYPEW
;
271 #define ET_DEVICENAME 0x00000001
272 #define ET_MEDIATYPE 0x00000002
273 #define ET_DITHERMODE 0x00000004
274 #define ET_RESOLUTION 0x00000008
275 #define ET_CMMTYPE 0x00000010
276 #define ET_CLASS 0x00000020
277 #define ET_DATACOLORSPACE 0x00000040
278 #define ET_CONNECTIONSPACE 0x00000080
279 #define ET_SIGNATURE 0x00000100
280 #define ET_PLATFORM 0x00000200
281 #define ET_PROFILEFLAGS 0x00000400
282 #define ET_MANUFACTURER 0x00000800
283 #define ET_MODEL 0x00001000
284 #define ET_ATTRIBUTES 0x00002000
285 #define ET_RENDERINGINTENT 0x00004000
286 #define ET_CREATOR 0x00008000
287 #define ET_DEVICECLASS 0x00010000
289 struct _tagCOLORMATCHSETUPA
;
290 struct _tagCOLORMATCHSETUPW
;
292 typedef BOOL (WINAPI
*PCMSCALLBACKA
)(struct _tagCOLORMATCHSETUPA
*,LPARAM
);
293 typedef BOOL (WINAPI
*PCMSCALLBACKW
)(struct _tagCOLORMATCHSETUPW
*,LPARAM
);
295 typedef struct _tagCOLORMATCHSETUPA
304 DWORD dwRenderIntent
;
305 DWORD dwProofingIntent
;
306 PSTR pMonitorProfile
;
307 DWORD ccMonitorProfile
;
308 PSTR pPrinterProfile
;
309 DWORD ccPrinterProfile
;
311 DWORD ccTargetProfile
;
314 PCMSCALLBACKA lpfnApplyCallback
;
315 LPARAM lParamApplyCallback
;
316 } COLORMATCHSETUPA
, *PCOLORMATCHSETUPA
, *LPCOLORMATCHSETUPA
;
318 typedef struct _tagCOLORMATCHSETUPW
327 DWORD dwRenderIntent
;
328 DWORD dwProofingIntent
;
329 PWSTR pMonitorProfile
;
330 DWORD ccMonitorProfile
;
331 PWSTR pPrinterProfile
;
332 DWORD ccPrinterProfile
;
333 PWSTR pTargetProfile
;
334 DWORD ccTargetProfile
;
337 PCMSCALLBACKW lpfnApplyCallback
;
338 LPARAM lParamApplyCallback
;
339 } COLORMATCHSETUPW
, *PCOLORMATCHSETUPW
, *LPCOLORMATCHSETUPW
;
341 BOOL WINAPI
AssociateColorProfileWithDeviceA(PCSTR
,PCSTR
,PCSTR
);
342 BOOL WINAPI
AssociateColorProfileWithDeviceW(PCWSTR
,PCWSTR
,PCWSTR
);
343 #define AssociateColorProfileWithDevice WINELIB_NAME_AW(AssociateColorProfileWithDevice)
344 BOOL WINAPI
CheckBitmapBits(HTRANSFORM
,PVOID
,BMFORMAT
,DWORD
,DWORD
,DWORD
,PBYTE
,PBMCALLBACKFN
,LPARAM
);
345 BOOL WINAPI
CheckColors(HTRANSFORM
,PCOLOR
,DWORD
,COLORTYPE
,PBYTE
);
346 BOOL WINAPI
ConvertColorNameToIndex(HPROFILE
,PCOLOR_NAME
,PDWORD
,DWORD
);
347 BOOL WINAPI
ConvertIndexToColorName(HPROFILE
,PDWORD
,PCOLOR_NAME
,DWORD
);
348 BOOL WINAPI
CloseColorProfile(HPROFILE
);
349 HTRANSFORM WINAPI
CreateColorTransformA(LPLOGCOLORSPACEA
,HPROFILE
,HPROFILE
,DWORD
);
350 HTRANSFORM WINAPI
CreateColorTransformW(LPLOGCOLORSPACEW
,HPROFILE
,HPROFILE
,DWORD
);
351 #define CreateColorTransform WINELIB_NAME_AW(CreateColorTransform)
352 BOOL WINAPI
CreateDeviceLinkProfile(PHPROFILE
,DWORD
,PDWORD
,DWORD
,DWORD
,PBYTE
*,DWORD
);
353 HTRANSFORM WINAPI
CreateMultiProfileTransform(PHPROFILE
,DWORD
,PDWORD
,DWORD
,DWORD
,DWORD
);
354 BOOL WINAPI
CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA
,PBYTE
*);
355 BOOL WINAPI
CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW
,PBYTE
*);
356 #define CreateProfileFromLogColorSpace WINELIB_NAME_AW(CreateProfileFromLogColorSpace)
357 BOOL WINAPI
DeleteColorTransform(HTRANSFORM
);
358 BOOL WINAPI
DisassociateColorProfileFromDeviceA(PCSTR
,PCSTR
,PCSTR
);
359 BOOL WINAPI
DisassociateColorProfileFromDeviceW(PCWSTR
,PCWSTR
,PCWSTR
);
360 #define DisassociateColorProfileFromDevice WINELIB_NAME_AW(DisassociateColorProfileFromDevice)
361 BOOL WINAPI
EnumColorProfilesA(PCSTR
,PENUMTYPEA
,PBYTE
,PDWORD
,PDWORD
);
362 BOOL WINAPI
EnumColorProfilesW(PCWSTR
,PENUMTYPEW
,PBYTE
,PDWORD
,PDWORD
);
363 #define EnumColorProfiles WINELIB_NAME_AW(EnumColorProfiles)
364 DWORD WINAPI
GenerateCopyFilePaths(LPCWSTR
,LPCWSTR
,LPBYTE
,DWORD
,LPWSTR
,LPDWORD
,LPWSTR
,LPDWORD
,DWORD
);
365 DWORD WINAPI
GetCMMInfo(HTRANSFORM
,DWORD
);
366 BOOL WINAPI
GetColorDirectoryA(PCSTR
,PSTR
,PDWORD
);
367 BOOL WINAPI
GetColorDirectoryW(PCWSTR
,PWSTR
,PDWORD
);
368 #define GetColorDirectory WINELIB_NAME_AW(GetColorDirectory)
369 BOOL WINAPI
GetColorProfileElement(HPROFILE
,TAGTYPE
,DWORD
,PDWORD
,PVOID
,PBOOL
);
370 BOOL WINAPI
GetColorProfileElementTag(HPROFILE
,DWORD
,PTAGTYPE
);
371 BOOL WINAPI
GetColorProfileFromHandle(HPROFILE
,PBYTE
,PDWORD
);
372 BOOL WINAPI
GetColorProfileHeader(HPROFILE
,PPROFILEHEADER
);
373 BOOL WINAPI
GetCountColorProfileElements(HPROFILE
,PDWORD
);
374 BOOL WINAPI
GetNamedProfileInfo(HPROFILE
,PNAMED_PROFILE_INFO
);
375 BOOL WINAPI
GetPS2ColorRenderingDictionary(HPROFILE
,DWORD
,PBYTE
,PDWORD
,PBOOL
);
376 BOOL WINAPI
GetPS2ColorRenderingIntent(HPROFILE
,DWORD
,PBYTE
,PDWORD
);
377 BOOL WINAPI
GetPS2ColorSpaceArray(HPROFILE
,DWORD
,DWORD
,PBYTE
,PDWORD
,PBOOL
);
378 BOOL WINAPI
GetStandardColorSpaceProfileA(PCSTR
,DWORD
,PSTR
,PDWORD
);
379 BOOL WINAPI
GetStandardColorSpaceProfileW(PCWSTR
,DWORD
,PWSTR
,PDWORD
);
380 #define GetStandardColorSpaceProfile WINELIB_NAME_AW(GetStandardColorSpaceProfile)
381 BOOL WINAPI
InstallColorProfileA(PCSTR
,PCSTR
);
382 BOOL WINAPI
InstallColorProfileW(PCWSTR
,PCWSTR
);
383 #define InstallColorProfile WINELIB_NAME_AW(InstallColorProfile)
384 BOOL WINAPI
IsColorProfileTagPresent(HPROFILE
,TAGTYPE
,PBOOL
);
385 BOOL WINAPI
IsColorProfileValid(HPROFILE
,PBOOL
);
386 HPROFILE WINAPI
OpenColorProfileA(PPROFILE
,DWORD
,DWORD
,DWORD
);
387 HPROFILE WINAPI
OpenColorProfileW(PPROFILE
,DWORD
,DWORD
,DWORD
);
388 #define OpenColorProfile WINELIB_NAME_AW(OpenColorProfile)
389 BOOL WINAPI
RegisterCMMA(PCSTR
,DWORD
,PCSTR
);
390 BOOL WINAPI
RegisterCMMW(PCWSTR
,DWORD
,PCWSTR
);
391 #define RegisterCMM WINELIB_NAME_AW(RegisterCMM)
392 BOOL WINAPI
SelectCMM(DWORD id
);
393 BOOL WINAPI
SetColorProfileElement(HPROFILE
,TAGTYPE
,DWORD
,PDWORD
,PVOID
);
394 BOOL WINAPI
SetColorProfileElementReference(HPROFILE
,TAGTYPE
,TAGTYPE
);
395 BOOL WINAPI
SetColorProfileElementSize(HPROFILE
,TAGTYPE
,DWORD
);
396 BOOL WINAPI
SetColorProfileHeader(HPROFILE
,PPROFILEHEADER
);
397 BOOL WINAPI
SetStandardColorSpaceProfileA(PCSTR
,DWORD
,PSTR
);
398 BOOL WINAPI
SetStandardColorSpaceProfileW(PCWSTR
,DWORD
,PWSTR
);
399 #define SetStandardColorSpaceProfile WINELIB_NAME_AW(SetStandardColorSpaceProfile)
400 BOOL WINAPI
SetupColorMatchingA(PCOLORMATCHSETUPA
);
401 BOOL WINAPI
SetupColorMatchingW(PCOLORMATCHSETUPW
);
402 #define SetupColorMatching WINELIB_NAME_AW(SetupColorMatching)
403 BOOL WINAPI
SpoolerCopyFileEvent(LPWSTR
,LPWSTR
,DWORD
);
404 BOOL WINAPI
TranslateBitmapBits(HTRANSFORM
,PVOID
,BMFORMAT
,DWORD
,DWORD
,DWORD
,PVOID
,BMFORMAT
,DWORD
,PBMCALLBACKFN
,ULONG
);
405 BOOL WINAPI
TranslateColors(HTRANSFORM
,PCOLOR
,DWORD
,COLORTYPE
,PCOLOR
,COLORTYPE
);
406 BOOL WINAPI
UninstallColorProfileA(PCSTR
,PCSTR
,BOOL
);
407 BOOL WINAPI
UninstallColorProfileW(PCWSTR
,PCWSTR
,BOOL
);
408 #define UninstallColorProfile WINELIB_NAME_AW(UninstallColorProfile)
409 BOOL WINAPI
UnregisterCMMA(PCSTR
,DWORD
);
410 BOOL WINAPI
UnregisterCMMW(PCWSTR
,DWORD
);
411 #define UnregisterCMM WINELIB_NAME_AW(UnregisterCMM)
412 BOOL WINAPI
WcsEnumColorProfilesSize(WCS_PROFILE_MANAGEMENT_SCOPE
,ENUMTYPEW
*,DWORD
*);
413 BOOL WINAPI
WcsGetUsePerUserProfiles(const WCHAR
*,DWORD
,BOOL
*);
414 HPROFILE WINAPI
WcsOpenColorProfileA(PROFILE
*,PROFILE
*,PROFILE
*,DWORD
,DWORD
,DWORD
,DWORD
);
415 HPROFILE WINAPI
WcsOpenColorProfileW(PROFILE
*,PROFILE
*,PROFILE
*,DWORD
,DWORD
,DWORD
,DWORD
);
417 #define PROFILE_FILENAME 1
418 #define PROFILE_MEMBUFFER 2
420 #define PROFILE_READ 1
421 #define PROFILE_READWRITE 2
423 #define SPACE_XYZ 0x58595A20 /* 'XYZ ' */
424 #define SPACE_Lab 0x4C616220 /* 'Lab ' */
425 #define SPACE_Luv 0x4C757620 /* 'Luv ' */
426 #define SPACE_YCbCr 0x59436272 /* 'YCbr' */
427 #define SPACE_Yxy 0x59787920 /* 'Yxy ' */
428 #define SPACE_RGB 0x52474220 /* 'RGB ' */
429 #define SPACE_GRAY 0x47524159 /* 'GRAY' */
430 #define SPACE_HSV 0x48535620 /* 'HSV ' */
431 #define SPACE_HLS 0x484C5320 /* 'HLS ' */
432 #define SPACE_CMYK 0x434D594B /* 'CMYK' */
433 #define SPACE_CMY 0x434D5920 /* 'CMY ' */
434 #define SPACE_2_CHANNEL 0x32434c52 /* '2CLR' */
435 #define SPACE_3_CHANNEL 0x33434c52 /* '3CLR' */
436 #define SPACE_4_CHANNEL 0x34434c52 /* '4CLR' */
437 #define SPACE_5_CHANNEL 0x35434c52 /* '5CLR' */
438 #define SPACE_6_CHANNEL 0x36434c52 /* '6CLR' */
439 #define SPACE_7_CHANNEL 0x37434c52 /* '7CLR' */
440 #define SPACE_8_CHANNEL 0x38434c52 /* '8CLR' */
446 #endif /* __WINE_ICM_H */