summaryrefslogtreecommitdiffhomepage
path: root/include/rodeo/window.h
blob: 37c39b53a1a368e85bb2ec478f841a05fc0cee7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once

// -- internal --
// public
//#include "rodeo/window_t.h"

// -- external --
#include "stc/cstr.h"

// -- system --
#include <inttypes.h>


void
rodeo_window_init(
	uint32_t screen_height,
	uint32_t screen_width,
	cstr title
);

void
rodeo_window_deinit(void);

uint32_t
rodeo_window_width_get(void);

uint32_t
rodeo_window_height_get(void);

bool
rodeo_window_shouldQuit(void);

void
rodeo_window_quit(void);

uint64_t
rodeo_window_elapsedTime_ms(void);

#define								\
mrodeo_window_do(					\
	screen_width,					\
	screen_height,					\
	title							\
)									\
	mrodeo_defer_do(				\
		rodeo_window_init(			\
			screen_width,			\
			screen_height,			\
			title					\
		),							\
		rodeo_window_deinit()		\
	)