7 #include <xcb/xcb_event.h>
10 #define DEFAULT_DESK_NAME "Desktop"
11 #define DEFAULT_MON_NAME "Monitor"
12 #define MISSING_VALUE "N/A"
46 SEND_OPTION_DONT_FOLLOW
50 SWAP_OPTION_KEEP_FOCUS,
51 SWAP_OPTION_SWAP_FOCUS
58 CLIENT_SKIP_CLASS_EQUAL,
59 CLIENT_SKIP_CLASS_DIFFER
86 ROTATE_COUNTER_CLOCKWISE,
127 char class_name[MAXLEN];
128 unsigned int border_width;
130 bool transient; /* transient window are always floating */
132 bool locked; /* protects window from being closed */
134 xcb_rectangle_t floating_rectangle;
135 xcb_rectangle_t tiled_rectangle;
138 typedef struct node_t node_t;
140 split_type_t split_type;
142 rotate_t birth_rotation;
143 xcb_rectangle_t rectangle;
144 bool vacant; /* vacant nodes only hold floating clients */
146 node_t *second_child;
148 client_t *client; /* NULL except for leaves */
151 typedef struct node_list_t node_list_t;
154 bool latest; /* used for z-ordering tiled windows */
164 typedef struct desktop_t desktop_t;
170 focus_history_t *history;
175 typedef struct monitor_t monitor_t;
178 xcb_randr_output_t id;
179 xcb_rectangle_t rectangle;
186 desktop_t *last_desk;
187 desktop_t *desk_head;
188 desktop_t *desk_tail;
204 typedef struct rule_t rule_t;
208 rule_effect_t effect;
222 } desktop_location_t;
225 xcb_point_t position;
226 pointer_action_t action;
227 xcb_rectangle_t rectangle;
228 node_t *vertical_fence;
229 node_t *horizontal_fence;
236 double vertical_ratio;
237 double horizontal_ratio;
244 unsigned int distance;
247 node_t *make_node(void);
248 monitor_t *make_monitor(xcb_rectangle_t *);
249 monitor_t *find_monitor(char *);
250 monitor_t *get_monitor_by_id(xcb_randr_output_t);
251 monitor_t *add_monitor(xcb_rectangle_t *);
252 void remove_monitor(monitor_t *);
253 void merge_monitors(monitor_t *, monitor_t *);
254 desktop_t *make_desktop(const char *);
255 void insert_desktop(monitor_t *, desktop_t *);
256 void add_desktop(monitor_t *, desktop_t *);
257 void empty_desktop(desktop_t *);
258 void unlink_desktop(monitor_t *, desktop_t *);
259 void remove_desktop(monitor_t *, desktop_t *);
260 void transfer_desktop(monitor_t *, monitor_t *, desktop_t *);
261 rule_t *make_rule(void);
262 pointer_state_t *make_pointer_state(void);
263 client_t *make_client(xcb_window_t);
264 focus_history_t *make_focus_history(void);
265 node_list_t *make_node_list(void);
266 void history_add(focus_history_t *, node_t *);
267 void history_remove(focus_history_t *, node_t *);
268 void empty_history(focus_history_t *);
269 node_t *history_get(focus_history_t *, int);
270 int history_rank(focus_history_t *, node_t *);