diff options
Diffstat (limited to 'include/sway/tree/arrange.h')
-rw-r--r-- | include/sway/tree/arrange.h | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/include/sway/tree/arrange.h b/include/sway/tree/arrange.h index a14bc5dc..58235642 100644 --- a/include/sway/tree/arrange.h +++ b/include/sway/tree/arrange.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef _SWAY_ARRANGE_H | 1 | #ifndef _SWAY_ARRANGE_H |
2 | #define _SWAY_ARRANGE_H | 2 | #define _SWAY_ARRANGE_H |
3 | #include "sway/desktop/transaction.h" | ||
3 | 4 | ||
4 | struct sway_container; | 5 | struct sway_container; |
5 | 6 | ||
@@ -9,16 +10,27 @@ void remove_gaps(struct sway_container *c); | |||
9 | // Add gaps around container | 10 | // Add gaps around container |
10 | void add_gaps(struct sway_container *c); | 11 | void add_gaps(struct sway_container *c); |
11 | 12 | ||
12 | // Determine the root container's geometry, then iterate to everything below | 13 | /** |
13 | void arrange_root(void); | 14 | * Arrange layout for all the children of the given container, and add them to |
14 | 15 | * the given transaction. | |
15 | // Determine the output's geometry, then iterate to everything below | 16 | * |
16 | void arrange_output(struct sway_container *output); | 17 | * Use this function if you need to arrange multiple sections of the tree in one |
17 | 18 | * transaction. | |
18 | // Determine the workspace's geometry, then iterate to everything below | 19 | * |
19 | void arrange_workspace(struct sway_container *workspace); | 20 | * You must set the desired state of the container before calling |
20 | 21 | * arrange_windows, then don't change any state-tracked properties in the | |
21 | // Arrange layout for all the children of the given workspace/container | 22 | * container until you've called transaction_commit. |
22 | void arrange_children_of(struct sway_container *parent); | 23 | */ |
24 | void arrange_windows(struct sway_container *container, | ||
25 | struct sway_transaction *transaction); | ||
26 | |||
27 | /** | ||
28 | * Arrange layout for the given container and commit the transaction. | ||
29 | * | ||
30 | * This function is a wrapper around arrange_windows, and handles creating and | ||
31 | * committing the transaction for you. Use this function if you're only doing | ||
32 | * one arrange operation. | ||
33 | */ | ||
34 | void arrange_and_commit(struct sway_container *container); | ||
23 | 35 | ||
24 | #endif | 36 | #endif |