aboutsummaryrefslogtreecommitdiff
path: root/draw.h
diff options
context:
space:
mode:
Diffstat (limited to 'draw.h')
-rw-r--r--draw.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/draw.h b/draw.h
index d1f1a7c..e4f937a 100644
--- a/draw.h
+++ b/draw.h
@@ -9,6 +9,7 @@ typedef struct {
9 unsigned long norm[ColLast]; 9 unsigned long norm[ColLast];
10 unsigned long sel[ColLast]; 10 unsigned long sel[ColLast];
11 Drawable drawable; 11 Drawable drawable;
12 Display *dpy;
12 GC gc; 13 GC gc;
13 struct { 14 struct {
14 XFontStruct *xfont; 15 XFontStruct *xfont;
@@ -20,25 +21,14 @@ typedef struct {
20} DC; /* draw context */ 21} DC; /* draw context */
21 22
22/* forward declarations */ 23/* forward declarations */
23void drawcleanup(void); 24void cleanupdraw(DC *dc);
24void drawsetup(void); 25void setupdraw(DC *dc, Window w);
25void drawtext(const char *text, unsigned long col[ColLast]); 26void drawtext(DC *dc, const char *text, unsigned long col[ColLast]);
26void eprint(const char *errstr, ...); 27void eprint(const char *fmt, ...);
27unsigned long getcolor(const char *colstr); 28unsigned long getcolor(DC *dc, const char *colstr);
28void initfont(const char *fontstr); 29void initfont(DC *dc, const char *fontstr);
29int textnw(const char *text, unsigned int len); 30int textnw(DC *dc, const char *text, unsigned int len);
30int textw(const char *text); 31int textw(DC *dc, const char *text);
31 32
32/* variables */ 33/* variables */
33extern char *progname; 34extern const char *progname;
34extern Display *dpy;
35extern DC dc;
36extern int screen;
37extern unsigned int mw, mh;
38extern Window parent;
39
40extern const char *font;
41extern const char *normbgcolor;
42extern const char *normfgcolor;
43extern const char *selbgcolor;
44extern const char *selfgcolor;