diff options
author | Anselm R. Garbe <arg@10kloc.org> | 2006-09-11 13:18:09 +0200 |
---|---|---|
committer | Anselm R. Garbe <arg@10kloc.org> | 2006-09-11 13:18:09 +0200 |
commit | 0e5f467aa85e318ed27fc5d6d3826426a06ef3c3 (patch) | |
tree | fdb8a479c3947f7cd1e69018417f4cb5cd3846d1 | |
parent | c51406b27944fc37628f29ef04df6a9537bca5ed (diff) |
commented dmenu
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | dmenu.h | 21 |
2 files changed, 12 insertions, 11 deletions
@@ -1,5 +1,5 @@ | |||
1 | # dmenu version | 1 | # dmenu version |
2 | VERSION = 0.9 | 2 | VERSION = 1.0 |
3 | 3 | ||
4 | # Customize below to fit your system | 4 | # Customize below to fit your system |
5 | 5 | ||
@@ -23,26 +23,27 @@ struct Fnt { | |||
23 | int height; | 23 | int height; |
24 | }; | 24 | }; |
25 | 25 | ||
26 | struct DC { /* draw context */ | 26 | struct DC { |
27 | int x, y, w, h; | 27 | int x, y, w, h; |
28 | unsigned long norm[ColLast]; | 28 | unsigned long norm[ColLast]; |
29 | unsigned long sel[ColLast]; | 29 | unsigned long sel[ColLast]; |
30 | Drawable drawable; | 30 | Drawable drawable; |
31 | Fnt font; | 31 | Fnt font; |
32 | GC gc; | 32 | GC gc; |
33 | }; | 33 | }; /* draw context */ |
34 | 34 | ||
35 | extern int screen; | 35 | extern int screen; |
36 | extern Display *dpy; | 36 | extern Display *dpy; |
37 | extern DC dc; | 37 | extern DC dc; /* global drawing context */ |
38 | 38 | ||
39 | /* draw.c */ | 39 | /* draw.c */ |
40 | extern void drawtext(const char *text, unsigned long col[ColLast]); | 40 | extern void drawtext(const char *text, |
41 | extern unsigned long getcolor(const char *colstr); | 41 | unsigned long col[ColLast]); /* draws text with the defined color tuple */ |
42 | extern void setfont(const char *fontstr); | 42 | extern unsigned long getcolor(const char *colstr); /* returns color of colstr */ |
43 | extern unsigned int textw(const char *text); | 43 | extern void setfont(const char *fontstr); /* sets global font */ |
44 | extern unsigned int textw(const char *text); /* returns width of text in px */ | ||
44 | 45 | ||
45 | /* util.c */ | 46 | /* util.c */ |
46 | extern void *emalloc(unsigned int size); | 47 | extern void *emalloc(unsigned int size); /* allocates memory, exits on error */ |
47 | extern void eprint(const char *errstr, ...); | 48 | extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */ |
48 | extern char *estrdup(const char *str); | 49 | extern char *estrdup(const char *str); /* duplicates str, exits on allocation error */ |