aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/container.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/container.h')
-rw-r--r--include/sway/container.h19
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;
11extern swayc_t root_container; 11extern swayc_t root_container;
12 12
13struct sway_view; 13struct sway_view;
14struct 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);
140swayc_t *destroy_output(swayc_t *output); 141swayc_t *destroy_output(swayc_t *output);
141swayc_t *destroy_view(swayc_t *view); 142swayc_t *destroy_view(swayc_t *view);
142 143
144swayc_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 */
150swayc_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 */
143swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type); 155swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type);
156/**
157 * Maps a container's children over a function.
158 */
159void container_map(swayc_t *container,
160 void (*f)(swayc_t *view, void *data), void *data);
144 161
145swayc_t *swayc_at(swayc_t *parent, double lx, double ly, 162swayc_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
148void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data);
149
150#endif 165#endif