summaryrefslogtreecommitdiff
path: root/src/widget/frame.c
blob: e1078be0470d61a02869e3601b6b40472d3090d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <ui.h>

#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,
  };
}