From 8899310fc8ffc6f716ec6342ae415cb8692df855 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 13 Jul 2021 15:52:31 +0200 Subject: [PATCH] shm: document wl_shm_buffer The main motivation is to make it clear when a wl_shm_buffer is destroyed. Signed-off-by: Simon Ser --- src/wayland-shm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/wayland-shm.c b/src/wayland-shm.c index 85204e4d..671549c3 100644 --- a/src/wayland-shm.c +++ b/src/wayland-shm.c @@ -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;