2
.\" $XFree86: xc/doc/man/Xi/XGrDvBut.man,v 1.2 2001/01/27 18:20:21 dawes Exp $
5
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
7
.\" Permission to use, copy, modify, distribute, and sell this documentation
8
.\" for any purpose and without fee is hereby granted, provided that the above
9
.\" copyright notice and this permission notice appear in all copies.
10
.\" Ardent, and Hewlett-Packard make no representations about the
11
.\" suitability for any purpose of the information in this document. It is
12
.\" provided \`\`as is'' without express or implied warranty.
14
.\" $Xorg: XGrDvBut.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $
15
.ds xL Programming With Xlib
16
.TH XGrabDeviceButton __LIB_MAN_SUFFIX__ __xorgversion__ "X FUNCTIONS"
2
.\" Title: xgrabdevicebutton
3
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4
.\" Generator: DocBook XSL Stylesheets v1.74.3 <http://docbook.sf.net/>
6
.\" Manual: [FIXME: manual]
7
.\" Source: [FIXME: source]
10
.TH "XGRABDEVICEBUTTON" "libmansuffix" "10/02/2009" "[FIXME: source]" "[FIXME: manual]"
11
.\" -----------------------------------------------------------------
12
.\" * set default formatting
13
.\" -----------------------------------------------------------------
14
.\" disable hyphenation
16
.\" disable justification (adjust text to left margin only)
18
.\" -----------------------------------------------------------------
19
.\" * MAIN CONTENT STARTS HERE *
20
.\" -----------------------------------------------------------------
18
22
XGrabDeviceButton, XUngrabDeviceButton \- grab/ungrab extension input device buttons
23
int XGrabDeviceButton\^(\^Display *\fIdisplay\fP\^, XDevice *\fIdevice\fP\^,
24
unsigned int \fIbutton\fP\^, unsigned int \fImodifiers\fP\^, XDevice
25
*\fImodifier_device\fP\^, Window \fIgrab_window\fP\^, Bool
26
\fIowner_events\fP\^, unsigned int \fIevent_count\fP\^, XEventClass
27
*\fIevent_list\fP\^, int \fIthis_device_mode\fP\^, int
28
\fIother_devices_mode\fP\^);
30
int XUngrabDeviceButton\^(\^Display *\fIdisplay\fP\^, XDevice *\fIdevice\fP\^,
31
unsigned int \fIbutton\fP\^, unsigned int \fImodifiers\fP\^, XDevice
32
*\fImodifier_device\fP\^, Window \fIgrab_window\fP\^);
36
.ds Bu grabbed or released
39
Specifies the connection to the X server.
42
Specifies the device that is to be \*(Bu
45
Specifies the device button that is to be \*(Bu or
49
Specifies the set of keymasks or
51
The mask is the bitwise inclusive OR of the valid keymask bits.
52
Valid bits are: Shiftmask, LockMask, ControlMask, Mod1Mask, Mod2Mask,
53
Mod3Mask, Mod4Mask, Mod5Mask.
56
specifies the device whose modifiers are to be used. If the modifier_device
57
specified is NULL, the X keyboard will be used as the modifier_device.
60
Specifies the grab window.
63
Specifies a Boolean value that indicates whether the device
64
events are to be reported as usual or reported with respect to the grab window
65
if selected by the event list.
68
Specifies the number of event classes in the event list.
71
Specifies which events are reported to the client.
74
Specifies further processing of events from this device.
75
You can pass \fIGrabModeSync\fP or \fIGrabModeAsync\fP.
78
Specifies further processing of events from all other devices.
79
You can pass \fIGrabModeSync\fP or \fIGrabModeAsync\fP.
81
The \fIXGrabDeviceButton\fP request establishes a passive grab.
83
the device is actively grabbed (as for \fIXGrabDevice\fP,
84
the last-grab time is set to the time at which the button was pressed
85
(as transmitted in the
86
\fIDeviceButtonPress\fP
88
\fIDeviceButtonPress\fP
89
event is reported if all of the following conditions are true:
91
The device is not grabbed, and the specified button is logically pressed
92
when the specified modifier keys are logically down on the specified
94
and no other buttons or modifier keys are logically down.
96
Either the grab window is an ancestor of (or is) the focus window, OR
97
the grab window is a descendent of the focus window and contains the
100
A passive grab on the same button/modifier combination does not exist
101
on any ancestor of grab_window.
26
#include <X11/extensions/XInput\&.h>
30
int XGrabDeviceButton( Display *display,
33
unsigned int modifiers,
34
XDevice* modifier_device,
37
unsigned int event_count,
38
XEventClass *event_list,
40
int other_devices_mode);
44
int XUngrabDeviceButton( Display *display,
47
unsigned int modifiers,
48
XDevice* modifier_device,
54
Specifies the connection to the X server\&.
59
Specifies the device that is to be grabbed or released
64
Specifies the device button that is to be grabbed or
65
released or AnyButton\&.
70
Specifies the set of keymasks or AnyModifier\&.The mask is
71
the bitwise inclusive OR of the valid keymask bits\&.
72
Valid bits are: Shiftmask, LockMask, ControlMask,
73
Mod1Mask, Mod2Mask,Mod3Mask, Mod4Mask, Mod5Mask\&.
78
specifies the device whose modifiers are to be used\&. If
79
the modifier_devicespecified is NULL, the X keyboard
80
will be used as the modifier_device\&.
85
Specifies the grab window\&.
90
Specifies a Boolean value that indicates whether the
91
deviceevents are to be reported as usual or reported
92
with respect to the grab windowif selected by the event
98
Specifies the number of event classes in the event list\&.
103
Specifies which events are reported to the client\&.
108
Specifies further processing of events from this
109
device\&.You can pass GrabModeSync or GrabModeAsync\&.
114
Specifies further processing of events from all other
115
devices\&.You can pass GrabModeSync or GrabModeAsync\&.
123
The XGrabDeviceButton request establishes a passive grab\&. In
124
the future, the device is actively grabbed (as for XGrabDevice,
125
the last\-grab time is set to the time at which the button was
126
pressed (as transmitted in the DeviceButtonPress event), and
127
the DeviceButtonPress event is reported if all of the following
129
* The device is not grabbed, and the specified button is
130
logically pressed when the specified modifier keys are
131
logically down on the specified modifier device and no
132
other buttons or modifier keys are logically down\&.
133
* Either the grab window is an ancestor of (or is) the focus
134
window, OR the grab window is a descendent of the focus
135
window and contains the device\&.
136
* A passive grab on the same button/modifier combination does
137
not exist on any ancestor of grab_window\&.
103
147
The interpretation of the remaining arguments is as for
105
The active grab is terminated automatically when the logical state of the
106
device has all buttons released
107
(independent of the logical state of the modifier keys).
109
Note that the logical state of a device (as seen by client applications)
110
may lag the physical state if device event processing is frozen.
112
This request overrides all previous grabs by the same client on the same
113
button/modifier combinations on the same window.
116
is equivalent to issuing the grab request for all
117
possible modifier combinations (including the combination of no modifiers).
118
It is not required that all modifiers specified have currently assigned
123
issuing the request for all possible buttons.
124
Otherwise, it is not required that the specified button currently be assigned
125
to a physical button.
127
A modifier_device of NULL indicates that the X keyboard is to be used as the
130
If some other client has already issued a
131
\fIXGrabDeviceButton\fP
148
XGrabDevice\&. The active grab is terminated automatically when
149
the logical state of the device has all buttons released
150
(independent of the logical state of the modifier keys)\&.
160
Note that the logical state of a device (as seen by client
161
applications) may lag the physical state if device event
162
processing is frozen\&.
172
This request overrides all previous grabs by the same client on
173
the same button/modifier combinations on the same window\&. A
174
modifiers of AnyModifier is equivalent to issuing the grab
175
request for all possible modifier combinations (including the
176
combination of no modifiers)\&. It is not required that all
177
modifiers specified have currently assigned KeyCodes\&. A button
178
of AnyButton is equivalent to issuing the request for all
179
possible buttons\&. Otherwise, it is not required that the
180
specified button currently be assigned to a physical button\&.
190
A modifier_device of NULL indicates that the X keyboard is to
191
be used as the modifier_device\&.
201
If some other client has already issued a XGrabDeviceButton
132
202
with the same button/modifier combination on the same window, a
139
the request fails completely,
142
error results (no grabs are
143
established) if there is a conflicting grab for any combination.
144
\fIXGrabDeviceButton\fP
145
has no effect on an active grab.
147
\fIXGrabDeviceButton\fP
157
The \fIXUngrabDeviceButton\fP
158
request releases the passive grab for a
159
button/modifier combination on the specified window if
160
it was grabbed by this client.
161
A modifier of \fIAnyModifier\fP is
162
equivalent to issuing
163
the ungrab request for all possible modifier combinations, including
164
the combination of no modifiers.
167
is equivalent to issuing the
168
request for all possible buttons.
169
\fIXUngrabDeviceButton\fP
170
has no effect on an active grab.
172
A modifier_device of NULL indicates that the X keyboard should be used as
175
\fIXUngrabDeviceButton\fP
186
An invalid device was specified. The specified device does not exist or has
187
not been opened by this client via \fIXOpenInputDevice\fP. This error may
188
also occur if the specified device is the X keyboard or X pointer device.
191
This error may occur if an \fIXGrabDeviceButton\fP request was made
193
a device that has no buttons, or specifying a modifier device
197
Some numeric value falls outside the range of values accepted by the request.
198
Unless a specific range is specified for an argument, the full range defined
199
by the argument's type is accepted. Any argument defined as a set of
200
alternatives can generate this error.
203
A value for a Window argument does not name a defined Window.
203
BadAccess error results\&. When using AnyModifier or AnyButton ,
204
the request fails completely, and a BadAccess error results (no
205
grabs are established) if there is a conflicting grab for any
206
combination\&. XGrabDeviceButton has no effect on an active grab\&.
216
XGrabDeviceButton can generate BadClass, BadDevice, BadMatch,
217
BadValue, and BadWindow errors\&.\&.P The XUngrabDeviceButton
218
request releases the passive grab for a button/modifier
219
combination on the specified window if it was grabbed by this
220
client\&. A modifier of AnyModifier is equivalent to issuing the
221
ungrab request for all possible modifier combinations,
222
including the combination of no modifiers\&. A button of
223
AnyButton is equivalent to issuing the request for all possible
224
buttons\&. XUngrabDeviceButton has no effect on an active grab\&.
234
A modifier_device of NULL indicates that the X keyboard should
235
be used as the modifier_device\&.
245
XUngrabDeviceButton can generate BadDevice, BadMatch, BadValue
246
and BadWindow errors\&.
258
An invalid device was specified\&. The specified device
259
does not exist or has not been opened by this client via
260
XOpenInputDevice\&. This error may also occur if the
261
specified device is the X keyboard or X pointer device\&.
272
This error may occur if an XGrabDeviceButton request was
273
made specifying a device that has no buttons, or
274
specifying a modifier device that has no keys\&.
285
Some numeric value falls outside the range of values
286
accepted by the request\&. Unless a specific range is
287
specified for an argument, the full range defined by the
288
argument\'s type is accepted\&. Any argument defined as a
289
set of alternatives can generate this error\&.
300
A value for a Window argument does not name a defined
205
XAllowDeviceEvents(3),
312
XAllowDeviceEvents(libmansuffix), XGrabDevice(libmansuffix), XGrabDeviceKey(libmansuffix)