2017-11-20 09:04:28 +11:00
|
|
|
#ifndef _SWAY_LAYOUT_H
|
|
|
|
#define _SWAY_LAYOUT_H
|
|
|
|
|
2017-12-13 06:02:01 +11:00
|
|
|
#include <wlr/types/wlr_output_layout.h>
|
2018-03-30 03:15:31 +11:00
|
|
|
#include "sway/tree/container.h"
|
2017-12-13 06:02:01 +11:00
|
|
|
|
2018-02-15 06:30:27 +11:00
|
|
|
enum movement_direction {
|
|
|
|
MOVE_LEFT,
|
|
|
|
MOVE_RIGHT,
|
|
|
|
MOVE_UP,
|
|
|
|
MOVE_DOWN,
|
|
|
|
MOVE_PARENT,
|
|
|
|
MOVE_CHILD,
|
|
|
|
MOVE_NEXT,
|
|
|
|
MOVE_PREV,
|
|
|
|
MOVE_FIRST
|
|
|
|
};
|
|
|
|
|
2017-11-20 09:04:28 +11:00
|
|
|
struct sway_container;
|
|
|
|
|
2017-12-13 06:02:01 +11:00
|
|
|
struct sway_root {
|
|
|
|
struct wlr_output_layout *output_layout;
|
|
|
|
|
|
|
|
struct wl_listener output_layout_change;
|
2018-01-15 05:19:21 +11:00
|
|
|
|
|
|
|
struct wl_list unmanaged_views; // sway_view::unmanaged_view_link
|
2018-02-05 05:39:10 +11:00
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal new_container;
|
|
|
|
} events;
|
2017-12-13 06:02:01 +11:00
|
|
|
};
|
|
|
|
|
2018-03-30 08:06:29 +11:00
|
|
|
void layout_init(void);
|
2018-03-30 03:15:31 +11:00
|
|
|
|
2018-03-30 08:06:29 +11:00
|
|
|
void container_add_child(struct sway_container *parent, struct sway_container *child);
|
2018-03-30 03:15:31 +11:00
|
|
|
|
2018-03-30 08:06:29 +11:00
|
|
|
struct sway_container *container_add_sibling(struct sway_container *parent,
|
2018-03-30 05:31:10 +11:00
|
|
|
struct sway_container *child);
|
2018-03-30 03:15:31 +11:00
|
|
|
|
2018-03-30 08:06:29 +11:00
|
|
|
struct sway_container *container_remove_child(struct sway_container *child);
|
2018-03-30 03:15:31 +11:00
|
|
|
|
2018-03-30 08:06:29 +11:00
|
|
|
enum sway_container_layout container_get_default_layout(struct sway_container *output);
|
2018-03-30 03:15:31 +11:00
|
|
|
|
2018-03-30 08:06:29 +11:00
|
|
|
void container_sort_workspaces(struct sway_container *output);
|
2018-03-30 03:15:31 +11:00
|
|
|
|
2018-03-30 08:06:29 +11:00
|
|
|
void container_arrange_windows(struct sway_container *container,
|
2018-03-30 03:15:31 +11:00
|
|
|
double width, double height);
|
|
|
|
|
2018-03-30 08:06:29 +11:00
|
|
|
struct sway_container *container_get_in_direction(struct sway_container
|
2018-03-30 05:31:10 +11:00
|
|
|
*container, struct sway_seat *seat, enum movement_direction dir);
|
2017-11-20 09:04:28 +11:00
|
|
|
|
|
|
|
#endif
|