shm: document wl_shm_buffer
authorSimon Ser <contact@emersion.fr>
Tue, 13 Jul 2021 13:52:31 +0000 (15:52 +0200)
committerSimon Ser <contact@emersion.fr>
Tue, 13 Jul 2021 13:52:31 +0000 (15:52 +0200)
The main motivation is to make it clear when a wl_shm_buffer is
destroyed.

Signed-off-by: Simon Ser <contact@emersion.fr>
src/wayland-shm.c

index 85204e4..671549c 100644 (file)
@@ -66,6 +66,15 @@ struct wl_shm_pool {
        bool sigbus_is_impossible;
 };
 
+/** \class wl_shm_buffer
+ *
+ * \brief A SHM buffer
+ *
+ * wl_shm_buffer provides a helper for accessing the contents of a wl_buffer
+ * resource created via the wl_shm interface.
+ *
+ * A wl_shm_buffer becomes invalid as soon as its #wl_resource is destroyed.
+ */
 struct wl_shm_buffer {
        struct wl_resource *resource;
        int32_t width, height;