Christian Linhart [Mon, 8 Sep 2014 00:29:10 +0000 (02:29 +0200)]
xinput: update TODO: remove parametrized structs
Message-ID: <
1410136150-30254-5-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] parametrized structs implemented
Patch-Set: ParametrizedStruct
Patch-Number: proto 5/5
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Mon, 8 Sep 2014 00:29:09 +0000 (02:29 +0200)]
xinput: rep GetDeviceMotionEvents: full support
complete definition of reply GetDeviceMotionEvents and struct DeviceTimeCoord
using paramref.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt?id=inputproto-2.3.1#n912
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml?id=libXi-1.7.4#n983
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h?id=inputproto-2.3.1#n461
Message-ID: <
1410136150-30254-4-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] parametrized structs implemented
Patch-Set: ParametrizedStruct
Patch-Number: proto 4/5
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Mon, 8 Sep 2014 00:29:08 +0000 (02:29 +0200)]
xcb-doc: add paramref
The first paragraph of the description is loosely based on
a description proposed by Ran Benita.
Message-ID: <
1410136150-30254-3-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] parametrized structs implemented
Patch-Set: ParametrizedStruct
Patch-Number: proto 3/5
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Mon, 8 Sep 2014 00:29:07 +0000 (02:29 +0200)]
schema: add paramref
Message-ID: <
1410136150-30254-2-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] parametrized structs implemented
Patch-Set: ParametrizedStruct
Patch-Number: proto 2/5
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Mon, 8 Sep 2014 00:29:06 +0000 (02:29 +0200)]
xcbgen: support paramref in the parser
paramref is similar to fieldref, but has a type attribute.
Message-ID: <
1410136150-30254-1-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] parametrized structs implemented
Patch-Set: ParametrizedStruct
Patch-Number: proto 1/5
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 15:49:02 +0000 (17:49 +0200)]
xinput: remove TODO-entry for popcount of a list
Message-ID: <
1409845742-38797-8-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: proto 8/8
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 15:49:01 +0000 (17:49 +0200)]
xinput: RawEvents: support lists axisvalues and axisvalues_raw
Support the lists axisvalues and axisvalues_raw in RawEvents.
These are RawKeyPress, RawButtonPress, RawTouchBegin and their eventcopies.
The length of both lists is determined by the number of bits set in the
list valuator_mask. This is solved in the same way as for event KeyPress.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt?id=inputproto-2.3.1#n2362
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h?id=inputproto-2.3.1#n980
Message-ID: <
1409845742-38797-7-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: proto 7/8
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 15:49:00 +0000 (17:49 +0200)]
xinput: ev ButtonPress, TouchBegin: support list axisvalues
These events are identical to KeyPress, so needed to be changed the same way.
( in the spec, these are all listed under DeviceEvent )
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt?id=inputproto-2.3.1#n2214
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h?id=inputproto-2.3.1#n944
Message-ID: <
1409845742-38797-6-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: proto 6/8
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 15:48:59 +0000 (17:48 +0200)]
xinput: ev KeyPress: support list axisvalues
The length of list axisvalues is determined by the number of bits set in the
list valuator_mask.
This is computed using sumof over popcount of the list-elements of valuator_mask.
This uses the new expression type <listelement-ref/> which refers to the current
list-element iterated by sumof.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt?id=inputproto-2.3.1#n2214
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h?id=inputproto-2.3.1#n944
Message-ID: <
1409845742-38797-5-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: proto 5/8
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 15:48:58 +0000 (17:48 +0200)]
xcb-schema: add listelement-ref
Message-ID: <
1409845742-38797-4-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: proto 4/8
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 15:48:57 +0000 (17:48 +0200)]
doc: new expr element listelement-ref
Message-ID: <
1409845742-38797-3-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: proto 3/8
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 15:48:56 +0000 (17:48 +0200)]
xcbgen: new expr-type listelement-ref
Add parser-support for the new expression-type "listelement-ref"
which represents the current list-element when used inside
a list-iteration expression such as <sumof>.
This patch includes computation of the flag "contains_listelement_ref"
which is set to True when an expression or any of its
subexpressions is a listelement-ref.
(This is needed by the generator)
Message-ID: <
1409845742-38797-2-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: proto 2/8
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 15:48:55 +0000 (17:48 +0200)]
present: specify length of RedirectNotify.notifies
The list "notifies" of the event RedirectNotify didn't have
a length.
The missing length has caused uncompilable C-Code with our
event-acessors patch because the length-acessor for that list
has used an undeclared variable for the list-length.
Having a length for that list is good anyways for ease of use.
Since the event doesn't contain a field which specifies the
length of the list, the length is derived from the length
of the event.
spec:
http://cgit.freedesktop.org/xorg/proto/presentproto/tree/presentproto.txt?id=presentproto-1.0#n429
http://cgit.freedesktop.org/xorg/proto/presentproto/tree/presentproto.txt?id=presentproto-1.0#n710
note:
The event definition starting at line 429 lists the relationship between
length of event ( "length" ) and length of list ( "n" )
as 17+2n where as the definition starting at line 710
lists 18+2n. The latter is correct according to my verification.
The spec should be fixed.
Message-ID: <
1409845742-38797-1-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] support popcount of a list and associated xml changes
Patch-Set: PopcountList
Patch-Number: proto 1/8
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:21 +0000 (10:53 +0200)]
xinput: rep XIGetProperty: replace bitcase with case
Message-ID: <
1409820801-43629-10-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 10/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:20 +0000 (10:53 +0200)]
xinput: req XIChangeProperty: replace bitcase with case
Message-ID: <
1409820801-43629-9-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 09/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:19 +0000 (10:53 +0200)]
xinput: rep GetDeviceProperty: replace bitcase with case
Message-ID: <
1409820801-43629-8-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 08/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:18 +0000 (10:53 +0200)]
xinput: cleanup the TODO-list
Message-ID: <
1409820801-43629-7-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 07/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Mon, 20 Oct 2014 10:18:15 +0000 (12:18 +0200)]
xinput: struct DeviceClass: full support
replace uninterpreted_data by switch-case
this is needed by struct XIDeviceInfo which is needed by reply XIQueryDevice.
changes for V2 of this patch:
* remove the pad after "sourceid" because that space is used by the first two bytes defined inside each case of the bit-case.
( noticed that problem by testing )
changes for V3 of this patch:
* adapt to removal of patches "proto 6/7 and 7/7" in patchset ListInputDevices:
adjust linenumbers in the patch accordingly
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt?id=inputproto-2.3.1#n752
Note:
The spec lists TOUCHCLASS.num_touches as a CARD16 but the XI2proto.h header and the xml
use the type CARD8 for it.
Is this a spec bug?
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2.h?id=inputproto-2.3.1#n138
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h?id=inputproto-2.3.1#n117
Message-ID: <
5444E167.8090702@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 06/10
Patch-Version: V3
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:16 +0000 (10:53 +0200)]
xinput: struct HierarchyChange: full support
replace uninterpreted_data by switch-case
this is needed by request XIChangeHierarchy.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt?id=inputproto-2.3.1#n1170
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2.h?id=inputproto-2.3.1#n118
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h?id=inputproto-2.3.1#n444
Message-ID: <
1409820801-43629-5-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 05/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:15 +0000 (10:53 +0200)]
xinput: struct DeviceCtl: full support
replace uninterpreted_data by switch-case
this is needed by request ChangeDeviceControl.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt?id=inputproto-2.3.1#n688
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml?id=libXi-1.7.4#n1907
Note: Only the DeviceCtl of type DeviceResolution is defined in both specs.
( this is struct name="DeviceResolutionCtl" in the xml. )
The other DeviceCtls are not defined in any of the specs.
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h?id=inputproto-2.3.1#n170
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h?id=inputproto-2.3.1#n1343
Message-ID: <
1409820801-43629-4-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 04/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:14 +0000 (10:53 +0200)]
xinput: struct DeviceState: full support
replace uninterpreted_data by switch-case
this is needed by reply GetDeviceControl.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt?id=inputproto-2.3.1#n640
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml?id=libXi-1.7.4#n1856
Note: Only the DeviceControl of type DeviceResolution is defined in both specs.
( this is struct name="DeviceResolutionState" in the xml. )
The other DeviceControls are not defined in any of the specs.
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h?id=inputproto-2.3.1#n170
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h?id=inputproto-2.3.1#n1263
Message-ID: <
1409820801-43629-3-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 03/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:13 +0000 (10:53 +0200)]
xinput: struct FeedbackCtl: full support
replace uninterpreted_data by switch-case
this is needed by request ChangeFeedbackControl.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt?id=inputproto-2.3.1#n1719
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml?id=libXi-1.7.4#n1445
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h?id=inputproto-2.3.1#n244
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h?id=inputproto-2.3.1#n862
Message-ID: <
1409820801-43629-2-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 02/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Thu, 4 Sep 2014 08:53:12 +0000 (10:53 +0200)]
xinput: struct FeedbackState: full support
replace uninterpreted_data by switch-case
this is needed by reply GetFeedbackControl.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt?id=inputproto-2.3.1#n1613
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml?id=libXi-1.7.4#n1341
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h?id=inputproto-2.3.1#n244
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h?id=inputproto-2.3.1#n754
Message-ID: <
1409820801-43629-1-git-send-email-chris@demorecorder.com>
Patch-Thread-Subject: [Xcb] xinput: xml-fixes possible with new generator features
Patch-Set: XmlFixesNewGenerator
Patch-Number: proto 01/10
Patch-Version: V1
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Christian Linhart [Sun, 2 Nov 2014 12:47:43 +0000 (13:47 +0100)]
xinput: remove TODO-entry for sumof and ListInputDevices
Note: patches 6 and 7 of this patchset were removed during the review process.
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Message-ID: <
545627EF.8020708@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2
Patch-Set: ListInputDevices
Patch-Number: proto 8/8
Patch-Version: V1
Christian Linhart [Sun, 2 Nov 2014 12:47:38 +0000 (13:47 +0100)]
xinput: ListInputDevices: full support
* define struct InputInfo with switch-case
* define the lists "infos" and "names"
* the list "infos" requires a new xml-construct:
<sumof> 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
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Message-ID: <
545627EA.8010408@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2
Patch-Set: ListInputDevices
Patch-Number: proto 5/8
Patch-Version: V1
Christian Linhart [Sun, 2 Nov 2014 12:47:29 +0000 (13:47 +0100)]
xcbgen: sumof with nested expression
Add parser support for sumof with a nested expression.
For example:
<sumof ref="mylist1">
<fieldref>bar</fieldref>
</sumof>
The nested expression is added as the "rhs"-field of the
expression.object.
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Message-ID: <
545627E1.8070302@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2
Patch-Set: ListInputDevices
Patch-Number: proto 4/8
Patch-Version: V1
Christian Linhart [Sun, 2 Nov 2014 12:47:23 +0000 (13:47 +0100)]
schema: add rule for sumof with nested expression
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Message-ID: <
545627DB.5090101@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2
Patch-Set: ListInputDevices
Patch-Number: proto 3/8
Patch-Version: V1
Christian Linhart [Sun, 2 Nov 2014 12:47:17 +0000 (13:47 +0100)]
xml-doc: add sumof with nested expression
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Message-ID: <
545627D5.4010008@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2
Patch-Set: ListInputDevices
Patch-Number: proto 2/8
Patch-Version: V1
Christian Linhart [Sun, 2 Nov 2014 12:47:07 +0000 (13:47 +0100)]
xcbgen: fields get a parent reference
Objects of type Field get a reference to their parent.
This is needed in the generator to differentiate
field handling dependend on properties of their parent.
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Message-ID: <
545627CB.1000606@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] [PATCHSET] ListInputDevices revision 2
Patch-Set: ListInputDevices
Patch-Number: proto 1/8
Patch-Version: V1
Christian Linhart [Fri, 29 Aug 2014 17:35:50 +0000 (19:35 +0200)]
xinput: rep QueryDeviceState struct InputState: full support
Full support for the QueryDeviceState reply.
This has been done by changing the struct InputState
with using switch-case and implicit-padding="false".
Also fixed the type of field valuators of struct ValuatorState
from CARD32 to INT32.
V2: patch revised:
* removed the implicit-padding="false" attribute, according
to the discussion in this thread.
* give names to the cases, which generates more beautiful code.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt?id=inputproto-2.3.1#n2082
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml?id=libXi-1.7.4#n1728
Message-ID: <
5400B9F6.5000208@DemoRecorder.com>
Patch-Thread-Subject: [Xcb] xinput:QueryDeviceState: full-support: generator and xml-changes
Patch-Set: QueryDeviceState
Patch-Number: proto 2/2
Patch-Version: V2
Signed-off-by: Christian Linhart <chris@DemoRecorder.com>
Reviewed-By: Ran Benita <ran234@gmail.com>
Christian Linhart [Mon, 25 Aug 2014 14:58:37 +0000 (16:58 +0200)]
schema: add switch-case
Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Christian Linhart [Tue, 19 Aug 2014 13:55:34 +0000 (15:55 +0200)]
xinput: req ChangeDeviceProperty: bitcase to case
Change the bitcases to cases
and remove the comment which says that bitcases should converted to cases.
Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Christian Linhart [Tue, 19 Aug 2014 13:55:33 +0000 (15:55 +0200)]
xcbgen-parser: support switch-case
"case" is implemented as a variation of "bitcase" as follows:
The old class "BitCaseType" became the abstract class
"CaseOrBitcaseType" with two derived classes
"CaseType" and "BitcaseType".
(Therefore BitcaseType keeps the old semantic which may
be important for some generators)
There are two additional flags in class Type:
* is_case
* is_case_or_bitcase
The latter is for convenience because case and bitcase
have to be treated the same way in many cases.
The list of cases and bitcases in a SwitchType object
is still called "bitcases".
Reasons:
* Renaming that list would break generators based on the parser.
* Creating an extra list for cases would make other code more
complicated because you usually want to iterate over all
case and bitcase members of a switch.
Reviewed-by: Ran Benita <ran234@gmail.com>
Christian Linhart [Wed, 20 Aug 2014 09:10:35 +0000 (11:10 +0200)]
xml-xcb spec: describe switch-case
V2: patch revised according to suggestion from Peter Harris:
* add the restriction that <enumref>
inside <bitcase> can only refer to an enum's <bit> members, and
<enumref> inside <case> can only refer to an enum's <value> members.
Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Peter Harris [Mon, 25 Aug 2014 23:31:36 +0000 (19:31 -0400)]
Merge infra-srv1.demorecorder.com/git/free-sw/xcb/proto
See the mailing list for Reviewed-bys.
Thread root is
http://lists.freedesktop.org/archives/xcb/2014-August/009632.html
Ran Benita [Mon, 25 Aug 2014 14:20:55 +0000 (17:20 +0300)]
Add "altmask" attribute, like "altenum" for masks
"altmask" means the field is principally a bitmask of bits from the
enum, but in some cases can obtain other values (e.g. "out-of-band" data
in a free bit).
Several fields in xinput will benefit from this extra metadata.
Suggested-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Ran Benita <ran234@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
Christian Linhart [Fri, 22 Aug 2014 10:11:50 +0000 (12:11 +0200)]
xinput: add TODO list
Add TODO list of things which cannot be done yet
with the current feature-set of xml and the generator.
V2: Fix reference in the parametrized struct-paragraph:
to correctly refer to the GetDeviceMotionEvents-reply
(instead of the ChangeKeyboardDevice-request which
does not need parametrized structs.)
Christian Linhart [Mon, 18 Aug 2014 14:41:22 +0000 (16:41 +0200)]
xinput: replace initial pad of xinput1.x replies with field
Replace the initial 1-byte pad of Xinput-1.x replies
with CARD8-field "xi_reply_type", according to XIproto.h.
This may also help to implement assertions
based on the value of that field.
reference:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n187
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/getvers.c#n103
Christian Linhart [Mon, 18 Aug 2014 14:41:21 +0000 (16:41 +0200)]
xinput: rep SetDeviceMode.status: altenum to enum
Field "status" of the SetDeviceMode-reply
only allows values from enum GrabStatus.
Therefore it has an "enum" and not an "altenum".
Also: Add comment about valid values of field "status".
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n601
note:
The following spec also mentions value "3 + first_error":
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n891
This is probably an error in this old spec because:
* the X-Server code does not generate that value.
In case of error-codes, it does the following:
instead of sending the reply it returns
rep.status containing the error-code as returnvalue
of the function ProcXSetDeviceMode.
This will probably cause the sending of an XError.
code:
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/setmode.c#n86
* the new spec does not mention that value:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n601
Christian Linhart [Mon, 18 Aug 2014 14:41:20 +0000 (16:41 +0200)]
xinput: struct XIDeviceInfo.name: cleanup of padding
Previuosly, the padding of list "name"
has been done by faking another list-length.
Correct this by using the real list-length,
and by adding a 4-byte align-pad after the list.
This yields the same total length of the struct,
and uses the correct length of the list "name".
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n768
code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/src/XIQueryDevice.c#n92
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/xiquerydevice.c#n477
Christian Linhart [Mon, 25 Aug 2014 10:08:57 +0000 (12:08 +0200)]
xinput: req XIPassiveGrabDevice.time: field is unused
The request-field "time" is unused.
Add a comment about this.
V2: patch revised according to the following fix in the spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/commit/?id=
81378a1e7139af9d476d90df8737c0c1a58670f3
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt?id=
81378a1e7139af9d476d90df8737c0c1a58670f3#n1699
code:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h?id=inputproto-2.3.1#n680
Christian Linhart [Mon, 18 Aug 2014 13:00:02 +0000 (15:00 +0200)]
xinput: ev BarrierHit.flags: add new mask
add new enum "BarrierFlags" as mask to field "flags"
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n2575
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2.h#n164
Christian Linhart [Sat, 23 Aug 2014 11:05:43 +0000 (13:05 +0200)]
xinput: ev DeviceStateNotify.classes_reported: mask
add new enum "ClassesReportedMask" as mask to field "classes_reported"
V2: patch revised according to suggestion from Peter Harris:
* use names which indicate the way the bits should be flipped
V3: revised the diff-context according to the modification of patch 18/22 V2
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2401
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n2220
Christian Linhart [Fri, 22 Aug 2014 15:26:10 +0000 (17:26 +0200)]
xinput: ev DeviceButtonStateNotify.device_id: mask
add mask "MoreEventsMask" to field "device_id"
V2: patch revised according to suggestion from Peter Harris:
* use "altmask" instead of "mask"
because all the legal values of device_id are not described
by the <bit> elements of MoreEventsMask.
V3: revised the diff-context according to the modification of patch 19/22 V2.
spec:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n2252
http://cgit.freedesktop.org/xorg/xserver/tree/dix/enterleave.c#n725
note:
this mask is missing in the following spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2431
Christian Linhart [Tue, 19 Aug 2014 11:13:54 +0000 (13:13 +0200)]
xinput: ev DeviceKeyStateNotify.device_id: mask
add mask "MoreEventsMask" to field "device_id"
V2: patch revised according to suggestion from Peter Harris:
* use "altmask" instead of "mask"
because all the legal values of device_id are not described
by the <bit> elements of MoreEventsMask.
spec:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n2239
http://cgit.freedesktop.org/xorg/xserver/tree/dix/enterleave.c#n745
note:
this mask is missing in the following spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2428
Christian Linhart [Tue, 19 Aug 2014 11:13:43 +0000 (13:13 +0200)]
xinput: ev DeviceStateNotify.device_id: mask
add mask "MoreEventsMask" to field "device_id"
V2: patch revised according to suggestion from Peter Harris:
* use "altmask" instead of "mask"
because all the legal values of device_id are not described
by the <bit> elements of MoreEventsMask.
spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n2214
http://cgit.freedesktop.org/xorg/xserver/tree/dix/enterleave.c#n725
note:
this mask is missing in the following spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2395
Christian Linhart [Tue, 19 Aug 2014 11:13:24 +0000 (13:13 +0200)]
xinput: ev DeviceKeyPress.device_id: add mask
for event DeviceKeyPress and derived ones:
add new mask "MoreEventsMask" to field "device_id"
V2: patch revised according to suggestion from Peter Harris:
* use "altmask" instead of "mask"
because all the legal values of device_id are not described
by the <bit> elements of MoreEventsMask.
spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1999
http://cgit.freedesktop.org/xorg/lib/libXi/tree/src/XExtInt.c#n534
http://cgit.freedesktop.org/xorg/xserver/tree/dix/eventconvert.c#n348
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/exevents.c#n188
note:
this mask is missing in the following spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2257
Christian Linhart [Tue, 19 Aug 2014 11:13:06 +0000 (13:13 +0200)]
xinput: new enum for device_id in some events
add new enum "MoreEventsMask" to be used
by event DeviceKeyPress and derived ones
for field "device_id".
V2: patch revised according to suggestion from Peter Harris:
* remove DeviceBits = 0x7f from the enum in order to avoid
mixing bit and value in the same enum.
( We'd need a way to specify a range of bits for that ... )
spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1999
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n67
http://cgit.freedesktop.org/xorg/lib/libXi/tree/src/XExtInt.c#n534
http://cgit.freedesktop.org/xorg/xserver/tree/dix/eventconvert.c#n348
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/exevents.c#n188
note:
this mask is missing in the following spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2257
Christian Linhart [Mon, 18 Aug 2014 12:59:55 +0000 (14:59 +0200)]
xinput: ev ChangeDeviceNotify.request: add enum
add new enum "ChangeDevice" for field "request"
spec:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n2301
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2459
Christian Linhart [Mon, 18 Aug 2014 12:59:54 +0000 (14:59 +0200)]
xinput: ev DeviceMappingNotify.request: add enum
add enum "Mapping" for field "request"
spec:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n2281
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2443
def of enum "Mapping":
http://cgit.freedesktop.org/xcb/proto/tree/src/xproto.xml#n1058
Christian Linhart [Mon, 18 Aug 2014 12:59:53 +0000 (14:59 +0200)]
xinput: ev DeviceKeyPress.state: add mask
add mask KeyButMask to field "state"
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2271
Christian Linhart [Mon, 18 Aug 2014 12:59:52 +0000 (14:59 +0200)]
xinput: struct XIDeviceInfo.type: altenum to enum
field "type": replace altenum by enum because
only the values of DeviceType are permitted
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n669
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n763
notes to the spec:
* the field is called "use" in the spec, instead of "type"
* the enum is called "DEVICEUSE" in the spec, instead of "DeviceType"
Christian Linhart [Mon, 18 Aug 2014 12:59:51 +0000 (14:59 +0200)]
xinput: struct ScrollClass.flags: has a mask
the field "flags" of struct ScrollClass uses ScrollFlags as a mask
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n802
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2.h#n151
Christian Linhart [Thu, 21 Aug 2014 20:50:52 +0000 (22:50 +0200)]
xinput: req ChangeFeedbackControl.mask: add mask
add new enum ChangeFeedbackControlMask to field "mask" as mask
V2: patch revised according to suggestion from Ran Benita:
* changed item name from "ledMode" to "LedMode" ( initial character uppercase )
to be consistent with the initial uppercase letter of the other items.
V2: added a note to the commit-message
about multiple items with the same value.
Note:
This enum contains multiple items with the same value.
This is defined that way in the spec.
The reason is probably as follows:
The semantic of those values probably depends on the
the value of field "class_id" of struct "FeedbackCtrl".
spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1450
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h#n207
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/chgfctl.c
the following spec just mentions that the field "mask" is a BITMASK,
but does not list its values:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1725
Christian Linhart [Tue, 19 Aug 2014 11:12:32 +0000 (13:12 +0200)]
xinput: struct ValuatorState.mode: add mask
add new enum ValuatorStateModeMask as mask to field "mode"
V2: patch revised according to suggestions from Peter Harris:
* use bit instead of value
* use names which indicate the way the bits should be flipped
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n2095
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1783
Christian Linhart [Mon, 18 Aug 2014 12:59:48 +0000 (14:59 +0200)]
xinput: req UngrabDeviceButton.modifier_device: altenum
add altenum ModifierDevice to field modifier_device for value UseXKeyboard
spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1225
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h#n187
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/ungrdevb.c#n111
the following spec uses "NULL" instead of "UseXKeyboard":
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1386
Questions:
* is this spec wrong?
* or does "NULL" have the unusual value of 0xff in this context?
Christian Linhart [Mon, 18 Aug 2014 12:59:47 +0000 (14:59 +0200)]
xinput: req GrabDeviceButton.modifier_device: altenum
add altenum ModifierDevice to field modifier_device for value UseXKeyboard
spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1195
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h#n187
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/grabdevb.c#n118
the following spec uses "NULL" instead of "UseXKeyboard":
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1309
Questions:
* is this spec wrong?
* or does "NULL" have the unusual value of 0xff in this context?
Christian Linhart [Mon, 18 Aug 2014 12:59:46 +0000 (14:59 +0200)]
xinput: req UngrabDeviceKey.modifier_device: altenum
add altenum ModifierDevice to field modifier_device for value UseXKeyboard
spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1175
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h#n187
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/ungrdevk.c#n113
the following spec uses "NULL" instead of "UseXKeyboard":
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1295
Questions:
* is this spec wrong?
* or does "NULL" have the unusual value of 0xff in this context?
Christian Linhart [Fri, 22 Aug 2014 15:15:24 +0000 (17:15 +0200)]
xinput: req GrabDeviceKey.modifier_device: altenum
add altenum ModifierDevice to field modifier_device for value UseXKeyboard
V2: patch revised according to info from Ran Benita about NULL and UseXKeyboard
spec and code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1147
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h#n187
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/grabdevk.c#n116
the following spec uses "NULL" instead of "UseXKeyboard":
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1213
The reason for NULL vs UseXKeyboard is: in the libXi function XUngrabDeviceKey,
the modifier_device arg is an XDevice pointer, and NULL means to use the
core X keyboard. But on the wire it is an integer, with 255 as a special
value.
Christian Linhart [Mon, 18 Aug 2014 12:59:44 +0000 (14:59 +0200)]
xinput: add new enum ModifierDevice
needed for field "modifier_device" in the following requests:
* GrabDeviceKey
* UngrabDeviceKey
* GrabDeviceButton
* UngrabDeviceButton
spec:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1147
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h#n187
Christian Linhart [Mon, 18 Aug 2014 12:59:43 +0000 (14:59 +0200)]
xinput: rep ChangePointerDevice.status: altenum to enum
Field "status" can only get values from enum GrabStatus.
Therefore make it an enum instead of altenum.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1055
Add comments:
Add comment about valid values for field "status".
Note:
An old spec lists value 2 for enum value "Frozen"
while enum GrabStatus has value 4 for Frozen.
The old spec is probably wrong.
Here is the URL of the old spec:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1073
Christian Linhart [Mon, 18 Aug 2014 12:59:42 +0000 (14:59 +0200)]
xinput: rep ChangeKeyboardDevice.status: altenum to enum
Field "status" can only get values from enum GrabStatus
therefore make it an enum instead of altenum.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1016
Add comment about valid values for field status.
Note:
An old spec lists value 2 for enum value "Frozen"
while enum GrabStatus has value 4 for Frozen.
The old spec is probably wrong.
Here is the URL of the old spec:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1044
Christian Linhart [Mon, 18 Aug 2014 12:59:41 +0000 (14:59 +0200)]
xinput: enum InputClass: comment value Attach 7
The value Attach=7 is defined in XI.h but not supported anymore by libXi.
And it never was transmitted over the protocol.
(It was used to tag a fake class created by libXi)
Add this comment so that future reviews will not accidentally add this value.
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI.h#n242
drop of support in libXi:
http://cgit.freedesktop.org/xorg/lib/libXi/commit/?id=
62858c426e6de1b99df660251737233afd335302
Christian Linhart [Sat, 16 Aug 2014 10:08:28 +0000 (12:08 +0200)]
xinput: event Enter: fix type of fields same_screen and focus
fix type of fields "same_screen" and "focus" from CARD8 to BOOL
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n2432
(file-position in the above URL may become wrong if the spec changes)
Christian Linhart [Sat, 16 Aug 2014 10:08:27 +0000 (12:08 +0200)]
xinput: request GrabDeviceButton: fix type of field owner_events
change type of field "owner_events" from CARD8 to BOOL
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n1311
(file-position in the above URL may become wrong if the spec changes)
Christian Linhart [Sat, 16 Aug 2014 10:08:26 +0000 (12:08 +0200)]
xinput: struct AddMaster: fix type of fields
fix type of fields "send_core" and "enable" to BOOL
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n1187
note:
the type of these fields should also be fixed in XI2proto.h:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h#n460
(file-positions in the above URLs may become wrong if the spec changes)
Christian Linhart [Sat, 16 Aug 2014 10:08:25 +0000 (12:08 +0200)]
xinput: reply XIQueryPointer: fix type of field same_screen
fix type of field "same_screen" from CARD8 to BOOL
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n1054
note:
the type of this field should also be fixed in XI2proto.h:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h#n386
(file-positions in the above URLs may become wrong if the spec or header changes)
Christian Linhart [Sat, 16 Aug 2014 10:08:24 +0000 (12:08 +0200)]
xinput: struct DeviceTimeCoord: replace CARD32 by INT32
replace CARD32 by INT32 in commented-out list "axisvalues"
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XIproto.txt#n927
in this spec, the list is called "data" instead of "axisvalues"
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1018
in this spec, the list is called "valuators" instead of "axisvalues"
(file-positions in the above URLs may become wrong if the spec changes)
Christian Linhart [Fri, 15 Aug 2014 18:36:20 +0000 (20:36 +0200)]
xinput: GetDeviceMotionEvents-request: add pad at end
see:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n992
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n474
(file-positions may become wrong if the spec or header change)
Christian Linhart [Fri, 15 Aug 2014 18:36:19 +0000 (20:36 +0200)]
xinput: XIGetProperty-reply: add align-pad at end
reasons:
* all X11-replies must have a length which is a multiple of 4 bytes
* bitcases "8Bits" and "16bits" may have a length
which is not a multiple of 4 bytes
but they start on a 4-byte aligned position.
Therefore the unpadded end of the request may not be 4-byte aligned
* Therefore this requires a 4-byte align-pad.
notes:
* The align pad had to be added in each relevant bitcase
because adding it after the switch would cause the generator
to abort. (which is OK because a <switch> has to be the last item
of a struct, request or reply, according to the xcb-xml-spec)
Christian Linhart [Fri, 15 Aug 2014 18:36:18 +0000 (20:36 +0200)]
xinput: struct AddMaster: add align-pad at end
reasons:
* length of the struct is a multiple of 4 according to spec.
* list of char may not end at a 4-byte aligned position.
see:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n1224
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h#n454
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h#n458
(file-positions may become wrong if the spec or header change)
Christian Linhart [Fri, 15 Aug 2014 18:36:17 +0000 (20:36 +0200)]
xinput: ChangeDeviceProperty-request: add align-pad at end
reasons:
* all X11-requests must have a length which is a multiple of 4 bytes
* bitcases "8Bits" and "16bits" may have a length
which is not a multiple of 4-bytes
but they start on a 4-byte aligned position.
Therefore the unpadded end of the request may not be 4-byte aligned
* Therefore this requires a 4-byte align-pad.
notes:
* The align pad had to be added in each relevant bitcase
because adding it after the switch would cause the generator
to abort. (which is OK because a <switch> has to be the last item
of a struct, request or reply, according to the xcb-xml-spec)
Christian Linhart [Fri, 15 Aug 2014 18:36:16 +0000 (20:36 +0200)]
xinput: GetDeviceProperty-reply: add align-pad at end
reasons:
* all X11-replies must have a length which is a multiple of 4 bytes
* bitcases "8Bits" and "16bits" may have a length
which is not a multiple of 4-bytes
but they start on a 4-byte aligned position.
Therefore the unpadded end of the request may not be 4-byte aligned
* Therefore this requires a 4-byte align-pad.
notes:
* The align pad had to be added in each relevant bitcase
because adding it after the switch would cause the generator
to abort. (which is OK because a <switch> has to be the last item
of a struct, request or reply, according to the xcb-xml-spec)
Christian Linhart [Fri, 15 Aug 2014 18:36:15 +0000 (20:36 +0200)]
xinput: GetDeviceButtonMapping-reply: add align-pad at end
see:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1691
(file-position may become wrong if the spec changes)
Christian Linhart [Fri, 15 Aug 2014 18:36:14 +0000 (20:36 +0200)]
xinput: GetDeviceKeyMapping-request: add pad at end
see:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1583
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n982
(file-positions may become wrong if the spec or header change)
Christian Linhart [Fri, 15 Aug 2014 18:36:13 +0000 (20:36 +0200)]
xinput: SetDeviceFocus-request: add pad at end
see:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1308
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n737
(file-positions may become wrong if the spec or header change)
Christian Linhart [Fri, 15 Aug 2014 18:36:12 +0000 (20:36 +0200)]
xinput: AllowDeviceEvents-request: add pad at end
see:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1251
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n692
(file-positions may become wrong if the spec or header change)
Christian Linhart [Fri, 15 Aug 2014 18:36:11 +0000 (20:36 +0200)]
xinput: UngrabDeviceButton-request: add pad at end
see:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1229
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n676
(file-positions may become wrong if the spec or header change)
Christian Linhart [Fri, 15 Aug 2014 18:36:10 +0000 (20:36 +0200)]
xinput: UngrabDevice-request: add pad at end
see:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n1130
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n596
(file-positions may become wrong if the spec or header change)
Christian Linhart [Fri, 15 Aug 2014 18:36:09 +0000 (20:36 +0200)]
xinput: OpenDevice-reply: add align-pad at end
see:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/specs/encoding.xml#n834
(file-position may become wrong if the spec changes)
Christian Linhart [Wed, 13 Aug 2014 13:40:07 +0000 (15:40 +0200)]
xinput: SetDeviceModifierMapping: fix length of pad
fix length of pad from 1 to 2 bytes after request-field keycodes_per_modifier
see XIproto.h:1057 in inputproto-2.3.1
see spec in libXi-1.7.4 ( in docbook format in the directory "specs" )
Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Christian Linhart [Wed, 13 Aug 2014 13:39:14 +0000 (15:39 +0200)]
xinput: ChangeFeedbackControl: add missing pad
add missing pad after field "feedback_id"
see XIproto.h:875 in inputproto-2.3.1
see spec in libXi-1.7.4 ( in docbook format in the directory "specs" )
Reviewed-by: Peter Harris <pharris@opentext.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Uli Schlachter [Fri, 1 Aug 2014 13:43:15 +0000 (15:43 +0200)]
Release xcb-proto 1.11
Daniel Martin [Tue, 15 Jul 2014 16:53:17 +0000 (18:53 +0200)]
xkb: Add missing modLatches as comment to LatchLockState
The field modLatches was missing in the request LatchLockState:
http://cgit.freedesktop.org/xorg/proto/kbproto/tree/XKBproto.h#n141
v2: Use a pad instead of a field, as the field would cause an API break.
Though, keep the field commented out to document it.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Ran Benita <ran234@gmail.com>
Daniel Martin [Thu, 17 Jul 2014 20:49:12 +0000 (22:49 +0200)]
xinput: Add missing pad in XIChangeHierarchy
A pad of 3 bytes was missing in the request XIChangeHierarchy:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.h#n439
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
Daniel Martin [Thu, 17 Jul 2014 20:49:11 +0000 (22:49 +0200)]
xinput: Add missing pad in DeviceResolutionCtl
A pad of 2 bytes was missing in the struct DeviceResolutionCtl:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.h#n1382
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Peter Harris <pharris@opentext.com>
Ran Benita [Wed, 27 Nov 2013 23:52:13 +0000 (01:52 +0200)]
Add <fd> to xml-xcb.txt
Signed-off-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Daniel Martin [Fri, 22 Nov 2013 22:26:54 +0000 (23:26 +0100)]
schema: Restricted enum item values
Restrict decimal values by using an xsd:unsignedInt instead of an
xsd:integer. xsd:unsignedInt is an unsigned 32-bit integer.
And restrict bit values by adding a type, which allows values within the
range of [0, 32) only.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Daniel Martin [Fri, 22 Nov 2013 22:26:53 +0000 (23:26 +0100)]
schema: Remove dec-or-hex-integer and hex-integer type
Reflect in the schema that hexadecimal values aren't supported in enum
items (and expressions) by removing the 'dec-or-hex-integer' and
'hex-integer' type.
Hexadecimal values are not supported "as some languages have a different
notation for hex-values" and therefor such hexadecimal values have been
explicitly replaced with decimal values in other commits, see:
183ecff Replaced hex-values with decimal ones
8b3c120 did remaining replacements of hex constants with decimal
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Daniel Martin [Fri, 22 Nov 2013 22:26:52 +0000 (23:26 +0100)]
schema: Add attribute 'name' to <fd>
Do not allow any other attribute and make sure the attribute 'name' is
set in an fd element by adding and declaring it as required in the
schema.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Daniel Martin [Fri, 22 Nov 2013 22:26:51 +0000 (23:26 +0100)]
schema: Set default attribute values
Set the default values for the attributes combine-adjacent,
no-sequence-number and xge to false.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Daniel Martin [Fri, 22 Nov 2013 22:26:50 +0000 (23:26 +0100)]
xproto: Fix EnterNotify documentation
Fix a copy'n'paste mistake (from UnmapNotify) in the documentation of
EnterNotify by changing the description for 'event', renaming
'window' to 'child' and change its description too.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Daniel Martin [Mon, 9 Jun 2014 15:55:05 +0000 (17:55 +0200)]
xv: Add align. pad in struct AdaptorInfo
The (list) 'name' in the struct AdaptorInfo is not padded. Therefore
we've to add an alignment pad after it.
Reference: http://cgit.freedesktop.org/xorg/lib/libXv/tree/src/Xv.c#n250
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79808
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
Robert Ancell [Fri, 30 May 2014 07:37:14 +0000 (09:37 +0200)]
dri2: Add notes on lists that should be linked to their length fields but are not.
Reviewed-by: Daniel Martin <consume.noise@gmail.com>
Peter Harris [Tue, 29 Apr 2014 15:52:36 +0000 (11:52 -0400)]
xkb: Fix use of nKTLevels
nLevelsPerType is nLevels long. This continues the work started in
76ca2c0b1527541be59c344118c538ba055ad9d8.
nKTLevels could be used instead of <sumof nLevelsPerType>, but that
change causes a change to libxcb's API.
Reviewed-by: Ran Benita <ran234@gmail.com>
Tested-by: Ran Benita <ran234@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
Vincent W. Chen [Thu, 10 Apr 2014 01:48:56 +0000 (18:48 -0700)]
xprint: Fix <field type="STRING8"> in PrintGetAttributes reply
The reply for PrintGetAttributes contains a field of type STRING8, which
makes no sense as the STRING8 type is only used to denote a string. This
has been changed to <list type="STRING8"> with field "stringLen" as its
length.
Reviewed-by: Peter Harris <pharris@opentext.com>
Vincent W. Chen [Thu, 10 Apr 2014 01:34:31 +0000 (18:34 -0700)]
Remove extraneous spaces between <value> tags
These are the only places where spaces are allowed between <value> tags.
This is not only inconsistent but also complicates the parsing of values
as integers.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Keith Packard [Wed, 12 Feb 2014 21:53:13 +0000 (13:53 -0800)]
Also track directly imported modules in a separate list
This allows the generated header files to only include the
directly referenced header files, with the indirectly referenced header
files included by the directly referenced ones.
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Peter Harris [Tue, 14 Jan 2014 19:48:22 +0000 (14:48 -0500)]
xkb: Use <pad align="4" /> in GetMap
There is a bug where lists of size other than one are automatically
aligned by c_client.py. So alignment_pad3 and 4 were aligning twice
and consuming too many bytes.
Rather than change the type to CARD8 and wrap the <op> in yet another
<op> to multiply by two, use the new <pad align> operation.
Reviewed-By: Ran Benita <ran234@gmail.com>
Tested-By: Ran Benita <ran234@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
Peter Harris [Tue, 14 Jan 2014 19:45:36 +0000 (14:45 -0500)]
Support <pad align="n" />
Reviewed-By: Ran Benita <ran234@gmail.com>
Signed-off-by: Peter Harris <pharris@opentext.com>