aboutsummaryrefslogtreecommitdiff
path: root/include/rootston/view.h
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-21 14:50:37 +0100
committeremersion <contact@emersion.fr>2018-01-21 14:50:37 +0100
commita636d72fc77ebcaa986fd1b72e85664e2fe586a3 (patch)
treef24b49b187230b93afba4df99c3b8b58fd1b80ad /include/rootston/view.h
parenteeffe113372686f3b44fdb0c4e86cf8d00ba9c54 (diff)
rootston: track subsurface damage
Diffstat (limited to 'include/rootston/view.h')
-rw-r--r--include/rootston/view.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/rootston/view.h b/include/rootston/view.h
index 579b148a..6c5e0573 100644
--- a/include/rootston/view.h
+++ b/include/rootston/view.h
@@ -91,7 +91,11 @@ struct roots_view {
struct roots_xwayland_surface *roots_xwayland_surface;
#endif
};
+
struct wlr_surface *wlr_surface;
+ struct wl_list children; // roots_view_child::link
+
+ struct wl_listener new_subsurface;
struct {
struct wl_signal destroy;
@@ -112,6 +116,21 @@ struct roots_view {
void (*close)(struct roots_view *view);
};
+struct roots_view_child {
+ struct roots_view *view;
+ struct wlr_surface *wlr_surface;
+ struct wl_list link;
+
+ struct wl_listener commit;
+ struct wl_listener new_subsurface;
+};
+
+struct roots_subsurface {
+ struct roots_view_child view_child;
+ struct wlr_subsurface *wlr_subsurface;
+ struct wl_listener destroy;
+};
+
void view_get_box(const struct roots_view *view, struct wlr_box *box);
void view_activate(struct roots_view *view, bool active);
void view_move(struct roots_view *view, double x, double y);
@@ -126,4 +145,12 @@ bool view_center(struct roots_view *view);
void view_setup(struct roots_view *view);
void view_teardown(struct roots_view *view);
+void view_child_init(struct roots_view_child *child, struct roots_view *view,
+ struct wlr_surface *wlr_surface);
+void view_child_finish(struct roots_view_child *child);
+
+struct roots_subsurface *subsurface_create(struct roots_view *view,
+ struct wlr_subsurface *wlr_subsurface);
+void subsurface_destroy(struct roots_subsurface *subsurface);
+
#endif