Important: The information in this document is obsolete and should not be used for new development.
Receiving Events
You can use theWaitNextEvent
orGetNextEvent
function to retrieve an event from the Event Manager and remove the event from the event stream. To provide greater support for multitasking, however, you should use theWaitNextEvent
function instead ofGetNextEvent
whenever possible. You can use theEventAvail
function
to look at an event without removing it from the event stream. You can use theAcceptHighLevelEvent
function to get additional information associated with a high-level event andGetSpecificHighLevelEvent
to search for a specific high-
level event.The
FlushEvents
procedure removes all low-level events from the Operating System event queue. In general, your application should not empty the event queue.You can use the
SystemClick
procedure to route events to desk accessories when necessary. TheSystemTask
andSystemEvent
routines are used by the Event Manager, and your application usually does not need to call these two routines.You usually use the functions provided by the Toolbox Event Manager to retrieve events from the event stream. Even if you are interested only in the events stored in the Operating System event queue, you can retrieve these events using the Toolbox Event Manager by setting the event mask to mask out all events except keyboard, mouse, and disk-inserted events. However, you can choose to use Operating System Event Manager routines to perform this task.
The Operating System Event Manager provides two functions,
GetOSEvent
andOSEventAvail
, to retrieve events from the Operating System event queue. In most cases, your application will not need to use these two functions.If your application needs to receive key-up events, you can change the system event mask of your application using the
SetEventMask
procedure. TheGetEvQHdr
function returns a pointer to the header of the Operating System event queue.
Subtopics
- WaitNextEvent
- EventAvail
- GetNextEvent
- AcceptHighLevelEvent
- GetSpecificHighLevelEvent
- FlushEvents
- SystemClick
- SystemTask
- SystemEvent
- GetOSEvent
- OSEventAvail
- SetEventMask
- GetEvQHdr