diff options
| author | Federico Angelilli <code@fedang.net> | 2024-03-16 19:34:45 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-03-16 19:34:45 +0100 |
| commit | fe293d9503a57df0236be85cc82093074e7bbccb (patch) | |
| tree | 23a54b8237e8bb2f90e8d9390b5c5fd064d3b13e /src/draw.h | |
| parent | 6913ec943a1c71804ec81a9adbb19cfd899a202d (diff) | |
Rework draw functions
Diffstat (limited to 'src/draw.h')
| -rw-r--r-- | src/draw.h | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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 |
