2012-08-17 22:18:26 +02:00
|
|
|
#ifndef _TREE_H
|
|
|
|
#define _TREE_H
|
|
|
|
|
2013-09-19 15:02:49 +02:00
|
|
|
node_t *make_node(void);
|
|
|
|
client_t *make_client(xcb_window_t);
|
2013-07-08 11:42:05 +02:00
|
|
|
void arrange(monitor_t *, desktop_t *);
|
|
|
|
void apply_layout(monitor_t *, desktop_t *, node_t *, xcb_rectangle_t, xcb_rectangle_t);
|
|
|
|
void focus_node(monitor_t *, desktop_t *, node_t *);
|
|
|
|
void insert_node(monitor_t *, desktop_t *, node_t *, node_t *);
|
|
|
|
void unlink_node(desktop_t *, node_t *);
|
|
|
|
void remove_node(desktop_t *, node_t *);
|
2013-07-13 09:40:19 +02:00
|
|
|
void swap_nodes(node_t *, node_t *);
|
2013-07-08 11:42:05 +02:00
|
|
|
void pseudo_focus(desktop_t *, node_t *);
|
|
|
|
void update_current(void);
|
|
|
|
node_t *find_fence(node_t *, direction_t);
|
2013-07-13 15:12:59 -04:00
|
|
|
node_t *nearest_neighbor(desktop_t *, node_t *, direction_t, client_select_t);
|
|
|
|
node_t *nearest_from_distance(desktop_t *, node_t *, direction_t, client_select_t);
|
|
|
|
node_t *nearest_from_history(focus_history_t *, node_t *, direction_t, client_select_t);
|
|
|
|
node_t *find_biggest(desktop_t *, node_t *, client_select_t);
|
2012-08-29 18:37:31 +02:00
|
|
|
bool is_leaf(node_t *);
|
2012-09-18 17:21:04 +02:00
|
|
|
bool is_tiled(client_t *);
|
|
|
|
bool is_floating(client_t *);
|
|
|
|
bool is_first_child(node_t *);
|
|
|
|
bool is_second_child(node_t *);
|
2012-08-29 18:37:31 +02:00
|
|
|
void change_split_ratio(node_t *, value_change_t);
|
2013-07-08 11:42:05 +02:00
|
|
|
void reset_mode(coordinates_t *);
|
2013-08-27 23:48:50 +02:00
|
|
|
node_t *brother_tree(node_t *);
|
2012-08-29 18:37:31 +02:00
|
|
|
node_t *first_extrema(node_t *);
|
|
|
|
node_t *second_extrema(node_t *);
|
2013-05-07 22:45:14 +02:00
|
|
|
node_t *next_leaf(node_t *, node_t *);
|
|
|
|
node_t *prev_leaf(node_t *, node_t *);
|
2013-07-08 11:42:05 +02:00
|
|
|
bool is_adjacent(node_t *, node_t *, direction_t);
|
2013-06-24 16:25:50 +02:00
|
|
|
void get_opposite(direction_t, direction_t *);
|
2013-04-02 15:02:45 +02:00
|
|
|
int tiled_area(node_t *);
|
2012-08-29 18:37:31 +02:00
|
|
|
void move_fence(node_t *, direction_t, fence_move_t);
|
2013-07-08 11:42:05 +02:00
|
|
|
void rotate_tree(node_t *, int);
|
2013-05-08 14:10:53 +02:00
|
|
|
void rotate_brother(node_t *);
|
2013-07-08 11:42:05 +02:00
|
|
|
void unrotate_tree(node_t *, int);
|
2013-05-08 14:10:53 +02:00
|
|
|
void unrotate_brother(node_t *);
|
2013-02-26 12:54:01 +01:00
|
|
|
void flip_tree(node_t *, flip_t);
|
2013-03-10 18:28:30 +01:00
|
|
|
int balance_tree(node_t *);
|
2012-12-27 22:36:06 +01:00
|
|
|
void destroy_tree(node_t *);
|
2012-10-17 16:18:40 +02:00
|
|
|
void transfer_node(monitor_t *, desktop_t *, monitor_t *, desktop_t *, node_t *);
|
2013-06-27 19:41:01 +02:00
|
|
|
void transplant_node(monitor_t *, desktop_t *, node_t *, node_t *);
|
2013-07-08 11:42:05 +02:00
|
|
|
node_t *closest_node(desktop_t *, node_t *, cycle_dir_t, client_select_t);
|
2012-11-01 22:47:03 +01:00
|
|
|
void circulate_leaves(monitor_t *, desktop_t *, circulate_dir_t);
|
2012-09-11 16:29:43 +02:00
|
|
|
void update_vacant_state(node_t *);
|
2012-08-17 22:18:26 +02:00
|
|
|
|
|
|
|
#endif
|