summaryrefslogtreecommitdiff
path: root/test/litest-mouse.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-03-26 20:09:42 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-04-08 15:07:02 +1000
commit04d52d718fa71992212cc70d11d0cab06579b2a5 (patch)
treec6b2e3861caa7da9b7e2ee8b9a59b52e2cef3747 /test/litest-mouse.c
parent32e513226cea7c55f379d98460562c845405d97c (diff)
downloadlibinput-04d52d718fa71992212cc70d11d0cab06579b2a5.tar.gz
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>
Diffstat (limited to 'test/litest-mouse.c')
0 files changed, 0 insertions, 0 deletions