Beginnings of an MSCMS implementation based on LittleCMS.
[wine] / include / icm.h
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_ICM_H
20 #define __WINE_ICM_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 typedef HANDLE HPROFILE;
27 typedef HPROFILE *PHPROFILE;
28 typedef HANDLE HTRANSFORM;
29
30 typedef DWORD TAGTYPE, *PTAGTYPE, *LPTAGTYPE;
31
32 typedef enum {
33     BM_x555RGB     = 0x00,
34     BM_565RGB      = 0x01,
35     BM_RGBTRIPLETS = 0x02,
36     BM_BGRTRIPLETS = 0x04,
37     BM_xRGBQUADS   = 0x08,
38     BM_10b_RGB     = 0x09,
39     BM_16b_RGB     = 0x0a,
40     BM_xBGRQUADS   = 0x10,
41     BM_CMYKQUADS   = 0x20,
42     BM_x555XYZ     = 0x101,
43     BM_x555Yxz,
44     BM_x555Lab,
45     BM_x555G3CH,
46     BM_XYZTRIPLETS = 0x201,
47     BM_YxyTRIPLETS,
48     BM_LabTRIPLETS,
49     BM_G3CHTRIPLETS,
50     BM_5CHANNEL,
51     BM_6CHANNEL,
52     BM_7CHANNEL,
53     BM_8CHANNEL,
54     BM_GRAY,
55     BM_xXYZQUADS   = 0x301,
56     BM_xYxyQUADS,
57     BM_xLabQUADS,
58     BM_xG3CHQUADS,
59     BM_KYMCQUADS,
60     BM_10b_XYZ     = 0x401,
61     BM_10b_Yxy,
62     BM_10b_Lab,
63     BM_10b_G3CH,
64     BM_NAMED_INDEX,
65     BM_16b_XYZ     = 0x501,
66     BM_16b_Yxy,
67     BM_16b_Lab,
68     BM_16b_G3CH,
69     BM_16b_GRAY,
70 } BMFORMAT, *PBMFORMAT, *LPBMFORMAT;
71
72 typedef BOOL (CALLBACK *PBMCALLBACKFN)(ULONG,ULONG,LPARAM);
73 typedef PBMCALLBACKFN LPPBMCALLBACKFN;
74
75 typedef struct tagPROFILEHEADER {
76     DWORD phSize;
77     DWORD phCMMType;
78     DWORD phVersion;
79     DWORD phClass;
80     DWORD phDataColorSpace;
81     DWORD phConnectionSpace;
82     DWORD phDateTime[3];
83     DWORD phSignature;
84     DWORD phPlatform;
85     DWORD phProfileFlags;
86     DWORD phManufacturer;
87     DWORD phModel;
88     DWORD phAttributes;
89     DWORD phRenderingIntent;
90     CIEXYZ phIlluminant;
91     DWORD phCreator;
92     BYTE phReserved[44];
93 } PROFILEHEADER, *PPROFILEHEADER, *LPPROFILEHEADER;
94
95 typedef struct tagPROFILE {
96     DWORD dwType;
97     PVOID pProfileData;
98     DWORD cbDataSize;
99 } PROFILE, *PPROFILE, *LPPROFILE;
100
101 HPROFILE   WINAPI OpenColorProfileA(PPROFILE,DWORD,DWORD,DWORD);
102 HPROFILE   WINAPI OpenColorProfileW(PPROFILE,DWORD,DWORD,DWORD);
103 #define    OpenColorProfile WINELIB_NAME_AW(OpenColorProfile)
104 BOOL       WINAPI CloseColorProfile(HPROFILE);
105
106 #define PROFILE_FILENAME    1
107 #define PROFILE_MEMBUFFER   2
108
109 #ifdef __cplusplus
110 }
111 #endif
112
113 #endif /* __WINE_ICM_H */