diff options
| author | Federico Angelilli <code@fedang.net> | 2024-03-13 23:19:32 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-03-13 23:19:32 +0100 |
| commit | cbe94d7c42422856275ad41332cbc980054d6bee (patch) | |
| tree | 08564115751ff681615988bfab5750db95acc43c /src/draw.h | |
| parent | 4df262ade044448f83092ab157a15b4a3f170eec (diff) | |
Start refactoring state and draw
Diffstat (limited to 'src/draw.h')
| -rw-r--r-- | src/draw.h | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -8,9 +8,10 @@ #include "window.h" #include "button.h" -typedef struct Drawable Drawable; +// The one who draws ('o')7 -struct Drawable { +typedef struct { + PangoFontDescription *desc; int height; int left_pad; int right_pad; @@ -18,8 +19,7 @@ struct Drawable { int line_w; Color background; GList *layouts; - PangoFontDescription *desc; -}; +} Drawer; typedef struct { Button *btn; @@ -29,15 +29,15 @@ typedef struct { PangoLayout *pl; } Layout; -Drawable *draw_create(const char *font, int height, int left_pad, int right_pad, int top_pad, int line_w); +Drawer *draw_create(const char *font, int height, int left_pad, int right_pad, int top_pad, int line_w); -void draw_compute_layout(Drawable *draw, Window *win, GList *btns); +void draw_compute_layout(Drawer *draw, Window *win, GList *btns); -void draw_paint(Drawable *draw, Window *win); +void draw_paint(Drawer *draw, Window *win); -void draw_set_background(Drawable *draw, Color background); +void draw_set_background(Drawer *draw, Color background); -void draw_destroy(Drawable *draw); +void draw_destroy(Drawer *draw); #endif |
