diff options
author | 3gg <3gg@shellblade.net> | 2024-07-13 10:52:24 -0700 |
---|---|---|
committer | 3gg <3gg@shellblade.net> | 2024-07-13 10:52:24 -0700 |
commit | a4294e4a94189dffb1fdf99c9a60d87d77272926 (patch) | |
tree | 2e92f7c95116861bc39f4dae1d0ab5d388550000 /src/widget/frame.c | |
parent | cf9579d7546c04dbc708bd8719e3f935a28088bd (diff) |
Restructure project.
Diffstat (limited to 'src/widget/frame.c')
-rw-r--r-- | src/widget/frame.c | 19 |
1 files changed, 19 insertions, 0 deletions
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 @@ | |||
1 | #include <ui.h> | ||
2 | |||
3 | #include "widget.h" | ||
4 | |||
5 | uiFrame* uiMakeFrame(void) { | ||
6 | uiFrame* frame = UI_NEW(uiFrame); | ||
7 | frame->widget.type = uiTypeFrame; | ||
8 | return frame; | ||
9 | } | ||
10 | |||
11 | void uiDestroyFrame(uiFrame** ppFrame) { DestroyWidget((uiWidget**)ppFrame); } | ||
12 | |||
13 | uiSize uiGetFrameSize(const uiFrame* frame) { | ||
14 | assert(frame); | ||
15 | return (uiSize){ | ||
16 | .width = frame->widget.rect.width, | ||
17 | .height = frame->widget.rect.height, | ||
18 | }; | ||
19 | } | ||