test: Use generic test device API in touch_abs_transform test

Instead of having a test device which only purpose is to test absolute
coordinate transformation, use the litest_create_device_with_overrides()
API to create a specially crafted wacom touch device with high
resolution.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
test: Fix name of litest_button_click() definition

In litest.h it was called litest_button_click() while in litest.c
litest_click(); update the definition to be the same as the declaration.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Structure libinput_seat struct

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
test: fix memleak in touch test

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Use log_error instead of fprintf in old touchpad code

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Fix up ARRAY_FOR_EACH macro

Remove compiler warning about signed/unsigned comparison. And while we're at
it, rename i to _i in the macro to avoid name clashes.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
tools: add --verbose to event-debug

And redirect the log to stdout. libinput logs to stderr by default, but if
we're running with --verbose we want all msgs on the same stream.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
test: mark the synaptics clickpad as buttonpad

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
test: automatically run the tests against valgrind for leaks

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
Add functions to convert back to the base event

A few functions only work on the base event but once we've converted to the
target event we can't go back. Casting works for now but that would expose
internal ABI.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
test: add tests for event conversion and back

Looks a bit excessive given how simple the base is but hey, we don't want to
ever break that bit. That'd be embarrassing.

And while we're at it make sure that the 'wrong' event getters return NULL for
each event.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>