~ubuntu-branches/ubuntu/natty/libxi/natty-201011191114

« back to all changes in this revision

Viewing changes to man/XGrabDeviceButton.man

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-11-21 18:39:28 UTC
  • mfrom: (1.1.10 upstream) (0.1.6 experimental)
  • Revision ID: james.westby@ubuntu.com-20091121183928-ek2jwqx3rmhv3zjz
Tags: 2:1.3-1
* Bump Standards-Version to 3.8.3.
* Add build-deps on xmlto and asciidoc to build the manpages.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.\"
2
 
.\" $XFree86: xc/doc/man/Xi/XGrDvBut.man,v 1.2 2001/01/27 18:20:21 dawes Exp $
3
 
.\"
4
 
.\"
5
 
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, 
6
 
.\" 
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.
13
 
.\" 
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"
17
 
.SH NAME
 
1
'\" t
 
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/>
 
5
.\"      Date: 10/02/2009
 
6
.\"    Manual: [FIXME: manual]
 
7
.\"    Source: [FIXME: source]
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "XGRABDEVICEBUTTON" "libmansuffix" "10/02/2009" "[FIXME: source]" "[FIXME: manual]"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
18
22
XGrabDeviceButton, XUngrabDeviceButton \- grab/ungrab extension input device buttons
19
 
.SH SYNTAX
20
 
\fB
21
 
.nf
22
 
.HP
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\^); 
29
 
.HP
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\^); 
33
 
.fi
34
 
\fP
35
 
.SH ARGUMENTS
36
 
.ds Bu grabbed or released
37
 
.TP 12
38
 
.I display
39
 
Specifies the connection to the X server.
40
 
.TP 12
41
 
.I device
42
 
Specifies the device that is to be \*(Bu
43
 
.TP 12
44
 
.I button
45
 
Specifies the device button that is to be \*(Bu or
46
 
\fIAnyButton\fP.
47
 
.TP 12
48
 
.I modifiers
49
 
Specifies the set of keymasks or
50
 
\fIAnyModifier\fP.
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.
54
 
.TP 12
55
 
.I modifier_device
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.
58
 
.TP 12
59
 
.I grab_window
60
 
Specifies the grab window.
61
 
.TP 12
62
 
.I owner_events
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.
66
 
.TP 12
67
 
.I event_count
68
 
Specifies the number of event classes in the event list.
69
 
.TP 12
70
 
.I event_list
71
 
Specifies which events are reported to the client.
72
 
.TP 12
73
 
.I this_device_mode
74
 
Specifies further processing of events from this device.
75
 
You can pass \fIGrabModeSync\fP or \fIGrabModeAsync\fP.
76
 
.TP 12
77
 
.I other_devices_mode
78
 
Specifies further processing of events from all other devices.
79
 
You can pass \fIGrabModeSync\fP or \fIGrabModeAsync\fP.
80
 
.SH DESCRIPTION
81
 
The \fIXGrabDeviceButton\fP request establishes a passive grab.
82
 
In the future,
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
87
 
event), and the
88
 
\fIDeviceButtonPress\fP
89
 
event is reported if all of the following conditions are true:
90
 
.IP \(bu 5
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
93
 
modifier device
94
 
and no other buttons or modifier keys are logically down.
95
 
.IP \(bu 5
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
98
 
device.
99
 
.IP \(bu 5
100
 
A passive grab on the same button/modifier combination does not exist
101
 
on any ancestor of grab_window.
102
 
.LP
 
23
.SH "SYNOPSIS"
 
24
.sp
 
25
.nf
 
26
#include <X11/extensions/XInput\&.h>
 
27
.fi
 
28
.sp
 
29
.nf
 
30
int XGrabDeviceButton( Display *display,
 
31
                       XDevice *device,
 
32
                       unsigned int button,
 
33
                       unsigned int modifiers,
 
34
                       XDevice* modifier_device,
 
35
                       Window grab_window,
 
36
                       Bool owner_events,
 
37
                       unsigned int event_count,
 
38
                       XEventClass *event_list,
 
39
                       int this_device_mode,
 
40
                       int other_devices_mode);
 
41
.fi
 
42
.sp
 
43
.nf
 
44
int XUngrabDeviceButton( Display *display,
 
45
                         XDevice *device,
 
46
                         unsigned int button,
 
47
                         unsigned int modifiers,
 
48
                         XDevice* modifier_device,
 
49
                         Window grab_window);
 
50
.fi
 
51
.sp
 
52
.nf
 
53
display
 
54
       Specifies the connection to the X server\&.
 
55
.fi
 
56
.sp
 
57
.nf
 
58
device
 
59
       Specifies the device that is to be grabbed or released
 
60
.fi
 
61
.sp
 
62
.nf
 
63
button
 
64
       Specifies the device button that is to be grabbed or
 
65
       released or AnyButton\&.
 
66
.fi
 
67
.sp
 
68
.nf
 
69
modifiers
 
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\&.
 
74
.fi
 
75
.sp
 
76
.nf
 
77
modifier_device
 
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\&.
 
81
.fi
 
82
.sp
 
83
.nf
 
84
grab_window
 
85
       Specifies the grab window\&.
 
86
.fi
 
87
.sp
 
88
.nf
 
89
owner_events
 
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
 
93
       list\&.
 
94
.fi
 
95
.sp
 
96
.nf
 
97
event_count
 
98
       Specifies the number of event classes in the event list\&.
 
99
.fi
 
100
.sp
 
101
.nf
 
102
event_list
 
103
       Specifies which events are reported to the client\&.
 
104
.fi
 
105
.sp
 
106
.nf
 
107
this_device_mode
 
108
       Specifies further processing of events from this
 
109
       device\&.You can pass GrabModeSync or GrabModeAsync\&.
 
110
.fi
 
111
.sp
 
112
.nf
 
113
other_devices_mode
 
114
       Specifies further processing of events from all other
 
115
       devices\&.You can pass GrabModeSync or GrabModeAsync\&.
 
116
.fi
 
117
.SH "DESCRIPTION"
 
118
.sp
 
119
.if n \{\
 
120
.RS 4
 
121
.\}
 
122
.nf
 
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
 
128
conditions are true:
 
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\&.
 
138
.fi
 
139
.if n \{\
 
140
.RE
 
141
.\}
 
142
.sp
 
143
.if n \{\
 
144
.RS 4
 
145
.\}
 
146
.nf
103
147
The interpretation of the remaining arguments is as for
104
 
\fIXGrabDevice\fP.
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).
108
 
.LP
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.
111
 
.LP
112
 
This request overrides all previous grabs by the same client on the same
113
 
button/modifier combinations on the same window.
114
 
A modifiers of 
115
 
\fIAnyModifier\fP 
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 
119
 
KeyCodes.
120
 
A button of 
121
 
\fIAnyButton\fP 
122
 
is equivalent to
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.
126
 
.LP
127
 
A modifier_device of NULL indicates that the X keyboard is to be used as the
128
 
modifier_device.
129
 
.LP
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)\&.
 
151
.fi
 
152
.if n \{\
 
153
.RE
 
154
.\}
 
155
.sp
 
156
.if n \{\
 
157
.RS 4
 
158
.\}
 
159
.nf
 
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\&.
 
163
.fi
 
164
.if n \{\
 
165
.RE
 
166
.\}
 
167
.sp
 
168
.if n \{\
 
169
.RS 4
 
170
.\}
 
171
.nf
 
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\&.
 
181
.fi
 
182
.if n \{\
 
183
.RE
 
184
.\}
 
185
.sp
 
186
.if n \{\
 
187
.RS 4
 
188
.\}
 
189
.nf
 
190
A modifier_device of NULL indicates that the X keyboard is to
 
191
be used as the modifier_device\&.
 
192
.fi
 
193
.if n \{\
 
194
.RE
 
195
.\}
 
196
.sp
 
197
.if n \{\
 
198
.RS 4
 
199
.\}
 
200
.nf
 
201
If some other client has already issued a XGrabDeviceButton
132
202
with the same button/modifier combination on the same window, a
133
 
\fIBadAccess\fP 
134
 
error results.
135
 
When using 
136
 
\fIAnyModifier\fP 
137
 
or 
138
 
\fIAnyButton\fP , 
139
 
the request fails completely,
140
 
and a
141
 
\fIBadAccess\fP
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.
146
 
.LP
147
 
\fIXGrabDeviceButton\fP
148
 
can generate
149
 
\fIBadClass\fP,
150
 
\fIBadDevice\fP,
151
 
\fIBadMatch\fP,
152
 
\fIBadValue\fP,
153
 
and
154
 
\fIBadWindow\fP 
155
 
errors.
156
 
.P 
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.
165
 
A button of 
166
 
\fIAnyButton\fP 
167
 
is equivalent to issuing the
168
 
request for all possible buttons.
169
 
\fIXUngrabDeviceButton\fP
170
 
has no effect on an active grab.
171
 
.LP
172
 
A modifier_device of NULL indicates that the X keyboard should be used as
173
 
the modifier_device.
174
 
.LP
175
 
\fIXUngrabDeviceButton\fP
176
 
can generate
177
 
\fIBadDevice\fP,
178
 
\fIBadMatch\fP,
179
 
\fIBadValue\fP
180
 
and
181
 
\fIBadWindow\fP 
182
 
errors.
183
 
.SH DIAGNOSTICS
184
 
.TP 12
185
 
\fIBadDevice\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.
189
 
.TP 12
190
 
\fIBadMatch\fP
191
 
This error may occur if an \fIXGrabDeviceButton\fP request was made
192
 
specifying
193
 
a device that has no buttons, or specifying a modifier device
194
 
that has no keys.
195
 
.TP 12
196
 
\fIBadValue\fP
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.
201
 
.TP 12
202
 
\fIBadWindow\fP
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\&.
 
207
.fi
 
208
.if n \{\
 
209
.RE
 
210
.\}
 
211
.sp
 
212
.if n \{\
 
213
.RS 4
 
214
.\}
 
215
.nf
 
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\&.
 
225
.fi
 
226
.if n \{\
 
227
.RE
 
228
.\}
 
229
.sp
 
230
.if n \{\
 
231
.RS 4
 
232
.\}
 
233
.nf
 
234
A modifier_device of NULL indicates that the X keyboard should
 
235
be used as the modifier_device\&.
 
236
.fi
 
237
.if n \{\
 
238
.RE
 
239
.\}
 
240
.sp
 
241
.if n \{\
 
242
.RS 4
 
243
.\}
 
244
.nf
 
245
XUngrabDeviceButton can generate BadDevice, BadMatch, BadValue
 
246
and BadWindow errors\&.
 
247
.fi
 
248
.if n \{\
 
249
.RE
 
250
.\}
 
251
.SH "DIAGNOSTICS"
 
252
.sp
 
253
.if n \{\
 
254
.RS 4
 
255
.\}
 
256
.nf
 
257
BadDevice
 
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\&.
 
262
.fi
 
263
.if n \{\
 
264
.RE
 
265
.\}
 
266
.sp
 
267
.if n \{\
 
268
.RS 4
 
269
.\}
 
270
.nf
 
271
BadMatch
 
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\&.
 
275
.fi
 
276
.if n \{\
 
277
.RE
 
278
.\}
 
279
.sp
 
280
.if n \{\
 
281
.RS 4
 
282
.\}
 
283
.nf
 
284
BadValue
 
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\&.
 
290
.fi
 
291
.if n \{\
 
292
.RE
 
293
.\}
 
294
.sp
 
295
.if n \{\
 
296
.RS 4
 
297
.\}
 
298
.nf
 
299
BadWindow
 
300
       A value for a Window argument does not name a defined
 
301
       Window\&.
 
302
.fi
 
303
.if n \{\
 
304
.RE
 
305
.\}
204
306
.SH "SEE ALSO"
205
 
XAllowDeviceEvents(3),
206
 
.br
207
 
XGrabDevice(3),
208
 
.br
209
 
XGrabDeviceKey(3),
210
 
.br
211
 
\fI\*(xL\fP
 
307
.sp
 
308
.if n \{\
 
309
.RS 4
 
310
.\}
 
311
.nf
 
312
XAllowDeviceEvents(libmansuffix), XGrabDevice(libmansuffix), XGrabDeviceKey(libmansuffix)
 
313
.fi
 
314
.if n \{\
 
315
.RE
 
316
.\}