]> git.sur5r.net Git - i3/i3/blob - i3bar/include/xcb.h
c22b1e43e5993cce2cde9e79d8099aa1b56e931b
[i3/i3] / i3bar / include / xcb.h
1 #ifndef XCB_H_
2 #define XCB_H_
3
4 int font_height;
5
6 /*
7  * Initialize xcb and use the specified fontname for text-rendering
8  *
9  */
10 void init_xcb();
11
12 /*
13  * Cleanup the xcb-stuff.
14  * Called once, before the program terminates.
15  *
16  */
17 void clean_xcb();
18
19 /*
20  * Get the earlier requested atoms and save them in the prepared data-structure
21  *
22  */
23 void get_atoms();
24
25 /*
26  * Destroy the bar of the specified output
27  *
28  */
29 void destroy_window(i3_output *output);
30
31 /*
32  * Reconfigure all bars and create new for newly activated outputs
33  *
34  */
35 void reconfig_windows();
36
37 /*
38  * Render the bars, with buttons and statusline
39  *
40  */
41 void draw_bars();
42
43 /*
44  * Calculate the rendered width of a string with the configured font.
45  * The string has to be encoded in ucs2 and glyph_len has to be the length
46  * of the string (in width)
47  *
48  */
49 int get_string_width(xcb_char2b_t *string, int glyph_len);
50
51 #endif