sway-patched-tray-menu/include/sway/tree/layout.h

53 lines
1.1 KiB
C
Raw Normal View History

2017-11-19 23:04:28 +01:00
#ifndef _SWAY_LAYOUT_H
#define _SWAY_LAYOUT_H
2017-12-12 20:02:01 +01:00
#include <wlr/types/wlr_output_layout.h>
#include "sway/tree/container.h"
2017-12-12 20:02:01 +01:00
2018-02-14 20:30:27 +01:00
enum movement_direction {
MOVE_LEFT,
MOVE_RIGHT,
MOVE_UP,
MOVE_DOWN,
MOVE_PARENT,
MOVE_CHILD,
MOVE_NEXT,
MOVE_PREV,
MOVE_FIRST
};
2017-11-19 23:04:28 +01:00
struct sway_container;
2017-12-12 20:02:01 +01:00
struct sway_root {
struct wlr_output_layout *output_layout;
struct wl_listener output_layout_change;
2018-01-14 19:19:21 +01:00
struct wl_list unmanaged_views; // sway_view::unmanaged_view_link
2018-02-04 19:39:10 +01:00
struct {
struct wl_signal new_container;
} events;
2017-12-12 20:02:01 +01:00
};
2017-11-19 23:04:28 +01:00
void init_layout(void);
2017-11-19 23:04:28 +01:00
void add_child(struct sway_container *parent, struct sway_container *child);
2018-03-29 20:31:10 +02:00
struct sway_container *add_sibling(struct sway_container *parent,
struct sway_container *child);
2017-11-25 22:30:15 +01:00
struct sway_container *remove_child(struct sway_container *child);
2017-11-23 02:39:27 +01:00
enum swayc_layouts default_layout(struct sway_container *output);
2017-11-23 02:39:27 +01:00
void sort_workspaces(struct sway_container *output);
void arrange_windows(struct sway_container *container,
double width, double height);
2018-03-29 20:31:10 +02:00
struct sway_container *get_swayc_in_direction(struct sway_container
*container, struct sway_seat *seat, enum movement_direction dir);
2017-11-19 23:04:28 +01:00
#endif