Check_For_Events

Functions

int Check_For_Events (void)
 Lets you check for the presence of input events without having to stop and wait for them. More...
 

Detailed Description

Function Documentation

◆ Check_For_Events()

int Check_For_Events ( void  )

Lets you check for the presence of input events without having to stop and wait for them.

Returns
count

DETAILS

If you use the "Get" routines, the system always stops and waits for the event you specify to occur. If you use the "Enable" routines, you normally call Await_Event() to stop and wait for any enabled event to occur. But you also have the option of checking events occasionally, without blocking.

Check_For_Events() returns a value, if zero, indicates there are no events ready. If the value is non-zero, it indicates that there are at least that many events ready. The "ready" events can be retrieved, one at a time, with Await_Event() .

The most common use for checking-without-stopping is in cases where you're involved in a long laborious calculation in the background checking without stopping gives the user a chance to get a word in edgewise.

Check_For_Events() is generally used by calling it in a loop ("awaiting" and dispatching one event per loop cycle) until the return value becomes zero. Then you can go on until you need to abort the long calculation.

NOTES

RESTRICTIONS

See also
Await_Event, Flush_All_Events.