home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / icm.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  23KB  |  680 lines

  1. /*++
  2.  
  3. Copyright (c) 1996 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     icm.h
  8.  
  9. Abstract:
  10.  
  11.     Public header file for Image Color Management
  12.  
  13. Revision History:
  14.  
  15. --*/
  16.  
  17. #ifndef _ICM_H_
  18. #define _ICM_H_
  19.  
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23.  
  24. //
  25. // Support for named color profiles
  26. //
  27.  
  28. typedef char COLOR_NAME[32];
  29. typedef COLOR_NAME *PCOLOR_NAME, *LPCOLOR_NAME;
  30.  
  31. typedef struct tagNAMED_PROFILE_INFO{
  32.     DWORD        dwFlags;
  33.     DWORD        dwCount;
  34.     DWORD        dwCountDevCoordinates;
  35.     COLOR_NAME    szPrefix;
  36.     COLOR_NAME    szSuffix;
  37. }NAMED_PROFILE_INFO;
  38. typedef NAMED_PROFILE_INFO *PNAMED_PROFILE_INFO, *LPNAMED_PROFILE_INFO;
  39.  
  40.  
  41. //
  42. // Color spaces
  43. //
  44. // The following color spaces are supported.
  45. // Gray, RGB, CMYK, XYZ, Yxy, Lab, generic 3 channel color spaces where
  46. // the profiles defines how to interpret the 3 channels, named color spaces
  47. // which can either be indices into the space or have color names, and
  48. // multichannel spaces with 1 byte per channel upto MAX_COLOR_CHANNELS.
  49. //
  50.  
  51. #define MAX_COLOR_CHANNELS  8   // maximum number of HiFi color channels
  52.  
  53. struct GRAYCOLOR {
  54.     WORD    gray;
  55. };
  56.  
  57. struct RGBCOLOR {
  58.     WORD    red;
  59.     WORD    green;
  60.     WORD    blue;
  61. };
  62.  
  63. struct CMYKCOLOR {
  64.     WORD    cyan;
  65.     WORD    magenta;
  66.     WORD    yellow;
  67.     WORD    black;
  68. };
  69.  
  70. struct XYZCOLOR {
  71.     WORD    X;
  72.     WORD    Y;
  73.     WORD    Z;
  74. };
  75.  
  76. struct YxyCOLOR {
  77.     WORD    Y;
  78.     WORD    x;
  79.     WORD    y;
  80. };
  81.  
  82. struct LabCOLOR {
  83.     WORD    L;
  84.     WORD    a;
  85.     WORD    b;
  86. };
  87.  
  88. struct GENERIC3CHANNEL {
  89.     WORD    ch1;
  90.     WORD    ch2;
  91.     WORD    ch3;
  92. };
  93.  
  94. struct NAMEDCOLOR {
  95.     DWORD        dwIndex;
  96. };
  97.  
  98. struct HiFiCOLOR {
  99.     BYTE    channel[MAX_COLOR_CHANNELS];
  100. };
  101.  
  102.  
  103. typedef union tagCOLOR {
  104.     struct GRAYCOLOR        gray;
  105.     struct RGBCOLOR         rgb;
  106.     struct CMYKCOLOR        cmyk;
  107.     struct XYZCOLOR         XYZ;
  108.     struct YxyCOLOR         Yxy;
  109.     struct LabCOLOR         Lab;
  110.     struct GENERIC3CHANNEL  gen3ch;
  111.     struct NAMEDCOLOR       named;
  112.     struct HiFiCOLOR        hifi;
  113. } COLOR;
  114. typedef COLOR *PCOLOR, *LPCOLOR;
  115.  
  116. typedef enum {
  117.     COLOR_GRAY       =   1,
  118.     COLOR_RGB,
  119.     COLOR_XYZ,
  120.     COLOR_Yxy,
  121.     COLOR_Lab,
  122.     COLOR_3_CHANNEL,        // WORD per channel
  123.     COLOR_CMYK,
  124.     COLOR_5_CHANNEL,        // BYTE per channel
  125.     COLOR_6_CHANNEL,        //      - do -
  126.     COLOR_7_CHANNEL,        //      - do -
  127.     COLOR_8_CHANNEL,        //      - do -
  128.     COLOR_NAMED,
  129. } COLORTYPE;
  130. typedef COLORTYPE *PCOLORTYPE, *LPCOLORTYPE;
  131.  
  132. //
  133. // Bitmap formats supported
  134. //
  135.  
  136. typedef enum {
  137.  
  138.     //
  139.     // 16bpp - 5 bits per channel. The most significant bit is ignored.
  140.     //
  141.  
  142.     BM_x555RGB      = 0x0000,
  143.     BM_x555XYZ      = 0x0101,
  144.     BM_x555Yxy,
  145.     BM_x555Lab,
  146.     BM_x555G3CH,
  147.  
  148.     //
  149.     // Packed 8 bits per channel => 8bpp for GRAY and
  150.     // 24bpp for the 3 channel colors, more for hifi channels
  151.     //
  152.  
  153.     BM_RGBTRIPLETS  = 0x0002,
  154.     BM_BGRTRIPLETS  = 0x0004,
  155.     BM_XYZTRIPLETS  = 0x0201,
  156.     BM_YxyTRIPLETS,
  157.     BM_LabTRIPLETS,
  158.     BM_G3CHTRIPLETS,
  159.     BM_5CHANNEL,
  160.     BM_6CHANNEL,
  161.     BM_7CHANNEL,
  162.     BM_8CHANNEL,
  163.     BM_GRAY,
  164.  
  165.     //
  166.     // 32bpp - 8 bits per channel. The most significant byte is ignored
  167.     // for the 3 channel colors.
  168.     //
  169.  
  170.     BM_xRGBQUADS    = 0x0008,
  171.     BM_xBGRQUADS    = 0x0010,
  172.     BM_xXYZQUADS    = 0x0301,
  173.     BM_xYxyQUADS,
  174.     BM_xLabQUADS,
  175.     BM_xG3CHQUADS,
  176.     BM_KYMCQUADS,
  177.     BM_CMYKQUADS    = 0x0020,
  178.  
  179.     //
  180.     // 32bpp - 10 bits per channel. The 2 most significant bits are ignored.
  181.     //
  182.  
  183.     BM_10b_RGB      = 0x0009,
  184.     BM_10b_XYZ      = 0x0401,
  185.     BM_10b_Yxy,
  186.     BM_10b_Lab,
  187.     BM_10b_G3CH,
  188.  
  189.     //
  190.     // 32bpp - named color indices (1-based)
  191.     //
  192.  
  193.     BM_NAMED_INDEX,
  194.  
  195.     //
  196.     // Packed 16 bits per channel => 16bpp for GRAY and
  197.     // 48bpp for the 3 channel colors.
  198.     //
  199.  
  200.     BM_16b_RGB      = 0x000A,
  201.     BM_16b_XYZ      = 0x0501,
  202.     BM_16b_Yxy,
  203.     BM_16b_Lab,
  204.     BM_16b_G3CH,
  205.     BM_16b_GRAY,
  206.  
  207.     //
  208.     // 16 bpp - 5 bits for Red & Blue, 6 bits for Green
  209.     //
  210.  
  211.     BM_565RGB       = 0x0001,
  212.  
  213. } BMFORMAT;
  214. typedef BMFORMAT *PBMFORMAT, *LPBMFORMAT;
  215.  
  216. //
  217. // Callback function definition
  218. //
  219.  
  220. typedef BOOL (WINAPI *PBMCALLBACKFN)(ULONG, ULONG, ULONG);
  221. typedef PBMCALLBACKFN LPBMCALLBACKFN;
  222.  
  223. //
  224. // ICC profile header
  225. //
  226.  
  227. typedef struct tagPROFILEHEADER {
  228.     DWORD   phSize;             // profile size in bytes
  229.     DWORD   phCMMType;          // CMM for this profile
  230.     DWORD   phVersion;          // profile format version number
  231.     DWORD   phClass;            // type of profile
  232.     DWORD   phDataColorSpace;   // color space of data
  233.     DWORD   phConnectionSpace;  // PCS
  234.     DWORD   phDateTime[3];      // date profile was created
  235.     DWORD   phSignature;        // magic number
  236.     DWORD   phPlatform;         // primary platform
  237.     DWORD   phProfileFlags;     // various bit settings
  238.     DWORD   phManufacturer;     // device manufacturer
  239.     DWORD   phModel;            // device model number
  240.     DWORD   phAttributes[2];    // device attributes
  241.     DWORD   phRenderingIntent;  // rendering intent
  242.     CIEXYZ  phIlluminant;       // profile illuminant
  243.     DWORD   phCreator;          // profile creator
  244.     BYTE    phReserved[44];     // reserved for future use
  245. } PROFILEHEADER;
  246. typedef PROFILEHEADER *PPROFILEHEADER, *LPPROFILEHEADER;
  247.  
  248. //
  249. // Profile class values
  250. //
  251.  
  252. #define CLASS_MONITOR           'mntr'
  253. #define CLASS_PRINTER           'prtr'
  254. #define CLASS_SCANNER           'scnr'
  255. #define CLASS_LINK              'link'
  256. #define CLASS_ABSTRACT          'abst'
  257. #define CLASS_COLORSPACE        'spac'
  258. #define CLASS_NAMED             'nmcl'
  259.  
  260. //
  261. // Color space values
  262. //
  263.  
  264. #define SPACE_XYZ               'XYZ '
  265. #define SPACE_Lab               'Lab '
  266. #define SPACE_Luv               'Luv '
  267. #define SPACE_YCbCr             'YCbr'
  268. #define SPACE_Yxy               'Yxy '
  269. #define SPACE_RGB               'RGB '
  270. #define SPACE_GRAY              'GRAY'
  271. #define SPACE_HSV               'HSV '
  272. #define SPACE_HLS               'HLS '
  273. #define SPACE_CMYK              'CMYK'
  274. #define SPACE_CMY               'CMY '
  275.  
  276. //
  277. // Profile flag bitfield values
  278. //
  279.  
  280. #define FLAG_EMBEDDEDPROFILE    0x00000001
  281. #define FLAG_DEPENDENTONDATA    0x00000002
  282.  
  283. //
  284. // Profile attributes bitfield values
  285. //
  286.  
  287. #define ATTRIB_TRANSPARENCY     0x00000001
  288. #define ATTRIB_MATTE            0x00000002
  289.  
  290. //
  291. // Rendering Intents
  292. //
  293.  
  294. #define INTENT_PERCEPTUAL               0
  295. #define INTENT_RELATIVE_COLORIMETRIC    1
  296. #define INTENT_SATURATION               2
  297. #define INTENT_ABSOLUTE_COLORIMETRIC    3
  298.  
  299. //
  300. // Profile data structure
  301. //
  302.  
  303. typedef struct tagPROFILE {
  304.     DWORD   dwType;             // profile type
  305.     PVOID   pProfileData;       // filename or buffer containing profile
  306.     DWORD   cbDataSize;         // size of profile data
  307. } PROFILE;
  308. typedef PROFILE *PPROFILE, *LPPROFILE;
  309.  
  310.  
  311. //
  312. // Profile types to be used in the PROFILE structure
  313. //
  314.  
  315. #define PROFILE_FILENAME    1   // profile data is NULL terminated filename
  316. #define PROFILE_MEMBUFFER   2   // profile data is a buffer containing
  317.                                 // the profile
  318. //
  319. // Desired access mode for opening profiles
  320. //
  321.  
  322. #define PROFILE_READ        1   // opened for read access
  323. #define PROFILE_READWRITE   2   // opened for read and write access
  324.  
  325. //
  326. // Handles returned to applications
  327. //
  328.  
  329. typedef HANDLE HPROFILE;        // handle to profile object
  330. typedef HPROFILE *PHPROFILE;
  331. typedef HANDLE HTRANSFORM;      // handle to color transform object
  332.  
  333. //
  334. // Use built-in CMM selection in CreateMultiProfileTransform
  335. //
  336.  
  337. #define INDEX_DONT_CARE     0
  338.  
  339. //
  340. // Tags found in ICC profiles
  341. //
  342.  
  343. typedef DWORD      TAGTYPE;
  344. typedef TAGTYPE   *PTAGTYPE, *LPTAGTYPE;
  345.  
  346. //
  347. // Profile enumeration data structure
  348. //
  349.  
  350. #define ENUM_TYPE_VERSION    0x0200
  351.  
  352. typedef struct tagENUMTYPEA {
  353.     DWORD   dwSize;             // structure size
  354.     DWORD   dwVersion;          // structure version
  355.     DWORD   dwFields;           // bit fields
  356.     PCSTR   pDeviceName;        // device friendly name
  357.     DWORD   dwMediaType;        // media type
  358.     DWORD   dwDitheringMode;    // dithering mode
  359.     DWORD   dwResolution[2];    // x and y resolutions
  360.     DWORD   dwCMMType;          // cmm ID
  361.     DWORD   dwClass;            // profile class
  362.     DWORD   dwDataColorSpace;   // color space of data
  363.     DWORD   dwConnectionSpace;  // pcs
  364.     DWORD   dwSignature;        // magic number
  365.     DWORD   dwPlatform;         // primary platform
  366.     DWORD   dwProfileFlags;     // various bit settings in profile
  367.     DWORD   dwManufacturer;     // manufacturer ID
  368.     DWORD   dwModel;            // model ID
  369.     DWORD   dwAttributes[2];    // device attributes
  370.     DWORD   dwRenderingIntent;  // rendering intent
  371.     DWORD   dwCreator;          // profile creator
  372. } ENUMTYPEA, *PENUMTYPEA, *LPENUMTYPEA;
  373.  
  374.  
  375. typedef struct tagENUMTYPEW {
  376.     DWORD   dwSize;             // structure size
  377.     DWORD   dwVersion;          // structure version
  378.     DWORD   dwFields;           // bit fields
  379.     PCWSTR  pDeviceName;        // device friendly name
  380.     DWORD   dwMediaType;        // media type
  381.     DWORD   dwDitheringMode;    // dithering mode
  382.     DWORD   dwResolution[2];    // x and y resolutions
  383.     DWORD   dwCMMType;          // cmm ID
  384.     DWORD   dwClass;            // profile class
  385.     DWORD   dwDataColorSpace;   // color space of data
  386.     DWORD   dwConnectionSpace;  // pcs
  387.     DWORD   dwSignature;        // magic number
  388.     DWORD   dwPlatform;         // primary platform
  389.     DWORD   dwProfileFlags;     // various bit settings in profile
  390.     DWORD   dwManufacturer;     // manufacturer ID
  391.     DWORD   dwModel;            // model ID
  392.     DWORD   dwAttributes[2];    // device attributes
  393.     DWORD   dwRenderingIntent;  // rendering intent
  394.     DWORD   dwCreator;          // profile creator
  395. } ENUMTYPEW, *PENUMTYPEW, *LPENUMTYPEW;
  396.  
  397. //
  398. // Bitfields for enumeration record above
  399. //
  400.  
  401. #define ET_DEVICENAME           0x00000001
  402. #define ET_MEDIATYPE            0x00000002
  403. #define ET_DITHERMODE           0x00000004
  404. #define ET_RESOLUTION           0x00000008
  405. #define ET_CMMTYPE              0x00000010
  406. #define ET_CLASS                0x00000020
  407. #define ET_DATACOLORSPACE       0x00000040
  408. #define ET_CONNECTIONSPACE      0x00000080
  409. #define ET_SIGNATURE            0x00000100
  410. #define ET_PLATFORM             0x00000200
  411. #define ET_PROFILEFLAGS         0x00000400
  412. #define ET_MANUFACTURER         0x00000800
  413. #define ET_MODEL                0x00001000
  414. #define ET_ATTRIBUTES           0x00002000
  415. #define ET_RENDERINGINTENT      0x00004000
  416. #define ET_CREATOR              0x00008000
  417.  
  418. //
  419. // Flags for creating color transforms
  420. //
  421.  
  422. #define PROOF_MODE                  0x00000001
  423. #define NORMAL_MODE                 0x00000002
  424. #define BEST_MODE                   0x00000003
  425. #define ENABLE_GAMUT_CHECKING       0x00010000
  426. #define USE_RELATIVE_COLORIMETRIC   0x00020000
  427. #define FAST_TRANSLATE              0x00040000
  428. #define RESERVED                    0x80000000
  429.  
  430. //
  431. // Paremeter for GetPS2ColorSpaceArray
  432. //
  433.  
  434. #define CSA_A                   1
  435. #define CSA_ABC                 2
  436. #define CSA_DEF                 3
  437. #define CSA_DEFG                4
  438. #define CSA_GRAY                5
  439. #define CSA_RGB                 6
  440. #define CSA_CMYK                7
  441. #define CSA_Lab                 8
  442.  
  443. //
  444. // Parameter for CMGetInfo()
  445. //
  446.  
  447. #define CMM_WIN_VERSION     0
  448. #define CMM_IDENT           1
  449. #define CMM_DRIVER_VERSION  2
  450. #define CMM_DLL_VERSION     3
  451. #define CMM_VERSION         4
  452. #define CMM_DESCRIPTION     5
  453. #define CMM_LOGOICON        6
  454.  
  455. //
  456. // Parameter for CMTranslateRGBs()
  457. //
  458.  
  459. #define CMS_FORWARD         0
  460. #define CMS_BACKWARD        1
  461.  
  462. //
  463. //  Constants for SetupColorMatching()
  464. //
  465.  
  466. #define COLOR_MATCH_VERSION  0x0200
  467.  
  468. //
  469. //  Constants for flags
  470. //
  471.  
  472. #define CMS_DISABLEICM          1       //  Disable color matching
  473. #define CMS_ENABLEPROOFING      2       //  Enable proofing
  474.  
  475. #define CMS_SETRENDERINTENT     4       //  Use passed in value
  476. #define CMS_SETPROOFINTENT      8
  477. #define CMS_SETMONITORPROFILE   0x10    //  Use passed in profile name initially
  478. #define CMS_SETPRINTERPROFILE   0x20
  479. #define CMS_SETTARGETPROFILE    0x40
  480.  
  481. #define CMS_USEHOOK             0x80    //  Use hook procedure in lpfnHook
  482. #define CMS_USEAPPLYCALLBACK    0x100   //  Use callback procedure when applied
  483.  
  484. //
  485. //  Used to denote too-small buffers (output only)
  486. //
  487.  
  488. #define CMS_MONITOROVERFLOW     0x80000000L
  489. #define CMS_PRINTEROVERFLOW     0x40000000L
  490. #define CMS_TARGETOVERFLOW      0x20000000L
  491.  
  492. //
  493. //  Structures (both ANSI and Unicode)
  494. //
  495. struct _tagCOLORMATCHSETUPW;
  496. struct _tagCOLORMATCHSETUPA;
  497.  
  498. typedef BOOL (WINAPI *PCMSCALLBACKW)(struct _tagCOLORMATCHSETUPW *,LPARAM);
  499. typedef BOOL (WINAPI *PCMSCALLBACKA)(struct _tagCOLORMATCHSETUPA *,LPARAM);
  500.  
  501. typedef struct _tagCOLORMATCHSETUPW {
  502.  
  503.     DWORD   dwSize;                 //  Size of structure in bytes
  504.     DWORD   dwVersion;              //  Set to COLOR_MATCH_VERSION
  505.  
  506.     DWORD   dwFlags;                //  See constants listed previously
  507.     HWND    hwndOwner;              //  Window handle of owner
  508.  
  509.     PCWSTR  pSourceName;            //  Name of Image Source, defaults to "sRGB Color Space"
  510.     PCWSTR  pDisplayName;           //  If null, defaults to first enumerated monitor
  511.     PCWSTR  pPrinterName;           //  If null, defaults to default printer.
  512.  
  513.     DWORD   dwRenderIntent;         //  Rendering Intent
  514.     DWORD   dwProofingIntent;       //  Rendering Intent for Proofing
  515.  
  516.     PWSTR   pMonitorProfile;        //  Monitor profile name
  517.     DWORD   ccMonitorProfile;       //  Size of above in characters
  518.  
  519.     PWSTR   pPrinterProfile;        //  Printer profile name
  520.     DWORD   ccPrinterProfile;       //  Size of above in characters
  521.  
  522.     PWSTR   pTargetProfile;         //  Target profile name
  523.     DWORD   ccTargetProfile;        //  Size of above in characters
  524.  
  525.     DLGPROC lpfnHook;               //  Hook Procedure address
  526.     LPARAM  lParam;                 //  Given to hook procedure at WM_INITDIALOG
  527.  
  528.     PCMSCALLBACKW lpfnApplyCallback;   //  Callback Procedure address when apply is pushed
  529.     LPARAM        lParamApplyCallback; //  Given to callback Procedure for apply
  530.  
  531. }   COLORMATCHSETUPW, *PCOLORMATCHSETUPW, *LPCOLORMATCHSETUPW;
  532.  
  533. typedef struct _tagCOLORMATCHSETUPA {
  534.  
  535.     DWORD   dwSize;                 //  Size of structure in bytes
  536.     DWORD   dwVersion;              //  Set to COLOR_MATCH_VERSION
  537.  
  538.     DWORD   dwFlags;                //  See constants listed previously
  539.     HWND    hwndOwner;              //  Window handle of owner
  540.  
  541.     PCSTR   pSourceName;            //  Name of Image Source, defaults to  "This Document"
  542.     PCSTR   pDisplayName;           //  If null, defaults to first enumerated monitor
  543.     PCSTR   pPrinterName;           //  If null, defaults to default printer.
  544.  
  545.     DWORD   dwRenderIntent;         //  Rendering Intent
  546.     DWORD   dwProofingIntent;       //  Rendering Intent for Proofing
  547.  
  548.     PSTR    pMonitorProfile;        //  Monitor profile name
  549.     DWORD   ccMonitorProfile;       //  Size of above in characters
  550.  
  551.     PSTR    pPrinterProfile;        //  Printer profile name
  552.     DWORD   ccPrinterProfile;       //  Size of above in characters
  553.  
  554.     PSTR    pTargetProfile;         //  Target profile name
  555.     DWORD   ccTargetProfile;        //  Size of above in characters
  556.  
  557.     DLGPROC lpfnHook;               //  Hook Procedure address
  558.     LPARAM  lParam;                 //  Given to hook procedure at WM_INITDIALOG
  559.  
  560.     PCMSCALLBACKA lpfnApplyCallback;   //  Callback Procedure address when apply is pushed
  561.     LPARAM        lParamApplyCallback; //  Given to callback Procedure for apply
  562.  
  563. }   COLORMATCHSETUPA, *PCOLORMATCHSETUPA, *LPCOLORMATCHSETUPA;
  564.  
  565. //
  566. // Windows API definitions
  567. //
  568.  
  569. HPROFILE   WINAPI OpenColorProfileA(PPROFILE, DWORD, DWORD, DWORD);
  570. HPROFILE   WINAPI OpenColorProfileW(PPROFILE, DWORD, DWORD, DWORD);
  571. BOOL       WINAPI CloseColorProfile(HPROFILE);
  572. BOOL       WINAPI GetColorProfileFromHandle(HPROFILE, PBYTE, PDWORD);
  573. BOOL       WINAPI IsColorProfileValid(HPROFILE, PBOOL);
  574. BOOL       WINAPI CreateProfileFromLogColorSpaceA(LPLOGCOLORSPACEA, PBYTE*);
  575. BOOL       WINAPI CreateProfileFromLogColorSpaceW(LPLOGCOLORSPACEW, PBYTE*);
  576. BOOL       WINAPI GetCountColorProfileElements(HPROFILE, PDWORD);
  577. BOOL       WINAPI GetColorProfileHeader(HPROFILE, PPROFILEHEADER);
  578. BOOL       WINAPI GetColorProfileElementTag(HPROFILE, DWORD, PTAGTYPE);
  579. BOOL       WINAPI IsColorProfileTagPresent(HPROFILE, TAGTYPE, PBOOL);
  580. BOOL       WINAPI GetColorProfileElement(HPROFILE, TAGTYPE, DWORD, PDWORD, PVOID, PBOOL);
  581. BOOL       WINAPI SetColorProfileHeader(HPROFILE, PPROFILEHEADER);
  582. BOOL       WINAPI SetColorProfileElementSize(HPROFILE, TAGTYPE, DWORD);
  583. BOOL       WINAPI SetColorProfileElement(HPROFILE, TAGTYPE, DWORD, PDWORD, PVOID);
  584. BOOL       WINAPI SetColorProfileElementReference(HPROFILE, TAGTYPE, TAGTYPE);
  585. BOOL       WINAPI GetPS2ColorSpaceArray (HPROFILE, DWORD, DWORD, PBYTE, PDWORD, PBOOL);
  586. BOOL       WINAPI GetPS2ColorRenderingIntent(HPROFILE, DWORD, PBYTE, PDWORD);
  587. BOOL       WINAPI GetPS2ColorRenderingDictionary(HPROFILE, DWORD, PBYTE, PDWORD, PBOOL);
  588. BOOL       WINAPI GetNamedProfileInfo(HPROFILE, PNAMED_PROFILE_INFO);
  589. BOOL       WINAPI ConvertColorNameToIndex(HPROFILE, PCOLOR_NAME, PDWORD, DWORD);
  590. BOOL       WINAPI ConvertIndexToColorName(HPROFILE, PDWORD, PCOLOR_NAME, DWORD);
  591. BOOL       WINAPI CreateDeviceLinkProfile(PHPROFILE, DWORD, PDWORD, DWORD, DWORD, PBYTE*, DWORD);
  592. HTRANSFORM WINAPI CreateColorTransformA(LPLOGCOLORSPACEA, HPROFILE, HPROFILE, DWORD);
  593. HTRANSFORM WINAPI CreateColorTransformW(LPLOGCOLORSPACEW, HPROFILE, HPROFILE, DWORD);
  594. HTRANSFORM WINAPI CreateMultiProfileTransform(PHPROFILE, DWORD, PDWORD, DWORD, DWORD, DWORD);
  595. BOOL       WINAPI DeleteColorTransform(HTRANSFORM);
  596. BOOL       WINAPI TranslateBitmapBits(HTRANSFORM, PVOID, BMFORMAT, DWORD, DWORD, DWORD, PVOID, BMFORMAT, DWORD, PBMCALLBACKFN, ULONG);
  597. BOOL       WINAPI CheckBitmapBits(HTRANSFORM , PVOID, BMFORMAT, DWORD, DWORD, DWORD, PBYTE, PBMCALLBACKFN, ULONG);
  598. BOOL       WINAPI TranslateColors(HTRANSFORM, PCOLOR, DWORD, COLORTYPE, PCOLOR, COLORTYPE);
  599. BOOL       WINAPI CheckColors(HTRANSFORM, PCOLOR, DWORD, COLORTYPE, PBYTE);
  600. DWORD      WINAPI GetCMMInfo(HTRANSFORM, DWORD);
  601. BOOL       WINAPI RegisterCMMA(PCSTR, DWORD, PCSTR);
  602. BOOL       WINAPI RegisterCMMW(PCWSTR, DWORD, PCWSTR);
  603. BOOL       WINAPI UnregisterCMMA(PCSTR, DWORD);
  604. BOOL       WINAPI UnregisterCMMW(PCWSTR, DWORD);
  605. BOOL       WINAPI SelectCMM(DWORD);
  606. BOOL       WINAPI GetColorDirectoryA(PCSTR, PSTR, PDWORD);
  607. BOOL       WINAPI GetColorDirectoryW(PCWSTR, PWSTR, PDWORD);
  608. BOOL       WINAPI InstallColorProfileA(PCSTR, PCSTR);
  609. BOOL       WINAPI InstallColorProfileW(PCWSTR, PCWSTR);
  610. BOOL       WINAPI UninstallColorProfileA(PCSTR, PCSTR, BOOL);
  611. BOOL       WINAPI UninstallColorProfileW(PCWSTR, PCWSTR, BOOL);
  612. BOOL       WINAPI EnumColorProfilesA(PCSTR, PENUMTYPEA, PBYTE, PDWORD, PDWORD);
  613. BOOL       WINAPI EnumColorProfilesW(PCWSTR, PENUMTYPEW, PBYTE, PDWORD, PDWORD);
  614. BOOL       WINAPI SetStandardColorSpaceProfileA(PCSTR, DWORD, PCSTR);
  615. BOOL       WINAPI SetStandardColorSpaceProfileW(PCWSTR, DWORD, PCWSTR);
  616. BOOL       WINAPI GetStandardColorSpaceProfileA(PCSTR, DWORD, PSTR, PDWORD);
  617. BOOL       WINAPI GetStandardColorSpaceProfileW(PCWSTR, DWORD, PWSTR, PDWORD);
  618. BOOL       WINAPI AssociateColorProfileWithDeviceA(PCSTR, PCSTR, PCSTR);
  619. BOOL       WINAPI AssociateColorProfileWithDeviceW(PCWSTR, PCWSTR, PCWSTR);
  620. BOOL       WINAPI DisassociateColorProfileFromDeviceA(PCSTR, PCSTR, PCSTR);
  621. BOOL       WINAPI DisassociateColorProfileFromDeviceW(PCWSTR, PCWSTR, PCWSTR);
  622. BOOL       WINAPI SetupColorMatchingW(PCOLORMATCHSETUPW pcms);
  623. BOOL       WINAPI SetupColorMatchingA(PCOLORMATCHSETUPA pcms);
  624.  
  625.  
  626. #ifdef UNICODE
  627.  
  628. #define ENUMTYPE                            ENUMTYPEW
  629. #define PENUMTYPE                           PENUMTYPEW
  630. #define COLORMATCHSETUP                     COLORMATCHSETUPW
  631. #define PCOLORMATCHSETUP                    PCOLORMATCHSETUPW
  632. #define LPCOLORMATCHSETUP                   LPCOLORMATCHSETUPW
  633. #define PCMSCALLBACK                        PCMSCALLBACKW
  634. #define CreateColorTransform                CreateColorTransformW
  635. #define OpenColorProfile                    OpenColorProfileW
  636. #define CreateProfileFromLogColorSpace      CreateProfileFromLogColorSpaceW
  637. #define RegisterCMM                         RegisterCMMW
  638. #define UnregisterCMM                       UnregisterCMMW
  639. #define GetColorDirectory                   GetColorDirectoryW
  640. #define InstallColorProfile                 InstallColorProfileW
  641. #define UninstallColorProfile               UninstallColorProfileW
  642. #define AssociateColorProfileWithDevice     AssociateColorProfileWithDeviceW
  643. #define DisassociateColorProfileFromDevice  DisassociateColorProfileFromDeviceW
  644. #define EnumColorProfiles                   EnumColorProfilesW
  645. #define SetStandardColorSpaceProfile        SetStandardColorSpaceProfileW
  646. #define GetStandardColorSpaceProfile        GetStandardColorSpaceProfileW
  647. #define SetupColorMatching                  SetupColorMatchingW
  648.  
  649. #else
  650.  
  651. #define ENUMTYPE                            ENUMTYPEA
  652. #define PENUMTYPE                           PENUMTYPEA
  653. #define COLORMATCHSETUP                     COLORMATCHSETUPA
  654. #define PCOLORMATCHSETUP                    PCOLORMATCHSETUPA
  655. #define LPCOLORMATCHSETUP                   LPCOLORMATCHSETUPA
  656. #define PCMSCALLBACK                        PCMSCALLBACKA
  657. #define CreateColorTransform                CreateColorTransformA
  658. #define OpenColorProfile                    OpenColorProfileA
  659. #define CreateProfileFromLogColorSpace      CreateProfileFromLogColorSpaceA
  660. #define RegisterCMM                         RegisterCMMA
  661. #define UnregisterCMM                       UnregisterCMMA
  662. #define GetColorDirectory                   GetColorDirectoryA
  663. #define InstallColorProfile                 InstallColorProfileA
  664. #define UninstallColorProfile               UninstallColorProfileA
  665. #define AssociateColorProfileWithDevice     AssociateColorProfileWithDeviceA
  666. #define DisassociateColorProfileFromDevice  DisassociateColorProfileFromDeviceA
  667. #define EnumColorProfiles                   EnumColorProfilesA
  668. #define SetStandardColorSpaceProfile        SetStandardColorSpaceProfileA
  669. #define GetStandardColorSpaceProfile        GetStandardColorSpaceProfileA
  670. #define SetupColorMatching                  SetupColorMatchingA
  671.  
  672. #endif  // !UNICODE
  673.  
  674. #ifdef __cplusplus
  675. }
  676. #endif
  677.  
  678. #endif  // ifndef _ICM_H_
  679.  
  680.