XPeekIfEvent

Syntax

XPeekIfEvent(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 a copy of 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 XPeekIfEvent() function returns only when the specified predicate procedure returns True for an event. After the predicate procedure finds a match, XPeekIfEvent() copies the matched event into the client-supplied XEvent structure without removing the event from the queue. XPeekIfEvent() flushes the output buffer if it blocks waiting for additional events.

See also

XCheckIfEvent(), XIfEvent(), XNextEvent(), XPutBackEvent(), XSendEvent(), "Selecting Events Using a Predicate Procedure".
Christophe Tronche, [email protected]