icm.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _ICM_H_
  7. #define _ICM_H_
  8. #include <_mingw_unicode.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. typedef char COLOR_NAME[32];
  13. typedef COLOR_NAME *PCOLOR_NAME,*LPCOLOR_NAME;
  14. typedef struct tagNAMED_PROFILE_INFO {
  15. DWORD dwFlags;
  16. DWORD dwCount;
  17. DWORD dwCountDevCoordinates;
  18. COLOR_NAME szPrefix;
  19. COLOR_NAME szSuffix;
  20. } NAMED_PROFILE_INFO;
  21. typedef NAMED_PROFILE_INFO *PNAMED_PROFILE_INFO,*LPNAMED_PROFILE_INFO;
  22. #define MAX_COLOR_CHANNELS 8
  23. struct GRAYCOLOR {
  24. WORD gray;
  25. };
  26. struct RGBCOLOR {
  27. WORD red;
  28. WORD green;
  29. WORD blue;
  30. };
  31. struct CMYKCOLOR {
  32. WORD cyan;
  33. WORD magenta;
  34. WORD yellow;
  35. WORD black;
  36. };
  37. struct XYZCOLOR {
  38. WORD X;
  39. WORD Y;
  40. WORD Z;
  41. };
  42. struct YxyCOLOR {
  43. WORD Y;
  44. WORD x;
  45. WORD y;
  46. };
  47. struct LabCOLOR {
  48. WORD L;
  49. WORD a;
  50. WORD b;
  51. };
  52. struct GENERIC3CHANNEL {
  53. WORD ch1;
  54. WORD ch2;
  55. WORD ch3;
  56. };
  57. struct NAMEDCOLOR {
  58. DWORD dwIndex;
  59. };
  60. struct HiFiCOLOR {
  61. BYTE channel[MAX_COLOR_CHANNELS];
  62. };
  63. typedef union tagCOLOR {
  64. struct GRAYCOLOR gray;
  65. struct RGBCOLOR rgb;
  66. struct CMYKCOLOR cmyk;
  67. struct XYZCOLOR XYZ;
  68. struct YxyCOLOR Yxy;
  69. struct LabCOLOR Lab;
  70. struct GENERIC3CHANNEL gen3ch;
  71. struct NAMEDCOLOR named;
  72. struct HiFiCOLOR hifi;
  73. struct {
  74. DWORD reserved1;
  75. VOID *reserved2;
  76. };
  77. } COLOR;
  78. typedef COLOR *PCOLOR,*LPCOLOR;
  79. typedef enum {
  80. COLOR_GRAY = 1,COLOR_RGB,COLOR_XYZ,COLOR_Yxy,COLOR_Lab,COLOR_3_CHANNEL,COLOR_CMYK,COLOR_5_CHANNEL,COLOR_6_CHANNEL,COLOR_7_CHANNEL,
  81. COLOR_8_CHANNEL,COLOR_NAMED
  82. } COLORTYPE;
  83. typedef COLORTYPE *PCOLORTYPE,*LPCOLORTYPE;
  84. typedef enum {
  85. BM_x555RGB = 0x0000,BM_x555XYZ = 0x0101,BM_x555Yxy,BM_x555Lab,BM_x555G3CH,BM_RGBTRIPLETS = 0x0002,BM_BGRTRIPLETS = 0x0004,BM_XYZTRIPLETS = 0x0201,
  86. BM_YxyTRIPLETS,BM_LabTRIPLETS,BM_G3CHTRIPLETS,BM_5CHANNEL,BM_6CHANNEL,BM_7CHANNEL,BM_8CHANNEL,BM_GRAY,BM_xRGBQUADS = 0x0008,BM_xBGRQUADS = 0x0010,
  87. BM_xG3CHQUADS = 0x0304,BM_KYMCQUADS,BM_CMYKQUADS = 0x0020,BM_10b_RGB = 0x0009,BM_10b_XYZ = 0x0401,BM_10b_Yxy,BM_10b_Lab,BM_10b_G3CH,BM_NAMED_INDEX,
  88. BM_16b_RGB = 0x000A,BM_16b_XYZ = 0x0501,BM_16b_Yxy,BM_16b_Lab,BM_16b_G3CH,BM_16b_GRAY,BM_565RGB = 0x0001
  89. } BMFORMAT;
  90. typedef BMFORMAT *PBMFORMAT,*LPBMFORMAT;
  91. typedef WINBOOL (WINAPI *PBMCALLBACKFN)(ULONG,ULONG,LPARAM);
  92. typedef PBMCALLBACKFN LPBMCALLBACKFN;
  93. typedef struct tagPROFILEHEADER {
  94. DWORD phSize;
  95. DWORD phCMMType;
  96. DWORD phVersion;
  97. DWORD phClass;
  98. DWORD phDataColorSpace;
  99. DWORD phConnectionSpace;
  100. DWORD phDateTime[3];
  101. DWORD phSignature;
  102. DWORD phPlatform;
  103. DWORD phProfileFlags;
  104. DWORD phManufacturer;
  105. DWORD phModel;
  106. DWORD phAttributes[2];
  107. DWORD phRenderingIntent;
  108. CIEXYZ phIlluminant;
  109. DWORD phCreator;
  110. BYTE phReserved[44];
  111. } PROFILEHEADER;
  112. typedef PROFILEHEADER *PPROFILEHEADER,*LPPROFILEHEADER;
  113. #define CLASS_MONITOR 'mntr'
  114. #define CLASS_PRINTER 'prtr'
  115. #define CLASS_SCANNER 'scnr'
  116. #define CLASS_LINK 'link'
  117. #define CLASS_ABSTRACT 'abst'
  118. #define CLASS_COLORSPACE 'spac'
  119. #define CLASS_NAMED 'nmcl'
  120. #define SPACE_XYZ 'XYZ '
  121. #define SPACE_Lab 'Lab '
  122. #define SPACE_Luv 'Luv '
  123. #define SPACE_YCbCr 'YCbr'
  124. #define SPACE_Yxy 'Yxy '
  125. #define SPACE_RGB 'RGB '
  126. #define SPACE_GRAY 'GRAY'
  127. #define SPACE_HSV 'HSV '
  128. #define SPACE_HLS 'HLS '
  129. #define SPACE_CMYK 'CMYK'
  130. #define SPACE_CMY 'CMY '
  131. #define SPACE_2_CHANNEL '2CLR'
  132. #define SPACE_3_CHANNEL '3CLR'
  133. #define SPACE_4_CHANNEL '4CLR'
  134. #define SPACE_5_CHANNEL '5CLR'
  135. #define SPACE_6_CHANNEL '6CLR'
  136. #define SPACE_7_CHANNEL '7CLR'
  137. #define SPACE_8_CHANNEL '8CLR'
  138. #define FLAG_EMBEDDEDPROFILE 0x00000001
  139. #define FLAG_DEPENDENTONDATA 0x00000002
  140. #define ATTRIB_TRANSPARENCY 0x00000001
  141. #define ATTRIB_MATTE 0x00000002
  142. #define INTENT_PERCEPTUAL 0
  143. #define INTENT_RELATIVE_COLORIMETRIC 1
  144. #define INTENT_SATURATION 2
  145. #define INTENT_ABSOLUTE_COLORIMETRIC 3
  146. typedef struct tagPROFILE {
  147. DWORD dwType;
  148. PVOID pProfileData;
  149. DWORD cbDataSize;
  150. } PROFILE;
  151. typedef PROFILE *PPROFILE,*LPPROFILE;
  152. #define PROFILE_FILENAME 1
  153. #define PROFILE_MEMBUFFER 2
  154. #define PROFILE_READ 1
  155. #define PROFILE_READWRITE 2
  156. typedef HANDLE HPROFILE;
  157. typedef HPROFILE *PHPROFILE;
  158. typedef HANDLE HTRANSFORM;
  159. #define INDEX_DONT_CARE 0
  160. #define CMM_FROM_PROFILE INDEX_DONT_CARE
  161. #define CMM_WINDOWS_DEFAULT 'Win '
  162. typedef DWORD TAGTYPE;
  163. typedef TAGTYPE *PTAGTYPE,*LPTAGTYPE;
  164. #define ENUM_TYPE_VERSION 0x0300
  165. typedef struct tagENUMTYPEA {
  166. DWORD dwSize;
  167. DWORD dwVersion;
  168. DWORD dwFields;
  169. PCSTR pDeviceName;
  170. DWORD dwMediaType;
  171. DWORD dwDitheringMode;
  172. DWORD dwResolution[2];
  173. DWORD dwCMMType;
  174. DWORD dwClass;
  175. DWORD dwDataColorSpace;
  176. DWORD dwConnectionSpace;
  177. DWORD dwSignature;
  178. DWORD dwPlatform;
  179. DWORD dwProfileFlags;
  180. DWORD dwManufacturer;
  181. DWORD dwModel;
  182. DWORD dwAttributes[2];
  183. DWORD dwRenderingIntent;
  184. DWORD dwCreator;
  185. DWORD dwDeviceClass;
  186. } ENUMTYPEA,*PENUMTYPEA,*LPENUMTYPEA;
  187. typedef struct tagENUMTYPEW {
  188. DWORD dwSize;
  189. DWORD dwVersion;
  190. DWORD dwFields;
  191. PCWSTR pDeviceName;
  192. DWORD dwMediaType;
  193. DWORD dwDitheringMode;
  194. DWORD dwResolution[2];
  195. DWORD dwCMMType;
  196. DWORD dwClass;
  197. DWORD dwDataColorSpace;
  198. DWORD dwConnectionSpace;
  199. DWORD dwSignature;
  200. DWORD dwPlatform;
  201. DWORD dwProfileFlags;
  202. DWORD dwManufacturer;
  203. DWORD dwModel;
  204. DWORD dwAttributes[2];
  205. DWORD dwRenderingIntent;
  206. DWORD dwCreator;
  207. DWORD dwDeviceClass;
  208. } ENUMTYPEW,*PENUMTYPEW,*LPENUMTYPEW;
  209. #define ET_DEVICENAME 0x00000001
  210. #define ET_MEDIATYPE 0x00000002
  211. #define ET_DITHERMODE 0x00000004
  212. #define ET_RESOLUTION 0x00000008
  213. #define ET_CMMTYPE 0x00000010
  214. #define ET_CLASS 0x00000020
  215. #define ET_DATACOLORSPACE 0x00000040
  216. #define ET_CONNECTIONSPACE 0x00000080
  217. #define ET_SIGNATURE 0x00000100
  218. #define ET_PLATFORM 0x00000200
  219. #define ET_PROFILEFLAGS 0x00000400
  220. #define ET_MANUFACTURER 0x00000800
  221. #define ET_MODEL 0x00001000
  222. #define ET_ATTRIBUTES 0x00002000
  223. #define ET_RENDERINGINTENT 0x00004000
  224. #define ET_CREATOR 0x00008000
  225. #define ET_DEVICECLASS 0x00010000
  226. #define PROOF_MODE 0x00000001
  227. #define NORMAL_MODE 0x00000002
  228. #define BEST_MODE 0x00000003
  229. #define ENABLE_GAMUT_CHECKING 0x00010000
  230. #define USE_RELATIVE_COLORIMETRIC 0x00020000
  231. #define FAST_TRANSLATE 0x00040000
  232. #define RESERVED 0x80000000
  233. #define CSA_A 1
  234. #define CSA_ABC 2
  235. #define CSA_DEF 3
  236. #define CSA_DEFG 4
  237. #define CSA_GRAY 5
  238. #define CSA_RGB 6
  239. #define CSA_CMYK 7
  240. #define CSA_Lab 8
  241. #define CMM_WIN_VERSION 0
  242. #define CMM_IDENT 1
  243. #define CMM_DRIVER_VERSION 2
  244. #define CMM_DLL_VERSION 3
  245. #define CMM_VERSION 4
  246. #define CMM_DESCRIPTION 5
  247. #define CMM_LOGOICON 6
  248. #define CMS_FORWARD 0
  249. #define CMS_BACKWARD 1
  250. #define COLOR_MATCH_VERSION 0x0200
  251. #define CMS_DISABLEICM 1
  252. #define CMS_ENABLEPROOFING 2
  253. #define CMS_SETRENDERINTENT 4
  254. #define CMS_SETPROOFINTENT 8
  255. #define CMS_SETMONITORPROFILE 0x10
  256. #define CMS_SETPRINTERPROFILE 0x20
  257. #define CMS_SETTARGETPROFILE 0x40
  258. #define CMS_USEHOOK 0x80
  259. #define CMS_USEAPPLYCALLBACK 0x100
  260. #define CMS_USEDESCRIPTION 0x200
  261. #define CMS_DISABLEINTENT 0x400
  262. #define CMS_DISABLERENDERINTENT 0x800
  263. #define CMS_MONITOROVERFLOW __MSABI_LONG(0x80000000)
  264. #define CMS_PRINTEROVERFLOW __MSABI_LONG(0x40000000)
  265. #define CMS_TARGETOVERFLOW __MSABI_LONG(0x20000000)
  266. struct _tagCOLORMATCHSETUPW;
  267. struct _tagCOLORMATCHSETUPA;
  268. typedef WINBOOL (WINAPI *PCMSCALLBACKW)(struct _tagCOLORMATCHSETUPW *,LPARAM);
  269. typedef WINBOOL (WINAPI *PCMSCALLBACKA)(struct _tagCOLORMATCHSETUPA *,LPARAM);
  270. typedef struct _tagCOLORMATCHSETUPW {
  271. DWORD dwSize;
  272. DWORD dwVersion;
  273. DWORD dwFlags;
  274. HWND hwndOwner;
  275. PCWSTR pSourceName;
  276. PCWSTR pDisplayName;
  277. PCWSTR pPrinterName;
  278. DWORD dwRenderIntent;
  279. DWORD dwProofingIntent;
  280. PWSTR pMonitorProfile;
  281. DWORD ccMonitorProfile;
  282. PWSTR pPrinterProfile;
  283. DWORD ccPrinterProfile;
  284. PWSTR pTargetProfile;
  285. DWORD ccTargetProfile;
  286. DLGPROC lpfnHook;
  287. LPARAM lParam;
  288. PCMSCALLBACKW lpfnApplyCallback;
  289. LPARAM lParamApplyCallback;
  290. } COLORMATCHSETUPW,*PCOLORMATCHSETUPW,*LPCOLORMATCHSETUPW;
  291. typedef struct _tagCOLORMATCHSETUPA {
  292. DWORD dwSize;
  293. DWORD dwVersion;
  294. DWORD dwFlags;
  295. HWND hwndOwner;
  296. PCSTR pSourceName;
  297. PCSTR pDisplayName;
  298. PCSTR pPrinterName;
  299. DWORD dwRenderIntent;
  300. DWORD dwProofingIntent;
  301. PSTR pMonitorProfile;
  302. DWORD ccMonitorProfile;
  303. PSTR pPrinterProfile;
  304. DWORD ccPrinterProfile;
  305. PSTR pTargetProfile;
  306. DWORD ccTargetProfile;
  307. DLGPROC lpfnHook;
  308. LPARAM lParam;
  309. PCMSCALLBACKA lpfnApplyCallback;
  310. LPARAM lParamApplyCallback;
  311. } COLORMATCHSETUPA,*PCOLORMATCHSETUPA,*LPCOLORMATCHSETUPA;
  312. HPROFILE WINAPI OpenColorProfileA(PPROFILE,DWORD,DWORD,DWORD);
  313. HPROFILE WINAPI OpenColorProfileW(PPROFILE,DWORD,DWORD,DWORD);
  314. WINBOOL WINAPI CloseColorProfile(HPROFILE);
  315. WINBOOL WINAPI GetColorProfileFromHandle(HPROFILE,PBYTE,PDWORD);
  316. WINBOOL WINAPI IsColorProfileValid(HPROFILE,PBOOL);
  317. WINBOOL WINAPI CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA,PBYTE*);
  318. WINBOOL WINAPI CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW,PBYTE*);
  319. WINBOOL WINAPI GetCountColorProfileElements(HPROFILE,PDWORD);
  320. WINBOOL WINAPI GetColorProfileHeader(HPROFILE,PPROFILEHEADER);
  321. WINBOOL WINAPI GetColorProfileElementTag(HPROFILE,DWORD,PTAGTYPE);
  322. WINBOOL WINAPI IsColorProfileTagPresent(HPROFILE,TAGTYPE,PBOOL);
  323. WINBOOL WINAPI GetColorProfileElement(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID,PBOOL);
  324. WINBOOL WINAPI SetColorProfileHeader(HPROFILE,PPROFILEHEADER);
  325. WINBOOL WINAPI SetColorProfileElementSize(HPROFILE,TAGTYPE,DWORD);
  326. WINBOOL WINAPI SetColorProfileElement(HPROFILE,TAGTYPE,DWORD,PDWORD,PVOID);
  327. WINBOOL WINAPI SetColorProfileElementReference(HPROFILE,TAGTYPE,TAGTYPE);
  328. WINBOOL WINAPI GetPS2ColorSpaceArray (HPROFILE,DWORD,DWORD,PBYTE,PDWORD,PBOOL);
  329. WINBOOL WINAPI GetPS2ColorRenderingIntent(HPROFILE,DWORD,PBYTE,PDWORD);
  330. WINBOOL WINAPI GetPS2ColorRenderingDictionary(HPROFILE,DWORD,PBYTE,PDWORD,PBOOL);
  331. WINBOOL WINAPI GetNamedProfileInfo(HPROFILE,PNAMED_PROFILE_INFO);
  332. WINBOOL WINAPI ConvertColorNameToIndex(HPROFILE,PCOLOR_NAME,PDWORD,DWORD);
  333. WINBOOL WINAPI ConvertIndexToColorName(HPROFILE,PDWORD,PCOLOR_NAME,DWORD);
  334. WINBOOL WINAPI CreateDeviceLinkProfile(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,PBYTE*,DWORD);
  335. HTRANSFORM WINAPI CreateColorTransformA(LPLOGCOLORSPACEA,HPROFILE,HPROFILE,DWORD);
  336. HTRANSFORM WINAPI CreateColorTransformW(LPLOGCOLORSPACEW,HPROFILE,HPROFILE,DWORD);
  337. HTRANSFORM WINAPI CreateMultiProfileTransform(PHPROFILE,DWORD,PDWORD,DWORD,DWORD,DWORD);
  338. WINBOOL WINAPI DeleteColorTransform(HTRANSFORM);
  339. WINBOOL WINAPI TranslateBitmapBits(HTRANSFORM,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PVOID,BMFORMAT,DWORD,PBMCALLBACKFN,LPARAM);
  340. WINBOOL WINAPI CheckBitmapBits(HTRANSFORM ,PVOID,BMFORMAT,DWORD,DWORD,DWORD,PBYTE,PBMCALLBACKFN,LPARAM);
  341. WINBOOL WINAPI TranslateColors(HTRANSFORM,PCOLOR,DWORD,COLORTYPE,PCOLOR,COLORTYPE);
  342. WINBOOL WINAPI CheckColors(HTRANSFORM,PCOLOR,DWORD,COLORTYPE,PBYTE);
  343. DWORD WINAPI GetCMMInfo(HTRANSFORM,DWORD);
  344. WINBOOL WINAPI RegisterCMMA(PCSTR,DWORD,PCSTR);
  345. WINBOOL WINAPI RegisterCMMW(PCWSTR,DWORD,PCWSTR);
  346. WINBOOL WINAPI UnregisterCMMA(PCSTR,DWORD);
  347. WINBOOL WINAPI UnregisterCMMW(PCWSTR,DWORD);
  348. WINBOOL WINAPI SelectCMM(DWORD);
  349. WINBOOL WINAPI GetColorDirectoryA(PCSTR pMachineName,PSTR pBuffer,PDWORD pdwSize);
  350. WINBOOL WINAPI GetColorDirectoryW(PCWSTR pMachineName,PWSTR pBuffer,PDWORD pdwSize);
  351. WINBOOL WINAPI InstallColorProfileA(PCSTR,PCSTR);
  352. WINBOOL WINAPI InstallColorProfileW(PCWSTR,PCWSTR);
  353. WINBOOL WINAPI UninstallColorProfileA(PCSTR,PCSTR,WINBOOL);
  354. WINBOOL WINAPI UninstallColorProfileW(PCWSTR,PCWSTR,WINBOOL);
  355. WINBOOL WINAPI EnumColorProfilesA(PCSTR,PENUMTYPEA,PBYTE,PDWORD,PDWORD);
  356. WINBOOL WINAPI EnumColorProfilesW(PCWSTR,PENUMTYPEW,PBYTE,PDWORD,PDWORD);
  357. WINBOOL WINAPI SetStandardColorSpaceProfileA(PCSTR,DWORD,PCSTR);
  358. WINBOOL WINAPI SetStandardColorSpaceProfileW(PCWSTR,DWORD,PCWSTR);
  359. WINBOOL WINAPI GetStandardColorSpaceProfileA(PCSTR pMachineName,DWORD dwSCS,PSTR pBuffer,PDWORD pcbSize);
  360. WINBOOL WINAPI GetStandardColorSpaceProfileW(PCWSTR pMachineName,DWORD dwSCS,PWSTR pBuffer,PDWORD pcbSize);
  361. WINBOOL WINAPI AssociateColorProfileWithDeviceA(PCSTR,PCSTR,PCSTR);
  362. WINBOOL WINAPI AssociateColorProfileWithDeviceW(PCWSTR,PCWSTR,PCWSTR);
  363. WINBOOL WINAPI DisassociateColorProfileFromDeviceA(PCSTR,PCSTR,PCSTR);
  364. WINBOOL WINAPI DisassociateColorProfileFromDeviceW(PCWSTR,PCWSTR,PCWSTR);
  365. WINBOOL WINAPI SetupColorMatchingW(PCOLORMATCHSETUPW pcms);
  366. WINBOOL WINAPI SetupColorMatchingA(PCOLORMATCHSETUPA pcms);
  367. #define ENUMTYPE __MINGW_NAME_AW(ENUMTYPE)
  368. #define PENUMTYPE __MINGW_NAME_AW(PENUMTYPE)
  369. #define COLORMATCHSETUP __MINGW_NAME_AW(COLORMATCHSETUP)
  370. #define PCOLORMATCHSETUP __MINGW_NAME_AW(PCOLORMATCHSETUP)
  371. #define LPCOLORMATCHSETUP __MINGW_NAME_AW(LPCOLORMATCHSETUP)
  372. #define PCMSCALLBACK __MINGW_NAME_AW(PCMSCALLBACK)
  373. #define CreateColorTransform __MINGW_NAME_AW(CreateColorTransform)
  374. #define OpenColorProfile __MINGW_NAME_AW(OpenColorProfile)
  375. #define CreateProfileFromLogColorSpace __MINGW_NAME_AW(CreateProfileFromLogColorSpace)
  376. #define RegisterCMM __MINGW_NAME_AW(RegisterCMM)
  377. #define UnregisterCMM __MINGW_NAME_AW(UnregisterCMM)
  378. #define GetColorDirectory __MINGW_NAME_AW(GetColorDirectory)
  379. #define InstallColorProfile __MINGW_NAME_AW(InstallColorProfile)
  380. #define UninstallColorProfile __MINGW_NAME_AW(UninstallColorProfile)
  381. #define AssociateColorProfileWithDevice __MINGW_NAME_AW(AssociateColorProfileWithDevice)
  382. #define DisassociateColorProfileFromDevice __MINGW_NAME_AW(DisassociateColorProfileFromDevice)
  383. #define EnumColorProfiles __MINGW_NAME_AW(EnumColorProfiles)
  384. #define SetStandardColorSpaceProfile __MINGW_NAME_AW(SetStandardColorSpaceProfile)
  385. #define GetStandardColorSpaceProfile __MINGW_NAME_AW(GetStandardColorSpaceProfile)
  386. #define SetupColorMatching __MINGW_NAME_AW(SetupColorMatching)
  387. typedef HANDLE HCMTRANSFORM;
  388. typedef PVOID LPDEVCHARACTER;
  389. WINBOOL WINAPI CMCheckColors(HCMTRANSFORM hcmTransform,LPCOLOR lpaInputColors,DWORD nColors,COLORTYPE ctInput,LPBYTE lpaResult);
  390. WINBOOL WINAPI CMCheckColorsInGamut(HCMTRANSFORM hcmTransform,RGBTRIPLE *lpaRGBTriple,LPBYTE lpaResult,UINT nCount);
  391. WINBOOL WINAPI CMCheckRGBs(HCMTRANSFORM hcmTransform,LPVOID lpSrcBits,BMFORMAT bmInput,DWORD dwWidth,DWORD dwHeight,DWORD dwStride,LPBYTE lpaResult,PBMCALLBACKFN pfnCallback,LPARAM ulCallbackData);
  392. WINBOOL WINAPI CMConvertColorNameToIndex(HPROFILE hProfile,PCOLOR_NAME paColorName,PDWORD paIndex,DWORD dwCount);
  393. WINBOOL WINAPI CMConvertIndexToColorName(HPROFILE hProfile,PDWORD paIndex,PCOLOR_NAME paColorName,DWORD dwCount);
  394. WINBOOL WINAPI CMCreateDeviceLinkProfile(PHPROFILE pahProfiles,DWORD nProfiles,PDWORD padwIntents,DWORD nIntents,DWORD dwFlags,LPBYTE *lpProfileData);
  395. HCMTRANSFORM WINAPI CMCreateMultiProfileTransform(PHPROFILE pahProfiles,DWORD nProfiles,PDWORD padwIntents,DWORD nIntents,DWORD dwFlags);
  396. WINBOOL WINAPI CMCreateProfile(LPLOGCOLORSPACEA lpColorSpace,LPDEVCHARACTER *lpProfileData);
  397. WINBOOL WINAPI CMCreateProfileW(LPLOGCOLORSPACEW lpColorSpace,LPDEVCHARACTER *lpProfileData);
  398. HCMTRANSFORM WINAPI CMCreateTransform(LPLOGCOLORSPACEA lpColorSpace,LPDEVCHARACTER lpDevCharacter,LPDEVCHARACTER lpTargetDevCharacter);
  399. HCMTRANSFORM WINAPI CMCreateTransformW(LPLOGCOLORSPACEW lpColorSpace,LPDEVCHARACTER lpDevCharacter,LPDEVCHARACTER lpTargetDevCharacter);
  400. HCMTRANSFORM WINAPI CMCreateTransformExt(LPLOGCOLORSPACEA lpColorSpace,LPDEVCHARACTER lpDevCharacter,LPDEVCHARACTER lpTargetDevCharacter,DWORD dwFlags);
  401. HCMTRANSFORM WINAPI CMCreateTransformExtW(LPLOGCOLORSPACEW lpColorSpace,LPDEVCHARACTER lpDevCharacter,LPDEVCHARACTER lpTargetDevCharacter,DWORD dwFlags);
  402. WINBOOL WINAPI CMDeleteTransform(HCMTRANSFORM hcmTransform);
  403. DWORD WINAPI CMGetInfo(DWORD dwInfo);
  404. WINBOOL WINAPI CMGetNamedProfileInfo(HPROFILE hProfile,PNAMED_PROFILE_INFO pNamedProfileInfo);
  405. WINBOOL WINAPI CMGetPS2ColorRenderingDictionary(HPROFILE hProfile,DWORD dwIntent,LPBYTE lpBuffer,LPDWORD lpcbSize,LPBOOL lpbBinary);
  406. WINBOOL WINAPI CMGetPS2ColorRenderingIntent(HPROFILE hProfile,DWORD dwIntent,LPBYTE lpBuffer,LPDWORD lpcbSize);
  407. WINBOOL WINAPI CMGetPS2ColorSpaceArray(HPROFILE hProfile,DWORD dwIntent,DWORD dwCSAType,LPBYTE lpBuffer,LPDWORD lpcbSize,LPBOOL lpbBinary);
  408. WINBOOL WINAPI CMIsProfileValid(HPROFILE hProfile,LPBOOL lpbValid);
  409. WINBOOL WINAPI CMTranslateColors(HCMTRANSFORM hcmTransform,LPCOLOR lpaInputColors,DWORD nColors,COLORTYPE ctInput,LPCOLOR lpaOutputColors,COLORTYPE ctOutput);
  410. WINBOOL WINAPI CMTranslateRGB(HCMTRANSFORM hcmTransform,COLORREF ColorRef,LPCOLORREF lpColorRef,DWORD dwFlags);
  411. WINBOOL WINAPI CMTranslateRGBs(HCMTRANSFORM hcmTransform,LPVOID lpSrcBits,BMFORMAT bmInput,DWORD dwWidth,DWORD dwHeight,DWORD dwStride,LPVOID lpDestBits,BMFORMAT bmOutput,DWORD dwTranslateDirection);
  412. WINBOOL WINAPI CMTranslateRGBsExt(HCMTRANSFORM hcmTransform,LPVOID lpSrcBits,BMFORMAT bmInput,DWORD dwWidth,DWORD dwHeight,DWORD dwInputStride,LPVOID lpDestBits,BMFORMAT bmOutput,DWORD dwOutputStride,LPBMCALLBACKFN lpfnCallback,LPARAM ulCallbackData);
  413. #if (_WIN32_WINNT >= 0x0600)
  414. typedef enum tagCOLORDATATYPE {
  415. COLOR_BYTE = 1,
  416. COLOR_WORD,
  417. COLOR_FLOAT,
  418. COLOR_S2DOT13FIXED,
  419. COLOR_10b_R10G10B10A2,
  420. COLOR_10b_R10G10B10A2_XR
  421. } COLORDATATYPE, *PCOLORDATATYPE, *LPCOLORDATATYPE;
  422. #define INTENT_PERCEPTUAL 0
  423. #define INTENT_RELATIVE_COLORIMETRIC 1
  424. #define INTENT_SATURATION 2
  425. #define INTENT_ABSOLUTE_COLORIMETRIC 3
  426. typedef enum tagCOLORPROFILESUBTYPE {
  427. CPST_PERCEPTUAL = INTENT_PERCEPTUAL,
  428. CPST_RELATIVE_COLORIMETRIC = INTENT_RELATIVE_COLORIMETRIC,
  429. CPST_SATURATION = INTENT_SATURATION,
  430. CPST_ABSOLUTE_COLORIMETRIC = INTENT_ABSOLUTE_COLORIMETRIC,
  431. CPST_NONE,
  432. CPST_RGB_WORKING_SPACE,
  433. CPST_CUSTOM_WORKING_SPACE
  434. } COLORPROFILESUBTYPE, *PCOLORPROFILESUBTYPE, *LPCOLORPROFILESUBTYPE;
  435. typedef enum tagCOLORPROFILETYPE {
  436. CPT_ICC = 0,
  437. CPT_DMP = 1,
  438. CPT_CAMP = 2,
  439. CPT_GMMP = 3
  440. } COLORPROFILETYPE, *PCOLORPROFILETYPE, *LPCOLORPROFILETYPE;
  441. typedef enum tagWCS_PROFILE_MANAGEMENT_SCOPE {
  442. WCS_PROFILE_MANAGEMENT_SCOPE_SYSTEM_WIDE = 0,
  443. WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER
  444. } WCS_PROFILE_MANAGEMENT_SCOPE;
  445. WINBOOL WINAPI WcsAssociateColorProfileWithDevice(
  446. WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,
  447. PCWSTR pProfileName,
  448. PCWSTR pDeviceName
  449. );
  450. WINBOOL WINAPI WcsCheckColors(
  451. HTRANSFORM hColorTransform,
  452. DWORD nColors,
  453. DWORD nInputChannels,
  454. COLORDATATYPE cdtInput,
  455. DWORD cbInput,
  456. PVOID pInputData,
  457. PBYTE paResult
  458. );
  459. HPROFILE WINAPI WcsCreateIccProfile(
  460. HPROFILE hWcsProfile,
  461. DWORD dwOptions
  462. );
  463. WINBOOL WINAPI WcsDisassociateColorProfileFromDevice(
  464. WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,
  465. PCWSTR pProfileName,
  466. PCWSTR pDeviceName
  467. );
  468. WINBOOL WINAPI WcsEnumColorProfiles(
  469. WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,
  470. PENUMTYPEW pEnumRecord,
  471. PBYTE pBuffer,
  472. DWORD dwSize,
  473. PDWORD pnProfiles
  474. );
  475. WINBOOL WINAPI WcsEnumColorProfilesSize(
  476. WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,
  477. PENUMTYPEW pEnumRecord,
  478. PDWORD pdwSize
  479. );
  480. WINBOOL WINAPI WcsGetDefaultColorProfile(
  481. WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,
  482. PCWSTR pDeviceName,
  483. COLORPROFILETYPE cptColorProfileType,
  484. COLORPROFILESUBTYPE cpstColorProfileSubType,
  485. DWORD dwProfileID,
  486. DWORD cbProfileName,
  487. LPWSTR pProfileName
  488. );
  489. WINBOOL WINAPI WcsGetDefaultColorProfileSize(
  490. WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,
  491. PCWSTR pDeviceName,
  492. COLORPROFILETYPE cptColorProfileType,
  493. COLORPROFILESUBTYPE cpstColorProfileSubType,
  494. DWORD dwProfileID,
  495. PDWORD pcbProfileName
  496. );
  497. WINBOOL WINAPI WcsGetDefaultRenderingIntent(
  498. WCS_PROFILE_MANAGEMENT_SCOPE scope,
  499. PDWORD pdwRenderingIntent
  500. );
  501. WINBOOL WINAPI WcsGetUsePerUserProfiles(
  502. LPCWSTR pDeviceName,
  503. DWORD dwDeviceClass,
  504. WINBOOL *pUsePerUserProfiles
  505. );
  506. #define WcsOpenColorProfile __MINGW_NAME_AW(WcsOpenColorProfile)
  507. HPROFILE WINAPI WcsOpenColorProfileA(
  508. PPROFILE pCDMPProfile,
  509. PPROFILE pCAMPProfile,
  510. PPROFILE pGMMPProfile,
  511. DWORD dwDesiredAccess,
  512. DWORD dwShareMode,
  513. DWORD dwCreationMode,
  514. DWORD dwFlags
  515. );
  516. HPROFILE WINAPI WcsOpenColorProfileW(
  517. PPROFILE pCDMPProfile,
  518. PPROFILE pCAMPProfile,
  519. PPROFILE pGMMPProfile,
  520. DWORD dwDesiredAccess,
  521. DWORD dwShareMode,
  522. DWORD dwCreationMode,
  523. DWORD dwFlags
  524. );
  525. WINBOOL WINAPI WcsSetDefaultColorProfile(
  526. WCS_PROFILE_MANAGEMENT_SCOPE profileManagementScope,
  527. PCWSTR pDeviceName,
  528. COLORPROFILETYPE cptColorProfileType,
  529. COLORPROFILESUBTYPE cpstColorProfileSubType,
  530. DWORD dwProfileID,
  531. LPCWSTR pProfileName
  532. );
  533. WINBOOL WINAPI WcsSetDefaultRenderingIntent(
  534. WCS_PROFILE_MANAGEMENT_SCOPE scope,
  535. DWORD dwRenderingIntent
  536. );
  537. WINBOOL WINAPI WcsSetUsePerUserProfiles(
  538. LPCWSTR pDeviceName,
  539. DWORD dwDeviceClass,
  540. WINBOOL usePerUserProfiles
  541. );
  542. WINBOOL WINAPI WcsTranslateColors(
  543. HTRANSFORM hColorTransform,
  544. DWORD nColors,
  545. DWORD nInputChannels,
  546. COLORDATATYPE cdtInput,
  547. DWORD cbInput,
  548. PVOID pInputData,
  549. DWORD nOutputChannels,
  550. COLORDATATYPE cdtOutput,
  551. DWORD cbOutput,
  552. PVOID pOutputData
  553. );
  554. #endif /*(_WIN32_WINNT >= 0x0600)*/
  555. #ifdef __cplusplus
  556. }
  557. #endif
  558. #endif