summaryrefslogtreecommitdiff
path: root/libevdev/libevdev.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-05-30 14:02:17 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-30 14:02:27 +1000
commitee054e9cf938c508a59b945dc52c7cfcdf2068d2 (patch)
treef51b47373a479ac55b4f53a2bbea10da0eb20165 /libevdev/libevdev.h
parent4ae4f24ef773dcb1f7a841d31f70e6900670158e (diff)
downloadlibevdev-ee054e9cf938c508a59b945dc52c7cfcdf2068d2.tar.gz
Add a function to retrieve the current slot
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'libevdev/libevdev.h')
-rw-r--r--libevdev/libevdev.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libevdev/libevdev.h b/libevdev/libevdev.h
index b067015..4a6e183 100644
--- a/libevdev/libevdev.h
+++ b/libevdev/libevdev.h
@@ -309,6 +309,17 @@ int libevdev_fetch_slot_value(const struct libevdev *dev, unsigned int slot, uns
int libevdev_get_num_slots(const struct libevdev *dev);
/**
+ * Get the currently active slot. This may differ from the value
+ * an ioctl may return at this time as events may have been read off the fd
+ * since changing the slot value but those events are still in the buffer
+ * waiting to be processed. The returned value is the value a caller would
+ * see if it were to process events manually one-by-one.
+ *
+ * @return the currently active slot (logically)
+ */
+int libevdev_get_current_slot(const struct libevdev *dev);
+
+/**
* Forcibly enable an event type on this device, even if the underlying
* device does not support it. While this cannot make the device actually
* report such events, it will now return true for libevdev_has_event_type.