1XAnyEvent(3)                    XLIB FUNCTIONS                    XAnyEvent(3)
2
3
4

NAME

6       XAnyEvent, XEvent - generic X event structures
7

STRUCTURES

9       All the event structures declared in <X11/Xlib.h> have the following
10       common members:
11       typedef struct {
12               int type;
13               unsigned long serial;   /* # of last request processed by server */
14               Bool send_event;        /* true if this came from a SendEvent request */
15               Display *display;       /* Display the event was read from */
16               Window window;
17       } XAnyEvent;
18
19       The type member is set to the event type constant name that uniquely
20       identifies it.  For example, when the X server reports a GraphicsExpose
21       event to a client application, it sends an XGraphicsExposeEvent struc‐
22       ture with the type member set to GraphicsExpose.  The display member is
23       set to a pointer to the display the event was read on.  The send_event
24       member is set to True if the event came from a SendEvent protocol
25       request.  The serial member is set from the serial number reported in
26       the protocol but expanded from the 16-bit least-significant bits to a
27       full 32-bit value.  The window member is set to the window that is most
28       useful to toolkit dispatchers.
29
30       The XEvent structure is a union of the individual structures declared
31       for each event type:
32       typedef union _XEvent {
33               int type;       /* must not be changed */
34               XAnyEvent xany;
35               XKeyEvent xkey;
36               XButtonEvent xbutton;
37               XMotionEvent xmotion;
38               XCrossingEvent xcrossing;
39               XFocusChangeEvent xfocus;
40               XExposeEvent xexpose;
41               XGraphicsExposeEvent xgraphicsexpose;
42               XNoExposeEvent xnoexpose;
43               XVisibilityEvent xvisibility;
44               XCreateWindowEvent xcreatewindow;
45               XDestroyWindowEvent xdestroywindow;
46               XUnmapEvent xunmap;
47               XMapEvent xmap;
48               XMapRequestEvent xmaprequest;
49               XReparentEvent xreparent;
50               XConfigureEvent xconfigure;
51               XGravityEvent xgravity;
52               XResizeRequestEvent xresizerequest;
53               XConfigureRequestEvent xconfigurerequest;
54               XCirculateEvent xcirculate;
55               XCirculateRequestEvent xcirculaterequest;
56               XPropertyEvent xproperty;
57               XSelectionClearEvent xselectionclear;
58               XSelectionRequestEvent xselectionrequest;
59               XSelectionEvent xselection;
60               XColormapEvent xcolormap;
61               XClientMessageEvent xclient;
62               XMappingEvent xmapping;
63               XErrorEvent xerror;
64               XKeymapEvent xkeymap;
65               long pad[24];
66       } XEvent;
67
68       An XEvent structure's first entry always is the type member, which is
69       set to the event type.  The second member always is the serial number
70       of the protocol request that generated the event.  The third member
71       always is send_event, which is a Bool that indicates if the event was
72       sent by a different client.  The fourth member always is a display,
73       which is the display that the event was read from.  Except for keymap
74       events, the fifth member always is a window, which has been carefully
75       selected to be useful to toolkit dispatchers.  To avoid breaking tool‐
76       kits, the order of these first five entries is not to change.  Most
77       events also contain a time member, which is the time at which an event
78       occurred.  In addition, a pointer to the generic event must be cast
79       before it is used to access any other information in the structure.
80

SEE ALSO

82       XButtonEvent(3), XCreateWindowEvent(3), XCirculateEvent(3), XCircu‐
83       lateRequestEvent(3), XColormapEvent(3), XConfigureEvent(3), XConfigur‐
84       eRequestEvent(3), XCrossingEvent(3), XDestroyWindowEvent(3), XEr‐
85       rorEvent(3), XExposeEvent(3), XFocusChangeEvent(3), XGraphicsEx‐
86       poseEvent(3), XGravityEvent(3), XKeymapEvent(3), XMapEvent(3), XMapRe‐
87       questEvent(3), XPropertyEvent(3), XReparentEvent(3), XResiz‐
88       eRequestEvent(3), XSelectionClearEvent(3), XSelectionEvent(3), XSelec‐
89       tionRequestEvent(3), XUnmapEvent(3), XVisibilityEvent(3)
90       Xlib - C Language X Interface
91
92
93
94X Version 11                     libX11 1.6.4                     XAnyEvent(3)
Impressum