| 1 |
'\" t |
| 2 |
.\" Title: xgetdevicecontrol |
| 3 |
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author] |
| 4 |
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/> |
| 5 |
.\" Date: 09/05/2024 |
| 6 |
.\" Manual: \ \& |
| 7 |
.\" Source: \ \& |
| 8 |
.\" Language: English |
| 9 |
.\" |
| 10 |
.TH "XGETDEVICECONTROL" "libmansuffix" "09/05/2024" "\ \&" "\ \&" |
| 11 |
.\" ----------------------------------------------------------------- |
| 12 |
.\" * Define some portability stuff |
| 13 |
.\" ----------------------------------------------------------------- |
| 14 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 15 |
.\" http://bugs.debian.org/507673 |
| 16 |
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html |
| 17 |
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 18 |
.ie \n(.g .ds Aq \(aq |
| 19 |
.el .ds Aq ' |
| 20 |
.\" ----------------------------------------------------------------- |
| 21 |
.\" * set default formatting |
| 22 |
.\" ----------------------------------------------------------------- |
| 23 |
.\" disable hyphenation |
| 24 |
.nh |
| 25 |
.\" disable justification (adjust text to left margin only) |
| 26 |
.ad l |
| 27 |
.\" ----------------------------------------------------------------- |
| 28 |
.\" * MAIN CONTENT STARTS HERE * |
| 29 |
.\" ----------------------------------------------------------------- |
| 30 |
.SH "NAME" |
| 31 |
XGetDeviceControl, XChangeDeviceControl \- query and change input device controls |
| 32 |
.SH "SYNOPSIS" |
| 33 |
.sp |
| 34 |
.nf |
| 35 |
#include <X11/extensions/XInput\&.h> |
| 36 |
.fi |
| 37 |
.sp |
| 38 |
.nf |
| 39 |
XDeviceControl *XGetDeviceControl( Display *display, |
| 40 |
XDevice *device, |
| 41 |
int *controlType); |
| 42 |
.fi |
| 43 |
.sp |
| 44 |
.nf |
| 45 |
int XChangeDeviceControl( Display *display, |
| 46 |
XDevice *device, |
| 47 |
int controlType, |
| 48 |
XDeviceControl *control); |
| 49 |
.fi |
| 50 |
.sp |
| 51 |
.nf |
| 52 |
display |
| 53 |
Specifies the connection to the X server\&. |
| 54 |
.fi |
| 55 |
.sp |
| 56 |
.nf |
| 57 |
device |
| 58 |
Specifies the device whose control is to be interrogated |
| 59 |
or modified\&. |
| 60 |
.fi |
| 61 |
.sp |
| 62 |
.nf |
| 63 |
controlType |
| 64 |
Specifies the type of control to be interrogated or |
| 65 |
changed\&. |
| 66 |
.fi |
| 67 |
.sp |
| 68 |
.nf |
| 69 |
control |
| 70 |
Specifies the address of an XDeviceControl structure |
| 71 |
that contains the new values for the Device\&. |
| 72 |
.fi |
| 73 |
.SH "DESCRIPTION" |
| 74 |
.sp |
| 75 |
.if n \{\ |
| 76 |
.RS 4 |
| 77 |
.\} |
| 78 |
.nf |
| 79 |
These requests are provided to manipulate those input devices |
| 80 |
that support device control\&. A BadMatch error will be generated |
| 81 |
if the requested device does not support any device controls\&. |
| 82 |
.fi |
| 83 |
.if n \{\ |
| 84 |
.RE |
| 85 |
.\} |
| 86 |
.sp |
| 87 |
.if n \{\ |
| 88 |
.RS 4 |
| 89 |
.\} |
| 90 |
.nf |
| 91 |
Valid device control types that can be used with these requests |
| 92 |
include the following: |
| 93 |
.fi |
| 94 |
.if n \{\ |
| 95 |
.RE |
| 96 |
.\} |
| 97 |
.sp |
| 98 |
.if n \{\ |
| 99 |
.RS 4 |
| 100 |
.\} |
| 101 |
.nf |
| 102 |
DEVICE_RESOLUTION: Queries or changes the resolution of |
| 103 |
valuators on input devices\&. |
| 104 |
.fi |
| 105 |
.if n \{\ |
| 106 |
.RE |
| 107 |
.\} |
| 108 |
.sp |
| 109 |
.if n \{\ |
| 110 |
.RS 4 |
| 111 |
.\} |
| 112 |
.nf |
| 113 |
The XGetDeviceControl request returns a pointer to an |
| 114 |
XDeviceControl structure\&. |
| 115 |
.fi |
| 116 |
.if n \{\ |
| 117 |
.RE |
| 118 |
.\} |
| 119 |
.sp |
| 120 |
.if n \{\ |
| 121 |
.RS 4 |
| 122 |
.\} |
| 123 |
.nf |
| 124 |
XGetDeviceControl can generate a BadDevice or BadMatch error\&. |
| 125 |
.fi |
| 126 |
.if n \{\ |
| 127 |
.RE |
| 128 |
.\} |
| 129 |
.sp |
| 130 |
.if n \{\ |
| 131 |
.RS 4 |
| 132 |
.\} |
| 133 |
.nf |
| 134 |
The XChangeDeviceControl request modifies the values of one |
| 135 |
control on the specified device\&. The control is identified by |
| 136 |
the id field of the XDeviceControl structure that is passed |
| 137 |
with the request\&. |
| 138 |
.fi |
| 139 |
.if n \{\ |
| 140 |
.RE |
| 141 |
.\} |
| 142 |
.sp |
| 143 |
.if n \{\ |
| 144 |
.RS 4 |
| 145 |
.\} |
| 146 |
.nf |
| 147 |
XChangeDeviceControl can generate a BadDevice, BadMatch, or |
| 148 |
BadValue error\&. |
| 149 |
.fi |
| 150 |
.if n \{\ |
| 151 |
.RE |
| 152 |
.\} |
| 153 |
.SH "STRUCTURES" |
| 154 |
.sp |
| 155 |
.if n \{\ |
| 156 |
.RS 4 |
| 157 |
.\} |
| 158 |
.nf |
| 159 |
Each control is described by a structure specific to that control\&. |
| 160 |
These structures are defined in the file XInput\&.h\&. |
| 161 |
.fi |
| 162 |
.if n \{\ |
| 163 |
.RE |
| 164 |
.\} |
| 165 |
.sp |
| 166 |
.if n \{\ |
| 167 |
.RS 4 |
| 168 |
.\} |
| 169 |
.nf |
| 170 |
XDeviceControl is a generic structure that contains two fields |
| 171 |
that are at the beginning of each class of control: |
| 172 |
.fi |
| 173 |
.if n \{\ |
| 174 |
.RE |
| 175 |
.\} |
| 176 |
.sp |
| 177 |
.if n \{\ |
| 178 |
.RS 4 |
| 179 |
.\} |
| 180 |
.nf |
| 181 |
typedef struct { |
| 182 |
XID class; |
| 183 |
int length; |
| 184 |
} XDeviceControl; |
| 185 |
.fi |
| 186 |
.if n \{\ |
| 187 |
.RE |
| 188 |
.\} |
| 189 |
.sp |
| 190 |
.if n \{\ |
| 191 |
.RS 4 |
| 192 |
.\} |
| 193 |
.nf |
| 194 |
The XDeviceResolutionState structure defines the information |
| 195 |
that is returned for device resolution for devices with |
| 196 |
valuators\&. |
| 197 |
.fi |
| 198 |
.if n \{\ |
| 199 |
.RE |
| 200 |
.\} |
| 201 |
.sp |
| 202 |
.if n \{\ |
| 203 |
.RS 4 |
| 204 |
.\} |
| 205 |
.nf |
| 206 |
typedef struct { |
| 207 |
XID control; |
| 208 |
int length; |
| 209 |
int num_valuators; |
| 210 |
int* resolutions; |
| 211 |
int* min_resolutions; |
| 212 |
int* max_resolutions; |
| 213 |
} XDeviceResolutionState; |
| 214 |
.fi |
| 215 |
.if n \{\ |
| 216 |
.RE |
| 217 |
.\} |
| 218 |
.sp |
| 219 |
.if n \{\ |
| 220 |
.RS 4 |
| 221 |
.\} |
| 222 |
.nf |
| 223 |
The XDeviceResolutionControl structure defines the attributes |
| 224 |
that can be controlled for keyboard Devices\&. |
| 225 |
.fi |
| 226 |
.if n \{\ |
| 227 |
.RE |
| 228 |
.\} |
| 229 |
.sp |
| 230 |
.if n \{\ |
| 231 |
.RS 4 |
| 232 |
.\} |
| 233 |
.nf |
| 234 |
typedef struct { |
| 235 |
XID control; |
| 236 |
int length; |
| 237 |
int first_valuator; |
| 238 |
int num_valuators; |
| 239 |
int* resolutions; |
| 240 |
} XDeviceResolutionControl; |
| 241 |
.fi |
| 242 |
.if n \{\ |
| 243 |
.RE |
| 244 |
.\} |
| 245 |
.SH "DIAGNOSTICS" |
| 246 |
.sp |
| 247 |
.if n \{\ |
| 248 |
.RS 4 |
| 249 |
.\} |
| 250 |
.nf |
| 251 |
BadDevice |
| 252 |
An invalid device was specified\&. The specified device |
| 253 |
does not exist or has not been opened by this client via |
| 254 |
XOpenInputDevice\&. This error may also occur if some |
| 255 |
other client has caused the specified device to become |
| 256 |
the X keyboard or X pointer device via the |
| 257 |
XChangeKeyboardDevice or XChangePointerDevice requests\&. |
| 258 |
.fi |
| 259 |
.if n \{\ |
| 260 |
.RE |
| 261 |
.\} |
| 262 |
.sp |
| 263 |
.if n \{\ |
| 264 |
.RS 4 |
| 265 |
.\} |
| 266 |
.nf |
| 267 |
BadMatch |
| 268 |
This error may occur if an XGetDeviceControl request was |
| 269 |
made specifying a device that has no controls or an |
| 270 |
XChangeDeviceControl request was made with an |
| 271 |
XDeviceControl structure that contains an invalid Device |
| 272 |
type\&. It may also occur if an invalid combination of |
| 273 |
mask bits is specified ( DvKey but no DvAutoRepeatMode |
| 274 |
for keyboard Devices), or if an invalid KeySym is |
| 275 |
specified for a string Device\&. |
| 276 |
.fi |
| 277 |
.if n \{\ |
| 278 |
.RE |
| 279 |
.\} |
| 280 |
.sp |
| 281 |
.if n \{\ |
| 282 |
.RS 4 |
| 283 |
.\} |
| 284 |
.nf |
| 285 |
BadValue |
| 286 |
Some numeric value falls outside the range of values |
| 287 |
accepted by the XChangeDeviceControl request\&. Unless a |
| 288 |
specific range is specified for an argument, the full |
| 289 |
range defined by the argument\*(Aqs type is accepted\&. Any |
| 290 |
argument defined as a set of alternatives can generate |
| 291 |
this error\&. |
| 292 |
.fi |
| 293 |
.if n \{\ |
| 294 |
.RE |
| 295 |
.\} |