diff options
author | 2015-08-25 16:12:37 -0400 | |
---|---|---|
committer | 2015-08-25 16:12:37 -0400 | |
commit | fa6292ff24082f90886353844b45e99ec965daa5 (patch) | |
tree | 06f9219532f6f057410910dbfe43d3884acd90bc /include | |
parent | Merge pull request #125 from Luminarys/master (diff) | |
parent | fixed moving to other output and visibility (diff) | |
download | sway-fa6292ff24082f90886353844b45e99ec965daa5.tar.gz sway-fa6292ff24082f90886353844b45e99ec965daa5.tar.zst sway-fa6292ff24082f90886353844b45e99ec965daa5.zip |
Merge pull request #129 from minus7/workspaces
Implemented "move container to workspace"
Diffstat (limited to 'include')
-rw-r--r-- | include/container.h | 7 | ||||
-rw-r--r-- | include/layout.h | 1 | ||||
-rw-r--r-- | include/util.h | 9 | ||||
-rw-r--r-- | include/workspace.h | 8 |
4 files changed, 21 insertions, 4 deletions
diff --git a/include/container.h b/include/container.h index aadba5de..798a31a2 100644 --- a/include/container.h +++ b/include/container.h | |||
@@ -56,6 +56,10 @@ struct sway_container { | |||
56 | struct sway_container *focused; | 56 | struct sway_container *focused; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | enum visibility_mask { | ||
60 | VISIBLE = 1 | ||
61 | }; | ||
62 | |||
59 | // Container Creation | 63 | // Container Creation |
60 | 64 | ||
61 | swayc_t *new_output(wlc_handle handle); | 65 | swayc_t *new_output(wlc_handle handle); |
@@ -106,4 +110,7 @@ void container_map(swayc_t *, void (*f)(swayc_t *, void *), void *); | |||
106 | void set_view_visibility(swayc_t *view, void *data); | 110 | void set_view_visibility(swayc_t *view, void *data); |
107 | void reset_gaps(swayc_t *view, void *data); | 111 | void reset_gaps(swayc_t *view, void *data); |
108 | 112 | ||
113 | |||
114 | void update_visibility(swayc_t *container); | ||
115 | |||
109 | #endif | 116 | #endif |
diff --git a/include/layout.h b/include/layout.h index 11bf1a28..8cc26ba8 100644 --- a/include/layout.h +++ b/include/layout.h | |||
@@ -22,6 +22,7 @@ swayc_t *remove_child(swayc_t *child); | |||
22 | void swap_container(swayc_t *a, swayc_t *b); | 22 | void swap_container(swayc_t *a, swayc_t *b); |
23 | 23 | ||
24 | void move_container(swayc_t* container,swayc_t* root,enum movement_direction direction); | 24 | void move_container(swayc_t* container,swayc_t* root,enum movement_direction direction); |
25 | void move_container_to(swayc_t* container, swayc_t* destination); | ||
25 | 26 | ||
26 | // Layout | 27 | // Layout |
27 | void update_geometry(swayc_t *view); | 28 | void update_geometry(swayc_t *view); |
diff --git a/include/util.h b/include/util.h new file mode 100644 index 00000000..8e65e6d6 --- /dev/null +++ b/include/util.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _SWAY_UTIL_H | ||
2 | #define _SWAY_UTIL_H | ||
3 | |||
4 | /** | ||
5 | * Wrap i into the range [0, max[ | ||
6 | */ | ||
7 | int wrap(int i, int max); | ||
8 | |||
9 | #endif | ||
diff --git a/include/workspace.h b/include/workspace.h index d447ac2d..a731068d 100644 --- a/include/workspace.h +++ b/include/workspace.h | |||
@@ -9,9 +9,9 @@ char *workspace_next_name(void); | |||
9 | swayc_t *workspace_create(const char*); | 9 | swayc_t *workspace_create(const char*); |
10 | swayc_t *workspace_by_name(const char*); | 10 | swayc_t *workspace_by_name(const char*); |
11 | void workspace_switch(swayc_t*); | 11 | void workspace_switch(swayc_t*); |
12 | void workspace_output_next(); | 12 | swayc_t *workspace_output_next(); |
13 | void workspace_next(); | 13 | swayc_t *workspace_next(); |
14 | void workspace_output_prev(); | 14 | swayc_t *workspace_output_prev(); |
15 | void workspace_prev(); | 15 | swayc_t *workspace_prev(); |
16 | 16 | ||
17 | #endif | 17 | #endif |