Added resize callback, made main callback optional

This commit is contained in:
Shylie
2023-12-25 17:38:44 -05:00
parent 226adeaf72
commit 2cb9c0273f
3 changed files with 37 additions and 6 deletions

View File

@@ -6,9 +6,15 @@ extern "C"
{
#endif
typedef void (*terml_main_callback)();
typedef int (*terml_quit_callback)();
typedef void (*terml_key_callback) (char code);
typedef void (*terml_main_callback) ();
typedef int (*terml_quit_callback) ();
typedef void (*terml_key_callback) (char code);
typedef void (*terml_resize_callback)(
unsigned int previous_width,
unsigned int previous_height,
unsigned int new_width,
unsigned int new_height
);
int terml_init();
int terml_deinit();
@@ -23,6 +29,7 @@ void terml_flush();
void terml_set_main_callback(terml_main_callback);
void terml_set_quit_callback(terml_quit_callback);
void terml_set_key_callback(terml_key_callback);
void terml_set_resize_callback(terml_resize_callback);
void terml_start();
void terml_stop();