Mac OS 9
CMScriptingPlugin.h
Go to the documentation of this file.
1 
19 #ifndef __CMSCRIPTINGPLUGIN__
20 #define __CMSCRIPTINGPLUGIN__
21 
22 #ifndef __FILES__
23 #include <Files.h>
24 #endif
25 
26 #ifndef __CMAPPLICATION__
27 #include <CMApplication.h>
28 #endif
29 
30 #if PRAGMA_ONCE
31 #pragma once
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39 #if PRAGMA_IMPORT
40 #pragma import on
41 #endif
42 
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
46 #pragma pack(push, 2)
47 #elif PRAGMA_STRUCT_PACK
48 #pragma pack(2)
49 #endif
50 
51  enum
52  {
53  /* ColorSync Scripting AppleEvent Errors */
54  cmspInvalidImageFile = -4220, /* Plugin cannot handle this image file type */
55  cmspInvalidImageSpace =
56  -4221, /* Plugin cannot create an image file of this colorspace */
57  cmspInvalidProfileEmbed = -4222, /* Specific invalid profile errors */
58  cmspInvalidProfileSource = -4223,
59  cmspInvalidProfileDest = -4224,
60  cmspInvalidProfileProof = -4225,
61  cmspInvalidProfileLink = -4226
62  };
63 
64  /**** embedFlags field ****/
65  /* reserved for future use: currently 0 */
66 
67  /**** matchFlags field ****/
68  enum
69  {
70  cmspFavorEmbeddedMask =
71  0x00000001 /* if bit 0 is 0 then use srcProf profile, if 1 then use
72  profile embedded in image if present*/
73  };
74 
75  /**** scripting plugin entry points ****/
76  typedef CALLBACK_API_C(CMError, ValidateImageProcPtr)(const FSSpec *spec);
77  typedef CALLBACK_API_C(CMError, GetImageSpaceProcPtr)(const FSSpec *spec,
78  OSType *space);
79  typedef CALLBACK_API_C(CMError, ValidateSpaceProcPtr)(const FSSpec *spec,
80  OSType *space);
81  typedef CALLBACK_API_C(CMError, EmbedImageProcPtr)(const FSSpec *specFrom,
82  const FSSpec *specInto,
83  CMProfileRef embedProf,
84  UInt32 embedFlags);
85  typedef CALLBACK_API_C(CMError, UnembedImageProcPtr)(const FSSpec *specFrom,
86  const FSSpec *specInto);
87  typedef CALLBACK_API_C(CMError, MatchImageProcPtr)(
88  const FSSpec *specFrom, const FSSpec *specInto, UInt32 qual,
89  UInt32 srcIntent, CMProfileRef srcProf, CMProfileRef dstProf,
90  CMProfileRef prfProf, UInt32 matchFlags);
91  typedef CALLBACK_API_C(CMError, CountImageProfilesProcPtr)(const FSSpec *spec,
92  UInt32 *count);
93  typedef CALLBACK_API_C(CMError, GetIndImageProfileProcPtr)(const FSSpec *spec,
94  UInt32 index,
95  CMProfileRef *prof);
96  typedef CALLBACK_API_C(CMError, SetIndImageProfileProcPtr)(
97  const FSSpec *specFrom, const FSSpec *specInto, UInt32 index,
98  CMProfileRef prof, UInt32 embedFlags);
99  /**** CSScriptingLib API ****/
100 
109  CMError
110  CMValidImage(const FSSpec *spec);
111 
120  CMError
121  CMGetImageSpace(const FSSpec *spec, OSType *space);
122 
131  CMError
132  CMEmbedImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl,
133  CMProfileRef embProf);
134 
143  CMError
144  CMUnembedImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl);
145 
154  CMError
155  CMMatchImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl,
156  UInt32 qual, CMProfileRef srcProf, UInt32 srcIntent,
157  CMProfileRef dstProf);
158 
167  CMError
168  CMProofImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl,
169  UInt32 qual, CMProfileRef srcProf, UInt32 srcIntent,
170  CMProfileRef dstProf, CMProfileRef prfProf);
171 
180  CMError
181  CMLinkImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl,
182  UInt32 qual, CMProfileRef lnkProf, UInt32 lnkIntent);
183 
192  CMError
193  CMCountImageProfiles(const FSSpec *spec, UInt32 *count);
194 
203  CMError
204  CMGetIndImageProfile(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
205 
214  CMError
215  CMSetIndImageProfile(const FSSpec *specFrom, const FSSpec *specInto,
216  Boolean repl, UInt32 index, CMProfileRef prof);
217 
218 #if PRAGMA_STRUCT_ALIGN
219 #pragma options align = reset
220 #elif PRAGMA_STRUCT_PACKPUSH
221 #pragma pack(pop)
222 #elif PRAGMA_STRUCT_PACK
223 #pragma pack()
224 #endif
225 
226 #ifdef PRAGMA_IMPORT_OFF
227 #pragma import off
228 #elif PRAGMA_IMPORT
229 #pragma import reset
230 #endif
231 
232 #ifdef __cplusplus
233 }
234 #endif
235 
236 #endif /* __CMSCRIPTINGPLUGIN__ */
Color Matching Interfaces.
CMError CMUnembedImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl)
CMError CMLinkImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef lnkProf, UInt32 lnkIntent)
CMError CMCountImageProfiles(const FSSpec *spec, UInt32 *count)
CMError CMValidImage(const FSSpec *spec)
CMError CMMatchImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef srcProf, UInt32 srcIntent, CMProfileRef dstProf)
CMError CMProofImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef srcProf, UInt32 srcIntent, CMProfileRef dstProf, CMProfileRef prfProf)
CMError CMEmbedImage(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, CMProfileRef embProf)
CMError CMGetIndImageProfile(const FSSpec *spec, UInt32 index, CMProfileRef *prof)
CMError CMGetImageSpace(const FSSpec *spec, OSType *space)
CMError CMSetIndImageProfile(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 index, CMProfileRef prof)
File Manager (MFS, HFS, and HFS+) Interfaces.
unsigned char Boolean
Definition: MacTypes.h:318