diff options
author | Jose Diez <[email protected]> | 2015-08-10 22:31:23 +0200 |
---|---|---|
committer | Jose Diez <[email protected]> | 2015-08-10 22:49:50 +0200 |
commit | 8cc2c6fa7a4b5e8b2d2030033a4bb9f7df45fc42 (patch) | |
tree | d079178cb01d2dd0bbb58792133d64e9cc31d4e7 /sway/container.c | |
parent | caee41b7775d6e7eacc37837b31d92808e1a34de (diff) |
Basic workspace functionality
Diffstat (limited to 'sway/container.c')
-rw-r--r-- | sway/container.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sway/container.c b/sway/container.c new file mode 100644 index 00000000..8ceb6a30 --- /dev/null +++ b/sway/container.c @@ -0,0 +1,18 @@ +#include "container.h" +#include "layout.h" + +void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data) { + if (!container->children) { + return NULL; + } + int i; + for (i = 0; i < container->children->length; ++i) { + swayc_t *child = container->children->items[i]; + f(child, data); + + if(child->children) + container_map(child, f, data); + } + return NULL; +} + |