Important: The information in this document is obsolete and should not be used for new development.
Receiving Events
You can use theWaitNextEventorGetNextEventfunction 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 theWaitNextEventfunction instead ofGetNextEventwhenever possible. You can use theEventAvailfunction
to look at an event without removing it from the event stream. You can use theAcceptHighLevelEventfunction to get additional information associated with a high-level event andGetSpecificHighLevelEventto search for a specific high-
level event.The
FlushEventsprocedure 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
SystemClickprocedure to route events to desk accessories when necessary. TheSystemTaskandSystemEventroutines 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,
GetOSEventandOSEventAvail, 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
SetEventMaskprocedure. TheGetEvQHdrfunction 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
 
  
  
 