summaryrefslogtreecommitdiffstats
path: root/draw.h
diff options
context:
space:
mode:
authoranselm@garbe.us <unknown>2012-11-18 12:04:29 +0100
committeranselm@garbe.us <unknown>2012-11-18 12:04:29 +0100
commitd456617f0eb93df0ec8eb81ff6e04ca988c09c60 (patch)
tree91fdfc4934a640bc937e2524cff16d60cc6862a5 /draw.h
parentreverting to plain X11 fonts in order to implement draw.c default (diff)
downloaddwm-d456617f0eb93df0ec8eb81ff6e04ca988c09c60.tar.gz
dwm-d456617f0eb93df0ec8eb81ff6e04ca988c09c60.zip
basic draw.c structure
Diffstat (limited to '')
-rw-r--r--draw.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/draw.h b/draw.h
index 955067d..9aec43d 100644
--- a/draw.h
+++ b/draw.h
@@ -1,13 +1,16 @@
1/* See LICENSE file for copyright and license details. */ 1/* See LICENSE file for copyright and license details. */
2 2
3typedef struct _DDC DDC;
4
3/* X11 types - begin */ 5/* X11 types - begin */
6typedef struct _XDraw Draw;
4struct _XDraw { 7struct _XDraw {
5 unsigned int w, h; 8 unsigned int w, h;
6 Display *dpy; 9 Display *dpy;
7 Drawable drawable; 10 Drawable drawable;
8 GC gc; 11 GC gc;
12 DDC *dc;
9}; 13};
10typedef struct _XDraw Draw;
11 14
12struct _XCol { 15struct _XCol {
13 unsigned long rgb; 16 unsigned long rgb;
@@ -24,13 +27,14 @@ struct _XFont {
24typedef struct _XFont Fnt; 27typedef struct _XFont Fnt;
25/* X11 types - end */ 28/* X11 types - end */
26 29
27typedef struct { 30struct _DDC {
28 Draw *draw; 31 Draw *draw;
29 Col *fg; 32 Col *fg;
30 Col *bg; 33 Col *bg;
31 Fnt *font; 34 Fnt *font;
32 Bool fill; 35 Bool fill;
33} DDC; 36 DDC *next;
37};
34 38
35typedef struct { 39typedef struct {
36 unsigned int w; 40 unsigned int w;
@@ -60,8 +64,8 @@ void col_free(Col *col);
60 64
61/* Drawing context manipulation */ 65/* Drawing context manipulation */
62void dc_setfont(DDC *dc, Fnt *font); 66void dc_setfont(DDC *dc, Fnt *font);
63void dc_setfg(DDC *dc, Col col); 67void dc_setfg(DDC *dc, Col *col);
64void dc_setbg(DDC *dc, Col col); 68void dc_setbg(DDC *dc, Col *col);
65void dc_setfill(DDC *dc, Bool fill); 69void dc_setfill(DDC *dc, Bool fill);
66 70
67/* Drawing functions */ 71/* Drawing functions */