Commit graph

13 commits

Author SHA1 Message Date
Peter Hutterer
d9fcbd563a Mark three deprecated functions as such
These are deprecated, but were missing the deprecated attribute.
And fix up the tests that were still using those deprecated calls.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-10-04 16:02:22 +10:00
Peter Hutterer
ab2f20bfd6 Revamp the API once again
Another look at the current API showed some inconsistencies, rectified
in this commit:

libevdev_kernel_*: modify the underlying kernel device
libevdev_event_type_*: something with an event type
libevdev_event_code_*: something with an event code
libevdev_event_*: struct input_event-related functions (i.e. not device-related)
libevdev_property_*: something with a property
libevdev_*: anything applying to a device

Hopefully that's the last API change. Current symbols deprecated and aliased.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-09-10 11:25:09 +10:00
Peter Hutterer
75b66c1fb5 Match the kernel define for SYN_MAX
Will be defined as 0xf in 3.12, see
http://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=52764fed5049655926bcecaefd52f0a415ceb105

And add the required ifdef guards for kernels before that.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-04 07:54:22 +10:00
Peter Hutterer
b77fea9c89 Fix off-by-one errors when dealing with *_MAX values.
LED_MAX, KEY_MAX, ABS_MT_MAX, etc. are all valid event codes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-08-30 17:40:54 +10:00
Peter Hutterer
dd4a1a49de test: add test for libevdev_is_event_code(EV_SYN...)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-29 11:36:20 +10:00
Martin Minarik
411031178e Fix build without MSC_TIMESTAMP
To build with older input.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-26 08:10:11 +10:00
Peter Hutterer
00528f27d5 Rename a few getters for consistency
Deprecated:
* libevdev_get_abs_min, libevdev_get_abs_max
* libevdev_get_input_prop_name

Will be removed in one or two versions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-08-01 13:53:05 +10:00
Peter Hutterer
b17ba48458 test: add test for event values (type and code)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-04 11:11:51 +10:00
Peter Hutterer
07910f8bf4 test: unify test case creation in test-event-names.c
Simple rename from custom test case variable names to tc

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-04 11:05:39 +10:00
Peter Hutterer
a30f4cfa8a test: prepare a common header file for all tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-29 18:00:42 +10:00
Peter Hutterer
d14626989d test: test some more event max and invalid event type paths
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-27 10:41:55 +10:00
Peter Hutterer
9e81874c49 Pull all tests together into one binary
Easier to monitor gcov coverage that way

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-27 10:41:54 +10:00
Peter Hutterer
7c860d6002 Set up a test harness
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:33 +10:00