1XNextEvent(3) XLIB FUNCTIONS XNextEvent(3)
2
3
4
6 XNextEvent, XPeekEvent, XWindowEvent, XCheckWindowEvent, XMaskEvent,
7 XCheckMaskEvent, XCheckTypedEvent, XCheckTypedWindowEvent - select
8 events by type
9
11 int XNextEvent(Display *display, XEvent *event_return);
12
13 int XPeekEvent(Display *display, XEvent *event_return);
14
15 int XWindowEvent(Display *display, Window w, long event_mask, XEvent
16 *event_return);
17
18 Bool XCheckWindowEvent(Display *display, Window w, long event_mask,
19 XEvent *event_return);
20
21 int XMaskEvent(Display *display, long event_mask, XEvent
22 *event_return);
23
24 Bool XCheckMaskEvent(Display *display, long event_mask, XEvent
25 *event_return);
26
27 Bool XCheckTypedEvent(Display *display, int event_type, XEvent
28 *event_return);
29
30 Bool XCheckTypedWindowEvent(Display *display, Window w, int event_type,
31 XEvent *event_return);
32
34 display Specifies the connection to the X server.
35
36 event_mask
37 Specifies the event mask.
38
39 event_return
40 Returns the matched event's associated structure.
41
42 event_return
43 Returns the next event in the queue.
44
45 event_return
46 Returns a copy of the matched event's associated structure.
47
48 event_type
49 Specifies the event type to be compared.
50
51
52 w Specifies the window whose event uou are interested in.
53
55 The XNextEvent function copies the first event from the event queue
56 into the specified XEvent structure and then removes it from the queue.
57 If the event queue is empty, XNextEvent flushes the output buffer and
58 blocks until an event is received.
59
60 The XPeekEvent function returns the first event from the event queue,
61 but it does not remove the event from the queue. If the queue is
62 empty, XPeekEvent flushes the output buffer and blocks until an event
63 is received. It then copies the event into the client-supplied XEvent
64 structure without removing it from the event queue.
65
66 The XWindowEvent function searches the event queue for an event that
67 matches both the specified window and event mask. When it finds a
68 match, XWindowEvent removes that event from the queue and copies it
69 into the specified XEvent structure. The other events stored in the
70 queue are not discarded. If a matching event is not in the queue,
71 XWindowEvent flushes the output buffer and blocks until one is
72 received.
73
74 The XCheckWindowEvent function searches the event queue and then the
75 events available on the server connection for the first event that
76 matches the specified window and event mask. If it finds a match,
77 XCheckWindowEvent removes that event, copies it into the specified
78 XEvent structure, and returns True. The other events stored in the
79 queue are not discarded. If the event you requested is not available,
80 XCheckWindowEvent returns False, and the output buffer will have been
81 flushed.
82
83 The XMaskEvent function searches the event queue for the events associ‐
84 ated with the specified mask. When it finds a match, XMaskEvent
85 removes that event and copies it into the specified XEvent structure.
86 The other events stored in the queue are not discarded. If the event
87 you requested is not in the queue, XMaskEvent flushes the output buffer
88 and blocks until one is received.
89
90 The XCheckMaskEvent function searches the event queue and then any
91 events available on the server connection for the first event that
92 matches the specified mask. If it finds a match, XCheckMaskEvent
93 removes that event, copies it into the specified XEvent structure, and
94 returns True. The other events stored in the queue are not discarded.
95 If the event you requested is not available, XCheckMaskEvent returns
96 False, and the output buffer will have been flushed.
97
98 The XCheckTypedEvent function searches the event queue and then any
99 events available on the server connection for the first event that
100 matches the specified type. If it finds a match, XCheckTypedEvent
101 removes that event, copies it into the specified XEvent structure, and
102 returns True. The other events in the queue are not discarded. If the
103 event is not available, XCheckTypedEvent returns False, and the output
104 buffer will have been flushed.
105
106 The XCheckTypedWindowEvent function searches the event queue and then
107 any events available on the server connection for the first event that
108 matches the specified type and window. If it finds a match, XCheck‐
109 TypedWindowEvent removes the event from the queue, copies it into the
110 specified XEvent structure, and returns True. The other events in the
111 queue are not discarded. If the event is not available, XCheckTyped‐
112 WindowEvent returns False, and the output buffer will have been
113 flushed.
114
116 XAnyEvent(3), XIfEvent(3), XPutBackEvent(3), XSendEvent(3)
117 Xlib - C Language X Interface
118
119
120
121X Version 11 libX11 1.3.4 XNextEvent(3)