#include #include "button.h" Button *button_create(const char *text, PangoAlignment align) { Button *btn = g_malloc0(sizeof(Button)); btn->text = g_strdup(text); btn->align = align; return btn; } void button_set_colors(Button *btn, Color background, Color foreground, Color stroke) { btn->background = background; btn->foreground = foreground; btn->stroke = stroke; } void button_set_action(Button *btn, ButtonAction action) { btn->action = action; } void button_destroy(Button *btn) { g_free(btn->text); g_free(btn); }