18 #include <xcb/xproto.h>
19 #include <xcb/xcb_keysyms.h>
34 xcb_query_font_reply_t *
info;
46 #define ELOG(fmt, ...) fprintf(stderr, "ERROR: " fmt, ##__VA_ARGS__)
78 void *
srealloc(
void *ptr,
size_t size);
92 int sasprintf(
char **strp,
const char *fmt, ...);
110 uint32_t message_type,
const uint8_t *payload);
124 uint32_t *reply_length, uint8_t **reply);
150 #if defined(__APPLE__)
158 char *strndup(
const char *str,
size_t n);
180 xcb_key_symbols_t *symbols,
181 xcb_get_modifier_mapping_reply_t *modmap_reply);
222 void set_font_colors(xcb_gcontext_t gc, uint32_t foreground, uint32_t background);
235 void draw_text(
char *text,
size_t text_len,
bool is_ucs2, xcb_drawable_t drawable,
236 xcb_gcontext_t gc,
int x,
int y,
int max_width);