update yaze_ext to match yaze_c style

This commit is contained in:
scawful
2024-08-08 22:04:23 -04:00
parent 94fe4fe280
commit 6761554ff2
2 changed files with 73 additions and 32 deletions

View File

@@ -5,6 +5,10 @@
extern "C" {
#endif
typedef void (*yaze_imgui_render_callback)(void* editor_context);
typedef void (*yaze_rom_operation)(z3_rom* rom);
typedef struct yaze_extension {
const char* name;
const char* version;
@@ -16,16 +20,21 @@ typedef struct yaze_extension {
void (*cleanup)(void);
// Function to extend editor functionality
void (*extendFunctionality)(void* editorContext);
void (*extend_functionality)(void* editor_context);
// ImGui rendering callback
yaze_imgui_render_callback render_ui;
// ROM manipulation callback
yaze_rom_operation manipulate_rom;
} yaze_extension;
// Function to get the extension instance
yaze_extension* GetExtension();
yaze_extension* get_yaze_extension();
void LoadCExtension(const char* extension_path);
void yaze_load_c_extension(const char* extension_path);
// Function to load a Python script as an extension
void LoadPythonExtension(const char* script_path);
void yaze_load_py_extension(const char* script_path);
#ifdef __cplusplus
}