Event Handling

ggi_event_mask ggiEventPoll(ggi_visual_t vis,ggi_event_mask mask,
                            struct timeval *t);
Check if any of the events given in EvMask is available. Using the struct timeval *t, you can control the action to be taken, if none is available, just as you would do when using select(). Give NULL to wait indefinitely or a filled out struct to wait for a given time (which may be 0 to get non-blocking behaviour).
The returncode is a mask of events which are available (within the limits set by the mask parameter).
int ggiEventRead(ggi_visual_t vis,ggi_event *ev,ggi_event_mask mask);
Read an Event from the queue. This call blocks, If there is no such Event present.