-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.h
75 lines (64 loc) · 1.43 KB
/
types.h
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
//
// Created by jaakko on 27.4.2020.
//
#ifndef WM_TYPES_H
#define WM_TYPES_H
typedef struct wmWindow wmWindow;
typedef struct wmNode wmNode;
typedef struct wmFloatingWindow wmFloatingWindow;
typedef struct {
wmWindow* activeWindow;
wmNode* layout;
wmNode* splitNode;
unsigned showSplitBorder;
wmWindow* fullscreen;
unsigned countWindows;
} wmWorkspace;
#define FLOATING_DIALOG 1 << 1
#define FLOATING_STICKY 1 << 2
struct wmFloatingWindow {
wmWindow* window;
int x;
int y;
unsigned width;
unsigned height;
int flags;
int borderWidth;
wmFloatingWindow* next;
};
typedef enum { HORIZONTAL, VERTICAL, NONE } wmSplitMode;
struct wmWindow {
wmWindow* next;
wmWindow* previous;
Window window;
Window frame;
unsigned workspaces;
wmFloatingWindow* floating;
int fullscreen;
};
struct wmNode {
unsigned numChildren;
wmNode* nodes;
wmWindow* window;
wmSplitMode orientation;
float weight;
int x;
int y;
unsigned width;
unsigned height;
};
typedef enum { MOVE_LEFT, MOVE_UP, MOVE_RIGHT, MOVE_DOWN } wmMoveDirection;
typedef enum {
CURSOR_DEFAULT,
CURSOR_DRAG,
CURSOR_RESIZE_TOP_LEFT,
CURSOR_RESIZE_TOP,
CURSOR_RESIZE_TOP_RIGHT,
CURSOR_RESIZE_RIGHT,
CURSOR_RESIZE_BOTTOM_RIGHT,
CURSOR_RESIZE_BOTTOM,
CURSOR_RESIZE_BOTTOM_LEFT,
CURSOR_RESIZE_LEFT,
CURSOR_LAST
} wmCursorTypes;
#endif //WM_TYPES_H