1 XGRABDEVICEBUTTON(libmansuffix)
2 ===============================
7 XGrabDeviceButton, XUngrabDeviceButton - grab/ungrab extension
13 #include <X11/extensions/XInput.h>
15 int XGrabDeviceButton( Display *display,
18 unsigned int modifiers,
19 XDevice* modifier_device,
22 unsigned int event_count,
23 XEventClass *event_list,
25 int other_devices_mode);
27 int XUngrabDeviceButton( Display *display,
30 unsigned int modifiers,
31 XDevice* modifier_device,
35 Specifies the connection to the X server.
38 Specifies the device that is to be grabbed or released
41 Specifies the device button that is to be grabbed or
42 released or AnyButton.
45 Specifies the set of keymasks or AnyModifier.The mask is
46 the bitwise inclusive OR of the valid keymask bits.
47 Valid bits are: Shiftmask, LockMask, ControlMask,
48 Mod1Mask, Mod2Mask,Mod3Mask, Mod4Mask, Mod5Mask.
51 specifies the device whose modifiers are to be used. If
52 the modifier_devicespecified is NULL, the X keyboard
53 will be used as the modifier_device.
56 Specifies the grab window.
59 Specifies a Boolean value that indicates whether the
60 deviceevents are to be reported as usual or reported
61 with respect to the grab windowif selected by the event
65 Specifies the number of event classes in the event list.
68 Specifies which events are reported to the client.
71 Specifies further processing of events from this
72 device.You can pass GrabModeSync or GrabModeAsync.
75 Specifies further processing of events from all other
76 devices.You can pass GrabModeSync or GrabModeAsync.
81 The XGrabDeviceButton request establishes a passive grab. In
82 the future, the device is actively grabbed (as for XGrabDevice,
83 the last-grab time is set to the time at which the button was
84 pressed (as transmitted in the DeviceButtonPress event), and
85 the DeviceButtonPress event is reported if all of the following
87 * The device is not grabbed, and the specified button is
88 logically pressed when the specified modifier keys are
89 logically down on the specified modifier device and no
90 other buttons or modifier keys are logically down.
91 * Either the grab window is an ancestor of (or is) the focus
92 window, OR the grab window is a descendent of the focus
93 window and contains the device.
94 * A passive grab on the same button/modifier combination does
95 not exist on any ancestor of grab_window.
97 The interpretation of the remaining arguments is as for
98 XGrabDevice. The active grab is terminated automatically when
99 the logical state of the device has all buttons released
100 (independent of the logical state of the modifier keys).
102 Note that the logical state of a device (as seen by client
103 applications) may lag the physical state if device event
104 processing is frozen.
106 This request overrides all previous grabs by the same client on
107 the same button/modifier combinations on the same window. A
108 modifiers of AnyModifier is equivalent to issuing the grab
109 request for all possible modifier combinations (including the
110 combination of no modifiers). It is not required that all
111 modifiers specified have currently assigned KeyCodes. A button
112 of AnyButton is equivalent to issuing the request for all
113 possible buttons. Otherwise, it is not required that the
114 specified button currently be assigned to a physical button.
116 A modifier_device of NULL indicates that the X keyboard is to
117 be used as the modifier_device.
119 If some other client has already issued a XGrabDeviceButton
120 with the same button/modifier combination on the same window, a
121 BadAccess error results. When using AnyModifier or AnyButton ,
122 the request fails completely, and a BadAccess error results (no
123 grabs are established) if there is a conflicting grab for any
124 combination. XGrabDeviceButton has no effect on an active grab.
126 XGrabDeviceButton can generate BadClass, BadDevice, BadMatch,
127 BadValue, and BadWindow errors..P The XUngrabDeviceButton
128 request releases the passive grab for a button/modifier
129 combination on the specified window if it was grabbed by this
130 client. A modifier of AnyModifier is equivalent to issuing the
131 ungrab request for all possible modifier combinations,
132 including the combination of no modifiers. A button of
133 AnyButton is equivalent to issuing the request for all possible
134 buttons. XUngrabDeviceButton has no effect on an active grab.
136 A modifier_device of NULL indicates that the X keyboard should
137 be used as the modifier_device.
139 XUngrabDeviceButton can generate BadDevice, BadMatch, BadValue
140 and BadWindow errors.
146 An invalid device was specified. The specified device
147 does not exist or has not been opened by this client via
148 XOpenInputDevice. This error may also occur if the
149 specified device is the X keyboard or X pointer device.
152 This error may occur if an XGrabDeviceButton request was
153 made specifying a device that has no buttons, or
154 specifying a modifier device that has no keys.
157 Some numeric value falls outside the range of values
158 accepted by the request. Unless a specific range is
159 specified for an argument, the full range defined by the
160 argument's type is accepted. Any argument defined as a
161 set of alternatives can generate this error.
164 A value for a Window argument does not name a defined
170 XAllowDeviceEvents(libmansuffix), XGrabDevice(libmansuffix), XGrabDeviceKey(libmansuffix)