summaryrefslogtreecommitdiff
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 {
unsigned long norm[ColLast];
unsigned long sel[ColLast];
Drawable drawable;
+ Display *dpy;
GC gc;
struct {
XFontStruct *xfont;
@@ -20,25 +21,14 @@ typedef struct {
} DC; /* draw context */
/* forward declarations */
-void drawcleanup(void);
-void drawsetup(void);
-void drawtext(const char *text, unsigned long col[ColLast]);
-void eprint(const char *errstr, ...);
-unsigned long getcolor(const char *colstr);
-void initfont(const char *fontstr);
-int textnw(const char *text, unsigned int len);
-int textw(const char *text);
+void cleanupdraw(DC *dc);
+void setupdraw(DC *dc, Window w);
+void drawtext(DC *dc, const char *text, unsigned long col[ColLast]);
+void eprint(const char *fmt, ...);
+unsigned long getcolor(DC *dc, const char *colstr);
+void initfont(DC *dc, const char *fontstr);
+int textnw(DC *dc, const char *text, unsigned int len);
+int textw(DC *dc, const char *text);
/* variables */
-extern char *progname;
-extern Display *dpy;
-extern DC dc;
-extern int screen;
-extern unsigned int mw, mh;
-extern Window parent;
-
-extern const char *font;
-extern const char *normbgcolor;
-extern const char *normfgcolor;
-extern const char *selbgcolor;
-extern const char *selfgcolor;
+extern const char *progname;