aboutsummaryrefslogtreecommitdiff
path: root/src/button.h
diff options
context:
space:
mode:
authorFederico Angelilli <code@fedang.net>2024-07-08 15:22:41 +0200
committerFederico Angelilli <code@fedang.net>2024-07-08 15:22:41 +0200
commit5d170a634ead0119f6e5a9f63c23b2b064126f75 (patch)
tree0447d2dbb0da6358d184a4c62d5557d4d22f5e8d /src/button.h
parent92feb3c130966202c7caa6d9bf3a3800c97ca7a1 (diff)
Remove old files
Diffstat (limited to 'src/button.h')
-rw-r--r--src/button.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/src/button.h b/src/button.h
deleted file mode 100644
index 4b6c834..0000000
--- a/src/button.h
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef COMET_BUTTON_H
-#define COMET_BUTTON_H
-
-#include <stdbool.h>
-#include <glib.h>
-#include <pango/pangocairo.h>
-
-#include "draw.h"
-#include "animate.h"
-
-// For pointers only
-#define CAST(ptr, type) ((type *)ptr)
-
-typedef struct Button Button;
-
-typedef void (* ButtonAction)(Button *btn);
-
-struct Button {
- bool simple;
- int x_pad;
- int y_pad;
- PangoAlignment align;
- Color color;
- Color line_color;
- int line_width;
- int max_width;
- int min_width;
- // TODO: Make animations not depend on the button
- Animation *anim;
-};
-
-typedef struct {
- Button btn;
- Color text_color;
- char *text;
- ButtonAction action;
- gpointer data;
-} ButtonSimple;
-
-typedef struct {
- Button btn;
- GList *children;
-} ButtonGroup;
-
-// NOTE: For the moment all button specific functions take a generic button
-// pointer and assert the right type, so the check should be done by the caller
-
-Button *button_simple_create(PangoAlignment align, Color color);
-
-// Takes ownership of text
-void button_simple_set_text(Button *btn, char *text, Color text_color);
-
-const char *button_simple_get_text(Button *btn);
-
-void button_simple_set_action(Button *btn, ButtonAction action, gpointer data);
-
-ButtonAction button_simple_get_action(Button *btn);
-
-Button *button_group_create(PangoAlignment align, Color color);
-
-void button_group_append(Button *btn, Button *child);
-
-void button_set_padding(Button *btn, int x_pad, int y_pad);
-
-bool button_set_animation(Button *btn, Animation *anim);
-
-void button_set_line(Button *btn, Color line_color, int line_width);
-
-void button_set_width(Button *btn, int max, int min);
-
-Button *button_copy(Button *btn);
-
-void button_destroy(Button *btn);
-
-#endif
-
-// vim: ts=4 sw=4 et