aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sway/desktop.h7
-rw-r--r--include/sway/output.h6
-rw-r--r--include/sway/tree/container.h8
-rw-r--r--include/sway/tree/view.h50
4 files changed, 68 insertions, 3 deletions
diff --git a/include/sway/desktop.h b/include/sway/desktop.h
new file mode 100644
index 00000000..96bdc94c
--- /dev/null
+++ b/include/sway/desktop.h
@@ -0,0 +1,7 @@
+#include <wlr/types/wlr_surface.h>
+
+void desktop_damage_whole_surface(struct wlr_surface *surface, double lx,
+ double ly);
+
+void desktop_damage_from_surface(struct wlr_surface *surface, double lx,
+ double ly);
diff --git a/include/sway/output.h b/include/sway/output.h
index 98d0f83f..4bffa2b7 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -34,9 +34,15 @@ struct sway_output {
void output_damage_whole(struct sway_output *output);
+void output_damage_whole_surface(struct sway_output *output,
+ double ox, double oy, struct wlr_surface *surface);
+
void output_damage_whole_view(struct sway_output *output,
struct sway_view *view);
+void output_damage_whole_container(struct sway_output *output,
+ struct sway_container *con);
+
struct sway_container *output_by_name(const char *name);
#endif
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 3a3a9429..7acb607b 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -97,8 +97,7 @@ struct sway_container *container_create(enum sway_container_type type);
const char *container_type_to_str(enum sway_container_type type);
-struct sway_container *output_create(
- struct sway_output *sway_output);
+struct sway_container *output_create(struct sway_output *sway_output);
/**
* Create a new container container. A container container can be a a child of
@@ -116,7 +115,8 @@ struct sway_container *output_create(struct sway_output *sway_output);
* Create a new workspace container. Workspaces are children of an output
* container and are ordered alphabetically by name.
*/
-struct sway_container *workspace_create(struct sway_container *output, const char *name);
+struct sway_container *workspace_create(struct sway_container *output,
+ const char *name);
/*
* Create a new view container. A view can be a child of a workspace container
@@ -182,4 +182,6 @@ bool container_has_child(struct sway_container *con,
void container_create_notify(struct sway_container *container);
+void container_damage_whole(struct sway_container *container);
+
#endif
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index d4dace4a..03d27ceb 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 {
@@ -54,6 +60,7 @@ struct sway_xdg_shell_v6_view {
struct wl_listener request_move;
struct wl_listener request_resize;
struct wl_listener request_maximize;
+ struct wl_listener new_popup;
struct wl_listener map;
struct wl_listener unmap;
struct wl_listener destroy;
@@ -80,6 +87,12 @@ struct sway_xwayland_unmanaged {
struct wlr_xwayland_surface *wlr_xwayland_surface;
struct wl_list link;
+ int lx, ly;
+
+ struct wl_listener request_configure;
+ struct wl_listener commit;
+ struct wl_listener map;
+ struct wl_listener unmap;
struct wl_listener destroy;
};
@@ -95,6 +108,37 @@ 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;
+};
+
+struct sway_xdg_popup_v6 {
+ struct sway_view_child child;
+
+ struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6;
+
+ struct wl_listener new_popup;
+ struct wl_listener unmap;
+ struct wl_listener destroy;
+};
+
const char *view_get_title(struct sway_view *view);
const char *view_get_app_id(struct sway_view *view);
@@ -129,4 +173,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