aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/tree/view.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index d4dace4a..f8e41652 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -45,6 +45,12 @@ struct sway_view {
struct wlr_xwayland_surface *wlr_xwayland_surface;
struct wlr_wl_shell_surface *wlr_wl_shell_surface;
};
+
+ struct {
+ struct wl_signal unmap;
+ } events;
+
+ struct wl_listener surface_new_subsurface;
};
struct sway_xdg_shell_v6_view {
@@ -95,6 +101,27 @@ struct sway_wl_shell_view {
int pending_width, pending_height;
};
+struct sway_view_child;
+
+struct sway_view_child_impl {
+ void (*destroy)(struct sway_view_child *child);
+};
+
+/**
+ * A view child is a surface in the view tree, such as a subsurface or a popup.
+ */
+struct sway_view_child {
+ const struct sway_view_child_impl *impl;
+
+ struct sway_view *view;
+ struct wlr_surface *surface;
+
+ struct wl_listener surface_commit;
+ struct wl_listener surface_new_subsurface;
+ struct wl_listener surface_destroy;
+ struct wl_listener view_unmap;
+};
+
const char *view_get_title(struct sway_view *view);
const char *view_get_app_id(struct sway_view *view);
@@ -129,4 +156,10 @@ void view_update_position(struct sway_view *view, double ox, double oy);
void view_update_size(struct sway_view *view, int width, int height);
+void view_child_init(struct sway_view_child *child,
+ const struct sway_view_child_impl *impl, struct sway_view *view,
+ struct wlr_surface *surface);
+
+void view_child_destroy(struct sway_view_child *child);
+
#endif