398 lines
5.7 KiB
HTML
398 lines
5.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XGETDEVICECONTROL</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XGETDEVICECONTROL</H1>
|
|
Section: (3)<BR>Updated: 06/19/2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
XGetDeviceControl, XChangeDeviceControl - query and change input device controls
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<PRE>
|
|
#include <<A HREF="file:///usr/include/X11/extensions/XInput.h">X11/extensions/XInput.h</A>>
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
XDeviceControl *XGetDeviceControl( Display *display,
|
|
XDevice *device,
|
|
int *controlType);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
int XChangeDeviceControl( Display *display,
|
|
XDevice *device,
|
|
int controlType,
|
|
XDeviceControl *control);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
display
|
|
Specifies the connection to the X server.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
device
|
|
Specifies the device whose control is to be interrogated
|
|
or modified.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
controlType
|
|
Specifies the type of control to be interrogated or
|
|
changed.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
control
|
|
Specifies the address of an XDeviceControl structure
|
|
that contains the new values for the Device.
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
These requests are provided to manipulate those input devices
|
|
that support device control. A BadMatch error will be generated
|
|
if the requested device does not support any device controls.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
Valid device control types that can be used with these requests
|
|
include the following:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
DEVICE_RESOLUTION: Queries or changes the resolution of
|
|
valuators on input devices.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XGetDeviceControl request returns a pointer to an
|
|
XDeviceControl structure.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XGetDeviceControl can generate a BadDevice or BadMatch error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XChangeDeviceControl request modifies the values of one
|
|
control on the specified device. The control is identified by
|
|
the id field of the XDeviceControl structure that is passed
|
|
with the request.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XChangeDeviceControl can generate a BadDevice, BadMatch, or
|
|
BadValue error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>STRUCTURES</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
Each control is described by a structure specific to that control.
|
|
These structures are defined in the file XInput.h.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XDeviceControl is a generic structure that contains two fields
|
|
that are at the beginning of each class of control:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
} XDeviceControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XDeviceResolutionState structure defines the information
|
|
that is returned for device resolution for devices with
|
|
valuators.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID control;
|
|
int length;
|
|
int num_valuators;
|
|
int* resolutions;
|
|
int* min_resolutions;
|
|
int* max_resolutions;
|
|
} XDeviceResolutionState;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XDeviceResolutionControl structure defines the attributes
|
|
that can be controlled for keyboard Devices.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID control;
|
|
int length;
|
|
int first_valuator;
|
|
int num_valuators;
|
|
int* resolutions;
|
|
} XDeviceResolutionControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadDevice
|
|
An invalid device was specified. The specified device
|
|
does not exist or has not been opened by this client via
|
|
XOpenInputDevice. This error may also occur if some
|
|
other client has caused the specified device to become
|
|
the X keyboard or X pointer device via the
|
|
XChangeKeyboardDevice or XChangePointerDevice requests.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadMatch
|
|
This error may occur if an XGetDeviceControl request was
|
|
made specifying a device that has no controls or an
|
|
XChangeDeviceControl request was made with an
|
|
XDeviceControl structure that contains an invalid Device
|
|
type. It may also occur if an invalid combination of
|
|
mask bits is specified ( DvKey but no DvAutoRepeatMode
|
|
for keyboard Devices), or if an invalid KeySym is
|
|
specified for a string Device.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadValue
|
|
Some numeric value falls outside the range of values
|
|
accepted by the XChangeDeviceControl request. Unless a
|
|
specific range is specified for an argument, the full
|
|
range defined by the argument's type is accepted. Any
|
|
argument defined as a set of alternatives can generate
|
|
this error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="18"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="19"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="20"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="21"><A HREF="#lbAE">STRUCTURES</A><DD>
|
|
<DT id="22"><A HREF="#lbAF">DIAGNOSTICS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:00 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|