diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-11-15 08:49:34 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-11-15 09:01:05 +0100 |
commit | b6ceb4af109f26885c91f01d0a63593158e567fa (patch) | |
tree | 441e784a9715d6c180c805854a5ee148b3219ef0 /include | |
parent | a3c6774f211ee765f910df76837548bdadd4e959 (diff) |
Window: add close, title, cursor visibility and framerate limit
Diffstat (limited to 'include')
-rw-r--r-- | include/mgl/window/window.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mgl/window/window.h b/include/mgl/window/window.h index c6fce87..aa516a8 100644 --- a/include/mgl/window/window.h +++ b/include/mgl/window/window.h @@ -3,6 +3,7 @@ #include "../graphics/color.h" #include "../system/vec.h" +#include "../system/clock.h" #include "key.h" #include <stdbool.h> @@ -27,6 +28,8 @@ struct mgl_window { mgl_vec2i cursor_position; mgl_view view; bool open; + double frame_time_limit; + mgl_clock frame_timer; }; int mgl_window_create(mgl_window *self, const char *title, int width, int height); @@ -51,4 +54,10 @@ void mgl_window_get_view(mgl_window *self, mgl_view *view); bool mgl_window_is_open(const mgl_window *self); bool mgl_window_is_key_pressed(const mgl_window *self, mgl_key key); +void mgl_window_close(mgl_window *self); +void mgl_window_set_title(mgl_window *self, const char *title); +void mgl_window_set_cursor_visible(mgl_window *self, bool visible); +/* 0 = no fps limit */ +void mgl_window_set_framerate_limit(mgl_window *self, int fps); + #endif /* MGL_WINDOW_H */ |