CMMComponent.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:19k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       CMMComponent.h
  3.  
  4.      Contains:   ColorSync CMM Component API
  5.  
  6.      Version:    Technology: ColorSync 2.6
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1994-2001 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __CMMCOMPONENT__
  18. #define __CMMCOMPONENT__
  19. #ifndef __QUICKDRAW__
  20. #include "Quickdraw.h"
  21. #endif
  22. #ifndef __COMPONENTS__
  23. #include "Components.h"
  24. #endif
  25. #ifndef __CMAPPLICATION__
  26. #include "CMApplication.h"
  27. #endif
  28. #if PRAGMA_ONCE
  29. #pragma once
  30. #endif
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. #if PRAGMA_IMPORT
  35. #pragma import on
  36. #endif
  37. #if PRAGMA_STRUCT_ALIGN
  38.     #pragma options align=mac68k
  39. #elif PRAGMA_STRUCT_PACKPUSH
  40.     #pragma pack(push, 2)
  41. #elif PRAGMA_STRUCT_PACK
  42.     #pragma pack(2)
  43. #endif
  44. enum {
  45.     CMMInterfaceVersion         = 1
  46. };
  47. /* Component function selectors */
  48. enum {
  49.                                                                 /* Required */
  50.     kNCMMInit                   = 6,
  51.     kCMMMatchColors             = 1,
  52.     kCMMCheckColors             = 2,
  53.                                                                 /* Optional */
  54.     kCMMValidateProfile         = 8,
  55.     kCMMMatchBitmap             = 9,
  56.     kCMMCheckBitmap             = 10,
  57.     kCMMMatchPixMap             = 3,
  58.     kCMMCheckPixMap             = 4,
  59.     kCMMConcatenateProfiles     = 5,
  60.     kCMMConcatInit              = 7,
  61.     kCMMNewLinkProfile          = 16,
  62.     kNCMMConcatInit             = 18,
  63.     kNCMMNewLinkProfile         = 19,
  64.     kCMMGetPS2ColorSpace        = 11,
  65.     kCMMGetPS2ColorRenderingIntent = 12,
  66.     kCMMGetPS2ColorRendering    = 13,
  67.     kCMMGetPS2ColorRenderingVMSize = 17,
  68.                                                                 /* obsolete with ColorSync 2.5 */
  69.     kCMMFlattenProfile          = 14,
  70.     kCMMUnflattenProfile        = 15,
  71.                                                                 /* obsolete with ColorSync 2.6 */
  72.     kCMMInit                    = 0,
  73.     kCMMGetNamedColorInfo       = 70,
  74.     kCMMGetNamedColorValue      = 71,
  75.     kCMMGetIndNamedColorValue   = 72,
  76.     kCMMGetNamedColorIndex      = 73,
  77.     kCMMGetNamedColorName       = 74
  78. };
  79. #if TARGET_API_MAC_OS8
  80. typedef ComponentInstance               CMMComponentInst;
  81. #if CALL_NOT_IN_CARBON
  82. EXTERN_API( CMError )
  83. NCMMInit                        (CMMComponentInst       cmm,
  84.                                  CMProfileRef           srcProfile,
  85.                                  CMProfileRef           dstProfile)                         FIVEWORDINLINE(0x2F3C, 0x0008, 0x0006, 0x7000, 0xA82A);
  86. EXTERN_API( CMError )
  87. CMMInit                         (CMMComponentInst       cmm,
  88.                                  CMProfileHandle        srcProfile,
  89.                                  CMProfileHandle        dstProfile)                         FIVEWORDINLINE(0x2F3C, 0x0008, 0x0000, 0x7000, 0xA82A);
  90. EXTERN_API( CMError )
  91. CMMMatchColors                  (CMMComponentInst       cmm,
  92.                                  CMColor *              colors,
  93.                                  UInt32                 count)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  94. EXTERN_API( CMError )
  95. CMMCheckColors                  (CMMComponentInst       cmm,
  96.                                  CMColor *              colors,
  97.                                  UInt32                 count,
  98.                                  UInt32 *               result)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x0002, 0x7000, 0xA82A);
  99. EXTERN_API( CMError )
  100. CMMValidateProfile              (CMMComponentInst       cmm,
  101.                                  CMProfileRef           prof,
  102.                                  Boolean *              valid)                              FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  103. EXTERN_API( CMError )
  104. CMMFlattenProfile               (CMMComponentInst       cmm,
  105.                                  CMProfileRef           prof,
  106.                                  UInt32                 flags,
  107.                                  CMFlattenUPP           proc,
  108.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x000E, 0x7000, 0xA82A);
  109. EXTERN_API( CMError )
  110. CMMUnflattenProfile             (CMMComponentInst       cmm,
  111.                                  FSSpec *               resultFileSpec,
  112.                                  CMFlattenUPP           proc,
  113.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x000F, 0x7000, 0xA82A);
  114. EXTERN_API( CMError )
  115. CMMMatchBitmap                  (CMMComponentInst       cmm,
  116.                                  CMBitmap *             bitmap,
  117.                                  CMBitmapCallBackUPP    progressProc,
  118.                                  void *                 refCon,
  119.                                  CMBitmap *             matchedBitmap)                      FIVEWORDINLINE(0x2F3C, 0x0010, 0x0009, 0x7000, 0xA82A);
  120. EXTERN_API( CMError )
  121. CMMCheckBitmap                  (CMMComponentInst       cmm,
  122.                                  const CMBitmap *       bitmap,
  123.                                  CMBitmapCallBackUPP    progressProc,
  124.                                  void *                 refCon,
  125.                                  CMBitmap *             resultBitmap)                       FIVEWORDINLINE(0x2F3C, 0x0010, 0x000A, 0x7000, 0xA82A);
  126. EXTERN_API( CMError )
  127. CMMMatchPixMap                  (CMMComponentInst       cmm,
  128.                                  PixMap *               pixMap,
  129.                                  CMBitmapCallBackUPP    progressProc,
  130.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x0003, 0x7000, 0xA82A);
  131. EXTERN_API( CMError )
  132. CMMCheckPixMap                  (CMMComponentInst       cmm,
  133.                                  const PixMap *         pixMap,
  134.                                  CMBitmapCallBackUPP    progressProc,
  135.                                  BitMap *               bitMap,
  136.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x0004, 0x7000, 0xA82A);
  137. EXTERN_API( CMError )
  138. CMMConcatInit                   (CMMComponentInst       cmm,
  139.                                  CMConcatProfileSet *   profileSet)                         FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  140. EXTERN_API( CMError )
  141. NCMMConcatInit                  (CMMComponentInst       cmm,
  142.                                  NCMConcatProfileSet *  profileSet,
  143.                                  CMConcatCallBackUPP    proc,
  144.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x0012, 0x7000, 0xA82A);
  145. EXTERN_API( CMError )
  146. CMMNewLinkProfile               (CMMComponentInst       cmm,
  147.                                  CMProfileRef *         prof,
  148.                                  const CMProfileLocation * targetLocation,
  149.                                  CMConcatProfileSet *   profileSet)                         FIVEWORDINLINE(0x2F3C, 0x000C, 0x0010, 0x7000, 0xA82A);
  150. EXTERN_API( CMError )
  151. NCMMNewLinkProfile              (CMMComponentInst       cmm,
  152.                                  CMProfileRef           prof,
  153.                                  NCMConcatProfileSet *  profileSet,
  154.                                  CMConcatCallBackUPP    proc,
  155.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x0013, 0x7000, 0xA82A);
  156. EXTERN_API( CMError )
  157. CMMGetPS2ColorSpace             (CMMComponentInst       cmm,
  158.                                  CMProfileRef           srcProf,
  159.                                  UInt32                 flags,
  160.                                  CMFlattenUPP           proc,
  161.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x000B, 0x7000, 0xA82A);
  162. EXTERN_API( CMError )
  163. CMMGetPS2ColorRenderingIntent   (CMMComponentInst       cmm,
  164.                                  CMProfileRef           srcProf,
  165.                                  UInt32                 flags,
  166.                                  CMFlattenUPP           proc,
  167.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0010, 0x000C, 0x7000, 0xA82A);
  168. EXTERN_API( CMError )
  169. CMMGetPS2ColorRendering         (CMMComponentInst       cmm,
  170.                                  CMProfileRef           srcProf,
  171.                                  CMProfileRef           dstProf,
  172.                                  UInt32                 flags,
  173.                                  CMFlattenUPP           proc,
  174.                                  void *                 refCon)                             FIVEWORDINLINE(0x2F3C, 0x0014, 0x000D, 0x7000, 0xA82A);
  175. EXTERN_API( CMError )
  176. CMMGetPS2ColorRenderingVMSize   (CMMComponentInst       cmm,
  177.                                  CMProfileRef           srcProf,
  178.                                  CMProfileRef           dstProf,
  179.                                  UInt32 *               vmSize)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x0011, 0x7000, 0xA82A);
  180. EXTERN_API( CMError )
  181. CMMConcatenateProfiles          (CMMComponentInst       cmm,
  182.                                  CMProfileHandle        thru,
  183.                                  CMProfileHandle        dst,
  184.                                  CMProfileHandle *      newDst)                             FIVEWORDINLINE(0x2F3C, 0x000C, 0x0005, 0x7000, 0xA82A);
  185. EXTERN_API( CMError )
  186. CMMGetNamedColorInfo            (CMMComponentInst       cmm,
  187.                                  CMProfileRef           srcProf,
  188.                                  UInt32 *               deviceChannels,
  189.                                  OSType *               deviceColorSpace,
  190.                                  OSType *               PCSColorSpace,
  191.                                  UInt32 *               count,
  192.                                  StringPtr              prefix,
  193.                                  StringPtr              suffix)                             FIVEWORDINLINE(0x2F3C, 0x001C, 0x0046, 0x7000, 0xA82A);
  194. EXTERN_API( CMError )
  195. CMMGetNamedColorValue           (CMMComponentInst       cmm,
  196.                                  CMProfileRef           prof,
  197.                                  StringPtr              name,
  198.                                  CMColor *              deviceColor,
  199.                                  CMColor *              PCSColor)                           FIVEWORDINLINE(0x2F3C, 0x0010, 0x0047, 0x7000, 0xA82A);
  200. EXTERN_API( CMError )
  201. CMMGetIndNamedColorValue        (CMMComponentInst       cmm,
  202.                                  CMProfileRef           prof,
  203.                                  UInt32                 index,
  204.                                  CMColor *              deviceColor,
  205.                                  CMColor *              PCSColor)                           FIVEWORDINLINE(0x2F3C, 0x0010, 0x0048, 0x7000, 0xA82A);
  206. EXTERN_API( CMError )
  207. CMMGetNamedColorIndex           (CMMComponentInst       cmm,
  208.                                  CMProfileRef           prof,
  209.                                  StringPtr              name,
  210.                                  UInt32 *               index)                              FIVEWORDINLINE(0x2F3C, 0x000C, 0x0049, 0x7000, 0xA82A);
  211. EXTERN_API( CMError )
  212. CMMGetNamedColorName            (CMMComponentInst       cmm,
  213.                                  CMProfileRef           prof,
  214.                                  UInt32                 index,
  215.                                  StringPtr              name)                               FIVEWORDINLINE(0x2F3C, 0x000C, 0x004A, 0x7000, 0xA82A);
  216. #endif  /* CALL_NOT_IN_CARBON */
  217. #if OLDROUTINENAMES
  218. #define NCMInit(cmm, srcProfile, dstProfile)    NCMMInit(cmm, srcProfile, dstProfile)
  219. #define CMInit(cmm, srcProfile, dstProfile) CMMInit(cmm, srcProfile, dstProfile)
  220. #define CMMatchColors(cmm, colors, count)       CMMMatchColors(cmm, colors, count)
  221. #define CMCheckColors(cmm, colors, count, result)   CMMCheckColors(cmm, colors, count, result)
  222. #define CMMatchBitmap(cmm, bitmap, progressProc, refCon, matchedBitmap) CMMMatchBitmap(cmm, bitmap, progressProc, refCon, matchedBitmap)
  223. #define CMCheckBitmap(cmm, bitmap, progressProc, refCon, resultBitmap)  CMMCheckBitmap(cmm, bitmap, progressProc, refCon, resultBitmap)
  224. #define CMMatchPixMap(cmm, pixMap, progressProc, refCon)    CMMMatchPixMap(cmm, pixMap, progressProc, refCon)
  225. #define CMCheckPixMap(cmm, pixMap, progressProc, bitMap, refCon)    CMMCheckPixMap(cmm, pixMap, progressProc, bitMap, refCon)
  226. #define CMConcatInit(cmm, profileSet)   CMMConcatInit(cmm, profileSet)
  227. #define CMConcatenateProfiles(cmm, thru, dst, newDst) CMMConcatenateProfiles(cmm, thru, dst, newDst)
  228. #define CMNewLinkProfile(cmm, prof, targetLocation, profileSet) CMMNewLinkProfile(cmm, prof, targetLocation, profileSet)
  229. #endif  /* OLDROUTINENAMES */
  230. #else
  231. #if CALL_NOT_IN_CARBON
  232. EXTERN_API( CMError )
  233. CMMOpen                         (UInt32 *               cmmStorage,
  234.                                  void *                 hInstance);
  235. EXTERN_API( CMError )
  236. CMMClose                        (UInt32 *               cmmStorage);
  237. EXTERN_API( CMError )
  238. CMMGetCMMInfo                   (UInt32 *               cmmStorage,
  239.                                  CMMInfo *              info);
  240. EXTERN_API( CMError )
  241. NCMMInit                        (UInt32 *               cmmStorage,
  242.                                  CMProfileRef           srcProfile,
  243.                                  CMProfileRef           dstProfile);
  244. EXTERN_API( CMError )
  245. CMMMatchColors                  (UInt32 *               cmmStorage,
  246.                                  CMColor *              colors,
  247.                                  UInt32                 count);
  248. EXTERN_API( CMError )
  249. CMMCheckColors                  (UInt32 *               cmmStorage,
  250.                                  CMColor *              colors,
  251.                                  UInt32                 count,
  252.                                  UInt32 *               result);
  253. EXTERN_API( CMError )
  254. CMMValidateProfile              (UInt32 *               cmmStorage,
  255.                                  CMProfileRef           prof,
  256.                                  Boolean *              valid);
  257. EXTERN_API( CMError )
  258. CMMMatchBitmap                  (UInt32 *               cmmStorage,
  259.                                  CMBitmap *             bitmap,
  260.                                  CMBitmapCallBackUPP    progressProc,
  261.                                  void *                 refCon,
  262.                                  CMBitmap *             matchedBitmap);
  263. EXTERN_API( CMError )
  264. CMMCheckBitmap                  (UInt32 *               cmmStorage,
  265.                                  const CMBitmap *       bitmap,
  266.                                  CMBitmapCallBackUPP    progressProc,
  267.                                  void *                 refCon,
  268.                                  CMBitmap *             resultBitmap);
  269. EXTERN_API( CMError )
  270. CMMMatchPixMap                  (UInt32 *               cmmStorage,
  271.                                  PixMap *               pixMap,
  272.                                  CMBitmapCallBackUPP    progressProc,
  273.                                  void *                 refCon);
  274. EXTERN_API( CMError )
  275. CMMCheckPixMap                  (UInt32 *               cmmStorage,
  276.                                  const PixMap *         pixMap,
  277.                                  CMBitmapCallBackUPP    progressProc,
  278.                                  BitMap *               bitMap,
  279.                                  void *                 refCon);
  280. EXTERN_API( CMError )
  281. CMMConcatInit                   (UInt32 *               cmmStorage,
  282.                                  CMConcatProfileSet *   profileSet);
  283. EXTERN_API( CMError )
  284. NCMMConcatInit                  (UInt32 *               cmmStorage,
  285.                                  NCMConcatProfileSet *  profileSet,
  286.                                  CMConcatCallBackUPP    proc,
  287.                                  void *                 refCon);
  288. EXTERN_API( CMError )
  289. CMMNewLinkProfile               (UInt32 *               cmmStorage,
  290.                                  CMProfileRef *         prof,
  291.                                  const CMProfileLocation * targetLocation,
  292.                                  CMConcatProfileSet *   profileSet);
  293. EXTERN_API( CMError )
  294. NCMMNewLinkProfile              (UInt32 *               cmmStorage,
  295.                                  CMProfileRef           prof,
  296.                                  NCMConcatProfileSet *  profileSet,
  297.                                  CMConcatCallBackUPP    proc,
  298.                                  void *                 refCon);
  299. EXTERN_API( CMError )
  300. CMMGetPS2ColorSpace             (UInt32 *               cmmStorage,
  301.                                  CMProfileRef           srcProf,
  302.                                  UInt32                 flags,
  303.                                  CMFlattenUPP           proc,
  304.                                  void *                 refCon);
  305. EXTERN_API( CMError )
  306. CMMGetPS2ColorRenderingIntent   (UInt32 *               cmmStorage,
  307.                                  CMProfileRef           srcProf,
  308.                                  UInt32                 flags,
  309.                                  CMFlattenUPP           proc,
  310.                                  void *                 refCon);
  311. EXTERN_API( CMError )
  312. CMMGetPS2ColorRendering         (UInt32 *               cmmStorage,
  313.                                  CMProfileRef           srcProf,
  314.                                  CMProfileRef           dstProf,
  315.                                  UInt32                 flags,
  316.                                  CMFlattenUPP           proc,
  317.                                  void *                 refCon);
  318. EXTERN_API( CMError )
  319. CMMGetPS2ColorRenderingVMSize   (UInt32 *               cmmStorage,
  320.                                  CMProfileRef           srcProf,
  321.                                  CMProfileRef           dstProf,
  322.                                  UInt32 *               vmSize);
  323. #endif  /* CALL_NOT_IN_CARBON */
  324. #endif  /* TARGET_API_MAC_OS8 */
  325. #if PRAGMA_STRUCT_ALIGN
  326.     #pragma options align=reset
  327. #elif PRAGMA_STRUCT_PACKPUSH
  328.     #pragma pack(pop)
  329. #elif PRAGMA_STRUCT_PACK
  330.     #pragma pack()
  331. #endif
  332. #ifdef PRAGMA_IMPORT_OFF
  333. #pragma import off
  334. #elif PRAGMA_IMPORT
  335. #pragma import reset
  336. #endif
  337. #ifdef __cplusplus
  338. }
  339. #endif
  340. #endif /* __CMMCOMPONENT__ */