XIfEvent - Online Linux Manual PageSection : 3
Updated : libX11 1.8.4
Source : X Version 11
Note : XLIB FUNCTIONS

NAMEXIfEvent, XCheckIfEvent, XPeekIfEvent − check the event queue with a predicate procedure

SYNTAXint XIfEvent ( Display *display , XEvent *event_return , Bool ( *predicate)() , XPointer arg); Bool XCheckIfEvent ( Display *display , XEvent *event_return , Bool ( *predicate)() , XPointer arg); int XPeekIfEvent ( Display *display , XEvent *event_return , Bool ( *predicate)() , XPointer arg);

ARGUMENTSarg Specifies the user-supplied argument that will be passed to the predicate procedure. display Specifies the connection to the X server. event_return Returns either a copy of or 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.

DESCRIPTIONThe 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. When the predicate procedure finds a match, XCheckIfEvent copies the matched event into the client-supplied XEvent structure and returns True. (This event is removed from the queue.) If the predicate procedure finds no match, XCheckIfEvent returns False, and the output buffer will have been flushed. All earlier events stored in the queue are not discarded. 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. Each of these functions requires you to pass a predicate procedure that determines if an event matches what you want. Your predicate procedure must decide if the event is useful without calling any Xlib functions. If the predicate directly or indirectly causes the state of the event queue to change, the result is not defined. If Xlib has been initialized for threads, the predicate is called with the display locked and the result of a call by the predicate to any Xlib function that locks the display is not defined unless the caller has first called XLockDisplay. The predicate procedure and its associated arguments are: Bool ( *predicate)( Display *display, XEvent *event, XPointer arg) display Specifies the connection to the X server. event Specifies the XEvent structure. arg Specifies the argument passed in from the XIfEvent, XCheckIfEvent, or XPeekIfEvent function. The predicate procedure is called once for each event in the queue until it finds a match. After finding a match, the predicate procedure must return True. If it did not find a match, it must return False. Note that the predicate procedure is called with the display locked, and thus is not allowed to call any function that would take the display lock again.

SEE ALSOXAnyEvent(3), XNextEvent(3), XPutBackEvent(3) XSendEvent(3)
Xlib − C Language X Interface
0
Johanes Gumabo
Data Size   :   11,147 byte
man-XIfEvent.3Build   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   4 / 202,204
Visitor ID   :     :  
Visitor IP   :   3.145.43.92   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.