Path: blob/master/src/pc/gfx/gfx_window_manager_api.h
7861 views
#ifndef GFX_WINDOW_MANAGER_API_H1#define GFX_WINDOW_MANAGER_API_H23#include <stdint.h>4#include <stdbool.h>5#include <PR/ultratypes.h>67struct GfxWindowManagerAPI {8void (*init)(const char *game_name, bool start_in_fullscreen);9void (*set_keyboard_callbacks)(bool (*on_key_down)(int scancode), bool (*on_key_up)(int scancode), void (*on_all_keys_up)(void), void (*on_mouse_move)(long x, long y), void (*on_mouse_press)(s8 left, s8 right, s8 middle, s8 wheel));10void (*set_fullscreen_changed_callback)(void (*on_fullscreen_changed)(bool is_now_fullscreen));11void (*set_fullscreen)(bool enable);12void (*set_vsync)(bool enable);13void (*set_window_size)(uint32_t width, uint32_t height);14void (*set_monitor)(uint32_t monitor_index);15int (*get_num_display_modes)(void);16void (*main_loop)(void (*run_one_game_iter)(void));17void (*get_dimensions)(uint32_t *width, uint32_t *height);18void (*handle_events)(void);19bool (*start_frame)(void);20void (*swap_buffers_begin)(void);21void (*swap_buffers_end)(void);22double (*get_time)(void); // For debug23};2425#endif262728