aboutsummaryrefslogtreecommitdiff
path: root/include/mgui/mgui.h
blob: 024a0623e323ae156e377eba7f3e2aa559feddae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#ifndef MGUI_H
#define MGUI_H

typedef struct mgui_widget mgui_widget;
typedef struct mgl_event mgl_event;
typedef struct mgl_window mgl_window;

void mgui_init(void);
void mgui_deinit(void);
void mgui_on_event(mgui_widget *root_widget, mgl_window *window, mgl_event *event);
/* This should only be called once every frame */
void mgui_draw(mgui_widget *root_widget, mgl_window *window);
/* Clamped to 1.0 second */
double mgui_get_seconds_since_last_update(void);
/* Clamped to 1.0 second */
double mgui_get_frame_time_seconds(void);

#endif /* MGUI_H */