]> git.lizzy.rs Git - bspwm.git/blob - tree.h
Be verbose regarding broken connections
[bspwm.git] / tree.h
1 /* Copyright (c) 2012, Bastien Dejean
2  * All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions are met:
6  *
7  * 1. Redistributions of source code must retain the above copyright notice, this
8  *    list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright notice,
10  *    this list of conditions and the following disclaimer in the documentation
11  *    and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
14  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
16  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
17  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
18  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
19  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
20  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
22  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  */
24
25 #ifndef BSPWM_TREE_H
26 #define BSPWM_TREE_H
27
28 void arrange(monitor_t *m, desktop_t *d);
29 void apply_layout(monitor_t *m, desktop_t *d, node_t *n, xcb_rectangle_t rect, xcb_rectangle_t root_rect);
30 void insert_node(monitor_t *m, desktop_t *d, node_t *n, node_t *f);
31 void pseudo_focus(monitor_t *m, desktop_t *d, node_t *n);
32 void focus_node(monitor_t *m, desktop_t *d, node_t *n);
33 void update_current(void);
34 node_t *make_node(void);
35 client_t *make_client(xcb_window_t win, unsigned int border_width);
36 bool is_leaf(node_t *n);
37 bool is_tiled(client_t *c);
38 bool is_floating(client_t *c);
39 bool is_first_child(node_t *n);
40 bool is_second_child(node_t *n);
41 void reset_mode(coordinates_t *loc);
42 node_t *brother_tree(node_t *n);
43 void closest_public(desktop_t *d, node_t *n, node_t **closest, node_t **public);
44 node_t *first_extrema(node_t *n);
45 node_t *second_extrema(node_t *n);
46 node_t *next_leaf(node_t *n, node_t *r);
47 node_t *prev_leaf(node_t *n, node_t *r);
48 node_t *next_tiled_leaf(desktop_t *d, node_t *n, node_t *r);
49 node_t *prev_tiled_leaf(desktop_t *d, node_t *n, node_t *r);
50 bool is_adjacent(node_t *a, node_t *b, direction_t dir);
51 node_t *find_fence(node_t *n, direction_t dir);
52 node_t *nearest_neighbor(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, client_select_t sel);
53 node_t *nearest_from_tree(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, client_select_t sel);
54 node_t *nearest_from_history(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, client_select_t sel);
55 node_t *nearest_from_distance(monitor_t *m, desktop_t *d, node_t *n, direction_t dir, client_select_t sel);
56 void get_opposite(direction_t src, direction_t *dst);
57 int tiled_area(node_t *n);
58 node_t *find_biggest(monitor_t *m, desktop_t *d, node_t *n, client_select_t sel);
59 void rotate_tree(node_t *n, int deg);
60 void rotate_brother(node_t *n);
61 void unrotate_tree(node_t *n, int rot);
62 void unrotate_brother(node_t *n);
63 void flip_tree(node_t *n, flip_t flp);
64 void equalize_tree(node_t *n);
65 int balance_tree(node_t *n);
66 void unlink_node(monitor_t *m, desktop_t *d, node_t *n);
67 void remove_node(monitor_t *m, desktop_t *d, node_t *n);
68 void destroy_tree(node_t *n);
69 bool swap_nodes(monitor_t *m1, desktop_t *d1, node_t *n1, monitor_t *m2, desktop_t *d2, node_t *n2);
70 bool transfer_node(monitor_t *ms, desktop_t *ds, node_t *ns, monitor_t *md, desktop_t *dd, node_t *nd);
71 node_t *closest_node(monitor_t *m, desktop_t *d, node_t *n, cycle_dir_t dir, client_select_t sel);
72 void circulate_leaves(monitor_t *m, desktop_t *d, circulate_dir_t dir);
73 void update_vacant_state(node_t *n);
74 void update_privacy_level(node_t *n, bool value);
75
76 #endif