diff options
| author | Federico Angelilli <code@fedang.net> | 2023-11-19 01:32:37 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2023-11-19 01:32:37 +0100 |
| commit | 07646612acbc833ec50479eee3564af37636f272 (patch) | |
| tree | b3cfa4d2e90218714c144277b0819065a80090f1 /src/draw.h | |
| parent | 6dd4c979c40804756ef4d3ca5ac34671c3bcc7e2 (diff) | |
Check button clicks and trigger actions
Diffstat (limited to 'src/draw.h')
| -rw-r--r-- | src/draw.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -3,8 +3,10 @@ #include <glib.h> #include <pango/pango-font.h> +#include <pango/pangocairo.h> #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); |
