From: Christian Linhart Date: Wed, 3 Sep 2014 11:17:58 +0000 (+0200) Subject: xinput: ListInputDevices: full support X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?p=free-sw%2Fxcb%2Fproto;a=commitdiff_plain;h=e9f77b83812c7ed780c751345c3f484814296101 xinput: ListInputDevices: full support * define struct InputInfo with switch-case * define the lists "infos" and "names" * the list "infos" requires a new xml-construct: with a nested expression, to access fields of the list which is iterated by sumof. spec: http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt?id=inputproto-2.3.1#n305 http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml?id=libXi-1.7.4#n715 code: http://cgit.freedesktop.org/xorg/lib/libXi/tree/src/XListDev.c?id=libXi-1.7.4 Both specs are misleading ( or buggy ) in the following aspect: In both specs, struct Deviceinfo is defined to contain a list of InputInfo and a list of STR. But, by analyzing the code in libXi, it was clear that * InputInfo is contained in an extra toplevel list in the reply ListInputDevices * the strings ( struct xproto:STR ) are also contained in a toplevel list in the reply Message-ID: <1409743080-302-5-git-send-email-chris@demorecorder.com> Patch-Thread-Subject: [Xcb] xinput: make ListInputDevices work, sumof with nested expr, ... Patch-Set: ListInputDevices Patch-Number: proto 5/7 Patch-Version: V1 Signed-off-by: Christian Linhart --- diff --git a/src/xinput.xml b/src/xinput.xml index 7f7b0a6..b20a069 100644 --- a/src/xinput.xml +++ b/src/xinput.xml @@ -217,6 +217,29 @@ in struct DeviceTimeCoord. + + class_id + + Key + + + + + + + Button + + + + Valuator + + + + + axes_len + + + @@ -234,9 +257,15 @@ in struct DeviceTimeCoord. devices_len - - + + + num_class_info + + + + devices_len + +