2
.\" Title: xiquerydevice
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 "XIQUERYDEVICE" "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
.\" -----------------------------------------------------------------
22
XIQueryDevice, XIFreeDeviceInfo \- get information about devices\&.
26
#include <X11/extensions/XInput2\&.h>
30
XIDeviceInfo* XIQueryPointer( Display *display,
32
int *ndevices_return);
36
XIFreeDeviceInfo( XIDeviceInfo *info);
41
Specifies the device to query or XIAllDevices or
47
Specifies the connection to the X server\&.
52
Returns the number of devices returned\&.
57
A list of device XIDeviceInfo structs to be freed\&.
65
The XIQueryDevice returns information about one or more input
66
devices\&. If the deviceid specifies a device, ndevices_return is
67
1 and the returned information describes only the requested
68
device\&. If deviceid is XIAllDevices or XIAllMasterDevices,
69
ndevices_return is the number of devices or master devices,
70
respectively, and the returned information represents all
71
devices or all master devices, respectively\&.
81
To free the XIDeviceInfo array returned by XIQueryDevice, use
92
For each input device requested, the XIQueryDevice returns an
93
XIDeviceInfo structure\&. Each structure contains information
94
about the capabilities of one input device available to the
113
XIAnyClassInfo **classes;
124
The deviceid is the numeric unique id of the device\&. A deviceid
125
is unique for the life\-time of a device but a server may re\-use
126
the id once a device has been removed\&.
136
The name points to a null\-terminated string specifying the
137
identifier of the device\&.
147
The use and attachment fields specify the type of the device
148
and the current attachment or pairing\&.
149
\- If use is XIMasterPointer, the device is a master pointer and
150
attachment specifies the deviceid of the paired master
152
\- If use is XIMasterKeyboard, the device is a master keyboard,
153
and the attachment field specifies the paired master pointer\&.
154
\- If use is XISlavePointer, the device is a slave device and
155
currently attached to the master pointer specified in
157
\- If use is XISlaveKeyboard, the device is a slave device an
158
currently attached to the master keyboard specified in
160
\- If use is XIFloatingSlave, the device is a slave device
161
currently not attached to any master device\&. The value of the
162
attachment field for floating slave devices is undefined\&.
172
The enabled field specifies if the device is currently enabled
173
and can send events\&. Disabled devices will not send events\&.
183
The num_classes field specifies the number of input classes
184
pointed to by classes\&. The first two fields of all input
185
classes are identical\&.
209
The type field specifies the type of the input class\&.
210
Currently, the following types are defined:
211
XIKeyClass, XIButtonClass, XIValuatorClass
221
In the future, additional types may be added\&. Clients are
222
required to ignore unknown input classes\&.
232
The sourceid is the deviceid this class originated from\&. For
233
master devices, the sourceid is typically the id of the slave
234
device currently sending events\&. For slave devices, the
235
sourceid is typically the device\'s id\&.
245
A device may have zero or one XIButtonClass, denoting the
246
device\'s capability to send button events\&.
286
The num_buttons field specifies the number of buttons available
287
on this device\&. A device that has an XIButtonClass must have at
298
labels is a list of num_buttons Atoms specifying the button
299
labels for this device\&. If the label is not None, then the
300
label specifies the type of button in physical device order
301
(i\&.e\&. as the buttons are numbered on the physical input
312
The state is the current button state as seen by clients (i\&.e\&.
313
after button mapping is applied)\&. The mask_len field specifies
314
the length of mask in bytes\&. For each button on the device, the
315
respective bit in mask is set if the button is currently
326
A device may have zero or one XIKeyClass, denoting the device\'s
327
capability to send key events\&.
353
The num_keycodes field specifies the number of keycodes
354
available on this device\&. A device that has an XIKeyClass must
355
have at least one keycode\&.
365
keycodes is a list of num_keycodes keycodes the device may
376
A device may have zero or more XIValuatorClass, denoting the
377
device\'s capability to send coordinates\&.
408
The number field specifies the number of the axis on the
419
If the label field is not None, the value of label is an Atom
420
describing the axis\&.
430
min and max are the minimum and maximum values allowed on this
431
axis\&. If both are zero, no minumum or maximum values are set on
432
this device\&. value is the current value of this axis\&.
442
The resolution field specifies the resolution of the device in
453
The mode specifies the mode of this axis\&. If the mode is
454
XIModeAbsolute this axis sends absolute coordinates\&. If the
455
mode is XIModeRelative, this device sends relative coordinates\&.
465
XIQueryDevice can generate a BadDevice error\&.
475
XIFreeDeviceInfo frees the information returned by
488
An invalid device was specified\&. The device does not
489
exist or is not a pointer device\&.