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

« back to all changes in this revision

Viewing changes to man/XQueryDeviceState.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/XQueryDv.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: 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"
17
 
.SH NAME
18
 
XQueryDeviceState \- query the state of an extension input device.
19
 
.SH SYNTAX
20
 
.HP
21
 
int XQueryDeviceState\^(\^Display *\fIdisplay\fP\^, XDevice *\fIdevice\fP\^); 
22
 
.SH ARGUMENTS
23
 
.TP 12
24
 
.I display
25
 
Specifies the connection to the X server.
26
 
.TP 12
27
 
.I device
28
 
Specifies the device whose state is to be queried.
29
 
.SH DESCRIPTION
30
 
The
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.
38
 
.LP
39
 
\fIXQueryDeviceState\fP
40
 
can generate a \fIBadDevice\fP error.
41
 
.SH STRUCTURES
42
 
The
43
 
\fIXDeviceState\fP
44
 
structure contains:
45
 
.LP
 
1
'\" t
 
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/>
 
5
.\"      Date: 10/02/2009
 
6
.\"    Manual: [FIXME: manual]
 
7
.\"    Source: [FIXME: source]
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "XQUERYDEVICESTATE" "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"
 
22
XQueryDeviceState \- query the state of an extension input device\&.
 
23
.SH "SYNOPSIS"
 
24
.sp
 
25
.nf
 
26
#include <X11/extensions/XInput\&.h>
 
27
.fi
 
28
.sp
 
29
.nf
 
30
XDeviceState* XQueryDeviceState( Display *display,
 
31
                                 XDevice *device);
 
32
.fi
 
33
.sp
 
34
.nf
 
35
display
 
36
       Specifies the connection to the X server\&.
 
37
.fi
 
38
.sp
 
39
.nf
 
40
device
 
41
       Specifies the device whose state is to be queried\&.
 
42
.fi
 
43
.SH "DESCRIPTION"
 
44
.sp
 
45
.if n \{\
 
46
.RS 4
 
47
.\}
 
48
.nf
 
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\&.
 
56
.fi
 
57
.if n \{\
 
58
.RE
 
59
.\}
 
60
.sp
 
61
.if n \{\
 
62
.RS 4
 
63
.\}
 
64
.nf
 
65
XQueryDeviceState can generate a BadDevice error\&.
 
66
.fi
 
67
.if n \{\
 
68
.RE
 
69
.\}
 
70
.sp
 
71
.if n \{\
 
72
.RS 4
 
73
.\}
 
74
.nf
 
75
Structures:
 
76
.fi
 
77
.if n \{\
 
78
.RE
 
79
.\}
 
80
.sp
 
81
.if n \{\
 
82
.RS 4
 
83
.\}
 
84
.nf
 
85
The XDeviceState structure contains:
 
86
.fi
 
87
.if n \{\
 
88
.RE
 
89
.\}
 
90
.sp
 
91
.if n \{\
 
92
.RS 4
 
93
.\}
46
94
.nf
47
95
typedef struct {
48
 
        XID device_id;
49
 
        int num_classes;
50
 
        XInputClass *data;
 
96
    XID device_id;
 
97
    int num_classes;
 
98
    XInputClass *data;
51
99
} XDeviceState;
52
100
.fi
53
 
.LP
54
 
The
55
 
\fIXValuatorState\fP
56
 
structure contains:
57
 
.LP
 
101
.if n \{\
 
102
.RE
 
103
.\}
 
104
.sp
 
105
.if n \{\
 
106
.RS 4
 
107
.\}
 
108
.nf
 
109
The XValuatorState structure contains:
 
110
.fi
 
111
.if n \{\
 
112
.RE
 
113
.\}
 
114
.sp
 
115
.if n \{\
 
116
.RS 4
 
117
.\}
58
118
.nf
59
119
typedef struct {
60
 
        unsigned char class;
61
 
        unsigned char length;
62
 
        unsigned char num_valuators;
63
 
        unsigned char mode;
64
 
        int *valuators;
 
120
    unsigned char class;
 
121
    unsigned char length;
 
122
    unsigned char num_valuators;
 
123
    unsigned char mode;
 
124
    int *valuators;
65
125
} XValuatorState;
66
126
.fi
67
 
.LP
68
 
The \fIXKeyState\fP structure contains:
69
 
.LP
 
127
.if n \{\
 
128
.RE
 
129
.\}
 
130
.sp
 
131
.if n \{\
 
132
.RS 4
 
133
.\}
 
134
.nf
 
135
The XKeyState structure contains:
 
136
.fi
 
137
.if n \{\
 
138
.RE
 
139
.\}
 
140
.sp
 
141
.if n \{\
 
142
.RS 4
 
143
.\}
70
144
.nf
71
145
typedef struct {
72
 
        unsigned char class;
73
 
        unsigned char length;
74
 
        short         num_keys;
75
 
        char keys[32];
 
146
    unsigned char class;
 
147
    unsigned char length;
 
148
    short     num_keys;
 
149
    char keys[32];
76
150
} XKeyState;
77
151
.fi
78
 
.LP
79
 
The \fIXButtonState\fP structure contains:
80
 
.LP
 
152
.if n \{\
 
153
.RE
 
154
.\}
 
155
.sp
 
156
.if n \{\
 
157
.RS 4
 
158
.\}
 
159
.nf
 
160
The XButtonState structure contains:
 
161
.fi
 
162
.if n \{\
 
163
.RE
 
164
.\}
 
165
.sp
 
166
.if n \{\
 
167
.RS 4
 
168
.\}
81
169
.nf
82
170
typedef struct {
83
 
        unsigned char class;
84
 
        unsigned char length;
85
 
        short         num_buttons;
86
 
        char buttons[32];
 
171
    unsigned char class;
 
172
    unsigned char length;
 
173
    short     num_buttons;
 
174
    char buttons[32];
87
175
} XButtonState;
88
176
.fi
89
 
.SH DIAGNOSTICS
90
 
.TP 12
91
 
\fIBadDevice\fP
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.
97
 
.SH "SEE ALSO"
98
 
.br
99
 
\fI\*(xL\fP
 
177
.if n \{\
 
178
.RE
 
179
.\}
 
180
.SH "DIAGNOSTICS"
 
181
.sp
 
182
.if n \{\
 
183
.RS 4
 
184
.\}
 
185
.nf
 
186
BadDevice
 
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\&.
 
193
.fi
 
194
.if n \{\
 
195
.RE
 
196
.\}