summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-03-04 13:29:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-03-07 13:54:17 +1000
commit79915463987747e6a50dbc3c80fcfee87c7a287d (patch)
tree6eef22d969ac4e15a50710ad872b736602de67de
parent6ac3da05b890f285ec240d1977bc17ec1df1392a (diff)
downloadlibevdev-79915463987747e6a50dbc3c80fcfee87c7a287d.tar.gz
Document the FORCE_SYNC behavior a bit better
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 0deacd5c1ea587350e8acb4e760ed1711ad82a45)
-rw-r--r--libevdev/libevdev.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libevdev/libevdev.h b/libevdev/libevdev.h
index 898e919..5398061 100644
--- a/libevdev/libevdev.h
+++ b/libevdev/libevdev.h
@@ -699,6 +699,13 @@ enum libevdev_read_status {
* dropped after libevdev updates its internal state and event processing
* continues as normal.
*
+ * If a device has changed state without events being enqueued in libevdev,
+ * e.g. after changing the file descriptor, use the @ref
+ * LIBEVDEV_READ_FLAG_FORCE_SYNC flag. This triggers an internal sync of the
+ * device and libevdev_next_event() returns @ref LIBEVDEV_READ_STATUS_SYNC.
+ * Any state changes are available as events as described above. If
+ * @ref LIBEVDEV_READ_FLAG_FORCE_SYNC is set, the value of ev is undefined.
+ *
* @param dev The evdev device, already initialized with libevdev_set_fd()
* @param flags Set of flags to determine behaviour. If @ref LIBEVDEV_READ_FLAG_NORMAL
* is set, the next event is read in normal mode. If @ref LIBEVDEV_READ_FLAG_SYNC is