libinput/test
Peter Hutterer 04d52d718f test: add litest helper functions for creating uinput devices
Both functions accept a series of event types/codes tuples, terminated by -1.
For the even type INPUT_PROP_MAX (an invalid type otherwise) the code is used
as a property to enable.

The _abs function als takes an array of absinfo, with absinfo.value
determining the axis to change. If none are given, abs axes are initialized
with default settings.

Both functions abort on failure, so the caller does not need to check the
return value.

Example code for creating a rel device:

struct libevdev_uinput *uinput;
struct input_id id = { ... };
uinput = litest_create_uinput_device("foo", &id,
                                     EV_REL, REL_X,
                                     EV_REL, REL_Y,
                                     EV_KEY, BTN_LEFT,
                                     INPUT_PROP_MAX, INPUT_PROP_BUTTONPAD,
                                     -1);
libevdev_uinput_write_event(uinput, EV_REL, REL_X, -1);
libevdev_uinput_write_event(uinput, EV_SYN, SYN_REPORT, 0);
...
libevdev_uinput_destroy(uinput);

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-04-08 15:07:02 +10:00
..
build-cxx.cc test: Add include from C++ build test 2014-03-29 00:51:44 +01:00
build-pedantic.c test: add a build-test for -pedantic 2014-01-15 11:26:08 +10:00
litest-bcm5974.c test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
litest-generic-highres-touch.c test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
litest-int.h test: add framework for a single-touch synaptics device 2014-03-25 11:06:09 +10:00
litest-keyboard.c test: fix keyboard capabilities 2014-03-24 16:39:12 +10:00
litest-mouse.c test: Add a basic mouse test device 2014-01-22 11:23:00 +10:00
litest-synaptics-st.c test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
litest-synaptics.c test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
litest-trackpoint.c test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
litest-wacom-touch.c test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
litest.c test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
litest.h test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
log.c test: plug a couple of memory leaks 2014-03-27 08:46:47 +10:00
Makefile.am test: Add include from C++ build test 2014-03-29 00:51:44 +01:00
path.c test: add litest helper functions for creating uinput devices 2014-04-08 15:07:02 +10:00
pointer.c touchpad: add support for clickfingers 2014-03-24 16:39:12 +10:00
touch.c test: plug a couple of memory leaks 2014-03-27 08:46:47 +10:00
touchpad.c test: add framework for a single-touch synaptics device 2014-03-25 11:06:09 +10:00
udev.c Make it possible to have persistent libinput_seat instances 2014-02-10 22:28:46 +01:00