2010-07-22 01:15:18 +02:00
|
|
|
#ifndef XCB_H_
|
|
|
|
#define XCB_H_
|
|
|
|
|
2010-08-05 05:09:59 +02:00
|
|
|
int font_height;
|
2010-07-22 01:15:18 +02:00
|
|
|
|
2010-08-07 02:10:05 +02:00
|
|
|
/*
|
|
|
|
* Initialize xcb and use the specified fontname for text-rendering
|
|
|
|
*
|
|
|
|
*/
|
2010-07-22 01:15:18 +02:00
|
|
|
void init_xcb();
|
2010-08-07 02:10:05 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Cleanup the xcb-stuff.
|
|
|
|
* Called once, before the program terminates.
|
|
|
|
*
|
|
|
|
*/
|
2010-07-22 01:15:18 +02:00
|
|
|
void clean_xcb();
|
2010-08-07 02:10:05 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Get the earlier requested atoms and save them in the prepared data-structure
|
|
|
|
*
|
|
|
|
*/
|
2010-07-22 01:15:18 +02:00
|
|
|
void get_atoms();
|
2010-08-07 02:10:05 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Destroy the bar of the specified output
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void destroy_window(i3_output *output);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Reconfigure all bars and create new for newly activated outputs
|
|
|
|
*
|
|
|
|
*/
|
2010-08-06 03:32:05 +02:00
|
|
|
void reconfig_windows();
|
2010-08-07 02:10:05 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Render the bars, with buttons and statusline
|
|
|
|
*
|
|
|
|
*/
|
2010-08-04 03:34:18 +02:00
|
|
|
void draw_bars();
|
2010-08-07 02:10:05 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Calculate the rendered width of a string with the configured font.
|
|
|
|
* The string has to be encoded in ucs2 and glyph_len has to be the length
|
|
|
|
* of the string (in width)
|
|
|
|
*
|
|
|
|
*/
|
2010-08-06 03:32:05 +02:00
|
|
|
int get_string_width(xcb_char2b_t *string, int glyph_len);
|
2010-07-22 01:15:18 +02:00
|
|
|
|
|
|
|
#endif
|