XI2 relative motion events documentation
Peter Hutterer
peter.hutterer at who-t.net
Sun Oct 24 15:02:37 PDT 2010
On Sat, Oct 23, 2010 at 12:34:04PM -0500, Rendaw wrote:
> On 10/20/2010 07:26 PM, Daniel Stone wrote:
> >Hi,
> >Also, if you notice any glaring inconsistencies, please let us know so
> >we can fix either the spec or the implementation.
> >
> I don't think there was anything glaring, but this threw me off a
> bit... In XIDeviceEvent, the spec lists the variable "sourceid"
> which specifies the source device, but XInput2.h on my system has
> both "sourceid" and "deviceid".
most events have an EVENTHEADER which includes the deviceid, see the
beginning of section 8.
> Also, the spec lists
> "valuators_len", "valuators", and "axisvalues" but the header only
> shows "valuators". That one goes for XIRawEvent as well.
note that libXi is an abstraction of the protocol and while it mostly maps
1:1 to the protocol, the fields aren't necessarily identical. so
valuators_len + valuators + axisvalues in the protocol translates into the
XIValuatorState struct in the library, with the mapping being
valuators_len == state.mask_len
valuators == state.mask
axisvalues == state.values
Cheers,
Peter
More information about the xorg-devel
mailing list