29 lines
663 B
C
29 lines
663 B
C
#include "pumpkin_api.h"
|
|
#include <stdio.h>
|
|
|
|
pumpkin_metadata_t get_meta(void) {
|
|
static const char* authors[] = {"alex"};
|
|
return (pumpkin_metadata_t) {
|
|
.name = "my-c-plugin",
|
|
.version = "0.1.0",
|
|
.authors = authors,
|
|
.authors_count = 1,
|
|
.description = "A simple C plugin for Pumpkin",
|
|
.dependencies_count = 0
|
|
};
|
|
}
|
|
|
|
void on_load(plugin_own_context_t ctx) {
|
|
printf("C plugin loaded!\n");
|
|
}
|
|
|
|
void on_unload(plugin_own_context_t ctx) {
|
|
printf("C plugin unloaded!\n");
|
|
}
|
|
|
|
REGISTER_PUMPKIN_PLUGIN(((pumpkin_plugin_t){
|
|
.get_metadata = get_meta,
|
|
.on_load = on_load,
|
|
.on_unload = on_unload
|
|
}))
|