Debian Codegraph @

man/XGrabDeviceButton.man

raw
1 '\" t
2 .\" Title: xgrabdevicebutton
3 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 09/05/2024
6 .\" Manual: \ \&
7 .\" Source: \ \&
8 .\" Language: English
9 .\"
10 .TH "XGRABDEVICEBUTTON" "libmansuffix" "09/05/2024" "\ \&" "\ \&"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 XGrabDeviceButton, XUngrabDeviceButton \- grab/ungrab extension input device buttons
32 .SH "SYNOPSIS"
33 .sp
34 .nf
35 #include <X11/extensions/XInput\&.h>
36 .fi
37 .sp
38 .nf
39 int XGrabDeviceButton( Display *display,
40 XDevice *device,
41 unsigned int button,
42 unsigned int modifiers,
43 XDevice* modifier_device,
44 Window grab_window,
45 Bool owner_events,
46 unsigned int event_count,
47 XEventClass *event_list,
48 int this_device_mode,
49 int other_devices_mode);
50 .fi
51 .sp
52 .nf
53 int XUngrabDeviceButton( Display *display,
54 XDevice *device,
55 unsigned int button,
56 unsigned int modifiers,
57 XDevice* modifier_device,
58 Window grab_window);
59 .fi
60 .sp
61 .nf
62 display
63 Specifies the connection to the X server\&.
64 .fi
65 .sp
66 .nf
67 device
68 Specifies the device that is to be grabbed or released
69 .fi
70 .sp
71 .nf
72 button
73 Specifies the device button that is to be grabbed or
74 released or AnyButton\&.
75 .fi
76 .sp
77 .nf
78 modifiers
79 Specifies the set of keymasks or AnyModifier\&. The mask is
80 the bitwise inclusive OR of the valid keymask bits\&.
81 Valid bits are: ShiftMask, LockMask, ControlMask,
82 Mod1Mask, Mod2Mask, Mod3Mask, Mod4Mask, Mod5Mask\&.
83 .fi
84 .sp
85 .nf
86 modifier_device
87 specifies the device whose modifiers are to be used\&. If
88 the modifier_device specified is NULL, the X keyboard
89 will be used as the modifier_device\&.
90 .fi
91 .sp
92 .nf
93 grab_window
94 Specifies the grab window\&.
95 .fi
96 .sp
97 .nf
98 owner_events
99 Specifies a Boolean value that indicates whether the
100 device events are to be reported as usual or reported
101 with respect to the grab window if selected by the event
102 list\&.
103 .fi
104 .sp
105 .nf
106 event_count
107 Specifies the number of event classes in the event list\&.
108 .fi
109 .sp
110 .nf
111 event_list
112 Specifies which events are reported to the client\&.
113 .fi
114 .sp
115 .nf
116 this_device_mode
117 Specifies further processing of events from this
118 device\&. You can pass GrabModeSync or GrabModeAsync\&.
119 .fi
120 .sp
121 .nf
122 other_devices_mode
123 Specifies further processing of events from all other
124 devices\&. You can pass GrabModeSync or GrabModeAsync\&.
125 .fi
126 .SH "DESCRIPTION"
127 .sp
128 .if n \{\
129 .RS 4
130 .\}
131 .nf
132 The XGrabDeviceButton request establishes a passive grab\&. In
133 the future, the device is actively grabbed (as for XGrabDevice,
134 the last\-grab time is set to the time at which the button was
135 pressed (as transmitted in the DeviceButtonPress event), and
136 the DeviceButtonPress event is reported if all of the following
137 conditions are true:
138 * The device is not grabbed, and the specified button is
139 logically pressed when the specified modifier keys are
140 logically down on the specified modifier device and no
141 other buttons or modifier keys are logically down\&.
142 * Either the grab window is an ancestor of (or is) the focus
143 window, OR the grab window is a descendent of the focus
144 window and contains the device\&.
145 * A passive grab on the same button/modifier combination does
146 not exist on any ancestor of grab_window\&.
147 .fi
148 .if n \{\
149 .RE
150 .\}
151 .sp
152 .if n \{\
153 .RS 4
154 .\}
155 .nf
156 The interpretation of the remaining arguments is as for
157 XGrabDevice\&. The active grab is terminated automatically when
158 the logical state of the device has all buttons released
159 (independent of the logical state of the modifier keys)\&.
160 .fi
161 .if n \{\
162 .RE
163 .\}
164 .sp
165 .if n \{\
166 .RS 4
167 .\}
168 .nf
169 Note that the logical state of a device (as seen by client
170 applications) may lag the physical state if device event
171 processing is frozen\&.
172 .fi
173 .if n \{\
174 .RE
175 .\}
176 .sp
177 .if n \{\
178 .RS 4
179 .\}
180 .nf
181 This request overrides all previous grabs by the same client on
182 the same button/modifier combinations on the same window\&. A
183 modifiers of AnyModifier is equivalent to issuing the grab
184 request for all possible modifier combinations (including the
185 combination of no modifiers)\&. It is not required that all
186 modifiers specified have currently assigned KeyCodes\&. A button
187 of AnyButton is equivalent to issuing the request for all
188 possible buttons\&. Otherwise, it is not required that the
189 specified button currently be assigned to a physical button\&.
190 .fi
191 .if n \{\
192 .RE
193 .\}
194 .sp
195 .if n \{\
196 .RS 4
197 .\}
198 .nf
199 A modifier_device of NULL indicates that the X keyboard is to
200 be used as the modifier_device\&.
201 .fi
202 .if n \{\
203 .RE
204 .\}
205 .sp
206 .if n \{\
207 .RS 4
208 .\}
209 .nf
210 If some other client has already issued a XGrabDeviceButton
211 with the same button/modifier combination on the same window, a
212 BadAccess error results\&. When using AnyModifier or AnyButton ,
213 the request fails completely, and a BadAccess error results (no
214 grabs are established) if there is a conflicting grab for any
215 combination\&. XGrabDeviceButton has no effect on an active grab\&.
216 .fi
217 .if n \{\
218 .RE
219 .\}
220 .sp
221 .if n \{\
222 .RS 4
223 .\}
224 .nf
225 XGrabDeviceButton can generate BadClass, BadDevice, BadMatch,
226 BadValue, and BadWindow errors\&.
227 .fi
228 .if n \{\
229 .RE
230 .\}
231 .sp
232 .if n \{\
233 .RS 4
234 .\}
235 .nf
236 The XUngrabDeviceButton request releases the passive grab for a
237 button/modifier combination on the specified window if it was
238 grabbed by this client\&. A modifier of AnyModifier is equivalent to
239 issuing the ungrab request for all possible modifier combinations,
240 including the combination of no modifiers\&. A button of AnyButton is
241 equivalent to issuing the request for all possible buttons\&.
242 XUngrabDeviceButton has no effect on an active grab\&.
243 .fi
244 .if n \{\
245 .RE
246 .\}
247 .sp
248 .if n \{\
249 .RS 4
250 .\}
251 .nf
252 A modifier_device of NULL indicates that the X keyboard should
253 be used as the modifier_device\&.
254 .fi
255 .if n \{\
256 .RE
257 .\}
258 .sp
259 .if n \{\
260 .RS 4
261 .\}
262 .nf
263 XUngrabDeviceButton can generate BadDevice, BadMatch, BadValue
264 and BadWindow errors\&.
265 .fi
266 .if n \{\
267 .RE
268 .\}
269 .SH "DIAGNOSTICS"
270 .sp
271 .if n \{\
272 .RS 4
273 .\}
274 .nf
275 BadDevice
276 An invalid device was specified\&. The specified device
277 does not exist or has not been opened by this client via
278 XOpenInputDevice\&. This error may also occur if the
279 specified device is the X keyboard or X pointer device\&.
280 .fi
281 .if n \{\
282 .RE
283 .\}
284 .sp
285 .if n \{\
286 .RS 4
287 .\}
288 .nf
289 BadMatch
290 This error may occur if an XGrabDeviceButton request was
291 made specifying a device that has no buttons, or
292 specifying a modifier device that has no keys\&.
293 .fi
294 .if n \{\
295 .RE
296 .\}
297 .sp
298 .if n \{\
299 .RS 4
300 .\}
301 .nf
302 BadValue
303 Some numeric value falls outside the range of values
304 accepted by the request\&. Unless a specific range is
305 specified for an argument, the full range defined by the
306 argument\*(Aqs type is accepted\&. Any argument defined as a
307 set of alternatives can generate this error\&.
308 .fi
309 .if n \{\
310 .RE
311 .\}
312 .sp
313 .if n \{\
314 .RS 4
315 .\}
316 .nf
317 BadWindow
318 A value for a Window argument does not name a defined
319 Window\&.
320 .fi
321 .if n \{\
322 .RE
323 .\}
324 .SH "SEE ALSO"
325 .sp
326 .if n \{\
327 .RS 4
328 .\}
329 .nf
330 XAllowDeviceEvents(libmansuffix), XGrabDevice(libmansuffix), XGrabDeviceKey(libmansuffix)
331 .fi
332 .if n \{\
333 .RE
334 .\}