Add a pointer acceleration API
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 15 May 2014 05:46:19 +0000 (15:46 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 23 Sep 2014 00:46:35 +0000 (10:46 +1000)
commit339f3dc979e8bba1d4cc72e7f2a2f42569f12c28
tree7f2a1ccbe67105ad5a0f993281cd2f449ca0f1ab
parenta721292c254bfc4074ea3ee1f328260feda7c936
Add a pointer acceleration API

Only exposes one knob - speed, normalized to a [-1, 1] range with 0 being the
neutral "this is what we think is normal" speed. -1 and 1 reflect the
slowest/fastest reasonable speed on this device.

Note: with this API we commit to having any pointer accelerating as a true
gliding scale. We cannot map the [-1,1] range into a discrete set of steps
as we do not communicate to the caller whether a specific value has changed
the acceleration. Without that, a caller may assume that acceleration has
changed even when it is not visible to the user.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/libinput-private.h
src/libinput.c
src/libinput.h