aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway')
-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;
extern swayc_t root_container;
struct sway_view;
+struct sway_seat;
/**
* Different kinds of containers.
@@ -140,11 +141,25 @@ swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
swayc_t *destroy_output(swayc_t *output);
swayc_t *destroy_view(swayc_t *view);
+swayc_t *next_view_sibling(struct sway_seat *seat);
+
+/**
+ * Finds a container based on test criteria. Returns the first container that
+ * passes the test.
+ */
+swayc_t *swayc_by_test(swayc_t *container,
+ bool (*test)(swayc_t *view, void *data), void *data);
+/**
+ * Finds a parent container with the given swayc_type.
+ */
swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type);
+/**
+ * Maps a container's children over a function.
+ */
+void container_map(swayc_t *container,
+ void (*f)(swayc_t *view, void *data), void *data);
swayc_t *swayc_at(swayc_t *parent, double lx, double ly,
struct wlr_surface **surface, double *sx, double *sy);
-void container_map(swayc_t *container, void (*f)(swayc_t *view, void *data), void *data);
-
#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(
struct sway_seat *input_manager_get_seat(struct sway_input_manager *input,
const char *seat_name);
+
+/** Gets the last seat the user interacted with */
+struct sway_seat *input_manager_current_seat(struct sway_input_manager *input);
+
#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 @@
#ifndef _SWAY_WORKSPACE_H
#define _SWAY_WORKSPACE_H
+struct sway_container;
+
+extern char *prev_workspace_name;
+
char *workspace_next_name(const char *output_name);
+swayc_t *workspace_create(const char *name);
+bool workspace_switch(swayc_t *workspace);
+
+struct sway_container *workspace_by_number(const char* name);
+swayc_t *workspace_by_name(const char*);
+
+struct sway_container *workspace_output_next(struct sway_container *current);
+struct sway_container *workspace_next(struct sway_container *current);
+struct sway_container *workspace_output_prev(struct sway_container *current);
+struct sway_container *workspace_prev(struct sway_container *current);
#endif