summaryrefslogtreecommitdiff
path: root/libevdev/libevdev.h
Commit message (Collapse)AuthorAgeFilesLines
* Use 0 instead of "zero"Peter Hutterer2014-02-121-7/+7
| | | | | | | | We're a bit inconsistent here anyway because of the ample use of "non-zero" which can't really be converted to non-0. But let's at least be consistent with the use of 0 instead of zero. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* More documentation fixes and improvementsPeter Hutterer2014-02-121-24/+52
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Mark a few more functions as signal-safePeter Hutterer2014-02-121-0/+14
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Improve the documentation a bitPeter Hutterer2014-02-111-11/+24
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Document that we don't support EVIOCREVOKEPeter Hutterer2014-02-111-0/+3
| | | | | | | This is intentional, see http://lists.freedesktop.org/archives/input-tools/2014-January/000688.html Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: detect if we're running inside gdb and disable forkingPeter Hutterer2013-12-241-2/+3
| | | | | | | | | The Check test framework forks by default which is annoying when running gdb. Try to detect whether we're inside gdb by ptracing ourselves. If that works, we're not inside a debugger. If it doesn't, then assume we're inside a debugger and set CK_FORK to "no". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Documentation rewordings and additionsPeter Hutterer2013-12-241-6/+9
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Documentation typo fixesPeter Hutterer2013-12-241-4/+4
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add more cross-referencesPeter Hutterer2013-12-241-9/+9
| | | | | | | doxygen doesn't detect enum cross-references automatically, prefix them with @ref Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* doc: remove initial * from example code linesPeter Hutterer2013-12-241-51/+51
| | | | | | doxygen actually copies that over into the resulting output. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Don't treat devices with (ABS_MT_SLOT - 1) as multitouch devicesPeter Hutterer2013-12-101-0/+9
| | | | | | | | | | | | | Some devices (PS3 sixaxis controller) merely have a bunch of axes, without the semantic information that linux/input.h requires. For those, the ABS_MT range may be merely another axis, not the special range that we need to treat it with. Use a simple heuristic: if ABS_MT_SLOT - 1 is enabled, don't treat ABS_MT as multitouch axes. The ABS_MT_SLOT - 1 axis is not used for a real axis. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Merge branch 'ev-rep-handling'Peter Hutterer2013-12-091-3/+7
|\
| * Support EV_REP values through libevdev_get_event_valuePeter Hutterer2013-12-091-2/+6
| | | | | | | | | | | | | | | | | | We shouldn't have a separate API for that, the whole point of libevdev is to abstract the quirkyness of the ioctls into a common interface. So let's export the two EV_REP values through libevdev_get_event_value. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
| * Constify libevdev_get_repeatPeter Hutterer2013-12-091-1/+1
| | | | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* | State that the event is defined for a SYN_DROPPEDPeter Hutterer2013-12-091-3/+5
|/ | | | | | | | | | | | All clients that want to handle SYN_DROPPED correctly need to pass an EV_SYN through their own handlers before starting with the syn events. Rather than letting them synthesize that, guarantee that the event is defined the first time LIBEVDEV_READ_STATUS_SYNC is returned. This does not change existing behavior, it merely documents it so we can rely on it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Move the testing part to a separate pagePeter Hutterer2013-12-091-11/+13
| | | | | | Not something that interests the average visitor of the front page Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add a doxygen page listing the ioctls and their current supportPeter Hutterer2013-12-091-1/+63
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Documentation fix, refer to correct functionPeter Hutterer2013-12-051-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix a typo in the documentationPeter Hutterer2013-12-051-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Drop trailing comma from last element in the enumsPeter Hutterer2013-11-221-6/+5
| | | | | | | If a caller is compiled with -pedantic, this causes a few complaints Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Drop deprecated functionsPeter Hutterer2013-11-221-30/+0
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Provide separate lookup functions for zero-terminated stringsPeter Hutterer2013-11-011-5/+42
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Add libevdev_event_type/code_from_name() resolversDavid Herrmann2013-10-311-0/+42
| | | | | | | | | | | | Three new helpers are added: (1) libevdev_event_type_from_name() takes a string describing an EV_* event type and returns the given event-type constant. (2) libevdev_event_code_from_name() takes a string describing an event code and returns the given event-code constant. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Document backwards-compatibility behaviourPeter Hutterer2013-10-231-0/+56
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Note that libevdev_change_fd requires a LIBEVDEV_FORCE_SYNCPeter Hutterer2013-10-041-0/+4
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Mark three deprecated functions as suchPeter Hutterer2013-10-041-3/+3
| | | | | | | 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>
* Merge branch 'clockid'Peter Hutterer2013-09-181-0/+16
|\
| * wrap EVIOCSCLOCKID into an API callPeter Hutterer2013-09-131-0/+16
| | | | | | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* | Move libevdev_led_value documentation to the kernel groupPeter Hutterer2013-09-171-0/+3
|/ | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fix a comment to reflect the new APIPeter Hutterer2013-09-121-3/+3
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Remove warning comment from FORCE_SYNCPeter Hutterer2013-09-111-3/+2
| | | | | | | | | | | | | | There is a legitimate reason for clients to force a sync on the device. X.Org drivers lose the fd when the device is disabled and re-enabled. When the device comes back, a simple libevdev_change_fd() doesn't update the status on the device. Button states, etc. may have changed, etc. So a driver may call FORCE_SYNC after re-connecting to the fd to make sure the library and the driver get the current state of the device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Name-space the read flags betterPeter Hutterer2013-09-111-8/+14
| | | | | | | | 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>
* Enumerate libevdev_next_event() return codesPeter Hutterer2013-09-111-13/+36
| | | | | | | | | | | | | | | | 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>
* Fix comment typoPeter Hutterer2013-09-111-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add missing group assignment to a bunch of functions and enumerationsPeter Hutterer2013-09-111-6/+26
| | | | | | Without these, they won't show up in the documentation. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Revamp the API once againPeter Hutterer2013-09-101-7/+25
| | | | | | | | | | | | | | | | | 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>
* Merge branch 'logging-fix'Peter Hutterer2013-09-101-7/+39
|\
| * Log to stderr by defaultPeter Hutterer2013-09-101-2/+2
| | | | | | | | | | | | | | | | | | The logging we do use atm inside the library is largely to spot application errors. Log that to stderr by default so it doesn't get lost. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
| * Drop per-device logging function, use per-library one insteadPeter Hutterer2013-09-031-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to have separate logging function for each device created. More likely, libevdev will be hooked up once into the logging system and expected to deal with it. Plus, this allows us to log from the uinput code where we don't have the context anyway. Requires a rename to libevdev_set_log_function to avoid ABI breaks, and while we're breaking the ABI make the logging function more sophisticated to log line, number, etc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
| * Use ENOMEM instead of ENOSPCPeter Hutterer2013-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | From errno(3): ENOMEM Not enough space (POSIX.1) ENOSPC No space left on device (POSIX.1) when we run out memory the reason is a failed malloc, for which ENOMEM seems more appropriate. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* | Fix comment typoPeter Hutterer2013-09-041-1/+1
|/ | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add C++ header guardsPeter Hutterer2013-08-291-0/+9
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Drop deprecated APIPeter Hutterer2013-08-291-14/+0
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Add a note that libevdev_is_event_type/code have compile-time rangesPeter Hutterer2013-08-291-0/+6
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Rename enums to match lower_case formatPeter Hutterer2013-08-261-6/+6
| | | | | | | This is technically an API, but not an ABI change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
* Store the abs value after handling mt eventsPeter Hutterer2013-08-261-0/+8
| | | | | | | | | | | This way any ABS_MT_ event value that comes in will also be stored in abs_info. That always corresponds to "current slot", so if a user calls libevdev_set_event_value() or libevdev_get_event_value() they're actually modifying the current slot value. When the current slot changes, sync the state back into the absinfo values. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add functions to toggle LEDs on the devicePeter Hutterer2013-08-151-0/+46
| | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Add setters for an event or slot valuePeter Hutterer2013-08-151-0/+52
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Rename libevdev_kernel_set_abs_value to libevdev_kernel_set_abs_infoPeter Hutterer2013-08-141-1/+5
| | | | | | | Keep it in line with the non-kernel setter Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* Minor documentation improvementPeter Hutterer2013-08-141-7/+8
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>