1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
.\"
.\" $XFree86$
.\"
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XChFCtl.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $
.ds xL Programming With Xlib
.TH XGetFeedbackControl 3X11 __xorgversion__ "X FUNCTIONS"
.SH NAME
XGetFeedbackControl, XChangeFeedbackControl \- query and change input device feedbacks
.SH SYNTAX
.HP
XFeedbackState *XGetFeedbackControl\^(\^Display *\fIdisplay\fP\^, XDevice
*\fIdevice\fP\^, int *\fInum_feedbacks\fP\^);
.HP
int XChangeFeedbackControl\^(\^Display *\fIdisplay\fP\^, XDevice
*\fIdevice\fP\^, Mask \fImask\fP\^, XFeedbackControl *\fIcontrol\fP\^);
.SH ARGUMENTS
.TP 15
.I display
Specifies the connection to the X server.
.TP 15
.I device
Specifies the device whose feedbacks are to be queried or modified.
.TP 15
.I num_feedbacks
Specifies an address into which the number of feedbacks supported by the
device is to be returned.
.TP 15
.I mask
Specifies a mask specific to each type of feedback that describes how
the feedback is to be modified.
.TP 15
.I control
Specifies the address of an \fIXFeedbackControl\fP structure that contains
the new values for the feedback.
.SH DESCRIPTION
These requests are provided to manipulate those input devices that
support feedbacks. A \fIBadMatch\fP 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 \fIXOpenDevice\fP request. For those devices that
support feedbacks, \fIXOpenDevice\fP will return an
\fIXInputClassInfo\fP structure with the input_class field
equal to the constant \fIFeedbackClass\fP (defined in the file \fIXI.h\fP).
.LP
The \fIXGetFeedbackControl\fP request returns a pointer to a list of
\fIXFeedbackState\fP 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.
.LP
The feedback classes that are currently defined are: \fIKbdFeedbackClass\fP,
\fIPtrFeedbackClass\fP, \fIStringFeedbackClass\fP, \fIIntegerFeedbackClass\fP,
\fILedFeedbackClass\fP, and \fIBellFeedbackClass\fP. These constants are
defined in the file \fIXI.h\fP. 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 \fIXChangeFeedbackControl\fP request.
.LP
\fIXGetFeedbackControl\fP can generate a \fIBadDevice\fP or
\fIBadMatch\fP error.
.LP
The \fIXChangeFeedbackControl\fP request modifies the values of one
feedback on the specified device. The feedback is identified by the id
field of the \fIXFeedbackControl\fP 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.
.LP
\fIXChangeFeedbackControl\fP can generate a \fIBadDevice\fP,
\fIBadMatch\fP, or \fIBadValue\fP error.
.SH STRUCTURES
Each class of feedback is described by a structure specific to that class.
These structures are defined in the file \fIXInput.h\fP.
\fIXFeedbackState\fP and \fIXFeedbackControl\fP are generic
structures that contain three fields that are at the beginning of each class
of feedback:
.LP
.DS
typedef struct {
.br
XID class;
.br
int length;
.br
XID id;
.br
} XFeedbackState, XFeedbackControl;
.DE
.LP
The \fIXKbdFeedbackState\fP structure defines the attributes that are
returned for feedbacks equivalent to those on the X keyboard.
.LP
.DS
.nf
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;
.fi
.DE
.LP
The \fIXPtrFeedbackState\fP structure defines the attributes that are
returned for feedbacks equivalent to those on the the X pointer.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int accelNum;
int accelDenom;
int threshold;
} XPtrFeedbackState;
.fi
.DE
.LP
The \fIXIntegerFeedbackState\fP structure defines attributes that are
returned for integer feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int resolution;
int minVal;
int maxVal;
} XIntegerFeedbackState;
.fi
.DE
.LP
The \fIXStringFeedbackState\fP structure defines the attributes that are
returned for string feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int max_symbols;
int num_syms_supported;
KeySym *syms_supported;
} XStringFeedbackState;
.fi
.DE
.LP
The \fIXBellFeedbackState\fP structure defines the attributes that are
returned for bell feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int percent;
int pitch;
int duration;
} XBellFeedbackState;
.fi
.DE
.LP
The \fIXLedFeedbackState\fP structure defines the attributes that are
returned for LED feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int led_values;
} XLedFeedbackState;
.fi
.DE
.LP
The \fIXPrtFeedbackControl\fP structure defines the attributes that can be
controlled for pointer feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int accelNum;
int accelDenom;
int threshold;
} XPtrFeedbackControl;
.fi
.DE
.LP
The \fIXKbdFeedbackControl\fP structure defines the attributes that can be
controlled for keyboard feedbacks.
.LP
.DS
.nf
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;
.fi
.DE
.LP
The \fIXStringFeedbackControl\fP structure defines the attributes that can be
controlled for string feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int num_keysyms;
KeySym *syms_to_display;
} XStringFeedbackControl;
.fi
.DE
.LP
The \fIXIntegerFeedbackControl\fP structure defines the attributes that can
be controlled for integer feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int int_to_display;
} XIntegerFeedbackControl;
.fi
.DE
.LP
The \fIXBellFeedbackControl\fP structure defines the attributes that can be
controlled for bell feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int percent;
int pitch;
int duration;
} XBellFeedbackControl;
.fi
.DE
.LP
The \fIXLedFeedbackControl\fP structure defines the attributes that can be
controlled for LED feedbacks.
.LP
.DS
.nf
typedef struct {
XID class;
int length;
XID id;
int led_mask;
int led_values;
} XLedFeedbackControl;
.fi
.DE
.SH DIAGNOSTICS
.TP 12
\fIBadDevice\fP
An invalid device was specified. The specified device does not exist or has
not been opened by this client via \fIXOpenInputDevice\fP. 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 \fIXChangeKeyboardDevice\fP or
\fIXChangePointerDevice\fP requests.
.TP 12
\fIBadMatch\fP
This error may occur if an \fIXGetFeedbackControl\fP request was made specifying
a device that has no feedbacks, or an \fIXChangeFeedbackControl\fP request was
made with an \fIXFeedbackControl\fP structure that contains an invalid feedback
type. It may also occur if an invalid combination of mask bits is specified
(\fIDvKey\fP but no \fIDvAutoRepeatMode\fP for keyboard feedbacks), or if an
invalid KeySym is specified for a string feedback.
.TP 12
\fIBadValue\fP
Some numeric value falls outside the range of values accepted by the
\fIXChangeFeedbackControl\fP 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.
.SH "SEE ALSO"
.br
\fI\*(xL\fP
|