-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathtypes.h
115 lines (100 loc) · 1.99 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/* Copyright (c) 2016-2019 Tudor Ioan Roman. All rights reserved. */
/* Licensed under the ISC License. See the LICENSE file in the project root for full license information. */
#ifndef WM_TYPES_H
#define WM_TYPES_H
#include <xcb/randr.h>
#include <stdbool.h>
enum position {
BOTTOM_LEFT,
BOTTOM_RIGHT,
TOP_LEFT,
TOP_RIGHT,
CENTER,
LEFT,
BOTTOM,
TOP,
RIGHT,
ALL,
};
enum direction {
NORTH,
SOUTH,
EAST,
WEST,
};
enum mouse_mode {
MOUSE_NONE,
MOUSE_MOVE,
MOUSE_RESIZE,
};
enum pointer_action {
POINTER_ACTION_NOTHING,
POINTER_ACTION_FOCUS,
POINTER_ACTION_MOVE,
POINTER_ACTION_RESIZE_CORNER,
POINTER_ACTION_RESIZE_SIDE,
};
enum resize_handle {
HANDLE_LEFT,
HANDLE_BOTTOM,
HANDLE_TOP,
HANDLE_RIGHT,
HANDLE_TOP_LEFT,
HANDLE_TOP_RIGHT,
HANDLE_BOTTOM_LEFT,
HANDLE_BOTTOM_RIGHT,
};
struct win_position {
int16_t x, y;
};
struct window_geom {
int16_t x, y;
uint16_t width, height;
bool set_by_user;
};
struct grid {
int16_t gx, gy;
int16_t px, py;
int16_t sx, sy;
};
struct client {
xcb_window_t window;
struct window_geom geom;
struct window_geom orig_geom;
struct grid grid;
bool maxed, hmaxed, vmaxed, monocled, gridded;
struct list_item *item;
struct list_item *focus_item;
struct monitor *monitor;
uint16_t min_width, min_height;
uint16_t max_width, max_height;
uint16_t width_inc, height_inc;
bool mapped;
uint32_t group;
uint8_t depth;
};
struct monitor {
xcb_randr_output_t monitor;
char *name;
int16_t x, y;
uint16_t width, height;
struct list_item *item;
};
struct conf {
int8_t border_width, internal_border_width, grid_gap;
int8_t gap_left, gap_down, gap_up, gap_right;
uint32_t focus_color, unfocus_color, internal_focus_color, internal_unfocus_color;
enum position cursor_position;
uint32_t groups;
bool sloppy_focus;
bool resize_hints;
bool sticky_windows;
bool borders;
bool last_window_focusing;
bool apply_settings;
bool replay_click_on_focus;
enum pointer_action pointer_actions[3];
uint16_t pointer_modifier;
int8_t click_to_focus;
};
#endif