Commit graph

16 commits

Author SHA1 Message Date
Gaetan Nadon
4f0f1ca68c Review/update .gitignore files
Merge potentially useful patterns taken from other projects.

Some application specific patterns were move to their respective directories.

The only noticeable change is that *.patch is ignore to prevent accidental
checkin of patches. The pattern "test-driver" could not be found and was
removed.

The test directory had not been updated since the move of all test cases
in a single binary.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-11-19 09:34:23 +10:00
Peter Hutterer
2a3219f55d Add a copy of linux/input.h
This avoids a number of otherwise required ifdefs when building on older kernels

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
2013-10-23 09:04:34 +10:00
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
ab2ab19ca3 tools: make to function calls static
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-17 20:11:38 +10:00
Colin Walters
34fc7ee425 tools: Honor GCC_CFLAGS
So we get compiler warnings from tools/ too.

Signed-off-by: Colin Walters <walters@verbum.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-09-17 20:11:32 +10:00
Peter Hutterer
661602fe3b Name-space the read flags better
Rename from LIBEVDEV_READ_foo to LIBEVDEV_READ_FLAG_foo to differentiate
better from LIBEVDEV_READ_STATUS_foo.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-09-11 12:10:15 +10:00
Peter Hutterer
5d2fc78138 Enumerate libevdev_next_event() return codes
Improved readability in callers, changing magic numbers 0 and 1 to

rc = libevdev_next_event();
if (rc == LIBEVDEV_READ_STATUS_SUCCESS)
    do_something();
else if (rc == LIBEVDEV_READ_STATUS_SYNC)
    do_something_else()

No ABI changes, the enum values are the previously documented values,
this is just a readability improvement.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2013-09-11 12:10:12 +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
c9bc2a9e39 Rename ID getters to have a consistent naming scheme
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
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
9ac7fd5442 Point to new API documentation URL
And fix up the tool to publish it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-22 08:34:55 +10:00
Peter Hutterer
f3a6b0c685 Add a flag for blocking read
Not all clients need nonblocking read, so add a flag to read
in blocking mode. In that mode, events are only read from the fd when
the queue is empty.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-07-02 10:59:01 +10:00
Peter Hutterer
cbb2d1391b tools: add a tool to build and publish the documentation
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-28 13:18:28 +10:00
Peter Hutterer
5a3d928ba6 tools: update libevdev-events to use the new LIBEVDEV_READ_NORMAL flag
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-27 14:28:23 +10:00
Peter Hutterer
b3c661d397 Switch tools to use libevdev_get_event_*_name interface
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:33 +10:00
Peter Hutterer
fe34f7cff7 Move libevdev-events over to a tools directory
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-06-04 11:39:32 +10:00