diff --git a/src/wayland-server.h b/src/wayland-server.h index de389eaf..e5e0ed8b 100644 --- a/src/wayland-server.h +++ b/src/wayland-server.h @@ -298,6 +298,11 @@ struct wl_listener * wl_resource_get_destroy_listener(struct wl_resource *resource, wl_notify_func_t notify); +#define wl_resource_for_each(resource, list) \ + for (resource = 0, resource = wl_resource_from_link((list)->next); \ + wl_resource_get_link(resource) != (list); \ + resource = wl_resource_from_link(wl_resource_get_link(resource)->next)) + struct wl_shm_buffer; struct wl_shm_buffer *