diff options
-rw-r--r-- | include/sway/tree/container.h | 6 | ||||
-rw-r--r-- | include/sway/tree/layout.h | 9 |
2 files changed, 0 insertions, 15 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h index 23014dbe..f36b4bd1 100644 --- a/include/sway/tree/container.h +++ b/include/sway/tree/container.h | |||
@@ -91,12 +91,10 @@ struct sway_container { | |||
91 | } events; | 91 | } events; |
92 | }; | 92 | }; |
93 | 93 | ||
94 | // TODO make private and use the container-specific create functions | ||
95 | struct sway_container *container_create(enum sway_container_type type); | 94 | struct sway_container *container_create(enum sway_container_type type); |
96 | 95 | ||
97 | const char *container_type_to_str(enum sway_container_type type); | 96 | const char *container_type_to_str(enum sway_container_type type); |
98 | 97 | ||
99 | // TODO only one container create function and pass the type? | ||
100 | struct sway_container *container_output_create( | 98 | struct sway_container *container_output_create( |
101 | struct sway_output *sway_output); | 99 | struct sway_output *sway_output); |
102 | 100 | ||
@@ -123,16 +121,13 @@ struct sway_container *container_workspace_create(struct sway_container *output, | |||
123 | * or a container container and are rendered in the order and structure of | 121 | * or a container container and are rendered in the order and structure of |
124 | * how they are attached to the tree. | 122 | * how they are attached to the tree. |
125 | */ | 123 | */ |
126 | // TODO view containers should be created in a detached state. | ||
127 | struct sway_container *container_view_create( | 124 | struct sway_container *container_view_create( |
128 | struct sway_container *sibling, struct sway_view *sway_view); | 125 | struct sway_container *sibling, struct sway_view *sway_view); |
129 | 126 | ||
130 | // TODO don't return the parent on destroy | ||
131 | struct sway_container *container_destroy(struct sway_container *container); | 127 | struct sway_container *container_destroy(struct sway_container *container); |
132 | 128 | ||
133 | struct sway_container *container_close(struct sway_container *container); | 129 | struct sway_container *container_close(struct sway_container *container); |
134 | 130 | ||
135 | // TODO rename to container_descendants_for_each() | ||
136 | void container_descendants(struct sway_container *root, | 131 | void container_descendants(struct sway_container *root, |
137 | enum sway_container_type type, | 132 | enum sway_container_type type, |
138 | void (*func)(struct sway_container *item, void *data), void *data); | 133 | void (*func)(struct sway_container *item, void *data), void *data); |
@@ -147,7 +142,6 @@ struct sway_container *container_find(struct sway_container *container, | |||
147 | /** | 142 | /** |
148 | * Finds a parent container with the given struct sway_containerype. | 143 | * Finds a parent container with the given struct sway_containerype. |
149 | */ | 144 | */ |
150 | // TODO rename to container_parent_of_type() | ||
151 | struct sway_container *container_parent(struct sway_container *container, | 145 | struct sway_container *container_parent(struct sway_container *container, |
152 | enum sway_container_type type); | 146 | enum sway_container_type type); |
153 | 147 | ||
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h index 12689375..784dcc9b 100644 --- a/include/sway/tree/layout.h +++ b/include/sway/tree/layout.h | |||
@@ -29,26 +29,20 @@ struct sway_root { | |||
29 | 29 | ||
30 | void layout_init(void); | 30 | void layout_init(void); |
31 | 31 | ||
32 | // TODO move to tree.h | ||
33 | void container_add_child(struct sway_container *parent, | 32 | void container_add_child(struct sway_container *parent, |
34 | struct sway_container *child); | 33 | struct sway_container *child); |
35 | 34 | ||
36 | // TODO move to tree.h | ||
37 | struct sway_container *container_add_sibling(struct sway_container *parent, | 35 | struct sway_container *container_add_sibling(struct sway_container *parent, |
38 | struct sway_container *child); | 36 | struct sway_container *child); |
39 | 37 | ||
40 | // TODO move to tree.h | ||
41 | struct sway_container *container_remove_child(struct sway_container *child); | 38 | struct sway_container *container_remove_child(struct sway_container *child); |
42 | 39 | ||
43 | // TODO PRIVATE in tree.h | ||
44 | struct sway_container *container_replace_child(struct sway_container *child, | 40 | struct sway_container *container_replace_child(struct sway_container *child, |
45 | struct sway_container *new_child); | 41 | struct sway_container *new_child); |
46 | 42 | ||
47 | // TODO move to layout.c | ||
48 | struct sway_container *container_set_layout(struct sway_container *container, | 43 | struct sway_container *container_set_layout(struct sway_container *container, |
49 | enum sway_container_layout layout); | 44 | enum sway_container_layout layout); |
50 | 45 | ||
51 | // TODO move to tree.h | ||
52 | void container_move_to(struct sway_container* container, | 46 | void container_move_to(struct sway_container* container, |
53 | struct sway_container* destination); | 47 | struct sway_container* destination); |
54 | 48 | ||
@@ -58,17 +52,14 @@ void container_move(struct sway_container *container, | |||
58 | enum sway_container_layout container_get_default_layout( | 52 | enum sway_container_layout container_get_default_layout( |
59 | struct sway_container *con); | 53 | struct sway_container *con); |
60 | 54 | ||
61 | // TODO move to output.c | ||
62 | void container_sort_workspaces(struct sway_container *output); | 55 | void container_sort_workspaces(struct sway_container *output); |
63 | 56 | ||
64 | void arrange_windows(struct sway_container *container, | 57 | void arrange_windows(struct sway_container *container, |
65 | double width, double height); | 58 | double width, double height); |
66 | 59 | ||
67 | // TODO move to container.h | ||
68 | struct sway_container *container_get_in_direction(struct sway_container | 60 | struct sway_container *container_get_in_direction(struct sway_container |
69 | *container, struct sway_seat *seat, enum movement_direction dir); | 61 | *container, struct sway_seat *seat, enum movement_direction dir); |
70 | 62 | ||
71 | // TODO move to tree.h | ||
72 | struct sway_container *container_split(struct sway_container *child, | 63 | struct sway_container *container_split(struct sway_container *child, |
73 | enum sway_container_layout layout); | 64 | enum sway_container_layout layout); |
74 | 65 | ||