summaryrefslogtreecommitdiff
path: root/core/modules.h
blob: d4a79296af7ca33c50e293da17f3706381a9ebeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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