aboutsummaryrefslogtreecommitdiff
path: root/include/sway/tree
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/tree')
-rw-r--r--include/sway/tree/container.h13
-rw-r--r--include/sway/tree/view.h9
-rw-r--r--include/sway/tree/workspace.h6
3 files changed, 26 insertions, 2 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 44ff9f7d..4d0e6003 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -113,7 +113,7 @@ struct sway_container {
enum sway_container_type type;
enum sway_container_layout layout;
- enum sway_container_layout prev_layout;
+ enum sway_container_layout prev_split_layout;
bool is_sticky;
@@ -323,12 +323,23 @@ void container_floating_translate(struct sway_container *con,
double x_amount, double y_amount);
/**
+ * Choose an output for the floating container's new position.
+ */
+struct sway_container *container_floating_find_output(
+ struct sway_container *con);
+
+/**
* Move a floating container to a new layout-local position.
*/
void container_floating_move_to(struct sway_container *con,
double lx, double ly);
/**
+ * Move a floating container to the center of the workspace.
+ */
+void container_floating_move_to_center(struct sway_container *con);
+
+/**
* Mark a container as dirty if it isn't already. Dirty containers will be
* included in the next transaction then unmarked as dirty.
*/
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h
index 37fd02bc..c2225bcb 100644
--- a/include/sway/tree/view.h
+++ b/include/sway/tree/view.h
@@ -118,6 +118,8 @@ struct sway_view {
struct sway_xdg_shell_v6_view {
struct sway_view view;
+ enum wlr_server_decoration_manager_mode deco_mode;
+
struct wl_listener commit;
struct wl_listener request_move;
struct wl_listener request_resize;
@@ -134,6 +136,8 @@ struct sway_xdg_shell_v6_view {
struct sway_xdg_shell_view {
struct sway_view view;
+ enum wlr_server_decoration_manager_mode deco_mode;
+
struct wl_listener commit;
struct wl_listener request_move;
struct wl_listener request_resize;
@@ -316,6 +320,11 @@ void view_update_title(struct sway_view *view, bool force);
void view_execute_criteria(struct sway_view *view);
/**
+ * Find any view that has the given mark and return it.
+ */
+struct sway_view *view_find_mark(char *mark);
+
+/**
* Find any view that has the given mark and remove the mark from the view.
* Returns true if it matched a view.
*/
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index 3337f2c8..056f2329 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -1,6 +1,7 @@
#ifndef _SWAY_WORKSPACE_H
#define _SWAY_WORKSPACE_H
+#include <stdbool.h>
#include "sway/tree/container.h"
struct sway_view;
@@ -15,9 +16,12 @@ struct sway_workspace {
extern char *prev_workspace_name;
+struct sway_container *workspace_get_initial_output(const char *name);
+
char *workspace_next_name(const char *output_name);
-bool workspace_switch(struct sway_container *workspace);
+bool workspace_switch(struct sway_container *workspace,
+ bool no_auto_back_and_forth);
struct sway_container *workspace_by_number(const char* name);