NAME
XIfEvent − wait for event matched in predicate procedure.
Synopsis
XIfEvent(display, event_return, predicate, args)
Display *display;
XEvent *event_return;
Bool (*predicate)();
char *args;
Arguments
displaySpecifies a connection to an X server; returned from XOpenDisplay().
event_return
Returns the matched event.
predicateSpecifies the procedure to be called to determine if the next event satisfies your criteria.
argsSpecifies the user-specified arguments to be passed to the predicate procedure.
Description
XIfEvent() checks the event queue for events, uses the user-supplied routine to check if one meets certain criteria, and removes the matching event from the input queue. XIfEvent() returns only when the specified predicate procedure returns True for an event. The specified predicate is called once for each event on the queue until a match is made, and each time an event is added to the queue, with the arguments display, event_return, and arg. If no matching events exist on the queue, XIfEvent() flushes the request buffer and waits for an appropriate event to arrive. Use XCheckIfEvent() if you don’t want to wait for an event. For more information, see Volume One, Chapter 8, Events.
See Also
QLength(), XAllowEvents(), XCheckIfEvent(), XCheckMaskEvent(), XCheckTypedEvent(), XCheckTypedWindowEvent(), XCheckWindowEvent(), XEventsQueued(), XGetInputFocus(), XGetMotionEvents(), XMaskEvent(), XNextEvent(), XPeekEvent(), XPeekIfEvent(), XPending(), XPutBackEvent(), XSelectInput(), XSendEvent(), XSetInputFocus(), XSynchronize(), XWindowEvent.
Copyright O’Reilly & Assoc. —