aboutsummaryrefslogtreecommitdiff
path: root/include/sway/tree
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/tree')
-rw-r--r--include/sway/tree/container.h45
-rw-r--r--include/sway/tree/layout.h7
-rw-r--r--include/sway/tree/workspace.h14
3 files changed, 35 insertions, 31 deletions
diff --git a/include/sway/tree/container.h b/include/sway/tree/container.h
index 5a2ae349..5def5e71 100644
--- a/include/sway/tree/container.h
+++ b/include/sway/tree/container.h
@@ -6,9 +6,7 @@
#include <wlr/types/wlr_surface.h>
#include "list.h"
-typedef struct sway_container swayc_t;
-
-extern swayc_t root_container;
+extern struct sway_container root_container;
struct sway_view;
struct sway_seat;
@@ -89,48 +87,53 @@ struct sway_container {
} events;
};
-void swayc_descendants_of_type(swayc_t *root, enum swayc_types type,
- void (*func)(swayc_t *item, void *data), void *data);
+void swayc_descendants_of_type(struct sway_container *root,
+ enum swayc_types type,
+ void (*func)(struct sway_container *item, void *data), void *data);
// TODO only one container create function and pass the type?
-swayc_t *new_output(struct sway_output *sway_output);
+struct sway_container *new_output(struct sway_output *sway_output);
-swayc_t *new_workspace(swayc_t *output, const char *name);
+struct sway_container *new_workspace(struct sway_container *output,
+ const char *name);
-swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
+struct sway_container *new_view(struct sway_container *sibling,
+ struct sway_view *sway_view);
-swayc_t *destroy_output(swayc_t *output);
-swayc_t *destroy_view(swayc_t *view);
+struct sway_container *destroy_output(struct sway_container *output);
+struct sway_container *destroy_view(struct sway_container *view);
-swayc_t *next_view_sibling(struct sway_seat *seat);
+struct sway_container *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);
+struct sway_container *swayc_by_test(struct sway_container *container,
+ bool (*test)(struct sway_container *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);
+struct sway_container *swayc_parent_by_type(struct sway_container *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);
+void container_map(struct sway_container *container,
+ void (*f)(struct sway_container *view, void *data), void *data);
-swayc_t *swayc_at(swayc_t *parent, double lx, double ly,
- struct wlr_surface **surface, double *sx, double *sy);
+struct sway_container *swayc_at(struct sway_container *parent, double lx,
+ double ly, struct wlr_surface **surface, double *sx, double *sy);
/**
* Apply the function for each child of the container breadth first.
*/
-void container_for_each_bfs(swayc_t *con, void (*f)(swayc_t *con, void *data),
- void *data);
+void container_for_each_bfs(struct sway_container *con, void (*f)(struct
+ sway_container *con, void *data), void *data);
-swayc_t *swayc_change_layout(swayc_t *container, enum swayc_layouts layout);
+struct sway_container *swayc_change_layout(struct sway_container *container,
+ enum swayc_layouts layout);
#endif
diff --git a/include/sway/tree/layout.h b/include/sway/tree/layout.h
index 39b7fb24..8bb9e075 100644
--- a/include/sway/tree/layout.h
+++ b/include/sway/tree/layout.h
@@ -34,7 +34,8 @@ void init_layout(void);
void add_child(struct sway_container *parent, struct sway_container *child);
-swayc_t *add_sibling(swayc_t *parent, swayc_t *child);
+struct sway_container *add_sibling(struct sway_container *parent,
+ struct sway_container *child);
struct sway_container *remove_child(struct sway_container *child);
@@ -45,7 +46,7 @@ void sort_workspaces(struct sway_container *output);
void arrange_windows(struct sway_container *container,
double width, double height);
-swayc_t *get_swayc_in_direction(swayc_t *container,
- struct sway_seat *seat, enum movement_direction dir);
+struct sway_container *get_swayc_in_direction(struct sway_container
+ *container, struct sway_seat *seat, enum movement_direction dir);
#endif
diff --git a/include/sway/tree/workspace.h b/include/sway/tree/workspace.h
index c8ce40d1..d73b29c1 100644
--- a/include/sway/tree/workspace.h
+++ b/include/sway/tree/workspace.h
@@ -7,20 +7,20 @@ extern char *prev_workspace_name;
char *workspace_next_name(const char *output_name);
-swayc_t *workspace_create(const char *name);
+struct sway_container *workspace_create(const char *name);
-bool workspace_switch(swayc_t *workspace);
+bool workspace_switch(struct sway_container *workspace);
struct sway_container *workspace_by_number(const char* name);
-swayc_t *workspace_by_name(const char*);
+struct sway_container *workspace_by_name(const char*);
-struct sway_container *workspace_output_next(swayc_t *current);
+struct sway_container *workspace_output_next(struct sway_container *current);
-struct sway_container *workspace_next(swayc_t *current);
+struct sway_container *workspace_next(struct sway_container *current);
-struct sway_container *workspace_output_prev(swayc_t *current);
+struct sway_container *workspace_output_prev(struct sway_container *current);
-struct sway_container *workspace_prev(swayc_t *current);
+struct sway_container *workspace_prev(struct sway_container *current);
#endif