summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 23:41:33 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 23:41:33 -0400
commitdc8c9fbeb664518c76066cc28ee29452c6c30128 (patch)
tree88c2de0d08e00b2a30cb20cdfadfa6e53f5c59b4 /include
parentMerge pull request #1653 from swaywm/revert-1647-refactor-tree (diff)
downloadsway-dc8c9fbeb664518c76066cc28ee29452c6c30128.tar.gz
sway-dc8c9fbeb664518c76066cc28ee29452c6c30128.tar.zst
sway-dc8c9fbeb664518c76066cc28ee29452c6c30128.zip
Revert "Merge pull request #1653 from swaywm/revert-1647-refactor-tree"
Diffstat (limited to 'include')
-rw-r--r--include/sway/config.h17
-rw-r--r--include/sway/container.h169
-rw-r--r--include/sway/criteria.h6
-rw-r--r--include/sway/input/input-manager.h4
-rw-r--r--include/sway/input/seat.h13
-rw-r--r--include/sway/ipc-json.h6
-rw-r--r--include/sway/ipc-server.h6
-rw-r--r--include/sway/layout.h43
-rw-r--r--include/sway/tree/container.h137
-rw-r--r--include/sway/tree/layout.h52
-rw-r--r--include/sway/tree/view.h (renamed from include/sway/view.h)4
-rw-r--r--include/sway/tree/workspace.h26
-rw-r--r--include/sway/workspace.h20
13 files changed, 243 insertions, 260 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index 48a8b0ab..7fdd0be0 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -10,8 +10,8 @@
10#include <xkbcommon/xkbcommon.h> 10#include <xkbcommon/xkbcommon.h>
11#include <time.h> 11#include <time.h>
12#include "list.h" 12#include "list.h"
13#include "layout.h" 13#include "tree/layout.h"
14#include "container.h" 14#include "tree/container.h"
15 15
16/** 16/**
17 * Describes a variable created via the `set` command. 17 * Describes a variable created via the `set` command.
@@ -299,8 +299,8 @@ struct sway_config {
299 char *floating_scroll_down_cmd; 299 char *floating_scroll_down_cmd;
300 char *floating_scroll_left_cmd; 300 char *floating_scroll_left_cmd;
301 char *floating_scroll_right_cmd; 301 char *floating_scroll_right_cmd;
302 enum swayc_layouts default_orientation; 302 enum sway_container_layout default_orientation;
303 enum swayc_layouts default_layout; 303 enum sway_container_layout default_layout;
304 char *font; 304 char *font;
305 int font_height; 305 int font_height;
306 306
@@ -324,8 +324,8 @@ struct sway_config {
324 list_t *config_chain; 324 list_t *config_chain;
325 const char *current_config; 325 const char *current_config;
326 326
327 enum swayc_border_types border; 327 enum sway_container_border border;
328 enum swayc_border_types floating_border; 328 enum sway_container_border floating_border;
329 int border_thickness; 329 int border_thickness;
330 int floating_border_thickness; 330 int floating_border_thickness;
331 enum edge_border_types hide_edge_borders; 331 enum edge_border_types hide_edge_borders;
@@ -356,7 +356,7 @@ struct sway_config {
356 struct input_config *input_config; 356 struct input_config *input_config;
357 struct seat_config *seat_config; 357 struct seat_config *seat_config;
358 struct sway_seat *seat; 358 struct sway_seat *seat;
359 swayc_t *current_container; 359 struct sway_container *current_container;
360 } handler_context; 360 } handler_context;
361}; 361};
362 362
@@ -416,7 +416,8 @@ void output_get_identifier(char *identifier, size_t len,
416 struct sway_output *output); 416 struct sway_output *output);
417struct output_config *new_output_config(const char *name); 417struct output_config *new_output_config(const char *name);
418void merge_output_config(struct output_config *dst, struct output_config *src); 418void merge_output_config(struct output_config *dst, struct output_config *src);
419void apply_output_config(struct output_config *oc, swayc_t *output); 419void apply_output_config(struct output_config *oc,
420 struct sway_container *output);
420void free_output_config(struct output_config *oc); 421void free_output_config(struct output_config *oc);
421 422
422/** 423/**
diff --git a/include/sway/container.h b/include/sway/container.h
deleted file mode 100644
index f200a1a2..00000000
--- a/include/sway/container.h
+++ /dev/null
@@ -1,169 +0,0 @@
1#ifndef _SWAY_CONTAINER_H
2#define _SWAY_CONTAINER_H
3#include <stdint.h>
4#include <sys/types.h>
5#include <wlr/types/wlr_box.h>
6#include <wlr/types/wlr_surface.h>
7#include "list.h"
8
9typedef struct sway_container swayc_t;
10
11extern swayc_t root_container;
12
13struct sway_view;
14struct sway_seat;
15
16/**
17 * Different kinds of containers.
18 *
19 * This enum is in order. A container will never be inside of a container below
20 * it on this list.
21 */
22enum swayc_types {
23 C_ROOT, /**< The root container. Only one of these ever exists. */
24 C_OUTPUT, /**< An output (aka monitor, head, etc). */
25 C_WORKSPACE, /**< A workspace. */
26 C_CONTAINER, /**< A manually created container. */
27 C_VIEW, /**< A view (aka window). */
28
29 C_TYPES,
30};
31
32/**
33 * Different ways to arrange a container.
34 */
35enum swayc_layouts {
36 L_NONE, /**< Used for containers that have no layout (views, root) */
37 L_HORIZ,
38 L_VERT,
39 L_STACKED,
40 L_TABBED,
41 L_FLOATING, /**< A psuedo-container, removed from the tree, to hold floating windows */
42
43 /* Awesome/Monad style auto layouts */
44 L_AUTO_LEFT,
45 L_AUTO_RIGHT,
46 L_AUTO_TOP,
47 L_AUTO_BOTTOM,
48
49 L_AUTO_FIRST = L_AUTO_LEFT,
50 L_AUTO_LAST = L_AUTO_BOTTOM,
51
52 // Keep last
53 L_LAYOUTS,
54};
55
56enum swayc_border_types {
57 B_NONE, /**< No border */
58 B_PIXEL, /**< 1px border */
59 B_NORMAL, /**< Normal border with title bar */
60};
61
62struct sway_root;
63struct sway_output;
64struct sway_view;
65
66/**
67 * Stores information about a container.
68 *
69 * The tree is made of these. Views are containers that cannot have children.
70 */
71struct sway_container {
72 union {
73 // TODO: Encapsulate state for other node types as well like C_CONTAINER
74 struct sway_root *sway_root; // C_ROOT
75 struct sway_output *sway_output; // C_OUTPUT
76 struct sway_view *sway_view; // C_VIEW
77 };
78
79 /**
80 * A unique ID to identify this container. Primarily used in the
81 * get_tree JSON output.
82 */
83 size_t id;
84
85 char *name;
86
87 enum swayc_types type;
88 enum swayc_layouts layout;
89 enum swayc_layouts prev_layout;
90 enum swayc_layouts workspace_layout;
91
92 /**
93 * The coordinates that this view appear at, relative to the output they
94 * are located on (output containers have absolute coordinates).
95 */
96 double x, y;
97
98 /**
99 * Width and height of this container, without borders or gaps.
100 */
101 double width, height;
102
103 list_t *children;
104
105 /**
106 * The parent of this container. NULL for the root container.
107 */
108 struct sway_container *parent;
109
110 /**
111 * Number of master views in auto layouts.
112 */
113 size_t nb_master;
114
115 /**
116 * Number of slave groups (e.g. columns) in auto layouts.
117 */
118 size_t nb_slave_groups;
119
120 /**
121 * Marks applied to the container, list_t of char*.
122 */
123 list_t *marks;
124
125 struct {
126 struct wl_signal destroy;
127 } events;
128};
129
130void swayc_descendants_of_type(swayc_t *root, enum swayc_types type,
131 void (*func)(swayc_t *item, void *data), void *data);
132
133swayc_t *new_output(struct sway_output *sway_output);
134swayc_t *new_workspace(swayc_t *output, const char *name);
135swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
136
137swayc_t *destroy_output(swayc_t *output);
138swayc_t *destroy_view(swayc_t *view);
139
140swayc_t *next_view_sibling(struct sway_seat *seat);
141
142/**
143 * Finds a container based on test criteria. Returns the first container that
144 * passes the test.
145 */
146swayc_t *swayc_by_test(swayc_t *container,
147 bool (*test)(swayc_t *view, void *data), void *data);
148/**
149 * Finds a parent container with the given swayc_type.
150 */
151swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type);
152/**
153 * Maps a container's children over a function.
154 */
155void container_map(swayc_t *container,
156 void (*f)(swayc_t *view, void *data), void *data);
157
158swayc_t *swayc_at(swayc_t *parent, double lx, double ly,
159 struct wlr_surface **surface, double *sx, double *sy);
160
161/**
162 * Apply the function for each child of the container breadth first.
163 */
164void container_for_each_bfs(swayc_t *con, void (*f)(swayc_t *con, void *data),
165 void *data);
166
167swayc_t *swayc_change_layout(swayc_t *container, enum swayc_layouts layout);
168
169#endif
diff --git a/include/sway/criteria.h b/include/sway/criteria.h
index 9b4b4bef..ec256ddb 100644
--- a/include/sway/criteria.h
+++ b/include/sway/criteria.h
@@ -1,7 +1,7 @@
1#ifndef _SWAY_CRITERIA_H 1#ifndef _SWAY_CRITERIA_H
2#define _SWAY_CRITERIA_H 2#define _SWAY_CRITERIA_H
3 3
4#include "container.h" 4#include "tree/container.h"
5#include "list.h" 5#include "list.h"
6 6
7/** 7/**
@@ -31,12 +31,12 @@ char *extract_crit_tokens(list_t *tokens, const char *criteria);
31 31
32// Returns list of criteria that match given container. These criteria have 32// Returns list of criteria that match given container. These criteria have
33// been set with `for_window` commands and have an associated cmdlist. 33// been set with `for_window` commands and have an associated cmdlist.
34list_t *criteria_for(swayc_t *cont); 34list_t *criteria_for(struct sway_container *cont);
35 35
36// Returns a list of all containers that match the given list of tokens. 36// Returns a list of all containers that match the given list of tokens.
37list_t *container_for_crit_tokens(list_t *tokens); 37list_t *container_for_crit_tokens(list_t *tokens);
38 38
39// Returns true if any criteria in the given list matches this container 39// Returns true if any criteria in the given list matches this container
40bool criteria_any(swayc_t *cont, list_t *criteria); 40bool criteria_any(struct sway_container *cont, list_t *criteria);
41 41
42#endif 42#endif
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
index eab7dc90..c6c73dba 100644
--- a/include/sway/input/input-manager.h
+++ b/include/sway/input/input-manager.h
@@ -31,10 +31,10 @@ struct sway_input_manager *sway_input_manager_create(
31 struct sway_server *server); 31 struct sway_server *server);
32 32
33bool sway_input_manager_has_focus(struct sway_input_manager *input, 33bool sway_input_manager_has_focus(struct sway_input_manager *input,
34 swayc_t *container); 34 struct sway_container *container);
35 35
36void sway_input_manager_set_focus(struct sway_input_manager *input, 36void sway_input_manager_set_focus(struct sway_input_manager *input,
37 swayc_t *container); 37 struct sway_container *container);
38 38
39void sway_input_manager_configure_xcursor(struct sway_input_manager *input); 39void sway_input_manager_configure_xcursor(struct sway_input_manager *input);
40 40
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index 1d55bec7..496bfd5d 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -14,7 +14,7 @@ struct sway_seat_device {
14 14
15struct sway_seat_container { 15struct sway_seat_container {
16 struct sway_seat *seat; 16 struct sway_seat *seat;
17 swayc_t *container; 17 struct sway_container *container;
18 18
19 struct wl_list link; // sway_seat::focus_stack 19 struct wl_list link; // sway_seat::focus_stack
20 20
@@ -54,9 +54,9 @@ void sway_seat_remove_device(struct sway_seat *seat,
54 54
55void sway_seat_configure_xcursor(struct sway_seat *seat); 55void sway_seat_configure_xcursor(struct sway_seat *seat);
56 56
57void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container); 57void sway_seat_set_focus(struct sway_seat *seat, struct sway_container *container);
58 58
59swayc_t *sway_seat_get_focus(struct sway_seat *seat); 59struct sway_container *sway_seat_get_focus(struct sway_seat *seat);
60 60
61/** 61/**
62 * Return the last container to be focused for the seat (or the most recently 62 * Return the last container to be focused for the seat (or the most recently
@@ -67,10 +67,11 @@ swayc_t *sway_seat_get_focus(struct sway_seat *seat);
67 * is destroyed, or focus moves to a container with children and we need to 67 * is destroyed, or focus moves to a container with children and we need to
68 * descend into the next leaf in focus order. 68 * descend into the next leaf in focus order.
69 */ 69 */
70swayc_t *sway_seat_get_focus_inactive(struct sway_seat *seat, swayc_t *container); 70struct sway_container *sway_seat_get_focus_inactive(struct sway_seat *seat,
71 struct sway_container *container);
71 72
72swayc_t *sway_seat_get_focus_by_type(struct sway_seat *seat, 73struct sway_container *sway_seat_get_focus_by_type(struct sway_seat *seat,
73 enum swayc_types type); 74 enum sway_container_type type);
74 75
75void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config); 76void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config);
76 77
diff --git a/include/sway/ipc-json.h b/include/sway/ipc-json.h
index eef5a018..3d2fdc4f 100644
--- a/include/sway/ipc-json.h
+++ b/include/sway/ipc-json.h
@@ -1,13 +1,13 @@
1#ifndef _SWAY_IPC_JSON_H 1#ifndef _SWAY_IPC_JSON_H
2#define _SWAY_IPC_JSON_H 2#define _SWAY_IPC_JSON_H
3#include <json-c/json.h> 3#include <json-c/json.h>
4#include "sway/container.h" 4#include "sway/tree/container.h"
5#include "sway/input/input-manager.h" 5#include "sway/input/input-manager.h"
6 6
7json_object *ipc_json_get_version(); 7json_object *ipc_json_get_version();
8 8
9json_object *ipc_json_describe_container(swayc_t *c); 9json_object *ipc_json_describe_container(struct sway_container *c);
10json_object *ipc_json_describe_container_recursive(swayc_t *c); 10json_object *ipc_json_describe_container_recursive(struct sway_container *c);
11json_object *ipc_json_describe_input(struct sway_input_device *device); 11json_object *ipc_json_describe_input(struct sway_input_device *device);
12 12
13#endif 13#endif
diff --git a/include/sway/ipc-server.h b/include/sway/ipc-server.h
index bcf1c433..d73006dc 100644
--- a/include/sway/ipc-server.h
+++ b/include/sway/ipc-server.h
@@ -1,15 +1,17 @@
1#ifndef _SWAY_IPC_SERVER_H 1#ifndef _SWAY_IPC_SERVER_H
2#define _SWAY_IPC_SERVER_H 2#define _SWAY_IPC_SERVER_H
3#include <sys/socket.h> 3#include <sys/socket.h>
4#include "sway/container.h" 4#include "sway/tree/container.h"
5#include "ipc.h" 5#include "ipc.h"
6 6
7struct sway_server; 7struct sway_server;
8 8
9void ipc_init(struct sway_server *server); 9void ipc_init(struct sway_server *server);
10
10void ipc_terminate(void); 11void ipc_terminate(void);
12
11struct sockaddr_un *ipc_user_sockaddr(void); 13struct sockaddr_un *ipc_user_sockaddr(void);
12 14
13void ipc_event_window(swayc_t *window, const char *change); 15void ipc_event_window(struct sway_container *window, const char *change);
14 16
15#endif 17#endif
diff --git a/include/sway/layout.h b/include/sway/layout.h
deleted file mode 100644
index e82c4442..00000000
--- a/include/sway/layout.h
+++ /dev/null
@@ -1,43 +0,0 @@
1#ifndef _SWAY_LAYOUT_H
2#define _SWAY_LAYOUT_H
3
4#include <wlr/types/wlr_output_layout.h>
5#include "sway/container.h"
6
7enum movement_direction {
8 MOVE_LEFT,
9 MOVE_RIGHT,
10 MOVE_UP,
11 MOVE_DOWN,
12 MOVE_PARENT,
13 MOVE_CHILD,
14 MOVE_NEXT,
15 MOVE_PREV,
16 MOVE_FIRST
17};
18
19struct sway_container;
20
21struct sway_root {
22 struct wlr_output_layout *output_layout;
23
24 struct wl_listener output_layout_change;
25
26 struct wl_list unmanaged_views; // sway_view::unmanaged_view_link
27
28 struct {
29 struct wl_signal new_container;
30 } events;
31};
32
33void init_layout(void);
34void add_child(struct sway_container *parent, struct sway_container *child);
35swayc_t *add_sibling(swayc_t *parent, swayc_t *child);
36struct sway_container *remove_child(struct sway_container *child);
37enum swayc_layouts default_layout(struct sway_container *output);
38void sort_workspaces(struct sway_container *output);
39void arrange_windows(struct sway_container *container, double width, double height);
40swayc_t *get_swayc_in_direction(swayc_t *container,
41 struct sway_seat *seat, enum movement_direction dir);
42
43#endif
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
new file mode 100644
index 00000000..16df3ee7
--- /dev/null
+++ b/include/sway/tree/container.h
@@ -0,0 +1,137 @@
1#ifndef _SWAY_CONTAINER_H
2#define _SWAY_CONTAINER_H
3#include <stdint.h>
4#include <sys/types.h>
5#include <wlr/types/wlr_box.h>
6#include <wlr/types/wlr_surface.h>
7#include "list.h"
8
9extern struct sway_container root_container;
10
11struct sway_view;
12struct sway_seat;
13
14/**
15 * Different kinds of containers.
16 *
17 * This enum is in order. A container will never be inside of a container below
18 * it on this list.
19 */
20enum sway_container_type {
21 C_ROOT,
22 C_OUTPUT,
23 C_WORKSPACE,
24 C_CONTAINER,
25 C_VIEW,
26
27 C_TYPES,
28};
29
30enum sway_container_layout {
31 L_NONE,
32 L_HORIZ,
33 L_VERT,
34 L_STACKED,
35 L_TABBED,
36 L_FLOATING,
37
38 // Keep last
39 L_LAYOUTS,
40};
41
42enum sway_container_border {
43 B_NONE,
44 B_PIXEL,
45 B_NORMAL,
46};
47
48struct sway_root;
49struct sway_output;
50struct sway_view;
51
52struct sway_container {
53 union {
54 // TODO: Encapsulate state for other node types as well like C_CONTAINER
55 struct sway_root *sway_root;
56 struct sway_output *sway_output;
57 struct sway_view *sway_view;
58 };
59
60 /**
61 * A unique ID to identify this container. Primarily used in the
62 * get_tree JSON output.
63 */
64 size_t id;
65
66 char *name;
67
68 enum sway_container_type type;
69 enum sway_container_layout layout;
70 enum sway_container_layout prev_layout;
71 enum sway_container_layout workspace_layout;
72
73 // TODO convert to layout coordinates
74 double x, y;
75
76 // does not include borders or gaps.
77 double width, height;
78
79 list_t *children;
80
81 struct sway_container *parent;
82
83 list_t *marks; // list of char*
84
85 struct {
86 struct wl_signal destroy;
87 } events;
88};
89
90// TODO only one container create function and pass the type?
91struct sway_container *container_output_create(
92 struct sway_output *sway_output);
93
94struct sway_container *container_workspace_create(
95 struct sway_container *output, const char *name);
96
97struct sway_container *container_view_create(
98 struct sway_container *sibling, struct sway_view *sway_view);
99
100struct sway_container *container_output_destroy(struct sway_container *output);
101
102struct sway_container *container_view_destroy(struct sway_container *view);
103
104struct sway_container *container_set_layout(struct sway_container *container,
105 enum sway_container_layout layout);
106
107void container_descendents(struct sway_container *root,
108 enum sway_container_type type,
109 void (*func)(struct sway_container *item, void *data), void *data);
110
111/**
112 * Finds a container based on test criteria. Returns the first container that
113 * passes the test.
114 */
115struct sway_container *container_find(struct sway_container *container,
116 bool (*test)(struct sway_container *view, void *data), void *data);
117
118/**
119 * Finds a parent container with the given struct sway_containerype.
120 */
121struct sway_container *container_parent(struct sway_container *container,
122 enum sway_container_type type);
123
124/**
125 * Find a container at the given coordinates.
126 */
127struct sway_container *container_at(struct sway_container *parent,
128 double lx, double ly, struct wlr_surface **surface,
129 double *sx, double *sy);
130
131/**
132 * Apply the function for each child of the container breadth first.
133 */
134void container_for_each_descendent(struct sway_container *container,
135 void (*f)(struct sway_container *container, void *data), void *data);
136
137#endif
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h
new file mode 100644
index 00000000..ad52bdb0
--- /dev/null
+++ b/include/sway/tree/layout.h
@@ -0,0 +1,52 @@
1#ifndef _SWAY_LAYOUT_H
2#define _SWAY_LAYOUT_H
3
4#include <wlr/types/wlr_output_layout.h>
5#include "sway/tree/container.h"
6
7enum movement_direction {
8 MOVE_LEFT,
9 MOVE_RIGHT,
10 MOVE_UP,
11 MOVE_DOWN,
12 MOVE_PARENT,
13 MOVE_CHILD,
14 MOVE_NEXT,
15 MOVE_PREV,
16 MOVE_FIRST
17};
18
19struct sway_container;
20
21struct sway_root {
22 struct wlr_output_layout *output_layout;
23
24 struct wl_listener output_layout_change;
25
26 struct wl_list unmanaged_views; // sway_view::unmanaged_view_link
27
28 struct {
29 struct wl_signal new_container;
30 } events;
31};
32
33void layout_init(void);
34
35void container_add_child(struct sway_container *parent, struct sway_container *child);
36
37struct sway_container *container_add_sibling(struct sway_container *parent,
38 struct sway_container *child);
39
40struct sway_container *container_remove_child(struct sway_container *child);
41
42enum sway_container_layout container_get_default_layout(struct sway_container *output);
43
44void container_sort_workspaces(struct sway_container *output);
45
46void arrange_windows(struct sway_container *container,
47 double width, double height);
48
49struct sway_container *container_get_in_direction(struct sway_container
50 *container, struct sway_seat *seat, enum movement_direction dir);
51
52#endif
diff --git a/include/sway/view.h b/include/sway/tree/view.h
index b2886211..e5f53f4e 100644
--- a/include/sway/view.h
+++ b/include/sway/tree/view.h
@@ -62,10 +62,6 @@ enum sway_view_prop {
62 VIEW_PROP_INSTANCE, 62 VIEW_PROP_INSTANCE,
63}; 63};
64 64
65/**
66 * sway_view is a state container for surfaces that are arranged in the sway
67 * tree (shell surfaces).
68 */
69struct sway_view { 65struct sway_view {
70 enum sway_view_type type; 66 enum sway_view_type type;
71 struct sway_container *swayc; 67 struct sway_container *swayc;
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
new file mode 100644
index 00000000..d73b29c1
--- /dev/null
+++ b/include/sway/tree/workspace.h
@@ -0,0 +1,26 @@
1#ifndef _SWAY_WORKSPACE_H
2#define _SWAY_WORKSPACE_H
3
4#include "sway/tree/container.h"
5
6extern char *prev_workspace_name;
7
8char *workspace_next_name(const char *output_name);
9
10struct sway_container *workspace_create(const char *name);
11
12bool workspace_switch(struct sway_container *workspace);
13
14struct sway_container *workspace_by_number(const char* name);
15
16struct sway_container *workspace_by_name(const char*);
17
18struct sway_container *workspace_output_next(struct sway_container *current);
19
20struct sway_container *workspace_next(struct sway_container *current);
21
22struct sway_container *workspace_output_prev(struct sway_container *current);
23
24struct sway_container *workspace_prev(struct sway_container *current);
25
26#endif
diff --git a/include/sway/workspace.h b/include/sway/workspace.h
deleted file mode 100644
index fee54255..00000000
--- a/include/sway/workspace.h
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifndef _SWAY_WORKSPACE_H
2#define _SWAY_WORKSPACE_H
3
4#include "sway/container.h"
5
6extern char *prev_workspace_name;
7
8char *workspace_next_name(const char *output_name);
9swayc_t *workspace_create(const char *name);
10bool workspace_switch(swayc_t *workspace);
11
12struct sway_container *workspace_by_number(const char* name);
13swayc_t *workspace_by_name(const char*);
14
15struct sway_container *workspace_output_next(swayc_t *current);
16struct sway_container *workspace_next(swayc_t *current);
17struct sway_container *workspace_output_prev(swayc_t *current);
18struct sway_container *workspace_prev(swayc_t *current);
19
20#endif