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