1 XIGRABENTER(libmansuffix)
2 =========================
7 XIGrabEnter, XIUngrabEnter, XIGrabFocusIn, XIUngrabFocusIn -
8 grab/ungrab enter or focus in events.
13 #include <X11/extensions/XInput.h>
15 int XIGrabEnter( Display *display,
20 int paired_device_mode,
24 XIGrabModifiers *modifiers_inout);
26 int XIUngrabEnter( Display *display,
30 XIGrabModifiers *modifiers);
32 int XIGrabFocusIn ( Display *display,
36 int paired_device_mode,
40 XIGrabModifiers *modifiers_inout);
42 int XIUngrabFocusIn( Display *display,
46 XIGrabModifiers *modifiers);
48 Specifies the connection to the X server.
51 Specifies the device that is to be grabbed or released
54 Number of elements in modifiers or modifiers_inout.
57 Specifies the set of latched and base modifiers or
58 XIAnyModifier to ungrab. The data type is for
59 consistency with the respective grab request and the
60 status code of the XIGrabModifiers struct is ignored.
63 Specifies the set of latched and base modifiers or
64 XIAnyModifier to grab. Returns the modifiers that could
65 not be grabbed and their status code.
68 Specifies the grab window.
71 Specifies a Boolean value that indicates whether the are
72 to be reported as usual or reported with respect to the
76 Specifies the event mask.
79 Specifies further processing of events from this device.
80 You can pass XIGrabModeSync or XIGrabModeAsync.
83 Specifies further processing of events from the paired
84 master device. You can pass XIGrabModeSync or
85 XIGrabModeAsync. If deviceid specifies a floating slave
86 device, this parameter is ignored.
91 XIGrabEnter and XIGrabFocusIn establish a passive grab. The
92 modifier device for a enter grab is the paired master device if
93 deviceid specifies a master pointer. Otherwise, the modifier
94 device is the device specified with deviceid.
96 For XIGrabEnter and XIGrabFocusIn, in the future, the device is
97 actively grabbed (as for XIGrabDevice, the last-grab time is
98 set to the time at which the pointer/focus entered window) if
99 the device is not grabbed and the pointer has entered the
100 grab_window or the focus has been set to the grab_window when
101 the specified modifier keys are logically down on the modifier
102 device and no other buttons or modifier keys are logically
105 The interpretation of the remaining arguments is as for
106 XIGrabDevice. The active grab is terminated automatically when
107 the pointer leaves the window or the focus is set to a
108 different window (independent of the logical state of the
111 If the device is an attached slave device, the device is
112 automatically detached from the master device when the grab
113 activates and reattached to the same master device when the
114 grab deactivates. If the master device is removed while the
115 device is floating as a result of a grab, the device remains
116 floating once the grab deactivates.
118 Note that the logical state of a device (as seen by client
119 applications) may lag the physical state if device event
120 processing is frozen.
122 This request overrides all previous grabs by the same client of
123 the same type and modifier combinations on the same window. A
124 modifiers of XIAnyModifier is equivalent to issuing the grab
125 request for all possible modifier combinations (including the
126 combination of no modifiers). It is not required that all
127 modifiers specified have currently assigned KeyCodes.
129 If some other client has already issued a XIGrabEnter or
130 XIGrabFocusIn on the same window, a BadAccess error results.
131 When using XIAnyModifier, the request fails completely, and a
132 XIBadAccess error results (no grabs are established) if there
133 is a conflicting grab for any combination. XIGrabEnter and
134 XIGrabFocusin have no effect on an active grab.
136 On success, XIGrabEnter and XIGrabFocusIn return 0;
137 If one or more modifier combinations could not be grabbed,
138 XIGrabEnter and XIGrabFocusIn return the number of failed
139 combinations and modifiers_inout contains the failed combinations
140 and their respective status codes.
142 XIGrabEnter and XIGrabFocusIn can generate BadDevice,
143 BadMatch, BadValue, and BadWindow errors.
145 XIUngrabEnter and XIUngrabFocusIn releases the passive grab on
146 the specified window if it was grabbed by this client. A
147 modifier of XIAnyModifier is equivalent to issuing the ungrab
148 request for all possible modifier combinations, including the
149 combination of no modifiers. XIUngrabEnter and XIUngrabFocusIn
150 have no effect on an active grab.
152 XIUngrabEnter and XIUngrabFocusIn can generate BadDevice,
153 BadMatch, BadValue and BadWindow errors.
157 XIGrabEnter and XIGrabFocusIn return the number of modifier combination
158 that could not establish a passive grab. The modifiers are returned in
159 modifiers_inout, along with the respective error for this modifier
160 combination. If XIGrabEnter or XIGrabFocusIn return zero, passive grabs
161 with all requested modifier combinations were established successfully.
167 An invalid deviceid was specified.
170 This error may occur if XIGrabEnter specified a device
171 that has no valuators, or XIGrabFocusIn specified a device
175 Some numeric value falls outside the range of values
176 accepted by the request. Unless a specific range is
177 specified for an argument, the full range defined by the
178 argument's type is accepted. Any argument defined as a
179 set of alternatives can generate this error.
182 A value for a Window argument does not name a defined
188 The protocol headers for XI 2.0 did not provide
189 XIGrabModeAsync or XIGrabModeSync. Use GrabModeSync and
190 GrabModeAsync instead, respectively.
195 XIAllowEvents(libmansuffix)