diff options
| author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-08-15 11:10:17 +1000 |
|---|---|---|
| committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-08-26 09:52:33 +1000 |
| commit | edc31cf12ef9f99e22aacdc93f12dc1511cd6ad0 (patch) | |
| tree | bbdc20653d7603084bb35207b12869ae6e2fdb27 /libevdev/libevdev.h | |
| parent | f29e4118fcbc58ad79561e64f7ede15f59224240 (diff) | |
| download | libevdev-edc31cf12ef9f99e22aacdc93f12dc1511cd6ad0.tar.gz | |
Store the abs value after handling mt events
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>
Diffstat (limited to 'libevdev/libevdev.h')
| -rw-r--r-- | libevdev/libevdev.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libevdev/libevdev.h b/libevdev/libevdev.h index db6a2ec..61553cc 100644 --- a/libevdev/libevdev.h +++ b/libevdev/libevdev.h @@ -799,6 +799,10 @@ const struct input_absinfo* libevdev_get_abs_info(const struct libevdev *dev, un * Behaviour of this function is undefined if the device does not provide * the event. * + * If the device supports ABS_MT_SLOT, the value returned for any ABS_MT_* + * event code is the value of the currently active slot. You should use + * libevdev_get_slot_value() instead. + * * @param dev The evdev device, already initialized with libevdev_set_fd() * @param type The event type for the code to query (EV_SYN, EV_REL, etc.) * @param code The event code to query for, one of ABS_X, REL_X, etc. @@ -823,6 +827,10 @@ int libevdev_get_event_value(const struct libevdev *dev, unsigned int type, unsi * this device. A future call to libevdev_get_event_value() will return this * value, unless the value was overwritten by an event. * + * If the device supports ABS_MT_SLOT, the value set for any ABS_MT_* + * event code is the value of the currently active slot. You should use + * libevdev_set_slot_value() instead. + * * @param dev The evdev device, already initialized with libevdev_set_fd() * @param type The event type for the code to query (EV_SYN, EV_REL, etc.) * @param code The event code to set the value for, one of ABS_X, LED_NUML, etc. |
