[Xcb] [PATCH proto 12/22] xinput: struct XIDeviceInfo.type: altenum to enum
Ran Benita
ran234 at gmail.com
Thu Aug 21 04:34:39 PDT 2014
On Mon, Aug 18, 2014 at 02:59:52PM +0200, Christian Linhart wrote:
> 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"
There is also a DeviceUse enum defined, which is used in some places,
and has different values (offset of 1) from DeviceType. I think there
might be some pre-existing confusion here. Are both enums needed? If so,
are they used correctly?
> ---
> src/xinput.xml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/xinput.xml b/src/xinput.xml
> index d5abc34..466edeb 100644
> --- a/src/xinput.xml
> +++ b/src/xinput.xml
> @@ -1487,15 +1487,15 @@ <struct name="DeviceClass">
> <value>8</value>
> </op>
> </list>
> </struct>
>
> <struct name="XIDeviceInfo">
> <field type="DeviceId" name="deviceid" altenum="Device" />
> - <field type="CARD16" name="type" altenum="DeviceType" />
> + <field type="CARD16" name="type" enum="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,
> --
> 2.0.1
>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
More information about the Xcb
mailing list