Add pointer axis sources to the API
For a caller to implement/provide kinetic scrolling ("inertial scrolling", "fling scrolling"), it needs to know how the scrolling motion was implemented, and what to expect in the future. Add this information to the pointer axis event. The three scroll sources we have are: * wheels: scrolling is in discreet steps, you don't know when it ends, the wheel will just stop sending events * fingers: scrolling is continuous coordinate space, we know when it stops and we can tell the caller * continuous: scrolling is in continuous coordinate space but we may or may not know when it stops. if scroll lock is used, the device may never technically get out of scroll mode even if it doesn't send events at any given moment Use case: trackpoint/trackball scroll emulation on button press The stop event is now codified in the API documentation, so callers can use that for kinetic scrolling. libinput does not implement kinetic scrolling itself. Not covered by this patch: * The wheel event is currently defined as "typical mouse wheel step", this is different to Qt where the step value is 1/8 of a degree. Some better definition here may help. * It is unclear how an absolute device would map into relative motion if the device itself is not controlling absolute motion. * For diagonal scrolling, the vertical/horizontal terminator events would come in separately. The caller would have to deal with that somehow. Signed-off-by:Peter Hutterer <peter.hutterer@who-t.net> Original patch, before the rebase onto today's master: Reviewed-by:
Hans de Goede <hdegoede@redhat.com>
Showing
- src/evdev-mt-touchpad-edge-scroll.c 9 additions, 3 deletionssrc/evdev-mt-touchpad-edge-scroll.c
- src/evdev-mt-touchpad.c 10 additions, 3 deletionssrc/evdev-mt-touchpad.c
- src/evdev.c 15 additions, 2 deletionssrc/evdev.c
- src/evdev.h 4 additions, 1 deletionsrc/evdev.h
- src/libinput-private.h 1 addition, 0 deletionssrc/libinput-private.h
- src/libinput.c 9 additions, 0 deletionssrc/libinput.c
- src/libinput.h 62 additions, 3 deletionssrc/libinput.h
- src/libinput.sym 1 addition, 0 deletionssrc/libinput.sym
- test/pointer.c 2 additions, 0 deletionstest/pointer.c
- test/touchpad.c 51 additions, 0 deletionstest/touchpad.c
- test/trackpoint.c 24 additions, 0 deletionstest/trackpoint.c
Loading
Please register or sign in to comment