summaryrefslogtreecommitdiff
path: root/core/modules.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules.h')
-rw-r--r--core/modules.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/core/modules.h b/core/modules.h
new file mode 100644
index 0000000..d4a7929
--- /dev/null
+++ b/core/modules.h
@@ -0,0 +1,30 @@
+#ifndef MODULE_H_INCLUDED
+#define MODULE_H_INCLUDED
+
+typedef PLUGININFO* (*set_plugin_info)();
+typedef int (*load)(PLUGINLINK *link);
+typedef int (*on_modules_loaded)();
+typedef int (*unload)();
+
+class plugin
+{
+public:
+ struct exported_functions_s
+ {
+ load Load;
+ on_modules_loaded OnModulesLoaded;
+ unload Unload;
+ set_plugin_info SetPluginInfo;
+ };
+ wxDynamicLibrary *get_plugin();
+ void set_plugin();
+ const exported_functions_s *get_exported_functions();
+ plugin(wxDynamicLibrary *lib, PLUGININFO *info, exported_functions_s *funcs);
+ ~plugin();
+private:
+ wxDynamicLibrary *plug;
+ exported_functions_s *exported_funcs;
+ PLUGININFO *plugininfo;
+};
+
+#endif // MODULE_H_INCLUDED