home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-18 | 1.9 KB | 49 lines | [TEXT/PJMM] |
- {Stripped-down AppleEvent unit, so we don't have to include all the other junk.}
- {When I see interface files like this, I wonder if someone is trying to make fools of us.}
- {Don't Apple know anything about making API's that are *simple* and easy to grasp?}
- {I suppose they want to make sure that our compilers are busy.}
-
- unit AppleEvents;
- interface
-
- const
- kHighLevelEvent = 23;
- kCoreEventClass = 'aevt';
-
- kAEOpenApplication = 'oapp';
- kAEOpenDocuments = 'odoc';
- kAEPrintDocuments = 'pdoc';
- kAEQuitApplication = 'quit';
- keyMissedKeywordAttr = 'miss'; { this attribute is read only }
- typeWildCard = '****';
- errAEDescNotFound = -1701;
- errAEParamMissed = -1715; { a required parameter was not accessed }
- errAEEventNotHandled = -1708; { The AppleEvent was not handled by any handler }
-
- type
- AEKeyword = packed array[1..4] of CHAR;
- AEEventClass = packed array[1..4] of CHAR;
- AEEventID = packed array[1..4] of CHAR;
- DescType = ResType;
- AEDesc = record
- descriptorType: DescType;
- dataHandle: Handle;
- end;
- AEAddressDesc = AEDesc; { an AEDesc which contains addressing data }
- AEDescList = AEDesc; { a list of AEDesc is a special kind of AEDesc }
- AERecord = AEDescList; { AERecord is a list of keyworded AEDesc }
- AppleEvent = AERecord; { an AERecord that contains an AppleEvent }
- EventHandlerProcPtr = ProcPtr;
-
- function AEGetAttributePtr (theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; desiredType: DescType; var typeCode: DescType; dataPtr: Ptr; maximumSize: Size; var actualSize: Size): OSErr;
- inline
- $303C, $0E15, $A816;
- function AEInstallEventHandler (theAEEventClass: AEEventClass; theAEEventID: AEEventID; handler: EventHandlerProcPtr; handlerRefcon: LONGINT; isSysHandler: BOOLEAN): OSErr;
- inline
- $303C, $091F, $A816;
- function AEProcessAppleEvent (theEventRecord: EventRecord): OSErr;
- inline
- $303C, $021B, $A816;
-
- implementation
- end.