From e6d086fd2db736892290b0dfd8b38e1f12c093be Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Fri, 15 Oct 2010 03:32:24 +0300 Subject: new file: api/pluginapi.h modified: core/core.cbp modified: core/main.cpp new file: core/modules.cpp new file: core/modules.h --- core/modules.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 core/modules.h (limited to 'core/modules.h') 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 -- cgit v1.2.3