aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/sway/container.h6
-rw-r--r--include/sway/input/seat.h16
-rw-r--r--include/sway/layout.h6
3 files changed, 27 insertions, 1 deletions
diff --git a/include/sway/container.h b/include/sway/container.h
index 0c66932d..997240bd 100644
--- a/include/sway/container.h
+++ b/include/sway/container.h
@@ -162,4 +162,10 @@ void container_map(swayc_t *container,
162swayc_t *swayc_at(swayc_t *parent, double lx, double ly, 162swayc_t *swayc_at(swayc_t *parent, double lx, double ly,
163 struct wlr_surface **surface, double *sx, double *sy); 163 struct wlr_surface **surface, double *sx, double *sy);
164 164
165/**
166 * Get a list of containers that are descendents of the container in rendering
167 * order
168 */
169list_t *container_list_children(swayc_t *con);
170
165#endif 171#endif
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h
index b21cbccb..8d5d6b75 100644
--- a/include/sway/input/seat.h
+++ b/include/sway/input/seat.h
@@ -12,14 +12,26 @@ struct sway_seat_device {
12 struct wl_list link; // sway_seat::devices 12 struct wl_list link; // sway_seat::devices
13}; 13};
14 14
15struct sway_seat_container {
16 struct sway_seat *seat;
17 swayc_t *container;
18
19 struct wl_list link; // sway_seat::focus_stack
20
21 struct wl_listener destroy;
22};
23
15struct sway_seat { 24struct sway_seat {
16 struct wlr_seat *wlr_seat; 25 struct wlr_seat *wlr_seat;
17 struct seat_config *config; 26 struct seat_config *config;
18 struct sway_cursor *cursor; 27 struct sway_cursor *cursor;
19 struct sway_input_manager *input; 28 struct sway_input_manager *input;
20 swayc_t *focus; 29
30 bool has_focus;
31 struct wl_list focus_stack; // list of containers in focus order
21 32
22 struct wl_listener focus_destroy; 33 struct wl_listener focus_destroy;
34 struct wl_listener new_container;
23 35
24 struct wl_list devices; // sway_seat_device::link 36 struct wl_list devices; // sway_seat_device::link
25 37
@@ -44,6 +56,8 @@ void sway_seat_configure_xcursor(struct sway_seat *seat);
44 56
45void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container); 57void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container);
46 58
59swayc_t *sway_seat_get_focus(struct sway_seat *seat, swayc_t *container);
60
47void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config); 61void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config);
48 62
49#endif 63#endif
diff --git a/include/sway/layout.h b/include/sway/layout.h
index af561453..69a66674 100644
--- a/include/sway/layout.h
+++ b/include/sway/layout.h
@@ -2,6 +2,7 @@
2#define _SWAY_LAYOUT_H 2#define _SWAY_LAYOUT_H
3 3
4#include <wlr/types/wlr_output_layout.h> 4#include <wlr/types/wlr_output_layout.h>
5#include "sway/container.h"
5 6
6struct sway_container; 7struct sway_container;
7 8
@@ -11,10 +12,15 @@ struct sway_root {
11 struct wl_listener output_layout_change; 12 struct wl_listener output_layout_change;
12 13
13 struct wl_list unmanaged_views; // sway_view::unmanaged_view_link 14 struct wl_list unmanaged_views; // sway_view::unmanaged_view_link
15
16 struct {
17 struct wl_signal new_container;
18 } events;
14}; 19};
15 20
16void init_layout(void); 21void init_layout(void);
17void add_child(struct sway_container *parent, struct sway_container *child); 22void add_child(struct sway_container *parent, struct sway_container *child);
23swayc_t *add_sibling(swayc_t *parent, swayc_t *child);
18struct sway_container *remove_child(struct sway_container *child); 24struct sway_container *remove_child(struct sway_container *child);
19enum swayc_layouts default_layout(struct sway_container *output); 25enum swayc_layouts default_layout(struct sway_container *output);
20void sort_workspaces(struct sway_container *output); 26void sort_workspaces(struct sway_container *output);