[PATCH libinput 6/6] doc: put some extra warning in for libinput_event_destroy()
Peter Hutterer
peter.hutterer at who-t.net
Tue Dec 9 16:34:04 PST 2014
Unlike all other structs, events aren't refcounted and will get destroyed
immediately.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
src/libinput.h | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/libinput.h b/src/libinput.h
index 7e5d93c..f7cb169 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -335,6 +335,9 @@ struct libinput_seat;
*
* The base event type. Use libinput_event_get_pointer_event() or similar to
* get the actual event type.
+ *
+ * @warning Unlike other structs events are considered transient and
+ * <b>not</b> refcounted.
*/
struct libinput_event;
@@ -382,7 +385,12 @@ struct libinput_event_touch;
/**
* @ingroup event
*
- * Destroy the event.
+ * Destroy the event, freeing all associated data. Data obtained from this
+ * event must be considered invalid after this call.
+ *
+ * @warning Unlike other structs events are considered transient and
+ * <b>not</b> refcounted. Calling libinput_event_destroy() <b>will</b>
+ * destroy the event.
*
* @param event An event retrieved by libinput_get_event().
*/
--
2.1.0
More information about the wayland-devel
mailing list