home *** CD-ROM | disk | FTP | other *** search
- /*
- File: CMScriptingPlugin.h
-
- Contains: ColorSync Scripting Plugin API
-
- Version: Technology: ColorSync 2.5
- Release: ColorSync 3.0 SDK for use with Universal Interfaces 3.2
-
- Copyright: © 1998-1999 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://developer.apple.com/bugreporter/
-
- */
- #ifndef __CMSCRIPTINGPLUGIN__
- #define __CMSCRIPTINGPLUGIN__
-
- #ifndef __FILES__
- #include <Files.h>
- #endif
-
- #ifndef __CMAPPLICATION__
- #include <CMApplication.h>
- #endif
-
- #ifndef __CODEFRAGMENTS__
- #include <CodeFragments.h>
- #endif
-
-
-
-
-
-
- #if PRAGMA_ONCE
- #pragma once
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT
- #pragma import on
- #endif
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=mac68k
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(push, 2)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack(2)
- #endif
-
- enum {
- /* ColorSync Scripting AppleEvent Errors */
- cmspInvalidImageFile = -4220, /* Plugin cannot handle this image file type */
- cmspInvalidImageSpace = -4221, /* Plugin cannot create an image file of this colorspace */
- cmspInvalidProfileEmbed = -4222, /* Specific invalid profile errors */
- cmspInvalidProfileSource = -4223,
- cmspInvalidProfileDest = -4224,
- cmspInvalidProfileProof = -4225,
- cmspInvalidProfileLink = -4226
- };
-
-
- /**** embedFlags field ****/
- /* reserved for future use: currently 0 */
-
- /**** matchFlags field ****/
- enum {
- cmspFavorEmbeddedMask = 0x00000001 /* if bit 0 is 0 then use srcProf profile, if 1 then use profile embedded in image if present*/
- };
-
-
- /**** scripting plugin entry points ****/
- typedef CALLBACK_API_C( CMError , ValidateImageProcPtr )(const FSSpec *spec);
- typedef CALLBACK_API_C( CMError , GetImageSpaceProcPtr )(const FSSpec *spec, OSType *space);
- typedef CALLBACK_API_C( CMError , ValidateSpaceProcPtr )(const FSSpec *spec, OSType *space);
- typedef CALLBACK_API_C( CMError , EmbedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, CMProfileRef embedProf, UInt32 embedFlags);
- typedef CALLBACK_API_C( CMError , UnembedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto);
- typedef CALLBACK_API_C( CMError , MatchImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 qual, UInt32 srcIntent, CMProfileRef srcProf, CMProfileRef dstProf, CMProfileRef prfProf, UInt32 matchFlags);
- typedef CALLBACK_API_C( CMError , CountImageProfilesProcPtr )(const FSSpec *spec, UInt32 *count);
- typedef CALLBACK_API_C( CMError , GetIndImageProfileProcPtr )(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
- typedef CALLBACK_API_C( CMError , SetIndImageProfileProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, UInt32 index, CMProfileRef prof, UInt32 embedFlags);
- /**** CSScriptingLib entry points ****/
- typedef CALLBACK_API_C( CMError , CMValidImageProcPtr )(const FSSpec *spec);
- typedef CALLBACK_API_C( CMError , CMGetImageSpaceProcPtr )(const FSSpec *spec, OSType *space);
- typedef CALLBACK_API_C( CMError , CMEmbedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, CMProfileRef embProf);
- typedef CALLBACK_API_C( CMError , CMUnembedImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl);
- typedef CALLBACK_API_C( CMError , CMMatchImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef srcProf, UInt32 srcIntent, CMProfileRef dstProf);
- typedef CALLBACK_API_C( CMError , CMProofImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef srcProf, UInt32 srcIntent, CMProfileRef dstProf, CMProfileRef prfProf);
- typedef CALLBACK_API_C( CMError , CMLinkImageProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 qual, CMProfileRef lnkProf, UInt32 lnkIntent);
- typedef CALLBACK_API_C( CMError , CMCountImageProfilesProcPtr )(const FSSpec *spec, UInt32 *count);
- typedef CALLBACK_API_C( CMError , CMGetIndImageProfileProcPtr )(const FSSpec *spec, UInt32 index, CMProfileRef *prof);
- typedef CALLBACK_API_C( CMError , CMSetIndImageProfileProcPtr )(const FSSpec *specFrom, const FSSpec *specInto, Boolean repl, UInt32 index, CMProfileRef prof);
- typedef STACK_UPP_TYPE(ValidateImageProcPtr) ValidateImageUPP;
- typedef STACK_UPP_TYPE(GetImageSpaceProcPtr) GetImageSpaceUPP;
- typedef STACK_UPP_TYPE(ValidateSpaceProcPtr) ValidateSpaceUPP;
- typedef STACK_UPP_TYPE(EmbedImageProcPtr) EmbedImageUPP;
- typedef STACK_UPP_TYPE(UnembedImageProcPtr) UnembedImageUPP;
- typedef STACK_UPP_TYPE(MatchImageProcPtr) MatchImageUPP;
- typedef STACK_UPP_TYPE(CountImageProfilesProcPtr) CountImageProfilesUPP;
- typedef STACK_UPP_TYPE(GetIndImageProfileProcPtr) GetIndImageProfileUPP;
- typedef STACK_UPP_TYPE(SetIndImageProfileProcPtr) SetIndImageProfileUPP;
- typedef STACK_UPP_TYPE(CMValidImageProcPtr) CMValidImageUPP;
- typedef STACK_UPP_TYPE(CMGetImageSpaceProcPtr) CMGetImageSpaceUPP;
- typedef STACK_UPP_TYPE(CMEmbedImageProcPtr) CMEmbedImageUPP;
- typedef STACK_UPP_TYPE(CMUnembedImageProcPtr) CMUnembedImageUPP;
- typedef STACK_UPP_TYPE(CMMatchImageProcPtr) CMMatchImageUPP;
- typedef STACK_UPP_TYPE(CMProofImageProcPtr) CMProofImageUPP;
- typedef STACK_UPP_TYPE(CMLinkImageProcPtr) CMLinkImageUPP;
- typedef STACK_UPP_TYPE(CMCountImageProfilesProcPtr) CMCountImageProfilesUPP;
- typedef STACK_UPP_TYPE(CMGetIndImageProfileProcPtr) CMGetIndImageProfileUPP;
- typedef STACK_UPP_TYPE(CMSetIndImageProfileProcPtr) CMSetIndImageProfileUPP;
- #if OPAQUE_UPP_TYPES
- EXTERN_API(ValidateImageUPP)
- NewValidateImageUPP (ValidateImageProcPtr userRoutine);
-
- EXTERN_API(GetImageSpaceUPP)
- NewGetImageSpaceUPP (GetImageSpaceProcPtr userRoutine);
-
- EXTERN_API(ValidateSpaceUPP)
- NewValidateSpaceUPP (ValidateSpaceProcPtr userRoutine);
-
- EXTERN_API(EmbedImageUPP)
- NewEmbedImageUPP (EmbedImageProcPtr userRoutine);
-
- EXTERN_API(UnembedImageUPP)
- NewUnembedImageUPP (UnembedImageProcPtr userRoutine);
-
- EXTERN_API(MatchImageUPP)
- NewMatchImageUPP (MatchImageProcPtr userRoutine);
-
- EXTERN_API(CountImageProfilesUPP)
- NewCountImageProfilesUPP (CountImageProfilesProcPtr userRoutine);
-
- EXTERN_API(GetIndImageProfileUPP)
- NewGetIndImageProfileUPP (GetIndImageProfileProcPtr userRoutine);
-
- EXTERN_API(SetIndImageProfileUPP)
- NewSetIndImageProfileUPP (SetIndImageProfileProcPtr userRoutine);
-
- EXTERN_API(CMValidImageUPP)
- NewCMValidImageUPP (CMValidImageProcPtr userRoutine);
-
- EXTERN_API(CMGetImageSpaceUPP)
- NewCMGetImageSpaceUPP (CMGetImageSpaceProcPtr userRoutine);
-
- EXTERN_API(CMEmbedImageUPP)
- NewCMEmbedImageUPP (CMEmbedImageProcPtr userRoutine);
-
- EXTERN_API(CMUnembedImageUPP)
- NewCMUnembedImageUPP (CMUnembedImageProcPtr userRoutine);
-
- EXTERN_API(CMMatchImageUPP)
- NewCMMatchImageUPP (CMMatchImageProcPtr userRoutine);
-
- EXTERN_API(CMProofImageUPP)
- NewCMProofImageUPP (CMProofImageProcPtr userRoutine);
-
- EXTERN_API(CMLinkImageUPP)
- NewCMLinkImageUPP (CMLinkImageProcPtr userRoutine);
-
- EXTERN_API(CMCountImageProfilesUPP)
- NewCMCountImageProfilesUPP (CMCountImageProfilesProcPtr userRoutine);
-
- EXTERN_API(CMGetIndImageProfileUPP)
- NewCMGetIndImageProfileUPP (CMGetIndImageProfileProcPtr userRoutine);
-
- EXTERN_API(CMSetIndImageProfileUPP)
- NewCMSetIndImageProfileUPP (CMSetIndImageProfileProcPtr userRoutine);
-
- EXTERN_API(void)
- DisposeValidateImageUPP (ValidateImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeGetImageSpaceUPP (GetImageSpaceUPP userUPP);
-
- EXTERN_API(void)
- DisposeValidateSpaceUPP (ValidateSpaceUPP userUPP);
-
- EXTERN_API(void)
- DisposeEmbedImageUPP (EmbedImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeUnembedImageUPP (UnembedImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeMatchImageUPP (MatchImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeCountImageProfilesUPP (CountImageProfilesUPP userUPP);
-
- EXTERN_API(void)
- DisposeGetIndImageProfileUPP (GetIndImageProfileUPP userUPP);
-
- EXTERN_API(void)
- DisposeSetIndImageProfileUPP (SetIndImageProfileUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMValidImageUPP (CMValidImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMGetImageSpaceUPP (CMGetImageSpaceUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMEmbedImageUPP (CMEmbedImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMUnembedImageUPP (CMUnembedImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMMatchImageUPP (CMMatchImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMProofImageUPP (CMProofImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMLinkImageUPP (CMLinkImageUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMCountImageProfilesUPP (CMCountImageProfilesUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMGetIndImageProfileUPP (CMGetIndImageProfileUPP userUPP);
-
- EXTERN_API(void)
- DisposeCMSetIndImageProfileUPP (CMSetIndImageProfileUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeValidateImageUPP (const FSSpec * spec,
- ValidateImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeGetImageSpaceUPP (const FSSpec * spec,
- OSType * space,
- GetImageSpaceUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeValidateSpaceUPP (const FSSpec * spec,
- OSType * space,
- ValidateSpaceUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeEmbedImageUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- CMProfileRef embedProf,
- UInt32 embedFlags,
- EmbedImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeUnembedImageUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- UnembedImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeMatchImageUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- UInt32 qual,
- UInt32 srcIntent,
- CMProfileRef srcProf,
- CMProfileRef dstProf,
- CMProfileRef prfProf,
- UInt32 matchFlags,
- MatchImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCountImageProfilesUPP (const FSSpec * spec,
- UInt32 * count,
- CountImageProfilesUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeGetIndImageProfileUPP (const FSSpec * spec,
- UInt32 index,
- CMProfileRef * prof,
- GetIndImageProfileUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeSetIndImageProfileUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- UInt32 index,
- CMProfileRef prof,
- UInt32 embedFlags,
- SetIndImageProfileUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMValidImageUPP (const FSSpec * spec,
- CMValidImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMGetImageSpaceUPP (const FSSpec * spec,
- OSType * space,
- CMGetImageSpaceUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMEmbedImageUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- CMProfileRef embProf,
- CMEmbedImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMUnembedImageUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- CMUnembedImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMMatchImageUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- UInt32 qual,
- CMProfileRef srcProf,
- UInt32 srcIntent,
- CMProfileRef dstProf,
- CMMatchImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMProofImageUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- UInt32 qual,
- CMProfileRef srcProf,
- UInt32 srcIntent,
- CMProfileRef dstProf,
- CMProfileRef prfProf,
- CMProofImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMLinkImageUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- UInt32 qual,
- CMProfileRef lnkProf,
- UInt32 lnkIntent,
- CMLinkImageUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMCountImageProfilesUPP (const FSSpec * spec,
- UInt32 * count,
- CMCountImageProfilesUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMGetIndImageProfileUPP (const FSSpec * spec,
- UInt32 index,
- CMProfileRef * prof,
- CMGetIndImageProfileUPP userUPP);
-
- EXTERN_API(CMError)
- InvokeCMSetIndImageProfileUPP (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- UInt32 index,
- CMProfileRef prof,
- CMSetIndImageProfileUPP userUPP);
-
- #else
- enum { uppValidateImageProcInfo = 0x000000F1 }; /* 4_bytes Func(4_bytes) */
- enum { uppGetImageSpaceProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
- enum { uppValidateSpaceProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
- enum { uppEmbedImageProcInfo = 0x00003FF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
- enum { uppUnembedImageProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
- enum { uppMatchImageProcInfo = 0x003FFFF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
- enum { uppCountImageProfilesProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
- enum { uppGetIndImageProfileProcInfo = 0x00000FF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
- enum { uppSetIndImageProfileProcInfo = 0x0000FFF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
- enum { uppCMValidImageProcInfo = 0x000000F1 }; /* 4_bytes Func(4_bytes) */
- enum { uppCMGetImageSpaceProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
- enum { uppCMEmbedImageProcInfo = 0x000037F1 }; /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes) */
- enum { uppCMUnembedImageProcInfo = 0x000007F1 }; /* 4_bytes Func(4_bytes, 4_bytes, 1_byte) */
- enum { uppCMMatchImageProcInfo = 0x000FF7F1 }; /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
- enum { uppCMProofImageProcInfo = 0x003FF7F1 }; /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
- enum { uppCMLinkImageProcInfo = 0x0003F7F1 }; /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes, 4_bytes, 4_bytes) */
- enum { uppCMCountImageProfilesProcInfo = 0x000003F1 }; /* 4_bytes Func(4_bytes, 4_bytes) */
- enum { uppCMGetIndImageProfileProcInfo = 0x00000FF1 }; /* 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
- enum { uppCMSetIndImageProfileProcInfo = 0x0000F7F1 }; /* 4_bytes Func(4_bytes, 4_bytes, 1_byte, 4_bytes, 4_bytes) */
- #define NewValidateImageUPP(userRoutine) (ValidateImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppValidateImageProcInfo, GetCurrentArchitecture())
- #define NewGetImageSpaceUPP(userRoutine) (GetImageSpaceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetImageSpaceProcInfo, GetCurrentArchitecture())
- #define NewValidateSpaceUPP(userRoutine) (ValidateSpaceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppValidateSpaceProcInfo, GetCurrentArchitecture())
- #define NewEmbedImageUPP(userRoutine) (EmbedImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppEmbedImageProcInfo, GetCurrentArchitecture())
- #define NewUnembedImageUPP(userRoutine) (UnembedImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppUnembedImageProcInfo, GetCurrentArchitecture())
- #define NewMatchImageUPP(userRoutine) (MatchImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppMatchImageProcInfo, GetCurrentArchitecture())
- #define NewCountImageProfilesUPP(userRoutine) (CountImageProfilesUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCountImageProfilesProcInfo, GetCurrentArchitecture())
- #define NewGetIndImageProfileUPP(userRoutine) (GetIndImageProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppGetIndImageProfileProcInfo, GetCurrentArchitecture())
- #define NewSetIndImageProfileUPP(userRoutine) (SetIndImageProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppSetIndImageProfileProcInfo, GetCurrentArchitecture())
- #define NewCMValidImageUPP(userRoutine) (CMValidImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMValidImageProcInfo, GetCurrentArchitecture())
- #define NewCMGetImageSpaceUPP(userRoutine) (CMGetImageSpaceUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMGetImageSpaceProcInfo, GetCurrentArchitecture())
- #define NewCMEmbedImageUPP(userRoutine) (CMEmbedImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMEmbedImageProcInfo, GetCurrentArchitecture())
- #define NewCMUnembedImageUPP(userRoutine) (CMUnembedImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMUnembedImageProcInfo, GetCurrentArchitecture())
- #define NewCMMatchImageUPP(userRoutine) (CMMatchImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMMatchImageProcInfo, GetCurrentArchitecture())
- #define NewCMProofImageUPP(userRoutine) (CMProofImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMProofImageProcInfo, GetCurrentArchitecture())
- #define NewCMLinkImageUPP(userRoutine) (CMLinkImageUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMLinkImageProcInfo, GetCurrentArchitecture())
- #define NewCMCountImageProfilesUPP(userRoutine) (CMCountImageProfilesUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMCountImageProfilesProcInfo, GetCurrentArchitecture())
- #define NewCMGetIndImageProfileUPP(userRoutine) (CMGetIndImageProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMGetIndImageProfileProcInfo, GetCurrentArchitecture())
- #define NewCMSetIndImageProfileUPP(userRoutine) (CMSetIndImageProfileUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppCMSetIndImageProfileProcInfo, GetCurrentArchitecture())
- #define DisposeValidateImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeGetImageSpaceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeValidateSpaceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeEmbedImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeUnembedImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeMatchImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCountImageProfilesUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeGetIndImageProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeSetIndImageProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMValidImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMGetImageSpaceUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMEmbedImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMUnembedImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMMatchImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMProofImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMLinkImageUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMCountImageProfilesUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMGetIndImageProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define DisposeCMSetIndImageProfileUPP(userUPP) DisposeRoutineDescriptor(userUPP)
- #define InvokeValidateImageUPP(spec, userUPP) (CMError)CALL_ONE_PARAMETER_UPP((userUPP), uppValidateImageProcInfo, (spec))
- #define InvokeGetImageSpaceUPP(spec, space, userUPP) (CMError)CALL_TWO_PARAMETER_UPP((userUPP), uppGetImageSpaceProcInfo, (spec), (space))
- #define InvokeValidateSpaceUPP(spec, space, userUPP) (CMError)CALL_TWO_PARAMETER_UPP((userUPP), uppValidateSpaceProcInfo, (spec), (space))
- #define InvokeEmbedImageUPP(specFrom, specInto, embedProf, embedFlags, userUPP) (CMError)CALL_FOUR_PARAMETER_UPP((userUPP), uppEmbedImageProcInfo, (specFrom), (specInto), (embedProf), (embedFlags))
- #define InvokeUnembedImageUPP(specFrom, specInto, userUPP) (CMError)CALL_TWO_PARAMETER_UPP((userUPP), uppUnembedImageProcInfo, (specFrom), (specInto))
- #define InvokeMatchImageUPP(specFrom, specInto, qual, srcIntent, srcProf, dstProf, prfProf, matchFlags, userUPP) (CMError)CALL_EIGHT_PARAMETER_UPP((userUPP), uppMatchImageProcInfo, (specFrom), (specInto), (qual), (srcIntent), (srcProf), (dstProf), (prfProf), (matchFlags))
- #define InvokeCountImageProfilesUPP(spec, count, userUPP) (CMError)CALL_TWO_PARAMETER_UPP((userUPP), uppCountImageProfilesProcInfo, (spec), (count))
- #define InvokeGetIndImageProfileUPP(spec, index, prof, userUPP) (CMError)CALL_THREE_PARAMETER_UPP((userUPP), uppGetIndImageProfileProcInfo, (spec), (index), (prof))
- #define InvokeSetIndImageProfileUPP(specFrom, specInto, index, prof, embedFlags, userUPP) (CMError)CALL_FIVE_PARAMETER_UPP((userUPP), uppSetIndImageProfileProcInfo, (specFrom), (specInto), (index), (prof), (embedFlags))
- #define InvokeCMValidImageUPP(spec, userUPP) (CMError)CALL_ONE_PARAMETER_UPP((userUPP), uppCMValidImageProcInfo, (spec))
- #define InvokeCMGetImageSpaceUPP(spec, space, userUPP) (CMError)CALL_TWO_PARAMETER_UPP((userUPP), uppCMGetImageSpaceProcInfo, (spec), (space))
- #define InvokeCMEmbedImageUPP(specFrom, specInto, repl, embProf, userUPP) (CMError)CALL_FOUR_PARAMETER_UPP((userUPP), uppCMEmbedImageProcInfo, (specFrom), (specInto), (repl), (embProf))
- #define InvokeCMUnembedImageUPP(specFrom, specInto, repl, userUPP) (CMError)CALL_THREE_PARAMETER_UPP((userUPP), uppCMUnembedImageProcInfo, (specFrom), (specInto), (repl))
- #define InvokeCMMatchImageUPP(specFrom, specInto, repl, qual, srcProf, srcIntent, dstProf, userUPP) (CMError)CALL_SEVEN_PARAMETER_UPP((userUPP), uppCMMatchImageProcInfo, (specFrom), (specInto), (repl), (qual), (srcProf), (srcIntent), (dstProf))
- #define InvokeCMProofImageUPP(specFrom, specInto, repl, qual, srcProf, srcIntent, dstProf, prfProf, userUPP) (CMError)CALL_EIGHT_PARAMETER_UPP((userUPP), uppCMProofImageProcInfo, (specFrom), (specInto), (repl), (qual), (srcProf), (srcIntent), (dstProf), (prfProf))
- #define InvokeCMLinkImageUPP(specFrom, specInto, repl, qual, lnkProf, lnkIntent, userUPP) (CMError)CALL_SIX_PARAMETER_UPP((userUPP), uppCMLinkImageProcInfo, (specFrom), (specInto), (repl), (qual), (lnkProf), (lnkIntent))
- #define InvokeCMCountImageProfilesUPP(spec, count, userUPP) (CMError)CALL_TWO_PARAMETER_UPP((userUPP), uppCMCountImageProfilesProcInfo, (spec), (count))
- #define InvokeCMGetIndImageProfileUPP(spec, index, prof, userUPP) (CMError)CALL_THREE_PARAMETER_UPP((userUPP), uppCMGetIndImageProfileProcInfo, (spec), (index), (prof))
- #define InvokeCMSetIndImageProfileUPP(specFrom, specInto, repl, index, prof, userUPP) (CMError)CALL_FIVE_PARAMETER_UPP((userUPP), uppCMSetIndImageProfileProcInfo, (specFrom), (specInto), (repl), (index), (prof))
- #endif
- /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
- #define NewValidateImageProc(userRoutine) NewValidateImageUPP(userRoutine)
- #define NewGetImageSpaceProc(userRoutine) NewGetImageSpaceUPP(userRoutine)
- #define NewValidateSpaceProc(userRoutine) NewValidateSpaceUPP(userRoutine)
- #define NewEmbedImageProc(userRoutine) NewEmbedImageUPP(userRoutine)
- #define NewUnembedImageProc(userRoutine) NewUnembedImageUPP(userRoutine)
- #define NewMatchImageProc(userRoutine) NewMatchImageUPP(userRoutine)
- #define NewCountImageProfilesProc(userRoutine) NewCountImageProfilesUPP(userRoutine)
- #define NewGetIndImageProfileProc(userRoutine) NewGetIndImageProfileUPP(userRoutine)
- #define NewSetIndImageProfileProc(userRoutine) NewSetIndImageProfileUPP(userRoutine)
- #define NewCMValidImageProc(userRoutine) NewCMValidImageUPP(userRoutine)
- #define NewCMGetImageSpaceProc(userRoutine) NewCMGetImageSpaceUPP(userRoutine)
- #define NewCMEmbedImageProc(userRoutine) NewCMEmbedImageUPP(userRoutine)
- #define NewCMUnembedImageProc(userRoutine) NewCMUnembedImageUPP(userRoutine)
- #define NewCMMatchImageProc(userRoutine) NewCMMatchImageUPP(userRoutine)
- #define NewCMProofImageProc(userRoutine) NewCMProofImageUPP(userRoutine)
- #define NewCMLinkImageProc(userRoutine) NewCMLinkImageUPP(userRoutine)
- #define NewCMCountImageProfilesProc(userRoutine) NewCMCountImageProfilesUPP(userRoutine)
- #define NewCMGetIndImageProfileProc(userRoutine) NewCMGetIndImageProfileUPP(userRoutine)
- #define NewCMSetIndImageProfileProc(userRoutine) NewCMSetIndImageProfileUPP(userRoutine)
- #define CallValidateImageProc(userRoutine, spec) InvokeValidateImageUPP(spec, userRoutine)
- #define CallGetImageSpaceProc(userRoutine, spec, space) InvokeGetImageSpaceUPP(spec, space, userRoutine)
- #define CallValidateSpaceProc(userRoutine, spec, space) InvokeValidateSpaceUPP(spec, space, userRoutine)
- #define CallEmbedImageProc(userRoutine, specFrom, specInto, embedProf, embedFlags) InvokeEmbedImageUPP(specFrom, specInto, embedProf, embedFlags, userRoutine)
- #define CallUnembedImageProc(userRoutine, specFrom, specInto) InvokeUnembedImageUPP(specFrom, specInto, userRoutine)
- #define CallMatchImageProc(userRoutine, specFrom, specInto, qual, srcIntent, srcProf, dstProf, prfProf, matchFlags) InvokeMatchImageUPP(specFrom, specInto, qual, srcIntent, srcProf, dstProf, prfProf, matchFlags, userRoutine)
- #define CallCountImageProfilesProc(userRoutine, spec, count) InvokeCountImageProfilesUPP(spec, count, userRoutine)
- #define CallGetIndImageProfileProc(userRoutine, spec, index, prof) InvokeGetIndImageProfileUPP(spec, index, prof, userRoutine)
- #define CallSetIndImageProfileProc(userRoutine, specFrom, specInto, index, prof, embedFlags) InvokeSetIndImageProfileUPP(specFrom, specInto, index, prof, embedFlags, userRoutine)
- #define CallCMValidImageProc(userRoutine, spec) InvokeCMValidImageUPP(spec, userRoutine)
- #define CallCMGetImageSpaceProc(userRoutine, spec, space) InvokeCMGetImageSpaceUPP(spec, space, userRoutine)
- #define CallCMEmbedImageProc(userRoutine, specFrom, specInto, repl, embProf) InvokeCMEmbedImageUPP(specFrom, specInto, repl, embProf, userRoutine)
- #define CallCMUnembedImageProc(userRoutine, specFrom, specInto, repl) InvokeCMUnembedImageUPP(specFrom, specInto, repl, userRoutine)
- #define CallCMMatchImageProc(userRoutine, specFrom, specInto, repl, qual, srcProf, srcIntent, dstProf) InvokeCMMatchImageUPP(specFrom, specInto, repl, qual, srcProf, srcIntent, dstProf, userRoutine)
- #define CallCMProofImageProc(userRoutine, specFrom, specInto, repl, qual, srcProf, srcIntent, dstProf, prfProf) InvokeCMProofImageUPP(specFrom, specInto, repl, qual, srcProf, srcIntent, dstProf, prfProf, userRoutine)
- #define CallCMLinkImageProc(userRoutine, specFrom, specInto, repl, qual, lnkProf, lnkIntent) InvokeCMLinkImageUPP(specFrom, specInto, repl, qual, lnkProf, lnkIntent, userRoutine)
- #define CallCMCountImageProfilesProc(userRoutine, spec, count) InvokeCMCountImageProfilesUPP(spec, count, userRoutine)
- #define CallCMGetIndImageProfileProc(userRoutine, spec, index, prof) InvokeCMGetIndImageProfileUPP(spec, index, prof, userRoutine)
- #define CallCMSetIndImageProfileProc(userRoutine, specFrom, specInto, repl, index, prof) InvokeCMSetIndImageProfileUPP(specFrom, specInto, repl, index, prof, userRoutine)
- /**** CSScriptingLib API ****/
-
- EXTERN_API_C( CMError )
- CMValidImage (const FSSpec * spec);
-
- EXTERN_API_C( CMError )
- CMGetImageSpace (const FSSpec * spec,
- OSType * space);
-
- EXTERN_API_C( CMError )
- CMEmbedImage (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- CMProfileRef embProf);
-
- EXTERN_API_C( CMError )
- CMUnembedImage (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl);
-
- EXTERN_API_C( CMError )
- CMMatchImage (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- UInt32 qual,
- CMProfileRef srcProf,
- UInt32 srcIntent,
- CMProfileRef dstProf);
-
- EXTERN_API_C( CMError )
- CMProofImage (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- UInt32 qual,
- CMProfileRef srcProf,
- UInt32 srcIntent,
- CMProfileRef dstProf,
- CMProfileRef prfProf);
-
- EXTERN_API_C( CMError )
- CMLinkImage (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- UInt32 qual,
- CMProfileRef lnkProf,
- UInt32 lnkIntent);
-
- EXTERN_API_C( CMError )
- CMCountImageProfiles (const FSSpec * spec,
- UInt32 * count);
-
- EXTERN_API_C( CMError )
- CMGetIndImageProfile (const FSSpec * spec,
- UInt32 index,
- CMProfileRef * prof);
-
- EXTERN_API_C( CMError )
- CMSetIndImageProfile (const FSSpec * specFrom,
- const FSSpec * specInto,
- Boolean repl,
- UInt32 index,
- CMProfileRef prof);
-
-
- #if PRAGMA_STRUCT_ALIGN
- #pragma options align=reset
- #elif PRAGMA_STRUCT_PACKPUSH
- #pragma pack(pop)
- #elif PRAGMA_STRUCT_PACK
- #pragma pack()
- #endif
-
- #ifdef PRAGMA_IMPORT_OFF
- #pragma import off
- #elif PRAGMA_IMPORT
- #pragma import reset
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __CMSCRIPTINGPLUGIN__ */
-
-