X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/87adcd263b1fc75f7eb3172dac55ca641fd7a96a..0a673ad7a37f3a1bdda7cef316bda300f8f181eb:/draw.h diff --git a/draw.h b/draw.h index 955067d..95242ea 100644 --- a/draw.h +++ b/draw.h @@ -1,13 +1,18 @@ /* See LICENSE file for copyright and license details. */ +typedef struct _DDC DDC; + /* X11 types - begin */ +typedef struct _XDraw Draw; struct _XDraw { unsigned int w, h; Display *dpy; + int screen; + Window win; Drawable drawable; GC gc; + DDC *dc; }; -typedef struct _XDraw Draw; struct _XCol { unsigned long rgb; @@ -24,13 +29,14 @@ struct _XFont { typedef struct _XFont Fnt; /* X11 types - end */ -typedef struct { +struct _DDC { Draw *draw; Col *fg; Col *bg; Fnt *font; Bool fill; -} DDC; + DDC *next; +}; typedef struct { unsigned int w; @@ -42,7 +48,7 @@ typedef struct { } TextExtents; /* Drawable abstraction */ -Draw *draw_create(Display *dpy, Window win, unsigned int w, unsigned int h); +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); void draw_free(Draw *draw); @@ -60,8 +66,8 @@ void col_free(Col *col); /* Drawing context manipulation */ void dc_setfont(DDC *dc, Fnt *font); -void dc_setfg(DDC *dc, Col col); -void dc_setbg(DDC *dc, Col col); +void dc_setfg(DDC *dc, Col *col); +void dc_setbg(DDC *dc, Col *col); void dc_setfill(DDC *dc, Bool fill); /* Drawing functions */