diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/output.h | 2 | ||||
-rw-r--r-- | include/sway/tree/container.h | 9 | ||||
-rw-r--r-- | include/sway/tree/layout.h | 12 |
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); | |||
36 | void output_damage_whole_view(struct sway_output *output, | 36 | void output_damage_whole_view(struct sway_output *output, |
37 | struct sway_view *view); | 37 | struct sway_view *view); |
38 | 38 | ||
39 | struct 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 |
91 | struct sway_container *container_create(enum sway_container_type type); | 94 | struct sway_container *container_create(enum sway_container_type type); |
92 | 95 | ||
96 | const char *container_type_to_str(enum sway_container_type type); | ||
97 | |||
98 | // TODO only one container create function and pass the type? | ||
99 | struct 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 | ||
19 | struct sway_container; | 16 | struct sway_container; |
@@ -33,7 +30,8 @@ struct sway_root { | |||
33 | void layout_init(void); | 30 | void layout_init(void); |
34 | 31 | ||
35 | // TODO move to tree.h | 32 | // TODO move to tree.h |
36 | void container_add_child(struct sway_container *parent, struct sway_container *child); | 33 | void 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 |
39 | struct sway_container *container_add_sibling(struct sway_container *parent, | 37 | struct sway_container *container_add_sibling(struct sway_container *parent, |
@@ -49,8 +47,12 @@ struct sway_container *container_reap_empty(struct sway_container *container); | |||
49 | void container_move_to(struct sway_container* container, | 47 | void container_move_to(struct sway_container* container, |
50 | struct sway_container* destination); | 48 | struct sway_container* destination); |
51 | 49 | ||
50 | void 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 |
53 | enum sway_container_layout container_get_default_layout(struct sway_container *output); | 54 | enum 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 |
56 | void container_sort_workspaces(struct sway_container *output); | 58 | void container_sort_workspaces(struct sway_container *output); |