1XIGRABENTER(3) [FIXME: manual] XIGRABENTER(3)
2
3
4
6 XIGrabEnter, XIUngrabEnter, XIGrabFocusIn, XIUngrabFocusIn -
7 grab/ungrab enter or focus in events.
8
10 #include <X11/extensions/XInput.h>
11
12 int XIGrabEnter( Display *display,
13 int deviceid,
14 Window grab_window
15 Cursor cursor,
16 int grab_mode,
17 int paired_device_mode,
18 Bool owner_events,
19 XIEventMask *mask,
20 int num_modifiers,
21 XIGrabModifiers *modifiers_inout);
22
23 int XIUngrabEnter( Display *display,
24 int deviceid,
25 Window grab_window
26 int num_modifiers,
27 XIGrabModifiers *modifiers);
28
29 int XIGrabFocusIn ( Display *display,
30 int deviceid,
31 Window grab_window
32 int grab_mode,
33 int paired_device_mode,
34 Bool owner_events,
35 XIEventMask *mask,
36 int num_modifiers,
37 XIGrabModifiers *modifiers_inout);
38
39 int XIUngrabFocusIn( Display *display,
40 int deviceid,
41 Window grab_window
42 int num_modifiers,
43 XIGrabModifiers *modifiers);
44 display
45 Specifies the connection to the X server.
46
47 device
48 Specifies the device that is to be grabbed or released
49
50 num_modifiers
51 Number of elements in modifiers or modifiers_return
52
53 modifiers
54 Specifies the set of latched and base modifiers or
55 XIAnyModifier to ungrab. The data type is for
56 consistency with the respective grab request and the
57 status code of the XIGrabModifiers struct is ignored.
58
59 modifiers_inout
60 Specifies the set of latched and base modifiers or
61 XIAnyModifier to grab. Returns the modifiers that could
62 not be grabbed and their status code.
63
64 grab_window
65 Specifies the grab window.
66
67 owner_events
68 Specifies a Boolean value that indicates whether the are
69 to be reported as usual or reported with respect to the
70 grab window.
71
72 mask
73 Specifies the event mask.
74
75 grab_mode
76 Specifies further processing of events from this device.
77 You can pass GrabModeSync or GrabModeAsync.
78
79 paired_device_mode
80 Specifies further processing of events from the paired
81 master device. You can pass GrabModeSync or
82 GrabModeAsync. If deviceid specifies a floating slave
83 device, this parameter is ignored.
84
86 XIGrabEnter and XIGrabFocusIn establish a passive grab. The
87 modifier device for a enter grab is the paired master device if
88 deviceid specifies a master pointer. Otherwise, the modifier
89 device is the device specified with deviceid.
90
91 For XIGrabEnter and XIGrabFocusIn, in the future, the device is
92 actively grabbed (as for XIGrabDevice, the last-grab time is
93 set to the time at which the pointer/focus entered window) if
94 the device is not grabbed and the pointer has entered the
95 grab_window or the focus has been set to the grab_window when
96 the specified modifier keys are logically down on the modifier
97 device and no other buttons or modifier keys are logically
98 down.
99
100 The interpretation of the remaining arguments is as for
101 XIGrabDevice. The active grab is terminated automatically when
102 the pointer leaves the window or the focus is set to a
103 different window (independent of the logical state of the
104 modifier keys).
105
106 If the device is an attached slave device, the device is
107 automatically detached from the master device when the grab
108 activates and reattached to the same master device when the
109 grab deactivates. If the master device is removed while the
110 device is floating as a result of a grab, the device remains
111 floating once the grab deactivates.
112
113 Note that the logical state of a device (as seen by client
114 applications) may lag the physical state if device event
115 processing is frozen.
116
117 This request overrides all previous grabs by the same client of
118 the same type and modifier combinations on the same window. A
119 modifiers of XIAnyModifier is equivalent to issuing the grab
120 request for all possible modifier combinations (including the
121 combination of no modifiers). It is not required that all
122 modifiers specified have currently assigned KeyCodes.
123
124 If some other client has already issued a XIGrabEnter or
125 XIGrabFocusIn on the same window, a BadAccess error results.
126 When using XIAnyModifier, the request fails completely, and a
127 XIBadAccess error results (no grabs are established) if there
128 is a conflicting grab for any combination. XIGrabEnter and
129 XIGrabFocusin have no effect on an active grab.
130
131 XIGrabEnter and XIGrabFocusIn can generate BadDevice,
132 BadMatch, BadValue, and BadWindow errors.
133
134 XIUngrabEnter and XIUngrabFocusIn releases the passive grab on
135 the specified window if it was grabbed by this client. A
136 modifier of XIAnyModifier is equivalent to issuing the ungrab
137 request for all possible modifier combinations, including the
138 combination of no modifiers. XIUngrabEnter and XIUngrabFocusIn
139 have no effect on an active grab.
140
141 XIUngrabEnter and XIUngrabFocusIn can generate BadDevice,
142 BadMatch, BadValue and BadWindow errors.
143
145 BadDevice
146 An invalid deviceid was specified.
147
148 BadMatch
149 This error may occur if XIGrabEnter specified a device
150 that has no valuators, or XIGrabFocusIn specified a device
151 that has no keys.
152
153 BadValue
154 Some numeric value falls outside the range of values
155 accepted by the request. Unless a specific range is
156 specified for an argument, the full range defined by the
157 argumentĀ“s type is accepted. Any argument defined as a
158 set of alternatives can generate this error.
159
160 BadWindow
161 A value for a Window argument does not name a defined
162 Window.
163
165 XIAllowEvents(3)
166
167
168
169[FIXME: source] 08/04/2010 XIGRABENTER(3)