blob: 3a4e3110546ce8a2af8503de3be53373e9823f05 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <glib.h>
#include "button.h"
Button *button_create(const char *text)
{
Button *btn = g_malloc0(sizeof(Button));
btn->text = g_strdup(text);
return btn;
}
void button_set_action(Button *btn, ButtonAction action)
{
btn->action = action;
}
void button_destroy(Button *btn)
{
g_free(btn->text);
g_free(btn);
}
|