Added support for cross-compiling to mingw (#5)
[full-beans.git] / renderer.h
blob0e76686f35a43ca067845e815e24273ff64fc78b
1 #ifndef RENDERER_H
2 #define RENDERER_H
4 #include "microui.h"
5 #include <stdint.h>
7 void r_init(void);
8 void r_draw_rect(mu_Rect rect, mu_Color color);
9 void r_draw_text(const char *text, mu_Vec2 pos, mu_Color color);
10 void r_draw_icon(int id, mu_Rect rect, mu_Color color);
11 int r_get_text_width(const char *text, int len);
12 int r_get_text_height(void);
13 void r_set_clip_rect(mu_Rect rect);
14 void r_clear(mu_Color color);
15 void r_present(void);
16 // Can only be checked once per frame; side-effecting.
17 int r_mouse_down(void);
18 // Can only be checked once per frame; side-effecting.
19 int r_mouse_up(void);
20 // Can only be checked once per frame; side-effecting.
21 int r_mouse_moved(int *x, int *y);
22 // Can only be checked once per key per frame; side-effecting.
23 int r_key_down(int key);
24 int r_key_up(int key);
25 int r_ctrl_pressed(void);
26 int r_shift_pressed(void);
27 int r_alt_pressed(void);
28 int64_t r_get_time(void);
29 void r_sleep(int64_t ms);
31 #endif