blob: 94e78a93e66739cf7183e71b4a3aa13b06c2e4ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#ifndef _SWAY_LAYOUT_H
#define _SWAY_LAYOUT_H
#include <wlc/wlc.h>
#include "list.h"
struct sway_container {
wlc_handle handle;
enum {
C_ROOT,
C_OUTPUT,
C_WORKSPACE,
C_CONTAINER,
C_VIEW
} type;
enum {
L_NONE,
L_HORIZ,
L_VERT,
L_STACKED,
L_TABBED,
L_FLOATING
} layout;
// Not including borders or margins
int width, height;
char *name;
list_t *children;
struct sway_container *parent;
struct sway_container *focused;
};
typedef struct sway_container swayc_t;
extern swayc_t root_container;
void init_layout();
void add_output(wlc_handle output);
void destroy_output(wlc_handle output);
void destroy_view(swayc_t *view);
void add_view(wlc_handle view);
void focus_view(swayc_t *view);
swayc_t *get_swayc_for_handle(wlc_handle handle, swayc_t *parent);
#endif
|