Added PluginContext
This commit is contained in:
@@ -10,6 +10,10 @@ typedef struct plug_info_t {
|
||||
char* license;
|
||||
} plug_info_t;
|
||||
|
||||
typedef struct plug_ctx_t {
|
||||
char* config_dir;
|
||||
} plug_ctx_t;
|
||||
|
||||
#define PLUG_INFO(_name, _version, _license) \
|
||||
static plug_info_t PLUG_INFO_VAR = { .name=(_name), .version=(_version), .license=(_license)}; \
|
||||
void* plug_get_info() { \
|
||||
@@ -22,7 +26,7 @@ void* plug_get_info() { \
|
||||
#define PLUG_LICENSE(s) volatile char* PLUG_LICENSE = (s);
|
||||
|
||||
|
||||
void plug_init(); // Loads when DIM initialises
|
||||
void plug_init(plug_ctx_t*); // Loads when DIM initialises
|
||||
void* plug_pre_reload(); // Return a pointer to save state
|
||||
void plug_post_reload(void*); // returns the same pointer after reload
|
||||
void plug_poll(char*, size_t); // Write the message to `buf` with max `size` characters
|
||||
|
||||
Reference in New Issue
Block a user