diff options
author | Anselm R Garbe <anselm@garbe.us> | 2012-12-09 19:11:11 +0100 |
---|---|---|
committer | Anselm R Garbe <anselm@garbe.us> | 2012-12-09 19:11:11 +0100 |
commit | aafeaf731701e528f4ae9d7c7432b3e92fee4392 (patch) | |
tree | 5e47eacfcecae118e738558ee7355cde769c1157 /draw.h | |
parent | f21d46ea7def76221c4173f644eb2188ae9edbb1 (diff) | |
download | dwm-aafeaf731701e528f4ae9d7c7432b3e92fee4392.tar.gz |
continued with draw.c and draw.h implementation, now the integration begins
Diffstat (limited to 'draw.h')
-rw-r--r-- | draw.h | 25 |
1 files changed, 10 insertions, 15 deletions
@@ -13,19 +13,7 @@ struct _XFont { XFontStruct *xfont; }; typedef struct _XFont Fnt; -/* X11 types - end */ -typedef struct { - unsigned int w; - unsigned int h; - int x; - int y; - int xOff; - int yOff; -} TextExtents; - - -/* X11 types - begin */ typedef struct _XDraw Draw; struct _XDraw { unsigned int w, h; @@ -39,6 +27,13 @@ struct _XDraw { Fnt *font; }; +typedef struct { + unsigned int w; + unsigned int h; + int xOff; + int yOff; +} TextExtents; + /* Drawable abstraction */ Draw *draw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h); void draw_resize(Draw *draw, unsigned int w, unsigned int h); @@ -58,12 +53,12 @@ void draw_setfg(Draw *draw, Col *col); void draw_setbg(Draw *draw, Col *col); /* Drawing functions */ -void draw_rect(Draw *draw, int x, int y, unsigned int w, unsigned int h); -void draw_text(Draw *draw, int x, int y, const char *text); +void draw_rect(Draw *draw, int x, int y, unsigned int w, unsigned int h, Bool filled, Bool empty, Bool invert); +void draw_text(Draw *draw, int x, int y, unsigned int w, unsigned int h, const char *text, Bool invert); /* Map functions */ void draw_map(Draw *draw, int x, int y, unsigned int w, unsigned int h); /* Text functions */ -void draw_getextents(Draw *draw, const char *text, TextExtents *extents); +void draw_getextents(Draw *draw, const char *text, unsigned int len, TextExtents *extents); |