[PATCH 0/6] Masked valuators for input drivers
Peter Hutterer
peter.hutterer at who-t.net
Tue Oct 19 16:44:08 PDT 2010
Current APIs require drivers to send continuous valuator ranges in the for
first + num_valuators. The XI2 protocol allows for non-continuous ranges,
e.g. x, pressure and tilt, without sending y as well.
This series converts the server's input event generation code to use
valuator masks. because of SIGIO malloc restrictions, the ValuatorMask is
currently fixed length, but it's kept opaque so we may change this in the
future.
Matching driver code for a three-axes device could be something like this:
int x, z; /* fill with hardware data */
ValuatorMask *mask = valuator_mask_new(3);
valuator_mask_set(mask, 0, x);
valuator_mask_set(mask, 2, z);
xf86PostMotionEvent(dev, ..., mask);
This series goes on top of the input-api branch.
Cheers,
Peter
More information about the xorg-devel
mailing list