summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 14:06:04 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-04-02 14:06:04 -0400
commit2187684bd09928748f8b3a82c2e25e5ae82f5ae6 (patch)
treee70e2862280a410f8f0d617abc3539d6f0ae056e /include
parentremove default from kill switch (diff)
parentMerge pull request #1697 from RedSoxFan/back-and-forth (diff)
downloadsway-2187684bd09928748f8b3a82c2e25e5ae82f5ae6.tar.gz
sway-2187684bd09928748f8b3a82c2e25e5ae82f5ae6.tar.zst
sway-2187684bd09928748f8b3a82c2e25e5ae82f5ae6.zip
Merge branch 'wlroots' into split-containers
Diffstat (limited to 'include')
-rw-r--r--include/sway/output.h2
-rw-r--r--include/sway/tree/container.h9
-rw-r--r--include/sway/tree/layout.h12
3 files changed, 18 insertions, 5 deletions
diff --git a/include/sway/output.h b/include/sway/output.h
index b4980cd8..b343ecff 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -36,4 +36,6 @@ void output_damage_whole(struct sway_output *output);
36void output_damage_whole_view(struct sway_output *output, 36void output_damage_whole_view(struct sway_output *output,
37 struct sway_view *view); 37 struct sway_view *view);
38 38
39struct sway_container *output_by_name(const char *name);
40
39#endif 41#endif
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index f0e87fb5..fa22ea75 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -84,12 +84,21 @@ struct sway_container {
84 84
85 struct { 85 struct {
86 struct wl_signal destroy; 86 struct wl_signal destroy;
87 // Raised after the tree updates, but before arrange_windows
88 // Passed the previous parent
89 struct wl_signal reparent;
87 } events; 90 } events;
88}; 91};
89 92
90// TODO make private and use the container-specific create functions 93// TODO make private and use the container-specific create functions
91struct sway_container *container_create(enum sway_container_type type); 94struct sway_container *container_create(enum sway_container_type type);
92 95
96const char *container_type_to_str(enum sway_container_type type);
97
98// TODO only one container create function and pass the type?
99struct sway_container *container_output_create(
100 struct sway_output *sway_output);
101
93/** 102/**
94 * Create a new container container. A container container can be a a child of 103 * Create a new container container. A container container can be a a child of
95 * a workspace container or another container container. 104 * a workspace container or another container container.
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h
index 53f72ec4..fbc3d6af 100644
--- a/include/sway/tree/layout.h
+++ b/include/sway/tree/layout.h
@@ -11,9 +11,6 @@ enum movement_direction {
11 MOVE_DOWN, 11 MOVE_DOWN,
12 MOVE_PARENT, 12 MOVE_PARENT,
13 MOVE_CHILD, 13 MOVE_CHILD,
14 MOVE_NEXT,
15 MOVE_PREV,
16 MOVE_FIRST
17}; 14};
18 15
19struct sway_container; 16struct sway_container;
@@ -33,7 +30,8 @@ struct sway_root {
33void layout_init(void); 30void layout_init(void);
34 31
35// TODO move to tree.h 32// TODO move to tree.h
36void container_add_child(struct sway_container *parent, struct sway_container *child); 33void container_add_child(struct sway_container *parent,
34 struct sway_container *child);
37 35
38// TODO move to tree.h 36// TODO move to tree.h
39struct sway_container *container_add_sibling(struct sway_container *parent, 37struct sway_container *container_add_sibling(struct sway_container *parent,
@@ -49,8 +47,12 @@ struct sway_container *container_reap_empty(struct sway_container *container);
49void container_move_to(struct sway_container* container, 47void container_move_to(struct sway_container* container,
50 struct sway_container* destination); 48 struct sway_container* destination);
51 49
50void container_move(struct sway_container *container,
51 enum movement_direction dir, int move_amt);
52
52// TODO move to output.c 53// TODO move to output.c
53enum sway_container_layout container_get_default_layout(struct sway_container *output); 54enum sway_container_layout container_get_default_layout(
55 struct sway_container *output);
54 56
55// TODO move to output.c 57// TODO move to output.c
56void container_sort_workspaces(struct sway_container *output); 58void container_sort_workspaces(struct sway_container *output);