From 4fe6e4dcbf40cfc7cebe769db88c4c8118d33b41 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Thu, 12 Sep 2024 03:14:24 +0200 Subject: [PATCH] Add unigi_input_mouse_capture --- main.h | 3 +++ types.h | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/main.h b/main.h index 15fd1b6..4726117 100644 --- a/main.h +++ b/main.h @@ -13,6 +13,9 @@ void unigi_graphics_draw(unigi_type_resolution_1d_coord index, unigi_type_color void unigi_graphics_blit(unigi_type_resolution_1d_coord index, unigi_type_color * pixels, unigi_type_resolution_1d_coord length); void unigi_graphics_flush(); +// INPUT +void unigi_input_mouse_capture(unigi_type_bool captured); + unigi_type_error unigi_window_create(unigi_type_resolution resolution, char * title); unigi_type_time_span unigi_time_get(); diff --git a/types.h b/types.h index 07d0ec8..6e94d8b 100644 --- a/types.h +++ b/types.h @@ -1,14 +1,17 @@ #ifndef unigi_header_types #define unigi_header_types #include +// Main +typedef uint8_t unigi_type_bool; + // Events -typedef uint8_t unigi_type_error; -typedef uint8_t unigi_type_event_enum; +typedef uint8_t unigi_type_error; +typedef uint8_t unigi_type_event_enum; // Graphics typedef uint16_t unigi_type_resolution_2d_coord; typedef uint32_t unigi_type_resolution_1d_coord; -typedef uint8_t unigi_type_resolution_depth; +typedef uint8_t unigi_type_resolution_depth; typedef uint16_t unigi_type_color; // Input