1XGETFEEDBACKCONTROL(3) [FIXME: manual] XGETFEEDBACKCONTROL(3)
2
3
4
6 XGetFeedbackControl, XChangeFeedbackControl - query and change input
7 device feedbacks
8
10 #include <X11/extensions/XInput.h>
11
12 XFeedbackState *XGetFeedbackControl( Display *display,
13 XDevice *device,
14 int *num_feedbacks);
15
16 int XChangeFeedbackControl( Display *display,
17 XDevice *device,
18 Mask mask,
19 XFeedbackControl *control);
20
21 display
22 Specifies the connection to the X server.
23
24 device
25 Specifies the device whose feedbacks are to be queried
26 or modified.
27
28 num_feedbacks
29 Specifies an address into which the number of feedbacks
30 supported by thedevice is to be returned.
31
32 mask
33 Specifies a mask specific to each type of feedback that
34 describes howthe feedback is to be modified.
35
36 control
37 Specifies the address of an XFeedbackControl structure
38 that containsthe new values for the feedback.
39
41 These requests are provided to manipulate those input devices
42 that support feedbacks. A BadMatch error will be generated if
43 the requested device does not support feedbacks. Whether or not
44 a given device supports feedbacks can be determined by
45 examining the information returned by the XOpenDevice request.
46 For those devices that support feedbacks, XOpenDevice will
47 return an XInputClassInfo structure with the input_class field
48 equal to the constant FeedbackClass (defined in the file XI.h).
49
50 The XGetFeedbackControl request returns a pointer to a list of
51 XFeedbackState structures. Each item in this list describes one
52 of the feedbacks supported by the device. The items are
53 variable length, so each contains its length to allow traversal
54 to the next item in the list.
55
56 The feedback classes that are currently defined are:
57 KbdFeedbackClass, PtrFeedbackClass, StringFeedbackClass,
58 IntegerFeedbackClass, LedFeedbackClass, and BellFeedbackClass.
59 These constants are defined in the file XI.h. An input device
60 may support zero or more classes of feedback, and may support
61 multiple feedbacks of the same class. Each feedback contains a
62 class identifier and an id that is unique within that class for
63 that input device. The id is used to identify the feedback when
64 making an XChangeFeedbackControl request.
65
66 XGetFeedbackControl can generate a BadDevice or BadMatch error.
67
68 The XChangeFeedbackControl request modifies the values of one
69 feedback on the specified device. The feedback is identified by
70 the id field of the XFeedbackControl structure that is passed
71 with the request. The fields of the feedback that are to be
72 modified are identified by the bits of the mask that is passed
73 with the request.
74
75 XChangeFeedbackControl can generate a BadDevice, BadMatch, or
76 BadValue error.
77
78 Structures
79
80 Each class of feedback is described by a structure specific to
81 that class. These structures are defined in the file XInput.h.
82 XFeedbackState and XFeedbackControl are generic structures that
83 contain three fields that are at the beginning of each class of
84 feedback:
85
86 typedef struct {
87 XID class;
88 int length;
89 XID id;
90 } XFeedbackState,
91 XFeedbackControl;
92
93 The XKbdFeedbackState structure defines the attributes that are
94 returned for feedbacks equivalent to those on the X keyboard.
95
96 typedef struct {
97 XID class;
98 int length;
99 XID id;
100 int click;
101 int percent;
102 int pitch;
103 int duration;
104 int led_mask;
105 int global_auto_repeat;
106 char auto_repeats[32];
107 } XKbdFeedbackState;
108
109 The XPtrFeedbackState structure defines the attributes that are
110 returned for feedbacks equivalent to those on the the X
111 pointer.
112
113 typedef struct {
114 XID class;
115 int length;
116 XID id;
117 int accelNum;
118 int accelDenom;
119 int threshold;
120 } XPtrFeedbackState;
121
122 The XIntegerFeedbackState structure defines attributes that are
123 returned for integer feedbacks.
124
125 typedef struct {
126 XID class;
127 int length;
128 XID id;
129 int resolution;
130 int minVal;
131 int maxVal;
132 } XIntegerFeedbackState;
133
134 The XStringFeedbackState structure defines the attributes that
135 are returned for string feedbacks.
136
137 typedef struct {
138 XID class;
139 int length;
140 XID id;
141 int max_symbols;
142 int num_syms_supported;
143 KeySym *syms_supported;
144 } XStringFeedbackState;
145
146 The XBellFeedbackState structure defines the attributes that
147 are returned for bell feedbacks.
148
149 typedef struct {
150 XID class;
151 int length;
152 XID id;
153 int percent;
154 int pitch;
155 int duration;
156 } XBellFeedbackState;
157
158 The XLedFeedbackState structure defines the attributes that are
159 returned for LED feedbacks.
160
161 typedef struct { XID class;
162 int length;
163 XID id;
164 int led_values;
165 } XLedFeedbackState;
166
167 The XPrtFeedbackControl structure defines the attributes that
168 can be controlled for pointer feedbacks.
169
170 typedef struct {
171 XID class;
172 int length;
173 XID id;
174 int accelNum;
175 int accelDenom;
176 int threshold;
177 } XPtrFeedbackControl;
178
179 The XKbdFeedbackControl structure defines the attributes that
180 can be controlled for keyboard feedbacks.
181
182 typedef struct {
183 XID class;
184 int length;
185 XID id;
186 int click;
187 int percent;
188 int pitch;
189 int duration;
190 int led_mask;
191 int led_value;
192 int key;
193 int auto_repeat_mode;
194 } XKbdFeedbackControl;
195
196 The XStringFeedbackControl structure defines the attributes
197 that can be controlled for string feedbacks.
198
199 typedef struct {
200 XID class;
201 int length;
202 XID id;
203 int num_keysyms;
204 KeySym *syms_to_display;
205 } XStringFeedbackControl;
206
207 The XIntegerFeedbackControl structure defines the attributes
208 that can be controlled for integer feedbacks.
209
210 typedef struct {
211 XID class;
212 int length;
213 XID id;
214 int int_to_display;
215 } XIntegerFeedbackControl;
216
217 The XBellFeedbackControl structure defines the attributes that
218 can be controlled for bell feedbacks.
219
220 typedef struct {
221 XID class;
222 int length;
223 XID id;
224 int percent;
225 int pitch;
226 int duration;
227 } XBellFeedbackControl;
228
229 The XLedFeedbackControl structure defines the attributes that
230 can be controlled for LED feedbacks.
231
232 typedef struct {
233 XID class;
234 int length;
235 XID id;
236 int led_mask;
237 int led_values;
238 } XLedFeedbackControl;
239
241 BadDevice
242 An invalid device was specified. The specified device
243 does not exist or has not been opened by this client via
244 XOpenInputDevice. This error may also occur if some
245 other client has caused the specified device to become
246 the X keyboard or X pointer device via the
247 XChangeKeyboardDevice or XChangePointerDevice requests.
248
249 BadMatch
250 This error may occur if an XGetFeedbackControl request
251 was made specifying a device that has no feedbacks, or
252 an XChangeFeedbackControl request was made with an
253 XFeedbackControl structure that contains an invalid
254 feedback type. It may also occur if an invalid
255 combination of mask bits is specified ( DvKey but no
256 DvAutoRepeatMode for keyboard feedbacks), or if an
257 invalid KeySym is specified for a string feedback.
258
259 BadValue
260 Some numeric value falls outside the range of values
261 accepted by the XChangeFeedbackControl request. Unless a
262 specific range is specified for an argument, the full
263 range defined by the argumentĀ“s type is accepted. Any
264 argument defined as a set of alternatives can generate
265 this error.
266
267
268
269[FIXME: source] 08/04/2010 XGETFEEDBACKCONTROL(3)