aboutsummaryrefslogtreecommitdiff
path: root/draw.h
diff options
context:
space:
mode:
authorConnor Lane Smith2010-06-24 16:18:18 +0100
committerConnor Lane Smith2010-06-24 16:18:18 +0100
commit96c65400ccdcb76cf20ec7721920f944e6b490ec (patch)
tree07e5963037f9369cc97902036324111ac465fe34 /draw.h
parent6c1d0e4d60b239e9533def6feaf8eb2138858c3e (diff)
decoupled draw.c from dmenu & dinput
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;