Important: The information in this document is obsolete and should not be used for new development.
FlushEvents
TheFlushEvents
procedure removes low-level events from the Operating System event queue. Note thatFlushEvents
does not remove any types of events not stored
in the Operating System event queue.You can choose to use the
FlushEvents
procedure when your application first starts to empty the Operating System event queue of any keystrokes or mouse events generated by the user while the Finder loaded your application. In general, however, your application should not empty the queue at any other time as this loses user actions and makes your application and the computer appear unresponsive to the user.
PROCEDURE FlushEvents (whichMask: Integer; stopMask: Integer);
- whichMask
- A value that indicates which kinds of low-level events are to be removed from the Operating System event queue; this parameter is interpreted
as a sum of event mask constants. The whichMask andstopMask
parameters together specify which events to remove.stopMask
- A value that limits which low-level events are to be removed from the Operating System event queue; this parameter is interpreted as a sum
of event mask constants.FlushEvents
does not remove any low-
level events that are specified by thestopMask
parameter. To remove
all events specified by the whichMask parameter, specify 0 as thestopMask
parameter.DESCRIPTION
FlushEvents
removes only low-level events stored in the Operating System event queue; it does not remove activate, update, operating-system, or high-level events.You specify which low-level events to remove using the whichMask and
stopMask
parameters.FlushEvents
removes the low-level events specified by the whichMask parameter, up to but not including the first event of any type specified by thestopMask
parameter.If the event queue doesn't contain any of the events specified by the whichMask parameter,
FlushEvents
does not remove any events from the queue.ASSEMBLY-LANGUAGE INFORMATION
You must set up register D0 with the event mask (whichMask) and stop mask before calling FlushEvents. When FlushEvents returns, register D0 contains 0 if all events were removed from the queue or, if all events were not removed from the queue, an event code that specifies the type of event that caused the removal process to stop.
Registers on entry D0 Event mask (low-order word) Stop mask (high-order word)
Registers on exit D0 0 if all events were removed from the queue, or the event code of the event that stopped the search (low-order word) SEE ALSO
See "Setting the Event Mask" beginning on page 2-26 for information on how to specify an event mask.