summaryrefslogtreecommitdiff
path: root/src/widget/button.c
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2024-07-13 10:52:24 -0700
committer3gg <3gg@shellblade.net>2024-07-13 10:52:24 -0700
commita4294e4a94189dffb1fdf99c9a60d87d77272926 (patch)
tree2e92f7c95116861bc39f4dae1d0ab5d388550000 /src/widget/button.c
parentcf9579d7546c04dbc708bd8719e3f935a28088bd (diff)
Restructure project.
Diffstat (limited to 'src/widget/button.c')
-rw-r--r--src/widget/button.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/widget/button.c b/src/widget/button.c
new file mode 100644
index 0000000..f2313fd
--- /dev/null
+++ b/src/widget/button.c
@@ -0,0 +1,19 @@
1#include <ui.h>
2
3#include "widget.h"
4
5uiButton* uiMakeButton(const char* text) {
6 assert(text);
7
8 uiButton* button = UI_NEW(uiButton);
9
10 *button = (uiButton){
11 .widget =
12 (uiWidget){
13 .type = uiTypeButton,
14 .rect = {0},
15 },
16 .text = string_new(text),
17 };
18 return button;
19}