XIfEvent

Syntax

XIfEvent(display, event_return, predicate, arg)
      Display *display;
      XEvent *event_return;
      Bool (*predicate)();
      XPointer arg;

Arguments

display Specifies the connection to the X server.
event_return Returns the matched event's associated structure.
predicate Specifies the procedure that is to be called to determine if the next event in the queue matches what you want.
arg Specifies the user-supplied argument that will be passed to the predicate procedure.

Description

The XIfEvent() function completes only when the specified predicate procedure returns True for an event, which indicates an event in the queue matches. XIfEvent() flushes the output buffer if it blocks waiting for additional events. XIfEvent() removes the matching event from the queue and copies the structure into the client-supplied XEvent structure.

See also

XCheckIfEvent(), XNextEvent(), XPeekIfEvent(), XPutBackEvent(), XSendEvent(), "Selecting Events Using a Predicate Procedure".
Christophe Tronche, ch@tronche.com