gri3-wm/i3bar/include/xcb.h

66 lines
1.1 KiB
C
Raw Normal View History

2010-08-07 18:05:16 +02:00
/*
* i3bar - an xcb-based status- and ws-bar for i3
*
* © 2010 Axel Wagner and contributors
*
* See file LICNSE for license information
*
*/
2010-07-22 01:15:18 +02:00
#ifndef XCB_H_
#define XCB_H_
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
/*
* Redraw the bars, i.e. simply copy the buffer to the barwindow
*
*/
void redraw_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