7 #include <xcb/xcb_event.h>
10 #define DEFAULT_DESK_NAME "Desktop"
11 #define DEFAULT_MON_NAME "Monitor"
12 #define MISSING_VALUE "N/A"
53 CLIENT_MODE_AUTOMATIC,
67 client_urgency_t urgency;
79 DESKTOP_STATUS_OCCUPIED
89 desktop_status_t status;
90 desktop_urgency_t urgency;
139 char class_name[MAXLEN];
140 unsigned int border_width;
142 bool transient; /* transient window are always floating */
144 bool locked; /* protects window from being closed */
146 xcb_rectangle_t floating_rectangle;
147 xcb_rectangle_t tiled_rectangle;
150 typedef struct node_t node_t;
152 split_type_t split_type;
154 split_mode_t split_mode;
155 direction_t split_dir;
157 xcb_rectangle_t rectangle;
158 bool vacant; /* vacant nodes only hold floating clients */
160 node_t *second_child;
162 client_t *client; /* NULL except for leaves */
165 typedef struct node_list_t node_list_t;
168 bool latest; /* used for z-ordering tiled windows */
178 typedef struct desktop_t desktop_t;
184 focus_history_t *history;
189 typedef struct monitor_t monitor_t;
192 xcb_randr_output_t id;
193 xcb_rectangle_t rectangle;
200 desktop_t *last_desk;
201 desktop_t *desk_head;
202 desktop_t *desk_tail;
224 typedef struct rule_t rule_t;
228 rule_effect_t effect;
234 xcb_point_t position;
235 pointer_action_t action;
236 xcb_rectangle_t rectangle;
237 node_t *vertical_fence;
238 node_t *horizontal_fence;
245 double vertical_ratio;
246 double horizontal_ratio;
253 unsigned int distance;
256 node_t *make_node(void);
257 monitor_t *make_monitor(xcb_rectangle_t *);
258 monitor_t *find_monitor(char *);
259 monitor_t *get_monitor_by_id(xcb_randr_output_t);
260 monitor_t *add_monitor(xcb_rectangle_t *);
261 void remove_monitor(monitor_t *);
262 void merge_monitors(monitor_t *, monitor_t *);
263 desktop_t *make_desktop(const char *);
264 void insert_desktop(monitor_t *, desktop_t *);
265 void add_desktop(monitor_t *, desktop_t *);
266 void empty_desktop(desktop_t *);
267 void unlink_desktop(monitor_t *, desktop_t *);
268 void remove_desktop(monitor_t *, desktop_t *);
269 void transfer_desktop(monitor_t *, monitor_t *, desktop_t *);
270 rule_t *make_rule(void);
271 pointer_state_t *make_pointer_state(void);
272 client_t *make_client(xcb_window_t);
273 focus_history_t *make_focus_history(void);
274 node_list_t *make_node_list(void);
275 void history_add(focus_history_t *, node_t *);
276 void history_remove(focus_history_t *, node_t *);
277 void empty_history(focus_history_t *);
278 node_t *history_get(focus_history_t *, int);
279 node_t *history_last(focus_history_t *, node_t *, client_select_t);
280 int history_rank(focus_history_t *, node_t *);