home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / CMScriptingPlugin.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  5.3 KB  |  173 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        CMScriptingPlugin.p
  3.  
  4.      Contains:    ColorSync Scripting Plugin API
  5.  
  6.      Version:    Technology:    ColorSync 2.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1998 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. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT CMScriptingPlugin;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __CMSCRIPTINGPLUGIN__}
  27. {$SETC __CMSCRIPTINGPLUGIN__ := 1}
  28.  
  29. {$I+}
  30. {$SETC CMScriptingPluginIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __FILES__}
  34. {$I Files.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __CMAPPLICATION__}
  37. {$I CMApplication.p}
  38. {$ENDC}
  39. {$IFC UNDEFINED __CODEFRAGMENTS__}
  40. {$I CodeFragments.p}
  41. {$ENDC}
  42.  
  43.  
  44.  
  45.  
  46. {$PUSH}
  47. {$ALIGN MAC68K}
  48. {$LibExport+}
  49.  
  50.  
  51. CONST
  52.                                                                 {  ColorSync Scripting AppleEvent Errors  }
  53.     cmspInvalidImageFile        = -4220;                        {  Plugin cannot handle this image file type  }
  54.     cmspInvalidImageSpace        = -4221;                        {  Plugin cannot create an image file of this colorspace  }
  55.     cmspInvalidProfileEmbed        = -4222;                        {  Specific invalid profile errors  }
  56.     cmspInvalidProfileSource    = -4223;
  57.     cmspInvalidProfileDest        = -4224;
  58.     cmspInvalidProfileProof        = -4225;
  59.     cmspInvalidProfileLink        = -4226;
  60.  
  61.  
  62. {*** embedFlags field  ***}
  63. { reserved for future use: currently 0 }
  64.  
  65. {*** matchFlags field  ***}
  66.     cmspFavorEmbeddedMask        = $00000001;                    {  if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present }
  67.  
  68.  
  69.  
  70. TYPE
  71. {$IFC TYPED_FUNCTION_POINTERS}
  72.     ValidateImageProcPtr = FUNCTION({CONST}VAR spec: FSSpec): CMError; C;
  73. {$ELSEC}
  74.     ValidateImageProcPtr = ProcPtr;
  75. {$ENDC}
  76.  
  77. {$IFC TYPED_FUNCTION_POINTERS}
  78.     GetImageSpaceProcPtr = FUNCTION({CONST}VAR spec: FSSpec; VAR space: OSType): CMError; C;
  79. {$ELSEC}
  80.     GetImageSpaceProcPtr = ProcPtr;
  81. {$ENDC}
  82.  
  83. {$IFC TYPED_FUNCTION_POINTERS}
  84.     ValidateSpaceProcPtr = FUNCTION({CONST}VAR spec: FSSpec; VAR space: OSType): CMError; C;
  85. {$ELSEC}
  86.     ValidateSpaceProcPtr = ProcPtr;
  87. {$ENDC}
  88.  
  89. {$IFC TYPED_FUNCTION_POINTERS}
  90.     EmbedImageProcPtr = FUNCTION({CONST}VAR specFrom: FSSpec; {CONST}VAR specInto: FSSpec; embedProf: CMProfileRef; embedFlags: UInt32): CMError; C;
  91. {$ELSEC}
  92.     EmbedImageProcPtr = ProcPtr;
  93. {$ENDC}
  94.  
  95. {$IFC TYPED_FUNCTION_POINTERS}
  96.     MatchImageProcPtr = FUNCTION({CONST}VAR specFrom: FSSpec; {CONST}VAR specInto: FSSpec; qual: UInt32; srcIntent: UInt32; srcProf: CMProfileRef; dstProf: CMProfileRef; prfProf: CMProfileRef; matchFlags: UInt32): CMError; C;
  97. {$ELSEC}
  98.     MatchImageProcPtr = ProcPtr;
  99. {$ENDC}
  100.  
  101.     ValidateImageUPP = UniversalProcPtr;
  102.     GetImageSpaceUPP = UniversalProcPtr;
  103.     ValidateSpaceUPP = UniversalProcPtr;
  104.     EmbedImageUPP = UniversalProcPtr;
  105.     MatchImageUPP = UniversalProcPtr;
  106.  
  107. CONST
  108.     uppValidateImageProcInfo = $000000F1;
  109.     uppGetImageSpaceProcInfo = $000003F1;
  110.     uppValidateSpaceProcInfo = $000003F1;
  111.     uppEmbedImageProcInfo = $00003FF1;
  112.     uppMatchImageProcInfo = $003FFFF1;
  113.  
  114. FUNCTION NewValidateImageProc(userRoutine: ValidateImageProcPtr): ValidateImageUPP;
  115.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  116.     INLINE $2E9F;
  117.     {$ENDC}
  118.  
  119. FUNCTION NewGetImageSpaceProc(userRoutine: GetImageSpaceProcPtr): GetImageSpaceUPP;
  120.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  121.     INLINE $2E9F;
  122.     {$ENDC}
  123.  
  124. FUNCTION NewValidateSpaceProc(userRoutine: ValidateSpaceProcPtr): ValidateSpaceUPP;
  125.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  126.     INLINE $2E9F;
  127.     {$ENDC}
  128.  
  129. FUNCTION NewEmbedImageProc(userRoutine: EmbedImageProcPtr): EmbedImageUPP;
  130.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  131.     INLINE $2E9F;
  132.     {$ENDC}
  133.  
  134. FUNCTION NewMatchImageProc(userRoutine: MatchImageProcPtr): MatchImageUPP;
  135.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  136.     INLINE $2E9F;
  137.     {$ENDC}
  138.  
  139. FUNCTION CallValidateImageProc({CONST}VAR spec: FSSpec; userRoutine: ValidateImageUPP): CMError;
  140.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  141.     {To be implemented:  Glue to move parameters into registers.}
  142.     {$ENDC}
  143.  
  144. FUNCTION CallGetImageSpaceProc({CONST}VAR spec: FSSpec; VAR space: OSType; userRoutine: GetImageSpaceUPP): CMError;
  145.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  146.     {To be implemented:  Glue to move parameters into registers.}
  147.     {$ENDC}
  148.  
  149. FUNCTION CallValidateSpaceProc({CONST}VAR spec: FSSpec; VAR space: OSType; userRoutine: ValidateSpaceUPP): CMError;
  150.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  151.     {To be implemented:  Glue to move parameters into registers.}
  152.     {$ENDC}
  153.  
  154. FUNCTION CallEmbedImageProc({CONST}VAR specFrom: FSSpec; {CONST}VAR specInto: FSSpec; embedProf: CMProfileRef; embedFlags: UInt32; userRoutine: EmbedImageUPP): CMError;
  155.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  156.     {To be implemented:  Glue to move parameters into registers.}
  157.     {$ENDC}
  158.  
  159. FUNCTION CallMatchImageProc({CONST}VAR specFrom: FSSpec; {CONST}VAR specInto: FSSpec; qual: UInt32; srcIntent: UInt32; srcProf: CMProfileRef; dstProf: CMProfileRef; prfProf: CMProfileRef; matchFlags: UInt32; userRoutine: MatchImageUPP): CMError;
  160.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  161.     {To be implemented:  Glue to move parameters into registers.}
  162.     {$ENDC}
  163. {$ALIGN RESET}
  164. {$POP}
  165.  
  166. {$SETC UsingIncludes := CMScriptingPluginIncludes}
  167.  
  168. {$ENDC} {__CMSCRIPTINGPLUGIN__}
  169.  
  170. {$IFC NOT UsingIncludes}
  171.  END.
  172. {$ENDC}
  173.