doc: put some extra warning in for libinput_event_destroy()
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 9 Dec 2014 03:52:45 +0000 (13:52 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 11 Dec 2014 02:26:56 +0000 (12:26 +1000)
Unlike all other structs, events aren't refcounted and will get destroyed
immediately.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
src/libinput.h

index 22b0cfe2d8f9fca1cc7356b2d15c14b5119a10e1..d62516d1c7a1bff397b545f80999c8cd3638d4e8 100644 (file)
@@ -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 resources. Resources 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().
  */