From 41729222431449a81535b28ad27ce2620cb5819b Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Fri, 17 Nov 2023 13:30:38 +0100 Subject: Move all the state required for rendering in a struct --- draw.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'draw.h') diff --git a/draw.h b/draw.h index 1d299ce..2bbb3c2 100644 --- a/draw.h +++ b/draw.h @@ -8,7 +8,6 @@ // TODO: Make opaque typedef struct { - Window *win; PangoFontDescription *desc; int height; int left_pad; @@ -17,9 +16,9 @@ typedef struct { double alpha; } Drawable; -Drawable *draw_create(Window *win, const char *font, int height, int left_pad, int right_pad, int top_pad, double alpha); +Drawable *draw_create(const char *font, int height, int left_pad, int right_pad, int top_pad, double alpha); -void draw_paint(Drawable *draw); +void draw_paint(Drawable *draw, Window *win); void draw_destroy(Drawable *draw); -- cgit v1.2.3