1XGetDeviceControl(3)              X FUNCTIONS             XGetDeviceControl(3)
2
3
4

NAME

6       XGetDeviceControl, XChangeDeviceControl - query and change input device
7       controls
8

SYNTAX

10       XDeviceControl *XGetDeviceControl(Display  *display,  XDevice  *device,
11              int *controlType);
12
13       int  XChangeDeviceControl(Display  *display,  XDevice *device, int con‐
14              trolType, XDeviceControl *control);
15

ARGUMENTS

17       display        Specifies the connection to the X server.
18
19       device         Specifies the device whose control is to be interrogated
20                      or modified.
21
22       controlType    Specifies  the  type  of  control  to be interrogated or
23                      changed.
24
25       control        Specifies the address  of  an  XDeviceControl  structure
26                      that contains the new values for the Device.
27

DESCRIPTION

29       These requests are provided to manipulate those input devices that sup‐
30       port device control.   A  BadMatch  error  will  be  generated  if  the
31       requested device does not support any device controls.
32
33       Valid device control types that can be used with these requests include
34       the following:
35
36       DEVICE_RESOLUTION   Queries or changes the resolution of  valuators  on
37                           input devices.
38
39       The  XGetDeviceControl  request  returns a pointer to an XDeviceControl
40       structure.
41
42       XGetDeviceControl can generate a BadDevice or BadMatch error.
43
44       The XChangeDeviceControl request modifies the values of one control  on
45       the specified device.  The control is identified by the id field of the
46       XDeviceControl structure that is passed with the request.
47
48       XChangeDeviceControl can generate a BadDevice,  BadMatch,  or  BadValue
49       error.
50

STRUCTURES

52       Each  control  is  described  by  a structure specific to that control.
53       These structures are defined in the file XInput.h.
54
55       XDeviceControl is a generic structure that contains two fields that are
56       at the beginning of each class of control:
57
58       typedef struct {
59            XID class;
60            int length;
61       } XDeviceControl;
62
63       The  XDeviceResolutionState  structure  defines the information that is
64       returned for device resolution for devices with valuators.
65
66       typedef struct {
67            XID     control;
68            int     length;
69            int     num_valuators;
70            int     *resolutions;
71            int     *min_resolutions;
72            int     *max_resolutions;
73       } XDeviceResolutionState;
74
75       The XDeviceResolutionControl structure defines the attributes that  can
76       be controlled for keyboard Devices.
77
78       typedef struct {
79            XID     control;
80            int     length;
81            int     first_valuator;
82            int     num_valuators;
83            int     *resolutions;
84       } XDeviceResolutionControl;
85

DIAGNOSTICS

87       BadDevice   An invalid device was specified.  The specified device does
88                   not exist or has not been opened by this client via  XOpen‐
89                   InputDevice.   This  error  may  also  occur  if some other
90                   client has caused the specified device to become the X key‐
91                   board  or X pointer device via the XChangeKeyboardDevice or
92                   XChangePointerDevice requests.
93
94       BadMatch    This error may occur if an  XGetDeviceControl  request  was
95                   made  specifying  a  device  that  has  no  controls  or an
96                   XChangeDeviceControl request was made with  an  XDeviceCon‐
97                   trol  structure  that  contains an invalid Device type.  It
98                   may also occur if an invalid combination of  mask  bits  is
99                   specified  (DvKey  but  no  DvAutoRepeatMode  for  keyboard
100                   Devices), or if an invalid KeySym is specified for a string
101                   Device.
102
103       BadValue    Some  numeric  value  falls  outside  the  range  of values
104                   accepted by the  XChangeDeviceControl  request.   Unless  a
105                   specific range is specified for an argument, the full range
106                   defined by the argument's type is accepted.   Any  argument
107                   defined as a set of alternatives can generate this error.
108

SEE ALSO

110       Programming With Xlib
111
112
113
114X Version 11                      libXi 1.1.1             XGetDeviceControl(3)
Impressum