aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sway/container.h19
-rw-r--r--include/sway/input/input-manager.h4
-rw-r--r--include/sway/workspace.h14
3 files changed, 35 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
diff --git a/include/sway/input/input-manager.h b/include/sway/input/input-manager.h
index 63806b8e..66ace262 100644
--- a/include/sway/input/input-manager.h
+++ b/include/sway/input/input-manager.h
@@ -48,4 +48,8 @@ struct sway_seat *sway_input_manager_get_default_seat(
48 48
49struct sway_seat *input_manager_get_seat(struct sway_input_manager *input, 49struct sway_seat *input_manager_get_seat(struct sway_input_manager *input,
50 const char *seat_name); 50 const char *seat_name);
51
52/** Gets the last seat the user interacted with */
53struct sway_seat *input_manager_current_seat(struct sway_input_manager *input);
54
51#endif 55#endif
diff --git a/include/sway/workspace.h b/include/sway/workspace.h
index 04b2ea4e..30bbdaa8 100644
--- a/include/sway/workspace.h
+++ b/include/sway/workspace.h
@@ -1,6 +1,20 @@
1#ifndef _SWAY_WORKSPACE_H 1#ifndef _SWAY_WORKSPACE_H
2#define _SWAY_WORKSPACE_H 2#define _SWAY_WORKSPACE_H
3 3
4struct sway_container;
5
6extern char *prev_workspace_name;
7
4char *workspace_next_name(const char *output_name); 8char *workspace_next_name(const char *output_name);
9swayc_t *workspace_create(const char *name);
10bool workspace_switch(swayc_t *workspace);
11
12struct sway_container *workspace_by_number(const char* name);
13swayc_t *workspace_by_name(const char*);
14
15struct sway_container *workspace_output_next(struct sway_container *current);
16struct sway_container *workspace_next(struct sway_container *current);
17struct sway_container *workspace_output_prev(struct sway_container *current);
18struct sway_container *workspace_prev(struct sway_container *current);
5 19
6#endif 20#endif