Logo Search packages:      
Sourcecode: libcaca version File versions  Download package

unsigned int caca_get_event ( unsigned int  event_mask  ) 

Get the next mouse or keyboard input event.

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. event_mask must have a non-zero value. This function 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.

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

Definition at line 99 of file event.c.


        return CACA_EVENT_NONE;

    for( ; ; )
        unsigned int event = _get_next_event();

        if(!event || event & event_mask)
            return event;

Generated by  Doxygen 1.6.0   Back to index