Xinqi Bao's Git
1 /* © 2006-2007 Anselm R. Garbe <garbeam at gmail dot com>
2 * © 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
3 * See LICENSE file for license details. */
6 #define FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
7 #define NORMBGCOLOR "#eeeeee"
8 #define NORMFGCOLOR "#222222"
9 #define SELBGCOLOR "#006699"
10 #define SELFGCOLOR "#ffffff"
11 #define SPACE 30 /* px */
14 enum { ColFG
, ColBG
, ColLast
};
18 unsigned long norm
[ColLast
];
19 unsigned long sel
[ColLast
];
29 } DC
; /* draw context */
33 DC dc
; /* global drawing context */
36 void drawtext(const char *text
, unsigned long col
[ColLast
]);
37 unsigned int textw(const char *text
);
38 unsigned int textnw(const char *text
, unsigned int len
);
41 void *emalloc(unsigned int size
); /* allocates memory, exits on error */
42 void eprint(const char *errstr
, ...); /* prints errstr and exits with 1 */
43 char *estrdup(const char *str
); /* duplicates str, exits on allocation error */