Centralized calls for SymSetContext, we only do it when we change the
[wine/multimedia.git] / include / icm.h
blobb3dd6208bd8cc3df6368e74b80f1129ca8969dba
1 /*
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 #ifndef __WINE_ICM_H
20 #define __WINE_ICM_H
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
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
37 DWORD dwFlags;
38 DWORD dwCount;
39 DWORD dwCountDevCoordinates;
40 COLOR_NAME szPrefix;
41 COLOR_NAME szSuffix;
42 } NAMED_PROFILE_INFO, *PNAMED_PROFILE_INFO, *LPNAMED_PROFILE_INFO;
44 #define MAX_COLOR_CHANNELS 8
46 struct GRAYCOLOR
48 WORD gray;
51 struct RGBCOLOR
53 WORD red;
54 WORD green;
55 WORD blue;
58 struct CMYKCOLOR
60 WORD cyan;
61 WORD magenta;
62 WORD yellow;
63 WORD black;
66 struct XYZCOLOR
68 WORD X;
69 WORD Y;
70 WORD Z;
73 struct YxyCOLOR
75 WORD Y;
76 WORD x;
77 WORD y;
80 struct LabCOLOR
82 WORD L;
83 WORD a;
84 WORD b;
87 struct GENERIC3CHANNEL
89 WORD ch1;
90 WORD ch2;
91 WORD ch3;
94 struct NAMEDCOLOR
96 DWORD dwIndex;
99 struct HiFiCOLOR
101 BYTE channel[MAX_COLOR_CHANNELS];
104 typedef union tagCOLOR
106 struct GRAYCOLOR gray;
107 struct RGBCOLOR rgb;
108 struct CMYKCOLOR cmyk;
109 struct XYZCOLOR XYZ;
110 struct YxyCOLOR Yxy;
111 struct LabCOLOR Lab;
112 struct GENERIC3CHANNEL gen3ch;
113 struct NAMEDCOLOR named;
114 struct HiFiCOLOR hifi;
115 struct
117 DWORD reserved1;
118 VOID *reserved2;
119 } DUMMYSTRUCTNAME;
120 } COLOR, *PCOLOR, *LPCOLOR;
122 typedef enum
124 COLOR_GRAY = 1,
125 COLOR_RGB,
126 COLOR_XYZ,
127 COLOR_Yxy,
128 COLOR_Lab,
129 COLOR_3_CHANNEL,
130 COLOR_CMYK,
131 COLOR_5_CHANNEL,
132 COLOR_6_CHANNEL,
133 COLOR_7_CHANNEL,
134 COLOR_8_CHANNEL,
135 COLOR_NAMED,
136 } COLORTYPE, *PCOLORTYPE, *LPCOLORTYPE;
138 typedef enum
140 BM_x555RGB = 0x00,
141 BM_565RGB = 0x01,
142 BM_RGBTRIPLETS = 0x02,
143 BM_BGRTRIPLETS = 0x04,
144 BM_xRGBQUADS = 0x08,
145 BM_10b_RGB = 0x09,
146 BM_16b_RGB = 0x0a,
147 BM_xBGRQUADS = 0x10,
148 BM_CMYKQUADS = 0x20,
149 BM_x555XYZ = 0x101,
150 BM_x555Yxz,
151 BM_x555Lab,
152 BM_x555G3CH,
153 BM_XYZTRIPLETS = 0x201,
154 BM_YxyTRIPLETS,
155 BM_LabTRIPLETS,
156 BM_G3CHTRIPLETS,
157 BM_5CHANNEL,
158 BM_6CHANNEL,
159 BM_7CHANNEL,
160 BM_8CHANNEL,
161 BM_GRAY,
162 BM_xXYZQUADS = 0x301,
163 BM_xYxyQUADS,
164 BM_xLabQUADS,
165 BM_xG3CHQUADS,
166 BM_KYMCQUADS,
167 BM_10b_XYZ = 0x401,
168 BM_10b_Yxy,
169 BM_10b_Lab,
170 BM_10b_G3CH,
171 BM_NAMED_INDEX,
172 BM_16b_XYZ = 0x501,
173 BM_16b_Yxy,
174 BM_16b_Lab,
175 BM_16b_G3CH,
176 BM_16b_GRAY,
177 } BMFORMAT, *PBMFORMAT, *LPBMFORMAT;
179 typedef BOOL (CALLBACK *PBMCALLBACKFN)(ULONG,ULONG,LPARAM);
180 typedef PBMCALLBACKFN LPPBMCALLBACKFN;
182 typedef struct tagPROFILEHEADER
184 DWORD phSize;
185 DWORD phCMMType;
186 DWORD phVersion;
187 DWORD phClass;
188 DWORD phDataColorSpace;
189 DWORD phConnectionSpace;
190 DWORD phDateTime[3];
191 DWORD phSignature;
192 DWORD phPlatform;
193 DWORD phProfileFlags;
194 DWORD phManufacturer;
195 DWORD phModel;
196 DWORD phAttributes[2];
197 DWORD phRenderingIntent;
198 CIEXYZ phIlluminant;
199 DWORD phCreator;
200 BYTE phReserved[44];
201 } PROFILEHEADER, *PPROFILEHEADER, *LPPROFILEHEADER;
203 typedef struct tagPROFILE
205 DWORD dwType;
206 PVOID pProfileData;
207 DWORD cbDataSize;
208 } PROFILE, *PPROFILE, *LPPROFILE;
210 typedef struct tagENUMTYPEA
212 DWORD dwSize;
213 DWORD dwVersion;
214 DWORD dwFields;
215 PCSTR pDeviceName;
216 DWORD dwMediaType;
217 DWORD dwDitheringMode;
218 DWORD dwResolution[2];
219 DWORD dwCMMType;
220 DWORD dwClass;
221 DWORD dwDataColorSpace;
222 DWORD dwConnectionSpace;
223 DWORD dwSignature;
224 DWORD dwPlatform;
225 DWORD dwProfileFlags;
226 DWORD dwManufacturer;
227 DWORD dwModel;
228 DWORD dwAttributes[2];
229 DWORD dwRenderingIntent;
230 DWORD dwCreator;
231 DWORD dwDeviceClass;
232 } ENUMTYPEA, *PENUMTYPEA, *LPENUMTYPEA;
234 typedef struct tagENUMTYPEW
236 DWORD dwSize;
237 DWORD dwVersion;
238 DWORD dwFields;
239 PCWSTR pDeviceName;
240 DWORD dwMediaType;
241 DWORD dwDitheringMode;
242 DWORD dwResolution[2];
243 DWORD dwCMMType;
244 DWORD dwClass;
245 DWORD dwDataColorSpace;
246 DWORD dwConnectionSpace;
247 DWORD dwSignature;
248 DWORD dwPlatform;
249 DWORD dwProfileFlags;
250 DWORD dwManufacturer;
251 DWORD dwModel;
252 DWORD dwAttributes[2];
253 DWORD dwRenderingIntent;
254 DWORD dwCreator;
255 DWORD dwDeviceClass;
256 } ENUMTYPEW, *PENUMTYPEW, *LPENUMTYPEW;
258 struct _tagCOLORMATCHSETUPA;
259 struct _tagCOLORMATCHSETUPW;
261 typedef BOOL (WINAPI *PCMSCALLBACKA)(struct _tagCOLORMATCHSETUPA*,LPARAM);
262 typedef BOOL (WINAPI *PCMSCALLBACKW)(struct _tagCOLORMATCHSETUPW*,LPARAM);
264 typedef struct _tagCOLORMATCHSETUPA
266 DWORD dwSize;
267 DWORD dwVersion;
268 DWORD dwFlags;
269 HWND hwndOwner;
270 PCSTR pSourceName;
271 PCSTR pDisplayName;
272 PCSTR pPrinterName;
273 DWORD dwRenderIntent;
274 DWORD dwProofingIntent;
275 PSTR pMonitorProfile;
276 DWORD ccMonitorProfile;
277 PSTR pPrinterProfile;
278 DWORD ccPrinterProfile;
279 PSTR pTargetProfile;
280 DWORD ccTargetProfile;
281 DLGPROC lpfnHook;
282 LPARAM lParam;
283 PCMSCALLBACKA lpfnApplyCallback;
284 LPARAM lParamApplyCallback;
285 } COLORMATCHSETUPA, *PCOLORMATCHSETUPA, *LPCOLORMATCHSETUPA;
287 typedef struct _tagCOLORMATCHSETUPW
289 DWORD dwSize;
290 DWORD dwVersion;
291 DWORD dwFlags;
292 HWND hwndOwner;
293 PCWSTR pSourceName;
294 PCWSTR pDisplayName;
295 PCWSTR pPrinterName;
296 DWORD dwRenderIntent;
297 DWORD dwProofingIntent;
298 PWSTR pMonitorProfile;
299 DWORD ccMonitorProfile;
300 PWSTR pPrinterProfile;
301 DWORD ccPrinterProfile;
302 PWSTR pTargetProfile;
303 DWORD ccTargetProfile;
304 DLGPROC lpfnHook;
305 LPARAM lParam;
306 PCMSCALLBACKW lpfnApplyCallback;
307 LPARAM lParamApplyCallback;
308 } COLORMATCHSETUPW, *PCOLORMATCHSETUPW, *LPCOLORMATCHSETUPW;
310 BOOL WINAPI AssociateColorProfileWithDeviceA(PCSTR,PCSTR,PCSTR);
311 BOOL WINAPI AssociateColorProfileWithDeviceW(PCWSTR,PCWSTR,PCWSTR);
312 #define AssociateColorProfileWithDevice WINELIB_NAME_AW(AssociateColorProfileWithDevice)
313 BOOL WINAPI CheckBitmapBits(HTRANSFORM,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PBYTE,PBMCALLBACKFN,LPARAM);
314 BOOL WINAPI CheckColors(HTRANSFORM,PCOLOR,DWORD,COLORTYPE,PBYTE);
315 BOOL WINAPI ConvertColorNameToIndex(HPROFILE,PCOLOR_NAME,PDWORD,DWORD);
316 BOOL WINAPI ConvertIndexToColorName(HPROFILE,PDWORD,PCOLOR_NAME,DWORD);
317 BOOL WINAPI CloseColorProfile(HPROFILE);
318 HTRANSFORM WINAPI CreateColorTransformA(LPLOGCOLORSPACEA,HPROFILE,HPROFILE,DWORD);
319 HTRANSFORM WINAPI CreateColorTransformW(LPLOGCOLORSPACEW,HPROFILE,HPROFILE,DWORD);
320 #define CreateColorTransform WINELIB_NAME_AW(CreateColorTransform)
321 BOOL WINAPI CreateDeviceLinkProfile(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,PBYTE*,DWORD);
322 HTRANSFORM WINAPI CreateMultiProfileTransform(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,DWORD);
323 BOOL WINAPI CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA,PBYTE*);
324 BOOL WINAPI CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW,PBYTE*);
325 #define CreateProfileFromLogColorSpace WINELIB_NAME_AW(CreateProfileFromLogColorSpace)
326 BOOL WINAPI DeleteColorTransform(HTRANSFORM);
327 BOOL WINAPI DisassociateColorProfileFromDeviceA(PCSTR,PCSTR,PCSTR);
328 BOOL WINAPI DisassociateColorProfileFromDeviceW(PCWSTR,PCWSTR,PCWSTR);
329 #define DisassociateColorProfileFromDevice WINELIB_NAME_AW(DisassociateColorProfileFromDevice)
330 BOOL WINAPI EnumColorProfilesA(PCSTR,PENUMTYPEA,PBYTE,PDWORD,PDWORD);
331 BOOL WINAPI EnumColorProfilesW(PCWSTR,PENUMTYPEW,PBYTE,PDWORD,PDWORD);
332 #define EnumColorProfiles WINELIB_NAME_AW(EnumColorProfiles)
333 DWORD WINAPI GenerateCopyFilePaths(LPCWSTR,LPCWSTR,LPBYTE,DWORD,LPWSTR,LPDWORD,LPWSTR,LPDWORD,DWORD);
334 DWORD WINAPI GetCMMInfo(HTRANSFORM,DWORD);
335 BOOL WINAPI GetColorDirectoryA(PCSTR,PSTR,PDWORD);
336 BOOL WINAPI GetColorDirectoryW(PCWSTR,PWSTR,PDWORD);
337 #define GetColorDirectory WINELIB_NAME_AW(GetColorDirectory)
338 BOOL WINAPI GetColorProfileElement(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID,PBOOL);
339 BOOL WINAPI GetColorProfileElementTag(HPROFILE,DWORD,PTAGTYPE);
340 BOOL WINAPI GetColorProfileFromHandle(HPROFILE,PBYTE,PDWORD);
341 BOOL WINAPI GetColorProfileHeader(HPROFILE,PPROFILEHEADER);
342 HCOLORSPACE WINAPI GetColorSpace(HDC);
343 BOOL WINAPI GetCountColorProfileElements(HPROFILE,PDWORD);
344 BOOL WINAPI GetNamedProfileInfo(HPROFILE,PNAMED_PROFILE_INFO);
345 BOOL WINAPI GetPS2ColorRenderingDictionary(HPROFILE,DWORD,PBYTE,PDWORD,PBOOL);
346 BOOL WINAPI GetPS2ColorRenderingIntent(HPROFILE,DWORD,PBYTE,PDWORD);
347 BOOL WINAPI GetPS2ColorSpaceArray(HPROFILE,DWORD,DWORD,PBYTE,PDWORD,PBOOL);
348 BOOL WINAPI GetStandardColorSpaceProfileA(PCSTR,DWORD,PSTR,PDWORD);
349 BOOL WINAPI GetStandardColorSpaceProfileW(PCWSTR,DWORD,PWSTR,PDWORD);
350 #define GetStandardColorSpaceProfile WINELIB_NAME_AW(GetStandardColorSpaceProfile)
351 BOOL WINAPI InstallColorProfileA(PCSTR,PCSTR);
352 BOOL WINAPI InstallColorProfileW(PCWSTR,PCWSTR);
353 #define InstallColorProfile WINELIB_NAME_AW(InstallColorProfile)
354 BOOL WINAPI IsColorProfileTagPresent(HPROFILE,TAGTYPE,PBOOL);
355 BOOL WINAPI IsColorProfileValid(HPROFILE,PBOOL);
356 HPROFILE WINAPI OpenColorProfileA(PPROFILE,DWORD,DWORD,DWORD);
357 HPROFILE WINAPI OpenColorProfileW(PPROFILE,DWORD,DWORD,DWORD);
358 #define OpenColorProfile WINELIB_NAME_AW(OpenColorProfile)
359 BOOL WINAPI RegisterCMMA(PCSTR,DWORD,PCSTR);
360 BOOL WINAPI RegisterCMMW(PCWSTR,DWORD,PCWSTR);
361 #define RegisterCMM WINELIB_NAME_AW(RegisterCMM)
362 BOOL WINAPI SelectCMM(DWORD id);
363 BOOL WINAPI SetColorProfileElement(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID);
364 BOOL WINAPI SetColorProfileElementReference(HPROFILE,TAGTYPE,TAGTYPE);
365 BOOL WINAPI SetColorProfileElementSize(HPROFILE,TAGTYPE,DWORD);
366 BOOL WINAPI SetColorProfileHeader(HPROFILE,PPROFILEHEADER);
367 HCOLORSPACE WINAPI SetColorSpace(HDC,HCOLORSPACE);
368 BOOL WINAPI SetStandardColorSpaceProfileA(PCSTR,DWORD,PSTR);
369 BOOL WINAPI SetStandardColorSpaceProfileW(PCWSTR,DWORD,PWSTR);
370 #define SetStandardColorSpaceProfile WINELIB_NAME_AW(SetStandardColorSpaceProfile)
371 BOOL WINAPI SetupColorMatchingA(PCOLORMATCHSETUPA);
372 BOOL WINAPI SetupColorMatchingW(PCOLORMATCHSETUPW);
373 #define SetupColorMatching WINELIB_NAME_AW(SetupColorMatching)
374 BOOL WINAPI SpoolerCopyFileEvent(LPWSTR,LPWSTR,DWORD);
375 BOOL WINAPI TranslateBitmapBits(HTRANSFORM,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PVOID,BMFORMAT,DWORD,PBMCALLBACKFN,ULONG);
376 BOOL WINAPI TranslateColors(HTRANSFORM,PCOLOR,DWORD,COLORTYPE,PCOLOR,COLORTYPE);
377 BOOL WINAPI UninstallColorProfileA(PCSTR,PCSTR,BOOL);
378 BOOL WINAPI UninstallColorProfileW(PCWSTR,PCWSTR,BOOL);
379 #define UninstallColorProfile WINELIB_NAME_AW(UninstallColorProfile)
380 BOOL WINAPI UnregisterCMMA(PCSTR,DWORD);
381 BOOL WINAPI UnregisterCMMW(PCWSTR,DWORD);
382 #define UnregisterCMM WINELIB_NAME_AW(UnregisterCMM)
384 #define PROFILE_FILENAME 1
385 #define PROFILE_MEMBUFFER 2
387 #define PROFILE_READ 1
388 #define PROFILE_READWRITE 2
390 #define SPACE_XYZ 0x58595A20 /* 'XYZ ' */
391 #define SPACE_Lab 0x4C616220 /* 'Lab ' */
392 #define SPACE_Luv 0x4C757620 /* 'Luv ' */
393 #define SPACE_YCbCr 0x59436272 /* 'YCbr' */
394 #define SPACE_Yxy 0x59787920 /* 'Yxy ' */
395 #define SPACE_RGB 0x52474220 /* 'RGB ' */
396 #define SPACE_GRAY 0x47524159 /* 'GRAY' */
397 #define SPACE_HSV 0x48535620 /* 'HSV ' */
398 #define SPACE_HLS 0x484C5320 /* 'HLS ' */
399 #define SPACE_CMYK 0x434D594B /* 'CMYK' */
400 #define SPACE_CMY 0x434D5920 /* 'CMY ' */
402 #ifdef __cplusplus
404 #endif
406 #endif /* __WINE_ICM_H */