aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R. Garbe <arg@10kloc.org>2006-09-11 13:18:09 +0200
committerAnselm R. Garbe <arg@10kloc.org>2006-09-11 13:18:09 +0200
commit0e5f467aa85e318ed27fc5d6d3826426a06ef3c3 (patch)
treefdb8a479c3947f7cd1e69018417f4cb5cd3846d1
parentc51406b27944fc37628f29ef04df6a9537bca5ed (diff)
commented dmenu
-rw-r--r--config.mk2
-rw-r--r--dmenu.h21
2 files changed, 12 insertions, 11 deletions
diff --git a/config.mk b/config.mk
index df43482..3af05bd 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,5 @@
1# dmenu version 1# dmenu version
2VERSION = 0.9 2VERSION = 1.0
3 3
4# Customize below to fit your system 4# Customize below to fit your system
5 5
diff --git a/dmenu.h b/dmenu.h
index 337e094..eed5689 100644
--- a/dmenu.h
+++ b/dmenu.h
@@ -23,26 +23,27 @@ struct Fnt {
23 int height; 23 int height;
24}; 24};
25 25
26struct DC { /* draw context */ 26struct 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
35extern int screen; 35extern int screen;
36extern Display *dpy; 36extern Display *dpy;
37extern DC dc; 37extern DC dc; /* global drawing context */
38 38
39/* draw.c */ 39/* draw.c */
40extern void drawtext(const char *text, unsigned long col[ColLast]); 40extern void drawtext(const char *text,
41extern unsigned long getcolor(const char *colstr); 41 unsigned long col[ColLast]); /* draws text with the defined color tuple */
42extern void setfont(const char *fontstr); 42extern unsigned long getcolor(const char *colstr); /* returns color of colstr */
43extern unsigned int textw(const char *text); 43extern void setfont(const char *fontstr); /* sets global font */
44extern unsigned int textw(const char *text); /* returns width of text in px */
44 45
45/* util.c */ 46/* util.c */
46extern void *emalloc(unsigned int size); 47extern void *emalloc(unsigned int size); /* allocates memory, exits on error */
47extern void eprint(const char *errstr, ...); 48extern void eprint(const char *errstr, ...); /* prints errstr and exits with 1 */
48extern char *estrdup(const char *str); 49extern char *estrdup(const char *str); /* duplicates str, exits on allocation error */