XCheckIfEvent()XCheckIfEvent()NameXCheckIfEvent – 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
display Specifies a connection to an X server; returned from
XOpenDisplay().
event_return
Returns the matched event structure.
predicate Specifies the procedure that is called to determine if the
next event in the queue matches your criteria.
arg Specifies the user-specified argument that will be passed to
the predicate procedure.
Returns
True if a matching event is found, else False.
DescriptionXCheckIfEvent() 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 AlsoXQLength(), XAllowEvents(), XCheckMaskEvent(), XCheckTypedEvent(),
XCheckTypedWindowEvent(), XCheckWindowEvent(), XEventsQueued(), XGet‐
InputFocus(), XGetMotionEvents(), XIfEvent(), XMaskEvent(), XNex‐
tEvent(), XPeekEvent(), XPeekIfEvent(), XPending(), XPutBackEvent(),
XSelectInput(), XSendEvent(), XSetInputFocus(), XSynchronize(), XWin‐
dowEvent().
Xlib - Input Handling XCheckIfEvent()