Mac OS 9
AEDataModel.h File Reference

AppleEvent Data Model Interfaces. More...

#include <MacTypes.h>
#include <MixedMode.h>

Go to the source code of this file.

Data Structures

struct  AEDesc
 
struct  AEKeyDesc
 

Macros

#define NewAECoerceDescUPP(userRoutine)
 
#define NewAECoercePtrUPP(userRoutine)
 
#define DisposeAECoerceDescUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define DisposeAECoercePtrUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userUPP)
 
#define InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userUPP)
 
#define NewAECoerceDescProc(userRoutine)   NewAECoerceDescUPP(userRoutine)
 
#define NewAECoercePtrProc(userRoutine)   NewAECoercePtrUPP(userRoutine)
 
#define CallAECoerceDescProc(userRoutine, fromDesc, toType, handlerRefcon, toDesc)    InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userRoutine)
 
#define CallAECoercePtrProc(userRoutine, typeCode, dataPtr, dataSize, toType, handlerRefcon, result)
 
#define AEInitializeDescInline(__d)
 
#define AEPutKeyPtr(theAERecord, theAEKeyword, typeCode, dataPtr, dataSize)
 
#define AEPutKeyDesc(theAERecord, theAEKeyword, theAEDesc)    AEPutParamDesc((theAERecord), (theAEKeyword), (theAEDesc))
 
#define AEGetKeyPtr(theAERecord, theAEKeyword, desiredType, typeCode, dataPtr, maxSize, actualSize)
 
#define AEGetKeyDesc(theAERecord, theAEKeyword, desiredType, result)    AEGetParamDesc((theAERecord), (theAEKeyword), (desiredType), (result))
 
#define AESizeOfKeyDesc(theAERecord, theAEKeyword, typeCode, dataSize)    AESizeOfParam((theAERecord), (theAEKeyword), (typeCode), (dataSize))
 
#define AEDeleteKeyDesc(theAERecord, theAEKeyword)    AEDeleteParam((theAERecord), (theAEKeyword))
 
#define NewAEEventHandlerUPP(userRoutine)
 
#define DisposeAEEventHandlerUPP(userUPP)   DisposeRoutineDescriptor(userUPP)
 
#define InvokeAEEventHandlerUPP(theAppleEvent, reply, handlerRefcon, userUPP)
 
#define NewAEEventHandlerProc(userRoutine)   NewAEEventHandlerUPP(userRoutine)
 
#define CallAEEventHandlerProc(userRoutine, theAppleEvent, reply, handlerRefcon)    InvokeAEEventHandlerUPP(theAppleEvent, reply, handlerRefcon, userRoutine)
 

Typedefs

typedef ResType DescType
 
typedef FourCharCode AEKeyword
 
typedef Ptr AEDataStorageType
 
typedef AEDataStorageType * AEDataStorage
 
typedef struct AEDesc AEDesc
 
typedef AEDescAEDescPtr
 
typedef struct AEKeyDesc AEKeyDesc
 
typedef AEDesc AEDescList
 
typedef AEDescList AERecord
 
typedef AEDesc AEAddressDesc
 
typedef AERecord AppleEvent
 
typedef AppleEventAppleEventPtr
 
typedef SInt16 AEReturnID
 
typedef SInt32 AETransactionID
 
typedef FourCharCode AEEventClass
 
typedef FourCharCode AEEventID
 
typedef SInt8 AEArrayType
 
typedef AppleEventreply
 
typedef AppleEvent long handlerRefcon
 

Enumerations

enum  { typeBoolean = FOUR_CHAR_CODE('bool') , typeChar = FOUR_CHAR_CODE('TEXT') }
 
enum  {
  typeSInt16 = FOUR_CHAR_CODE('shor') , typeSInt32 = FOUR_CHAR_CODE('long') , typeUInt32 = FOUR_CHAR_CODE('magn') , typeSInt64 = FOUR_CHAR_CODE('comp') ,
  typeIEEE32BitFloatingPoint = FOUR_CHAR_CODE('sing') , typeIEEE64BitFloatingPoint = FOUR_CHAR_CODE('doub') , type128BitFloatingPoint = FOUR_CHAR_CODE('ldbl') , typeDecimalStruct = FOUR_CHAR_CODE('decm')
}
 
enum  {
  typeSMInt = typeSInt16 , typeShortInteger = typeSInt16 , typeInteger = typeSInt32 , typeLongInteger = typeSInt32 ,
  typeMagnitude = typeUInt32 , typeComp = typeSInt64 , typeSMFloat = typeIEEE32BitFloatingPoint , typeShortFloat = typeIEEE32BitFloatingPoint ,
  typeFloat = typeIEEE64BitFloatingPoint , typeLongFloat = typeIEEE64BitFloatingPoint , typeExtended = FOUR_CHAR_CODE('exte')
}
 
enum  {
  typeAEList = FOUR_CHAR_CODE('list') , typeAERecord = FOUR_CHAR_CODE('reco') , typeAppleEvent = FOUR_CHAR_CODE('aevt') , typeEventRecord = FOUR_CHAR_CODE('evrc') ,
  typeTrue = FOUR_CHAR_CODE('true') , typeFalse = FOUR_CHAR_CODE('fals') , typeAlias = FOUR_CHAR_CODE('alis') , typeEnumerated = FOUR_CHAR_CODE('enum') ,
  typeType = FOUR_CHAR_CODE('type') , typeAppParameters = FOUR_CHAR_CODE('appa') , typeProperty = FOUR_CHAR_CODE('prop') , typeFSS = FOUR_CHAR_CODE('fss ') ,
  typeFSRef = FOUR_CHAR_CODE('fsrf') , typeFileURL = FOUR_CHAR_CODE('furl') , typeKeyword = FOUR_CHAR_CODE('keyw') , typeSectionH = FOUR_CHAR_CODE('sect') ,
  typeWildCard = FOUR_CHAR_CODE('****') , typeApplSignature = FOUR_CHAR_CODE('sign') , typeQDRectangle = FOUR_CHAR_CODE('qdrt') , typeFixed = FOUR_CHAR_CODE('fixd') ,
  typeProcessSerialNumber = FOUR_CHAR_CODE('psn ') , typeApplicationURL = FOUR_CHAR_CODE('aprl') , typeNull = FOUR_CHAR_CODE('null')
}
 
enum  { typeSessionID = FOUR_CHAR_CODE('ssid') , typeTargetID = FOUR_CHAR_CODE('targ') , typeDispatcherID = FOUR_CHAR_CODE('dspt') }
 
enum  {
  keyTransactionIDAttr = FOUR_CHAR_CODE('tran') , keyReturnIDAttr = FOUR_CHAR_CODE('rtid') , keyEventClassAttr = FOUR_CHAR_CODE('evcl') , keyEventIDAttr = FOUR_CHAR_CODE('evid') ,
  keyAddressAttr = FOUR_CHAR_CODE('addr') , keyOptionalKeywordAttr = FOUR_CHAR_CODE('optk') , keyTimeoutAttr = FOUR_CHAR_CODE('timo') , keyInteractLevelAttr ,
  keyEventSourceAttr , keyMissedKeywordAttr , keyOriginalAddressAttr = FOUR_CHAR_CODE('from') , keyAcceptTimeoutAttr = FOUR_CHAR_CODE('actm')
}
 
enum  { kAEDescListFactorNone = 0 , kAEDescListFactorType = 4 , kAEDescListFactorTypeAndSize = 8 }
 
enum  { kAutoGenerateReturnID , kAnyTransactionID = 0 }
 
enum  { kAEDataArray = 0 , kAEPackedArray = 1 , kAEDescArray = 3 , kAEKeyDescArray = 4 }
 
enum  { kAEHandleArray = 2 }
 
enum  { uppAEEventHandlerProcInfo = 0x00000FE0 }
 

Functions

OSErr AECountItems (const AEDescList *theAEDescList, long *theCount)
 Count number of descriptor records in a descriptor list. More...
 
OSErr AEPutPtr (AEDescList *theAEDescList, long index, DescType typeCode, const void *dataPtr, Size dataSize)
 
OSErr AEPutDesc (AEDescList *theAEDescList, long index, const AEDesc *theAEDesc)
 
OSErr AEGetNthPtr (const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
 
OSErr AEGetNthDesc (const AEDescList *theAEDescList, long index, DescType desiredType, AEKeyword *theAEKeyword, AEDesc *result)
 
OSErr AESizeOfNthItem (const AEDescList *theAEDescList, long index, DescType *typeCode, Size *dataSize)
 
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)
 
OSErr AEDeleteItem (AEDescList *theAEDescList, long index)
 
Boolean AECheckIsRecord (const AEDesc *theDesc)
 
OSErr AECreateAppleEvent (AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc *target, AEReturnID returnID, AETransactionID transactionID, AppleEvent *result)
 
OSErr AEPutParamPtr (AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
 
OSErr AEPutParamDesc (AppleEvent theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
 
OSErr AEGetParamPtr (const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
 
OSErr AEGetParamDesc (const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
 
OSErr AESizeOfParam (const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
 
OSErr AEDeleteParam (AppleEvent *theAppleEvent, AEKeyword theAEKeyword)
 
OSErr AEGetAttributePtr (const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)
 
OSErr AEGetAttributeDesc (const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc *result)
 
OSErr AESizeOfAttribute (const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize)
 
OSErr AEPutAttributePtr (AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)
 
OSErr AEPutAttributeDesc (AppleEvent *theAppleEvent, AEKeyword theAEKeyword, const AEDesc *theAEDesc)
 
Size AESizeOfFlattenedDesc (const AEDesc *theAEDesc)
 
OSStatus AEFlattenDesc (const AEDesc *theAEDesc, Ptr buffer, Size bufferSize, Size actualSize)
 
OSStatus AEUnflattenDesc (Ptr buffer, AEDesc *result)
 
typedef CALLBACK_API (OSErr, AEEventHandlerProcPtr)(const AppleEvent *theAppleEvent
 
typedef STACK_UPP_TYPE (AEEventHandlerProcPtr) AEEventHandlerUPP
 
AEEventHandlerUPP NewAEEventHandlerUPP (AEEventHandlerProcPtr userRoutine)
 
void DisposeAEEventHandlerUPP (AEEventHandlerUPP userUPP)
 
OSErr InvokeAEEventHandlerUPP (const AppleEvent *theAppleEvent, AppleEvent *reply, long handlerRefcon, AEEventHandlerUPP userUPP)
 

Detailed Description

AppleEvent Data Model Interfaces.

Introduced In: Mac OS 9
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 1996-2001 by Apple Computer, Inc., all rights reserved

For bug reports, consult the following page on the World Wide Web:

http://developer.apple.com/bugreporter/

Macro Definition Documentation

◆ AEGetKeyPtr

#define AEGetKeyPtr (   theAERecord,
  theAEKeyword,
  desiredType,
  typeCode,
  dataPtr,
  maxSize,
  actualSize 
)
Value:
AEGetParamPtr((theAERecord), (theAEKeyword), (desiredType), (typeCode), \
(dataPtr), (maxSize), (actualSize))
OSErr AEGetParamPtr(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType *typeCode, void *dataPtr, Size maximumSize, Size *actualSize)

◆ AEInitializeDescInline

#define AEInitializeDescInline (   __d)
Value:
do \
{ \
AEDesc *d = __d; \
d->descriptorType = typeNull; \
d->dataHandle = NULL; \
} while (0)
#define NULL
Definition: MacTypes.h:61

◆ AEPutKeyPtr

#define AEPutKeyPtr (   theAERecord,
  theAEKeyword,
  typeCode,
  dataPtr,
  dataSize 
)
Value:
AEPutParamPtr((theAERecord), (theAEKeyword), (typeCode), (dataPtr), \
(dataSize))
OSErr AEPutParamPtr(AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void *dataPtr, Size dataSize)

Note: The following #defines map ©key© calls on AERecords into ©param© calls on AppleEvents. Although no errors are currently returned if AERecords are passed to ©param© calls and AppleEvents to ©key© calls, the behavior of this type of API-mixing is not explicitly documented in Inside Macintosh. It jtext losts that the ©key© calls have the same functionality as their ©param© counterparts. Since none of the ©key© calls are currently available in the PowerPC IntefaceLib, the #defines exploit the fact that ©key© and ©param© routines can be used interchangeably, and makes sure that every invocation of a ©key© API becomes an invocation of a ©param© API.

◆ CallAECoercePtrProc

#define CallAECoercePtrProc (   userRoutine,
  typeCode,
  dataPtr,
  dataSize,
  toType,
  handlerRefcon,
  result 
)
Value:
InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, \
result, userRoutine)

◆ InvokeAECoerceDescUPP

#define InvokeAECoerceDescUPP (   fromDesc,
  toType,
  handlerRefcon,
  toDesc,
  userUPP 
)
Value:
(OSErr) \
CALL_FOUR_PARAMETER_UPP((userUPP), uppAECoerceDescProcInfo, (fromDesc), \
(toType), (handlerRefcon), (toDesc))

◆ InvokeAECoercePtrUPP

#define InvokeAECoercePtrUPP (   typeCode,
  dataPtr,
  dataSize,
  toType,
  handlerRefcon,
  result,
  userUPP 
)
Value:
(OSErr) CALL_SIX_PARAMETER_UPP((userUPP), uppAECoercePtrProcInfo, \
(typeCode), (dataPtr), (dataSize), (toType), \
(handlerRefcon), (result))

◆ InvokeAEEventHandlerUPP

#define InvokeAEEventHandlerUPP (   theAppleEvent,
  reply,
  handlerRefcon,
  userUPP 
)
Value:
(OSErr) CALL_THREE_PARAMETER_UPP((userUPP), uppAEEventHandlerProcInfo, \
(theAppleEvent), (reply), (handlerRefcon))
Definition: AEDataModel.h:175

◆ NewAECoerceDescUPP

#define NewAECoerceDescUPP (   userRoutine)
Value:
(AECoerceDescUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoerceDescProcInfo, \
GetCurrentArchitecture())
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)

◆ NewAECoercePtrUPP

#define NewAECoercePtrUPP (   userRoutine)
Value:
(AECoercePtrUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoercePtrProcInfo, \
GetCurrentArchitecture())

◆ NewAEEventHandlerProc

#define NewAEEventHandlerProc (   userRoutine)    NewAEEventHandlerUPP(userRoutine)

support for pre-Carbon UPP routines: New...Proc and Call...Proc

◆ NewAEEventHandlerUPP

#define NewAEEventHandlerUPP (   userRoutine)
Value:
(AEEventHandlerUPP) \
NewRoutineDescriptor((ProcPtr)(userRoutine), uppAEEventHandlerProcInfo, \
GetCurrentArchitecture())

pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes)

Typedef Documentation

◆ AEAddressDesc

an AEDesc which contains address data

◆ AEDataStorage

typedef AEDataStorageType* AEDataStorage

OPAQUE_TOOLBOX_STRUCTS

◆ AEDescList

typedef AEDesc AEDescList

a list of AEDesc's is a special kind of AEDesc

◆ AERecord

AERecord is a list of keyworded AEDesc's

◆ AppleEvent

an AERecord that contains an AppleEvent, and related data types

◆ DescType

typedef ResType DescType

Apple event manager data types

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Non-preferred Apple event descriptor types

◆ anonymous enum

anonymous enum

More Apple event descriptor types

◆ anonymous enum

anonymous enum

Deprecated addressing modes under Carbon

◆ anonymous enum

anonymous enum

CALL_NOT_IN_CARBON Keywords for Apple event attributes

Enumerator
keyEventSourceAttr 

this attribute is read only - will be set in AESend

keyMissedKeywordAttr 

this attribute is read only - returned as typeShortInteger

keyOriginalAddressAttr 

this attribute is read only

keyAcceptTimeoutAttr 

new in 1.0.1

◆ anonymous enum

anonymous enum

Constants used for specifying the factoring of AEDescLists.

◆ anonymous enum

anonymous enum

Constants used creating an AppleEvent

Enumerator
kAutoGenerateReturnID 

Constant for the returnID param of AECreateAppleEvent

kAnyTransactionID 

AECreateAppleEvent will generate a session-unique ID Constant for transaction ID©s

◆ anonymous enum

anonymous enum

Apple event descriptor types

◆ anonymous enum

anonymous enum

Preferred numeric Apple event descriptor types

Function Documentation

◆ AECheckIsRecord()

Boolean AECheckIsRecord ( const AEDesc theDesc)

AECheckIsRecord()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ AECountItems()

OSErr AECountItems ( const AEDescList theAEDescList,
long *  theCount 
)

Count number of descriptor records in a descriptor list.

     
Copyright: THINK Reference © 1991-1992 Symantec Corporation
*/ union AEArrayData { short AEDataArray[]; /**< array of short integers*/ char AEPackedArray[]; /**< array of characters*/ Handle AEHandleArray[]; /**< array of Handles*/ AEDesc AEDescArray[]; /**< array of descriptor records*/ AEKeyDesc AEKeyDesc[]; /**< array of keyword-specified*/ } AEArrayData; /**< */ typedef union AEArrayData AEArrayData; typedef AEArrayData *AEArrayDataPointer; /*************************************************************************** These constants are used by AEMach and AEInteraction APIs. They are not strictly part of the data format, but are declared here due to layering. **************************************************************************/ typedef SInt16 AESendPriority; enum { kAENormalPriority = 0x00000000, /** post message at the end of the event queue */ kAEHighPriority = 0x00000001 /** post message at the front of the event queue (same as nAttnMsg) */ }; typedef SInt32 AESendMode; enum { kAENoReply = 0x00000001, /** sender doesn't want a reply to event */ kAEQueueReply = 0x00000002, /** sender wants a reply but won't wait */ kAEWaitReply = 0x00000003, /** sender wants a reply and will wait */ kAEDontReconnect = 0x00000080, /** don't reconnect if there is a sessClosedErr from PPCToolbox */ kAEWantReceipt = 0x00000200, /** (nReturnReceipt) sender wants a receipt of message */ kAENeverInteract = 0x00000010, /** server should not interact with user */ kAECanInteract = 0x00000020, /** server may try to interact with user */ kAEAlwaysInteract = 0x00000030, /** server should always interact with user where appropriate */ kAECanSwitchLayer = 0x00000040, /** interaction may switch layer */ kAEDontRecord = 0x00001000, /** don't record this event - available only in vers 1.0.1 and greater */ kAEDontExecute = 0x00002000, /** don't send the event for recording - available only in vers 1.0.1 and greater */ kAEProcessNonReplyEvents = 0x00008000 /** allow processing of non-reply events while awaiting synchronous AppleEvent reply */ }; /** Constants for timeout durations */ enum { kAEDefaultTimeout = -1, /** timeout value determined by AEM */ kNoTimeOut = -2 /** wait until reply comes back, however long it takes */ }; /*************************************************************************** These calls are used to set up and modify the coercion dispatch table. **************************************************************************/ typedef CALLBACK_API(OSErr, AECoerceDescProcPtr)(const AEDesc *fromDesc, DescType toType, long handlerRefcon, AEDesc *toDesc); typedef CALLBACK_API(OSErr, AECoercePtrProcPtr)(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, long handlerRefcon, AEDesc *result); typedef STACK_UPP_TYPE(AECoerceDescProcPtr) AECoerceDescUPP; typedef STACK_UPP_TYPE(AECoercePtrProcPtr) AECoercePtrUPP; /** NewAECoerceDescUPP()
Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ AECoerceDescUPP NewAECoerceDescUPP(AECoerceDescProcPtr userRoutine); enum { uppAECoerceDescProcInfo = 0x00003FE0 }; /** pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */ #define NewAECoerceDescUPP(userRoutine) /** NewAECoercePtrUPP()
Carbon Lib:@par Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ AECoercePtrUPP NewAECoercePtrUPP(AECoercePtrProcPtr userRoutine); enum { uppAECoercePtrProcInfo = 0x0003FFE0 }; /** pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */ #define NewAECoercePtrUPP(userRoutine) /** DisposeAECoerceDescUPP()
Carbon Lib:
Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ void DisposeAECoerceDescUPP(AECoerceDescUPP userUPP); #define DisposeAECoerceDescUPP(userUPP) /** DisposeAECoercePtrUPP()
Carbon Lib:
Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ void DisposeAECoercePtrUPP(AECoercePtrUPP userUPP); #define DisposeAECoercePtrUPP(userUPP) /** InvokeAECoerceDescUPP()
Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr InvokeAECoerceDescUPP(const AEDesc *fromDesc, DescType toType, long handlerRefcon, AEDesc *toDesc, AECoerceDescUPP userUPP); #define InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userUPP) /**
Carbon Lib:
InvokeAECoercePtrUPP()
Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr InvokeAECoercePtrUPP(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, long handlerRefcon, AEDesc *result, AECoercePtrUPP userUPP); #define InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userUPP) /** support for pre-Carbon UPP routines: New...Proc and Call...Proc */ #define NewAECoerceDescProc(userRoutine) #define NewAECoercePtrProc(userRoutine) #define CallAECoerceDescProc(userRoutine, fromDesc, toType, handlerRefcon, toDesc) #define CallAECoercePtrProc(userRoutine, typeCode, dataPtr, dataSize, toType, handlerRefcon, result) /** CALL_NOT_IN_CARBON */ /** a AECoercionHandlerUPP is by default a AECoerceDescUPP. If you are registering a Ptr based coercion handler you will have to add a cast to AECoerceDescUPP from your AECoercePtrUPP type. A future release of the interfaces will fix this by introducing seperate Desc and Ptr coercion handler installation/remove/query routines. */ typedef AECoercionHandlerUPP AECoercionHandlerUPP; /** AEInstallCoercionHandler()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AEInstallCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, long handlerRefcon, Boolean fromTypeIsDesc, Boolean isSysHandler); /** AERemoveCoercionHandler()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AERemoveCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP handler, Boolean isSysHandler); /** AEGetCoercionHandler()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AEGetCoercionHandler(DescType fromType, DescType toType, AECoercionHandlerUPP *handler, long *handlerRefcon, Boolean *fromTypeIsDesc, Boolean isSysHandler); /*************************************************************************** The following calls provide for a coercion interface. **************************************************************************/ /** AECoercePtr()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AECoercePtr(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, AEDesc *result); /** AECoerceDesc()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AECoerceDesc(const AEDesc *theAEDesc, DescType toType, AEDesc *result); /*************************************************************************** The function calls apply to any AEDesc. Every 'result' descriptor is created for you, so you will be responsible for memory management (including disposing) of the descriptors so created. **************************************************************************/ /** because AEDescs are opaque under Carbon, this AEInitializeDesc provides a 'clean' way of initializating them to be empty. */ /** AEInitializeDesc()
Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later
*/ void AEInitializeDesc(AEDesc *desc); #define AEInitializeDescInline(__d) /** AECreateDesc()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AECreateDesc( DescType typeCode, const void *dataPtr, Size dataSize, AEDesc *result); /** AEDisposeDesc()
Carbon Lib:@par Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AEDisposeDesc(AEDesc *theAEDesc); /** AEDuplicateDesc()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AEDuplicateDesc(const AEDesc *theAEDesc, AEDesc *result); /*************************************************************************** The following calls apply to AEDescList. Since AEDescList is a subtype of AEDesc, the calls in the previous section can also be used for AEDescList. All list and array indices are 1-based. If the data was greater than maximumSize in the routines below, then actualSize will be greater than maximumSize, but only maximumSize bytes will actually be retrieved. **************************************************************************/ /** AECreateList()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later
*/ OSErr AECreateList(const void *factoringPtr, Size factoredSize, Boolean isRecord, AEDescList *resultList); /**
You can use the AECountItems function to count the number of descriptor
  records in any descriptor list.
  The AECountItems function counts the number of descriptor records in a
  descriptor list .
  The parameter theAEDescList is the descriptor list to be counted.
  The AECountItems function returns the number of descriptor records in the
  list in the parameter theCount .
  For an example program showing use of AECountItems , see the description
  of Open Documents Event .
  Result codes
  noErr(0)No error
  errAENotAEDesc (-1704) Not a valid descriptor record
  
Copyright: THINK Reference © 1991-1992 Symantec Corporation

◆ AECreateAppleEvent()

OSErr AECreateAppleEvent ( AEEventClass  theAEEventClass,
AEEventID  theAEEventID,
const AEAddressDesc target,
AEReturnID  returnID,
AETransactionID  transactionID,
AppleEvent result 
)

AECreateAppleEvent()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEDeleteItem()

OSErr AEDeleteItem ( AEDescList theAEDescList,
long  index 
)

AEDeleteItem()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEDeleteParam()

OSErr AEDeleteParam ( AppleEvent theAppleEvent,
AEKeyword  theAEKeyword 
)

AEDeleteParam()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEFlattenDesc()

OSStatus AEFlattenDesc ( const AEDesc theAEDesc,
Ptr  buffer,
Size  bufferSize,
Size  actualSize 
)

AEFlattenDesc Fills buffer with a flattened representation of the AEDesc and returns the amount of buffer used in actualSize. If bufferSize was too small it returns errAEBufferTooSmall (-1741) and does not fill in any of the buffer. The resulting buffer is only useful with an AEUnflattenDesc call.

Note: if you pass a NULL buffer pointer it returns noErr but fills in the actualSize field anyway. AEFlattenDesc()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ AEGetArray()

OSErr AEGetArray ( const AEDescList theAEDescList,
AEArrayType  arrayType,
AEArrayDataPointer  arrayPtr,
Size  maximumSize,
DescType itemType,
Size *  itemSize,
long *  itemCount 
)

AEGetArray()

Carbon Lib:
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEGetAttributeDesc()

OSErr AEGetAttributeDesc ( const AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
DescType  desiredType,
AEDesc result 
)

AEGetAttributeDesc()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEGetAttributePtr()

OSErr AEGetAttributePtr ( const AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
DescType  desiredType,
DescType typeCode,
void *  dataPtr,
Size  maximumSize,
Size *  actualSize 
)

AEGetAttributePtr()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Carbon Lib: in version 10.0 and later

◆ AEGetNthDesc()

OSErr AEGetNthDesc ( const AEDescList theAEDescList,
long  index,
DescType  desiredType,
AEKeyword *  theAEKeyword,
AEDesc result 
)

AEGetNthDesc()

Carbon Lib:
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEGetNthPtr()

OSErr AEGetNthPtr ( const AEDescList theAEDescList,
long  index,
DescType  desiredType,
AEKeyword *  theAEKeyword,
DescType typeCode,
void *  dataPtr,
Size  maximumSize,
Size *  actualSize 
)

AEGetNthPtr()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEGetParamDesc()

OSErr AEGetParamDesc ( const AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
DescType  desiredType,
AEDesc result 
)

AEGetParamDesc()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Carbon Lib: in version 10.0 and later

◆ AEGetParamPtr()

OSErr AEGetParamPtr ( const AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
DescType  desiredType,
DescType typeCode,
void *  dataPtr,
Size  maximumSize,
Size *  actualSize 
)

AEGetParamPtr()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEPutArray()

OSErr AEPutArray ( AEDescList theAEDescList,
AEArrayType  arrayType,
const AEArrayData *  arrayPtr,
DescType  itemType,
Size  itemSize,
long  itemCount 
)
Carbon Lib:
AEPutArray()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEPutAttributeDesc()

OSErr AEPutAttributeDesc ( AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
const AEDesc theAEDesc 
)

AEPutAttributeDesc()

Carbon Lib:
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEPutAttributePtr()

OSErr AEPutAttributePtr ( AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
DescType  typeCode,
const void *  dataPtr,
Size  dataSize 
)

AEPutAttributePtr()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEPutDesc()

OSErr AEPutDesc ( AEDescList theAEDescList,
long  index,
const AEDesc theAEDesc 
)

AEPutDesc()

Carbon Lib:
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEPutParamDesc()

OSErr AEPutParamDesc ( AppleEvent  theAppleEvent,
AEKeyword  theAEKeyword,
const AEDesc theAEDesc 
)

AEPutParamDesc()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEPutParamPtr()

OSErr AEPutParamPtr ( AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
DescType  typeCode,
const void *  dataPtr,
Size  dataSize 
)

AEPutParamPtr()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEPutPtr()

OSErr AEPutPtr ( AEDescList theAEDescList,
long  index,
DescType  typeCode,
const void *  dataPtr,
Size  dataSize 
)

AEPutPtr()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AESizeOfAttribute()

OSErr AESizeOfAttribute ( const AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
DescType typeCode,
Size *  dataSize 
)

AESizeOfAttribute()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AESizeOfFlattenedDesc()

Size AESizeOfFlattenedDesc ( const AEDesc theAEDesc)

AEFlattenDesc Returns the amount of buffer space needed to flatten the AEDesc. Call this before AEFlattenDesc to make sure your buffer has enough room for the operation. AESizeOfFlattenedDesc()

Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ AESizeOfNthItem()

OSErr AESizeOfNthItem ( const AEDescList theAEDescList,
long  index,
DescType typeCode,
Size *  dataSize 
)
Carbon Lib:
AESizeOfNthItem()
Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AESizeOfParam()

OSErr AESizeOfParam ( const AppleEvent theAppleEvent,
AEKeyword  theAEKeyword,
DescType typeCode,
Size *  dataSize 
)

AESizeOfParam()

Non-Carbon CFM: in InterfaceLib 7.1 and later
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ AEUnflattenDesc()

OSStatus AEUnflattenDesc ( Ptr  buffer,
AEDesc result 
)

AEUnflattenDesc Allocates an AEDesc (given a Null Desc) given a flattened data buffer. It assumes it was given a good buffer filled in by AEFlattenDesc. It returns paramErr if it discovers something fishy about the buffer. AEUnflattenDesc()

Carbon Lib:@par Non-Carbon CFM: not available
Carbon Lib: in CarbonLib 1.4 and later
Mac OS X: in version 10.0 and later

◆ CALLBACK_API()

typedef CALLBACK_API ( OSErr  ,
AEEventHandlerProcPtr   
) const

ACCESSOR_CALLS_ARE_FUNCTIONS

◆ DisposeAEEventHandlerUPP()

void DisposeAEEventHandlerUPP ( AEEventHandlerUPP  userUPP)

DisposeAEEventHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ InvokeAEEventHandlerUPP()

OSErr InvokeAEEventHandlerUPP ( const AppleEvent theAppleEvent,
AppleEvent reply,
long  handlerRefcon,
AEEventHandlerUPP  userUPP 
)

InvokeAEEventHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later

◆ NewAEEventHandlerUPP()

AEEventHandlerUPP NewAEEventHandlerUPP ( AEEventHandlerProcPtr  userRoutine)

NewAEEventHandlerUPP()

Non-Carbon CFM: available as macro/inline
Carbon Lib: in CarbonLib 1.0 and later
Mac OS X: in version 10.0 and later