#ifndef SCUFENG_H_ #define SCUFENG_H_ #include #include #include "keys.h" // IWYU pragma: export #define SERESULT_X(X) \ X(SE_SUCCESS) \ X(SE_OUT_OF_MEMORY) \ X(SE_FC_FAILURE) \ X(SE_NOT_FOUND) \ X(SE_FT_FAILURE) #define X(val) val, typedef enum { SERESULT_X(X) } SEResult; #undef X typedef enum { SE_FILL, SE_LINE, SE_POINT } SEPolygonMode; typedef enum { SE_NONE, SE_FORWARD, SE_BACKWARD, SE_LEFT, SE_RIGHT, SE_UP, SE_DOWN } SEDirection; typedef void (*SEKeyCb)(SEKey key, SEKeyAction action, SEKeyMod mods); typedef void (*SECharCb)(unsigned int codepoint); void se_init(const bool debug, FILE *log_out, FILE *log_err_out); void se_deinit(void); void se_window_create( const int w, const int h, const char* title, const int fullscreen_monitor_i ); void se_window_close(); void se_clear_color( const float r, const float g, const float b, const float a ); void se_clear(void); void se_swap_buffers(void); bool se_window_should_close(void); void se_handle_events(void); double se_get_time(void); double se_delta_time(const double current_time); void se_set_polygon_mode(const SEPolygonMode mode); void se_set_key_callback(SEKeyCb cb); SEKeyAction se_get_key(const SEKey key); SEKeyAction se_get_mouse_button(const SEMouseButton btn); void se_get_mouse_pos(double *x, double *y); void se_swap_interval(const int interval); void se_fps_lock_set_fps(const unsigned int fps); void se_fps_lock_frame_start_s(const double frame_start_s); void se_fps_lock_wait(void); const char* SEResult_to_str(const SEResult res); #endif // SCUFENG_H_