add c and python sample extensions

This commit is contained in:
scawful
2024-08-08 22:40:09 -04:00
parent 6761554ff2
commit 6596635121
4 changed files with 104 additions and 27 deletions

View File

@@ -9,6 +9,11 @@ typedef void (*yaze_imgui_render_callback)(void* editor_context);
typedef void (*yaze_rom_operation)(z3_rom* rom);
/**
* @brief Extension interface for Yaze.
*
* @details Yaze extensions can be written in C or Python.
*/
typedef struct yaze_extension {
const char* name;
const char* version;
@@ -30,12 +35,26 @@ typedef struct yaze_extension {
} yaze_extension;
/**
* @brief Get the extension interface.
*/
yaze_extension* get_yaze_extension();
/**
* @brief Load a C extension.
*/
void yaze_load_c_extension(const char* extension_path);
/**
* @brief Load a Python extension.
*/
void yaze_load_py_extension(const char* script_path);
/**
* @brief Clean up the extension.
*/
void yaze_cleanup_extension();
#ifdef __cplusplus
}
#endif