Changing a single value on an abs axis is slightly more common than
having to enable that axis outright. Provide a set of accessors for
doing so.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
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>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Returns non-zero if there are events avialable to be read.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Just enabling EV_REP sets them to zero, but when enabling them directly,
a value is required.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Current code was skipping REP_PERIOD
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Has no effect, but allow it nonetheless to avoid superfluous
conditions in client code.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
These aren't really that useful since they're just one or two lines in
code, but it saves callers from accidentally misplacing braces, etc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
A caller may start syncing but switch back to normal half-way through the
sync. In that case, we need to drop all sync events and continue with
regular events only.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
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>
libevdev needs to maintain the correct state of the device, even if the caller
decides to drop all delta events after a SYN_DROPPED.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
We can't enable axes on devices at runtime in the kernel, not even
for uinput devices. So this API can't work anyway, remove it before
someone thinks it does work.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
When a sync is complete and the first event is a SYN_DROPPED again,
we have a problem. Log that so that the process can print a warning.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
uinput doesn't route a SYN_DROPPED, so we neeed to handle fds in
a rather complicated manner. For tests, avoid this and instead force
the library to sync if a specific flag is given.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>