Main Page | Modules | File List | Globals

Event handling


Functions

unsigned int caca_get_event (unsigned int)
 Get the next mouse or keyboard input event.

unsigned int caca_wait_event (unsigned int)
 Wait for the next mouse or keyboard input event.


Detailed Description

These functions handle user events such as keyboard input and mouse clicks.

Function Documentation

unsigned int caca_get_event unsigned int  event_mask  ) 
 

This function polls the event queue for mouse or keyboard events matching the event mask and returns the first matching event. Non-matching events are discarded. It is non-blocking and returns zero if no more events are pending in the queue. See also caca_wait_event() for a blocking version of this function.

Parameters:
event_mask Bitmask of requested events.
Returns:
The next matching event in the queue, or 0 if no event is pending.

unsigned int caca_wait_event unsigned int  event_mask  ) 
 

This function returns the first mouse or keyboard event in the queue that matches the event mask. If no event is pending, it blocks until a matching event is received. See also caca_get_event() for a non-blocking version of this function.

Parameters:
event_mask Bitmask of requested events.
Returns:
The next event in the queue.