Add LIBINPUT_EVENT_POINTER_AXIS_WHEEL to get normalized wheel scrolling

Starting with kernel v5.0 two new axes are available for high-resolution wheel
scrolling: REL_WHEEL_HI_RES and REL_HWHEEL_HI_RES. Both axes send data in
fractions of 120 where each multiple of 120 amounts to one logical scroll
event. Fractions of 120 indicate a wheel movement less than one detent.

This commit adds a new API for pointer axis events. A new event type and a new
API to get a normalized-to-120 value also used by Windows and the kernel, each
multiple of 120 represents a logical scroll click.

This addresses a main shortcoming with the existing API - it was unreliable to
calculate the click angle based on the axis value+discrete events and thus any
caller using the axis value alone would be left with some ambiguity. With the
v120 API it's now possible to (usually) calculate the click angle, but more
importantly it provides the simplest hw-independent way of scrolling by a
click or a fraction of a click.

A new event type is required, the only way to integrate the v120 value
otherwise was to start sending events with a discrete value of 0. This
would break existing xf86-input-libinput (divide by zero, fixed in 0.28.2) and
weston (general confusion). mutter, kwin are unaffected.

Notable: REL_WHEEL/REL_HWHEEL are emulated by the kernel but there's no
guarantee that they'll come every accumulated 120 values, e.g. Logitech mice
often send events that don't add up to 120 per detent.

We use the kernel's wheel click emulation instead of doing our own.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
17 jobs for wip/hi-res-scrolling in 29 minutes and 33 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Build
passed #184447
arch:rolling@default-build

00:01:58

passed #184432
fedora:28@default-build

00:00:47

passed #184440
fedora:29@build-no-debuggui

00:01:56

failed #184441
fedora:29@build-no-debuggui-nodeps

00:01:59

passed #184438
fedora:29@build-no-docs

00:01:05

passed #184439
fedora:29@build-no-docs-nodeps

00:01:05

passed #184436
fedora:29@build-no-libwacom

00:00:37

passed #184437
fedora:29@build-no-libwacom-nodeps

00:01:05

passed #184442
fedora:29@build-no-tests

00:01:57

passed #184443
fedora:29@build-no-tests-nodeps

00:01:56

passed #184433
fedora:29@default-build

00:00:37

failed #184434
fedora:29@default-build-release

00:00:25

passed #184435
fedora:29@scan-build

00:01:50

passed #184444
fedora:29@valgrind

00:29:31

passed #184448
freebsd:11.2@default-build

00:00:59

passed #184446
ubuntu:18.04@default-build

00:01:08

passed #184445
ubuntu:18.10@default-build

00:01:06

 
Name Stage Failure
failed
fedora:29@build-no-debuggui-nodeps Build

Full log written to /builds/whot/libinput/build dir/meson-logs/testlog.txt
FAILED: meson-test
/usr/bin/meson test --no-rebuild --print-errorlogs
ninja: build stopped: subcommand failed.
Uploading artifacts...
build dir/meson-logs: found 4 matching files
Uploading artifacts to coordinator... ok
id=184441 responseStatus=201 Created token=NaR_iyBz
ERROR: Job failed: exit code 1
failed
fedora:29@default-build-release Build
  ^~~~~~
cc1: all warnings being treated as errors
[183/187] Compiling C object 'libinput-test-suite@exe/test_test-touchpad.c.o'.
[184/187] Generating sphinx with a custom command.
ninja: build stopped: subcommand failed.
Uploading artifacts...
build dir/meson-logs: found 2 matching files
Uploading artifacts to coordinator... ok
id=184434 responseStatus=201 Created token=rF5mTcQr
ERROR: Job failed: exit code 1