aboutsummaryrefslogtreecommitdiff
path: root/include/rootston/view.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rootston/view.h')
-rw-r--r--include/rootston/view.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/include/rootston/view.h b/include/rootston/view.h
index 579b148a..8cfdf321 100644
--- a/include/rootston/view.h
+++ b/include/rootston/view.h
@@ -23,13 +23,15 @@ struct roots_wl_shell_surface {
struct roots_xdg_surface_v6 {
struct roots_view *view;
- struct wl_listener commit;
struct wl_listener destroy;
+ struct wl_listener new_popup;
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_maximize;
struct wl_listener request_fullscreen;
+ struct wl_listener surface_commit;
+
uint32_t pending_move_resize_configure_serial;
};
@@ -91,7 +93,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 +118,30 @@ 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;
+
+ void (*destroy)(struct roots_view_child *child);
+};
+
+struct roots_subsurface {
+ struct roots_view_child view_child;
+ struct wlr_subsurface *wlr_subsurface;
+ struct wl_listener destroy;
+};
+
+struct roots_xdg_popup_v6 {
+ struct roots_view_child view_child;
+ struct wlr_xdg_popup_v6 *wlr_popup;
+ struct wl_listener destroy;
+ struct wl_listener new_popup;
+};
+
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 +156,11 @@ 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);
+
#endif