A
download AEDataModel.h
Language: C
Copyright: (c) 1996-2001 by Apple Computer, Inc., all rights reserved
LOC: 389
Project Info
guliverkli
Server: SourceForge
Type: cvs
...rkli\guliverkli\include\qt\
   ADSP.h
   ADSPSecure.h
   AEDataModel.h
   AEObjects.h
   AEPackObject.h
   AERegistry.h
   AEUserTermTypes.h
   AGP.h
   AIFF.h
   Aliases.h
   Appearance.h
   AppleEvents.h
   AppleGuide.h
   AppleScript.h
   AppleTalk.h
   ASDebugging.h
   ASRegistry.h
   ATA.h
   ATSLayoutTypes.h
   ATSTypes.h
   ATSUnicode.h
   AVComponents.h
   AVLTree.h
   Balloons.h
   CarbonEvents.h
   CardServices.h
   CFArray.h
   CFBag.h
   CFBase.h
   CFBundle.h
   CFCharacterSet.h
   CFData.h
   CFDate.h
   CFDictionary.h
   CFNumber.h
   CFPlugIn.h
   CFPreferences.h
   CFPropertyList.h
   CFSet.h
   CFString.h
   CFStringEncodingExt.h
   CFTimeZone.h
   CFURL.h
   CFURLAccess.h
   CMAcceleration.h
   CMApplication.h
   CMCalibrator.h
   CMComponent.h
   CMConversions.h
   CMICCProfile.h
   CMMComponent.h
   CMPRComponent.h
   CMScriptingPlugin.h
   CodeFragments.h
   Collections.h
   ColorPicker.h
   ColorPickerComponents.h
   CommResources.h
   Components.h
   ConditionalMacros.h
   Connections.h
   ConnectionTools.h
   ControlDefinitions.h
   Controls.h
   ControlStrip.h
   CoreFoundation.h
   CRMSerialDevices.h
   CryptoMessageSyntax.h
   CTBUtilities.h
   CursorDevices.h
   DatabaseAccess.h
   DateTimeUtils.h
   Debugging.h
   DeskBus.h
   DeviceControl.h
   Devices.h
   Dialogs.h
   Dictionary.h
   DigitalSignature.h
   DiskInit.h
   Disks.h
   Displays.h
   Drag.h
   DrawSprocket.h
   DriverFamilyMatching.h
   DriverGestalt.h
   DriverServices.h
   DriverSupport.h
   DriverSynchronization.h
   Editions.h
   Endian.h
   ENET.h
   EPPC.h
   Events.h
   fenv.h
   Files.h
   FileSigning.h
   FileTransfers.h
   FileTransferTools.h
   FileTypesAndCreators.h
   FindByContent.h
   Finder.h
   FinderRegistry.h
   FixMath.h
   Folders.h
   Fonts.h
   FontSync.h
   fp.h
   FSM.h
   Gestalt.h
   GXEnvironment.h
   GXErrors.h
   GXFonts.h
   GXGraphics.h
   GXLayout.h
   GXMath.h
   GXMessages.h
   GXPrinterDrivers.h
   GXPrinting.h
   GXTypes.h
   HFSVolumes.h
   HID.h
   HTMLRendering.h
   HyperXCmd.h
   IAExtractor.h
   Icons.h
   ImageCodec.h
   ImageCompression.h
   InputSprocket.h
   Interrupts.h
   IntlResources.h
   IsochronousDataHandler.h
   JManager.h
   Kernel.h
   LanguageAnalysis.h
   Lists.h
   LocationManager.h
   LowMem.h
   MacErrors.h
   MacHelp.h
   MachineExceptions.h
   MacMemory.h
   MacTCP.h
   MacTypes.h
   MacWindows.h
   Math64.h
   MediaHandlers.h
   Menus.h
   MIDI.h
   MixedMode.h
   MovieManager.h
   Movies.h
   MoviesFormat.h
   Multiprocessing.h
   NameRegistry.h
   Navigation.h
   NetSprocket.h
   NetworkSetup.h
   Notification.h
   NSL.h
   NSLUtility.h
   NumberFormatting.h
   OCE.h
   OCEAuthDir.h
   OCEErrors.h
   OCEMail.h
   OCEMessaging.h
   OCEStandardDirectory.h
   OCEStandardMail.h
   OCETemplates.h
   OpenTransportKernel.h
   OpenTransportProtocol.h
   OpenTransportProviders.h
   OpenTransportUNIX.h
   OSA.h
   OSAComp.h
   OSAGeneric.h
   OSUtils.h
   Packages.h
   Palettes.h
   Patches.h
   PCCard.h
   PCCardAdapterPlugin.h
   PCCardEnablerPlugin.h
   PCCardTuples.h
   PCI.h
   PEFBinaryFormat.h
   PictUtils.h
   PLStringFuncs.h
   Power.h
   PPCToolbox.h
   Printing.h
   Processes.h
   QD3D.h
   QD3DAcceleration.h
   QD3DCamera.h
   QD3DController.h
   QD3DCustomElements.h
   QD3DDrawContext.h
   QD3DErrors.h
   QD3DExtension.h
   QD3DGeometry.h
   QD3DGroup.h
   QD3DIO.h
   QD3DLight.h
   QD3DMath.h
   QD3DPick.h
   QD3DRenderer.h
   QD3DSet.h
   QD3DShader.h
   QD3DStorage.h
   QD3DString.h
   QD3DStyle.h
   QD3DTransform.h
   QD3DView.h
   QD3DViewer.h
   QD3DWinViewer.h
   QDOffscreen.h
   qt.h
   QTContentRestrictions.h
   QTML.h
   QTSMovie.h
   QTStreamingComponents.h
   Quickdraw.h
   QuickdrawText.h
   QuickTimeComponents.h
   QuickTimeMusic.h
   QuickTimeStreaming.h
   QuickTimeVR.h
   QuickTimeVRFormat.h
   RAVE.h
   RAVESystem.h
   Resources.h
   Retrace.h
   ROMDefs.h
   ScalerStreamTypes.h
   ScalerTypes.h
   Scrap.h
   Script.h
   SCSI.h
   SegLoad.h
   Serial.h
   SFNTLayoutTypes.h
   SFNTTypes.h
   ShutDown.h
   Slots.h
   SocketServices.h
   Sound.h
   SoundComponents.h
   SoundInput.h
   SoundSprocket.h
   Speech.h
   SpeechRecognition.h
   SpeechSynthesis.h
   StandardFile.h
   Start.h
   StringCompare.h
   Strings.h
   Telephones.h
   Terminals.h
   TerminalTools.h
   TextCommon.h
   TextEdit.h
   TextEncodingConverter.h
   TextServices.h
   TextUtils.h
   Threads.h
   Timer.h
   ToolUtils.h
   Translation.h
   TranslationExtensions.h
   Traps.h
   TSMTE.h
   Unicode.h
   UnicodeConverter.h
   UnicodeUtilities.h
   URLAccess.h
   UTCUtils.h
   Video.h
   VideoServices.h
   WorldScript.h
   ZoomedVideo.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
/*
     File:       AEDataModel.h
 
     Contains:   AppleEvent Data Model Interfaces.
 
     Version:    Technology: System 7.5
                 Release:    QuickTime 6.0.2
 
     Copyright:  (c) 1996-2001 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 __AEDATAMODEL__
#define __AEDATAMODEL__

#ifndef __MACTYPES__
#include "MacTypes.h"
#endif

#ifndef __MIXEDMODE__
#include "MixedMode.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

/* Apple event descriptor types */
enum {
    typeBoolean                 = FOUR_CHAR_CODE('bool'),
    typeChar                    = FOUR_CHAR_CODE('TEXT')
};

/* Preferred numeric Apple event descriptor types */
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')
};

/* Non-preferred Apple event descriptor types */
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')
};

/* More Apple event descriptor types */
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 '),
    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'),
    typeSessionID               = FOUR_CHAR_CODE('ssid'),
    typeTargetID                = FOUR_CHAR_CODE('targ'),
    typeProcessSerialNumber     = FOUR_CHAR_CODE('psn '),
    typeKernelProcessID         = FOUR_CHAR_CODE('kpid'),
    typeDispatcherID            = FOUR_CHAR_CODE('dspt'),
    typeNull                    = FOUR_CHAR_CODE('null')        /* null or nonexistent data */
};

/* Keywords for Apple event attributes */
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        = FOUR_CHAR_CODE('inte'),       /* this attribute is read only - will be set in AESend */
    keyEventSourceAttr          = FOUR_CHAR_CODE('esrc'),       /* this attribute is read only */
    keyMissedKeywordAttr        = FOUR_CHAR_CODE('miss'),       /* this attribute is read only */
    keyOriginalAddressAttr      = FOUR_CHAR_CODE('from')        /* new in 1.0.1 */
};


/*  Constants used for specifying the factoring of AEDescLists. */
enum {
    kAEDescListFactorNone       = 0,
    kAEDescListFactorType       = 4,
    kAEDescListFactorTypeAndSize = 8
};

/* Constants used creating an AppleEvent */
enum {
                                                                /* Constant for the returnID param of AECreateAppleEvent */
    kAutoGenerateReturnID       = -1,                           /* AECreateAppleEvent will generate a session-unique ID */
                                                                /* Constant for transaction ID's */
    kAnyTransactionID           = 0                             /* no transaction is in use */
};

/* Apple event manager data types */
typedef ResType                         DescType;
typedef FourCharCode                    AEKeyword;
#if OPAQUE_TOOLBOX_STRUCTS
typedef struct OpaqueAEDataStorage*     AEDataStorage;
#else
typedef Handle                          AEDataStorage;
#endif  /* OPAQUE_TOOLBOX_STRUCTS */


struct AEDesc {
    DescType                        descriptorType;
    AEDataStorage                   dataHandle;
};
typedef struct AEDesc                   AEDesc;
typedef AEDesc *                        AEDescPtr;

struct AEKeyDesc {
    AEKeyword                       descKey;
    AEDesc                          descContent;
};
typedef struct AEKeyDesc                AEKeyDesc;
/* a list of AEDesc's is a special kind of AEDesc */

typedef AEDesc                          AEDescList;
/* AERecord is a list of keyworded AEDesc's */
typedef AEDescList                      AERecord;
/* an AEDesc which contains address data */
typedef AEDesc                          AEAddressDesc;
/* an AERecord that contains an AppleEvent, and related data types */
typedef AERecord                        AppleEvent;
typedef AppleEvent *                    AppleEventPtr;
typedef SInt16                          AEReturnID;
typedef SInt32                          AETransactionID;
typedef FourCharCode                    AEEventClass;
typedef FourCharCode                    AEEventID;
typedef SInt8                           AEArrayType;
enum {
    kAEDataArray                = 0,
    kAEPackedArray              = 1,
    kAEDescArray                = 3,
    kAEKeyDescArray             = 4
};


enum {
    kAEHandleArray              = 2
};


union AEArrayData {
    short                           kAEDataArray[1];
    char                            kAEPackedArray[1];
    Handle                          kAEHandleArray[1];
    AEDesc                          kAEDescArray[1];
    AEKeyDesc                       kAEKeyDescArray[1];
};
typedef union AEArrayData               AEArrayData;
typedef AEArrayData *                   AEArrayDataPointer;

/**************************************************************************
  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;
#if OPAQUE_UPP_TYPES
    EXTERN_API(AECoerceDescUPP)
    NewAECoerceDescUPP             (AECoerceDescProcPtr     userRoutine);

    EXTERN_API(AECoercePtrUPP)
    NewAECoercePtrUPP              (AECoercePtrProcPtr      userRoutine);

    EXTERN_API(void)
    DisposeAECoerceDescUPP         (AECoerceDescUPP         userUPP);

    EXTERN_API(void)
    DisposeAECoercePtrUPP          (AECoercePtrUPP          userUPP);

    EXTERN_API(OSErr)
    InvokeAECoerceDescUPP          (const AEDesc *          fromDesc,
                                    DescType                toType,
                                    long                    handlerRefcon,
                                    AEDesc *                toDesc,
                                    AECoerceDescUPP         userUPP);

    EXTERN_API(OSErr)
    InvokeAECoercePtrUPP           (DescType                typeCode,
                                    const void *            dataPtr,
                                    Size                    dataSize,
                                    DescType                toType,
                                    long                    handlerRefcon,
                                    AEDesc *                result,
                                    AECoercePtrUPP          userUPP);

#else
    enum { uppAECoerceDescProcInfo = 0x00003FE0 };                  /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes) */
    enum { uppAECoercePtrProcInfo = 0x0003FFE0 };                   /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
    #define NewAECoerceDescUPP(userRoutine)                         (AECoerceDescUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoerceDescProcInfo, GetCurrentArchitecture())
    #define NewAECoercePtrUPP(userRoutine)                          (AECoercePtrUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppAECoercePtrProcInfo, GetCurrentArchitecture())
    #define DisposeAECoerceDescUPP(userUPP)                         DisposeRoutineDescriptor(userUPP)
    #define DisposeAECoercePtrUPP(userUPP)                          DisposeRoutineDescriptor(userUPP)
    #define InvokeAECoerceDescUPP(fromDesc, toType, handlerRefcon, toDesc, userUPP)  (OSErr)CALL_FOUR_PARAMETER_UPP((userUPP), uppAECoerceDescProcInfo, (fromDesc), (toType), (handlerRefcon), (toDesc))
    #define InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userUPP)  (OSErr)CALL_SIX_PARAMETER_UPP((userUPP), uppAECoercePtrProcInfo, (typeCode), (dataPtr), (dataSize), (toType), (handlerRefcon), (result))
#endif
/* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
#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) InvokeAECoercePtrUPP(typeCode, dataPtr, dataSize, toType, handlerRefcon, result, userRoutine)

typedef UniversalProcPtr                AECoercionHandlerUPP;
EXTERN_API( OSErr )
AEInstallCoercionHandler        (DescType               fromType,
                                 DescType               toType,
                                 AECoercionHandlerUPP   handler,
                                 long                   handlerRefcon,
                                 Boolean                fromTypeIsDesc,
                                 Boolean                isSysHandler)                       THREEWORDINLINE(0x303C, 0x0A22, 0xA816);

EXTERN_API( OSErr )
AERemoveCoercionHandler         (DescType               fromType,
                                 DescType               toType,
                                 AECoercionHandlerUPP   handler,
                                 Boolean                isSysHandler)                       THREEWORDINLINE(0x303C, 0x0723, 0xA816);

EXTERN_API( OSErr )
AEGetCoercionHandler            (DescType               fromType,
                                 DescType               toType,
                                 AECoercionHandlerUPP * handler,
                                 long *                 handlerRefcon,
                                 Boolean *              fromTypeIsDesc,
                                 Boolean                isSysHandler)                       THREEWORDINLINE(0x303C, 0x0B24, 0xA816);

/**************************************************************************
  The following calls provide for a coercion interface.
**************************************************************************/
EXTERN_API( OSErr )
AECoercePtr                     (DescType               typeCode,
                                 const void *           dataPtr,
                                 Size                   dataSize,
                                 DescType               toType,
                                 AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0A02, 0xA816);

EXTERN_API( OSErr )
AECoerceDesc                    (const AEDesc *         theAEDesc,
                                 DescType               toType,
                                 AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0603, 0xA816);


/**************************************************************************
 The following 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.  
**************************************************************************/
EXTERN_API( OSErr )
AECreateDesc                    (DescType               typeCode,
                                 const void *           dataPtr,
                                 Size                   dataSize,
                                 AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0825, 0xA816);

EXTERN_API( OSErr )
AEDisposeDesc                   (AEDesc *               theAEDesc)                          THREEWORDINLINE(0x303C, 0x0204, 0xA816);

EXTERN_API( OSErr )
AEDuplicateDesc                 (const AEDesc *         theAEDesc,
                                 AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0405, 0xA816);


/**************************************************************************
  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.
**************************************************************************/
EXTERN_API( OSErr )
AECreateList                    (const void *           factoringPtr,
                                 Size                   factoredSize,
                                 Boolean                isRecord,
                                 AEDescList *           resultList)                         THREEWORDINLINE(0x303C, 0x0706, 0xA816);

EXTERN_API( OSErr )
AECountItems                    (const AEDescList *     theAEDescList,
                                 long *                 theCount)                           THREEWORDINLINE(0x303C, 0x0407, 0xA816);

EXTERN_API( OSErr )
AEPutPtr                        (AEDescList *           theAEDescList,
                                 long                   index,
                                 DescType               typeCode,
                                 const void *           dataPtr,
                                 Size                   dataSize)                           THREEWORDINLINE(0x303C, 0x0A08, 0xA816);

EXTERN_API( OSErr )
AEPutDesc                       (AEDescList *           theAEDescList,
                                 long                   index,
                                 const AEDesc *         theAEDesc)                          THREEWORDINLINE(0x303C, 0x0609, 0xA816);

EXTERN_API( OSErr )
AEGetNthPtr                     (const AEDescList *     theAEDescList,
                                 long                   index,
                                 DescType               desiredType,
                                 AEKeyword *            theAEKeyword,
                                 DescType *             typeCode,
                                 void *                 dataPtr,
                                 Size                   maximumSize,
                                 Size *                 actualSize)                         THREEWORDINLINE(0x303C, 0x100A, 0xA816);

EXTERN_API( OSErr )
AEGetNthDesc                    (const AEDescList *     theAEDescList,
                                 long                   index,
                                 DescType               desiredType,
                                 AEKeyword *            theAEKeyword,
                                 AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0A0B, 0xA816);

EXTERN_API( OSErr )
AESizeOfNthItem                 (const AEDescList *     theAEDescList,
                                 long                   index,
                                 DescType *             typeCode,
                                 Size *                 dataSize)                           THREEWORDINLINE(0x303C, 0x082A, 0xA816);

EXTERN_API( OSErr )
AEGetArray                      (const AEDescList *     theAEDescList,
                                 AEArrayType            arrayType,
                                 AEArrayDataPointer     arrayPtr,
                                 Size                   maximumSize,
                                 DescType *             itemType,
                                 Size *                 itemSize,
                                 long *                 itemCount)                          THREEWORDINLINE(0x303C, 0x0D0C, 0xA816);

EXTERN_API( OSErr )
AEPutArray                      (AEDescList *           theAEDescList,
                                 AEArrayType            arrayType,
                                 const AEArrayData *    arrayPtr,
                                 DescType               itemType,
                                 Size                   itemSize,
                                 long                   itemCount)                          THREEWORDINLINE(0x303C, 0x0B0D, 0xA816);

EXTERN_API( OSErr )
AEDeleteItem                    (AEDescList *           theAEDescList,
                                 long                   index)                              THREEWORDINLINE(0x303C, 0x040E, 0xA816);


/**************************************************************************
 The following calls apply to AERecord. Since AERecord is a subtype of
 AEDescList, the calls in the previous sections can also be used for
 AERecord an AERecord can be created by using AECreateList with isRecord
 set to true. 
**************************************************************************/
/*
  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 just happens 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 
  invokation of a "key" API becomes an invokation of a "param" API.
*/
#define AEPutKeyPtr(theAERecord, theAEKeyword, typeCode, dataPtr, dataSize) \
    AEPutParamPtr((theAERecord), (theAEKeyword), (typeCode), (dataPtr), (dataSize))
#define AEPutKeyDesc(theAERecord, theAEKeyword, theAEDesc) \
    AEPutParamDesc((theAERecord), (theAEKeyword), (theAEDesc))
#define AEGetKeyPtr(theAERecord, theAEKeyword, desiredType, typeCode, dataPtr, maxSize, actualSize) \
    AEGetParamPtr((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))
/**************************************************************************
  The following calls create and manipulate the AppleEvent data type.
**************************************************************************/
EXTERN_API( OSErr )
AECreateAppleEvent              (AEEventClass           theAEEventClass,
                                 AEEventID              theAEEventID,
                                 const AEAddressDesc *  target,
                                 AEReturnID             returnID,
                                 AETransactionID        transactionID,
                                 AppleEvent *           result)                             THREEWORDINLINE(0x303C, 0x0B14, 0xA816);


/**************************************************************************
  The following calls are used to pack and unpack parameters from records
  of type AppleEvent. Since AppleEvent is a subtype of AERecord, the calls
  in the previous sections can also be used for variables of type
  AppleEvent. The next six calls are in fact identical to the six calls
  for AERecord.
**************************************************************************/
EXTERN_API( OSErr )
AEPutParamPtr                   (AppleEvent *           theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 DescType               typeCode,
                                 const void *           dataPtr,
                                 Size                   dataSize)                           THREEWORDINLINE(0x303C, 0x0A0F, 0xA816);

EXTERN_API( OSErr )
AEPutParamDesc                  (AppleEvent *           theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 const AEDesc *         theAEDesc)                          THREEWORDINLINE(0x303C, 0x0610, 0xA816);

EXTERN_API( OSErr )
AEGetParamPtr                   (const AppleEvent *     theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 DescType               desiredType,
                                 DescType *             typeCode,
                                 void *                 dataPtr,
                                 Size                   maximumSize,
                                 Size *                 actualSize)                         THREEWORDINLINE(0x303C, 0x0E11, 0xA816);

EXTERN_API( OSErr )
AEGetParamDesc                  (const AppleEvent *     theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 DescType               desiredType,
                                 AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0812, 0xA816);

EXTERN_API( OSErr )
AESizeOfParam                   (const AppleEvent *     theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 DescType *             typeCode,
                                 Size *                 dataSize)                           THREEWORDINLINE(0x303C, 0x0829, 0xA816);

EXTERN_API( OSErr )
AEDeleteParam                   (AppleEvent *           theAppleEvent,
                                 AEKeyword              theAEKeyword)                       THREEWORDINLINE(0x303C, 0x0413, 0xA816);



/**************************************************************************
 The following calls also apply to type AppleEvent. Message attributes are
 far more restricted, and can only be accessed through the following 5
 calls. The various list and record routines cannot be used to access the
 attributes of an event. 
**************************************************************************/
EXTERN_API( OSErr )
AEGetAttributePtr               (const AppleEvent *     theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 DescType               desiredType,
                                 DescType *             typeCode,
                                 void *                 dataPtr,
                                 Size                   maximumSize,
                                 Size *                 actualSize)                         THREEWORDINLINE(0x303C, 0x0E15, 0xA816);

EXTERN_API( OSErr )
AEGetAttributeDesc              (const AppleEvent *     theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 DescType               desiredType,
                                 AEDesc *               result)                             THREEWORDINLINE(0x303C, 0x0826, 0xA816);

EXTERN_API( OSErr )
AESizeOfAttribute               (const AppleEvent *     theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 DescType *             typeCode,
                                 Size *                 dataSize)                           THREEWORDINLINE(0x303C, 0x0828, 0xA816);

EXTERN_API( OSErr )
AEPutAttributePtr               (AppleEvent *           theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 DescType               typeCode,
                                 const void *           dataPtr,
                                 Size                   dataSize)                           THREEWORDINLINE(0x303C, 0x0A16, 0xA816);

EXTERN_API( OSErr )
AEPutAttributeDesc              (AppleEvent *           theAppleEvent,
                                 AEKeyword              theAEKeyword,
                                 const AEDesc *         theAEDesc)                          THREEWORDINLINE(0x303C, 0x0627, 0xA816);

/**************************************************************************
 The following calls are necessary to deal with opaque data in AEDescs, because the
 traditional way of dealing with a basic AEDesc has been to dereference the dataHandle
 directly.  This is not supported under Carbon.
**************************************************************************/
#if ACCESSOR_CALLS_ARE_FUNCTIONS
/*
        AEGetDescData no longer supports automatic coercion. If you'd like to
        coerce the descriptor use AECoerceDesc.
    */
EXTERN_API( OSErr )
AEGetDescData                   (const AEDesc *         theAEDesc,
                                 void *                 dataPtr,
                                 Size                   maximumSize);

EXTERN_API( Size )
AEGetDescDataSize               (const AEDesc *         theAEDesc);

EXTERN_API( OSErr )
AEReplaceDescData               (DescType               typeCode,
                                 const void *           dataPtr,
                                 Size                   dataSize,
                                 AEDesc *               theAEDesc);

#endif  /* ACCESSOR_CALLS_ARE_FUNCTIONS */


#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 /* __AEDATAMODEL__ */

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us