summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 21:19:57 -0400
committerLibravatar Tony Crisci <tony@dubstepdish.com>2018-03-29 21:22:39 -0400
commit4c394a0e9ee04b46ed349f7b3ddf67c53719b3b6 (patch)
tree0833690f34940296a9cbd6b3dd4ba682d0713370 /include
parent80col (diff)
downloadsway-4c394a0e9ee04b46ed349f7b3ddf67c53719b3b6.tar.gz
sway-4c394a0e9ee04b46ed349f7b3ddf67c53719b3b6.tar.zst
sway-4c394a0e9ee04b46ed349f7b3ddf67c53719b3b6.zip
address feedback
Diffstat (limited to 'include')
-rw-r--r--include/sway/tree/container.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 3548afc1..92ff2b67 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -70,10 +70,10 @@ struct sway_container {
70 enum sway_container_layout prev_layout; 70 enum sway_container_layout prev_layout;
71 enum sway_container_layout workspace_layout; 71 enum sway_container_layout workspace_layout;
72 72
73 // TODO convert to layout coordinates 73 // TODO convert to layout coordinates
74 double x, y; 74 double x, y;
75 75
76 // does not include borders or gaps. 76 // does not include borders or gaps.
77 double width, height; 77 double width, height;
78 78
79 list_t *children; 79 list_t *children;
@@ -122,22 +122,16 @@ struct sway_container *container_parent(struct sway_container *container,
122 enum sway_container_type type); 122 enum sway_container_type type);
123 123
124/** 124/**
125 * Run a function for each child.
126 */
127void sway_container_for_each(struct sway_container *container,
128 void (*f)(struct sway_container *view, void *data), void *data);
129
130/**
131 * Find a container at the given coordinates. 125 * Find a container at the given coordinates.
132 */ 126 */
133struct sway_container *sway_container_at(struct sway_container *parent, 127struct sway_container *container_at(struct sway_container *parent,
134 double lx, double ly, struct wlr_surface **surface, 128 double lx, double ly, struct wlr_surface **surface,
135 double *sx, double *sy); 129 double *sx, double *sy);
136 130
137/** 131/**
138 * Apply the function for each child of the container breadth first. 132 * Apply the function for each child of the container breadth first.
139 */ 133 */
140void sway_container_for_each_bfs(struct sway_container *container, 134void container_for_each(struct sway_container *container,
141 void (*f)(struct sway_container *container, void *data), void *data); 135 void (*f)(struct sway_container *container, void *data), void *data);
142 136
143#endif 137#endif