1XCrossingEvent(3) XLIB FUNCTIONS XCrossingEvent(3)
2
3
4
6 XCrossingEvent - EnterNotify and LeaveNotify event structure
7
9 The structure for EnterNotify and LeaveNotify events contains:
10
11 typedef struct {
12 int type; /* EnterNotify or LeaveNotify */
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; /* ``event'' window reported relative to */
17 Window root; /* root window that the event occurred on */
18 Window subwindow; /* child window */
19 Time time; /* milliseconds */
20 int x, y; /* pointer x, y coordinates in event window */
21 int x_root, y_root; /* coordinates relative to root */
22 int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */
23 int detail;
24 /*
25 * NotifyAncestor, NotifyVirtual, NotifyInferior,
26 * NotifyNonlinear,NotifyNonlinearVirtual
27 */
28 Bool same_screen; /* same screen flag */
29 Bool focus; /* boolean focus */
30 unsigned int state; /* key or button mask */
31 } XCrossingEvent;
32 typedef XCrossingEvent XEnterWindowEvent;
33 typedef XCrossingEvent XLeaveWindowEvent;
34
35 When you receive these events, the structure members are set as fol‐
36 lows.
37
38 The type member is set to the event type constant name that uniquely
39 identifies it. For example, when the X server reports a GraphicsExpose
40 event to a client application, it sends an XGraphicsExposeEvent struc‐
41 ture with the type member set to GraphicsExpose. The display member is
42 set to a pointer to the display the event was read on. The send_event
43 member is set to True if the event came from a SendEvent protocol
44 request. The serial member is set from the serial number reported in
45 the protocol but expanded from the 16-bit least-significant bits to a
46 full 32-bit value. The window member is set to the window that is most
47 useful to toolkit dispatchers.
48
49 The window member is set to the window on which the EnterNotify or
50 LeaveNotify event was generated and is referred to as the event window.
51 This is the window used by the X server to report the event, and is
52 relative to the root window on which the event occurred. The root mem‐
53 ber is set to the root window of the screen on which the event
54 occurred.
55
56 For a LeaveNotify event, if a child of the event window contains the
57 initial position of the pointer, the subwindow component is set to that
58 child. Otherwise, the X server sets the subwindow member to None. For
59 an EnterNotify event, if a child of the event window contains the final
60 pointer position, the subwindow component is set to that child or None.
61
62 The time member is set to the time when the event was generated and is
63 expressed in milliseconds. The x and y members are set to the coordi‐
64 nates of the pointer position in the event window. This position is
65 always the pointer's final position, not its initial position. If the
66 event window is on the same screen as the root window, x and y are the
67 pointer coordinates relative to the event window's origin. Otherwise,
68 x and y are set to zero. The x_root and y_root members are set to the
69 pointer's coordinates relative to the root window's origin at the time
70 of the event.
71
72 The same_screen member is set to indicate whether the event window is
73 on the same screen as the root window and can be either True or False.
74 If True, the event and root windows are on the same screen. If False,
75 the event and root windows are not on the same screen.
76
77 The focus member is set to indicate whether the event window is the
78 focus window or an inferior of the focus window. The X server can set
79 this member to either True or False. If True, the event window is the
80 focus window or an inferior of the focus window. If False, the event
81 window is not the focus window or an inferior of the focus window.
82
83 The state member is set to indicate the state of the pointer buttons
84 and modifier keys just prior to the event. The X server can set this
85 member to the bitwise inclusive OR of one or more of the button or mod‐
86 ifier key masks: Button1Mask, Button2Mask, Button3Mask, Button4Mask,
87 Button5Mask, ShiftMask, LockMask, ControlMask, Mod1Mask, Mod2Mask,
88 Mod3Mask, Mod4Mask, Mod5Mask.
89
90 The mode member is set to indicate whether the events are normal
91 events, pseudo-motion events when a grab activates, or pseudo-motion
92 events when a grab deactivates. The X server can set this member to
93 NotifyNormal, NotifyGrab, or NotifyUngrab.
94
95 The detail member is set to indicate the notify detail and can be Noti‐
96 fyAncestor, NotifyVirtual, NotifyInferior, NotifyNonlinear, or Noti‐
97 fyNonlinearVirtual.
98
100 XAnyEvent(3), XButtonEvent(3), XCreateWindowEvent(3), XCircula‐
101 teEvent(3), XCirculateRequestEvent(3), XColormapEvent(3), XConfig‐
102 ureEvent(3), XConfigureRequestEvent(3), XDestroyWindowEvent(3), XEr‐
103 rorEvent(3), XExposeEvent(3), XFocusChangeEvent(3), XGraphicsEx‐
104 poseEvent(3), XGravityEvent(3), XKeymapEvent(3), XMapEvent(3), XMapRe‐
105 questEvent(3), XPropertyEvent(3), XReparentEvent(3), XResiz‐
106 eRequestEvent(3), XSelectionClearEvent(3), XSelectionEvent(3), XSelec‐
107 tionRequestEvent(3), XUnmapEvent(3), XVisibilityEvent(3)
108 Xlib - C Language X Interface
109
110
111
112X Version 11 libX11 1.6.4 XCrossingEvent(3)