summaryrefslogtreecommitdiffstats
path: root/draw.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-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 {
13 XFontStruct *xfont; 13 XFontStruct *xfont;
14}; 14};
15typedef struct _XFont Fnt; 15typedef struct _XFont Fnt;
16/* X11 types - end */
17 16
18typedef struct {
19 unsigned int w;
20 unsigned int h;
21 int x;
22 int y;
23 int xOff;
24 int yOff;
25} TextExtents;
26
27
28/* X11 types - begin */
29typedef struct _XDraw Draw; 17typedef struct _XDraw Draw;
30struct _XDraw { 18struct _XDraw {
31 unsigned int w, h; 19 unsigned int w, h;
@@ -39,6 +27,13 @@ struct _XDraw {
39 Fnt *font; 27 Fnt *font;
40}; 28};
41 29
30typedef struct {
31 unsigned int w;
32 unsigned int h;
33 int xOff;
34 int yOff;
35} TextExtents;
36
42/* Drawable abstraction */ 37/* Drawable abstraction */
43Draw *draw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h); 38Draw *draw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h);
44void draw_resize(Draw *draw, unsigned int w, unsigned int h); 39void draw_resize(Draw *draw, unsigned int w, unsigned int h);
@@ -58,12 +53,12 @@ void draw_setfg(Draw *draw, Col *col);
58void draw_setbg(Draw *draw, Col *col); 53void draw_setbg(Draw *draw, Col *col);
59 54
60/* Drawing functions */ 55/* Drawing functions */
61void draw_rect(Draw *draw, int x, int y, unsigned int w, unsigned int h); 56void draw_rect(Draw *draw, int x, int y, unsigned int w, unsigned int h, Bool filled, Bool empty, Bool invert);
62void draw_text(Draw *draw, int x, int y, const char *text); 57void draw_text(Draw *draw, int x, int y, unsigned int w, unsigned int h, const char *text, Bool invert);
63 58
64/* Map functions */ 59/* Map functions */
65void draw_map(Draw *draw, int x, int y, unsigned int w, unsigned int h); 60void draw_map(Draw *draw, int x, int y, unsigned int w, unsigned int h);
66 61
67/* Text functions */ 62/* Text functions */
68void draw_getextents(Draw *draw, const char *text, TextExtents *extents); 63void draw_getextents(Draw *draw, const char *text, unsigned int len, TextExtents *extents);
69 64