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: Macintosh Toolbox Essentials /
Chapter 2 - Event Manager / Event Manager Reference
Event Manager Routines / Receiving Events


SystemEvent

The WaitNextEvent and GetNextEvent functions call the SystemEvent function. In most cases your application should not call the SystemEvent function.

The SystemEvent function determines if a specific event should be handled by the application or the Operating System.

FUNCTION SystemEvent (theEvent: EventRecord): Boolean;
theEvent
The event record for the event.
DESCRIPTION
SystemEvent returns FALSE as its function result if the event should be handled by the application; otherwise, SystemEvent takes any appropriate actions and returns TRUE.

For activate, update, mouse-up, and keyboard events (including keyboard equivalents of commands), SystemEvent checks to see whether the active window belongs to a desk accessory and whether that desk accessory can handle that type of event. If so, SystemEvent sends the event to the desk accessory and returns TRUE. Otherwise, SystemEvent returns FALSE.

For mouse-down events and null events, SystemEvent returns FALSE.

For disk-inserted events, SystemEvent attempts to mount the disk using the PBMountVol function but returns FALSE so that the application can perform further processing if necessary.

ASSEMBLY-LANGUAGE INFORMATION
If the SEvtEnb global variable (a byte) contains 0, SystemEvent always returns FALSE.

SEE ALSO
See "The Event Record," beginning on page 2-79, for a description of the fields in the event record. For a description of the PBMountVol function, see the chapter "File Manager" in Inside Macintosh: Files.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996