aboutsummaryrefslogtreecommitdiff
path: root/src/button.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2023-11-19 13:10:54 +0100
committerFederico Angelilli <code@fedang.net>2023-11-19 13:10:54 +0100
commite774c39c76379738e383e23938f3762b1a57e3b2 (patch)
treed9b15c5a4695efc513f23057c8d326c02905811d /src/button.h
parenta8a1c47f4c22497c983856c04c099058a42e518b (diff)
Add per-button colors
Diffstat (limited to 'src/button.h')
-rw-r--r--src/button.h9
1 files changed, 9 insertions, 0 deletions
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);