]> git.sur5r.net Git - i3/i3/blob - include/table.h
updated doxygen docu, added FIXMEs, fixed headers to 80chars width.
[i3/i3] / include / table.h
1 /*
2  * vim:ts=8:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * (c) 2009 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11 #include <stdbool.h>
12
13 #include <xcb/xcb.h>
14
15 #include "data.h"
16
17 #ifndef _TABLE_H
18 #define _TABLE_H
19
20 #define CUR_TABLE (c_ws->table)
21 #define CUR_CELL (CUR_TABLE[current_col][current_row])
22
23 extern Workspace *c_ws;
24 extern Workspace workspaces[10];
25 extern int current_col;
26 extern int current_row;
27
28 /** Initialize table */
29 void init_table();
30
31 /** Add one row to the table */
32 void expand_table_rows(Workspace *workspace);
33
34 /** Adds one row at the head of the table */
35 void expand_table_rows_at_head(Workspace *workspace);
36
37 /** Add one column to the table */
38 void expand_table_cols(Workspace *workspace);
39
40 /**
41  * Inserts one column at the table’s head
42  *
43  */
44 void expand_table_cols_at_head(Workspace *workspace);
45
46 /**
47  * Performs simple bounds checking for the given column/row
48  *
49  */
50 bool cell_exists(int col, int row);
51
52 /**
53  * Shrinks the table by "compacting" it, that is, removing completely empty
54  * rows/columns
55  *
56  */
57 void cleanup_table(xcb_connection_t *conn, Workspace *workspace);
58
59 /**
60  * Fixes col/rowspan (makes sure there are no overlapping windows)
61  *
62  */
63 void fix_colrowspan(xcb_connection_t *conn, Workspace *workspace);
64
65 /**
66  * Prints the table’s contents in human-readable form for debugging
67  *
68  */
69 void dump_table(xcb_connection_t *conn, Workspace *workspace);
70
71 #endif