Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 5 - Creating and Sending Apple Events / Reference to Creating and Sending Apple Events
Application-Defined Routines /


MyIdleFunction

An idle function has the following syntax:

FUNCTION MyIdleFunction (VAR event: EventRecord;
                         VAR sleepTime: LongInt;
                         VAR mouseRgn: RgnHandle): Boolean;
event
The event record of the event to process.
sleepTime
Amount of time (in ticks) during which your application agrees to relinquish the processor if no events are pending.
mouseRgn
A screen region that determines the conditions under which your application is to receive notice of mouse-moved events.
DESCRIPTION
If your application provides a pointer to an idle function (MyIdleFunction) as a parameter to AESend or AEInteractWithUser, the Apple Event Manager will call the idle function to handle any update event, null event, operating-system event, or activate event received for your application while it is waiting for a reply.

Set the function result to TRUE if your application is no longer willing to wait for a reply from the server or for the user to bring the application to the front. Set the function result to FALSE if your application is still willing to wait.

SEE ALSO
For more information, see "Writing an Idle Function," which begins on page 5-22.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996