Retrieves an event from the event queue
| Call | |
| #include <vv_sys.h> | |
| int evnt_get(eventp) | |
|
EVENTPTR eventp |
Pointer to event structure to place event into |
| Returns | |
| 0 | No event was available |
| 1 | Event was retrieved |
| Description
This function retrieves the first event from the queue. The event is removed from the queue and placed in the event structure specified in the call. If no event is available in the event queue, the keyboard is checked to see if a keystroke is available. If a keystroke is available, it is retrieved from the keyboard buffer. If a key filter function is installed, it is invoked and passed the value obtained from the keyboard buffer. If the key filter function returns a 0, the EVENT structure is filled with a NULL_EVENT and evnt_get() returns a 0. Otherwise, the value returned from the key filter function is placed in eventp->wmsg. If no key filter function is installed, the value retrieved from the keyboard buffer is placed in eventp->wmsg. The member eventp->type is set to AC_KEYPRESS. If a mouse is installed and initialized, the members eventp->x and eventp->y are set to the horizontal and vertical position of the mouse, respectively. If a mouse is not installed and initialized, these members are set to -1. |
|