From 0c43efb9bd0d9dffbd410c9e58746aab85fdd6d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonas=20=C3=85dahl?= Date: Sun, 8 Dec 2013 16:35:04 +0100 Subject: [PATCH] doc: Document basic event accessor functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jonas Ådahl --- src/libinput.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/libinput.h b/src/libinput.h index a29a39c..f24d49d 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -177,9 +177,29 @@ struct libinput_event_touch_touch; void libinput_event_destroy(struct libinput_event *event); +/** + * @ingroup event + * + * Get the type of the event. + * + * @param event An event retrieved by libinput_get_event(). + */ enum libinput_event_type libinput_event_get_type(struct libinput_event *event); +/** + * @ingroup event + * + * Get get the target union of the event. + * + * The valid union member depends on the event type. For global events not + * related to some seat or device, the target is a libinput struct pointer. + * For events associated with a seat, the target is a libinput_seat pointer + * and for events associated with a device, the target is a libinput_device + * pointer. + * + * @param event An event retrieved by libinput_get_event(). + */ union libinput_event_target libinput_event_get_target(struct libinput_event *event); -- 2.7.4