Remove now unnecessary files as everything is implemented in xcbgen.
[free-sw/xcb/proto] / src / xinput.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3 Copyright (C) 2006 Peter Hutterer 
4 All Rights Reserved.
5
6 Permission is hereby granted, free of charge, to any person obtaining a copy
7 of this software and associated documentation files (the "Software"), to deal
8 in the Software without restriction, including without limitation the rights
9 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 copies of the Software, and to permit persons to whom the Software is
11 furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in all
14 copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23 Except as contained in this notice, the names of the authors or their
24 institutions shall not be used in advertising or otherwise to promote the
25 sale, use or other dealings in this Software without prior written
26 authorization from the authors.
27 -->
28
29 <!-- Spec: http://refspecs.freestandards.org/X11/Xinput.pdf -->
30
31 <xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
32      major-version="1" minor-version="4">
33     <import>xproto</import>
34
35     <typedef oldname="CARD8" newname="KeyCode" />
36     <typedef oldname="CARD32" newname="EventClass" />
37
38     <enum name="ValuatorMode">
39         <item name="Relative"> <value>0</value></item>
40         <item name="Absolute"> <value>1</value></item>
41     </enum>
42
43     <enum name="PropagateMode">
44         <item name="AddToList"> <value>0</value></item>
45         <item name="DeleteFromList"> <value>1</value></item>
46     </enum>
47
48     <!-- GetExtensionVersion -->
49
50     <request name="GetExtensionVersion" opcode="1">
51         <field type="CARD16" name="name_len" />
52         <pad bytes="2" />
53         <list type="char" name="name">
54             <fieldref>name_len</fieldref>
55         </list>
56         <reply>
57             <pad bytes="1" />
58             <field type="CARD16" name="server_major" />
59             <field type="CARD16" name="server_minor" />
60             <field type="BOOL" name="present" />
61             <pad bytes="19" />
62         </reply>
63     </request>
64
65     <!-- ListInputDevices -->
66
67     <enum name="DeviceUse">
68         <item name="IsXPointer"><value>0</value></item>
69         <item name="IsXKeyboard"><value>1</value></item>
70         <item name="IsXExtensionDevice"><value>2</value></item>
71         <item name="IsXExtensionKeyboard"><value>3</value></item>
72         <item name="IsXExtensionPointer"><value>4</value></item>
73     </enum>
74
75     <struct name="DeviceInfo">
76         <field type="ATOM" name="device_type" />
77         <field type="CARD8" name="device_id" />
78         <field type="CARD8" name="num_class_info" />
79         <field type="CARD8" name="device_use" enum="DeviceUse" />
80         <pad bytes="1" />
81     </struct>
82
83     <request name="ListInputDevices" opcode="2">
84         <reply>
85             <pad bytes="1" />
86             <field type="CARD8" name="devices_len" />
87             <pad bytes="23" />
88             <list type="DeviceInfo" name="devices">
89                 <fieldref>devices_len</fieldref>
90             </list>
91             <!-- Uninterpreted: list of deviceinfo structs of 3 the subtypes -->
92             <!-- Uninterpreted: list of null-terminated strings -->
93         </reply>
94     </request>
95
96     <enum name="InputClass">
97         <item name="Key"><value>0</value></item>
98         <item name="Button"><value>1</value></item>
99         <item name="Valuator"><value>2</value></item>
100         <item name="Feedback"><value>3</value></item>
101         <item name="Proximity"><value>4</value></item>
102         <item name="Focus"><value>5</value></item>
103         <item name="Other"><value>6</value></item>
104     </enum>
105
106     <struct name="InputInfo">
107         <field type="CARD8" name="class_id" enum="InputClass" />
108         <field type="CARD8" name="len" />
109     </struct>
110
111     <struct name="KeyInfo">
112         <field type="CARD8" name="class_id" enum="InputClass" />
113         <field type="CARD8" name="len" />
114         <field type="KeyCode" name="min_keycode" />
115         <field type="KeyCode" name="max_keycode" />
116         <field type="CARD16" name="num_keys" />
117         <pad bytes="2" />
118     </struct>
119
120     <struct name="ButtonInfo">
121         <field type="CARD8" name="class_id" enum="InputClass" />
122         <field type="CARD8" name="len" />
123         <field type="CARD16" name="num_buttons" />
124     </struct>
125
126     <struct name="AxisInfo">
127         <field type="CARD32" name="resolution" />
128         <field type="INT32" name="minimum" />
129         <field type="INT32" name="maximum" />
130     </struct>
131
132     <struct name="ValuatorInfo">
133         <field type="CARD8" name="class_id" enum="InputClass" />
134         <field type="CARD8" name="len" />
135         <field type="CARD8" name="axes_len" />
136         <field type="CARD8" name="mode" enum="ValuatorMode" />
137         <field type="CARD32" name="motion_size" />
138         <list type="AxisInfo" name="axes">
139             <fieldref>axes_len</fieldref>
140         </list>
141     </struct>
142
143     <!-- OpenDevice -->
144
145     <struct name="InputClassInfo">
146         <field type="CARD8" name="class_id" enum="InputClass" />
147         <field type="CARD8" name="event_type_base" />
148     </struct>
149
150     <request name="OpenDevice" opcode="3">
151         <field type="CARD8" name="device_id" />
152         <pad bytes="3" />
153         <reply>
154             <pad bytes="1" />
155             <field type="CARD8" name="num_classes" />
156             <pad bytes="23" />
157             <list type="InputClassInfo" name="class_info">
158                 <fieldref>num_classes</fieldref>
159             </list>
160         </reply>
161     </request>
162
163     <!-- CloseDevice -->
164
165     <request name="CloseDevice" opcode="4">
166         <field type="CARD8" name="device_id" />
167         <pad bytes="3" />
168     </request>
169
170     <!-- SetDeviceMode -->
171
172     <request name="SetDeviceMode" opcode="5">
173         <field type="CARD8" name="device_id" />
174         <field type="CARD8" name="mode" enum="ValuatorMode" />
175         <pad bytes="2" />
176         <reply>
177             <pad bytes="1" />
178             <field type="CARD8" name="status" altenum="GrabStatus" />
179             <pad bytes="23" />
180         </reply>
181     </request>
182
183     <!-- SelectExtensionEvent -->
184
185     <request name="SelectExtensionEvent" opcode="6">
186         <field type="WINDOW" name="window" />
187         <field type="CARD16" name="num_classes" />
188         <pad bytes="2" />
189         <list type="EventClass" name="classes">
190             <fieldref>num_classes</fieldref>
191         </list>
192     </request>
193
194     <!-- GetSelectedExtensionEvents -->
195
196     <request name="GetSelectedExtensionEvents" opcode="7">
197         <field type="WINDOW" name="window" />
198         <reply>
199             <pad bytes="1" />
200             <field type="CARD16" name="num_this_classes" />
201             <field type="CARD16" name="num_all_classes" />
202             <pad bytes="20" />
203             <list type="EventClass" name="this_classes">
204                 <fieldref>num_this_classes</fieldref>
205             </list>
206             <list type="EventClass" name="all_classes">
207                 <fieldref>num_all_classes</fieldref>
208             </list>
209         </reply>
210     </request>
211
212     <!-- ChangeDeviceDontPropagateList -->
213
214     <request name="ChangeDeviceDontPropagateList" opcode="8">
215         <field type="WINDOW" name="window" />
216         <field type="CARD16" name="num_classes" />
217         <field type="CARD8" name="mode" enum="PropagateMode" />
218         <pad bytes="1" />
219         <list type="EventClass" name="classes">
220             <fieldref>num_classes</fieldref>
221         </list>
222     </request>
223
224     <!-- GetDeviceDontPropagateList -->
225
226     <request name="GetDeviceDontPropagateList" opcode="9">
227         <field type="WINDOW" name="window" />
228         <reply>
229             <pad bytes="1" />
230             <field type="CARD16" name="num_classes" />
231             <pad bytes="22" />
232             <list type="EventClass" name="classes">
233                 <fieldref>num_classes</fieldref>
234             </list>
235         </reply>
236     </request>
237
238     <!-- GetDeviceMotionEvents -->
239
240     <request name="GetDeviceMotionEvents" opcode="10">
241         <field type="TIMESTAMP" name="start" />
242         <field type="TIMESTAMP" name="stop" altenum="Time" />
243         <field type="CARD8" name="device_id" />
244         <reply>
245             <pad bytes="1" />
246             <field type="CARD32" name="num_coords" />
247             <field type="CARD8" name="num_axes" />
248             <field type="CARD8" name="device_mode" enum="ValuatorMode" />
249             <pad bytes="18" />
250             <!-- Uninterpreted: list of DeviceTimeCoord structures -->
251         </reply>
252     </request>
253
254     <struct name="DeviceTimeCoord">
255         <field type="TIMESTAMP" name="time" />
256         <!-- Uninterpreted: list of CARD16 -->
257     </struct>
258
259     <!-- ChangeKeyboardDevice -->
260     <request name="ChangeKeyboardDevice" opcode="11">
261         <field type="CARD8" name="device_id" />
262         <pad bytes="3" />
263         <reply>
264             <pad bytes="1" />
265             <field type="CARD8" name="status" altenum="GrabStatus" />
266             <pad bytes="23" />
267         </reply>
268     </request>
269
270     <!-- ChangePointerDevice -->
271
272     <request name="ChangePointerDevice" opcode="12">
273         <field type="CARD8" name="x_axis" />
274         <field type="CARD8" name="y_axis" />
275         <field type="CARD8" name="device_id" />
276         <pad bytes="1" />
277         <reply>
278             <pad bytes="1" />
279             <field type="CARD8" name="status" altenum="GrabStatus" />
280             <pad bytes="23" />
281         </reply>
282     </request>
283
284     <!-- GrabDevice -->
285
286     <request name="GrabDevice" opcode="13">
287         <field type="WINDOW" name="grab_window" />
288         <field type="TIMESTAMP" name="time" altenum="Time" />
289         <field type="CARD16" name="num_classes" />
290         <field type="CARD8" name="this_device_mode" enum="GrabMode" />
291         <field type="CARD8" name="other_device_mode" enum="GrabMode" />
292         <field type="BOOL" name="owner_events" />
293         <field type="CARD8" name="device_id" />
294         <pad bytes="2" />
295         <list type="EventClass" name="classes">
296             <fieldref>num_classes</fieldref>
297         </list>
298         <reply>
299             <pad bytes="1" />
300             <field type="CARD8" name="status" enum="GrabStatus" />
301             <pad bytes="23" />
302         </reply>
303     </request>
304
305     <!-- UngrabDevice -->
306
307     <request name="UngrabDevice" opcode="14">
308         <field type="TIMESTAMP" name="time" altenum="Time" />
309         <field type="CARD8" name="device_id" />
310     </request>
311
312     <!-- GrabDeviceKey -->
313
314     <request name="GrabDeviceKey" opcode="15">
315         <field type="WINDOW" name="grab_window" />
316         <field type="CARD16" name="num_classes" />
317         <field type="CARD16" name="modifiers" mask="ModMask" />
318         <field type="CARD8" name="modifier_device" />
319         <field type="CARD8" name="grabbed_device" />
320         <field type="CARD8" name="key" altenum="Grab" />
321         <field type="CARD8" name="this_device_mode" enum="GrabMode" />
322         <field type="CARD8" name="other_device_mode" enum="GrabMode" />
323         <field type="BOOL" name="owner_events" />
324         <pad bytes="2" />
325         <list type="EventClass" name="classes">
326             <fieldref>num_classes</fieldref>
327         </list>
328     </request>
329
330     <!-- UngrabDeviceKey -->
331
332     <request name="UngrabDeviceKey" opcode="16">
333         <field type="WINDOW" name="grabWindow" />
334         <field type="CARD16" name="modifiers" mask="ModMask" />
335         <field type="CARD8" name="modifier_device" />
336         <field type="CARD8" name="key" altenum="Grab" />
337         <field type="CARD8" name="grabbed_device" />
338     </request>
339
340     <!-- GrabDeviceButton -->
341
342     <request name="GrabDeviceButton" opcode="17">
343         <field type="WINDOW" name="grab_window" />
344         <field type="CARD8" name="grabbed_device" />
345         <field type="CARD8" name="modifier_device" />
346         <field type="CARD16" name="num_classes" />
347         <field type="CARD16" name="modifiers" mask="ModMask" />
348         <field type="CARD8" name="this_device_mode" enum="GrabMode" />
349         <field type="CARD8" name="other_device_mode" enum="GrabMode" />
350         <field type="CARD8" name="button" altenum="Grab" />
351         <field type="CARD8" name="owner_events" />
352         <pad bytes="2" />
353         <list type="EventClass" name="classes">
354             <fieldref>num_classes</fieldref>
355         </list>
356     </request>
357
358     <!-- UngrabDeviceButton -->
359
360     <request name="UngrabDeviceButton" opcode="18">
361         <field type="WINDOW" name="grab_window" />
362         <field type="CARD16" name="modifiers" mask="ModMask" />
363         <field type="CARD8" name="modifier_device" />
364         <field type="CARD8" name="button" altenum="Grab" />
365         <field type="CARD8" name="grabbed_device" />
366     </request>
367
368     <!-- AllowDeviceEvents -->
369
370     <enum name="DeviceInputMode">
371         <item name="AsyncThisDevice" />
372         <item name="SyncThisDevice" />
373         <item name="ReplayThisDevice" />
374         <item name="AsyncOtherDevices" />
375         <item name="AsyncAll" />
376         <item name="SyncAll" />
377     </enum>
378
379     <request name="AllowDeviceEvents" opcode="19">
380         <field type="TIMESTAMP" name="time" altenum="Time" />
381         <field type="CARD8" name="mode" enum="DeviceInputMode" />
382         <field type="CARD8" name="device_id" />
383     </request>
384
385     <!-- GetDeviceFocus -->
386
387     <request name="GetDeviceFocus" opcode="20">
388         <field type="CARD8" name="device_id" />
389         <pad bytes="3" />
390         <reply>
391             <pad bytes="1" />
392             <field type="WINDOW" name="focus" altenum="InputFocus" />
393             <field type="TIMESTAMP" name="time" />
394             <field type="CARD8" name="revert_to" enum="InputFocus" />
395             <pad bytes="15" />
396         </reply>
397     </request>
398
399     <!-- SetDeviceFocus -->
400
401     <request name="SetDeviceFocus" opcode="21">
402         <field type="WINDOW" name="focus" altenum="InputFocus" />
403         <field type="TIMESTAMP" name="time" altenum="Time" />
404         <field type="CARD8" name="revert_to" enum="InputFocus" />
405         <field type="CARD8" name="device_id" />
406     </request>
407
408     <!-- GetFeedbackControl -->
409
410     <request name="GetFeedbackControl" opcode="22">
411         <field type="CARD8" name="device_id" />
412         <pad bytes="3" />
413         <reply>
414             <pad bytes="1" />
415             <field type="CARD16" name="num_feedback" />
416             <pad bytes="22" />
417             <!-- Uninterpreted: list of FeedbackState structures -->
418         </reply>
419     </request>
420
421     <enum name="FeedbackClass">
422         <item name="Keyboard" />
423         <item name="Pointer" />
424         <item name="String" />
425         <item name="Integer" />
426         <item name="Led" />
427         <item name="Bell" />
428     </enum>
429
430     <struct name="FeedbackState">
431         <field type="CARD8" name="class_id" enum="FeedbackClass" />
432         <field type="CARD8" name="id" />
433         <field type="CARD16" name="len" />
434     </struct>
435     
436     <struct name="KbdFeedbackState">
437         <field type="CARD8" name="class_id" enum="FeedbackClass" />
438         <field type="CARD8" name="id" />
439         <field type="CARD16" name="len" />
440         <field type="CARD16" name="pitch" />
441         <field type="CARD16" name="duration" />
442         <field type="CARD32" name="led_mask" />
443         <field type="CARD32" name="led_values" />
444         <field type="BOOL" name="global_auto_repeat" />
445         <field type="CARD8" name="click" />
446         <field type="CARD8" name="percent" />
447         <pad bytes="1" />
448         <list type="CARD8" name="auto_repeats"><value>32</value></list>
449     </struct>
450
451     <struct name="PtrFeedbackState">
452         <field type="CARD8" name="class_id" enum="FeedbackClass" />
453         <field type="CARD8" name="id" />
454         <field type="CARD16" name="len" />
455         <pad bytes="2" />
456         <field type="CARD16" name="accel_num" />
457         <field type="CARD16" name="accel_denom" />
458         <field type="CARD16" name="threshold" />
459     </struct>
460
461     <struct name="IntegerFeedbackState">
462         <field type="CARD8" name="class_id" enum="FeedbackClass" />
463         <field type="CARD8" name="id" />
464         <field type="CARD16" name="len" />
465         <field type="CARD32" name="resolution" />
466         <field type="INT32" name="min_value" />
467         <field type="INT32" name="max_value" />
468     </struct>
469
470     <struct name="StringFeedbackState">
471         <field type="CARD8" name="class_id" enum="FeedbackClass" />
472         <field type="CARD8" name="id" />
473         <field type="CARD16" name="len" />
474         <field type="CARD16" name="max_symbols" />
475         <field type="CARD16" name="num_keysyms" />
476         <list type="KEYSYM" name="keysyms">
477             <fieldref>num_keysyms</fieldref>
478         </list>
479     </struct>
480
481     <struct name="BellFeedbackState">
482         <field type="CARD8" name="class_id" enum="FeedbackClass" />
483         <field type="CARD8" name="id" />
484         <field type="CARD16" name="len" />
485         <field type="CARD8" name="percent" />
486         <pad bytes="3" />
487         <field type="CARD16" name="pitch" />
488         <field type="CARD16" name="duration" />
489     </struct>
490
491     <struct name="LedFeedbackState">
492         <field type="CARD8" name="class_id" enum="FeedbackClass" />
493         <field type="CARD8" name="id" />
494         <field type="CARD16" name="len" />
495         <field type="CARD32" name="led_mask" />
496         <field type="CARD32" name="led_values" />
497     </struct>
498
499     <!-- ChangeFeedbackControl
500
501     <request name="ChangeFeedbackControl" opcode="23">
502         <field type="CARD32" name="mask" />
503         <field type="CARD8" name="device_id" />
504         <field type="CARD8" name="feedback_id" />
505         Uninterpreted: list of FeedbackCtl structures
506     </request>
507
508     -->
509
510     <struct name="FeedbackCtl">
511         <field type="CARD8" name="class_id" enum="FeedbackClass" />
512         <field type="CARD8" name="id" />
513         <field type="CARD16" name="len" />
514     </struct>
515
516     <struct name="KbdFeedbackCtl">
517         <field type="CARD8" name="class_id" enum="FeedbackClass" />
518         <field type="CARD8" name="id" />
519         <field type="CARD16" name="len" />
520         <field type="KeyCode" name="key" />
521         <field type="CARD8" name="auto_repeat_mode" />
522         <field type="INT8" name="key_click_percent" />
523         <field type="INT8" name="bell_percent" />
524         <field type="INT16" name="bell_pitch" />
525         <field type="INT16" name="bell_duration" />
526         <field type="CARD32" name="led_mask" />
527         <field type="CARD32" name="led_values" />
528     </struct>
529
530     <struct name="PtrFeedbackCtl">
531         <field type="CARD8" name="class_id" enum="FeedbackClass" />
532         <field type="CARD8" name="id" />
533         <field type="CARD16" name="len" />
534         <pad bytes="2" />
535         <field type="INT16" name="num" />
536         <field type="INT16" name="denom" />
537         <field type="INT16" name="threshold" />
538     </struct>
539
540     <struct name="IntegerFeedbackCtl">
541         <field type="CARD8" name="class_id" enum="FeedbackClass" />
542         <field type="CARD8" name="id" />
543         <field type="CARD16" name="len" />
544         <field type="INT32" name="int_to_display" />
545     </struct>
546
547     <struct name="StringFeedbackCtl">
548         <field type="CARD8" name="class_id" enum="FeedbackClass" />
549         <field type="CARD8" name="id" />
550         <field type="CARD16" name="len" />
551         <pad bytes="2" />
552         <field type="CARD16" name="num_keysyms" />
553         <list type="KEYSYM" name="keysyms">
554             <fieldref>num_keysyms</fieldref>
555         </list>
556     </struct>
557
558     <struct name="BellFeedbackCtl">
559         <field type="CARD8" name="class_id" enum="FeedbackClass" />
560         <field type="CARD8" name="id" />
561         <field type="CARD16" name="len" />
562         <field type="INT8" name="percent" />
563         <pad bytes="3" />
564         <field type="INT16" name="pitch" />
565         <field type="INT16" name="duration" />
566     </struct>
567
568     <struct name="LedFeedbackCtl">
569         <field type="CARD8" name="class_id" enum="FeedbackClass" />
570         <field type="CARD8" name="id" />
571         <field type="CARD16" name="len" />
572         <field type="CARD32" name="led_mask" />
573         <field type="CARD32" name="led_values" />
574     </struct>
575
576     <!-- GetDeviceKeyMapping -->
577
578     <request name="GetDeviceKeyMapping" opcode="24">
579         <field type="CARD8" name="device_id" />
580         <field type="KeyCode" name="first_keycode" />
581         <field type="CARD8" name="count" />
582         <reply>
583             <pad bytes="1" />
584             <field type="CARD8" name="keysyms_per_keycode" />
585             <pad bytes="23" />
586             <list type="KEYSYM" name="keysyms">
587                 <fieldref>length</fieldref>
588             </list>
589         </reply>
590     </request>
591
592     <!-- ChangeDeviceKeyMapping -->
593
594     <request name="ChangeDeviceKeyMapping" opcode="25">
595         <field type="CARD8" name="device_id" />
596         <field type="KeyCode" name="first_keycode" />
597         <field type="CARD8" name="keysyms_per_keycode" />
598         <field type="CARD8" name="keycode_count" />
599         <list type="KEYSYM" name="keysyms">
600             <op op="*">
601                 <fieldref>keycode_count</fieldref>
602                 <fieldref>keysyms_per_keycode</fieldref>
603             </op>
604         </list>
605     </request>
606
607     <!-- GetDeviceModifierMapping -->
608
609     <request name="GetDeviceModifierMapping" opcode="26">
610         <field type="CARD8" name="device_id" />
611         <pad bytes="3" />
612         <reply>
613             <pad bytes="1" />
614             <field type="CARD8" name="keycodes_per_modifier" />
615             <pad bytes="23" />
616             <list type="CARD8" name="keymaps">
617                 <op op="*">
618                     <fieldref>keycodes_per_modifier</fieldref>
619                     <value>8</value>
620                 </op>
621             </list>
622         </reply>
623     </request>
624
625     <!-- SetDeviceModifierMapping -->
626
627     <request name="SetDeviceModifierMapping" opcode="27">
628         <field type="CARD8" name="device_id" />
629         <field type="CARD8" name="keycodes_per_modifier" />
630         <pad bytes="1" />
631         <list type="CARD8" name="keymaps">
632             <op op="*">
633                 <fieldref>keycodes_per_modifier</fieldref>
634                 <value>8</value>
635             </op>
636         </list>
637         <reply>
638             <pad bytes="1" />
639             <field type="CARD8" name="status" enum="MappingStatus" />
640             <pad bytes="23" />
641         </reply>
642     </request>
643
644     <!-- GetDeviceButtonMapping -->
645
646     <request name="GetDeviceButtonMapping" opcode="28">
647         <field type="CARD8" name="device_id" />
648         <pad bytes="3" />
649         <reply>
650             <pad bytes="1" />
651             <field type="CARD8" name="map_size" />
652             <pad bytes="23" />
653             <list type="CARD8" name="map">
654                 <fieldref>map_size</fieldref>
655             </list>
656         </reply>
657     </request>
658
659     <!-- SetDeviceButtonMapping -->
660
661     <request name="SetDeviceButtonMapping" opcode="29">
662         <field type="CARD8" name="device_id" />
663         <field type="CARD8" name="map_size" />
664         <pad bytes="2" />
665         <list type="CARD8" name="map">
666             <fieldref>map_size</fieldref>
667         </list>
668         <reply>
669             <pad bytes="1" />
670             <field type="CARD8" name="status" enum="MappingStatus" />
671             <pad bytes="23" />
672         </reply>
673     </request>
674
675     <!-- QueryDeviceState -->
676
677     <request name="QueryDeviceState" opcode="30">
678         <field type="CARD8" name="device_id" />
679         <pad bytes="3" />
680         <reply>
681             <pad bytes="1" />
682             <field type="CARD8" name="num_classes" />
683             <pad bytes="23" />
684             <!-- Uninterpreted: list of InputState structures -->
685         </reply>
686     </request>
687
688     <struct name="InputState">
689         <field type="CARD8" name="class_id" enum="InputClass" />
690         <field type="CARD8" name="len" />
691         <field type="CARD8" name="num_items" />
692     </struct>
693
694     <struct name="KeyState">
695         <field type="CARD8" name="class_id" enum="InputClass" />
696         <field type="CARD8" name="len" />
697         <field type="CARD8" name="num_keys" />
698         <pad bytes="1" />
699         <list type="CARD8" name="keys">
700             <value>32</value>
701         </list>
702     </struct>
703
704     <struct name="ButtonState">
705         <field type="CARD8" name="class_id" enum="InputClass" />
706         <field type="CARD8" name="len" />
707         <field type="CARD8" name="num_buttons" />
708         <pad bytes="1" />
709         <list type="CARD8" name="buttons">
710             <value>32</value>
711         </list>
712     </struct>
713
714     <struct name="ValuatorState">
715         <field type="CARD8" name="class_id" enum="InputClass" />
716         <field type="CARD8" name="len" />
717         <field type="CARD8" name="num_valuators" />
718         <field type="CARD8" name="mode" />
719         <list type="CARD32" name="valuators">
720             <fieldref>num_valuators</fieldref>
721         </list>
722     </struct>
723
724     <!-- SendExtensionEvent -->
725
726     <request name="SendExtensionEvent" opcode="31">
727         <field type="WINDOW" name="destination" />
728         <field type="CARD8" name="device_id" />
729         <field type="BOOL" name="propagate" />
730         <field type="CARD16" name="num_classes" />
731         <field type="CARD8" name="num_events" />
732         <pad bytes="3" />
733         <list type="char" name="events">
734             <op op="*">
735                 <fieldref>num_events</fieldref>
736                 <value>32</value>
737             </op>
738         </list>
739         <list type="EventClass" name="classes">
740             <fieldref>num_classes</fieldref>
741         </list>
742     </request>
743
744     <!-- DeviceBell -->
745
746     <request name="DeviceBell" opcode="32">
747         <field type="CARD8" name="device_id" />
748         <field type="CARD8" name="feedback_id" />
749         <field type="CARD8" name="feedback_class" />
750         <field type="INT8" name="percent" />
751     </request>
752
753     <!-- SetDeviceValuators -->
754
755     <request name="SetDeviceValuators" opcode="33">
756         <field type="CARD8" name="device_id" />
757         <field type="CARD8" name="first_valuator" />
758         <field type="CARD8" name="num_valuators" />
759         <pad bytes="1" />
760         <list type="INT32" name="valuators">
761             <fieldref>num_valuators</fieldref>
762         </list>
763         <reply>
764             <pad bytes="1" />
765             <field type="CARD8" name="status" enum="GrabStatus" />
766             <pad bytes="23" />
767         </reply>
768     </request>
769
770     <!-- GetDeviceControl -->
771
772     <request name="GetDeviceControl" opcode="34">
773         <field type="CARD16" name="control_id" />
774         <field type="CARD8" name="device_id" />
775         <pad bytes="1" />
776         <reply>
777             <pad bytes="1" />
778             <field type="CARD8" name="status" altenum="GrabStatus" />
779             <pad bytes="23" />
780             <!-- Uninterpreted: list of DeviceState structures -->
781         </reply>
782     </request>
783
784     <struct name="DeviceState">
785         <field type="CARD16" name="control_id" />
786         <field type="CARD16" name="len" />
787     </struct>
788
789     <struct name="DeviceResolutionState">
790         <field type="CARD16" name="control_id" />
791         <field type="CARD16" name="len" />
792         <field type="CARD32" name="num_valuators" />
793         <list type="CARD32" name="resolution_values">
794             <fieldref>num_valuators</fieldref>
795         </list>
796         <list type="CARD32" name="resolution_min">
797             <fieldref>num_valuators</fieldref>
798         </list>
799         <list type="CARD32" name="resolution_max">
800             <fieldref>num_valuators</fieldref>
801         </list>
802     </struct>
803
804     <struct name="DeviceAbsCalibState">
805         <field type="CARD16" name="control_id" />
806         <field type="CARD16" name="len" />
807         <field type="INT32" name="min_x" />
808         <field type="INT32" name="max_x" />
809         <field type="INT32" name="min_y" />
810         <field type="INT32" name="max_y" />
811         <field type="CARD32" name="flip_x" />
812         <field type="CARD32" name="flip_y" />
813         <field type="CARD32" name="rotation" />
814         <field type="CARD32" name="button_threshold" />
815     </struct>
816
817     <struct name="DeviceAbsAreaState">
818         <field type="CARD16" name="control_id" />
819         <field type="CARD16" name="len" />
820         <field type="CARD32" name="offset_x" />
821         <field type="CARD32" name="offset_y" />
822         <field type="CARD32" name="width" />
823         <field type="CARD32" name="height" />
824         <field type="CARD32" name="screen" />
825         <field type="CARD32" name="following" />
826     </struct>
827
828     <struct name="DeviceCoreState">
829         <field type="CARD16" name="control_id" />
830         <field type="CARD16" name="len" />
831         <field type="CARD8" name="status" />
832         <field type="CARD8" name="iscore" />
833         <pad bytes="2" />
834     </struct>
835
836     <struct name="DeviceEnableState">
837         <field type="CARD16" name="control_id" />
838         <field type="CARD16" name="len" />
839         <field type="CARD8" name="enable" />
840         <pad bytes="3" />
841     </struct>
842
843     <!-- ChangeDeviceControl
844
845     <request name="ChangeDeviceControl" opcode="35">
846         <field type="CARD16" name="control_id" />
847         <field type="CARD8" name="device_id" />
848         <pad bytes="1" />
849         Uninterpreted: list of DeviceCtl structures
850         <reply>
851             <pad byte="1" />
852             <field type="CARD8" name="status" altenum="GrabStatus" />
853             <pad bytes="23" />
854         </reply>
855     </request>
856
857     -->
858
859     <struct name="DeviceCtl">
860         <field type="CARD16" name="control_id" />
861         <field type="CARD16" name="len" />
862     </struct>
863
864     <struct name="DeviceResolutionCtl">
865         <field type="CARD16" name="control_id" />
866         <field type="CARD16" name="len" />
867         <field type="CARD8" name="first_valuator" />
868         <field type="CARD8" name="num_valuators" />
869         <list type="CARD32" name="resolution_values">
870             <fieldref>num_valuators</fieldref>
871         </list>
872     </struct>
873
874     <struct name="DeviceAbsCalibCtl">
875         <field type="CARD16" name="control_id" />
876         <field type="CARD16" name="len" />
877         <field type="INT32" name="min_x" />
878         <field type="INT32" name="max_x" />
879         <field type="INT32" name="min_y" />
880         <field type="INT32" name="max_y" />
881         <field type="CARD32" name="flip_x" />
882         <field type="CARD32" name="flip_y" />
883         <field type="CARD32" name="rotation" />
884         <field type="CARD32" name="button_threshold" />
885     </struct>
886
887     <struct name="DeviceAbsAreaCtrl">
888         <field type="CARD16" name="control_id" />
889         <field type="CARD16" name="len" />
890         <field type="CARD32" name="offset_x" />
891         <field type="CARD32" name="offset_y" />
892         <field type="INT32" name="width" />
893         <field type="INT32" name="height" />
894         <field type="INT32" name="screen" />
895         <field type="CARD32" name="following" />
896     </struct>
897
898     <struct name="DeviceCoreCtrl">
899         <field type="CARD16" name="control_id" />
900         <field type="CARD16" name="len" />
901         <field type="CARD8" name="status" />
902         <pad bytes="3" />
903     </struct>
904
905     <struct name="DeviceEnableCtrl">
906         <field type="CARD16" name="control_id" />
907         <field type="CARD16" name="len" />
908         <field type="CARD8" name="enable" />
909         <pad bytes="3" />
910     </struct>
911
912     <!-- EVENTS --> 
913
914     <event name="DeviceValuator" number="0">
915         <field type="CARD8" name="device_id" />
916         <field type="CARD16" name="device_state" />
917         <field type="CARD8" name="num_valuators" />
918         <field type="CARD8" name="first_valuator" />
919         <list type="INT32" name="valuators"><value>6</value></list>
920     </event>
921
922     <event name="DeviceKeyPress" number="1">
923         <field type="BYTE" name="detail" />
924         <field type="TIMESTAMP" name="time" />
925         <field type="WINDOW" name="root" />
926         <field type="WINDOW" name="event" />
927         <field type="WINDOW" name="child" altenum="Window" />
928         <field type="INT16" name="root_x" />
929         <field type="INT16" name="root_y" />
930         <field type="INT16" name="event_x" />
931         <field type="INT16" name="event_y" />
932         <field type="CARD16" name="state" />
933         <field type="BOOL" name="same_screen" />
934         <field type="CARD8" name="device_id" />
935     </event>
936
937     <eventcopy name="DeviceKeyRelease" number="2" ref="DeviceKeyPress" />
938     <eventcopy name="DeviceButtonPress" number="3" ref="DeviceKeyPress" />
939     <eventcopy name="DeviceButtonRelease" number="4" ref="DeviceKeyPress" />
940     <eventcopy name="DeviceMotionNotify" number="5" ref="DeviceKeyPress" />
941     <eventcopy name="ProximityIn" number="8" ref="DeviceKeyPress" />
942     <eventcopy name="ProximityOut" number="9" ref="DeviceKeyPress" />
943
944     <event name="FocusIn" number="6">
945         <field type="BYTE" name="detail" enum="NotifyDetail" />
946         <field type="TIMESTAMP" name="time" />
947         <field type="WINDOW" name="window" />
948         <field type="BYTE" name="mode" enum="NotifyMode" />
949         <field type="CARD8" name="device_id" />
950         <pad bytes="18" />
951     </event>
952
953     <eventcopy name="FocusOut" number="7" ref="FocusIn" />
954
955     <event name="DeviceStateNotify" number="10">
956         <field type="BYTE" name="device_id" />
957         <field type="TIMESTAMP" name="time" />
958         <field type="CARD8" name="num_keys" />
959         <field type="CARD8" name="num_buttons" />
960         <field type="CARD8" name="num_valuators" />
961         <field type="CARD8" name="classes_reported" />
962         <list type="CARD8" name="buttons">
963             <value>4</value>
964         </list>
965         <list type="CARD8" name="keys">
966             <value>4</value>
967         </list>
968         <list type="CARD32" name="valuators">
969             <value>3</value>
970         </list>
971     </event>
972
973     <event name="DeviceMappingNotify" number="11">
974         <field type="BYTE" name="device_id" />
975         <field type="CARD8" name="request" />
976         <field type="KeyCode" name="first_keycode" />
977         <field type="CARD8" name="count" />
978         <pad bytes="1" />
979         <field type="TIMESTAMP" name="time" />
980         <pad bytes="20" />
981     </event>
982
983     <event name="ChangeDeviceNotify" number="12">
984         <field type="BYTE" name="device_id" />
985         <field type="TIMESTAMP" name="time" />
986         <field type="CARD8" name="request" />
987         <pad bytes="23" />
988     </event>
989
990     <event name="DeviceKeyStateNotify" number="13">
991         <field type="BYTE" name="device_id" />
992         <list type="CARD8" name="keys">
993             <value>28</value>
994         </list>
995     </event>
996
997     <event name="DeviceButtonStateNotify" number="14">
998         <field type="BYTE" name="device_id" />
999         <list type="CARD8" name="buttons">
1000             <value>28</value>
1001         </list>
1002     </event>
1003
1004     <event name="DevicePresenceNotify" number="15">
1005         <pad bytes="1" />
1006         <field type="TIMESTAMP" name="time" />
1007         <field type="BYTE" name="devchange" />
1008         <field type="BYTE" name="device_id" />
1009         <field type="CARD16" name="control" />
1010         <pad bytes="20" />
1011     </event>
1012
1013     <!-- ERRORS -->
1014     <error name="Device" number="0" />
1015     <error name="Event" number="1" />
1016     <error name="Mode" number="2" />
1017     <error name="DeviceBusy" number="3" />
1018     <error name="Class" number="4" />
1019
1020 </xcb>