From 256a1caae3d74922ae76cbc13d6a0570f6aeb6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Sat, 25 Jan 2014 11:46:55 +0100 Subject: [PATCH] Allow initial device configuration after receiving DEVICE_ADDED event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit By specifying that a device will not be read until the next time the user calls libinput_dispatch(), if data is available, it will allow for setting up initial configuration, such as tap button, output screen size, acceleration parameters, etc. Signed-off-by: Jonas Ã…dahl --- src/libinput.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/libinput.h b/src/libinput.h index 2419468f..af1614e9 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -120,7 +120,21 @@ enum libinput_touch_type { */ enum libinput_event_type { LIBINPUT_EVENT_NONE = 0, + + /** + * Signals that a device has been added to the context. The device will + * not be read until the next time the user calls libinput_dispatch() + * and data is available. + * + * This allows setting up initial device configuration before any events + * are created. + */ LIBINPUT_EVENT_DEVICE_ADDED, + + /** + * Signals that a device has been removed. No more events from the + * associated device will be in the queue or be queued after this event. + */ LIBINPUT_EVENT_DEVICE_REMOVED, LIBINPUT_EVENT_KEYBOARD_KEY = 300,