Here is a skeleton plugin, containing the bare minimum of code (fill in where appropriate):
#include "eboxyplugin.h"
#include "pluginconstants.h"
int ebplugin_init(void) {
/* Change these two strings to whatever you want for your plugin (name and
* version)
*/
setPluginInfo("my plugin", "1.0");
/* Do anything else here that you need to do to initialise your plugin
* Note: if your own initialisation stuff fails here, you should return
* a non-zero value.
*/
return 0; /* returning 0 means plugin has successfully initialised */
}
int ebplugin_message(int msgcode, void *msgdata) {
/* If your plugin manages objects on the current page, you should check
* here for when the current page/file is changed. This will also be called
* under other circumstances (see pluginconstants.h for values of msgcode)
*/
return 0; /* return 0 here for future compatibility */
}
void ebplugin_deinit(void) {
/* Any cleanup code you need for your plugin goes here */
}