summaryrefslogtreecommitdiff
path: root/libevdev/libevdev-uinput.c
Commit message (Collapse)AuthorAgeFilesLines
* Revamp the API once againPeter Hutterer2013-09-101-1/+1
| | | | | | | | | | | | | | | | | 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>
* Warn if there are multiple devices with the same syspathPeter Hutterer2013-09-031-5/+10
| | | | | | | | | Change to the previous code in that we continue looking at devices even after we've found one. However, this way we can warn the user when we can't guarantee syspath correctness. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Log a few errors, specifically application bugsPeter Hutterer2013-09-031-1/+4
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* uinput: don't try to set the syspath twicePeter Hutterer2013-08-311-0/+1
| | | | | | | | If we have it, stop searching for it. Otherwise a second device with the same name would overwrite the first, causing a leak. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Fix off-by-one errors when dealing with *_MAX values.Peter Hutterer2013-08-301-3/+3
| | | | | | | 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>
* Use AC_USE_SYSTEM_EXTENSIONSPeter Hutterer2013-08-291-1/+0
| | | | | | | Defines _GNU_SOURCE for us. http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Posix-Variants.html Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add support for uinput device creationPeter Hutterer2013-08-291-0/+361
This lets libevdev provide a relatively generic interface for the creation of uinput devices so we don't need to duplicate this across multiple projects. Most of this is lifted from the current test implementation, with a couple of minor changes. EV_REP needs special handling: Kernel allows to set the EV_REP bit, it doesn't set REP_* bits (which we wrap anyway) but it will also set the default values (500, 33). Device node is guessed based on the sysfs path: The sysfs path contains a eventN file, that corresponds to our /dev/input/eventN number. Use it so clients can quickly get the device node, without a libudev dependency. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>