762 lines
10 KiB
HTML
762 lines
10 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XGETFEEDBACKCONTROL</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XGETFEEDBACKCONTROL</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>
|
|
|
|
XGetFeedbackControl, XChangeFeedbackControl - query and change input device feedbacks
|
|
<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>
|
|
XFeedbackState *XGetFeedbackControl( Display *display,
|
|
XDevice *device,
|
|
int *num_feedbacks);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
int XChangeFeedbackControl( Display *display,
|
|
XDevice *device,
|
|
Mask mask,
|
|
XFeedbackControl *control);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
display
|
|
Specifies the connection to the X server.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
device
|
|
Specifies the device whose feedbacks are to be queried
|
|
or modified.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
num_feedbacks
|
|
Specifies an address into which the number of feedbacks
|
|
supported by thedevice is to be returned.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
mask
|
|
Specifies a mask specific to each type of feedback that
|
|
describes howthe feedback is to be modified.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
control
|
|
Specifies the address of an XFeedbackControl structure
|
|
that containsthe new values for the feedback.
|
|
</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 feedbacks. A BadMatch error will be generated if
|
|
the requested device does not support feedbacks. Whether or not
|
|
a given device supports feedbacks can be determined by
|
|
examining the information returned by the XOpenDevice request.
|
|
For those devices that support feedbacks, XOpenDevice will
|
|
return an XInputClassInfo structure with the input_class field
|
|
equal to the constant FeedbackClass (defined in the file XI.h).
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XGetFeedbackControl request returns a pointer to a list of
|
|
XFeedbackState structures. Each item in this list describes one
|
|
of the feedbacks supported by the device. The items are
|
|
variable length, so each contains its length to allow traversal
|
|
to the next item in the list.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The feedback classes that are currently defined are:
|
|
KbdFeedbackClass, PtrFeedbackClass, StringFeedbackClass,
|
|
IntegerFeedbackClass, LedFeedbackClass, and BellFeedbackClass.
|
|
These constants are defined in the file XI.h. An input device
|
|
may support zero or more classes of feedback, and may support
|
|
multiple feedbacks of the same class. Each feedback contains a
|
|
class identifier and an id that is unique within that class for
|
|
that input device. The id is used to identify the feedback when
|
|
making an XChangeFeedbackControl request.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XGetFeedbackControl can generate a BadDevice or BadMatch error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XChangeFeedbackControl request modifies the values of one
|
|
feedback on the specified device. The feedback is identified by
|
|
the id field of the XFeedbackControl structure that is passed
|
|
with the request. The fields of the feedback that are to be
|
|
modified are identified by the bits of the mask that is passed
|
|
with the request.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XChangeFeedbackControl can generate a BadDevice, BadMatch, or
|
|
BadValue error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H3>Structures</H3>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
Each class of feedback is described by a structure specific to
|
|
that class. These structures are defined in the file XInput.h.
|
|
XFeedbackState and XFeedbackControl are generic structures that
|
|
contain three fields that are at the beginning of each class of
|
|
feedback:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
} XFeedbackState, XFeedbackControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XKbdFeedbackState structure defines the attributes that are
|
|
returned for feedbacks equivalent to those on the X keyboard.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int click;
|
|
int percent;
|
|
int pitch;
|
|
int duration;
|
|
int led_mask;
|
|
int global_auto_repeat;
|
|
char auto_repeats[32];
|
|
} XKbdFeedbackState;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XPtrFeedbackState structure defines the attributes that are
|
|
returned for feedbacks equivalent to those on the the X
|
|
pointer.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int accelNum;
|
|
int accelDenom;
|
|
int threshold;
|
|
} XPtrFeedbackState;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XIntegerFeedbackState structure defines attributes that are
|
|
returned for integer feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int resolution;
|
|
int minVal;
|
|
int maxVal;
|
|
} XIntegerFeedbackState;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XStringFeedbackState structure defines the attributes that
|
|
are returned for string feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int max_symbols;
|
|
int num_syms_supported;
|
|
KeySym *syms_supported;
|
|
} XStringFeedbackState;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XBellFeedbackState structure defines the attributes that
|
|
are returned for bell feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="18"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int percent;
|
|
int pitch;
|
|
int duration;
|
|
} XBellFeedbackState;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="19"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XLedFeedbackState structure defines the attributes that are
|
|
returned for LED feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int led_values;
|
|
} XLedFeedbackState;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="21"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XPrtFeedbackControl structure defines the attributes that
|
|
can be controlled for pointer feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="22"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int accelNum;
|
|
int accelDenom;
|
|
int threshold;
|
|
} XPtrFeedbackControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="23"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XKbdFeedbackControl structure defines the attributes that
|
|
can be controlled for keyboard feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="24"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int click;
|
|
int percent;
|
|
int pitch;
|
|
int duration;
|
|
int led_mask;
|
|
int led_value;
|
|
int key;
|
|
int auto_repeat_mode;
|
|
} XKbdFeedbackControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="25"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XStringFeedbackControl structure defines the attributes
|
|
that can be controlled for string feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="26"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int num_keysyms;
|
|
KeySym *syms_to_display;
|
|
} XStringFeedbackControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="27"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XIntegerFeedbackControl structure defines the attributes
|
|
that can be controlled for integer feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="28"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int int_to_display;
|
|
} XIntegerFeedbackControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="29"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XBellFeedbackControl structure defines the attributes that
|
|
can be controlled for bell feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="30"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int percent;
|
|
int pitch;
|
|
int duration;
|
|
} XBellFeedbackControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="31"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XLedFeedbackControl structure defines the attributes that
|
|
can be controlled for LED feedbacks.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="32"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
XID class;
|
|
int length;
|
|
XID id;
|
|
int led_mask;
|
|
int led_values;
|
|
} XLedFeedbackControl;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="33"><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="34"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadMatch
|
|
This error may occur if an XGetFeedbackControl request
|
|
was made specifying a device that has no feedbacks, or
|
|
an XChangeFeedbackControl request was made with an
|
|
XFeedbackControl structure that contains an invalid
|
|
feedback type. It may also occur if an invalid
|
|
combination of mask bits is specified ( DvKey but no
|
|
DvAutoRepeatMode for keyboard feedbacks), or if an
|
|
invalid KeySym is specified for a string feedback.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="35"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadValue
|
|
Some numeric value falls outside the range of values
|
|
accepted by the XChangeFeedbackControl 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="36"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="37"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="38"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DL>
|
|
<DT id="39"><A HREF="#lbAE">Structures</A><DD>
|
|
</DL>
|
|
<DT id="40"><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>
|