aboutsummaryrefslogtreecommitdiff
path: root/draw.h
diff options
context:
space:
mode:
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);