home *** CD-ROM | disk | FTP | other *** search
- #ifndef __AEUTILS__
- #define __AEUTILS__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifndef __APPLEEVENTS__
- #include <AppleEvents.h>
- #endif
-
- #ifndef __EVENTS__
- #include <Events.h>
- #endif
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- #endif
-
-
-
- void DoHighLevelEvent(EventRecord *event);
- /*
- ** ¶ Simply calls AEProcessAppleEvent and reports any errors.
- **
- ** INPUT: event
- **
- ** AEProcessAppleEvent looks in its table of registered events and sees if the current event
- ** is registered. If so, off we go. */
-
-
-
- OSErr GetTargetInfo(AEAddressDesc targetDesc, StringPtr zone, StringPtr machine,
- StringPtr application);
- /*
- ** ¶ Return zone, machine, and application name for targetDesc.
- **
- ** INPUT: targetDesc A properly constructed target descriptor.
- ** OUTPUT: zone The zone name extracted from targetDesc.
- ** machine The machine name extracted from targetDesc
- ** application The application name extracted from targetDesc
- ** RESULT: OSErr
- **
- ** Given a target descriptor, return fascinating information about the target. */
-
-
-
- OSErr MakeTarget(AEAddressDesc *target, Boolean sendDirect, short replyMode, Str255 prompt,
- Str255 applListLabel, PPCFilterUPP portFilter, char *theLocNBPType);
- /*
- ** ¶ PPCBrowser interface to build a target descriptor.
- **
- ** INPUT: sendDirect Pass in true if we are sending the AppleEvent to
- ** ourselves (this application). Note that passing in false
- ** doesn't exclude the possibility of sending to ourself.
- ** replyMode kAEWaitReply, kAEQueueReply, or kAENoReply
- ** prompt PPCBrowser dialog box prompt
- ** applListLabel The PPCBrowser title over the 'programs' list
- ** portFilter Procedure pointer for PPCBrowser filter (or nil)
- ** theLocNBPType List ports only of this type
- ** OUTPUT: target AEAddressDesc of target returned here
- ** RESULT: OSErr If err returned, then target not created. Note that
- ** the dataHandle field of target is initialized to nil
- ** so that you can always call AEDisposeDesc, independent
- ** of whether or not an error was returned.
- **
- ** Creates a Target descriptor.
- **
- ** If sendDirect is TRUE, the target is specified by setting a ProcessSerialNumber to
- ** kCurrentProcess. This has the advantage of sending the message directly to ourselves,
- ** bypassing ePPC and gaining about a 10-15x speed improvement. If sendDirect is FALSE,
- ** we see if we have the PPCToolBox. If not, then we are forced to do a direct send.
- ** If we do have the PPCToolbox, then we call PPCBrowser. We then look at the reply, and
- ** factor in the mode we are going to use in AESend. If that mode is kAEWaitReply and the
- ** user selected us as the target, we have to turn that into a direct send. This is because
- ** the AppleEvent Manager will otherwise post the event as a high-level event. However, we
- ** are busy waiting for a reply, not looking for events, so we'll hang. We avoid this by
- ** forcing a direct send. */
-
-
-
- Boolean MissedAnyParameters(AppleEvent *message);
- /*
- ** ¶ Returns true if not a AE parms were used.
- **
- ** INPUT: message AppleEvent to check for unused parameters
- ** OUTPUT: Boolean Returns true if at least one paramater missed
- **
- ** You may need to know if all parameters were used. To determine this, just call this.
- ** If true is returned, then something wasn’t looked at. */
-
-
-
- void NotifyCancel(void);
- /*
- ** ¶ Cancels a notification generated by NotifyUser.
- **
- ** This is a simplistic call for Notification Manager support. Just call NotifyCancel to
- ** cancel the notification posted by NotifyUser. */
-
-
-
- void NotifyUser(void);
- /*
- ** ¶ Creates a default notification. Call NotifyCancel to undo.
- **
- ** This a simplistic call for Notification Manager support. Just call NotifyUser if a
- ** notification is needed. Just call NotifyCancel to cancel the notification posted
- ** by NotifyUser. */
-
-
- #endif
-