Xinqi Bao's Git
1 /* See LICENSE file for copyright and license details. */
4 #define FONT "-*-fixed-medium-r-normal-*-13-*-*-*-*-*-*-*"
5 #define NORMBGCOLOR "#eeeeee"
6 #define NORMFGCOLOR "#222222"
7 #define SELBGCOLOR "#006699"
8 #define SELFGCOLOR "#ffffff"
9 #define SPACE 30 /* px */
12 enum { ColFG
, ColBG
, ColLast
};
16 unsigned long norm
[ColLast
];
17 unsigned long sel
[ColLast
];
27 } DC
; /* draw context */
31 DC dc
; /* global drawing context */
34 void drawtext(const char *text
, unsigned long col
[ColLast
]);
35 unsigned int textw(const char *text
);
36 unsigned int textnw(const char *text
, unsigned int len
);
39 void *emalloc(unsigned int size
); /* allocates memory, exits on error */
40 void eprint(const char *errstr
, ...); /* prints errstr and exits with 1 */
41 char *estrdup(const char *str
); /* duplicates str, exits on allocation error */