blob: c637daca78be6baabf7657d491595288c89e438c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
}
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);
}
}
}
|