Files
stk/include/stk.h
T
anth64 a3978644af refactor: centralize module identity logic and upgrade lookup
- Move extract_module_id and is_valid_module_file to module.c
- Update is_module_loaded to return module index instead of uint8_t
- Fix platform.c event checks to handle index-based return (>= 0)
- Centralize STK_MODULE_EXT definitions in stk.h
2026-01-18 22:01:54 +01:00

46 lines
787 B
C

#ifndef STK_H
#define STK_H
#include "stk_version.h"
#include <stdlib.h>
#define STK_MOD_DIR_BUFFER 256
#define STK_MOD_ID_BUFFER 64
#define STK_PATH_MAX 256
#define STK_PATH_MAX_OS 4096
#if defined(__linux__) || defined(_WIN32)
#define STK_EVENT_BUFFER 4096
#endif
#if defined(_WIN32)
#define STK_MODULE_EXT ".dll"
#elif defined(__APPLE__)
#define STK_MODULE_EXT ".dylib"
#else
#define STK_MODULE_EXT ".so"
#endif
#define STK_MODULE_EXT_LEN (sizeof(STK_MODULE_EXT) - 1)
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
STK_MOD_LOAD,
STK_MOD_UNLOAD,
STK_MOD_RELOAD
} stk_module_event_t;
int stk_init(const char *mod_dir, const char *tmp_dir);
void stk_shutdown(void);
size_t stk_module_count(void);
size_t stk_poll(void);
#ifdef __cplusplus
}
#endif
#endif /* STK_H */