| 1 |
XGETDEVICECONTROL(libmansuffix) |
| 2 |
=============================== |
| 3 |
|
| 4 |
NAME |
| 5 |
---- |
| 6 |
|
| 7 |
XGetDeviceControl, XChangeDeviceControl - query and change |
| 8 |
input device controls |
| 9 |
|
| 10 |
SYNOPSIS |
| 11 |
-------- |
| 12 |
|
| 13 |
#include <X11/extensions/XInput.h> |
| 14 |
|
| 15 |
XDeviceControl *XGetDeviceControl( Display *display, |
| 16 |
XDevice *device, |
| 17 |
int *controlType); |
| 18 |
|
| 19 |
int XChangeDeviceControl( Display *display, |
| 20 |
XDevice *device, |
| 21 |
int controlType, |
| 22 |
XDeviceControl *control); |
| 23 |
|
| 24 |
display |
| 25 |
Specifies the connection to the X server. |
| 26 |
|
| 27 |
device |
| 28 |
Specifies the device whose control is to be interrogated |
| 29 |
or modified. |
| 30 |
|
| 31 |
controlType |
| 32 |
Specifies the type of control to be interrogated or |
| 33 |
changed. |
| 34 |
|
| 35 |
control |
| 36 |
Specifies the address of an XDeviceControl structure |
| 37 |
that contains the new values for the Device. |
| 38 |
|
| 39 |
DESCRIPTION |
| 40 |
----------- |
| 41 |
|
| 42 |
These requests are provided to manipulate those input devices |
| 43 |
that support device control. A BadMatch error will be generated |
| 44 |
if the requested device does not support any device controls. |
| 45 |
|
| 46 |
Valid device control types that can be used with these requests |
| 47 |
include the following: |
| 48 |
|
| 49 |
DEVICE_RESOLUTION: Queries or changes the resolution of |
| 50 |
valuators on input devices. |
| 51 |
|
| 52 |
The XGetDeviceControl request returns a pointer to an |
| 53 |
XDeviceControl structure. |
| 54 |
|
| 55 |
XGetDeviceControl can generate a BadDevice or BadMatch error. |
| 56 |
|
| 57 |
The XChangeDeviceControl request modifies the values of one |
| 58 |
control on the specified device. The control is identified by |
| 59 |
the id field of the XDeviceControl structure that is passed |
| 60 |
with the request. |
| 61 |
|
| 62 |
XChangeDeviceControl can generate a BadDevice, BadMatch, or |
| 63 |
BadValue error. |
| 64 |
|
| 65 |
STRUCTURES |
| 66 |
---------- |
| 67 |
|
| 68 |
Each control is described by a structure specific to that control. |
| 69 |
These structures are defined in the file XInput.h. |
| 70 |
|
| 71 |
XDeviceControl is a generic structure that contains two fields |
| 72 |
that are at the beginning of each class of control: |
| 73 |
|
| 74 |
typedef struct { |
| 75 |
XID class; |
| 76 |
int length; |
| 77 |
} XDeviceControl; |
| 78 |
|
| 79 |
The XDeviceResolutionState structure defines the information |
| 80 |
that is returned for device resolution for devices with |
| 81 |
valuators. |
| 82 |
|
| 83 |
typedef struct { |
| 84 |
XID control; |
| 85 |
int length; |
| 86 |
int num_valuators; |
| 87 |
int* resolutions; |
| 88 |
int* min_resolutions; |
| 89 |
int* max_resolutions; |
| 90 |
} XDeviceResolutionState; |
| 91 |
|
| 92 |
The XDeviceResolutionControl structure defines the attributes |
| 93 |
that can be controlled for keyboard Devices. |
| 94 |
|
| 95 |
typedef struct { |
| 96 |
XID control; |
| 97 |
int length; |
| 98 |
int first_valuator; |
| 99 |
int num_valuators; |
| 100 |
int* resolutions; |
| 101 |
} XDeviceResolutionControl; |
| 102 |
|
| 103 |
DIAGNOSTICS |
| 104 |
----------- |
| 105 |
|
| 106 |
BadDevice |
| 107 |
An invalid device was specified. The specified device |
| 108 |
does not exist or has not been opened by this client via |
| 109 |
XOpenInputDevice. This error may also occur if some |
| 110 |
other client has caused the specified device to become |
| 111 |
the X keyboard or X pointer device via the |
| 112 |
XChangeKeyboardDevice or XChangePointerDevice requests. |
| 113 |
|
| 114 |
BadMatch |
| 115 |
This error may occur if an XGetDeviceControl request was |
| 116 |
made specifying a device that has no controls or an |
| 117 |
XChangeDeviceControl request was made with an |
| 118 |
XDeviceControl structure that contains an invalid Device |
| 119 |
type. It may also occur if an invalid combination of |
| 120 |
mask bits is specified ( DvKey but no DvAutoRepeatMode |
| 121 |
for keyboard Devices), or if an invalid KeySym is |
| 122 |
specified for a string Device. |
| 123 |
|
| 124 |
BadValue |
| 125 |
Some numeric value falls outside the range of values |
| 126 |
accepted by the XChangeDeviceControl request. Unless a |
| 127 |
specific range is specified for an argument, the full |
| 128 |
range defined by the argument's type is accepted. Any |
| 129 |
argument defined as a set of alternatives can generate |
| 130 |
this error. |