diff options
author | Connor Lane Smith <cls@lubutu.com> | 2010-06-24 16:18:18 +0100 |
---|---|---|
committer | Connor Lane Smith <cls@lubutu.com> | 2010-06-24 16:18:18 +0100 |
commit | 96c65400ccdcb76cf20ec7721920f944e6b490ec (patch) | |
tree | 07e5963037f9369cc97902036324111ac465fe34 /draw.h | |
parent | 6c1d0e4d60b239e9533def6feaf8eb2138858c3e (diff) | |
download | dmenu-96c65400ccdcb76cf20ec7721920f944e6b490ec.tar.gz dmenu-96c65400ccdcb76cf20ec7721920f944e6b490ec.tar.bz2 dmenu-96c65400ccdcb76cf20ec7721920f944e6b490ec.zip |
decoupled draw.c from dmenu & dinput
Diffstat (limited to 'draw.h')
-rw-r--r-- | draw.h | 30 |
1 files changed, 10 insertions, 20 deletions
@@ -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; |