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