Flush_All_Events

Functions

void Flush_All_Events (void)
 Empties out the queue of pending input events. More...
 

Detailed Description

Function Documentation

◆ Flush_All_Events()

void Flush_All_Events ( void  )

Empties out the queue of pending input events.

DETAILS

Events on the event queue normally remain there for as long as it takes your program to get around to servicing them. If your program enters a major new substate—for example, if you flip to an entirely new menu page—it is a good idea to explicitly discard the events that occurred under the old regime. This is the function of Flush_All_Events() .
Note, the system always automatically discards Selection-type events on segments that no longer exist or are no longer visible or selectable. If Selection events are the only kind that can possibly be in the queue, and if the "major new substate" involves making everything invisible, unselectable, or deleted, then you won't need to explicitly flush events.

NOTE

The "current" event is also discarded.

NOTES

RESTRICTIONS

See also
Get_Button, Get_Selection, Get_String, Get_Wakeup, Enable_Button_Events, Enable_Selection_Events, Enable_String_Events, Enable_Wakeup_Events, Requeue_Event.