2 * (C)opyright MMVI Anselm R. Garbe <garbeam at gmail dot com>
3 * See LICENSE file for license details.
7 #include <X11/Xlocale.h>
10 #define NORMBGCOLOR "#333366"
11 #define NORMFGCOLOR "#cccccc"
12 #define SELBGCOLOR "#666699"
13 #define SELFGCOLOR "#eeeeee"
14 #define SPACE 30 /* px */
17 enum { ColFG, ColBG, ColLast };
20 typedef struct Fnt Fnt;
32 unsigned long norm[ColLast];
33 unsigned long sel[ColLast];
41 extern DC dc; /* global drawing context */
44 extern void drawtext(const char *text,
45 unsigned long col[ColLast]); /* draws text with the defined color tuple */
46 extern unsigned long getcolor(const char *colstr); /* returns color of colstr */
47 extern void setfont(const char *fontstr); /* sets global font */
48 extern unsigned int textw(const char *text); /* returns width of text in px */
51 extern void *emalloc(unsigned int size); /* allocates memory, exits on error */
52 extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */
53 extern char *estrdup(const char *str); /* duplicates str, exits on allocation error */