19 #ifndef __AEDATAMODEL__
20 #define __AEDATAMODEL__
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
47 #elif PRAGMA_STRUCT_PACK
54 typeBoolean = FOUR_CHAR_CODE(
'bool'),
55 typeChar = FOUR_CHAR_CODE(
'TEXT')
61 typeSInt16 = FOUR_CHAR_CODE(
'shor'),
62 typeSInt32 = FOUR_CHAR_CODE(
'long'),
63 typeUInt32 = FOUR_CHAR_CODE(
'magn'),
64 typeSInt64 = FOUR_CHAR_CODE(
'comp'),
65 typeIEEE32BitFloatingPoint = FOUR_CHAR_CODE(
'sing'),
66 typeIEEE64BitFloatingPoint = FOUR_CHAR_CODE(
'doub'),
67 type128BitFloatingPoint = FOUR_CHAR_CODE(
'ldbl'),
68 typeDecimalStruct = FOUR_CHAR_CODE(
'decm')
74 typeSMInt = typeSInt16,
75 typeShortInteger = typeSInt16,
76 typeInteger = typeSInt32,
77 typeLongInteger = typeSInt32,
78 typeMagnitude = typeUInt32,
79 typeComp = typeSInt64,
80 typeSMFloat = typeIEEE32BitFloatingPoint,
81 typeShortFloat = typeIEEE32BitFloatingPoint,
82 typeFloat = typeIEEE64BitFloatingPoint,
83 typeLongFloat = typeIEEE64BitFloatingPoint,
84 typeExtended = FOUR_CHAR_CODE(
'exte')
90 typeAEList = FOUR_CHAR_CODE(
'list'),
91 typeAERecord = FOUR_CHAR_CODE(
'reco'),
92 typeAppleEvent = FOUR_CHAR_CODE(
'aevt'),
93 typeEventRecord = FOUR_CHAR_CODE(
'evrc'),
94 typeTrue = FOUR_CHAR_CODE(
'true'),
95 typeFalse = FOUR_CHAR_CODE(
'fals'),
96 typeAlias = FOUR_CHAR_CODE(
'alis'),
97 typeEnumerated = FOUR_CHAR_CODE(
'enum'),
98 typeType = FOUR_CHAR_CODE(
'type'),
99 typeAppParameters = FOUR_CHAR_CODE(
'appa'),
100 typeProperty = FOUR_CHAR_CODE(
'prop'),
101 typeFSS = FOUR_CHAR_CODE(
'fss '),
102 typeFSRef = FOUR_CHAR_CODE(
'fsrf'),
103 typeFileURL = FOUR_CHAR_CODE(
'furl'),
104 typeKeyword = FOUR_CHAR_CODE(
'keyw'),
105 typeSectionH = FOUR_CHAR_CODE(
'sect'),
106 typeWildCard = FOUR_CHAR_CODE(
'****'),
107 typeApplSignature = FOUR_CHAR_CODE(
'sign'),
108 typeQDRectangle = FOUR_CHAR_CODE(
'qdrt'),
109 typeFixed = FOUR_CHAR_CODE(
'fixd'),
110 typeProcessSerialNumber = FOUR_CHAR_CODE(
'psn '),
111 typeApplicationURL = FOUR_CHAR_CODE(
'aprl'),
112 typeNull = FOUR_CHAR_CODE(
'null')
115 #if CALL_NOT_IN_CARBON
119 typeSessionID = FOUR_CHAR_CODE(
'ssid'),
120 typeTargetID = FOUR_CHAR_CODE(
'targ'),
121 typeDispatcherID = FOUR_CHAR_CODE(
'dspt')
129 keyTransactionIDAttr = FOUR_CHAR_CODE(
'tran'),
130 keyReturnIDAttr = FOUR_CHAR_CODE(
'rtid'),
131 keyEventClassAttr = FOUR_CHAR_CODE(
'evcl'),
132 keyEventIDAttr = FOUR_CHAR_CODE(
'evid'),
133 keyAddressAttr = FOUR_CHAR_CODE(
'addr'),
134 keyOptionalKeywordAttr = FOUR_CHAR_CODE(
'optk'),
135 keyTimeoutAttr = FOUR_CHAR_CODE(
'timo'),
136 keyInteractLevelAttr = FOUR_CHAR_CODE(
141 FOUR_CHAR_CODE(
'miss'),
149 kAEDescListFactorNone = 0,
150 kAEDescListFactorType = 4,
151 kAEDescListFactorTypeAndSize = 8
166 typedef FourCharCode AEKeyword;
167 #if OPAQUE_TOOLBOX_STRUCTS
168 typedef struct OpaqueAEDataStorageType *AEDataStorageType;
170 typedef Ptr AEDataStorageType;
197 typedef SInt16 AEReturnID;
198 typedef SInt32 AETransactionID;
199 typedef FourCharCode AEEventClass;
200 typedef FourCharCode AEEventID;
201 typedef SInt8 AEArrayType;
222 char AEPackedArray[];
223 Handle AEHandleArray[];
227 typedef union AEArrayData AEArrayData;
228 typedef AEArrayData *AEArrayDataPointer;
233 typedef SInt16 AESendPriority;
238 kAEHighPriority = 0x00000001
242 typedef SInt32 AESendMode;
245 kAENoReply = 0x00000001,
246 kAEQueueReply = 0x00000002,
247 kAEWaitReply = 0x00000003,
248 kAEDontReconnect = 0x00000080,
252 kAENeverInteract = 0x00000010,
253 kAECanInteract = 0x00000020,
254 kAEAlwaysInteract = 0x00000030,
256 kAECanSwitchLayer = 0x00000040,
257 kAEDontRecord = 0x00001000,
259 kAEDontExecute = 0x00002000,
261 kAEProcessNonReplyEvents =
269 kAEDefaultTimeout = -1,
281 AECoercePtrProcPtr)(
DescType typeCode,
const void *dataPtr,
283 long handlerRefcon,
AEDesc *result);
295 NewAECoerceDescUPP(AECoerceDescProcPtr userRoutine);
296 #if !OPAQUE_UPP_TYPES
299 uppAECoerceDescProcInfo = 0x00003FE0
302 inline AECoerceDescUPP NewAECoerceDescUPP(AECoerceDescProcPtr userRoutine)
305 uppAECoerceDescProcInfo,
306 GetCurrentArchitecture());
309 #define NewAECoerceDescUPP(userRoutine) \
311 NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoerceDescProcInfo, \
312 GetCurrentArchitecture())
325 NewAECoercePtrUPP(AECoercePtrProcPtr userRoutine);
326 #if !OPAQUE_UPP_TYPES
329 uppAECoercePtrProcInfo = 0x0003FFE0
333 inline AECoercePtrUPP NewAECoercePtrUPP(AECoercePtrProcPtr userRoutine)
336 (ProcPtr)(userRoutine), uppAECoercePtrProcInfo, GetCurrentArchitecture());
339 #define NewAECoercePtrUPP(userRoutine) \
341 NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoercePtrProcInfo, \
342 GetCurrentArchitecture())
354 DisposeAECoerceDescUPP(AECoerceDescUPP userUPP);
355 #if !OPAQUE_UPP_TYPES
357 inline void DisposeAECoerceDescUPP(AECoerceDescUPP userUPP)
362 #define DisposeAECoerceDescUPP(userUPP) DisposeRoutineDescriptor(userUPP)
375 DisposeAECoercePtrUPP(AECoercePtrUPP userUPP);
376 #if !OPAQUE_UPP_TYPES
378 inline void DisposeAECoercePtrUPP(AECoercePtrUPP userUPP)
383 #define DisposeAECoercePtrUPP(userUPP) DisposeRoutineDescriptor(userUPP)
397 long handlerRefcon,
AEDesc *toDesc,
398 AECoerceDescUPP userUPP);
399 #if !OPAQUE_UPP_TYPES
401 inline OSErr InvokeAECoerceDescUPP(
const AEDesc *fromDesc,
DescType toType,
402 long handlerRefcon,
AEDesc *toDesc,
403 AECoerceDescUPP userUPP)
405 return (OSErr)CALL_FOUR_PARAMETER_UPP(userUPP, uppAECoerceDescProcInfo,
406 fromDesc, toType, handlerRefcon,
410 #define InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, \
413 CALL_FOUR_PARAMETER_UPP((userUPP), uppAECoerceDescProcInfo, (fromDesc), \
414 (toType), (handlerRefcon), (toDesc))
427 InvokeAECoercePtrUPP(
DescType typeCode,
const void *dataPtr, Size dataSize,
429 AECoercePtrUPP userUPP);
430 #if !OPAQUE_UPP_TYPES
432 inline OSErr InvokeAECoercePtrUPP(
DescType typeCode,
const void *dataPtr,
434 long handlerRefcon,
AEDesc *result,
435 AECoercePtrUPP userUPP)
437 return (OSErr)CALL_SIX_PARAMETER_UPP(userUPP, uppAECoercePtrProcInfo,
438 typeCode, dataPtr, dataSize, toType,
439 handlerRefcon, result);
442 #define InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, \
443 handlerRefcon, result, userUPP) \
444 (OSErr) CALL_SIX_PARAMETER_UPP((userUPP), uppAECoercePtrProcInfo, \
445 (typeCode), (dataPtr), (dataSize), (toType), \
446 (handlerRefcon), (result))
450 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
452 #define NewAECoerceDescProc(userRoutine) NewAECoerceDescUPP(userRoutine)
453 #define NewAECoercePtrProc(userRoutine) NewAECoercePtrUPP(userRoutine)
454 #define CallAECoerceDescProc(userRoutine, fromDesc, toType, handlerRefcon, \
456 InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userRoutine)
457 #define CallAECoercePtrProc(userRoutine, typeCode, dataPtr, dataSize, toType, \
458 handlerRefcon, result) \
459 InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, \
468 typedef AECoercionHandlerUPP AECoercionHandlerUPP;
479 AECoercionHandlerUPP handler,
long handlerRefcon,
492 AECoercionHandlerUPP handler,
505 AECoercionHandlerUPP *handler,
long *handlerRefcon,
520 AECoercePtr(
DescType typeCode,
const void *dataPtr,
550 AEInitializeDesc(
AEDesc *desc);
553 inline void AEInitializeDescInline(
AEDesc *d)
555 d->descriptorType = typeNull;
556 d->dataHandle =
NULL;
559 #define AEInitializeDescInline(__d) \
563 d->descriptorType = typeNull; \
564 d->dataHandle = NULL; \
591 OSErr AEDisposeDesc(
AEDesc *theAEDesc);
601 OSErr AEDuplicateDesc(
const AEDesc *theAEDesc,
AEDesc *result);
619 AECreateList(
const void *factoringPtr, Size factoredSize,
651 const void *dataPtr, Size dataSize);
672 AEKeyword *theAEKeyword,
DescType *typeCode,
void *dataPtr,
673 Size maximumSize, Size *actualSize);
684 AEKeyword *theAEKeyword,
AEDesc *result);
706 AEArrayDataPointer arrayPtr, Size maximumSize,
DescType *itemType,
707 Size *itemSize,
long *itemCount);
718 const AEArrayData *arrayPtr,
DescType itemType, Size itemSize,
763 #define AEPutKeyPtr(theAERecord, theAEKeyword, typeCode, dataPtr, dataSize) \
764 AEPutParamPtr((theAERecord), (theAEKeyword), (typeCode), (dataPtr), \
766 #define AEPutKeyDesc(theAERecord, theAEKeyword, theAEDesc) \
767 AEPutParamDesc((theAERecord), (theAEKeyword), (theAEDesc))
768 #define AEGetKeyPtr(theAERecord, theAEKeyword, desiredType, typeCode, dataPtr, \
769 maxSize, actualSize) \
770 AEGetParamPtr((theAERecord), (theAEKeyword), (desiredType), (typeCode), \
771 (dataPtr), (maxSize), (actualSize))
772 #define AEGetKeyDesc(theAERecord, theAEKeyword, desiredType, result) \
773 AEGetParamDesc((theAERecord), (theAEKeyword), (desiredType), (result))
774 #define AESizeOfKeyDesc(theAERecord, theAEKeyword, typeCode, dataSize) \
775 AESizeOfParam((theAERecord), (theAEKeyword), (typeCode), (dataSize))
776 #define AEDeleteKeyDesc(theAERecord, theAEKeyword) \
777 AEDeleteParam((theAERecord), (theAEKeyword))
792 AETransactionID transactionID,
AppleEvent *result);
812 AEKeyword theAEKeyword,
840 Size maximumSize, Size *actualSize);
864 DescType *typeCode, Size *dataSize);
893 AEKeyword theAEKeyword,
DescType desiredType,
894 DescType *typeCode,
void *dataPtr, Size maximumSize,
915 DescType *typeCode, Size *dataSize);
927 DescType typeCode,
const void *dataPtr, Size dataSize);
1018 #if ACCESSOR_CALLS_ARE_FUNCTIONS
1032 AEGetDescData(
const AEDesc *theAEDesc,
void *dataPtr, Size maximumSize);
1043 AEGetDescDataSize(
const AEDesc *theAEDesc);
1054 AEReplaceDescData(
DescType typeCode,
const void *dataPtr, Size dataSize,
1063 AEEventHandlerProcPtr)(
const AppleEvent *theAppleEvent,
1065 long handlerRefcon);
1077 #if !OPAQUE_UPP_TYPES
1080 uppAEEventHandlerProcInfo = 0x00000FE0
1083 inline AEEventHandlerUPP
1087 uppAEEventHandlerProcInfo,
1088 GetCurrentArchitecture());
1091 #define NewAEEventHandlerUPP(userRoutine) \
1092 (AEEventHandlerUPP) \
1093 NewRoutineDescriptor((ProcPtr)(userRoutine), uppAEEventHandlerProcInfo, \
1094 GetCurrentArchitecture())
1108 #if !OPAQUE_UPP_TYPES
1115 #define DisposeAEEventHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1129 long handlerRefcon, AEEventHandlerUPP userUPP);
1130 #if !OPAQUE_UPP_TYPES
1134 AEEventHandlerUPP userUPP)
1136 return (OSErr)CALL_THREE_PARAMETER_UPP(userUPP, uppAEEventHandlerProcInfo,
1137 theAppleEvent,
reply, handlerRefcon);
1140 #define InvokeAEEventHandlerUPP(theAppleEvent, reply, handlerRefcon, userUPP) \
1141 (OSErr) CALL_THREE_PARAMETER_UPP((userUPP), uppAEEventHandlerProcInfo, \
1142 (theAppleEvent), (reply), (handlerRefcon))
1146 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1148 #define NewAEEventHandlerProc(userRoutine) NewAEEventHandlerUPP(userRoutine)
1149 #define CallAEEventHandlerProc(userRoutine, theAppleEvent, reply, \
1151 InvokeAEEventHandlerUPP(theAppleEvent, reply, handlerRefcon, userRoutine)
1154 #if PRAGMA_STRUCT_ALIGN
1155 #pragma options align = reset
1156 #elif PRAGMA_STRUCT_PACKPUSH
1158 #elif PRAGMA_STRUCT_PACK
1162 #ifdef PRAGMA_IMPORT_OFF
1165 #pragma import reset
@ keyOriginalAddressAttr
Definition: AEDataModel.h:142
@ keyEventSourceAttr
Definition: AEDataModel.h:138
@ keyAcceptTimeoutAttr
Definition: AEDataModel.h:143
@ keyMissedKeywordAttr
Definition: AEDataModel.h:140
OSErr AEGetNthDesc(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, AEDesc *result)
AEDescList AERecord
Definition: AEDataModel.h:191
OSErr AEPutAttributePtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
OSErr AESizeOfNthItem(const AEDescList *theAEDescList, long index, DescType *typeCode, Size *dataSize)
AEDesc AEDescList
Definition: AEDataModel.h:189
OSStatus AEUnflattenDesc(Ptr buffer, AEDesc *result)
OSErr AEPutParamDesc(AppleEvent theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
OSErr InvokeAEEventHandlerUPP(const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon, AEEventHandlerUPP userUPP)
typedef CALLBACK_API(OSErr, AEEventHandlerProcPtr)(const AppleEvent *theAppleEvent
OSErr AEGetArray(const AEDescList *theAEDescList, AEArrayType arrayType, AEArrayDataPointer arrayPtr, Size maximumSize, DescType *itemType, Size *itemSize, long *itemCount)
OSErr AEPutArray(AEDescList *theAEDescList, AEArrayType arrayType, const AEArrayData *arrayPtr, DescType itemType, Size itemSize, long itemCount)
void DisposeAEEventHandlerUPP(AEEventHandlerUPP userUPP)
OSErr AESizeOfParam(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
ResType DescType
Definition: AEDataModel.h:165
OSStatus AEFlattenDesc(const AEDesc *theAEDesc, Ptr buffer, Size bufferSize, Size actualSize)
#define NewAEEventHandlerUPP(userRoutine)
Definition: AEDataModel.h:1091
OSErr AEPutAttributeDesc(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
Boolean AECheckIsRecord(const AEDesc *theDesc)
OSErr AEGetAttributeDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
OSErr AEDeleteParam(AppleEvent *theAppleEvent, AEKeyword theAEKeyword)
OSErr AEGetParamPtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
OSErr AESizeOfAttribute(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
AERecord AppleEvent
Definition: AEDataModel.h:195
OSErr AECreateAppleEvent(AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, AppleEvent *result)
@ kAutoGenerateReturnID
Definition: AEDataModel.h:158
@ kAnyTransactionID
Definition: AEDataModel.h:161
OSErr AEPutPtr(AEDescList *theAEDescList, long index, DescType typeCode, const void *dataPtr, Size dataSize)
AEDataStorageType * AEDataStorage
Definition: AEDataModel.h:173
OSErr AECountItems(const AEDescList *theAEDescList, long *theCount)
Count number of descriptor records in a descriptor list.
OSErr AEDeleteItem(AEDescList *theAEDescList, long index)
OSErr AEGetNthPtr(const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
AEDesc AEAddressDesc
Definition: AEDataModel.h:193
Size AESizeOfFlattenedDesc(const AEDesc *theAEDesc)
OSErr AEPutDesc(AEDescList *theAEDescList, long index, const AEDesc *theAEDesc)
OSErr AEGetParamDesc(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
OSErr AEPutParamPtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
OSErr AEGetAttributePtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
Basic Macintosh data types.
#define NULL
Definition: MacTypes.h:61
unsigned char Boolean
Definition: MacTypes.h:318
Mixed Mode Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Definition: AEDataModel.h:175
Definition: AEDataModel.h:182