Important: The information in this document is obsolete and should not be used for new development.
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 toAESend
orAEInteractWithUser
, 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 toFALSE
if your application is still willing to wait.SEE ALSO
For more information, see "Writing an Idle Function," which begins on page 5-22.