diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/sway/container.h | 6 | ||||
-rw-r--r-- | include/sway/input/seat.h | 16 | ||||
-rw-r--r-- | include/sway/layout.h | 6 |
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, | |||
162 | swayc_t *swayc_at(swayc_t *parent, double lx, double ly, | 162 | swayc_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 | */ | ||
169 | list_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 | ||
15 | struct 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 | |||
15 | struct sway_seat { | 24 | struct 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 | ||
45 | void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container); | 57 | void sway_seat_set_focus(struct sway_seat *seat, swayc_t *container); |
46 | 58 | ||
59 | swayc_t *sway_seat_get_focus(struct sway_seat *seat, swayc_t *container); | ||
60 | |||
47 | void sway_seat_set_config(struct sway_seat *seat, struct seat_config *seat_config); | 61 | void 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 | ||
6 | struct sway_container; | 7 | struct 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 | ||
16 | void init_layout(void); | 21 | void init_layout(void); |
17 | void add_child(struct sway_container *parent, struct sway_container *child); | 22 | void add_child(struct sway_container *parent, struct sway_container *child); |
23 | swayc_t *add_sibling(swayc_t *parent, swayc_t *child); | ||
18 | struct sway_container *remove_child(struct sway_container *child); | 24 | struct sway_container *remove_child(struct sway_container *child); |
19 | enum swayc_layouts default_layout(struct sway_container *output); | 25 | enum swayc_layouts default_layout(struct sway_container *output); |
20 | void sort_workspaces(struct sway_container *output); | 26 | void sort_workspaces(struct sway_container *output); |