From a4294e4a94189dffb1fdf99c9a60d87d77272926 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 13 Jul 2024 10:52:24 -0700 Subject: Restructure project. --- src/widget/button.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/widget/button.c (limited to 'src/widget/button.c') 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 @@ +#include + +#include "widget.h" + +uiButton* uiMakeButton(const char* text) { + assert(text); + + uiButton* button = UI_NEW(uiButton); + + *button = (uiButton){ + .widget = + (uiWidget){ + .type = uiTypeButton, + .rect = {0}, + }, + .text = string_new(text), + }; + return button; +} -- cgit v1.2.3