2010-07-21 19:15:18 -04:00
|
|
|
#ifndef XCB_H_
|
|
|
|
#define XCB_H_
|
|
|
|
|
|
|
|
#include <xcb/xcb.h>
|
|
|
|
|
|
|
|
#define NUM_ATOMS 3
|
|
|
|
|
|
|
|
enum {
|
|
|
|
#define ATOM_DO(name) name,
|
|
|
|
#include "xcb_atoms.def"
|
|
|
|
};
|
|
|
|
|
|
|
|
xcb_atom_t atoms[NUM_ATOMS];
|
|
|
|
|
|
|
|
xcb_connection_t* xcb_connection;
|
|
|
|
xcb_screen_t* xcb_screens;
|
|
|
|
xcb_window_t xcb_root;
|
2010-07-26 20:16:49 -04:00
|
|
|
xcb_font_t xcb_font;
|
|
|
|
int font_height;
|
2010-07-21 19:15:18 -04:00
|
|
|
|
|
|
|
void init_xcb();
|
|
|
|
void clean_xcb();
|
|
|
|
void get_atoms();
|
2010-07-22 23:04:13 -04:00
|
|
|
void destroy_windows();
|
2010-07-21 19:15:18 -04:00
|
|
|
void create_windows();
|
2010-07-26 11:21:46 -04:00
|
|
|
void draw_buttons();
|
2010-07-26 20:16:49 -04:00
|
|
|
int get_string_width(char *string);
|
2010-07-29 21:11:54 -04:00
|
|
|
void handle_xcb_event(xcb_generic_event_t *event);
|
2010-07-21 19:15:18 -04:00
|
|
|
|
|
|
|
#endif
|