1XGETDEVICECONTROL(3) [FIXME: manual] 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..SH STRUCTURES Each control is described by a
59 structure specific to that control. These structures are
60 defined in the file XInput.h.
61
62 XDeviceControl is a generic structure that contains two fields
63 that are at the beginning of each class of control:
64
65 typedef struct {
66 XID class;
67 int length;
68 } XDeviceControl;
69
70 The XDeviceResolutionState structure defines the information
71 that is returned for device resolution for devices with
72 valuators.
73
74 typedef struct {
75 XID control;
76 int length;
77 int num_valuators;
78 int* resolutions;
79 int* min_resolutions;
80 int* max_resolutions;
81 } XDeviceResolutionState;
82
83 The XDeviceResolutionControl structure defines the attributes
84 that can be controlled for keyboard Devices.
85
86 typedef struct {
87 XID control;
88 int length;
89 int first_valuator;
90 int num_valuators;
91 int* resolutions;
92 } XDeviceResolutionControl;
93
95 BadDevice
96 An invalid device was specified. The specified device
97 does not exist or has not been opened by this client via
98 XOpenInputDevice. This error may also occur if some
99 other client has caused the specified device to become
100 the X keyboard or X pointer device via the
101 XChangeKeyboardDevice or XChangePointerDevice requests.
102
103 BadMatch
104 This error may occur if an XGetDeviceControl request was
105 made specifying a device that has no controls or an
106 XChangeDeviceControl request was made with an
107 XDeviceControl structure that contains an invalid Device
108 type. It may also occur if an invalid combination of
109 mask bits is specified ( DvKey but no DvAutoRepeatMode
110 for keyboard Devices), or if an invalid KeySym is
111 specified for a string Device.
112
113 BadValue
114 Some numeric value falls outside the range of values
115 accepted by the XChangeDeviceControl request. Unless a
116 specific range is specified for an argument, the full
117 range defined by the argumentĀ“s type is accepted. Any
118 argument defined as a set of alternatives can generate
119 this error.
120
121
122
123[FIXME: source] 08/04/2010 XGETDEVICECONTROL(3)