From aafeaf731701e528f4ae9d7c7432b3e92fee4392 Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Sun, 9 Dec 2012 19:11:11 +0100 Subject: continued with draw.c and draw.h implementation, now the integration begins --- draw.h | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'draw.h') diff --git a/draw.h b/draw.h index 0c811ab2..17d2c89e 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); -- cgit v1.2.3