aboutsummaryrefslogtreecommitdiff
path: root/draw.h
diff options
context:
space:
mode:
authorAnselm R Garbe <anselm@garbe.us>2012-12-09 19:11:11 +0100
committerAnselm R Garbe <anselm@garbe.us>2012-12-09 19:11:11 +0100
commitaafeaf731701e528f4ae9d7c7432b3e92fee4392 (patch)
tree5e47eacfcecae118e738558ee7355cde769c1157 /draw.h
parentf21d46ea7def76221c4173f644eb2188ae9edbb1 (diff)
downloaddwm-aafeaf731701e528f4ae9d7c7432b3e92fee4392.tar.gz
dwm-aafeaf731701e528f4ae9d7c7432b3e92fee4392.tar.bz2
dwm-aafeaf731701e528f4ae9d7c7432b3e92fee4392.zip
continued with draw.c and draw.h implementation, now the integration begins
Diffstat (limited to 'draw.h')
-rw-r--r--draw.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/draw.h b/draw.h
index 0c811ab..17d2c89 100644
--- a/draw.h
+++ b/draw.h
@@ -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);