summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar/main.cpp
blob: 7eb6c653f2d40298f961e12fb9502a53b5b93590 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

#include "common.h"
#include "version.h"

HINSTANCE hInst;

HANDLE hHookTTBModuleLoaded;
int hLangpack;

#define MIID_TTB {0xf593c752, 0x51d8, 0x4d46, {0xba, 0x27, 0x37, 0x57, 0x79, 0x53, 0xf5, 0x5c}}

BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
	hInst = hinstDLL;
	return TRUE;
}

/////////////////////////////////////////////////////////////////////////////////////////

PLUGININFOEX pluginInfo  =
{
	sizeof(PLUGININFOEX),
	__PLUGIN_NAME,
	PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
	__PLUGIN_DESC,
	__PLUGIN_AUTHOR,
	__PLUGIN_EMAIL,
	__PLUGIN_RIGHTS,
	__PLUGIN_AUTHORWEB,
	UNICODE_AWARE, 		//doesn't replace anything built-in
	MIID_TTB
};

extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
	return &pluginInfo;
}

/////////////////////////////////////////////////////////////////////////////////////////

extern "C" int __declspec(dllexport) Load(void)
{

	mir_getLP(&pluginInfo);

	LoadToolbarModule();

	hHookTTBModuleLoaded = CreateHookableEvent(ME_TTB_MODULELOADED);
	return 0;
}

/////////////////////////////////////////////////////////////////////////////////////////

extern "C" int __declspec(dllexport) Unload(void)
{
	UnLoadInternalButtons();
	UnloadToolbarModule();

	DestroyHookableEvent(hHookTTBModuleLoaded);
	return 0;
}