NAME
XCheckIfEvent — check the event queue for a matching event; don’t wait.
SYNOPSIS
Bool XCheckIfEvent(display, event_return, predicate, arg) Display ∗display; XEvent ∗event_return; Bool (∗predicate)(); char ∗arg;
ARGUMENTS
displaySpecifies a connection to an X server; returned from XOpenDisplay().
event_return
Returns the matched event structure.
predicateSpecifies the procedure that is called to determine if the next event in the queue matches your criteria.
argSpecifies the user-specified argument that will be passed to the predicate procedure.
RETURNS
True if a matching event is found, else False.
DESCRIPTION
XCheckIfEvent() returns the next event in the queue that is matched by the specified predicate procedure. If found, that event is removed from the queue, its structure is copied into the client-supplied XEvent, and True is returned. If no match is found, XCheckIfEvent() returns False and flushes the request buffer. No other events are removed from the queue. Later events in the queue are not searched.
The predicate procedure is called with the arguments display, event, and arg.
For more information, see Volume One, Chapter 8, Events.
SEE ALSO
XQLength(), XAllowEvents(), XCheckMaskEvent(), XCheckTypedEvent(), XCheckTypedWindowEvent(), XCheckWindowEvent(), XEventsQueued(), XGetInputFocus(), XGetMotionEvents(), XIfEvent(), XMaskEvent(), XNextEvent(), XPeekEvent(), XPeekIfEvent(), XPending(), XPutBackEvent(), XSelectInput(), XSendEvent(), XSetInputFocus(), XSynchronize(), XWindowEvent().
Xlib Reference Manual