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