Fixed package groups
[platform/upstream/libXi.git] / man / XGrabDeviceButton.man
1 '\" t
2 .\"     Title: xgrabdevicebutton
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\"      Date: 09/23/2011
6 .\"    Manual: [FIXME: manual]
7 .\"    Source: [FIXME: source]
8 .\"  Language: English
9 .\"
10 .TH "XGRABDEVICEBUTTON" "libmansuffix" "09/23/2011" "[FIXME: source]" "[FIXME: manual]"
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_devicespecified 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        deviceevents are to be reported as usual or reported
101        with respect to the grab windowif 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\&.\&.P The XUngrabDeviceButton
227 request releases the passive grab for a button/modifier
228 combination on the specified window if it was grabbed by this
229 client\&. A modifier of AnyModifier is equivalent to issuing the
230 ungrab request for all possible modifier combinations,
231 including the combination of no modifiers\&. A button of
232 AnyButton is equivalent to issuing the request for all possible
233 buttons\&. XUngrabDeviceButton has no effect on an active grab\&.
234 .fi
235 .if n \{\
236 .RE
237 .\}
238 .sp
239 .if n \{\
240 .RS 4
241 .\}
242 .nf
243 A modifier_device of NULL indicates that the X keyboard should
244 be used as the modifier_device\&.
245 .fi
246 .if n \{\
247 .RE
248 .\}
249 .sp
250 .if n \{\
251 .RS 4
252 .\}
253 .nf
254 XUngrabDeviceButton can generate BadDevice, BadMatch, BadValue
255 and BadWindow errors\&.
256 .fi
257 .if n \{\
258 .RE
259 .\}
260 .SH "DIAGNOSTICS"
261 .sp
262 .if n \{\
263 .RS 4
264 .\}
265 .nf
266 BadDevice
267        An invalid device was specified\&. The specified device
268        does not exist or has not been opened by this client via
269        XOpenInputDevice\&. This error may also occur if the
270        specified device is the X keyboard or X pointer device\&.
271 .fi
272 .if n \{\
273 .RE
274 .\}
275 .sp
276 .if n \{\
277 .RS 4
278 .\}
279 .nf
280 BadMatch
281        This error may occur if an XGrabDeviceButton request was
282        made specifying a device that has no buttons, or
283        specifying a modifier device that has no keys\&.
284 .fi
285 .if n \{\
286 .RE
287 .\}
288 .sp
289 .if n \{\
290 .RS 4
291 .\}
292 .nf
293 BadValue
294        Some numeric value falls outside the range of values
295        accepted by the request\&. Unless a specific range is
296        specified for an argument, the full range defined by the
297        argument\*(Aqs type is accepted\&. Any argument defined as a
298        set of alternatives can generate this error\&.
299 .fi
300 .if n \{\
301 .RE
302 .\}
303 .sp
304 .if n \{\
305 .RS 4
306 .\}
307 .nf
308 BadWindow
309        A value for a Window argument does not name a defined
310        Window\&.
311 .fi
312 .if n \{\
313 .RE
314 .\}
315 .SH "SEE ALSO"
316 .sp
317 .if n \{\
318 .RS 4
319 .\}
320 .nf
321 XAllowDeviceEvents(libmansuffix), XGrabDevice(libmansuffix), XGrabDeviceKey(libmansuffix)
322 .fi
323 .if n \{\
324 .RE
325 .\}