Functions | |
int | Check_For_Events (void) |
int Check_For_Events | ( | void | ) |
Lets you check for the presence of input events without having to stop and wait for them.
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.