VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/Graphics/Wine/include/icm.h@ 19982

Last change on this file since 19982 was 16477, checked in by vboxsync, 16 years ago

LGPL disclaimer by filemuncher

  • Property svn:eol-style set to native
File size: 13.7 KB
Line 
1/*
2 * Copyright 2004 (C) Mike McCormack
3 *
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.
8 *
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.
13 *
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
17 */
18
19/*
20 * Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
21 * other than GPL or LGPL is available it will apply instead, Sun elects to use only
22 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
23 * a choice of LGPL license versions is made available with the language indicating
24 * that LGPLv2 or any later version may be used, or where a choice of which version
25 * of the LGPL is applied is otherwise unspecified.
26 */
27
28#ifndef __WINE_ICM_H
29#define __WINE_ICM_H
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35typedef HANDLE HPROFILE;
36typedef HPROFILE *PHPROFILE;
37typedef HANDLE HTRANSFORM;
38
39typedef DWORD TAGTYPE, *PTAGTYPE, *LPTAGTYPE;
40
41typedef char COLOR_NAME[32];
42typedef COLOR_NAME *PCOLOR_NAME, *LPCOLOR_NAME;
43
44typedef struct tagNAMED_PROFILE_INFO
45{
46 DWORD dwFlags;
47 DWORD dwCount;
48 DWORD dwCountDevCoordinates;
49 COLOR_NAME szPrefix;
50 COLOR_NAME szSuffix;
51} NAMED_PROFILE_INFO, *PNAMED_PROFILE_INFO, *LPNAMED_PROFILE_INFO;
52
53#define MAX_COLOR_CHANNELS 8
54
55struct GRAYCOLOR
56{
57 WORD gray;
58};
59
60struct RGBCOLOR
61{
62 WORD red;
63 WORD green;
64 WORD blue;
65};
66
67struct CMYKCOLOR
68{
69 WORD cyan;
70 WORD magenta;
71 WORD yellow;
72 WORD black;
73};
74
75struct XYZCOLOR
76{
77 WORD X;
78 WORD Y;
79 WORD Z;
80};
81
82struct YxyCOLOR
83{
84 WORD Y;
85 WORD x;
86 WORD y;
87};
88
89struct LabCOLOR
90{
91 WORD L;
92 WORD a;
93 WORD b;
94};
95
96struct GENERIC3CHANNEL
97{
98 WORD ch1;
99 WORD ch2;
100 WORD ch3;
101};
102
103struct NAMEDCOLOR
104{
105 DWORD dwIndex;
106};
107
108struct HiFiCOLOR
109{
110 BYTE channel[MAX_COLOR_CHANNELS];
111};
112
113typedef union tagCOLOR
114{
115 struct GRAYCOLOR gray;
116 struct RGBCOLOR rgb;
117 struct CMYKCOLOR cmyk;
118 struct XYZCOLOR XYZ;
119 struct YxyCOLOR Yxy;
120 struct LabCOLOR Lab;
121 struct GENERIC3CHANNEL gen3ch;
122 struct NAMEDCOLOR named;
123 struct HiFiCOLOR hifi;
124 struct
125 {
126 DWORD reserved1;
127 VOID *reserved2;
128 } DUMMYSTRUCTNAME;
129} COLOR, *PCOLOR, *LPCOLOR;
130
131typedef enum
132{
133 COLOR_GRAY = 1,
134 COLOR_RGB,
135 COLOR_XYZ,
136 COLOR_Yxy,
137 COLOR_Lab,
138 COLOR_3_CHANNEL,
139 COLOR_CMYK,
140 COLOR_5_CHANNEL,
141 COLOR_6_CHANNEL,
142 COLOR_7_CHANNEL,
143 COLOR_8_CHANNEL,
144 COLOR_NAMED,
145} COLORTYPE, *PCOLORTYPE, *LPCOLORTYPE;
146
147typedef enum
148{
149 BM_x555RGB = 0x00,
150 BM_565RGB = 0x01,
151 BM_RGBTRIPLETS = 0x02,
152 BM_BGRTRIPLETS = 0x04,
153 BM_xRGBQUADS = 0x08,
154 BM_10b_RGB = 0x09,
155 BM_16b_RGB = 0x0a,
156 BM_xBGRQUADS = 0x10,
157 BM_CMYKQUADS = 0x20,
158 BM_x555XYZ = 0x101,
159 BM_x555Yxz,
160 BM_x555Lab,
161 BM_x555G3CH,
162 BM_XYZTRIPLETS = 0x201,
163 BM_YxyTRIPLETS,
164 BM_LabTRIPLETS,
165 BM_G3CHTRIPLETS,
166 BM_5CHANNEL,
167 BM_6CHANNEL,
168 BM_7CHANNEL,
169 BM_8CHANNEL,
170 BM_GRAY,
171 BM_xXYZQUADS = 0x301,
172 BM_xYxyQUADS,
173 BM_xLabQUADS,
174 BM_xG3CHQUADS,
175 BM_KYMCQUADS,
176 BM_10b_XYZ = 0x401,
177 BM_10b_Yxy,
178 BM_10b_Lab,
179 BM_10b_G3CH,
180 BM_NAMED_INDEX,
181 BM_16b_XYZ = 0x501,
182 BM_16b_Yxy,
183 BM_16b_Lab,
184 BM_16b_G3CH,
185 BM_16b_GRAY,
186} BMFORMAT, *PBMFORMAT, *LPBMFORMAT;
187
188typedef BOOL (CALLBACK *PBMCALLBACKFN)(ULONG,ULONG,LPARAM);
189typedef PBMCALLBACKFN LPPBMCALLBACKFN;
190
191typedef struct tagPROFILEHEADER
192{
193 DWORD phSize;
194 DWORD phCMMType;
195 DWORD phVersion;
196 DWORD phClass;
197 DWORD phDataColorSpace;
198 DWORD phConnectionSpace;
199 DWORD phDateTime[3];
200 DWORD phSignature;
201 DWORD phPlatform;
202 DWORD phProfileFlags;
203 DWORD phManufacturer;
204 DWORD phModel;
205 DWORD phAttributes[2];
206 DWORD phRenderingIntent;
207 CIEXYZ phIlluminant;
208 DWORD phCreator;
209 BYTE phReserved[44];
210} PROFILEHEADER, *PPROFILEHEADER, *LPPROFILEHEADER;
211
212typedef struct tagPROFILE
213{
214 DWORD dwType;
215 PVOID pProfileData;
216 DWORD cbDataSize;
217} PROFILE, *PPROFILE, *LPPROFILE;
218
219#define ENUM_TYPE_VERSION 0x0300
220
221typedef struct tagENUMTYPEA
222{
223 DWORD dwSize;
224 DWORD dwVersion;
225 DWORD dwFields;
226 PCSTR pDeviceName;
227 DWORD dwMediaType;
228 DWORD dwDitheringMode;
229 DWORD dwResolution[2];
230 DWORD dwCMMType;
231 DWORD dwClass;
232 DWORD dwDataColorSpace;
233 DWORD dwConnectionSpace;
234 DWORD dwSignature;
235 DWORD dwPlatform;
236 DWORD dwProfileFlags;
237 DWORD dwManufacturer;
238 DWORD dwModel;
239 DWORD dwAttributes[2];
240 DWORD dwRenderingIntent;
241 DWORD dwCreator;
242 DWORD dwDeviceClass;
243} ENUMTYPEA, *PENUMTYPEA, *LPENUMTYPEA;
244
245typedef struct tagENUMTYPEW
246{
247 DWORD dwSize;
248 DWORD dwVersion;
249 DWORD dwFields;
250 PCWSTR pDeviceName;
251 DWORD dwMediaType;
252 DWORD dwDitheringMode;
253 DWORD dwResolution[2];
254 DWORD dwCMMType;
255 DWORD dwClass;
256 DWORD dwDataColorSpace;
257 DWORD dwConnectionSpace;
258 DWORD dwSignature;
259 DWORD dwPlatform;
260 DWORD dwProfileFlags;
261 DWORD dwManufacturer;
262 DWORD dwModel;
263 DWORD dwAttributes[2];
264 DWORD dwRenderingIntent;
265 DWORD dwCreator;
266 DWORD dwDeviceClass;
267} ENUMTYPEW, *PENUMTYPEW, *LPENUMTYPEW;
268
269#define ET_DEVICENAME 0x00000001
270#define ET_MEDIATYPE 0x00000002
271#define ET_DITHERMODE 0x00000004
272#define ET_RESOLUTION 0x00000008
273#define ET_CMMTYPE 0x00000010
274#define ET_CLASS 0x00000020
275#define ET_DATACOLORSPACE 0x00000040
276#define ET_CONNECTIONSPACE 0x00000080
277#define ET_SIGNATURE 0x00000100
278#define ET_PLATFORM 0x00000200
279#define ET_PROFILEFLAGS 0x00000400
280#define ET_MANUFACTURER 0x00000800
281#define ET_MODEL 0x00001000
282#define ET_ATTRIBUTES 0x00002000
283#define ET_RENDERINGINTENT 0x00004000
284#define ET_CREATOR 0x00008000
285#define ET_DEVICECLASS 0x00010000
286
287struct _tagCOLORMATCHSETUPA;
288struct _tagCOLORMATCHSETUPW;
289
290typedef BOOL (WINAPI *PCMSCALLBACKA)(struct _tagCOLORMATCHSETUPA*,LPARAM);
291typedef BOOL (WINAPI *PCMSCALLBACKW)(struct _tagCOLORMATCHSETUPW*,LPARAM);
292
293typedef struct _tagCOLORMATCHSETUPA
294{
295 DWORD dwSize;
296 DWORD dwVersion;
297 DWORD dwFlags;
298 HWND hwndOwner;
299 PCSTR pSourceName;
300 PCSTR pDisplayName;
301 PCSTR pPrinterName;
302 DWORD dwRenderIntent;
303 DWORD dwProofingIntent;
304 PSTR pMonitorProfile;
305 DWORD ccMonitorProfile;
306 PSTR pPrinterProfile;
307 DWORD ccPrinterProfile;
308 PSTR pTargetProfile;
309 DWORD ccTargetProfile;
310 DLGPROC lpfnHook;
311 LPARAM lParam;
312 PCMSCALLBACKA lpfnApplyCallback;
313 LPARAM lParamApplyCallback;
314} COLORMATCHSETUPA, *PCOLORMATCHSETUPA, *LPCOLORMATCHSETUPA;
315
316typedef struct _tagCOLORMATCHSETUPW
317{
318 DWORD dwSize;
319 DWORD dwVersion;
320 DWORD dwFlags;
321 HWND hwndOwner;
322 PCWSTR pSourceName;
323 PCWSTR pDisplayName;
324 PCWSTR pPrinterName;
325 DWORD dwRenderIntent;
326 DWORD dwProofingIntent;
327 PWSTR pMonitorProfile;
328 DWORD ccMonitorProfile;
329 PWSTR pPrinterProfile;
330 DWORD ccPrinterProfile;
331 PWSTR pTargetProfile;
332 DWORD ccTargetProfile;
333 DLGPROC lpfnHook;
334 LPARAM lParam;
335 PCMSCALLBACKW lpfnApplyCallback;
336 LPARAM lParamApplyCallback;
337} COLORMATCHSETUPW, *PCOLORMATCHSETUPW, *LPCOLORMATCHSETUPW;
338
339BOOL WINAPI AssociateColorProfileWithDeviceA(PCSTR,PCSTR,PCSTR);
340BOOL WINAPI AssociateColorProfileWithDeviceW(PCWSTR,PCWSTR,PCWSTR);
341#define AssociateColorProfileWithDevice WINELIB_NAME_AW(AssociateColorProfileWithDevice)
342BOOL WINAPI CheckBitmapBits(HTRANSFORM,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PBYTE,PBMCALLBACKFN,LPARAM);
343BOOL WINAPI CheckColors(HTRANSFORM,PCOLOR,DWORD,COLORTYPE,PBYTE);
344BOOL WINAPI ConvertColorNameToIndex(HPROFILE,PCOLOR_NAME,PDWORD,DWORD);
345BOOL WINAPI ConvertIndexToColorName(HPROFILE,PDWORD,PCOLOR_NAME,DWORD);
346BOOL WINAPI CloseColorProfile(HPROFILE);
347HTRANSFORM WINAPI CreateColorTransformA(LPLOGCOLORSPACEA,HPROFILE,HPROFILE,DWORD);
348HTRANSFORM WINAPI CreateColorTransformW(LPLOGCOLORSPACEW,HPROFILE,HPROFILE,DWORD);
349#define CreateColorTransform WINELIB_NAME_AW(CreateColorTransform)
350BOOL WINAPI CreateDeviceLinkProfile(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,PBYTE*,DWORD);
351HTRANSFORM WINAPI CreateMultiProfileTransform(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,DWORD);
352BOOL WINAPI CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA,PBYTE*);
353BOOL WINAPI CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW,PBYTE*);
354#define CreateProfileFromLogColorSpace WINELIB_NAME_AW(CreateProfileFromLogColorSpace)
355BOOL WINAPI DeleteColorTransform(HTRANSFORM);
356BOOL WINAPI DisassociateColorProfileFromDeviceA(PCSTR,PCSTR,PCSTR);
357BOOL WINAPI DisassociateColorProfileFromDeviceW(PCWSTR,PCWSTR,PCWSTR);
358#define DisassociateColorProfileFromDevice WINELIB_NAME_AW(DisassociateColorProfileFromDevice)
359BOOL WINAPI EnumColorProfilesA(PCSTR,PENUMTYPEA,PBYTE,PDWORD,PDWORD);
360BOOL WINAPI EnumColorProfilesW(PCWSTR,PENUMTYPEW,PBYTE,PDWORD,PDWORD);
361#define EnumColorProfiles WINELIB_NAME_AW(EnumColorProfiles)
362DWORD WINAPI GenerateCopyFilePaths(LPCWSTR,LPCWSTR,LPBYTE,DWORD,LPWSTR,LPDWORD,LPWSTR,LPDWORD,DWORD);
363DWORD WINAPI GetCMMInfo(HTRANSFORM,DWORD);
364BOOL WINAPI GetColorDirectoryA(PCSTR,PSTR,PDWORD);
365BOOL WINAPI GetColorDirectoryW(PCWSTR,PWSTR,PDWORD);
366#define GetColorDirectory WINELIB_NAME_AW(GetColorDirectory)
367BOOL WINAPI GetColorProfileElement(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID,PBOOL);
368BOOL WINAPI GetColorProfileElementTag(HPROFILE,DWORD,PTAGTYPE);
369BOOL WINAPI GetColorProfileFromHandle(HPROFILE,PBYTE,PDWORD);
370BOOL WINAPI GetColorProfileHeader(HPROFILE,PPROFILEHEADER);
371BOOL WINAPI GetCountColorProfileElements(HPROFILE,PDWORD);
372BOOL WINAPI GetNamedProfileInfo(HPROFILE,PNAMED_PROFILE_INFO);
373BOOL WINAPI GetPS2ColorRenderingDictionary(HPROFILE,DWORD,PBYTE,PDWORD,PBOOL);
374BOOL WINAPI GetPS2ColorRenderingIntent(HPROFILE,DWORD,PBYTE,PDWORD);
375BOOL WINAPI GetPS2ColorSpaceArray(HPROFILE,DWORD,DWORD,PBYTE,PDWORD,PBOOL);
376BOOL WINAPI GetStandardColorSpaceProfileA(PCSTR,DWORD,PSTR,PDWORD);
377BOOL WINAPI GetStandardColorSpaceProfileW(PCWSTR,DWORD,PWSTR,PDWORD);
378#define GetStandardColorSpaceProfile WINELIB_NAME_AW(GetStandardColorSpaceProfile)
379BOOL WINAPI InstallColorProfileA(PCSTR,PCSTR);
380BOOL WINAPI InstallColorProfileW(PCWSTR,PCWSTR);
381#define InstallColorProfile WINELIB_NAME_AW(InstallColorProfile)
382BOOL WINAPI IsColorProfileTagPresent(HPROFILE,TAGTYPE,PBOOL);
383BOOL WINAPI IsColorProfileValid(HPROFILE,PBOOL);
384HPROFILE WINAPI OpenColorProfileA(PPROFILE,DWORD,DWORD,DWORD);
385HPROFILE WINAPI OpenColorProfileW(PPROFILE,DWORD,DWORD,DWORD);
386#define OpenColorProfile WINELIB_NAME_AW(OpenColorProfile)
387BOOL WINAPI RegisterCMMA(PCSTR,DWORD,PCSTR);
388BOOL WINAPI RegisterCMMW(PCWSTR,DWORD,PCWSTR);
389#define RegisterCMM WINELIB_NAME_AW(RegisterCMM)
390BOOL WINAPI SelectCMM(DWORD id);
391BOOL WINAPI SetColorProfileElement(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID);
392BOOL WINAPI SetColorProfileElementReference(HPROFILE,TAGTYPE,TAGTYPE);
393BOOL WINAPI SetColorProfileElementSize(HPROFILE,TAGTYPE,DWORD);
394BOOL WINAPI SetColorProfileHeader(HPROFILE,PPROFILEHEADER);
395BOOL WINAPI SetStandardColorSpaceProfileA(PCSTR,DWORD,PSTR);
396BOOL WINAPI SetStandardColorSpaceProfileW(PCWSTR,DWORD,PWSTR);
397#define SetStandardColorSpaceProfile WINELIB_NAME_AW(SetStandardColorSpaceProfile)
398BOOL WINAPI SetupColorMatchingA(PCOLORMATCHSETUPA);
399BOOL WINAPI SetupColorMatchingW(PCOLORMATCHSETUPW);
400#define SetupColorMatching WINELIB_NAME_AW(SetupColorMatching)
401BOOL WINAPI SpoolerCopyFileEvent(LPWSTR,LPWSTR,DWORD);
402BOOL WINAPI TranslateBitmapBits(HTRANSFORM,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PVOID,BMFORMAT,DWORD,PBMCALLBACKFN,ULONG);
403BOOL WINAPI TranslateColors(HTRANSFORM,PCOLOR,DWORD,COLORTYPE,PCOLOR,COLORTYPE);
404BOOL WINAPI UninstallColorProfileA(PCSTR,PCSTR,BOOL);
405BOOL WINAPI UninstallColorProfileW(PCWSTR,PCWSTR,BOOL);
406#define UninstallColorProfile WINELIB_NAME_AW(UninstallColorProfile)
407BOOL WINAPI UnregisterCMMA(PCSTR,DWORD);
408BOOL WINAPI UnregisterCMMW(PCWSTR,DWORD);
409#define UnregisterCMM WINELIB_NAME_AW(UnregisterCMM)
410
411#define PROFILE_FILENAME 1
412#define PROFILE_MEMBUFFER 2
413
414#define PROFILE_READ 1
415#define PROFILE_READWRITE 2
416
417#define SPACE_XYZ 0x58595A20 /* 'XYZ ' */
418#define SPACE_Lab 0x4C616220 /* 'Lab ' */
419#define SPACE_Luv 0x4C757620 /* 'Luv ' */
420#define SPACE_YCbCr 0x59436272 /* 'YCbr' */
421#define SPACE_Yxy 0x59787920 /* 'Yxy ' */
422#define SPACE_RGB 0x52474220 /* 'RGB ' */
423#define SPACE_GRAY 0x47524159 /* 'GRAY' */
424#define SPACE_HSV 0x48535620 /* 'HSV ' */
425#define SPACE_HLS 0x484C5320 /* 'HLS ' */
426#define SPACE_CMYK 0x434D594B /* 'CMYK' */
427#define SPACE_CMY 0x434D5920 /* 'CMY ' */
428#define SPACE_2_CHANNEL 0x32434c52 /* '2CLR' */
429#define SPACE_3_CHANNEL 0x33434c52 /* '3CLR' */
430#define SPACE_4_CHANNEL 0x34434c52 /* '4CLR' */
431#define SPACE_5_CHANNEL 0x35434c52 /* '5CLR' */
432#define SPACE_6_CHANNEL 0x36434c52 /* '6CLR' */
433#define SPACE_7_CHANNEL 0x37434c52 /* '7CLR' */
434#define SPACE_8_CHANNEL 0x38434c52 /* '8CLR' */
435
436#ifdef __cplusplus
437}
438#endif
439
440#endif /* __WINE_ICM_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette