aboutsummaryrefslogtreecommitdiff
path: root/src/button.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/button.h')
-rw-r--r--src/button.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/button.h b/src/button.h
new file mode 100644
index 0000000..11b6507
--- /dev/null
+++ b/src/button.h
@@ -0,0 +1,26 @@
+#ifndef COMET_BUTTON_H
+#define COMET_BUTTON_H
+
+#include <stdbool.h>
+
+// TODO: Generic button shapes/actions
+
+typedef struct Button Button;
+
+typedef void (* ButtonAction)(Button *btn);
+
+struct Button {
+ bool fixed_size;
+ ButtonAction action;
+ char *text;
+};
+
+Button *button_create(const char *text, bool fixed_size);
+
+void button_set_action(Button *btn, ButtonAction action);
+
+void button_destroy(Button *btn);
+
+#endif
+
+// vim: ts=4 sw=4 et