From 07646612acbc833ec50479eee3564af37636f272 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sun, 19 Nov 2023 01:32:37 +0100 Subject: Check button clicks and trigger actions --- src/draw.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/draw.h') diff --git a/src/draw.h b/src/draw.h index c4f88e6..9c46900 100644 --- a/src/draw.h +++ b/src/draw.h @@ -3,8 +3,10 @@ #include #include +#include #include "window.h" +#include "button.h" typedef struct Drawable Drawable; @@ -18,6 +20,14 @@ struct Drawable { PangoFontDescription *desc; }; +typedef struct { + Button *btn; + int x, y; + int width, height; + int text_w, text_h; + PangoLayout *pl; +} Layout; + Drawable *draw_create(const char *font, int height, int left_pad, int right_pad, int top_pad, double alpha); void draw_compute_layout(Drawable *draw, GList *btns, cairo_t *cr); -- cgit v1.2.3