1: /*
2: ============================================================================
3: xoblite™ -> an advanced "extended shell" for Microsoft® Windows® 11
4: Copyright © 2002-2026 Karl Henrik Henriksson [qwilk/@xoblite]
5: Copyright © 2001-2004 The Blackbox for Windows Development Team
6: http://xoblite.net/ + https://github.com/xoblite/
7: ============================================================================
8:
9: Blackbox for Windows is free software, released under the
10: GNU General Public License (GPL version 2 or later), with an extension
11: that allows linking of proprietary modules under a controlled interface.
12: What this means is that plugins etc. are allowed to be released
13: under any license the author wishes. Please note, however, that the
14: original Blackbox gradient math code used in Blackbox for Windows
15: is available under the BSD license.
16:
17: http://www.fsf.org/licenses/gpl.html
18: http://www.fsf.org/licenses/gpl-faq.html#LinkingOverControlledInterface
19: http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5
20:
21: This program is distributed in the hope that it will be useful,
22: but WITHOUT ANY WARRANTY; without even the implied warranty of
23: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24: GNU General Public License for more details.
25:
26: For additional license information, please read the included license.html.
27:
28: ============================================================================
29: */
30:
31: #ifndef __PLUGINMANAGER_H
32: #define __PLUGINMANAGER_H
33:
34: #include "..\Settings\Settings.h"
35: #include "..\Menu\Menu.h"
36:
37: #include <vector>
38: #include <string>
39: #include <windows.h>
40: #include <stdio.h>
41: #include <commdlg.h>
42: #include <wininet.h>
43: #include <locale.h>
44:
45: using namespace std;
46:
47: typedef int (*beginPluginExFunc)(HINSTANCE, HWND);
48: typedef int (*beginPluginFunc)(HINSTANCE);
49: typedef int (*beginSlitPluginFunc)(HINSTANCE, HWND);
50: typedef int (*endPluginFunc)(HINSTANCE);
51: typedef LPCSTR (*pluginInfoFunc)(int);
52:
53: typedef struct
54: {
55: HMODULE hModule;
56: char path[MAX_LINE_LENGTH];
57: bool DockingEnabled;
58: bool UpdateAvailable;
59: } pluginItem;
60:
61: typedef vector<pluginItem> PluginsVector;
62:
63: //===========================================================================
64:
65: class PluginManager
66: {
67: public:
68: PluginManager(HINSTANCE);
69: ~PluginManager();
70:
71: bool LoadPlugin(LPSTR pluginPath);
72: bool StartPlugin(HMODULE hModule, LPSTR pluginPath, bool dockingEnabled);
73: void UnloadPlugin(LPSTR pluginPath, int pluginNumber);
74:
75: void UpdatePlugin(LPSTR pluginPath, int pluginNumber, bool forceUpdate);
76:
77: void AboutPlugins();
78: LPCSTR GetPluginInfo(int pluginNumber, int infoParam);
79: bool WritePluginsRC();
80: void LoadPluginDialog();
81:
82: bool IsPluginLoaded(LPSTR pluginPath);
83:
84: PluginsVector pluginList;
85:
86: bool startupLock;
87: char pluginName[MAX_LINE_LENGTH];
88:
89: //private:
90: HINSTANCE hModule;
91: beginPluginExFunc beginPluginEx;
92: beginPluginFunc beginPlugin;
93: beginSlitPluginFunc beginSlitPlugin;
94: endPluginFunc endPlugin;
95: pluginInfoFunc pluginInfo;
96: };
97:
98: void checkForUpdates(void *param);
99: void periodicCheckForUpdates(void *);
100:
101: //===========================================================================
102:
103: #endif /* __PLUGINMANAGER_H */
104: