Mac OS 9
AEInteraction.h File Reference

AppleEvent functions that deal with Events and interacting with user. More...

#include <AEDataModel.h>
#include <Notification.h>

Go to the source code of this file.

Typedefs

typedef long * sleepTime
 
typedef long RgnHandlemouseRgn
 
typedef long returnID
 
typedef long long transactionID
 
typedef long long const AEAddressDescsender
 
typedef SInt8 AEInteractAllowed
 

Enumerations

enum  { kAEInteractWithSelf = 0 , kAEInteractWithLocal = 1 , kAEInteractWithAll = 2 }
 
enum  {
  kAEDoNotIgnoreHandler = 0x00000000 , kAEIgnoreAppPhacHandler , kAEIgnoreAppEventHandler , kAEIgnoreSysPhacHandler ,
  kAEIgnoreSysEventHandler , kAEIngoreBuiltInEventHandler , kAEDontDisposeOnResume
}
 
enum  { kAENoDispatch = 0 , kAEUseStandardDispatch }
 
enum  { uppAEIdleProcInfo = 0x00000FD0 }
 
enum  { uppAEFilterProcInfo = 0x00003FD0 }
 

Functions

typedef CALLBACK_API (Boolean, AEIdleProcPtr)(EventRecord *theEvent
 
typedef CALLBACK_API (Boolean, AEFilterProcPtr)(EventRecord *theEvent
 
typedef STACK_UPP_TYPE (AEIdleProcPtr) AEIdleUPP
 
typedef STACK_UPP_TYPE (AEFilterProcPtr) AEFilterUPP
 
OSErr AESend (const AppleEvent *theAppleEvent, AppleEvent *reply, AESendMode sendMode, AESendPriority sendPriority, long timeOutInTicks, AEIdleUPP idleProc, AEFilterUPP filterProc)
 
OSErr AEProcessAppleEvent (const EventRecord *theEventRecord)
 
OSErr AEResetTimer (const AppleEvent *reply)
 
OSErr AEGetInteractionAllowed (AEInteractAllowed *level)
 AEGetInteractionAllowed Get user interaction preferences. More...
 
OSErr AESetInteractionAllowed (AEInteractAllowed level)
 
OSErr AEInteractWithUser (long timeOutInTicks, NMRecPtr nmReqPtr, AEIdleUPP idleProc)
 
OSErr AESuspendTheCurrentEvent (const AppleEvent *theAppleEvent)
 AESuspendTheCurrentEvent Suspend Apple Event processing. More...
 
OSErr AEResumeTheCurrentEvent (const AppleEvent *theAppleEvent, const AppleEvent *reply, AEEventHandlerUPP dispatcher, long handlerRefcon)
 
OSErr AEGetTheCurrentEvent (AppleEvent *theAppleEvent)
 AEGetTheCurrentEvent Return the Apple Event currently being handled. More...
 
OSErr AESetTheCurrentEvent (const AppleEvent *theAppleEvent)
 AESetTheCurrentEvent Specify Apple Event to be handled. More...
 
AEIdleUPP NewAEIdleUPP (AEIdleProcPtr userRoutine)
 
AEFilterUPP NewAEFilterUPP (AEFilterProcPtr userRoutine)
 
void DisposeAEIdleUPP (AEIdleUPP userUPP)
 
void DisposeAEFilterUPP (AEFilterUPP userUPP)
 
Boolean InvokeAEIdleUPP (EventRecord *theEvent, long *sleepTime, RgnHandle *mouseRgn, AEIdleUPP userUPP)
 
Boolean InvokeAEFilterUPP (EventRecord *theEvent, long returnID, long transactionID, const AEAddressDesc *sender, AEFilterUPP userUPP)
 

Detailed Description

AppleEvent functions that deal with Events and interacting with user.

Introduced In: Mac OS 9
Avaliable From: Universal Interfaces 3.4.1
Copyright: © 2000-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/

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Note: The following routine tells the AppleEvent manager that processing is either about to resume or has been completed on a previously suspended event. The procPtr passed in as the dispatcher parameter will be called to attempt to redispatch the event. Several constants for the dispatcher parameter allow special behavior. They are:

  • kAEUseStandardDispatch means redispatch as if the event was just received, using the standard AppleEvent dispatch mechanism.
  • kAENoDispatch means ignore the parameter. Use this in the case where the event has been handled and no redispatch is needed.
  • non nil means call the routine which the dispatcher points to.

Function Documentation

◆ AEGetInteractionAllowed()

OSErr AEGetInteractionAllowed ( AEInteractAllowed *  level)

AEGetInteractionAllowed Get user interaction preferences.

You can use the AEGetInteractionAllowed function to get the current user
interaction preferences for responding to an Apple event.
The AEGetInteractionAllowed function returns a value in the level
paramter that indicates the user interaction preferences for responding to an
Apple event.
The value returned is the interaction level set by a previous call to
AESetInteractionAllowed . The default value of kAEInteractWithLocal is
returned if your application has not used AESetInteractionAllowed to
explicitly set the interaction level.
The level parameter returns one of the following flags: kAEInteractWithSelf ,
kAEInteractWithLocal , or kAEInteractWithAll .
The kAEInteractWithSelf flag indicates that the server application may
interact with the user in response to an Apple event only when the client
application and server application are the same-that is, only when the
application is sending the Apple event to itself.
The kAEInteractWithLocal flag indicates that the server application may
interact with the user in response to an Apple event only if the client
application is on the same computer as the server application. This is the
default if your application has not used the AESetInteractionAllowed
function to explicitly set the interaction level.
The kAEInteractWithAll flag indicates that the server application may
interact with the user in response to an Apple event sent from any client
Result codes
noErr (0)No error
Copyright: THINK Reference © 1991-1992 Symantec Corporation
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

◆ AEGetTheCurrentEvent()

OSErr AEGetTheCurrentEvent ( AppleEvent theAppleEvent)

AEGetTheCurrentEvent Return the Apple Event currently being handled.

You can use the AEGetTheCurrentEvent function to get the Apple event that
is currently being handled.
The AEGetTheCurrentEvent function returns the Apple event that is
currently being handled. In many applications, the handling of an
Apple event involves one or more long chains of calls to routines within the
application. The AEGetTheCurrentEvent function makes it unnecessary for
these calls to include the current Apple event as a parameter; the routines can
simply call AEGetTheCurrentEvent to get the current Apple event when it
is needed.
You can also use the AEGetTheCurrentEvent function to make sure that no
Apple event is currently being handled. For example, if your application
always uses an application-defined routine to delete a file, that routine can
determine whether an Apple event is currently being handled by calling
AEGetTheCurrentEvent , and delete the file only if
AEGetTheCurrentEvent returns a null descriptor record, indicating that
no Apple event is currently being handled.
This function returns the Apple event that is currently being handled in the
parameter theAppleEvent .
Result codes
noErr(0)No error
Copyright: THINK Reference © 1991-1992 Symantec Corporation
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

◆ AEInteractWithUser()

OSErr AEInteractWithUser ( long  timeOutInTicks,
NMRecPtr  nmReqPtr,
AEIdleUPP  idleProc 
)

AEInteractWithUser()

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

◆ AEProcessAppleEvent()

OSErr AEProcessAppleEvent ( const EventRecord theEventRecord)

AEProcessAppleEvent()

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

◆ AEResetTimer()

OSErr AEResetTimer ( const AppleEvent reply)

Note: during event processing, an event handler may realize that it is likely to exceed the client's timeout limit. Passing the reply to this routine causes a wait event to be generated that asks the client for more time. AEResetTimer()

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

◆ AEResumeTheCurrentEvent()

OSErr AEResumeTheCurrentEvent ( const AppleEvent theAppleEvent,
const AppleEvent reply,
AEEventHandlerUPP  dispatcher,
long  handlerRefcon 
)

AEResumeTheCurrentEvent()

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

◆ AESend()

OSErr AESend ( const AppleEvent theAppleEvent,
AppleEvent reply,
AESendMode  sendMode,
AESendPriority  sendPriority,
long  timeOutInTicks,
AEIdleUPP  idleProc,
AEFilterUPP  filterProc 
)

AESend()

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

◆ AESetInteractionAllowed()

OSErr AESetInteractionAllowed ( AEInteractAllowed  level)

AESetInteractionAllowed()

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

◆ AESetTheCurrentEvent()

OSErr AESetTheCurrentEvent ( const AppleEvent theAppleEvent)

AESetTheCurrentEvent Specify Apple Event to be handled.

You can use the AESetTheCurrentEvent function to specify the Apple event
to be handled.
The AESetTheCurrentEvent function specifies the Apple event to be
handled. There is generally no reason for your application to use this function.
Instead of calling this function, your application should let the
Apple Event Manager go through the dispatch tables to set the current
Apple event.
The parameter theAppleEvent is the Apple event that is to be handled.
The AESetTheCurrentEvent function is used only to avoid going through
the dispatch tables, and is used only in the following way:
1.An application suspends handling of an Apple event by calling the
AESuspendTheCurrentEvent function.
2.The application calls the AESetTheCurrentEvent function to
inform the Apple Event Manager that it is handling the Apple event that
was previously suspended. It thereby makes the identity of the Apple event
currently being handled available to routines that call the
AEGetTheCurrentEvent function.
3.The application handles the Apple event. When it is finished, it calls
the AEResumeTheCurrentEvent function with the value kAENoDispatch to
tell the Apple Event Manager that the processing of the event is complete
and that the Apple event does not need to be dispatched.
Result codes
noErr(0)No error
Copyright: THINK Reference © 1991-1992 Symantec Corporation
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

◆ AESuspendTheCurrentEvent()

OSErr AESuspendTheCurrentEvent ( const AppleEvent theAppleEvent)

AESuspendTheCurrentEvent Suspend Apple Event processing.

You can use the AESuspendTheCurrentEvent function to suspend the
processing of an Apple event that is currently being handled.
The AESuspendTheCurrentEvent function suspends the processing of the
Apple event that is currently being handled.
The parameter theAppleEvent is the Apple event whose handling is to be
suspended. Although the Apple Event Manager doesn't need the parameter
theAppleEvent to identify the Apple event currently being handled, providing
this parameter is a safeguard that ensures that you are suspending the correct
Apple event.
After a server application makes a successful call to the function
AESuspendTheCurrentEvent , it is no longer required to return a result
or a reply for the Apple event that was being handled. It can, however, return a
result if it later calls the AEResumeTheCurrentEvent function to resume
event processing.
The Apple Event Manager does not automatically dispose of Apple events
that have been suspended or of their default replies. (The Apple Event
Manager does, however, automatically dispose of a previously suspended Apple
event and its default reply if the server later resumes processing of the Apple
event by calling the AEResumeTheCurrentEvent function.) If your server
application does not resume processing of a suspended
Apple event, it is responsible for using the AEDisposeDesc function to
dispose of both the Apple event and its default reply when you are finished with
them.
Result codes
noErr(0)No error
Copyright: THINK Reference © 1991-1992 Symantec Corporation
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

◆ DisposeAEFilterUPP()

void DisposeAEFilterUPP ( AEFilterUPP  userUPP)
inline

DisposeAEFilterUPP()

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

◆ DisposeAEIdleUPP()

void DisposeAEIdleUPP ( AEIdleUPP  userUPP)
inline

DisposeAEIdleUPP()

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

◆ InvokeAEFilterUPP()

Boolean InvokeAEFilterUPP ( EventRecord theEvent,
long  returnID,
long  transactionID,
const AEAddressDesc sender,
AEFilterUPP  userUPP 
)
inline

InvokeAEFilterUPP()

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

◆ InvokeAEIdleUPP()

Boolean InvokeAEIdleUPP ( EventRecord theEvent,
long *  sleepTime,
RgnHandle mouseRgn,
AEIdleUPP  userUPP 
)
inline

InvokeAEIdleUPP()

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

◆ NewAEFilterUPP()

AEFilterUPP NewAEFilterUPP ( AEFilterProcPtr  userRoutine)
inline

NewAEFilterUPP()

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

◆ NewAEIdleUPP()

AEIdleUPP NewAEIdleUPP ( AEIdleProcPtr  userRoutine)
inline

NewAEIdleUPP()

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