From e774c39c76379738e383e23938f3762b1a57e3b2 Mon Sep 17 00:00:00 2001 From: Federico Angelilli Date: Sun, 19 Nov 2023 13:10:54 +0100 Subject: Add per-button colors --- src/button.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/button.h') diff --git a/src/button.h b/src/button.h index 1d736e6..7def0b3 100644 --- a/src/button.h +++ b/src/button.h @@ -10,14 +10,23 @@ typedef struct Button Button; typedef void (* ButtonAction)(Button *btn); +typedef struct { + double r, g, b, a; +} Color; + struct Button { ButtonAction action; char *text; PangoAlignment align; + Color background; + Color foreground; + Color stroke; }; Button *button_create(const char *text, PangoAlignment align); +void button_set_colors(Button *btn, Color background, Color foreground, Color stroke); + void button_set_action(Button *btn, ButtonAction action); void button_destroy(Button *btn); -- cgit v1.2.3