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/>
6 .\" Manual: [FIXME: manual]
7 .\" Source: [FIXME: source]
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 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 XGrabDeviceButton, XUngrabDeviceButton \- grab/ungrab extension input device buttons
35 #include <X11/extensions/XInput\&.h>
39 int XGrabDeviceButton( Display *display,
42 unsigned int modifiers,
43 XDevice* modifier_device,
46 unsigned int event_count,
47 XEventClass *event_list,
49 int other_devices_mode);
53 int XUngrabDeviceButton( Display *display,
56 unsigned int modifiers,
57 XDevice* modifier_device,
63 Specifies the connection to the X server\&.
68 Specifies the device that is to be grabbed or released
73 Specifies the device button that is to be grabbed or
74 released or AnyButton\&.
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\&.
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\&.
94 Specifies the grab window\&.
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
107 Specifies the number of event classes in the event list\&.
112 Specifies which events are reported to the client\&.
117 Specifies further processing of events from this
118 device\&.You can pass GrabModeSync or GrabModeAsync\&.
123 Specifies further processing of events from all other
124 devices\&.You can pass GrabModeSync or GrabModeAsync\&.
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
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\&.
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)\&.
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\&.
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\&.
199 A modifier_device of NULL indicates that the X keyboard is to
200 be used as the modifier_device\&.
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\&.
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\&.
243 A modifier_device of NULL indicates that the X keyboard should
244 be used as the modifier_device\&.
254 XUngrabDeviceButton can generate BadDevice, BadMatch, BadValue
255 and BadWindow errors\&.
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\&.
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\&.
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\&.
309 A value for a Window argument does not name a defined
321 XAllowDeviceEvents(libmansuffix), XGrabDevice(libmansuffix), XGrabDeviceKey(libmansuffix)