Important: The information in this document is obsolete and should not be used for new development.
SystemEvent
TheWaitNextEventandGetNextEventfunctions call theSystemEventfunction. In most cases your application should not call theSystemEventfunction.The
SystemEventfunction 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
SystemEventreturnsFALSEas its function result if the event should be handled by the application; otherwise,SystemEventtakes any appropriate actions and returnsTRUE.For activate, update, mouse-up, and keyboard events (including keyboard equivalents of commands),
SystemEventchecks to see whether the active window belongs to a desk accessory and whether that desk accessory can handle that type of event. If so,SystemEventsends the event to the desk accessory and returnsTRUE. Otherwise,SystemEventreturnsFALSE.For mouse-down events and null events,
SystemEventreturnsFALSE.For disk-inserted events,
SystemEventattempts to mount the disk using thePBMountVolfunction but returnsFALSEso that the application can perform further processing if necessary.ASSEMBLY-LANGUAGE INFORMATION
If theSEvtEnbglobal variable (a byte) contains 0,SystemEventalways returnsFALSE.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 thePBMountVolfunction, see the chapter "File Manager" in Inside Macintosh: Files.