diff options
Diffstat (limited to '')
| -rw-r--r-- | draw.h | 14 |
1 files changed, 9 insertions, 5 deletions
| @@ -1,13 +1,16 @@ | |||
| 1 | /* See LICENSE file for copyright and license details. */ | 1 | /* See LICENSE file for copyright and license details. */ |
| 2 | 2 | ||
| 3 | typedef struct _DDC DDC; | ||
| 4 | |||
| 3 | /* X11 types - begin */ | 5 | /* X11 types - begin */ |
| 6 | typedef struct _XDraw Draw; | ||
| 4 | struct _XDraw { | 7 | struct _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 | }; |
| 10 | typedef struct _XDraw Draw; | ||
| 11 | 14 | ||
| 12 | struct _XCol { | 15 | struct _XCol { |
| 13 | unsigned long rgb; | 16 | unsigned long rgb; |
| @@ -24,13 +27,14 @@ struct _XFont { | |||
| 24 | typedef struct _XFont Fnt; | 27 | typedef struct _XFont Fnt; |
| 25 | /* X11 types - end */ | 28 | /* X11 types - end */ |
| 26 | 29 | ||
| 27 | typedef struct { | 30 | struct _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 | ||
| 35 | typedef struct { | 39 | typedef 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 */ |
| 62 | void dc_setfont(DDC *dc, Fnt *font); | 66 | void dc_setfont(DDC *dc, Fnt *font); |
| 63 | void dc_setfg(DDC *dc, Col col); | 67 | void dc_setfg(DDC *dc, Col *col); |
| 64 | void dc_setbg(DDC *dc, Col col); | 68 | void dc_setbg(DDC *dc, Col *col); |
| 65 | void dc_setfill(DDC *dc, Bool fill); | 69 | void dc_setfill(DDC *dc, Bool fill); |
| 66 | 70 | ||
| 67 | /* Drawing functions */ | 71 | /* Drawing functions */ |
