aboutsummaryrefslogtreecommitdiff
path: root/src/draw.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2023-11-19 01:32:37 +0100
committerFederico Angelilli <code@fedang.net>2023-11-19 01:32:37 +0100
commit07646612acbc833ec50479eee3564af37636f272 (patch)
treeb3cfa4d2e90218714c144277b0819065a80090f1 /src/draw.h
parent6dd4c979c40804756ef4d3ca5ac34671c3bcc7e2 (diff)
Check button clicks and trigger actions
Diffstat (limited to 'src/draw.h')
-rw-r--r--src/draw.h10
1 files changed, 10 insertions, 0 deletions
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 <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);