aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/scratchpad.h26
-rw-r--r--include/sway/tree/layout.h23
-rw-r--r--include/sway/tree/root.h61
-rw-r--r--include/sway/tree/workspace.h4
4 files changed, 62 insertions, 52 deletions
diff --git a/include/sway/scratchpad.h b/include/sway/scratchpad.h
deleted file mode 100644
index 5af5256f..00000000
--- a/include/sway/scratchpad.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifndef _SWAY_SCRATCHPAD_H
-#define _SWAY_SCRATCHPAD_H
-
-#include "tree/container.h"
-
-/**
- * Move a container to the scratchpad.
- */
-void scratchpad_add_container(struct sway_container *con);
-
-/**
- * Remove a container from the scratchpad.
- */
-void scratchpad_remove_container(struct sway_container *con);
-
-/**
- * Show or hide the next container on the scratchpad.
- */
-void scratchpad_toggle_auto(void);
-
-/**
- * Show or hide a specific container on the scratchpad.
- */
-void scratchpad_toggle_container(struct sway_container *con);
-
-#endif
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h
index a4c31bf6..77cd954b 100644
--- a/include/sway/tree/layout.h
+++ b/include/sway/tree/layout.h
@@ -3,6 +3,7 @@
#include <wlr/types/wlr_output_layout.h>
#include <wlr/render/wlr_texture.h>
#include "sway/tree/container.h"
+#include "sway/tree/root.h"
#include "config.h"
enum movement_direction {
@@ -24,28 +25,6 @@ enum resize_edge {
struct sway_container;
-struct sway_root {
- struct wlr_output_layout *output_layout;
-
- struct wl_listener output_layout_change;
-#ifdef HAVE_XWAYLAND
- struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link
-#endif
- struct wl_list drag_icons; // sway_drag_icon::link
-
- struct wlr_texture *debug_tree;
-
- struct wl_list outputs; // sway_output::link
-
- list_t *scratchpad; // struct sway_container
-
- struct {
- struct wl_signal new_container;
- } events;
-};
-
-void layout_init(void);
-
void container_add_child(struct sway_container *parent,
struct sway_container *child);
diff --git a/include/sway/tree/root.h b/include/sway/tree/root.h
new file mode 100644
index 00000000..edb7c817
--- /dev/null
+++ b/include/sway/tree/root.h
@@ -0,0 +1,61 @@
+#ifndef _SWAY_ROOT_H
+#define _SWAY_ROOT_H
+#include <wayland-server-core.h>
+#include <wayland-util.h>
+#include <wlr/types/wlr_output_layout.h>
+#include <wlr/render/wlr_texture.h>
+#include "sway/tree/container.h"
+#include "config.h"
+#include "list.h"
+
+extern struct sway_container root_container;
+
+struct sway_root {
+ struct wlr_output_layout *output_layout;
+
+ struct wl_listener output_layout_change;
+#ifdef HAVE_XWAYLAND
+ struct wl_list xwayland_unmanaged; // sway_xwayland_unmanaged::link
+#endif
+ struct wl_list drag_icons; // sway_drag_icon::link
+
+ struct wlr_texture *debug_tree;
+
+ struct wl_list outputs; // sway_output::link
+
+ list_t *scratchpad; // struct sway_container
+
+ struct {
+ struct wl_signal new_container;
+ } events;
+};
+
+void root_create(void);
+
+void root_destroy(void);
+
+/**
+ * Move a container to the scratchpad.
+ */
+void root_scratchpad_add_container(struct sway_container *con);
+
+/**
+ * Remove a container from the scratchpad.
+ */
+void root_scratchpad_remove_container(struct sway_container *con);
+
+/**
+ * Show a single scratchpad container.
+ */
+void root_scratchpad_show(struct sway_container *con);
+
+/**
+ * Hide a single scratchpad container.
+ */
+void root_scratchpad_hide(struct sway_container *con);
+
+struct sway_container *root_workspace_for_pid(pid_t pid);
+
+void root_record_workspace_pid(pid_t pid);
+
+#endif
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index 5ae0ae3a..3337f2c8 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -44,10 +44,6 @@ void workspace_output_add_priority(struct sway_container *workspace,
struct sway_container *workspace_output_get_highest_available(
struct sway_container *ws, struct sway_container *exclude);
-struct sway_container *workspace_for_pid(pid_t pid);
-
-void workspace_record_pid(pid_t pid);
-
void workspace_detect_urgent(struct sway_container *workspace);
#endif