2
.\" $XFree86: xc/doc/man/Xi/XQueryDv.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: XQueryDv.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $
15
.ds xL Programming with Xlib
16
.TH XQueryDeviceState __LIB_MAN_SUFFIX__ __xorgversion__ "X FUNCTIONS"
18
XQueryDeviceState \- query the state of an extension input device.
21
int XQueryDeviceState\^(\^Display *\fIdisplay\fP\^, XDevice *\fIdevice\fP\^);
25
Specifies the connection to the X server.
28
Specifies the device whose state is to be queried.
31
\fIXQueryDeviceState\fP
32
request queries the state of an input device. The current state of
33
keys and buttons (up or down), and valuators (current value) on the device
34
is reported by this request. Each key or button is represented by a bit
35
in the \fIXDeviceState\fP structure that is returned. Valuators on the
36
device report 0 if they are reporting relative information, and the
37
current value if they are reporting absolute information.
39
\fIXQueryDeviceState\fP
40
can generate a \fIBadDevice\fP error.
2
.\" Title: xquerydevicestate
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 "XQUERYDEVICESTATE" "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
XQueryDeviceState \- query the state of an extension input device\&.
26
#include <X11/extensions/XInput\&.h>
30
XDeviceState* XQueryDeviceState( Display *display,
36
Specifies the connection to the X server\&.
41
Specifies the device whose state is to be queried\&.
49
The XQueryDeviceState request queries the state of an input
50
device\&. The current state of keys and buttons (up or down), and
51
valuators (current value) on the device is reported by this
52
request\&. Each key or button is represented by a bit in the
53
XDeviceState structure that is returned\&. Valuators on the
54
device report 0 if they are reporting relative information, and
55
the current value if they are reporting absolute information\&.
65
XQueryDeviceState can generate a BadDevice error\&.
85
The XDeviceState structure contains:
109
The XValuatorState structure contains:
62
unsigned char num_valuators;
121
unsigned char length;
122
unsigned char num_valuators;
68
The \fIXKeyState\fP structure contains:
135
The XKeyState structure contains:
147
unsigned char length;
79
The \fIXButtonState\fP structure contains:
160
The XButtonState structure contains:
172
unsigned char length;
92
An invalid device was specified. The specified device does not exist or has
93
not been opened by this client via \fIXOpenInputDevice\fP. This error may
94
also occur if some other client has caused the specified device to become
95
the X keyboard or X pointer device via the \fIXChangeKeyboardDevice\fP or
96
\fIXChangePointerDevice\fP requests.
187
An invalid device was specified\&. The specified device
188
does not exist or has not been opened by this client via
189
XOpenInputDevice\&. This error may also occur if some
190
other client has caused the specified device to become
191
the X keyboard or X pointer device via the
192
XChangeKeyboardDevice or XChangePointerDevice requests\&.