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