[Xcb] [RFC v0 proto] Add XInput2 protocol description
Daniel Martin
consume.noise at gmail.com
Sun Dec 2 13:05:46 PST 2012
Add the XInput2 protocol description for reviewing and feedback.
Currently known problems are described on top of the xml and fields
related to those problems have a "fixme_" prefix in the name.
---
src/Makefile.am | 1 +
src/xinput2.xml | 1404 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 1405 insertions(+)
create mode 100644 src/xinput2.xml
diff --git a/src/Makefile.am b/src/Makefile.am
index eef2dbc..ca45fc5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,6 +23,7 @@ xcbinclude_HEADERS = \
xfixes.xml \
xinerama.xml \
xinput.xml \
+ xinput2.xml \
xkb.xml \
xprint.xml \
xselinux.xml \
diff --git a/src/xinput2.xml b/src/xinput2.xml
new file mode 100644
index 0000000..9ca8a0c
--- /dev/null
+++ b/src/xinput2.xml
@@ -0,0 +1,1404 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the names of the authors or their
+institutions shall not be used in advertising or otherwise to promote the
+sale, use or other dealings in this Software without prior written
+authorization from the authors.
+
+Authors:
+ Daniel Martin <consume.noise at gmail.com>
+-->
+
+<!-- FIXME:
+
+ - events are generic events:
+
+ XI2 events are generic events. Normal events (specified with the <event>
+ tag) have a different header. Therefor, we need a new tag or a new
+ attribute, which marks an event as a generic event.
+
+ <genericevent name="..." ... />
+
+ or
+
+ <event name="..." generic_event="true" ... />
+
+ Meanwhile, all events have been implemented as structs and the name has
+ been expanded with "Event". Due to that, the generated name of the
+ resulting struct gets the well known _event_t postfix. The intent for
+ that choice was to reduce code changes to a minimum when this issue gets
+ fixed.
+ Additionally, an <enum name="Event"> has been added to work around the
+ missing defines for the event opcodes. (Missing, cause they would have
+ been generated when using the event tag.)
+
+
+ - popcount on a previously declared list:
+ (KeyPress and RawKeyPress event)
+
+ <struct name="x>
+ <field type="CARD16" name="len" />
+
+ ⋅⋅⋅> <list type="char" name="mask">
+ : <fieldref name="len" />
+ : </list>
+ :
+ : <list type="CARD32" name="values">
+ : <popcount>
+ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ <fieldref>mask</fieldref>
+ </popcount>
+ </list>
+ </struct>
+
+
+ - list of structs with a variable size:
+ (DeviceClass and ChangeHierarchy, i.e.
+ http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n690)
+
+ To handle those special structs the list tag needs be enhanced. A new
+ lengthref tag could fix this.
+
+ ⋅⋅⋅ example for list of structs with a variable size ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
+ :
+ : <enum name="FooBarType">
+ : <item name="type" />
+ : <item name="length" />
+ : </enum>
+ :
+ : <struct name="AnyFooBar">
+ : <field type="CARD16" name="type" />
+ : <field type="CARD16" name="length" />
+ : </struct>
+ :
+ : <struct name="Foo">
+ : <field type="CARD16" name="type" enum="FooBarType" />
+ : <field type="CARD16" name="length" />
+ : <field type="CARD16" name="num_foos" />
+ :
+ : <list type="CARD8" name="foos">
+ : <fieldref>num_foos</fieldref>
+ : </list>
+ : </struct>
+ :
+ : <struct name="Bar">
+ : <field type="CARD16" name="type" enum="FooBarType" />
+ : <field type="CARD16" name="length" />
+ : <field type="CARD16" name="num_bars" />
+ :
+ : <list type="CARD32" name="bars">
+ : <fieldref>num_bars</fieldref>
+ : </list>
+ : </struct>
+ :
+ : <union name="FooBar">
+ : <field type="AnyFooBar" name="any" />
+ : <field type="Foo" name="foo" />
+ : <field type="Bar" name="bar" />
+ : </union>
+ :
+ : later in a struct/request/event:
+ :
+ : <field type="CARD16" name="num_foobars" />
+ :
+ : <list type="FooBar" name="foobars">
+ : <fieldref>num_foobars</fieldref>
+ :⋅⋅⋅> <lengthref>any.length</lengthref>
+ : </list>
+ :
+ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
+
+ - union of structs with a variable size:
+ (related to the issue "list of structs with a variable size")
+
+ Currently, those special unions aren't handled properly. xcbgen knows
+ about this fact and adds a FIXME note to the next iterator, i.e.:
+
+ void
+ xcb_input2_device_class_next (xcb_input2_device_class_iterator_t *i /**< */)
+ {
+ xcb_input2_device_class_t *R = i->data;
+ /* FIXME - determine the size of the union xcb_input2_device_class_t */
+ }
+
+-->
+
+<xcb header="xinput2" extension-name="Input2"
+ extension-xname="XInputExtension" major-version="2" minor-version="2">
+
+ <import>xproto</import>
+
+
+ <typedef oldname="INT32" newname="FP1616" />
+
+ <struct name="FP3232">
+ <field type="INT32" name="integral" />
+ <field type="CARD32" name="frac" />
+ </struct>
+
+ <typedef oldname="CARD16" newname="DeviceId" />
+
+
+ <enum name="EventMask">
+ <item name="DeviceChanged"> <bit> 1 </bit> </item>
+ <item name="KeyPress"> <bit> 2 </bit> </item>
+ <item name="KeyRelease"> <bit> 3 </bit> </item>
+ <item name="ButtonPress"> <bit> 4 </bit> </item>
+ <item name="ButtonRelease"> <bit> 5 </bit> </item>
+ <item name="Motion"> <bit> 6 </bit> </item>
+ <item name="Enter"> <bit> 7 </bit> </item>
+ <item name="Leave"> <bit> 8 </bit> </item>
+ <item name="FocusIn"> <bit> 9 </bit> </item>
+ <item name="FocusOut"> <bit> 10 </bit> </item>
+ <item name="HierarchyChanged"> <bit> 11 </bit> </item>
+ <item name="PropertyEvent"> <bit> 12 </bit> </item>
+ <item name="RawKeyPress"> <bit> 13 </bit> </item>
+ <item name="RawKeyRelease"> <bit> 14 </bit> </item>
+ <item name="RawButtonPress"> <bit> 15 </bit> </item>
+ <item name="RawButtonRelease"> <bit> 16 </bit> </item>
+ <item name="RawMotion"> <bit> 17 </bit> </item>
+ <!-- XI 2.2 -->
+ <item name="TouchBegin"> <bit> 18 </bit> </item>
+ <item name="TouchUpdate"> <bit> 19 </bit> </item>
+ <item name="TouchEnd"> <bit> 20 </bit> </item>
+ <item name="TouchOwnership"> <bit> 21 </bit> </item>
+ <item name="RawTouchBegin"> <bit> 22 </bit> </item>
+ <item name="RawTouchUpdate"> <bit> 23 </bit> </item>
+ <item name="RawTouchEnd"> <bit> 24 </bit> </item>
+ </enum>
+
+ <enum name="Device">
+ <item name="All" />
+ <item name="AllMaster" />
+ </enum>
+
+ <enum name="ModifierMask">
+ <!-- FIXME: A define would be better, cause this enum raises a warning.
+ But, due to the enum we can use it in altenum attributes.
+
+ That's the warning:
+ warning: ISO C restricts enumerator values to range of 'int' [-pedantic]
+
+ So, do we care about ISO C? I don't think so. C99 struct
+ initializers wouldn't work either if we do.
+ How to come across this warning? (No, removing -pedantic is
+ not an option. ;) )
+ -->
+ <item name="Any"> <bit> 31 </bit> </item> <!-- (1U << 31) in XI2.h -->
+ </enum>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
+ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
+ ⋅⋅⋅ Requests ⋅⋅⋅
+ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
+ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+
+ <struct name="Group">
+ <field type="CARD8" name="base" />
+ <field type="CARD8" name="latched" />
+ <field type="CARD8" name="locked" />
+ <field type="CARD8" name="effective" />
+ </struct>
+
+ <struct name="Modifier">
+ <field type="CARD32" name="base" />
+ <field type="CARD32" name="latched" />
+ <field type="CARD32" name="locked" />
+ <field type="CARD32" name="effective" />
+ </struct>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="QueryPointer" opcode="40">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="child" />
+ <field type="FP1616" name="root_x" />
+ <field type="FP1616" name="root_y" />
+ <field type="FP1616" name="window_x" />
+ <field type="FP1616" name="window_y" />
+ <field type="CARD8" name="same_screen" />
+ <pad bytes="1" />
+ <field type="CARD16" name="buttons_len" />
+ <field type="Modifier" name="modifier" />
+ <field type="Group" name="group" />
+
+ <list type="char" name="buttons">
+ <op op="*">
+ <fieldref>buttons_len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
+ </reply>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="WarpPointer" opcode="41">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="src" />
+ <field type="WINDOW" name="dst" />
+ <field type="FP1616" name="src_x" />
+ <field type="FP1616" name="src_y" />
+ <field type="CARD16" name="src_width" />
+ <field type="CARD16" name="src_height" />
+ <field type="FP1616" name="dst_x" />
+ <field type="FP1616" name="dst_y" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="ChangeCursor" opcode="42">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+ <field type="CURSOR" name="cursor" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+
+ <enum name="ChangeHierarchyType">
+ <item name="AddMaster"> <value> 1 </value> </item>
+ <item name="RemoveMaster"> <value> 2 </value> </item>
+ <item name="AttachSlave"> <value> 3 </value> </item>
+ <item name="DetachSlave"> <value> 4 </value> </item>
+ </enum>
+
+ <struct name="AddMaster">
+ <!-- generic hierarchy fields -->
+ <field type="CARD16" name="type" enum="ChangeHierarchyType" />
+ <field type="CARD16" name="length" />
+ <!-- specific hierarchy fields -->
+ <field type="CARD16" name="name_len" />
+ <field type="CARD8" name="send_core" />
+ <field type="CARD8" name="enable" />
+
+ <list type="char" name="name">
+ <fieldref>name_len</fieldref>
+ </list>
+ </struct>
+
+ <enum name="RemoveMasterMode">
+ <item name="AttachToMaster"> <value> 1 </value> </item>
+ <item name="Floating"> <value> 2 </value> </item>
+ </enum>
+
+ <struct name="RemoveMaster">
+ <!-- generic hierarchy fields -->
+ <field type="CARD16" name="type" enum="ChangeHierarchyType" />
+ <field type="CARD16" name="length" />
+ <!-- specific hierarchy fields -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD8" name="return_mode" enum="RemoveMasterMode" />
+ <pad bytes="1" />
+ <field type="DeviceId" name="return_pointer" altenum="Device" />
+ <field type="DeviceId" name="return_keyboard" altenum="Device" />
+ </struct>
+
+ <struct name="AttachSlave">
+ <!-- generic hierarchy fields -->
+ <field type="CARD16" name="type" enum="ChangeHierarchyType" />
+ <field type="CARD16" name="length" />
+ <!-- specific hierarchy fields -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="DeviceId" name="master" altenum="Device" />
+ </struct>
+
+ <struct name="DetachSlave">
+ <!-- generic hierarchy fields -->
+ <field type="CARD16" name="type" enum="ChangeHierarchyType" />
+ <field type="CARD16" name="length" />
+ <!-- specific hierarchy fields -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+ </struct>
+
+ <struct name="AnyChangeHierarchy">
+ <field type="CARD16" name="type" enum="ChangeHierarchyType" />
+ <field type="CARD16" name="length" />
+ </struct>
+
+ <union name="ChangeHierarchy">
+ <field type="AnyChangeHierarchy" name="any" />
+ <field type="AddMaster" name="add_master" />
+ <field type="RemoveMaster" name="remove_master" />
+ <field type="AttachSlave" name="attach_slave" />
+ <field type="DetachSlave" name="detach_slave" />
+ </union>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="ChangeHierarchy" opcode="43">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="CARD8" name="num_changes" />
+
+ <list type="AnyChangeHierarchy" name="fixme_changes">
+ <op op="*">
+ <fieldref>num_changes</fieldref>
+ <value>0</value>
+ </op>
+ </list>
+ <!--
+ <list type="ChangeHierarchy" name="changes">
+ <fieldref>num_changes</fieldref>
+ </list>
+ -->
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="SetClientPointer" opcode="44">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="GetClientPointer" opcode="45">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="BOOL" name="set" />
+ <pad bytes="1" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="20" />
+ </reply>
+ </request>
+
+
+ <struct name="EventMaskType">
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD16" name="mask_len" />
+
+ <list type="char" name="mask">
+ <op op="*">
+ <fieldref>mask_len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
+ </struct>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="SelectEvents" opcode="46">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+ <field type="CARD16" name="num_mask" />
+ <pad bytes="2" />
+
+ <list type="EventMaskType" name="masks">
+ <fieldref>num_mask</fieldref>
+ </list>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="QueryVersion" opcode="47">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="CARD16" name="major" />
+ <field type="CARD16" name="minor" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="major" />
+ <field type="CARD16" name="minor" />
+ <pad bytes="20" />
+ </reply>
+ </request>
+
+
+ <enum name="DeviceClassType">
+ <item name="Key"> <value> 0 </value> </item>
+ <item name="Button"> <value> 1 </value> </item>
+ <item name="Valuator"> <value> 2 </value> </item>
+ <item name="Scroll"> <value> 3 </value> </item>
+ <item name="Touch"> <value> 8 </value> </item>
+ </enum>
+
+ <struct name="Key">
+ <!-- generic class fields -->
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="length" />
+ <field type="CARD16" name="src" />
+ <!-- specific class fields -->
+ <field type="CARD16" name="num_keycodes" />
+
+ <list type="CARD32" name="keycodes">
+ <fieldref>num_keycodes</fieldref>
+ </list>
+ </struct>
+
+ <struct name="Button">
+ <!-- generic class fields -->
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="length" />
+ <field type="CARD16" name="src" />
+ <!-- specific class fields -->
+ <field type="CARD16" name="num_buttons" />
+
+ <list type="CARD32" name="state">
+ <!-- bits_to_bytes(bits) = (bits + 7) >> 3 = (bits + 7) / 8
+ bytes_to_int32(bytes) = (bytes + 3) >> 2 = (bytes + 3) / 4
+
+ state length = bytes_to_int32(bits_to_bytes(num_buttons))
+ = ...
+ = (bits + 31) / 32
+ -->
+ <op op="/">
+ <op op="+">
+ <fieldref>num_buttons</fieldref>
+ <value>31</value>
+ </op>
+ <value>32</value>
+ </op>
+ </list>
+
+ <list type="ATOM" name="labels">
+ <fieldref>num_buttons</fieldref>
+ </list>
+ </struct>
+
+ <enum name="ValuatorMode">
+ <item name="Relative" />
+ <item name="Absolute" />
+ </enum>
+
+ <struct name="Valuator">
+ <!-- generic class fields -->
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="length" />
+ <field type="CARD16" name="src" />
+ <!-- specific class fields -->
+ <field type="CARD16" name="number" />
+ <field type="ATOM" name="label" />
+ <field type="FP3232" name="min" />
+ <field type="FP3232" name="max" />
+ <field type="FP3232" name="value" />
+ <field type="CARD32" name="resolution" />
+ <field type="CARD8" name="mode" enum="ValuatorMode" />
+ <pad bytes="3" />
+ </struct>
+
+ <enum name="ScrollType">
+ <item name="Vertical"> <value> 1 </value> </item>
+ <item name="Horizontal"> <value> 2 </value> </item>
+ </enum>
+
+ <enum name="ScrollFlags">
+ <item name="NoEmulation"> <bit> 0 </bit> </item>
+ <item name="Preferred"> <bit> 1 </bit> </item>
+ </enum>
+
+ <struct name="Scroll">
+ <!-- generic class fields -->
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="length" />
+ <field type="CARD16" name="src" />
+ <!-- specific class fields -->
+ <field type="CARD16" name="number" />
+ <field type="CARD16" name="scroll_type" enum="ScrollType" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" enum="ScrollFlags" />
+ <field type="FP3232" name="increment" />
+ </struct>
+
+ <enum name="TouchMode">
+ <item name="Direct"> <value> 1 </value> </item>
+ <item name="Dependent"> <value> 2 </value> </item>
+ </enum>
+
+ <struct name="Touch">
+ <!-- generic class fields -->
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="length" />
+ <field type="CARD16" name="src" />
+ <!-- specific class fields -->
+ <field type="CARD8" name="mode" enum="TouchMode" />
+ <field type="CARD8" name="num_touches" />
+ </struct>
+
+ <struct name="AnyDeviceClass">
+ <!-- generic class fields -->
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="length" />
+ <field type="CARD16" name="src" />
+ <pad bytes="2" />
+ </struct>
+
+ <union name="DeviceClass">
+ <field type="AnyDeviceClass" name="any" />
+ <field type="Key" name="key" />
+ <field type="Button" name="button" />
+ <field type="Valuator" name="valuator" />
+ <field type="Scroll" name="scroll" />
+ <field type="Touch" name="touch" />
+ </union>
+
+
+ <enum name="DeviceType">
+ <item name="MasterPointer"> <value> 1 </value> </item>
+ <item name="MasterKeyboard"> <value> 2 </value> </item>
+ <item name="SlavePointer"> <value> 3 </value> </item>
+ <item name="SlaveKeyboard"> <value> 4 </value> </item>
+ <item name="FloatingSlave"> <value> 5 </value> </item>
+ </enum>
+
+ <struct name="DeviceInfo">
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD16" name="type" altenum="DeviceType" />
+ <field type="DeviceId" name="attachment" altenum="Device" />
+ <field type="CARD16" name="num_classes" />
+ <field type="CARD16" name="name_len" />
+ <field type="BOOL" name="enabled" />
+ <pad bytes="1" />
+
+ <list type="char" name="name">
+ <!-- name_len: Length of the name in bytes not including padding.
+ name: The device's name. padded to a multiple of 4 bytes.
+
+ real len = ((name_len + 3) / 4 ) * 4
+ -->
+ <!-- XXX: simplify? -->
+ <op op="*">
+ <op op="/">
+ <op op="+">
+ <fieldref>name_len</fieldref>
+ <value>3</value>
+ </op>
+ <value>4</value>
+ </op>
+ <value>4</value>
+ </op>
+ </list>
+
+ <list type="AnyDeviceClass" name="fixme_classes">
+ <op op="*">
+ <fieldref>num_classes</fieldref>
+ <value>0</value>
+ </op>
+ </list>
+ <!--
+ <list type="DeviceClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
+ -->
+ </struct>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="QueryDevice" opcode="48">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_devices" />
+ <pad bytes="22" />
+
+ <list type="DeviceInfo" name="fixme_devices">
+ <op op="*">
+ <fieldref>num_devices</fieldref>
+ <value>0</value>
+ </op>
+ </list>
+ <!--
+ <list type="DeviceInfo" name="devices">
+ <fieldref>num_devices</fieldref>
+ </list>
+ -->
+ </reply>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="SetFocus" opcode="49">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="GetFocus" opcode="50">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="WINDOW" name="window" />
+ <pad bytes="20" />
+ </reply>
+ </request>
+
+
+ <enum name="GrabMode">
+ <item name="Sync" />
+ <item name="Async" />
+ </enum>
+
+ <enum name="GrabMode22">
+ <item name="Sync" />
+ <item name="Async" />
+ <item name="Touch" />
+ </enum>
+
+ <enum name="GrabOwner">
+ <!-- XXX: couldn't find any reference/exmaple in the spec, libXi or
+ xserver, but it should be right for "owner_events" fields
+ see (Passive)GrabDevice
+ -->
+ <item name="NoOwner" /> <!-- False -->
+ <item name="Owner" /> <!-- True -->
+ </enum>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="GrabDevice" opcode="51">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="CURSOR" name="cursor" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD8" name="mode" enum="GrabMode" />
+ <field type="CARD8" name="paired_device_mode" enum="GrabMode" />
+ <field type="BOOL" name="owner_events" enum="GrabOwner" />
+ <pad bytes="1" />
+ <field type="CARD16" name="mask_len" />
+
+ <list type="char" name="mask">
+ <op op="*">
+ <fieldref>mask_len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
+
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" enum="GrabStatus" />
+ <pad bytes="23" />
+ </reply>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="UngrabDevice" opcode="52">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+
+ <enum name="EventMode">
+ <item name="AsyncDevice" />
+ <item name="SyncDevice" />
+ <item name="ReplayDevice" />
+ <item name="AsyncPairedDevice" />
+ <item name="AsyncPair" />
+ <item name="SyncPair" />
+ <item name="AcceptTouch" />
+ <item name="RejectTouch" />
+ </enum>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="AllowEvents" opcode="53">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD8" name="mode" enum="EventMode" />
+ <pad bytes="1" />
+ <field type="CARD32" name="touchid" />
+ <field type="WINDOW" name="window" />
+ </request>
+
+
+ <enum name="GrabStatus">
+ <item name="Success" />
+ <item name="AlreadyGrabbed" />
+ <item name="InvalidTime" />
+ <item name="NotViewable" />
+ <item name="Frozen" />
+ </enum>
+
+ <enum name="GrabType">
+ <item name="Button" />
+ <item name="Keycode" />
+ <item name="Enter" />
+ <item name="FocusIn" />
+ <item name="TouchBegin" />
+ </enum>
+
+ <struct name="GrabModifier">
+ <field type="CARD32" name="modifiers" altenum="Modifier" />
+ <field type="CARD8" name="status" enum="GrabStatus" />
+ <!-- FIXME: Is GrabStatus correct? Same as in GrabDevice/reply? -->
+ <pad bytes="3" />
+ </struct>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="PassiveGrabDevice" opcode="54">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="WINDOW" name="window" />
+ <field type="CURSOR" name="cursor" />
+ <field type="CARD32" name="detail" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD16" name="num_modifiers" />
+ <field type="CARD16" name="mask_len" />
+ <field type="CARD8" name="grab_type" enum="GrabType" />
+ <field type="CARD8" name="grab_mode" enum="GrabMode22" />
+ <!-- XXX: paired_device_mode: the spec doesn't say so, but the code
+ does. This could be of enum="GrabMode22" too -->
+ <field type="CARD8" name="paired_device_mode" enum="GrabMode" />
+ <field type="BOOL" name="owner_events" enum="GrabOwner" />
+ <pad bytes="2" />
+
+ <list type="char" name="mask">
+ <op op="*">
+ <fieldref>mask_len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
+
+ <list type="CARD32" name="modifiers">
+ <fieldref>num_modifiers</fieldref>
+ </list>
+
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_modifiers" />
+ <pad bytes="22" />
+
+ <list type="GrabModifier" name="modifiers">
+ <fieldref>num_modifiers</fieldref>
+ </list>
+ </reply>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="PassiveUngrabDevice" opcode="55">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+ <field type="CARD32" name="detail" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD16" name="num_modifiers" />
+ <field type="CARD8" name="grab_type" enum="GrabType" />
+ <pad bytes="3" />
+
+ <list type="CARD32" name="modifiers">
+ <fieldref>num_modifiers</fieldref>
+ </list>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="ListProperties" opcode="56">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_properties" />
+ <pad bytes="22" />
+
+ <list type="ATOM" name="properties">
+ <fieldref>num_properties</fieldref>
+ </list>
+ </reply>
+ </request>
+
+
+ <enum name="PropertyFormat">
+ <item name="data8"> <bit>3</bit> </item>
+ <item name="data16"> <bit>4</bit> </item>
+ <item name="data32"> <bit>5</bit> </item>
+ </enum>
+
+ <enum name="PropertyMode">
+ <item name="Replace" />
+ <item name="Prepand" />
+ <item name="Append" />
+ </enum>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="ChangeProperty" opcode="57">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD8" name="mode" enum="PropertyMode" />
+ <field type="CARD8" name="format" enum="PropertyFormat" />
+ <field type="ATOM" name="property" />
+ <field type="ATOM" name="type" />
+ <field type="CARD32" name="num_items" />
+
+ <!-- XXX: xproto:ChangeProperty is much more simple -->
+ <switch name="data">
+ <fieldref>format</fieldref>
+
+ <bitcase>
+ <enumref ref="PropertyFormat">data8</enumref>
+
+ <list type="CARD8" name="data8">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+
+ <bitcase>
+ <enumref ref="PropertyFormat">data16</enumref>
+
+ <list type="CARD16" name="data16">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+
+ <bitcase>
+ <enumref ref="PropertyFormat">data32</enumref>
+
+ <list type="CARD32" name="data32">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ </switch>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="DeleteProperty" opcode="58">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <pad bytes="2" />
+ <field type="ATOM" name="property" />
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="GetProperty" opcode="59">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="CARD8" name="delete" />
+ <pad bytes="1" />
+ <field type="ATOM" name="property" />
+ <field type="ATOM" name="type" />
+ <field type="CARD32" name="offset" />
+ <field type="CARD32" name="len" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="ATOM" name="type" />
+ <field type="CARD32" name="bytes_after" />
+ <field type="CARD32" name="num_items" />
+ <field type="CARD8" name="format" enum="PropertyFormat" />
+ <pad bytes="11" />
+
+ <!-- XXX: xproto:ChangeProperty is much more simple -->
+ <switch name="data">
+ <fieldref>format</fieldref>
+
+ <bitcase>
+ <enumref ref="PropertyFormat">data8</enumref>
+
+ <list type="CARD8" name="data8">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+
+ <bitcase>
+ <enumref ref="PropertyFormat">data16</enumref>
+
+ <list type="CARD16" name="data16">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+
+ <bitcase>
+ <enumref ref="PropertyFormat">data32</enumref>
+
+ <list type="CARD32" name="data32">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ </switch>
+ </reply>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <request name="GetSelectedEvents" opcode="60">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <field type="WINDOW" name="window" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_masks" />
+ <pad bytes="22" />
+
+ <list type="EventMaskType" name="masks">
+ <fieldref>num_masks</fieldref>
+ </list>
+ </reply>
+ </request>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
+ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
+ ⋅⋅⋅ Events ⋅⋅⋅
+ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅
+ ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+
+ <struct name="GenericEvent">
+ <!-- generic event fields -->
+ <field type="CARD8" name="type" />
+ <field type="CARD8" name="extension" />
+ <field type="CARD16" name="sequenceNumber" />
+ <field type="CARD32" name="length" />
+ <field type="CARD16" name="evtype" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ </struct>
+
+ <!-- FIXME: This enum was introduced, cause the normal event tag doesn't
+ work for generic events/XI2 events and as we can't use this tag,
+ we don't get defines for the opcodes.
+ It'll be removed, when this issue is fixed. -->
+ <enum name="Event">
+ <item name="DeviceChanged"> <value> 1 </value> </item>
+ <item name="KeyPress"> <value> 2 </value> </item>
+ <item name="KeyRelease"> <value> 3 </value> </item>
+ <item name="ButtonPress"> <value> 4 </value> </item>
+ <item name="ButtonRelease"> <value> 5 </value> </item>
+ <item name="Motion"> <value> 6 </value> </item>
+ <item name="Enter"> <value> 7 </value> </item>
+ <item name="Leave"> <value> 8 </value> </item>
+ <item name="FocusIn"> <value> 9 </value> </item>
+ <item name="FocusOut"> <value> 10 </value> </item>
+ <item name="HierarchyChanged"> <value> 11 </value> </item>
+ <item name="PropertyEvent"> <value> 12 </value> </item>
+ <item name="RawKeyPress"> <value> 13 </value> </item>
+ <item name="RawKeyRelease"> <value> 14 </value> </item>
+ <item name="RawButtonPress"> <value> 15 </value> </item>
+ <item name="RawButtonRelease"> <value> 16 </value> </item>
+ <item name="RawMotion"> <value> 17 </value> </item>
+ <!-- XI 2.2 -->
+ <item name="TouchBegin"> <value> 18 </value> </item>
+ <item name="TouchUpdate"> <value> 19 </value> </item>
+ <item name="TouchEnd"> <value> 20 </value> </item>
+ <item name="TouchOwnership"> <value> 21 </value> </item>
+ <item name="RawTouchBegin"> <value> 22 </value> </item>
+ <item name="RawTouchUpdate"> <value> 23 </value> </item>
+ <item name="RawTouchEnd"> <value> 24 </value> </item>
+ </enum>
+
+ <enum name="DeviceChangedReason">
+ <item name="SlaveSwitch"> <value> 1 </value> </item>
+ <item name="DeviceChange"> <value> 2 </value> </item>
+ </enum>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <event name="DeviceChanged" number="1"> -->
+ <struct name="DeviceChangedEvent">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- generic event fields -->
+ <field type="CARD8" name="type" />
+ <field type="CARD8" name="extension" />
+ <field type="CARD16" name="sequenceNumber" />
+ <field type="CARD32" name="length" />
+ <field type="CARD16" name="evtype" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- specific event fields -->
+ <field type="CARD16" name="num_classes" />
+ <field type="DeviceId" name="source_id" altenum="Device" />
+ <field type="CARD8" name="reason" enum="DeviceChangedReason" />
+ <pad bytes="11" />
+ <!-- 32 byte boundary -->
+ <pad bytes="2" />
+
+ <list type="AnyDeviceClass" name="fixme_classes">
+ <op op="*">
+ <fieldref>num_classes</fieldref>
+ <value>0</value>
+ </op>
+ </list>
+ <!--
+ <list type="DeviceClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
+ -->
+ <!-- </event> -->
+ </struct>
+
+
+ <enum name="DeviceFlags">
+ <!-- key events only -->
+ <item name="KeyRepeat"> <bit> 16 </bit> </item>
+
+ <!-- pointer events only -->
+ <item name="PointerEmulated"> <bit> 16 </bit> </item>
+
+ <!-- touch events only -->
+ <item name="TouchPendingEnd"> <bit> 16 </bit> </item>
+ <item name="TouchEmulatingPointer"> <bit> 17 </bit> </item>
+ </enum>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <event name="KeyPress" number="2"> -->
+ <struct name="KeyPressEvent">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- generic event fields -->
+ <field type="CARD8" name="type" />
+ <field type="CARD8" name="extension" />
+ <field type="CARD16" name="sequenceNumber" />
+ <field type="CARD32" name="length" />
+ <field type="CARD16" name="evtype" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- specific event fields -->
+ <field type="CARD32" name="detail" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="WINDOW" name="child" />
+ <!-- 32 byte boundary -->
+ <pad bytes="2" />
+ <field type="FP1616" name="root_x" />
+ <field type="FP1616" name="root_y" />
+ <field type="FP1616" name="event_x" />
+ <field type="FP1616" name="event_y" />
+ <field type="CARD16" name="buttons_len" />
+ <field type="CARD16" name="valuators_len" />
+ <field type="DeviceId" name="source_id" altenum="Device" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" mask="DeviceFlags" />
+ <field type="Modifier" name="modifier" />
+ <field type="Group" name="group" />
+
+ <list type="char" name="button_mask">
+ <op op="*">
+ <fieldref>buttons_len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
+
+ <list type="char" name="valuator_mask">
+ <op op="*">
+ <fieldref>valuators_len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
+
+ <list type="FP3232" name="fixme_axisvalues">
+ <op op="*">
+ <fieldref>valuators_len</fieldref>
+ <value>0</value>
+ </op>
+ </list>
+ <!--
+ <list type="FP3232" name="axisvalues">
+ <popcount>
+ <fieldref>valuator_mask</fieldref>
+ </popcount>
+ </list>
+ -->
+ <!-- </event> -->
+ </struct>
+
+
+ <!-- ⋅⋅⋅ DeviceEvent(s) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <eventcopy name="KeyRelease" number="3" ref="KeyPress" /> -->
+ <typedef oldname="KeyPressEvent" newname="KeyReleaseEvent" />
+ <!-- <eventcopy name="ButtonPress" number="4" ref="KeyPress" /> -->
+ <typedef oldname="KeyPressEvent" newname="ButtonPressEvent" />
+ <!-- <eventcopy name="ButtonRelease" number="5" ref="KeyPress" /> -->
+ <typedef oldname="KeyPressEvent" newname="ButtonReleaseEvent" />
+ <!-- <eventcopy name="Motion" number="6" ref="KeyPress" /> -->
+ <typedef oldname="KeyPressEvent" newname="MotionEvent" />
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+
+
+ <enum name="NotifyMode">
+ <item name="Normal" />
+ <item name="Grab" />
+ <item name="Ungrab" />
+ <item name="WhileGrabbed" />
+ <item name="PassiveGrab" />
+ <item name="PassiveUngrab" />
+ </enum>
+
+ <enum name="NotifyDetail">
+ <item name="Ancestor" />
+ <item name="Virtual" />
+ <item name="Inferior" />
+ <item name="Nonlinear" />
+ <item name="NonlinearVirtual" />
+ <item name="Pointer" />
+ <item name="PointerRoot" />
+ <item name="DetailNone" />
+ </enum>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <event name="Enter" number="7"> -->
+ <struct name="EnterEvent">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- generic event fields -->
+ <field type="CARD8" name="type" />
+ <field type="CARD8" name="extension" />
+ <field type="CARD16" name="sequenceNumber" />
+ <field type="CARD32" name="length" />
+ <field type="CARD16" name="evtype" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- specific event fields -->
+ <field type="DeviceId" name="source_id" altenum="Device" />
+ <field type="CARD8" name="mode" enum="NotifyMode" />
+ <field type="CARD8" name="detail" enum="NotifyDetail" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="WINDOW" name="child" />
+ <!-- 32 byte boundary -->
+ <pad bytes="2" />
+ <field type="FP1616" name="root_x" />
+ <field type="FP1616" name="root_y" />
+ <field type="FP1616" name="event_x" />
+ <field type="FP1616" name="event_y" />
+ <field type="CARD8" name="same_screen" />
+ <field type="CARD8" name="focus" />
+ <field type="CARD16" name="buttons_len" />
+ <field type="Modifier" name="modifier" />
+ <field type="Group" name="group" />
+
+ <list type="char" name="buttons"> <!-- XXX: button_mask? -->
+ <op op="*">
+ <fieldref>buttons_len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
+ <!-- </event> -->
+ </struct>
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <eventcopy name="Leave" number="8" ref="Enter" /> -->
+ <typedef oldname="EnterEvent" newname="LeaveEvent" />
+ <!-- <eventcopy name="FocusIn" number="9" ref="Enter" /> -->
+ <typedef oldname="EnterEvent" newname="FocusInEvent" />
+ <!-- <eventcopy name="FocusOut" number="10" ref="Enter" /> -->
+ <typedef oldname="EnterEvent" newname="FocusOutEvent" />
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+
+
+ <enum name="HierarchyChangedMask">
+ <item name="MasterAdded"> <bit> 0 </bit> </item>
+ <item name="MasterRemoved"> <bit> 1 </bit> </item>
+ <item name="SlaveAdded"> <bit> 2 </bit> </item>
+ <item name="SlaveRemoved"> <bit> 3 </bit> </item>
+ <item name="SlaveAttached"> <bit> 4 </bit> </item>
+ <item name="SlaveDetached"> <bit> 5 </bit> </item>
+ <item name="DeviceEnabled"> <bit> 6 </bit> </item>
+ <item name="DeviceDisabled"> <bit> 7 </bit> </item>
+ </enum>
+
+ <struct name="HierarchyChanged">
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="DeviceId" name="attachment" altenum="Device" />
+ <field type="CARD8" name="type" enum="DeviceType"/>
+ <field type="BOOL" name="enabled" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" mask="HierarchyChangedMask" />
+ </struct>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <event name="HierarchyChanged" number="11"> -->
+ <struct name="HierarchyChangedEvent">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- generic event fields -->
+ <field type="CARD8" name="type" />
+ <field type="CARD8" name="extension" />
+ <field type="CARD16" name="sequenceNumber" />
+ <field type="CARD32" name="length" />
+ <field type="CARD16" name="evtype" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- specific event fields -->
+ <field type="CARD32" name="flags" mask="HierarchyChangedMask" />
+ <field type="CARD16" name="num_changes" />
+ <pad bytes="10" />
+ <!-- 32 byte boundary -->
+ <pad bytes="2" />
+
+ <list type="HierarchyChanged" name="changes">
+ <fieldref>num_changes</fieldref>
+ </list>
+ <!-- </event> -->
+ </struct>
+
+
+ <enum name="PropertyState">
+ <item name="Deleted" />
+ <item name="Created" />
+ <item name="Modified" />
+ </enum>
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <event name="PropertyEvent" number="12"> -->
+ <struct name="PropertyEventEvent">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- generic event fields -->
+ <field type="CARD8" name="type" />
+ <field type="CARD8" name="extension" />
+ <field type="CARD16" name="sequenceNumber" />
+ <field type="CARD32" name="length" />
+ <field type="CARD16" name="evtype" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- specific event fields -->
+ <field type="ATOM" name="property" />
+ <field type="CARD8" name="what" enum="PropertyState" />
+ <pad bytes="11" />
+ <!-- </event> -->
+ </struct>
+
+
+ <!-- ⋅⋅⋅ RawEvent (prototype) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <event name="RawKeyPress" number="13"> -->
+ <struct name="RawKeyPressEvent">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- generic event fields -->
+ <field type="CARD8" name="type" />
+ <field type="CARD8" name="extension" />
+ <field type="CARD16" name="sequenceNumber" />
+ <field type="CARD32" name="length" />
+ <field type="CARD16" name="evtype" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- specific event fields -->
+ <field type="CARD32" name="detail" />
+ <field type="DeviceId" name="source_id" />
+ <field type="CARD16" name="valuators_len" />
+ <field type="CARD32" name="flags" mask="DeviceFlags"/>
+ <pad bytes="4" />
+ <!-- 32 byte boundary -->
+ <pad bytes="2" />
+
+ <list type="char" name="valuator_mask">
+ <op op="*">
+ <fieldref>valuators_len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
+
+ <list type="FP3232" name="fixme_axisvalues_axisvaluesraw">
+ <op op="*">
+ <fieldref>valuators_len</fieldref>
+ <value>0</value>
+ </op>
+ </list>
+ <!--
+ <list type="FP3232" name="axisvalues">
+ <popcount>
+ <fieldref>valuator_mask</fieldref>
+ </popcount>
+ </list>
+
+ <list type="FP3232" name="axisvalues_raw">
+ <popcount>
+ <fieldref>valuator_mask</fieldref>
+ </popcount>
+ </list>
+ -->
+ <!-- </event> -->
+ </struct>
+
+
+ <!-- ⋅⋅⋅ RawEvent(s) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <eventcopy name="RawKeyRelease" number="14" ref="RawKeyPress" /> -->
+ <typedef oldname="RawKeyPressEvent" newname="RawKeyReleaseEvent" />
+ <!-- <eventcopy name="RawButtonPress" number="15" ref="RawKeyPress" /> -->
+ <typedef oldname="RawKeyPressEvent" newname="RawButtonPressEvent" />
+ <!-- <eventcopy name="RawButtonRelease" number="16" ref="RawKeyPress" /> -->
+ <typedef oldname="RawKeyPressEvent" newname="RawButtonReleaseEvent" />
+ <!-- <eventcopy name="RawMotion" number="17" ref="RawKeyPress" /> -->
+ <typedef oldname="RawKeyPressEvent" newname="RawMotionEvent" />
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+
+
+ <!-- ⋅⋅⋅ DeviceEvent(s) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <eventcopy name="TouchBegin" number="18" ref="KeyPress" /> -->
+ <typedef oldname="KeyPressEvent" newname="TouchBeginEvent" />
+ <!-- <eventcopy name="TouchUpdate" number="19" ref="KeyPress" /> -->
+ <typedef oldname="KeyPressEvent" newname="TouchUpdateEvent" />
+ <!-- <eventcopy name="TouchEnd" number="20" ref="KeyPress" /> -->
+ <typedef oldname="KeyPressEvent" newname="TouchEndEvent" />
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+
+
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <event name="TouchOwnership" number="21"> -->
+ <struct name="TouchOwnershipEvent">
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- generic event fields -->
+ <field type="CARD8" name="type" />
+ <field type="CARD8" name="extension" />
+ <field type="CARD16" name="sequenceNumber" />
+ <field type="CARD32" name="length" />
+ <field type="CARD16" name="evtype" />
+ <field type="DeviceId" name="device_id" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- specific event fields -->
+ <field type="CARD32" name="touchid" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="WINDOW" name="child" />
+ <field type="DeviceId" name="source_id" altenum="Device" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" />
+ <pad bytes="8" />
+ <!-- </event> -->
+ </struct>
+
+
+ <!-- ⋅⋅⋅ RawEvent(s) ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+ <!-- <eventcopy name="RawTouchBegin" number="22" ref="RawKeyPress" /> -->
+ <typedef oldname="RawKeyPressEvent" newname="RawTouchBeginEvent" />
+ <!-- <eventcopy name="RawTouchUpdate" number="23" ref="RawKeyPress" /> -->
+ <typedef oldname="RawKeyPressEvent" newname="RawTouchUpdateEvent" />
+ <!-- <eventcopy name="RawTouchEnd" number="24" ref="RawKeyPress" /> -->
+ <typedef oldname="RawKeyPressEvent" newname="RawTouchEndEvent" />
+ <!-- ⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ -->
+
+
+ <!-- XXX: only "Device" is listed in the spec, took them from xinput.xml -->
+ <error name="Device" number="0" />
+ <error name="Event" number="1" />
+ <error name="Mode" number="2" />
+ <error name="DeviceBusy" number="3" />
+ <error name="Class" number="4" />
+
+</xcb>
--
1.8.0.1
More information about the Xcb
mailing list