c: create/destroy surface API

This commit is contained in:
Mitchell Hashimoto
2023-02-17 12:31:35 -08:00
parent 6ceb5b847b
commit 55b05b22bb
4 changed files with 64 additions and 25 deletions

View File

@@ -27,6 +27,7 @@ typedef struct {
void *userdata;
ghostty_runtime_wakeup_cb wakeup_cb;
} ghostty_runtime_config_s;
typedef struct {} ghostty_surface_config_s;
// Opaque types
typedef void *ghostty_app_t;
@@ -47,6 +48,9 @@ ghostty_app_t ghostty_app_new(ghostty_runtime_config_s *, ghostty_config_t);
void ghostty_app_free(ghostty_app_t);
int ghostty_app_tick(ghostty_app_t);
ghostty_surface_t ghostty_surface_new(ghostty_app_t, ghostty_surface_config_s*);
void ghostty_surface_free(ghostty_app_t, ghostty_surface_t);
#ifdef __cplusplus
}
#endif