From fe293d9503a57df0236be85cc82093074e7bbccb Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sat, 16 Mar 2024 19:34:45 +0100 Subject: Rework draw functions --- src/draw.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/draw.h') diff --git a/src/draw.h b/src/draw.h index c9de967..6851e87 100644 --- a/src/draw.h +++ b/src/draw.h @@ -15,7 +15,7 @@ typedef struct { typedef struct { PangoFontDescription *desc; - PangoContext *ctx; + PangoContext *context; int height; int width; int left_pad; @@ -41,17 +41,23 @@ typedef struct { GList *children; } Layout; -Drawer *draw_create(const char *font, int height, int left_pad, int right_pad, int top_pad); +Drawer *draw_create(); + +void draw_paint(Drawer *draw, Window *win); // TODO: Rework the api so that we don't need to pass the window void draw_compute_layout(Drawer *draw, Window *win, GList *btns); -void draw_paint(Drawer *draw, Window *win); - void draw_set_background(Drawer *draw, Color background); void draw_set_separator(Drawer *draw, int sep); +void draw_set_font(Drawer *draw, const char *font); + +void draw_set_context(Drawer *draw, PangoContext *context); + +void draw_set_size(Drawer *draw, int height, int left_pad, int right_pad, int top_pad); + void draw_destroy(Drawer *draw); #endif -- cgit v1.2.3