diff options
Diffstat (limited to 'include/sway/container.h')
-rw-r--r-- | include/sway/container.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/include/sway/container.h b/include/sway/container.h index a99e2694..0c66932d 100644 --- a/include/sway/container.h +++ b/include/sway/container.h | |||
@@ -11,6 +11,7 @@ typedef struct sway_container swayc_t; | |||
11 | extern swayc_t root_container; | 11 | extern swayc_t root_container; |
12 | 12 | ||
13 | struct sway_view; | 13 | struct sway_view; |
14 | struct sway_seat; | ||
14 | 15 | ||
15 | /** | 16 | /** |
16 | * Different kinds of containers. | 17 | * Different kinds of containers. |
@@ -140,11 +141,25 @@ swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view); | |||
140 | swayc_t *destroy_output(swayc_t *output); | 141 | swayc_t *destroy_output(swayc_t *output); |
141 | swayc_t *destroy_view(swayc_t *view); | 142 | swayc_t *destroy_view(swayc_t *view); |
142 | 143 | ||
144 | swayc_t *next_view_sibling(struct sway_seat *seat); | ||
145 | |||
146 | /** | ||
147 | * Finds a container based on test criteria. Returns the first container that | ||
148 | * passes the test. | ||
149 | */ | ||
150 | swayc_t *swayc_by_test(swayc_t *container, | ||
151 | bool (*test)(swayc_t *view, void *data), void *data); | ||
152 | /** | ||
153 | * Finds a parent container with the given swayc_type. | ||
154 | */ | ||
143 | swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type); | 155 | swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type); |
156 | /** | ||
157 | * Maps a container's children over a function. | ||
158 | */ | ||
159 | void container_map(swayc_t *container, | ||
160 | void (*f)(swayc_t *view, void *data), void *data); | ||
144 | 161 | ||
145 | swayc_t *swayc_at(swayc_t *parent, double lx, double ly, | 162 | swayc_t *swayc_at(swayc_t *parent, double lx, double ly, |
146 | struct wlr_surface **surface, double *sx, double *sy); | 163 | struct wlr_surface **surface, double *sx, double *sy); |
147 | 164 | ||
148 | void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data); | ||
149 | |||
150 | #endif | 165 | #endif |