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

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       CMScriptingPlugin.h
  3.  
  4.      Contains:   ColorSync Scripting Plugin API
  5.  
  6.      Version:    Technology: ColorSync 2.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1998-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 __CMSCRIPTINGPLUGIN__
  18. #define __CMSCRIPTINGPLUGIN__
  19. #ifndef __FILES__
  20. #include "Files.h"
  21. #endif
  22. #ifndef __CMAPPLICATION__
  23. #include "CMApplication.h"
  24. #endif
  25. #ifndef __CODEFRAGMENTS__
  26. #include "CodeFragments.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.                                                                 /* ColorSync Scripting AppleEvent Errors */
  46.     cmspInvalidImageFile        = -4220,                        /* Plugin cannot handle this image file type */
  47.     cmspInvalidImageSpace       = -4221,                        /* Plugin cannot create an image file of this colorspace */
  48.     cmspInvalidProfileEmbed     = -4222,                        /* Specific invalid profile errors */
  49.     cmspInvalidProfileSource    = -4223,
  50.     cmspInvalidProfileDest      = -4224,
  51.     cmspInvalidProfileProof     = -4225,
  52.     cmspInvalidProfileLink      = -4226
  53. };
  54. /**** embedFlags field  ****/
  55. /* reserved for future use: currently 0 */
  56. /**** matchFlags field  ****/
  57. enum {
  58.     cmspFavorEmbeddedMask       = 0x00000001                    /* if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present*/
  59. };
  60. /**** scripting plugin entry points  ****/
  61. typedef CALLBACK_API_C( CMError , ValidateImageProcPtr )(const FSSpec *spec);
  62. typedef CALLBACK_API_C( CMError , GetImageSpaceProcPtr )(const FSSpec *spec, OSType *space);
  63. typedef CALLBACK_API_C( CMError , ValidateSpaceProcPtr )(const FSSpec *spec, OSType *space);
  64. typedef CALLBACK_API_C( CMError , EmbedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, CMProfileRef embedProf, UInt32 embedFlags);
  65. typedef CALLBACK_API_C( CMError , UnembedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto);
  66. typedef CALLBACK_API_C( CMError , MatchImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 qual, UInt32 srcIntent, CMProfileRef srcProf, CMProfileRef dstProf, CMProfileRef prfProf, UInt32 matchFlags);
  67. typedef CALLBACK_API_C( CMError , CountImageProfilesProcPtr )(const FSSpec *spec, UInt32 *count);
  68. typedef CALLBACK_API_C( CMError , GetIndImageProfileProcPtr )(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
  69. typedef CALLBACK_API_C( CMError , SetIndImageProfileProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 index, CMProfileRef prof, UInt32 embedFlags);
  70. /**** CSScriptingLib API  ****/
  71. EXTERN_API_C( CMError )
  72. CMValidImage                    (const FSSpec *         spec);
  73. EXTERN_API_C( CMError )
  74. CMGetImageSpace                 (const FSSpec *         spec,
  75.                                  OSType *               space);
  76. EXTERN_API_C( CMError )
  77. CMEmbedImage                    (const FSSpec *         specFrom,
  78.                                  const FSSpec *         specInto,
  79.                                  Boolean                repl,
  80.                                  CMProfileRef           embProf);
  81. EXTERN_API_C( CMError )
  82. CMUnembedImage                  (const FSSpec *         specFrom,
  83.                                  const FSSpec *         specInto,
  84.                                  Boolean                repl);
  85. EXTERN_API_C( CMError )
  86. CMMatchImage                    (const FSSpec *         specFrom,
  87.                                  const FSSpec *         specInto,
  88.                                  Boolean                repl,
  89.                                  UInt32                 qual,
  90.                                  CMProfileRef           srcProf,
  91.                                  UInt32                 srcIntent,
  92.                                  CMProfileRef           dstProf);
  93. EXTERN_API_C( CMError )
  94. CMProofImage                    (const FSSpec *         specFrom,
  95.                                  const FSSpec *         specInto,
  96.                                  Boolean                repl,
  97.                                  UInt32                 qual,
  98.                                  CMProfileRef           srcProf,
  99.                                  UInt32                 srcIntent,
  100.                                  CMProfileRef           dstProf,
  101.                                  CMProfileRef           prfProf);
  102. EXTERN_API_C( CMError )
  103. CMLinkImage                     (const FSSpec *         specFrom,
  104.                                  const FSSpec *         specInto,
  105.                                  Boolean                repl,
  106.                                  UInt32                 qual,
  107.                                  CMProfileRef           lnkProf,
  108.                                  UInt32                 lnkIntent);
  109. EXTERN_API_C( CMError )
  110. CMCountImageProfiles            (const FSSpec *         spec,
  111.                                  UInt32 *               count);
  112. EXTERN_API_C( CMError )
  113. CMGetIndImageProfile            (const FSSpec *         spec,
  114.                                  UInt32                 index,
  115.                                  CMProfileRef *         prof);
  116. EXTERN_API_C( CMError )
  117. CMSetIndImageProfile            (const FSSpec *         specFrom,
  118.                                  const FSSpec *         specInto,
  119.                                  Boolean                repl,
  120.                                  UInt32                 index,
  121.                                  CMProfileRef           prof);
  122. #if PRAGMA_STRUCT_ALIGN
  123.     #pragma options align=reset
  124. #elif PRAGMA_STRUCT_PACKPUSH
  125.     #pragma pack(pop)
  126. #elif PRAGMA_STRUCT_PACK
  127.     #pragma pack()
  128. #endif
  129. #ifdef PRAGMA_IMPORT_OFF
  130. #pragma import off
  131. #elif PRAGMA_IMPORT
  132. #pragma import reset
  133. #endif
  134. #ifdef __cplusplus
  135. }
  136. #endif
  137. #endif /* __CMSCRIPTINGPLUGIN__ */