aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_region.h6
-rw-r--r--include/wlr/types/wlr_surface.h22
2 files changed, 17 insertions, 11 deletions
diff --git a/include/wlr/types/wlr_region.h b/include/wlr/types/wlr_region.h
index a79ab61d..be2f8b84 100644
--- a/include/wlr/types/wlr_region.h
+++ b/include/wlr/types/wlr_region.h
@@ -6,9 +6,11 @@
struct wl_resource;
/*
- * Implements the given resource as region.
+ * Creates a new region resource with the provided new ID. If `resource_list` is
+ * non-NULL, adds the region's resource to the list.
*/
-struct wl_resource *wlr_region_create(struct wl_client *client, uint32_t id);
+struct wl_resource *wlr_region_create(struct wl_client *client,
+ uint32_t version, uint32_t id, struct wl_list *resource_list);
pixman_region32_t *wlr_region_from_resource(struct wl_resource *resource);
diff --git a/include/wlr/types/wlr_surface.h b/include/wlr/types/wlr_surface.h
index 5ff9996d..c6eb3c7d 100644
--- a/include/wlr/types/wlr_surface.h
+++ b/include/wlr/types/wlr_surface.h
@@ -80,10 +80,6 @@ struct wlr_surface {
struct wl_signal destroy;
} events;
- // destroy listener used by compositor
- struct wl_listener compositor_listener;
- void *compositor_data;
-
// surface commit callback for the role that runs before all others
void (*role_committed)(struct wlr_surface *surface, void *role_data);
void *role_data;
@@ -102,8 +98,14 @@ typedef void (*wlr_surface_iterator_func_t)(struct wlr_surface *surface,
int sx, int sy, void *data);
struct wlr_renderer;
-struct wlr_surface *wlr_surface_create(struct wl_resource *res,
- struct wlr_renderer *renderer);
+
+/**
+ * Create a new surface resource with the provided new ID. If `resource_list`
+ * is non-NULL, adds the surface's resource to the list.
+ */
+struct wlr_surface *wlr_surface_create(struct wl_client *client,
+ uint32_t version, uint32_t id, struct wlr_renderer *renderer,
+ struct wl_list *resource_list);
/**
* Set the lifetime role for this surface. Returns 0 on success or -1 if the
@@ -121,10 +123,12 @@ int wlr_surface_set_role(struct wlr_surface *surface, const char *role,
bool wlr_surface_has_buffer(struct wlr_surface *surface);
/**
- * Create the subsurface implementation for this surface.
+ * Create a new subsurface resource with the provided new ID. If `resource_list`
+ * is non-NULL, adds the subsurface's resource to the list.
*/
-struct wlr_subsurface *wlr_surface_make_subsurface(struct wlr_surface *surface,
- struct wlr_surface *parent, uint32_t id);
+struct wlr_subsurface *wlr_subsurface_create(struct wlr_surface *surface,
+ struct wlr_surface *parent, uint32_t version, uint32_t id,
+ struct wl_list *resource_list);
/**
* Get the root of the subsurface tree for this surface.