Xinqi Bao's Git
1 /* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com>
2 * See LICENSE file for license details.
7 #define FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
8 #define NORMBGCOLOR "#eeeeee"
9 #define NORMFGCOLOR "#222222"
10 #define SELBGCOLOR "#006699"
11 #define SELFGCOLOR "#ffffff"
12 #define SPACE 30 /* px */
15 enum { ColFG
, ColBG
, ColLast
};
18 typedef struct Fnt Fnt
;
30 unsigned long norm
[ColLast
];
31 unsigned long sel
[ColLast
];
39 extern DC dc
; /* global drawing context */
42 extern void drawtext(const char *text
, unsigned long col
[ColLast
]);
43 extern unsigned int textw(const char *text
);
44 extern unsigned int textnw(const char *text
, unsigned int len
);
47 extern void *emalloc(unsigned int size
); /* allocates memory, exits on error */
48 extern void eprint(const char *errstr
, ...); /* prints errstr and exits with 1 */
49 extern char *estrdup(const char *str
); /* duplicates str, exits on allocation error */