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/frame.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/widget/frame.c (limited to 'src/widget/frame.c') diff --git a/src/widget/frame.c b/src/widget/frame.c new file mode 100644 index 0000000..e1078be --- /dev/null +++ b/src/widget/frame.c @@ -0,0 +1,19 @@ +#include + +#include "widget.h" + +uiFrame* uiMakeFrame(void) { + uiFrame* frame = UI_NEW(uiFrame); + frame->widget.type = uiTypeFrame; + return frame; +} + +void uiDestroyFrame(uiFrame** ppFrame) { DestroyWidget((uiWidget**)ppFrame); } + +uiSize uiGetFrameSize(const uiFrame* frame) { + assert(frame); + return (uiSize){ + .width = frame->widget.rect.width, + .height = frame->widget.rect.height, + }; +} -- cgit v1.2.3