[Xcb-commit] xcb/proto: 15 commits - src
Peter Harris
peterh at kemper.freedesktop.org
Tue Aug 20 06:36:43 PDT 2013
src/xinput.xml | 2545 +++++++++++++++++++++++++++++++++++++++++----------------
src/xkb.xml | 106 +-
src/xproto.xml | 18
3 files changed, 1960 insertions(+), 709 deletions(-)
New commits:
commit bd7708ac1037e647b094fa7440ebb6171b9bc75f
Author: Ran Benita <ran234 at gmail.com>
Date: Mon Aug 12 12:18:59 2013 +0300
xkb: Add missing LedClass and BellClass enum values
The protocol encoding says:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Common_Types
KB_LEDCLASSRESULT
0 KbdFeedbackClass
4 LedFeedbackClass
KB_LEDCLASSSPEC
Encoding same as KB_LEDCLASSRESULT, with the addition of:
#x0300 XkbDfltXIClass
#x0500 XkbAllXIClasses
KB_BELLCLASSRESULT
0 KbdFeedbackClass
5 BellFeedbackClass
KB_BELLCLASSSPEC
Encoding same as KB_BELLCLASSRESULT, with the addition of:
#x0300 XkbDfltXIClass
Note that the spec says something slightly different in another section:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Common_Types
KB_LEDCLASSSPEC { KbdFeedbackClass , LedFeedbackClass , DfltXIClass , AllXIClasses , XINone }
KB_BELLCLASSSPEC { KbdFeedbackClass , BellFeedbackClass , DfltXIClass , AllXIClasses }}
From what I could gather, the encoding is the correct one (but I'm not
sure).
Signed-off-by: Ran Benita <ran234 at gmail.com>
Reviewed-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index a5f808e..b702cad 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -161,8 +161,10 @@ authorization from the authors.
</enum>
<enum name="LedClass">
- <item name="DfltXIClass"> <value>768</value> </item> <!--0x300-->
- <item name="AllXIClasses"> <value>1280</value> </item> <!--0x500-->
+ <item name="KbdFeedbackClass"> <value>0</value> </item>
+ <item name="LedFeedbackClass"> <value>4</value> </item>
+ <item name="DfltXIClass"> <value>768</value> </item> <!--0x300-->
+ <item name="AllXIClasses"> <value>1280</value> </item> <!--0x500-->
</enum>
<typedef oldname="CARD16" newname="LedClassSpec" />
@@ -172,7 +174,9 @@ authorization from the authors.
</enum>
<enum name="BellClass">
- <item name="DfltXIClass"> <value>768</value> </item> <!--0x300-->
+ <item name="KbdFeedbackClass"> <value>0</value> </item>
+ <item name="BellFeedbackClass"> <value>5</value> </item>
+ <item name="DfltXIClass"> <value>768</value> </item> <!--0x300-->
</enum>
<typedef oldname="CARD16" newname="BellClassSpec" />
commit e56a0599d631788d835c977221b40f131c07de36
Author: Ran Benita <ran234 at gmail.com>
Date: Mon Aug 12 10:55:02 2013 +0300
xkb: Add missing 'supported' field to GetNamedIndicator reply
The protocol encoding has it:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests
1 CARD8 opcode
1 15 xkb-opcode
[...]
1 1 Reply
1 CARD8 deviceID
2 CARD16 sequence number
[...]
4 SETofKB_BOOLCTRL map.ctrls
1 BOOL supported
3 unused
And xkbGetNamedIndicatorReply in XKBproto.h also.
Finally, the server does send it, though it's always TRUE.
Signed-off-by: Ran Benita <ran234 at gmail.com>
Reviewed-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index b4b87af..a5f808e 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -1620,6 +1620,7 @@ authorization from the authors.
<field name="map_realMods" type="CARD8" mask="ModMask" />
<field name="map_vmod" type="CARD16" mask="VMod" />
<field name="map_ctrls" type="CARD32" mask="BoolCtrl" />
+ <field name="supported" type="BOOL" />
<pad bytes="3" />
</reply>
</request>
commit 2cd2d5f0c738d9f058988b43fcbd73344570b34a
Author: Ran Benita <ran234 at gmail.com>
Date: Tue Aug 6 11:33:45 2013 +0300
xkb: Unify Overlay1Behavior and Overlay2Behavior
These two structs are used by the server in the exact same way, and are
handled together (see xkb/xkbPrKeyEv.c, XkbKB_Overlay{1,2} handling).
There is no need to use different (and for some reason slightly
different) types for them.
Reviewed-by: Daniel Martin <consume.noise at gmail.com>
Signed-off-by: Ran Benita <ran234 at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index 8945445..b4b87af 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -467,32 +467,26 @@ authorization from the authors.
<field name="group" type="CARD8" />
</struct>
- <struct name="Overlay1Behavior">
+ <struct name="OverlayBehavior">
<field name="type" type="CARD8" />
<field name="key" type="KEYCODE" />
</struct>
- <struct name="Overlay2Behavior">
- <field name="type" type="CARD8" />
- <field name="key" type="CARD8" />
- </struct>
-
<typedef oldname="LockBehavior" newname="PermamentLockBehavior" />
<typedef oldname="RadioGroupBehavior" newname="PermamentRadioGroupBehavior" />
- <typedef oldname="Overlay1Behavior" newname="PermamentOverlay1Behavior" />
- <typedef oldname="Overlay2Behavior" newname="PermamentOverlay2Behavior" />
+ <typedef oldname="OverlayBehavior" newname="PermamentOverlayBehavior" />
<union name="Behavior">
<field name="common" type="CommonBehavior" />
<field name="default" type="DefaultBehavior" />
<field name="lock" type="LockBehavior" />
<field name="radioGroup" type="RadioGroupBehavior" />
- <field name="overlay1" type="Overlay1Behavior" />
- <field name="overlay2" type="Overlay2Behavior" />
+ <field name="overlay1" type="OverlayBehavior" />
+ <field name="overlay2" type="OverlayBehavior" />
<field name="permamentLock" type="PermamentLockBehavior" />
<field name="permamentRadioGroup" type="PermamentRadioGroupBehavior" />
- <field name="permamentOverlay1" type="PermamentOverlay1Behavior" />
- <field name="permamentOverlay2" type="PermamentOverlay2Behavior" />
+ <field name="permamentOverlay1" type="PermamentOverlayBehavior" />
+ <field name="permamentOverlay2" type="PermamentOverlayBehavior" />
<field name="type" type="CARD8" />
</union>
commit e8980ab471fe30ac0d6c6c2e712a9ed400abe75e
Author: Ran Benita <ran234 at gmail.com>
Date: Sun Aug 4 13:35:02 2013 +0300
xkb: Change DfltBtnAbsolute to the value used by the server
The spec says:
#x02 XkbSA_DfltBtnAbsolute
But /usr/include/X11/extensions/XKB.h has:
#define XkbSA_DfltBtnAbsolute (1L << 2)
which is what the server sends.
Note: the XKB spec was changed by Daniel Martin to match the Xlib value.
See kbproto commit db07706cb268d5fe1bc38ef5c0a9f49309068b2c.
Reviewed-by: Daniel Martin <consume.noise at gmail.com>
Signed-off-by: Ran Benita <ran234 at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index 6de634e..8945445 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -874,7 +874,8 @@ authorization from the authors.
</struct>
<enum name="SASetPtrDfltFlag">
- <item name="DfltBtnAbsolute"> <bit>1</bit> </item>
+ <!-- The spec says 0x02 but Xlib uses 0x04. -->
+ <item name="DfltBtnAbsolute"> <bit>2</bit> </item>
<item name="AffectDfltButton"> <bit>0</bit> </item>
</enum>
commit f4321385e01a5a7e9bf5dfa697b54b103dc05a81
Author: Ran Benita <ran234 at gmail.com>
Date: Sun Aug 4 13:33:30 2013 +0300
xkb: Fix key type map entry field order
In fact, unlike the deleted comment says, both Xlib and the server use
the order as specified in the protocol spec:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests
(Search for KB_KTMAPENTRY).
Also see struct xkbKTMapEntryWireDesc in
/usr/include/X11/extensions/XKBproto.h
Reviewed-by: Peter Harris <pharris at opentext.com>
Reviewed-by: Daniel Martin <consume.noise at gmail.com>
Signed-off-by: Ran Benita <ran234 at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index 15b3368..6de634e 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -410,12 +410,8 @@ authorization from the authors.
<struct name="KTMapEntry">
<field name="active" type="BOOL" />
- <!-- Xlib uses a different arrangement of fields
<field name="mods_mask" type="CARD8" mask="ModMask" />
<field name="level" type="CARD8" />
- -->
- <field name="level" type="CARD8" />
- <field name="mods_mask" type="CARD8" mask="ModMask" />
<field name="mods_mods" type="CARD8" mask="ModMask" />
<field name="mods_vmods" type="CARD16" mask="VMod" />
<pad bytes="2" />
commit 37d0f55392d68d0a05dcf5d793d729e49108f1b7
Author: Ran Benita <ran234 at gmail.com>
Date: Sun Aug 4 13:31:29 2013 +0300
xkb: Work around alignment problems in GetNames and GetMap replies
The basic situation is this: a list of CARD8/CARD16s followed by a list
of CARD16/CARD32s. In the current code, the second list is aligned to
1/2 bytes according the size of the first list. However, in some cases
the second list needs to be aligned to 4 bytes per the xkbproto spec:
http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests
XkbGetMap reply (xkb-opcode 8):
[...]
a LISTofCARD8 actsRtrn.count
p unused,p=pad(a)
8A LISTofKB_ACTION actsRtrn.acts
4B LISTofKB_SETBEHAVIOR behaviorsRtrn
v LISTofSETofKEYMASK vmodsRtrn
p unused, p=pad(v)
2E LISTofKB_SETEXPLICIT explicitRtrn
p unused,p=pad(2E)
2M LISTofKB_KEYMODMAP modmapRtrn
p unused, p=pad(2M)
[...]
XkbGetNames reply (xkb-opcode 17):
[...]
l LISTofCARD8 nLevelsPerType, sum of all elements=L
p unused, p=pad(l)
[...]
The server and Xlib handle this with calls to XkbPaddedSize(), which is
a good way to see where the extra padding is needed.
Signed-off-by: Ran Benita <ran234 at gmail.com>
Reviewed-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xkb.xml b/src/xkb.xml
index 0e263c4..15b3368 100644
--- a/src/xkb.xml
+++ b/src/xkb.xml
@@ -1350,6 +1350,20 @@ authorization from the authors.
<list name="acts_rtrn_count" type="CARD8">
<fieldref>nKeyActions</fieldref>
</list>
+ <list type="CARD8" name="alignment_pad">
+ <op op="-">
+ <op op="&">
+ <op op="+">
+ <fieldref>nKeyActions</fieldref>
+ <value>3</value>
+ </op>
+ <unop op="~">
+ <value>3</value>
+ </unop>
+ </op>
+ <fieldref>nKeyActions</fieldref>
+ </op>
+ </list>
<list name="acts_rtrn_acts" type="Action">
<fieldref>totalActions</fieldref>
</list>
@@ -1365,18 +1379,60 @@ authorization from the authors.
<list name="vmods_rtrn" type="CARD8" mask="ModMask">
<popcount><fieldref>virtualMods</fieldref></popcount>
</list>
+ <list type="CARD8" name="alignment_pad2">
+ <op op="-">
+ <op op="&">
+ <op op="+">
+ <popcount><fieldref>virtualMods</fieldref></popcount>
+ <value>3</value>
+ </op>
+ <unop op="~">
+ <value>3</value>
+ </unop>
+ </op>
+ <popcount><fieldref>virtualMods</fieldref></popcount>
+ </op>
+ </list>
</bitcase>
<bitcase>
<enumref ref="MapPart">ExplicitComponents</enumref>
<list name="explicit_rtrn" type="SetExplicit">
<fieldref>totalKeyExplicit</fieldref>
</list>
+ <list type="CARD16" name="alignment_pad3">
+ <op op="-">
+ <op op="&">
+ <op op="+">
+ <fieldref>totalKeyExplicit</fieldref>
+ <value>1</value>
+ </op>
+ <unop op="~">
+ <value>1</value>
+ </unop>
+ </op>
+ <fieldref>totalKeyExplicit</fieldref>
+ </op>
+ </list>
</bitcase>
<bitcase>
<enumref ref="MapPart">ModifierMap</enumref>
<list name="modmap_rtrn" type="KeyModMap">
<fieldref>totalModMapKeys</fieldref>
</list>
+ <list type="CARD16" name="alignment_pad4">
+ <op op="-">
+ <op op="&">
+ <op op="+">
+ <fieldref>totalModMapKeys</fieldref>
+ <value>1</value>
+ </op>
+ <unop op="~">
+ <value>1</value>
+ </unop>
+ </op>
+ <fieldref>totalModMapKeys</fieldref>
+ </op>
+ </list>
</bitcase>
<bitcase>
<enumref ref="MapPart">VirtualModMap</enumref>
@@ -1657,6 +1713,20 @@ authorization from the authors.
<fieldref>nKTLevels</fieldref> -->
<fieldref>nTypes</fieldref>
</list>
+ <list type="CARD8" name="alignment_pad">
+ <op op="-">
+ <op op="&">
+ <op op="+">
+ <fieldref>nTypes</fieldref>
+ <value>3</value>
+ </op>
+ <unop op="~">
+ <value>3</value>
+ </unop>
+ </op>
+ <fieldref>nTypes</fieldref>
+ </op>
+ </list>
<list name="ktLevelNames" type="ATOM">
<sumof ref="nLevelsPerType" />
</list>
commit 330bf32140890931fdc4e9f9ecafccd212568265
Author: Daniel Martin <consume.noise at gmail.com>
Date: Sat Jun 29 21:16:22 2013 +0200
xproto: Fix GContext error references in documentation
The name of the error is GContext, not GC.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-By: Ran Benita <ran234 at gmail.com>
diff --git a/src/xproto.xml b/src/xproto.xml
index bf4dcbf..c97919b 100644
--- a/src/xproto.xml
+++ b/src/xproto.xml
@@ -3404,7 +3404,7 @@ The number of characters in `string`.
<field name="string"><![CDATA[
The text to get text extents for.
]]></field>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
The specified graphics context does not exist.
]]></error>
<error type="Font"><![CDATA[
@@ -3953,7 +3953,7 @@ example.
<error type="Font"><![CDATA[
TODO: reasons?
]]></error>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
TODO: reasons?
]]></error>
<error type="Match"><![CDATA[
@@ -4012,7 +4012,7 @@ The X server could not allocate the requested resources (no memory?).
Destroys the specified `gc` and all associated storage.
]]></description>
<field name="gc"><![CDATA[The graphics context to destroy.]]></field>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
The specified graphics context does not exist.
]]></error>
</doc>
@@ -4073,7 +4073,7 @@ The height of the area to copy (in pixels).
<error type="Drawable"><![CDATA[
The specified `drawable` (Window or Pixmap) does not exist.
]]></error>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
The specified graphics context does not exist.
]]></error>
<error type="Match"><![CDATA[
@@ -4162,7 +4162,7 @@ An array of points.
<error type="Drawable"><![CDATA[
TODO: reasons?
]]></error>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
TODO: reasons?
]]></error>
<error type="Match"><![CDATA[
@@ -4216,7 +4216,7 @@ An array of `xcb_segment_t` structures.
<error type="Drawable"><![CDATA[
The specified `drawable` does not exist.
]]></error>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
The specified `gc` does not exist.
]]></error>
<error type="Match"><![CDATA[
@@ -4294,7 +4294,7 @@ The rectangles to fill.
<error type="Drawable"><![CDATA[
The specified `drawable` (Window or Pixmap) does not exist.
]]></error>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
The specified graphics context does not exist.
]]></error>
<error type="Match"><![CDATA[
@@ -4417,7 +4417,7 @@ background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
<error type="Drawable"><![CDATA[
The specified `drawable` (Window or Pixmap) does not exist.
]]></error>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
The specified graphics context does not exist.
]]></error>
<error type="Match"><![CDATA[
@@ -4475,7 +4475,7 @@ background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask.
<error type="Drawable"><![CDATA[
The specified `drawable` (Window or Pixmap) does not exist.
]]></error>
- <error type="GC"><![CDATA[
+ <error type="GContext"><![CDATA[
The specified graphics context does not exist.
]]></error>
<error type="Match"><![CDATA[
commit fdac6ebb6fa88171459a814409dac402674aed1e
Author: Daniel Martin <consume.noise at gmail.com>
Date: Thu Feb 14 20:55:32 2013 +0100
xinput: Use BARRIER from xfixes
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index 464d2d9..cd1a397 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -34,6 +34,7 @@ authorization from the authors.
<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
major-version="2" minor-version="3">
+ <import>xfixes</import>
<import>xproto</import>
<!-- â
â
â
Types (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
@@ -51,10 +52,6 @@ authorization from the authors.
<field type="CARD32" name="frac" />
</struct>
- <!-- â
â
â
Types (v2.3) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
-
- <typedef oldname="CARD32" newname="Barrier" />
-
<!-- â
â
â
Requests (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<!-- GetExtensionVersion -->
@@ -1714,7 +1711,7 @@ authorization from the authors.
<struct name="BarrierReleasePointerInfo">
<field type="DeviceId" name="deviceid" />
<pad bytes="2" />
- <field type="Barrier" name="barrier" />
+ <field type="BARRIER" name="barrier" />
<field type="CARD32" name="eventid" />
</struct>
@@ -2183,7 +2180,7 @@ authorization from the authors.
<field type="CARD32" name="eventid" />
<field type="WINDOW" name="root" />
<field type="WINDOW" name="event" />
- <field type="Barrier" name="barrier" />
+ <field type="BARRIER" name="barrier" />
<!-- 32 byte boundary -->
<field type="CARD32" name="dtime" />
<field type="CARD32" name="flags" />
commit 37f4ea687f129679ca555f0644d4d0fafc8b9765
Author: Daniel Martin <consume.noise at gmail.com>
Date: Tue Jan 15 20:28:05 2013 +0100
xinput: Unlock uninterpreted lists
The 'uninterpreted_data' lists have been added to pad the structure at
runtime and thereby making lists of such structures iterable.
This is a temporary solution until it is possible to nest a <switch> in
a <struct> correctly.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index 3883b93..464d2d9 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -517,6 +517,12 @@ authorization from the authors.
<field type="CARD8" name="class_id" enum="FeedbackClass" />
<field type="CARD8" name="feedback_id" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="GetFeedbackControl" opcode="22">
@@ -526,7 +532,9 @@ authorization from the authors.
<pad bytes="1" />
<field type="CARD16" name="num_feedbacks" />
<pad bytes="22" />
- <!-- Uninterpreted: list (feedbacks) of FeedbackState structures -->
+ <list type="FeedbackState" name="feedbacks">
+ <fieldref>num_feedbacks</fieldref>
+ </list>
</reply>
</request>
@@ -596,13 +604,19 @@ authorization from the authors.
<field type="CARD8" name="class_id" enum="FeedbackClass" />
<field type="CARD8" name="feedback_id" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="ChangeFeedbackControl" opcode="23">
<field type="CARD32" name="mask" />
<field type="CARD8" name="device_id" />
<field type="CARD8" name="feedback_id" />
- <!-- Uninterpreted: field (feedback) of FeedbackCtl structure -->
+ <field type="FeedbackCtl" name="feedback" />
</request>
<!-- GetDeviceKeyMapping -->
@@ -741,6 +755,13 @@ authorization from the authors.
<field type="CARD8" name="class_id" enum="InputClass" />
<field type="CARD8" name="len" />
<field type="CARD8" name="num_items" />
+ <pad bytes="1" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="QueryDeviceState" opcode="30">
@@ -750,7 +771,9 @@ authorization from the authors.
<pad bytes="1" />
<field type="CARD8" name="num_classes" />
<pad bytes="23" />
- <!-- Uninterpreted: list (classes) of InputState structures -->
+ <list type="InputState" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
</reply>
</request>
@@ -867,6 +890,12 @@ authorization from the authors.
<struct name="DeviceState">
<field type="CARD16" name="control_id" enum="DeviceControl" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="GetDeviceControl" opcode="34">
@@ -877,7 +906,7 @@ authorization from the authors.
<pad bytes="1" />
<field type="CARD8" name="status" altenum="GrabStatus" />
<pad bytes="23" />
- <!-- Uninterpreted: field (control) of DeviceState structure -->
+ <field type="DeviceState" name="control" />
</reply>
</request>
@@ -934,13 +963,19 @@ authorization from the authors.
<struct name="DeviceCtl">
<field type="CARD16" name="control_id" enum="DeviceControl" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="ChangeDeviceControl" opcode="35">
<field type="CARD16" name="control_id" enum="DeviceControl" />
<field type="CARD8" name="device_id" />
<pad bytes="1" />
- <!-- Uninterpreted: field (control) of DeviceCtl structure -->
+ <field type="DeviceCtl" name="control" />
<reply>
<pad bytes="1" />
<field type="CARD8" name="status" altenum="GrabStatus" />
@@ -1184,11 +1219,22 @@ authorization from the authors.
<struct name="HierarchyChange">
<field type="CARD16" name="type" enum="HierarchyChangeType" />
<field type="CARD16" name="len" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <op op="*">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ <value>4</value>
+ </op>
+ </list>
</struct>
<request name="XIChangeHierarchy" opcode="43">
<field type="CARD8" name="num_changes" />
- <!-- Uninterpreted: list (changes) of HierarchyChange structures -->
+ <list type="HierarchyChange" name="changes">
+ <fieldref>num_changes</fieldref>
+ </list>
</request>
<!-- XISetClientPointer -->
@@ -1345,6 +1391,15 @@ authorization from the authors.
<field type="CARD16" name="len" />
<field type="DeviceId" name="sourceid" />
<pad bytes="2" />
+ <list type="CARD8" name="uninterpreted_data">
+ <op op="-">
+ <op op="*">
+ <fieldref>len</fieldref>
+ <value>4</value>
+ </op>
+ <value>8</value>
+ </op>
+ </list>
</struct>
<struct name="XIDeviceInfo">
@@ -1369,7 +1424,9 @@ authorization from the authors.
<value>4</value>
</op>
</list>
- <!-- Uninterpreted: list (classes) of DeviceClass structures -->
+ <list type="DeviceClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
</struct>
<request name="XIQueryDevice" opcode="48">
commit fae1976b58b5cad10f78dd1f49af8a881fbfa70f
Author: Daniel Martin <consume.noise at gmail.com>
Date: Tue Jan 15 20:17:13 2013 +0100
xinput: Add XI v2.3
Introduced with v2.3 has been Pointer Barrier support, including a new
request (XIBarrierReleasePointer) and 2 events (Barrier{Hit,Leave}).
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index cbb5e49..3883b93 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -33,7 +33,7 @@ authorization from the authors.
-->
<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
- major-version="2" minor-version="2">
+ major-version="2" minor-version="3">
<import>xproto</import>
<!-- â
â
â
Types (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
@@ -51,6 +51,10 @@ authorization from the authors.
<field type="CARD32" name="frac" />
</struct>
+ <!-- â
â
â
Types (v2.3) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <typedef oldname="CARD32" newname="Barrier" />
+
<!-- â
â
â
Requests (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<!-- GetExtensionVersion -->
@@ -1646,6 +1650,24 @@ authorization from the authors.
</reply>
</request>
+ <!-- â
â
â
Requests (v2.3) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <!-- XIBarrierReleasePointer -->
+
+ <struct name="BarrierReleasePointerInfo">
+ <field type="DeviceId" name="deviceid" />
+ <pad bytes="2" />
+ <field type="Barrier" name="barrier" />
+ <field type="CARD32" name="eventid" />
+ </struct>
+
+ <request name="XIBarrierReleasePointer" opcode="61">
+ <field type="CARD32" name="num_barriers" />
+ <list type="BarrierReleasePointerInfo" name="barriers">
+ <fieldref>num_barriers</fieldref>
+ </list>
+ </request>
+
<!-- â
â
â
Events (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<!-- Notes:
- A 'len' field in a v1++ structure is in bytes.
@@ -2095,6 +2117,29 @@ authorization from the authors.
<eventcopy name="RawTouchUpdate" number="23" ref="RawTouchBegin" />
<eventcopy name="RawTouchEnd" number="24" ref="RawTouchBegin" />
+ <!-- â
â
â
Events (v2.3) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <event name="BarrierHit" number="25" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="eventid" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="Barrier" name="barrier" />
+ <!-- 32 byte boundary -->
+ <field type="CARD32" name="dtime" />
+ <field type="CARD32" name="flags" />
+ <field type="DeviceId" name="sourceid" altenum="Device" />
+ <pad bytes="2" />
+ <field type="FP1616" name="root_x" />
+ <field type="FP1616" name="root_y" />
+ <field type="FP3232" name="dx" />
+ <field type="FP3232" name="dy" />
+ </event>
+
+ <eventcopy name="BarrierLeave" number="26" ref="BarrierHit" />
+
<!-- â
â
â
Errors (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<error name="Device" number="0" />
commit 5bfa4c837362bb3ae2d134a3883916b233dd6d11
Author: Daniel Martin <consume.noise at gmail.com>
Date: Tue Jan 15 20:14:57 2013 +0100
xinput: Add XI v2.2
Introduced with v2.2 has been Multitouch support and therefor 7 new
events: (Raw)Touch{Begin,Update,End} and TouchOwnership.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index 8b9fbc6..cbb5e49 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -33,7 +33,7 @@ authorization from the authors.
-->
<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
- major-version="2" minor-version="1">
+ major-version="2" minor-version="2">
<import>xproto</import>
<!-- â
â
â
Types (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
@@ -2013,6 +2013,88 @@ authorization from the authors.
<eventcopy name="RawButtonRelease" number="16" ref="RawButtonPress" />
<eventcopy name="RawMotion" number="17" ref="RawButtonPress" />
+ <!-- â
â
â
Events (v2.2) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <enum name="TouchEventFlags">
+ <item name="TouchPendingEnd"> <bit>16</bit> </item>
+ <item name="TouchEmulatingPointer"> <bit>17</bit> </item>
+ </enum>
+
+ <event name="TouchBegin" number="18" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="detail" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="WINDOW" name="child" />
+ <!-- 32 byte boundary -->
+ <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="sourceid" altenum="Device" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" mask="TouchEventFlags" />
+ <field type="ModifierInfo" name="mods" />
+ <field type="GroupInfo" name="group" />
+ <list type="CARD32" name="button_mask">
+ <fieldref>buttons_len</fieldref>
+ </list>
+ <list type="CARD32" name="valuator_mask">
+ <fieldref>valuators_len</fieldref>
+ </list>
+ <!-- Uninterpreted: list (axisvalues) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ </event>
+
+ <eventcopy name="TouchUpdate" number="19" ref="TouchBegin" />
+ <eventcopy name="TouchEnd" number="20" ref="TouchBegin" />
+
+ <enum name="TouchOwnershipFlags">
+ <!-- XXX: Remove this enum? Currently, no flag is defined. -->
+ <item name="None" />
+ </enum>
+
+ <event name="TouchOwnership" number="21" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="touchid" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="WINDOW" name="child" />
+ <!-- 32 byte boundary -->
+ <field type="DeviceId" name="sourceid" altenum="Device" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" enum="TouchOwnershipFlags" />
+ <pad bytes="8" />
+ </event>
+
+ <event name="RawTouchBegin" number="22" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="detail" />
+ <field type="DeviceId" name="sourceid" />
+ <field type="CARD16" name="valuators_len" />
+ <field type="CARD32" name="flags" mask="TouchEventFlags"/>
+ <pad bytes="4" />
+ <!-- 32 byte boundary -->
+ <list type="CARD32" name="valuator_mask">
+ <fieldref>valuators_len</fieldref>
+ </list>
+ <!-- Uninterpreted: list (axisvalues) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ <!-- Uninterpreted: list (axisvalues_raw) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ </event>
+
+ <eventcopy name="RawTouchUpdate" number="23" ref="RawTouchBegin" />
+ <eventcopy name="RawTouchEnd" number="24" ref="RawTouchBegin" />
+
<!-- â
â
â
Errors (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<error name="Device" number="0" />
commit 67a185d69d6def96112828f6dfa8374bacf277af
Author: Daniel Martin <consume.noise at gmail.com>
Date: Tue Jan 15 20:11:43 2013 +0100
xinput: Add XI v2.1
Introduced with v2.1 has been Raw event support and therefor 5 new
events: Raw{Key,Button}{Press,Release} and RawMotion.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index b6bcaa7..8b9fbc6 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -33,7 +33,7 @@ authorization from the authors.
-->
<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
- major-version="2" minor-version="0">
+ major-version="2" minor-version="1">
<import>xproto</import>
<!-- â
â
â
Types (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
@@ -1968,6 +1968,51 @@ authorization from the authors.
<!-- 32 byte boundary -->
</event>
+ <!-- â
â
â
Events (v2.1) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <event name="RawKeyPress" number="13" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="detail" />
+ <field type="DeviceId" name="sourceid" />
+ <field type="CARD16" name="valuators_len" />
+ <field type="CARD32" name="flags" mask="KeyEventFlags"/>
+ <pad bytes="4" />
+ <!-- 32 byte boundary -->
+ <list type="CARD32" name="valuator_mask">
+ <fieldref>valuators_len</fieldref>
+ </list>
+ <!-- Uninterpreted: list (axisvalues) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ <!-- Uninterpreted: list (axisvalues_raw) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ </event>
+
+ <eventcopy name="RawKeyRelease" number="14" ref="RawKeyPress" />
+
+ <event name="RawButtonPress" number="15" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="detail" />
+ <field type="DeviceId" name="sourceid" />
+ <field type="CARD16" name="valuators_len" />
+ <field type="CARD32" name="flags" mask="PointerEventFlags"/>
+ <pad bytes="4" />
+ <!-- 32 byte boundary -->
+ <list type="CARD32" name="valuator_mask">
+ <fieldref>valuators_len</fieldref>
+ </list>
+ <!-- Uninterpreted: list (axisvalues) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ <!-- Uninterpreted: list (axisvalues_raw) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ </event>
+
+ <eventcopy name="RawButtonRelease" number="16" ref="RawButtonPress" />
+ <eventcopy name="RawMotion" number="17" ref="RawButtonPress" />
+
<!-- â
â
â
Errors (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<error name="Device" number="0" />
commit 0f3a98cc622e423ff84ffcbcb719325df7d9c772
Author: Daniel Martin <consume.noise at gmail.com>
Date: Tue Jan 15 20:06:34 2013 +0100
xinput: Add XI v2.0
Introduced with v2.0 have been various new types, structures, 21
requests and 12 XGE events.
All new requests have the "XI" prefix in the name. This prefix can be
found in the spec too and avoids name clashes with requests found in
prior versions of XI (at least that's (Un)GrabDevice).
All new events are X Generic Events. They've a different header then
"normal" events. Therefor we've to mark them with the attribute 'xge'
set to 'true'.
To prevent another name clash one new structure had to be prefixed,
too: XIDeviceInfo.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index 20ac52b..b6bcaa7 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
-Copyright (C) 2006 Peter Hutterer
+Copyright (C) 2006 Peter Hutterer
+Copyright (C) 2013 Daniel Martin
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -28,10 +29,11 @@ authorization from the authors.
<!-- Specifications:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt
+ http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt
-->
<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
- major-version="1" minor-version="5">
+ major-version="2" minor-version="0">
<import>xproto</import>
<!-- â
â
â
Types (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
@@ -39,6 +41,16 @@ authorization from the authors.
<typedef oldname="CARD32" newname="EventClass" />
<typedef oldname="CARD8" newname="KeyCode" />
+ <!-- â
â
â
Types (v2.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <typedef oldname="CARD16" newname="DeviceId" />
+ <typedef oldname="INT32" newname="FP1616" />
+
+ <struct name="FP3232">
+ <field type="INT32" name="integral" />
+ <field type="CARD32" name="frac" />
+ </struct>
+
<!-- â
â
â
Requests (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<!-- GetExtensionVersion -->
@@ -1046,6 +1058,594 @@ authorization from the authors.
</reply>
</request>
+ <!-- â
â
â
Requests (v2.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <!-- XIQueryPointer -->
+
+ <enum name="Device">
+ <item name="All" />
+ <item name="AllMaster" />
+ </enum>
+
+ <struct name="GroupInfo">
+ <field type="CARD8" name="base" />
+ <field type="CARD8" name="latched" />
+ <field type="CARD8" name="locked" />
+ <field type="CARD8" name="effective" />
+ </struct>
+
+ <struct name="ModifierInfo">
+ <field type="CARD32" name="base" />
+ <field type="CARD32" name="latched" />
+ <field type="CARD32" name="locked" />
+ <field type="CARD32" name="effective" />
+ </struct>
+
+ <request name="XIQueryPointer" opcode="40">
+ <field type="WINDOW" name="window" />
+ <field type="DeviceId" name="deviceid" 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="win_x" />
+ <field type="FP1616" name="win_y" />
+ <field type="CARD8" name="same_screen" />
+ <pad bytes="1" />
+ <field type="CARD16" name="buttons_len" />
+ <field type="ModifierInfo" name="mods" />
+ <field type="GroupInfo" name="group" />
+ <list type="CARD32" name="buttons">
+ <fieldref>buttons_len</fieldref>
+ </list>
+ </reply>
+ </request>
+
+ <!-- XIWarpPointer -->
+
+ <request name="XIWarpPointer" opcode="41">
+ <field type="WINDOW" name="src_win" />
+ <field type="WINDOW" name="dst_win" />
+ <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="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+ <!-- XIChangeCursor -->
+
+ <request name="XIChangeCursor" opcode="42">
+ <field type="WINDOW" name="window" />
+ <field type="CURSOR" name="cursor" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+ <!-- XIChangeHierarchy -->
+
+ <enum name="HierarchyChangeType">
+ <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>
+
+ <enum name="ChangeMode">
+ <item name="Attach"> <value>1</value> </item>
+ <item name="Float"> <value>2</value> </item>
+ </enum>
+
+ <struct name="AddMaster">
+ <field type="CARD16" name="type" enum="HierarchyChangeType" />
+ <field type="CARD16" name="len" />
+ <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>
+
+ <struct name="RemoveMaster">
+ <field type="CARD16" name="type" enum="HierarchyChangeType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="CARD8" name="return_mode" enum="ChangeMode" />
+ <pad bytes="1" />
+ <field type="DeviceId" name="return_pointer" altenum="Device" />
+ <field type="DeviceId" name="return_keyboard" altenum="Device" />
+ </struct>
+
+ <struct name="AttachSlave">
+ <field type="CARD16" name="type" enum="HierarchyChangeType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="DeviceId" name="master" altenum="Device" />
+ </struct>
+
+ <struct name="DetachSlave">
+ <field type="CARD16" name="type" enum="HierarchyChangeType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ </struct>
+
+ <struct name="HierarchyChange">
+ <field type="CARD16" name="type" enum="HierarchyChangeType" />
+ <field type="CARD16" name="len" />
+ </struct>
+
+ <request name="XIChangeHierarchy" opcode="43">
+ <field type="CARD8" name="num_changes" />
+ <!-- Uninterpreted: list (changes) of HierarchyChange structures -->
+ </request>
+
+ <!-- XISetClientPointer -->
+
+ <request name="XISetClientPointer" opcode="44">
+ <field type="WINDOW" name="window" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+ <!-- XIGetClientPointer -->
+
+ <request name="XIGetClientPointer" opcode="45">
+ <field type="WINDOW" name="window" />
+ <reply>
+ <pad bytes="1" />
+ <field type="BOOL" name="set" />
+ <pad bytes="1" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="20" />
+ </reply>
+ </request>
+
+ <!-- XISelectEvents -->
+
+ <struct name="EventMask">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="CARD16" name="mask_len" />
+ <list type="CARD32" name="mask"> <!-- set of EventMaskBit -->
+ <fieldref>mask_len</fieldref>
+ </list>
+ </struct>
+
+ <request name="XISelectEvents" opcode="46">
+ <field type="WINDOW" name="window" />
+ <field type="CARD16" name="num_mask" />
+ <pad bytes="2" />
+ <list type="EventMask" name="masks">
+ <fieldref>num_mask</fieldref>
+ </list>
+ </request>
+
+ <!-- XIQueryVersion -->
+
+ <request name="XIQueryVersion" opcode="47">
+ <field type="CARD16" name="major_version" />
+ <field type="CARD16" name="minor_version" />
+
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="major_version" />
+ <field type="CARD16" name="minor_version" />
+ <pad bytes="20" />
+ </reply>
+ </request>
+
+ <!-- XIQueryDevice -->
+
+ <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>
+
+ <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>
+
+ <enum name="ScrollFlags">
+ <item name="NoEmulation"> <bit>0</bit> </item>
+ <item name="Preferred"> <bit>1</bit> </item>
+ </enum>
+
+ <enum name="ScrollType">
+ <item name="Vertical"> <value>1</value> </item>
+ <item name="Horizontal"> <value>2</value> </item>
+ </enum>
+
+ <enum name="TouchMode">
+ <item name="Direct"> <value>1</value> </item>
+ <item name="Dependent"> <value>2</value> </item>
+ </enum>
+
+ <struct name="ButtonClass">
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="sourceid" />
+ <field type="CARD16" name="num_buttons" />
+ <list type="CARD32" name="state">
+ <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>
+
+ <struct name="KeyClass">
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="sourceid" />
+ <field type="CARD16" name="num_keys" />
+ <list type="CARD32" name="keys">
+ <fieldref>num_keys</fieldref>
+ </list>
+ </struct>
+
+ <struct name="ScrollClass">
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="sourceid" />
+ <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>
+
+ <struct name="TouchClass">
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="sourceid" />
+ <field type="CARD8" name="mode" enum="TouchMode" />
+ <field type="CARD8" name="num_touches" />
+ </struct>
+
+ <struct name="ValuatorClass">
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="sourceid" />
+ <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>
+
+ <struct name="DeviceClass">
+ <field type="CARD16" name="type" enum="DeviceClassType" />
+ <field type="CARD16" name="len" />
+ <field type="DeviceId" name="sourceid" />
+ <pad bytes="2" />
+ </struct>
+
+ <struct name="XIDeviceInfo">
+ <field type="DeviceId" name="deviceid" 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 is without padding, so we've to pad on our own,
+ auto align pad after the list would be helpfull -->
+ <op op="*">
+ <op op="/">
+ <op op="+">
+ <fieldref>name_len</fieldref>
+ <value>3</value>
+ </op>
+ <value>4</value>
+ </op>
+ <value>4</value>
+ </op>
+ </list>
+ <!-- Uninterpreted: list (classes) of DeviceClass structures -->
+ </struct>
+
+ <request name="XIQueryDevice" opcode="48">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_infos" />
+ <pad bytes="22" />
+ <list type="XIDeviceInfo" name="infos">
+ <fieldref>num_infos</fieldref>
+ </list>
+ </reply>
+ </request>
+
+ <!-- XISetFocus -->
+
+ <request name="XISetFocus" opcode="49">
+ <field type="WINDOW" name="window" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+ <!-- XIGetFocus -->
+
+ <request name="XIGetFocus" opcode="50">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ <reply>
+ <pad bytes="1" />
+ <field type="WINDOW" name="focus" />
+ <pad bytes="20" />
+ </reply>
+ </request>
+
+ <!-- XIGrabDevice -->
+
+ <enum name="GrabOwner">
+ <item name="NoOwner" />
+ <item name="Owner" />
+ </enum>
+
+ <request name="XIGrabDevice" opcode="51">
+ <field type="WINDOW" name="window" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="CURSOR" name="cursor" />
+ <field type="DeviceId" name="deviceid" 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="CARD32" name="mask">
+ <fieldref>mask_len</fieldref>
+ </list>
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" enum="GrabStatus" />
+ <pad bytes="23" />
+ </reply>
+ </request>
+
+ <!-- XIUngrabDevice -->
+
+ <request name="XIUngrabDevice" opcode="52">
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ </request>
+
+ <!-- XIAllowEvents -->
+
+ <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="XIAllowEvents" opcode="53">
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="CARD8" name="event_mode" enum="EventMode" />
+ <pad bytes="1" />
+ <field type="CARD32" name="touchid" />
+ <field type="WINDOW" name="grab_window" />
+ </request>
+
+ <!-- XIPassiveGrabDevice -->
+
+ <enum name="GrabMode22">
+ <item name="Sync" />
+ <item name="Async" />
+ <item name="Touch" />
+ </enum>
+
+ <enum name="GrabType">
+ <item name="Button" />
+ <item name="Keycode" />
+ <item name="Enter" />
+ <item name="FocusIn" />
+ <item name="TouchBegin" />
+ </enum>
+
+ <enum name="ModifierMask">
+ <item name="Any"> <bit>31</bit> </item>
+ </enum>
+
+ <struct name="GrabModifierInfo">
+ <field type="CARD32" name="modifiers" altenum="ModifierMask" />
+ <field type="CARD8" name="status" enum="GrabStatus" />
+ <pad bytes="3" />
+ </struct>
+
+ <request name="XIPassiveGrabDevice" opcode="54">
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="WINDOW" name="grab_window" />
+ <field type="CURSOR" name="cursor" />
+ <field type="CARD32" name="detail" />
+ <field type="DeviceId" name="deviceid" 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" />
+ <field type="CARD8" name="paired_device_mode" enum="GrabMode" />
+ <field type="BOOL" name="owner_events" enum="GrabOwner" />
+ <pad bytes="2" />
+ <list type="CARD32" name="mask">
+ <fieldref>mask_len</fieldref>
+ </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="GrabModifierInfo" name="modifiers">
+ <fieldref>num_modifiers</fieldref>
+ </list>
+ </reply>
+ </request>
+
+ <!-- XIPassiveUngrabDevice -->
+
+ <request name="XIPassiveUngrabDevice" opcode="55">
+ <field type="WINDOW" name="grab_window" />
+ <field type="CARD32" name="detail" />
+ <field type="DeviceId" name="deviceid" 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>
+
+ <!-- XIListProperties -->
+
+ <request name="XIListProperties" opcode="56">
+ <field type="DeviceId" name="deviceid" 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>
+
+ <!-- XIChangeProperty -->
+
+ <request name="XIChangeProperty" opcode="57">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="CARD8" name="mode" enum="PropMode" />
+ <field type="CARD8" name="format" enum="PropertyFormat" />
+ <field type="ATOM" name="property" />
+ <field type="ATOM" name="type" />
+ <field type="CARD32" name="num_items" />
+ <switch name="items">
+ <fieldref>format</fieldref>
+ <!-- <bitcase> is not correct, this would need <cases>s.
+ It works in that case, because PropertyFormat items can be
+ distinguished exactly as their values don't have equal bits.
+ -->
+ <bitcase>
+ <enumref ref="PropertyFormat">8Bits</enumref>
+ <list type="CARD8" name="data8">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ <bitcase>
+ <enumref ref="PropertyFormat">16Bits</enumref>
+ <list type="CARD16" name="data16">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ <bitcase>
+ <enumref ref="PropertyFormat">32Bits</enumref>
+ <list type="CARD32" name="data32">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ </switch>
+ </request>
+
+ <!-- XIDeleteProperty -->
+
+ <request name="XIDeleteProperty" opcode="58">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <pad bytes="2" />
+ <field type="ATOM" name="property" />
+ </request>
+
+ <!-- XIGetProperty -->
+
+ <request name="XIGetProperty" opcode="59">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="BOOL" 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" />
+ <switch name="items">
+ <fieldref>format</fieldref>
+ <!-- <bitcase> is not correct, this would need <cases>s.
+ It works in that case, because PropertyFormat items can be
+ distinguished exactly as their values don't have equal bits.
+ -->
+ <bitcase>
+ <enumref ref="PropertyFormat">8Bits</enumref>
+ <list type="CARD8" name="data8">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ <bitcase>
+ <enumref ref="PropertyFormat">16Bits</enumref>
+ <list type="CARD16" name="data16">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ <bitcase>
+ <enumref ref="PropertyFormat">32Bits</enumref>
+ <list type="CARD32" name="data32">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ </switch>
+ </reply>
+ </request>
+
+ <!-- XIGetSelectedEvents -->
+
+ <request name="XIGetSelectedEvents" opcode="60">
+ <field type="WINDOW" name="window" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_masks" />
+ <pad bytes="22" />
+ <list type="EventMask" name="masks">
+ <fieldref>num_masks</fieldref>
+ </list>
+ </reply>
+ </request>
+
<!-- â
â
â
Events (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<!-- Notes:
- A 'len' field in a v1++ structure is in bytes.
@@ -1173,6 +1773,201 @@ authorization from the authors.
<field type="CARD8" name="device_id" />
</event>
+ <!-- â
â
â
Events (v2.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+ <!-- Notes:
+ - A 'len' field in a v2++ structure is in 4 byte units.
+ -->
+
+ <enum name="ChangeReason">
+ <item name="SlaveSwitch"> <value>1</value> </item>
+ <item name="DeviceChange"> <value>2</value> </item>
+ </enum>
+
+ <event name="DeviceChanged" number="1" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD16" name="num_classes" />
+ <field type="DeviceId" name="sourceid" altenum="Device" />
+ <field type="CARD8" name="reason" enum="ChangeReason" />
+ <pad bytes="11" />
+ <!-- 32 byte boundary -->
+ <list type="DeviceClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
+ </event>
+
+ <enum name="KeyEventFlags">
+ <item name="KeyRepeat"> <bit>16</bit> </item>
+ </enum>
+
+ <event name="KeyPress" number="2" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="detail" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="WINDOW" name="child" />
+ <!-- 32 byte boundary -->
+ <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="sourceid" altenum="Device" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" mask="KeyEventFlags" />
+ <field type="ModifierInfo" name="mods" />
+ <field type="GroupInfo" name="group" />
+ <list type="CARD32" name="button_mask">
+ <fieldref>buttons_len</fieldref>
+ </list>
+ <list type="CARD32" name="valuator_mask">
+ <fieldref>valuators_len</fieldref>
+ </list>
+ <!-- Uninterpreted: list (axisvalues) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ </event>
+
+ <eventcopy name="KeyRelease" number="3" ref="KeyPress" />
+
+ <enum name="PointerEventFlags">
+ <item name="PointerEmulated"> <bit>16</bit> </item>
+ </enum>
+
+ <event name="ButtonPress" number="4" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="detail" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="WINDOW" name="child" />
+ <!-- 32 byte boundary -->
+ <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="sourceid" altenum="Device" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" mask="PointerEventFlags" />
+ <field type="ModifierInfo" name="mods" />
+ <field type="GroupInfo" name="group" />
+ <list type="CARD32" name="button_mask">
+ <fieldref>buttons_len</fieldref>
+ </list>
+ <list type="CARD32" name="valuator_mask">
+ <fieldref>valuators_len</fieldref>
+ </list>
+ <!-- Uninterpreted: list (axisvalues) of FP3232,
+ length is <popcount> on valuator_mask list -->
+ </event>
+
+ <eventcopy name="ButtonRelease" number="5" ref="ButtonPress" />
+ <eventcopy name="Motion" number="6" ref="ButtonPress" />
+
+ <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="None" />
+ </enum>
+
+ <event name="Enter" number="7" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="DeviceId" name="sourceid" 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 -->
+ <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="ModifierInfo" name="mods" />
+ <field type="GroupInfo" name="group" />
+ <list type="CARD32" name="buttons">
+ <fieldref>buttons_len</fieldref>
+ </list>
+ </event>
+
+ <eventcopy name="Leave" number="8" ref="Enter" />
+ <eventcopy name="FocusIn" number="9" ref="Enter" />
+ <eventcopy name="FocusOut" number="10" ref="Enter" />
+
+ <enum name="HierarchyMask">
+ <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="HierarchyInfo">
+ <field type="DeviceId" name="deviceid" 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="HierarchyMask" />
+ </struct>
+
+ <event name="Hierarchy" number="11" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="CARD32" name="flags" mask="HierarchyMask" />
+ <field type="CARD16" name="num_infos" />
+ <pad bytes="10" />
+ <!-- 32 byte boundary -->
+ <list type="HierarchyInfo" name="infos">
+ <fieldref>num_infos</fieldref>
+ </list>
+ </event>
+
+ <enum name="PropertyFlag">
+ <item name="Deleted" />
+ <item name="Created" />
+ <item name="Modified" />
+ </enum>
+
+ <event name="Property" number="12" xge="true">
+ <field type="DeviceId" name="deviceid" altenum="Device" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <!-- event specific fields -->
+ <field type="ATOM" name="property" />
+ <field type="CARD8" name="what" enum="PropertyFlag" />
+ <pad bytes="11" />
+ <!-- 32 byte boundary -->
+ </event>
+
<!-- â
â
â
Errors (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<error name="Device" number="0" />
commit bd070c5a513da966da77c7a9c1c24f9f5836f43a
Author: Daniel Martin <consume.noise at gmail.com>
Date: Tue Jan 15 19:01:12 2013 +0100
xinput: Add XI v1.5
New:
- Requests
* ListDeviceProperties
* ChangeDeviceProperty
* DeleteDeviceProperty
* GetDeviceProperty
- Enum
* PropertyFormat
- Event
* DevicePropertyNotify
The requests ChangeDeviceProperty and GetDeviceProperty use switches to
return a list depending on the format (8bit, 16bit and 32bit) of the
property value.
We reuse the <bitcase> here. Which is possible, because the format
values don't have equal bits. But, this is rather a hack and must be
changed when the value test (a <case>) for switches is implemented.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index 2de7307..20ac52b 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -31,7 +31,7 @@ authorization from the authors.
-->
<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
- major-version="1" minor-version="4">
+ major-version="1" minor-version="5">
<import>xproto</import>
<!-- â
â
â
Types (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
@@ -932,6 +932,120 @@ authorization from the authors.
</reply>
</request>
+ <!-- â
â
â
Requests (v1.5) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <!-- ListDeviceProperties -->
+
+ <request name="ListDeviceProperties" opcode="36">
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_atoms" />
+ <pad bytes="22" />
+ <list type="ATOM" name="atoms">
+ <fieldref>num_atoms</fieldref>
+ </list>
+ </reply>
+ </request>
+
+ <!-- ChangeDeviceProperty -->
+
+ <enum name="PropertyFormat">
+ <item name="8Bits"> <value> 8</value> </item>
+ <item name="16Bits"> <value>16</value> </item>
+ <item name="32Bits"> <value>32</value> </item>
+ </enum>
+
+ <request name="ChangeDeviceProperty" opcode="37">
+ <field type="ATOM" name="property" />
+ <field type="ATOM" name="type" />
+ <field type="CARD8" name="device_id" />
+ <field type="CARD8" name="format" enum="PropertyFormat" />
+ <field type="CARD8" name="mode" enum="PropMode" />
+ <pad bytes="1" />
+ <field type="CARD32" name="num_items" />
+ <switch name="items">
+ <fieldref>format</fieldref>
+ <!-- <bitcase> is not correct, this would need <cases>s.
+ It works in that case, because PropertyFormat items can be
+ distinguished exactly as their values don't have equal bits.
+ -->
+ <bitcase>
+ <enumref ref="PropertyFormat">8Bits</enumref>
+ <list type="CARD8" name="data8">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ <bitcase>
+ <enumref ref="PropertyFormat">16Bits</enumref>
+ <list type="CARD16" name="data16">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ <bitcase>
+ <enumref ref="PropertyFormat">32Bits</enumref>
+ <list type="CARD32" name="data32">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ </switch>
+ </request>
+
+ <!-- DeleteDeviceProperty -->
+
+ <request name="DeleteDeviceProperty" opcode="38">
+ <field type="ATOM" name="property" />
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ </request>
+
+ <!-- GetDeviceProperty -->
+
+ <request name="GetDeviceProperty" opcode="39">
+ <field type="ATOM" name="property" />
+ <field type="ATOM" name="type" />
+ <field type="CARD32" name="offset" />
+ <field type="CARD32" name="len" />
+ <field type="CARD8" name="device_id" />
+ <field type="BOOL" name="delete" />
+ <pad bytes="2" />
+ <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" />
+ <field type="CARD8" name="device_id" />
+ <pad bytes="10" />
+ <switch name="items">
+ <fieldref>format</fieldref>
+ <!-- <bitcase> is not correct, this would need <cases>s.
+ It works in that case, because PropertyFormat items can be
+ distinguished exactly as their values don't have equal bits.
+ -->
+ <bitcase>
+ <enumref ref="PropertyFormat">8Bits</enumref>
+ <list type="CARD8" name="data8">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ <bitcase>
+ <enumref ref="PropertyFormat">16Bits</enumref>
+ <list type="CARD16" name="data16">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ <bitcase>
+ <enumref ref="PropertyFormat">32Bits</enumref>
+ <list type="CARD32" name="data32">
+ <fieldref>num_items</fieldref>
+ </list>
+ </bitcase>
+ </switch>
+ </reply>
+ </request>
+
<!-- â
â
â
Events (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<!-- Notes:
- A 'len' field in a v1++ structure is in bytes.
@@ -1049,6 +1163,16 @@ authorization from the authors.
<pad bytes="20" />
</event>
+ <!-- â
â
â
Events (v1.5) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <event name="DevicePropertyNotify" number="16">
+ <field type="BYTE" name="state" enum="Property" />
+ <field type="TIMESTAMP" name="time" />
+ <field type="ATOM" name="property" />
+ <pad bytes="19" />
+ <field type="CARD8" name="device_id" />
+ </event>
+
<!-- â
â
â
Errors (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<error name="Device" number="0" />
commit 4fce9448b6ec3785476ae85cb7c5c28c180b5e8b
Author: Daniel Martin <consume.noise at gmail.com>
Date: Tue Jan 15 18:54:05 2013 +0100
xinput: Cleanup implementation of XI up to v1.4
- Structural changes:
* indent with spaces only (replaced tabs)
* indent attributes
* move structures in front of the first request using it
(Otherwise c_client.py would generate uncompileable code if we fix
the uninterpreted lists.)
* add version-controlled section comments (types, requests, events,
errors) and move structures into their corresponding section
* sort events and eventcopys by number
- Additions:
* add various missing enums and structs (i.e. DeviceChange,
DeviceControl, DeviceName, ...)
* uncomment commented out requests
* linked in various enums into fields (via enum or altenum)
- Other changes:
* link to the txt specification in the git repo
* fixed comments for "uninterpreted lists"
- API CHANGES:
* Request: GetDeviceMotionEvents
The reply contains a list of events (of coordinates). So, we rename
num_coords to num_events. The field is called nevents_return in the
specification. The list was commented out anyways, so the rename
shouldn't affect that much.
* Request: SendExtensionEvent
The list 'events' is a mask, make it a CARD8 like every other mask.
* Events: FocusIn/Out
Those ones haven't been named properly. They are called
DeviceFocusIn/Out in the specification. In XI2 the names FocusIn/Out
are used to introduce new events and cause name clashes. So, we have
to rename the existing FocusIn/Out and give them their proper names.
* Structures: *Feedback{Ctl,State}
Rename the field id to feedback_id, as it's called in the spec. The
only lists using those structs are commented out yet. So, this might
not be called an api break.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/src/xinput.xml b/src/xinput.xml
index 80416fe..2de7307 100644
--- a/src/xinput.xml
+++ b/src/xinput.xml
@@ -26,995 +26,1035 @@ sale, use or other dealings in this Software without prior written
authorization from the authors.
-->
-<!-- Spec: http://refspecs.freestandards.org/X11/Xinput.pdf -->
+<!-- Specifications:
+ http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt
+-->
<xcb header="xinput" extension-xname="XInputExtension" extension-name="Input"
major-version="1" minor-version="4">
<import>xproto</import>
- <typedef oldname="CARD8" newname="KeyCode" />
+ <!-- â
â
â
Types (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
<typedef oldname="CARD32" newname="EventClass" />
+ <typedef oldname="CARD8" newname="KeyCode" />
- <enum name="ValuatorMode">
- <item name="Relative"> <value>0</value></item>
- <item name="Absolute"> <value>1</value></item>
- </enum>
-
- <enum name="PropagateMode">
- <item name="AddToList"> <value>0</value></item>
- <item name="DeleteFromList"> <value>1</value></item>
- </enum>
+ <!-- â
â
â
Requests (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
<!-- GetExtensionVersion -->
<request name="GetExtensionVersion" opcode="1">
- <field type="CARD16" name="name_len" />
- <pad bytes="2" />
- <list type="char" name="name">
- <fieldref>name_len</fieldref>
- </list>
- <reply>
- <pad bytes="1" />
- <field type="CARD16" name="server_major" />
- <field type="CARD16" name="server_minor" />
- <field type="BOOL" name="present" />
- <pad bytes="19" />
- </reply>
+ <field type="CARD16" name="name_len" />
+ <pad bytes="2" />
+ <list type="char" name="name">
+ <fieldref>name_len</fieldref>
+ </list>
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="server_major" />
+ <field type="CARD16" name="server_minor" />
+ <field type="BOOL" name="present" />
+ <pad bytes="19" />
+ </reply>
</request>
<!-- ListInputDevices -->
<enum name="DeviceUse">
- <item name="IsXPointer"><value>0</value></item>
- <item name="IsXKeyboard"><value>1</value></item>
- <item name="IsXExtensionDevice"><value>2</value></item>
- <item name="IsXExtensionKeyboard"><value>3</value></item>
- <item name="IsXExtensionPointer"><value>4</value></item>
+ <item name="IsXPointer"> <value>0</value> </item>
+ <item name="IsXKeyboard"> <value>1</value> </item>
+ <item name="IsXExtensionDevice"> <value>2</value> </item>
+ <item name="IsXExtensionKeyboard"> <value>3</value> </item>
+ <item name="IsXExtensionPointer"> <value>4</value> </item>
</enum>
- <struct name="DeviceInfo">
- <field type="ATOM" name="device_type" />
- <field type="CARD8" name="device_id" />
- <field type="CARD8" name="num_class_info" />
- <field type="CARD8" name="device_use" enum="DeviceUse" />
- <pad bytes="1" />
- </struct>
-
- <request name="ListInputDevices" opcode="2">
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="devices_len" />
- <pad bytes="23" />
- <list type="DeviceInfo" name="devices">
- <fieldref>devices_len</fieldref>
- </list>
- <!-- Uninterpreted: list of deviceinfo structs of 3 the subtypes -->
- <!-- Uninterpreted: list of null-terminated strings -->
- </reply>
- </request>
-
<enum name="InputClass">
- <item name="Key"><value>0</value></item>
- <item name="Button"><value>1</value></item>
- <item name="Valuator"><value>2</value></item>
- <item name="Feedback"><value>3</value></item>
- <item name="Proximity"><value>4</value></item>
- <item name="Focus"><value>5</value></item>
- <item name="Other"><value>6</value></item>
+ <item name="Key"> <value>0</value> </item>
+ <item name="Button"> <value>1</value> </item>
+ <item name="Valuator"> <value>2</value> </item>
+ <item name="Feedback"> <value>3</value> </item>
+ <item name="Proximity"> <value>4</value> </item>
+ <item name="Focus"> <value>5</value> </item>
+ <item name="Other"> <value>6</value> </item>
</enum>
- <struct name="InputInfo">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="len" />
+ <enum name="ValuatorMode">
+ <item name="Relative"> <value>0</value> </item>
+ <item name="Absolute"> <value>1</value> </item>
+ </enum>
+
+ <struct name="DeviceInfo">
+ <field type="ATOM" name="device_type" />
+ <field type="CARD8" name="device_id" />
+ <field type="CARD8" name="num_class_info" />
+ <field type="CARD8" name="device_use" enum="DeviceUse" />
+ <pad bytes="1" />
</struct>
<struct name="KeyInfo">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="len" />
- <field type="KeyCode" name="min_keycode" />
- <field type="KeyCode" name="max_keycode" />
- <field type="CARD16" name="num_keys" />
- <pad bytes="2" />
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="len" />
+ <field type="KeyCode" name="min_keycode" />
+ <field type="KeyCode" name="max_keycode" />
+ <field type="CARD16" name="num_keys" />
+ <pad bytes="2" />
</struct>
<struct name="ButtonInfo">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="len" />
- <field type="CARD16" name="num_buttons" />
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="len" />
+ <field type="CARD16" name="num_buttons" />
</struct>
<struct name="AxisInfo">
- <field type="CARD32" name="resolution" />
- <field type="INT32" name="minimum" />
- <field type="INT32" name="maximum" />
+ <field type="CARD32" name="resolution" />
+ <field type="INT32" name="minimum" />
+ <field type="INT32" name="maximum" />
</struct>
<struct name="ValuatorInfo">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="len" />
- <field type="CARD8" name="axes_len" />
- <field type="CARD8" name="mode" enum="ValuatorMode" />
- <field type="CARD32" name="motion_size" />
- <list type="AxisInfo" name="axes">
- <fieldref>axes_len</fieldref>
- </list>
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="len" />
+ <field type="CARD8" name="axes_len" />
+ <field type="CARD8" name="mode" enum="ValuatorMode" />
+ <field type="CARD32" name="motion_size" />
+ <list type="AxisInfo" name="axes">
+ <fieldref>axes_len</fieldref>
+ </list>
+ </struct>
+
+ <struct name="InputInfo">
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="len" />
+ </struct>
+
+ <struct name="DeviceName">
+ <field type="CARD8" name="len" />
+ <list type="char" name="string">
+ <fieldref>len</fieldref>
+ </list>
</struct>
+ <request name="ListInputDevices" opcode="2">
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="devices_len" />
+ <pad bytes="23" />
+ <list type="DeviceInfo" name="devices">
+ <fieldref>devices_len</fieldref>
+ </list>
+ <!-- Uninterpreted: list (infos) of InputInfo structures,
+ length is <sumof> all devices.num_class_info -->
+ <!-- Uninterpreted: list (name) of DeviceName structures -->
+ </reply>
+ </request>
+
<!-- OpenDevice -->
<struct name="InputClassInfo">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="event_type_base" />
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="event_type_base" />
</struct>
<request name="OpenDevice" opcode="3">
- <field type="CARD8" name="device_id" />
- <pad bytes="3" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="num_classes" />
- <pad bytes="23" />
- <list type="InputClassInfo" name="class_info">
- <fieldref>num_classes</fieldref>
- </list>
- </reply>
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="num_classes" />
+ <pad bytes="23" />
+ <list type="InputClassInfo" name="class_info">
+ <fieldref>num_classes</fieldref>
+ </list>
+ </reply>
</request>
<!-- CloseDevice -->
<request name="CloseDevice" opcode="4">
- <field type="CARD8" name="device_id" />
- <pad bytes="3" />
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
</request>
<!-- SetDeviceMode -->
<request name="SetDeviceMode" opcode="5">
- <field type="CARD8" name="device_id" />
- <field type="CARD8" name="mode" enum="ValuatorMode" />
- <pad bytes="2" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="status" altenum="GrabStatus" />
- <pad bytes="23" />
- </reply>
+ <field type="CARD8" name="device_id" />
+ <field type="CARD8" name="mode" enum="ValuatorMode" />
+ <pad bytes="2" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" altenum="GrabStatus" />
+ <pad bytes="23" />
+ </reply>
</request>
<!-- SelectExtensionEvent -->
<request name="SelectExtensionEvent" opcode="6">
- <field type="WINDOW" name="window" />
- <field type="CARD16" name="num_classes" />
- <pad bytes="2" />
- <list type="EventClass" name="classes">
- <fieldref>num_classes</fieldref>
- </list>
+ <field type="WINDOW" name="window" />
+ <field type="CARD16" name="num_classes" />
+ <pad bytes="2" />
+ <list type="EventClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
</request>
<!-- GetSelectedExtensionEvents -->
<request name="GetSelectedExtensionEvents" opcode="7">
- <field type="WINDOW" name="window" />
- <reply>
- <pad bytes="1" />
- <field type="CARD16" name="num_this_classes" />
- <field type="CARD16" name="num_all_classes" />
- <pad bytes="20" />
- <list type="EventClass" name="this_classes">
- <fieldref>num_this_classes</fieldref>
- </list>
- <list type="EventClass" name="all_classes">
- <fieldref>num_all_classes</fieldref>
- </list>
- </reply>
+ <field type="WINDOW" name="window" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_this_classes" />
+ <field type="CARD16" name="num_all_classes" />
+ <pad bytes="20" />
+ <list type="EventClass" name="this_classes">
+ <fieldref>num_this_classes</fieldref>
+ </list>
+ <list type="EventClass" name="all_classes">
+ <fieldref>num_all_classes</fieldref>
+ </list>
+ </reply>
</request>
<!-- ChangeDeviceDontPropagateList -->
+ <enum name="PropagateMode">
+ <item name="AddToList"> <value>0</value> </item>
+ <item name="DeleteFromList"> <value>1</value> </item>
+ </enum>
+
<request name="ChangeDeviceDontPropagateList" opcode="8">
- <field type="WINDOW" name="window" />
- <field type="CARD16" name="num_classes" />
- <field type="CARD8" name="mode" enum="PropagateMode" />
- <pad bytes="1" />
- <list type="EventClass" name="classes">
- <fieldref>num_classes</fieldref>
- </list>
+ <field type="WINDOW" name="window" />
+ <field type="CARD16" name="num_classes" />
+ <field type="CARD8" name="mode" enum="PropagateMode" />
+ <pad bytes="1" />
+ <list type="EventClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
</request>
<!-- GetDeviceDontPropagateList -->
<request name="GetDeviceDontPropagateList" opcode="9">
- <field type="WINDOW" name="window" />
- <reply>
- <pad bytes="1" />
- <field type="CARD16" name="num_classes" />
- <pad bytes="22" />
- <list type="EventClass" name="classes">
- <fieldref>num_classes</fieldref>
- </list>
- </reply>
+ <field type="WINDOW" name="window" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_classes" />
+ <pad bytes="22" />
+ <list type="EventClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
+ </reply>
</request>
<!-- GetDeviceMotionEvents -->
- <request name="GetDeviceMotionEvents" opcode="10">
- <field type="TIMESTAMP" name="start" />
- <field type="TIMESTAMP" name="stop" altenum="Time" />
- <field type="CARD8" name="device_id" />
- <reply>
- <pad bytes="1" />
- <field type="CARD32" name="num_coords" />
- <field type="CARD8" name="num_axes" />
- <field type="CARD8" name="device_mode" enum="ValuatorMode" />
- <pad bytes="18" />
- <!-- Uninterpreted: list of DeviceTimeCoord structures -->
- </reply>
- </request>
-
<struct name="DeviceTimeCoord">
- <field type="TIMESTAMP" name="time" />
- <!-- Uninterpreted: list of CARD16 -->
+ <field type="TIMESTAMP" name="time" />
+ <!-- Uninterpreted: list (axisvalues) of CARD32,
+ length is num_axes from GetDeviceMotionEvents -->
</struct>
+ <request name="GetDeviceMotionEvents" opcode="10">
+ <field type="TIMESTAMP" name="start" />
+ <field type="TIMESTAMP" name="stop" altenum="Time" />
+ <field type="CARD8" name="device_id" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD32" name="num_events" />
+ <field type="CARD8" name="num_axes" />
+ <field type="CARD8" name="device_mode" enum="ValuatorMode" />
+ <pad bytes="18" />
+ <!-- Uninterpreted: list (events) of DeviceTimeCoord structures -->
+ </reply>
+ </request>
+
<!-- ChangeKeyboardDevice -->
+
<request name="ChangeKeyboardDevice" opcode="11">
- <field type="CARD8" name="device_id" />
- <pad bytes="3" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="status" altenum="GrabStatus" />
- <pad bytes="23" />
- </reply>
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" altenum="GrabStatus" />
+ <pad bytes="23" />
+ </reply>
</request>
<!-- ChangePointerDevice -->
<request name="ChangePointerDevice" opcode="12">
- <field type="CARD8" name="x_axis" />
- <field type="CARD8" name="y_axis" />
- <field type="CARD8" name="device_id" />
- <pad bytes="1" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="status" altenum="GrabStatus" />
- <pad bytes="23" />
- </reply>
+ <field type="CARD8" name="x_axis" />
+ <field type="CARD8" name="y_axis" />
+ <field type="CARD8" name="device_id" />
+ <pad bytes="1" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" altenum="GrabStatus" />
+ <pad bytes="23" />
+ </reply>
</request>
<!-- GrabDevice -->
<request name="GrabDevice" opcode="13">
- <field type="WINDOW" name="grab_window" />
- <field type="TIMESTAMP" name="time" altenum="Time" />
- <field type="CARD16" name="num_classes" />
- <field type="CARD8" name="this_device_mode" enum="GrabMode" />
- <field type="CARD8" name="other_device_mode" enum="GrabMode" />
- <field type="BOOL" name="owner_events" />
- <field type="CARD8" name="device_id" />
- <pad bytes="2" />
- <list type="EventClass" name="classes">
- <fieldref>num_classes</fieldref>
- </list>
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="status" enum="GrabStatus" />
- <pad bytes="23" />
- </reply>
+ <field type="WINDOW" name="grab_window" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="CARD16" name="num_classes" />
+ <field type="CARD8" name="this_device_mode" enum="GrabMode" />
+ <field type="CARD8" name="other_device_mode" enum="GrabMode" />
+ <field type="BOOL" name="owner_events" />
+ <field type="CARD8" name="device_id" />
+ <pad bytes="2" />
+ <list type="EventClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" enum="GrabStatus" />
+ <pad bytes="23" />
+ </reply>
</request>
<!-- UngrabDevice -->
<request name="UngrabDevice" opcode="14">
- <field type="TIMESTAMP" name="time" altenum="Time" />
- <field type="CARD8" name="device_id" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="CARD8" name="device_id" />
</request>
<!-- GrabDeviceKey -->
<request name="GrabDeviceKey" opcode="15">
- <field type="WINDOW" name="grab_window" />
- <field type="CARD16" name="num_classes" />
- <field type="CARD16" name="modifiers" mask="ModMask" />
- <field type="CARD8" name="modifier_device" />
- <field type="CARD8" name="grabbed_device" />
- <field type="CARD8" name="key" altenum="Grab" />
- <field type="CARD8" name="this_device_mode" enum="GrabMode" />
- <field type="CARD8" name="other_device_mode" enum="GrabMode" />
- <field type="BOOL" name="owner_events" />
- <pad bytes="2" />
- <list type="EventClass" name="classes">
- <fieldref>num_classes</fieldref>
- </list>
+ <field type="WINDOW" name="grab_window" />
+ <field type="CARD16" name="num_classes" />
+ <field type="CARD16" name="modifiers" mask="ModMask" />
+ <field type="CARD8" name="modifier_device" />
+ <field type="CARD8" name="grabbed_device" />
+ <field type="CARD8" name="key" altenum="Grab" />
+ <field type="CARD8" name="this_device_mode" enum="GrabMode" />
+ <field type="CARD8" name="other_device_mode" enum="GrabMode" />
+ <field type="BOOL" name="owner_events" />
+ <pad bytes="2" />
+ <list type="EventClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
</request>
<!-- UngrabDeviceKey -->
<request name="UngrabDeviceKey" opcode="16">
- <field type="WINDOW" name="grabWindow" />
- <field type="CARD16" name="modifiers" mask="ModMask" />
- <field type="CARD8" name="modifier_device" />
- <field type="CARD8" name="key" altenum="Grab" />
- <field type="CARD8" name="grabbed_device" />
+ <field type="WINDOW" name="grabWindow" />
+ <field type="CARD16" name="modifiers" mask="ModMask" />
+ <field type="CARD8" name="modifier_device" />
+ <field type="CARD8" name="key" altenum="Grab" />
+ <field type="CARD8" name="grabbed_device" />
</request>
<!-- GrabDeviceButton -->
<request name="GrabDeviceButton" opcode="17">
- <field type="WINDOW" name="grab_window" />
- <field type="CARD8" name="grabbed_device" />
- <field type="CARD8" name="modifier_device" />
- <field type="CARD16" name="num_classes" />
- <field type="CARD16" name="modifiers" mask="ModMask" />
- <field type="CARD8" name="this_device_mode" enum="GrabMode" />
- <field type="CARD8" name="other_device_mode" enum="GrabMode" />
- <field type="CARD8" name="button" altenum="Grab" />
- <field type="CARD8" name="owner_events" />
- <pad bytes="2" />
- <list type="EventClass" name="classes">
- <fieldref>num_classes</fieldref>
- </list>
+ <field type="WINDOW" name="grab_window" />
+ <field type="CARD8" name="grabbed_device" />
+ <field type="CARD8" name="modifier_device" />
+ <field type="CARD16" name="num_classes" />
+ <field type="CARD16" name="modifiers" mask="ModMask" />
+ <field type="CARD8" name="this_device_mode" enum="GrabMode" />
+ <field type="CARD8" name="other_device_mode" enum="GrabMode" />
+ <field type="CARD8" name="button" altenum="Grab" />
+ <field type="CARD8" name="owner_events" />
+ <pad bytes="2" />
+ <list type="EventClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
</request>
<!-- UngrabDeviceButton -->
<request name="UngrabDeviceButton" opcode="18">
- <field type="WINDOW" name="grab_window" />
- <field type="CARD16" name="modifiers" mask="ModMask" />
- <field type="CARD8" name="modifier_device" />
- <field type="CARD8" name="button" altenum="Grab" />
- <field type="CARD8" name="grabbed_device" />
+ <field type="WINDOW" name="grab_window" />
+ <field type="CARD16" name="modifiers" mask="ModMask" />
+ <field type="CARD8" name="modifier_device" />
+ <field type="CARD8" name="button" altenum="Grab" />
+ <field type="CARD8" name="grabbed_device" />
</request>
<!-- AllowDeviceEvents -->
<enum name="DeviceInputMode">
- <item name="AsyncThisDevice" />
- <item name="SyncThisDevice" />
- <item name="ReplayThisDevice" />
- <item name="AsyncOtherDevices" />
- <item name="AsyncAll" />
- <item name="SyncAll" />
+ <item name="AsyncThisDevice" />
+ <item name="SyncThisDevice" />
+ <item name="ReplayThisDevice" />
+ <item name="AsyncOtherDevices" />
+ <item name="AsyncAll" />
+ <item name="SyncAll" />
</enum>
<request name="AllowDeviceEvents" opcode="19">
- <field type="TIMESTAMP" name="time" altenum="Time" />
- <field type="CARD8" name="mode" enum="DeviceInputMode" />
- <field type="CARD8" name="device_id" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="CARD8" name="mode" enum="DeviceInputMode" />
+ <field type="CARD8" name="device_id" />
</request>
<!-- GetDeviceFocus -->
<request name="GetDeviceFocus" opcode="20">
- <field type="CARD8" name="device_id" />
- <pad bytes="3" />
- <reply>
- <pad bytes="1" />
- <field type="WINDOW" name="focus" altenum="InputFocus" />
- <field type="TIMESTAMP" name="time" />
- <field type="CARD8" name="revert_to" enum="InputFocus" />
- <pad bytes="15" />
- </reply>
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ <reply>
+ <pad bytes="1" />
+ <field type="WINDOW" name="focus" altenum="InputFocus" />
+ <field type="TIMESTAMP" name="time" />
+ <field type="CARD8" name="revert_to" enum="InputFocus" />
+ <pad bytes="15" />
+ </reply>
</request>
<!-- SetDeviceFocus -->
<request name="SetDeviceFocus" opcode="21">
- <field type="WINDOW" name="focus" altenum="InputFocus" />
- <field type="TIMESTAMP" name="time" altenum="Time" />
- <field type="CARD8" name="revert_to" enum="InputFocus" />
- <field type="CARD8" name="device_id" />
+ <field type="WINDOW" name="focus" altenum="InputFocus" />
+ <field type="TIMESTAMP" name="time" altenum="Time" />
+ <field type="CARD8" name="revert_to" enum="InputFocus" />
+ <field type="CARD8" name="device_id" />
</request>
<!-- GetFeedbackControl -->
- <request name="GetFeedbackControl" opcode="22">
- <field type="CARD8" name="device_id" />
- <pad bytes="3" />
- <reply>
- <pad bytes="1" />
- <field type="CARD16" name="num_feedback" />
- <pad bytes="22" />
- <!-- Uninterpreted: list of FeedbackState structures -->
- </reply>
- </request>
-
<enum name="FeedbackClass">
- <item name="Keyboard" />
- <item name="Pointer" />
- <item name="String" />
- <item name="Integer" />
- <item name="Led" />
- <item name="Bell" />
+ <item name="Keyboard" />
+ <item name="Pointer" />
+ <item name="String" />
+ <item name="Integer" />
+ <item name="Led" />
+ <item name="Bell" />
</enum>
- <struct name="FeedbackState">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- </struct>
-
<struct name="KbdFeedbackState">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="CARD16" name="pitch" />
- <field type="CARD16" name="duration" />
- <field type="CARD32" name="led_mask" />
- <field type="CARD32" name="led_values" />
- <field type="BOOL" name="global_auto_repeat" />
- <field type="CARD8" name="click" />
- <field type="CARD8" name="percent" />
- <pad bytes="1" />
- <list type="CARD8" name="auto_repeats"><value>32</value></list>
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="CARD16" name="pitch" />
+ <field type="CARD16" name="duration" />
+ <field type="CARD32" name="led_mask" />
+ <field type="CARD32" name="led_values" />
+ <field type="BOOL" name="global_auto_repeat" />
+ <field type="CARD8" name="click" />
+ <field type="CARD8" name="percent" />
+ <pad bytes="1" />
+ <list type="CARD8" name="auto_repeats">
+ <value>32</value>
+ </list>
</struct>
<struct name="PtrFeedbackState">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <pad bytes="2" />
- <field type="CARD16" name="accel_num" />
- <field type="CARD16" name="accel_denom" />
- <field type="CARD16" name="threshold" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <pad bytes="2" />
+ <field type="CARD16" name="accel_num" />
+ <field type="CARD16" name="accel_denom" />
+ <field type="CARD16" name="threshold" />
</struct>
<struct name="IntegerFeedbackState">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="CARD32" name="resolution" />
- <field type="INT32" name="min_value" />
- <field type="INT32" name="max_value" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="CARD32" name="resolution" />
+ <field type="INT32" name="min_value" />
+ <field type="INT32" name="max_value" />
</struct>
<struct name="StringFeedbackState">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="CARD16" name="max_symbols" />
- <field type="CARD16" name="num_keysyms" />
- <list type="KEYSYM" name="keysyms">
- <fieldref>num_keysyms</fieldref>
- </list>
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="CARD16" name="max_symbols" />
+ <field type="CARD16" name="num_keysyms" />
+ <list type="KEYSYM" name="keysyms">
+ <fieldref>num_keysyms</fieldref>
+ </list>
</struct>
<struct name="BellFeedbackState">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="CARD8" name="percent" />
- <pad bytes="3" />
- <field type="CARD16" name="pitch" />
- <field type="CARD16" name="duration" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="CARD8" name="percent" />
+ <pad bytes="3" />
+ <field type="CARD16" name="pitch" />
+ <field type="CARD16" name="duration" />
</struct>
<struct name="LedFeedbackState">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="CARD32" name="led_mask" />
- <field type="CARD32" name="led_values" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="CARD32" name="led_mask" />
+ <field type="CARD32" name="led_values" />
</struct>
- <!-- ChangeFeedbackControl
+ <struct name="FeedbackState">
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ </struct>
- <request name="ChangeFeedbackControl" opcode="23">
- <field type="CARD32" name="mask" />
- <field type="CARD8" name="device_id" />
- <field type="CARD8" name="feedback_id" />
- Uninterpreted: list of FeedbackCtl structures
+ <request name="GetFeedbackControl" opcode="22">
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD16" name="num_feedbacks" />
+ <pad bytes="22" />
+ <!-- Uninterpreted: list (feedbacks) of FeedbackState structures -->
+ </reply>
</request>
- -->
-
- <struct name="FeedbackCtl">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- </struct>
+ <!-- ChangeFeedbackControl -->
<struct name="KbdFeedbackCtl">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="KeyCode" name="key" />
- <field type="CARD8" name="auto_repeat_mode" />
- <field type="INT8" name="key_click_percent" />
- <field type="INT8" name="bell_percent" />
- <field type="INT16" name="bell_pitch" />
- <field type="INT16" name="bell_duration" />
- <field type="CARD32" name="led_mask" />
- <field type="CARD32" name="led_values" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="KeyCode" name="key" />
+ <field type="CARD8" name="auto_repeat_mode" />
+ <field type="INT8" name="key_click_percent" />
+ <field type="INT8" name="bell_percent" />
+ <field type="INT16" name="bell_pitch" />
+ <field type="INT16" name="bell_duration" />
+ <field type="CARD32" name="led_mask" />
+ <field type="CARD32" name="led_values" />
</struct>
<struct name="PtrFeedbackCtl">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <pad bytes="2" />
- <field type="INT16" name="num" />
- <field type="INT16" name="denom" />
- <field type="INT16" name="threshold" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <pad bytes="2" />
+ <field type="INT16" name="num" />
+ <field type="INT16" name="denom" />
+ <field type="INT16" name="threshold" />
</struct>
<struct name="IntegerFeedbackCtl">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="INT32" name="int_to_display" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="INT32" name="int_to_display" />
</struct>
<struct name="StringFeedbackCtl">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <pad bytes="2" />
- <field type="CARD16" name="num_keysyms" />
- <list type="KEYSYM" name="keysyms">
- <fieldref>num_keysyms</fieldref>
- </list>
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <pad bytes="2" />
+ <field type="CARD16" name="num_keysyms" />
+ <list type="KEYSYM" name="keysyms">
+ <fieldref>num_keysyms</fieldref>
+ </list>
</struct>
<struct name="BellFeedbackCtl">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="INT8" name="percent" />
- <pad bytes="3" />
- <field type="INT16" name="pitch" />
- <field type="INT16" name="duration" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="INT8" name="percent" />
+ <pad bytes="3" />
+ <field type="INT16" name="pitch" />
+ <field type="INT16" name="duration" />
</struct>
<struct name="LedFeedbackCtl">
- <field type="CARD8" name="class_id" enum="FeedbackClass" />
- <field type="CARD8" name="id" />
- <field type="CARD16" name="len" />
- <field type="CARD32" name="led_mask" />
- <field type="CARD32" name="led_values" />
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
+ <field type="CARD32" name="led_mask" />
+ <field type="CARD32" name="led_values" />
+ </struct>
+
+ <struct name="FeedbackCtl">
+ <field type="CARD8" name="class_id" enum="FeedbackClass" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD16" name="len" />
</struct>
+ <request name="ChangeFeedbackControl" opcode="23">
+ <field type="CARD32" name="mask" />
+ <field type="CARD8" name="device_id" />
+ <field type="CARD8" name="feedback_id" />
+ <!-- Uninterpreted: field (feedback) of FeedbackCtl structure -->
+ </request>
+
<!-- GetDeviceKeyMapping -->
<request name="GetDeviceKeyMapping" opcode="24">
- <field type="CARD8" name="device_id" />
- <field type="KeyCode" name="first_keycode" />
- <field type="CARD8" name="count" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="keysyms_per_keycode" />
- <pad bytes="23" />
- <list type="KEYSYM" name="keysyms">
- <fieldref>length</fieldref>
- </list>
- </reply>
+ <field type="CARD8" name="device_id" />
+ <field type="KeyCode" name="first_keycode" />
+ <field type="CARD8" name="count" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="keysyms_per_keycode" />
+ <pad bytes="23" />
+ <list type="KEYSYM" name="keysyms">
+ <!-- 'length' is a field in the header -->
+ <fieldref>length</fieldref>
+ </list>
+ </reply>
</request>
<!-- ChangeDeviceKeyMapping -->
<request name="ChangeDeviceKeyMapping" opcode="25">
- <field type="CARD8" name="device_id" />
- <field type="KeyCode" name="first_keycode" />
- <field type="CARD8" name="keysyms_per_keycode" />
- <field type="CARD8" name="keycode_count" />
- <list type="KEYSYM" name="keysyms">
- <op op="*">
- <fieldref>keycode_count</fieldref>
- <fieldref>keysyms_per_keycode</fieldref>
- </op>
- </list>
+ <field type="CARD8" name="device_id" />
+ <field type="KeyCode" name="first_keycode" />
+ <field type="CARD8" name="keysyms_per_keycode" />
+ <field type="CARD8" name="keycode_count" />
+ <list type="KEYSYM" name="keysyms">
+ <op op="*">
+ <fieldref>keycode_count</fieldref>
+ <fieldref>keysyms_per_keycode</fieldref>
+ </op>
+ </list>
</request>
<!-- GetDeviceModifierMapping -->
<request name="GetDeviceModifierMapping" opcode="26">
- <field type="CARD8" name="device_id" />
- <pad bytes="3" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="keycodes_per_modifier" />
- <pad bytes="23" />
- <list type="CARD8" name="keymaps">
- <op op="*">
- <fieldref>keycodes_per_modifier</fieldref>
- <value>8</value>
- </op>
- </list>
- </reply>
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="keycodes_per_modifier" />
+ <pad bytes="23" />
+ <list type="CARD8" name="keymaps">
+ <op op="*">
+ <fieldref>keycodes_per_modifier</fieldref>
+ <value>8</value>
+ </op>
+ </list>
+ </reply>
</request>
<!-- SetDeviceModifierMapping -->
<request name="SetDeviceModifierMapping" opcode="27">
- <field type="CARD8" name="device_id" />
- <field type="CARD8" name="keycodes_per_modifier" />
- <pad bytes="1" />
- <list type="CARD8" name="keymaps">
- <op op="*">
- <fieldref>keycodes_per_modifier</fieldref>
- <value>8</value>
- </op>
- </list>
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="status" enum="MappingStatus" />
- <pad bytes="23" />
- </reply>
+ <field type="CARD8" name="device_id" />
+ <field type="CARD8" name="keycodes_per_modifier" />
+ <pad bytes="1" />
+ <list type="CARD8" name="keymaps">
+ <op op="*">
+ <fieldref>keycodes_per_modifier</fieldref>
+ <value>8</value>
+ </op>
+ </list>
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" enum="MappingStatus" />
+ <pad bytes="23" />
+ </reply>
</request>
<!-- GetDeviceButtonMapping -->
<request name="GetDeviceButtonMapping" opcode="28">
- <field type="CARD8" name="device_id" />
- <pad bytes="3" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="map_size" />
- <pad bytes="23" />
- <list type="CARD8" name="map">
- <fieldref>map_size</fieldref>
- </list>
- </reply>
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="map_size" />
+ <pad bytes="23" />
+ <list type="CARD8" name="map">
+ <fieldref>map_size</fieldref>
+ </list>
+ </reply>
</request>
<!-- SetDeviceButtonMapping -->
<request name="SetDeviceButtonMapping" opcode="29">
- <field type="CARD8" name="device_id" />
- <field type="CARD8" name="map_size" />
- <pad bytes="2" />
- <list type="CARD8" name="map">
- <fieldref>map_size</fieldref>
- </list>
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="status" enum="MappingStatus" />
- <pad bytes="23" />
- </reply>
+ <field type="CARD8" name="device_id" />
+ <field type="CARD8" name="map_size" />
+ <pad bytes="2" />
+ <list type="CARD8" name="map">
+ <fieldref>map_size</fieldref>
+ </list>
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" enum="MappingStatus" />
+ <pad bytes="23" />
+ </reply>
</request>
<!-- QueryDeviceState -->
- <request name="QueryDeviceState" opcode="30">
- <field type="CARD8" name="device_id" />
- <pad bytes="3" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="num_classes" />
- <pad bytes="23" />
- <!-- Uninterpreted: list of InputState structures -->
- </reply>
- </request>
-
- <struct name="InputState">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="len" />
- <field type="CARD8" name="num_items" />
- </struct>
-
<struct name="KeyState">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="len" />
- <field type="CARD8" name="num_keys" />
- <pad bytes="1" />
- <list type="CARD8" name="keys">
- <value>32</value>
- </list>
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="len" />
+ <field type="CARD8" name="num_keys" />
+ <pad bytes="1" />
+ <list type="CARD8" name="keys">
+ <value>32</value>
+ </list>
</struct>
<struct name="ButtonState">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="len" />
- <field type="CARD8" name="num_buttons" />
- <pad bytes="1" />
- <list type="CARD8" name="buttons">
- <value>32</value>
- </list>
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="len" />
+ <field type="CARD8" name="num_buttons" />
+ <pad bytes="1" />
+ <list type="CARD8" name="buttons">
+ <value>32</value>
+ </list>
</struct>
<struct name="ValuatorState">
- <field type="CARD8" name="class_id" enum="InputClass" />
- <field type="CARD8" name="len" />
- <field type="CARD8" name="num_valuators" />
- <field type="CARD8" name="mode" />
- <list type="CARD32" name="valuators">
- <fieldref>num_valuators</fieldref>
- </list>
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="len" />
+ <field type="CARD8" name="num_valuators" />
+ <field type="CARD8" name="mode" />
+ <list type="CARD32" name="valuators">
+ <fieldref>num_valuators</fieldref>
+ </list>
</struct>
+ <struct name="InputState">
+ <field type="CARD8" name="class_id" enum="InputClass" />
+ <field type="CARD8" name="len" />
+ <field type="CARD8" name="num_items" />
+ </struct>
+
+ <request name="QueryDeviceState" opcode="30">
+ <field type="CARD8" name="device_id" />
+ <pad bytes="3" />
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="num_classes" />
+ <pad bytes="23" />
+ <!-- Uninterpreted: list (classes) of InputState structures -->
+ </reply>
+ </request>
+
<!-- SendExtensionEvent -->
<request name="SendExtensionEvent" opcode="31">
- <field type="WINDOW" name="destination" />
- <field type="CARD8" name="device_id" />
- <field type="BOOL" name="propagate" />
- <field type="CARD16" name="num_classes" />
- <field type="CARD8" name="num_events" />
- <pad bytes="3" />
- <list type="char" name="events">
- <op op="*">
- <fieldref>num_events</fieldref>
- <value>32</value>
- </op>
- </list>
- <list type="EventClass" name="classes">
- <fieldref>num_classes</fieldref>
- </list>
+ <field type="WINDOW" name="destination" />
+ <field type="CARD8" name="device_id" />
+ <field type="BOOL" name="propagate" />
+ <field type="CARD16" name="num_classes" />
+ <field type="CARD8" name="num_events" />
+ <pad bytes="3" />
+ <list type="CARD8" name="events">
+ <op op="*">
+ <fieldref>num_events</fieldref>
+ <value>32</value>
+ </op>
+ </list>
+ <list type="EventClass" name="classes">
+ <fieldref>num_classes</fieldref>
+ </list>
</request>
<!-- DeviceBell -->
<request name="DeviceBell" opcode="32">
- <field type="CARD8" name="device_id" />
- <field type="CARD8" name="feedback_id" />
- <field type="CARD8" name="feedback_class" />
- <field type="INT8" name="percent" />
+ <field type="CARD8" name="device_id" />
+ <field type="CARD8" name="feedback_id" />
+ <field type="CARD8" name="feedback_class" />
+ <field type="INT8" name="percent" />
</request>
<!-- SetDeviceValuators -->
<request name="SetDeviceValuators" opcode="33">
- <field type="CARD8" name="device_id" />
- <field type="CARD8" name="first_valuator" />
- <field type="CARD8" name="num_valuators" />
- <pad bytes="1" />
- <list type="INT32" name="valuators">
- <fieldref>num_valuators</fieldref>
- </list>
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="status" enum="GrabStatus" />
- <pad bytes="23" />
- </reply>
+ <field type="CARD8" name="device_id" />
+ <field type="CARD8" name="first_valuator" />
+ <field type="CARD8" name="num_valuators" />
+ <pad bytes="1" />
+ <list type="INT32" name="valuators">
+ <fieldref>num_valuators</fieldref>
+ </list>
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" enum="GrabStatus" />
+ <pad bytes="23" />
+ </reply>
</request>
<!-- GetDeviceControl -->
- <request name="GetDeviceControl" opcode="34">
- <field type="CARD16" name="control_id" />
- <field type="CARD8" name="device_id" />
- <pad bytes="1" />
- <reply>
- <pad bytes="1" />
- <field type="CARD8" name="status" altenum="GrabStatus" />
- <pad bytes="23" />
- <!-- Uninterpreted: list of DeviceState structures -->
- </reply>
- </request>
-
- <struct name="DeviceState">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- </struct>
+ <enum name="DeviceControl">
+ <item name="resolution"> <value>1</value> </item>
+ <item name="abs_calib"> <value>2</value> </item>
+ <item name="core"> <value>3</value> </item>
+ <item name="enable"> <value>4</value> </item>
+ <item name="abs_area"> <value>5</value> </item>
+ </enum>
<struct name="DeviceResolutionState">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="CARD32" name="num_valuators" />
- <list type="CARD32" name="resolution_values">
- <fieldref>num_valuators</fieldref>
- </list>
- <list type="CARD32" name="resolution_min">
- <fieldref>num_valuators</fieldref>
- </list>
- <list type="CARD32" name="resolution_max">
- <fieldref>num_valuators</fieldref>
- </list>
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="CARD32" name="num_valuators" />
+ <list type="CARD32" name="resolution_values">
+ <fieldref>num_valuators</fieldref>
+ </list>
+ <list type="CARD32" name="resolution_min">
+ <fieldref>num_valuators</fieldref>
+ </list>
+ <list type="CARD32" name="resolution_max">
+ <fieldref>num_valuators</fieldref>
+ </list>
</struct>
<struct name="DeviceAbsCalibState">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="INT32" name="min_x" />
- <field type="INT32" name="max_x" />
- <field type="INT32" name="min_y" />
- <field type="INT32" name="max_y" />
- <field type="CARD32" name="flip_x" />
- <field type="CARD32" name="flip_y" />
- <field type="CARD32" name="rotation" />
- <field type="CARD32" name="button_threshold" />
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="INT32" name="min_x" />
+ <field type="INT32" name="max_x" />
+ <field type="INT32" name="min_y" />
+ <field type="INT32" name="max_y" />
+ <field type="CARD32" name="flip_x" />
+ <field type="CARD32" name="flip_y" />
+ <field type="CARD32" name="rotation" />
+ <field type="CARD32" name="button_threshold" />
</struct>
<struct name="DeviceAbsAreaState">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="CARD32" name="offset_x" />
- <field type="CARD32" name="offset_y" />
- <field type="CARD32" name="width" />
- <field type="CARD32" name="height" />
- <field type="CARD32" name="screen" />
- <field type="CARD32" name="following" />
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="CARD32" name="offset_x" />
+ <field type="CARD32" name="offset_y" />
+ <field type="CARD32" name="width" />
+ <field type="CARD32" name="height" />
+ <field type="CARD32" name="screen" />
+ <field type="CARD32" name="following" />
</struct>
<struct name="DeviceCoreState">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="CARD8" name="status" />
- <field type="CARD8" name="iscore" />
- <pad bytes="2" />
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="CARD8" name="status" />
+ <field type="CARD8" name="iscore" />
+ <pad bytes="2" />
</struct>
<struct name="DeviceEnableState">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="CARD8" name="enable" />
- <pad bytes="3" />
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="CARD8" name="enable" />
+ <pad bytes="3" />
</struct>
- <!-- ChangeDeviceControl
+ <struct name="DeviceState">
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ </struct>
- <request name="ChangeDeviceControl" opcode="35">
- <field type="CARD16" name="control_id" />
- <field type="CARD8" name="device_id" />
- <pad bytes="1" />
- Uninterpreted: list of DeviceCtl structures
- <reply>
- <pad byte="1" />
+ <request name="GetDeviceControl" opcode="34">
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD8" name="device_id" />
+ <pad bytes="1" />
+ <reply>
+ <pad bytes="1" />
<field type="CARD8" name="status" altenum="GrabStatus" />
<pad bytes="23" />
- </reply>
+ <!-- Uninterpreted: field (control) of DeviceState structure -->
+ </reply>
</request>
- -->
-
- <struct name="DeviceCtl">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- </struct>
+ <!-- ChangeDeviceControl -->
<struct name="DeviceResolutionCtl">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="CARD8" name="first_valuator" />
- <field type="CARD8" name="num_valuators" />
- <list type="CARD32" name="resolution_values">
- <fieldref>num_valuators</fieldref>
- </list>
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="CARD8" name="first_valuator" />
+ <field type="CARD8" name="num_valuators" />
+ <list type="CARD32" name="resolution_values">
+ <fieldref>num_valuators</fieldref>
+ </list>
</struct>
<struct name="DeviceAbsCalibCtl">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="INT32" name="min_x" />
- <field type="INT32" name="max_x" />
- <field type="INT32" name="min_y" />
- <field type="INT32" name="max_y" />
- <field type="CARD32" name="flip_x" />
- <field type="CARD32" name="flip_y" />
- <field type="CARD32" name="rotation" />
- <field type="CARD32" name="button_threshold" />
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="INT32" name="min_x" />
+ <field type="INT32" name="max_x" />
+ <field type="INT32" name="min_y" />
+ <field type="INT32" name="max_y" />
+ <field type="CARD32" name="flip_x" />
+ <field type="CARD32" name="flip_y" />
+ <field type="CARD32" name="rotation" />
+ <field type="CARD32" name="button_threshold" />
</struct>
<struct name="DeviceAbsAreaCtrl">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="CARD32" name="offset_x" />
- <field type="CARD32" name="offset_y" />
- <field type="INT32" name="width" />
- <field type="INT32" name="height" />
- <field type="INT32" name="screen" />
- <field type="CARD32" name="following" />
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="CARD32" name="offset_x" />
+ <field type="CARD32" name="offset_y" />
+ <field type="INT32" name="width" />
+ <field type="INT32" name="height" />
+ <field type="INT32" name="screen" />
+ <field type="CARD32" name="following" />
</struct>
<struct name="DeviceCoreCtrl">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="CARD8" name="status" />
- <pad bytes="3" />
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="CARD8" name="status" />
+ <pad bytes="3" />
</struct>
<struct name="DeviceEnableCtrl">
- <field type="CARD16" name="control_id" />
- <field type="CARD16" name="len" />
- <field type="CARD8" name="enable" />
- <pad bytes="3" />
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ <field type="CARD8" name="enable" />
+ <pad bytes="3" />
</struct>
- <!-- EVENTS -->
+ <struct name="DeviceCtl">
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD16" name="len" />
+ </struct>
+
+ <request name="ChangeDeviceControl" opcode="35">
+ <field type="CARD16" name="control_id" enum="DeviceControl" />
+ <field type="CARD8" name="device_id" />
+ <pad bytes="1" />
+ <!-- Uninterpreted: field (control) of DeviceCtl structure -->
+ <reply>
+ <pad bytes="1" />
+ <field type="CARD8" name="status" altenum="GrabStatus" />
+ <pad bytes="23" />
+ </reply>
+ </request>
+
+ <!-- â
â
â
Events (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+ <!-- Notes:
+ - A 'len' field in a v1++ structure is in bytes.
+ -->
<event name="DeviceValuator" number="0">
- <field type="CARD8" name="device_id" />
- <field type="CARD16" name="device_state" />
- <field type="CARD8" name="num_valuators" />
- <field type="CARD8" name="first_valuator" />
- <list type="INT32" name="valuators"><value>6</value></list>
+ <field type="CARD8" name="device_id" />
+ <field type="CARD16" name="device_state" />
+ <field type="CARD8" name="num_valuators" />
+ <field type="CARD8" name="first_valuator" />
+ <list type="INT32" name="valuators">
+ <value>6</value>
+ </list>
</event>
<event name="DeviceKeyPress" number="1">
- <field type="BYTE" name="detail" />
- <field type="TIMESTAMP" name="time" />
- <field type="WINDOW" name="root" />
- <field type="WINDOW" name="event" />
- <field type="WINDOW" name="child" altenum="Window" />
- <field type="INT16" name="root_x" />
- <field type="INT16" name="root_y" />
- <field type="INT16" name="event_x" />
- <field type="INT16" name="event_y" />
- <field type="CARD16" name="state" />
- <field type="BOOL" name="same_screen" />
- <field type="CARD8" name="device_id" />
+ <field type="BYTE" name="detail" />
+ <field type="TIMESTAMP" name="time" />
+ <field type="WINDOW" name="root" />
+ <field type="WINDOW" name="event" />
+ <field type="WINDOW" name="child" altenum="Window" />
+ <field type="INT16" name="root_x" />
+ <field type="INT16" name="root_y" />
+ <field type="INT16" name="event_x" />
+ <field type="INT16" name="event_y" />
+ <field type="CARD16" name="state" />
+ <field type="BOOL" name="same_screen" />
+ <field type="CARD8" name="device_id" />
</event>
- <eventcopy name="DeviceKeyRelease" number="2" ref="DeviceKeyPress" />
- <eventcopy name="DeviceButtonPress" number="3" ref="DeviceKeyPress" />
+ <eventcopy name="DeviceKeyRelease" number="2" ref="DeviceKeyPress" />
+ <eventcopy name="DeviceButtonPress" number="3" ref="DeviceKeyPress" />
<eventcopy name="DeviceButtonRelease" number="4" ref="DeviceKeyPress" />
- <eventcopy name="DeviceMotionNotify" number="5" ref="DeviceKeyPress" />
- <eventcopy name="ProximityIn" number="8" ref="DeviceKeyPress" />
- <eventcopy name="ProximityOut" number="9" ref="DeviceKeyPress" />
-
- <event name="FocusIn" number="6">
- <field type="BYTE" name="detail" enum="NotifyDetail" />
- <field type="TIMESTAMP" name="time" />
- <field type="WINDOW" name="window" />
- <field type="BYTE" name="mode" enum="NotifyMode" />
- <field type="CARD8" name="device_id" />
- <pad bytes="18" />
+ <eventcopy name="DeviceMotionNotify" number="5" ref="DeviceKeyPress" />
+
+ <event name="DeviceFocusIn" number="6">
+ <field type="BYTE" name="detail" enum="NotifyDetail" />
+ <field type="TIMESTAMP" name="time" />
+ <field type="WINDOW" name="window" />
+ <field type="BYTE" name="mode" enum="NotifyMode" />
+ <field type="CARD8" name="device_id" />
+ <pad bytes="18" />
</event>
- <eventcopy name="FocusOut" number="7" ref="FocusIn" />
+ <eventcopy name="DeviceFocusOut" number="7" ref="DeviceFocusIn" />
+ <eventcopy name="ProximityIn" number="8" ref="DeviceKeyPress" />
+ <eventcopy name="ProximityOut" number="9" ref="DeviceKeyPress" />
<event name="DeviceStateNotify" number="10">
- <field type="BYTE" name="device_id" />
- <field type="TIMESTAMP" name="time" />
- <field type="CARD8" name="num_keys" />
- <field type="CARD8" name="num_buttons" />
- <field type="CARD8" name="num_valuators" />
- <field type="CARD8" name="classes_reported" />
- <list type="CARD8" name="buttons">
+ <field type="BYTE" name="device_id" />
+ <field type="TIMESTAMP" name="time" />
+ <field type="CARD8" name="num_keys" />
+ <field type="CARD8" name="num_buttons" />
+ <field type="CARD8" name="num_valuators" />
+ <field type="CARD8" name="classes_reported" />
+ <list type="CARD8" name="buttons">
<value>4</value>
- </list>
- <list type="CARD8" name="keys">
+ </list>
+ <list type="CARD8" name="keys">
<value>4</value>
- </list>
- <list type="CARD32" name="valuators">
- <value>3</value>
- </list>
+ </list>
+ <list type="CARD32" name="valuators">
+ <value>3</value>
+ </list>
</event>
<event name="DeviceMappingNotify" number="11">
- <field type="BYTE" name="device_id" />
- <field type="CARD8" name="request" />
- <field type="KeyCode" name="first_keycode" />
- <field type="CARD8" name="count" />
- <pad bytes="1" />
- <field type="TIMESTAMP" name="time" />
- <pad bytes="20" />
+ <field type="BYTE" name="device_id" />
+ <field type="CARD8" name="request" />
+ <field type="KeyCode" name="first_keycode" />
+ <field type="CARD8" name="count" />
+ <pad bytes="1" />
+ <field type="TIMESTAMP" name="time" />
+ <pad bytes="20" />
</event>
<event name="ChangeDeviceNotify" number="12">
- <field type="BYTE" name="device_id" />
- <field type="TIMESTAMP" name="time" />
- <field type="CARD8" name="request" />
- <pad bytes="23" />
+ <field type="BYTE" name="device_id" />
+ <field type="TIMESTAMP" name="time" />
+ <field type="CARD8" name="request" />
+ <pad bytes="23" />
</event>
<event name="DeviceKeyStateNotify" number="13">
- <field type="BYTE" name="device_id" />
- <list type="CARD8" name="keys">
+ <field type="BYTE" name="device_id" />
+ <list type="CARD8" name="keys">
<value>28</value>
- </list>
+ </list>
</event>
<event name="DeviceButtonStateNotify" number="14">
- <field type="BYTE" name="device_id" />
- <list type="CARD8" name="buttons">
+ <field type="BYTE" name="device_id" />
+ <list type="CARD8" name="buttons">
<value>28</value>
- </list>
+ </list>
</event>
+ <!-- â
â
â
Events (v1.4) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <enum name="DeviceChange">
+ <item name="Added" />
+ <item name="Removed" />
+ <item name="Enabled" />
+ <item name="Disabled" />
+ <item name="Unrecoverable" />
+ <item name="ControlChanged" />
+ </enum>
+
<event name="DevicePresenceNotify" number="15">
<pad bytes="1" />
<field type="TIMESTAMP" name="time" />
- <field type="BYTE" name="devchange" />
- <field type="BYTE" name="device_id" />
- <field type="CARD16" name="control" />
- <pad bytes="20" />
+ <field type="BYTE" name="devchange" enum="DeviceChange" />
+ <field type="BYTE" name="device_id" />
+ <field type="CARD16" name="control" />
+ <pad bytes="20" />
</event>
- <!-- ERRORS -->
- <error name="Device" number="0" />
- <error name="Event" number="1" />
- <error name="Mode" number="2" />
+ <!-- â
â
â
Errors (v1.0) â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
â
-->
+
+ <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" />
+ <error name="Class" number="4" />
</xcb>
More information about the xcb-commit
mailing list