From ba1083b4da33ca44a5ae7d90eabbe3d6d340a81e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 17 May 2018 16:47:04 +0300 Subject: XSoundNotify, YAPP, YaRelay, ZeroSwitch, ZeroNotify -> CMPlugin --- plugins/YAPP/src/yapp.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'plugins/YAPP/src/yapp.cpp') diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp index abf01aeb67..c00ce0989c 100644 --- a/plugins/YAPP/src/yapp.cpp +++ b/plugins/YAPP/src/yapp.cpp @@ -3,7 +3,7 @@ #include "stdafx.h" -HMODULE hInst = nullptr; +CMPlugin g_plugin; bool bShutdown = false; MNOTIFYLINK *notifyLink = nullptr; @@ -28,7 +28,10 @@ HANDLE hTTButton; // menu items HGENMENU hMenuRoot, hMenuItem, hMenuItemHistory; -PLUGININFOEX pluginInfo={ +///////////////////////////////////////////////////////////////////////////////////////// + +PLUGININFOEX pluginInfo = +{ sizeof(PLUGININFOEX), __PLUGIN_NAME, PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), @@ -41,18 +44,14 @@ PLUGININFOEX pluginInfo={ {0xefd15f16, 0x7ae4, 0x40d7, {0xa8, 0xe3, 0xa4, 0x11, 0xed, 0x74, 0x7b, 0xd5}} }; -BOOL WINAPI DllMain(HMODULE hModule, DWORD, LPVOID) -{ - hInst = hModule; - return TRUE; -} - extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; } -int ReloadFont(WPARAM, LPARAM) +///////////////////////////////////////////////////////////////////////////////////////// + +static int ReloadFont(WPARAM, LPARAM) { LOGFONT log_font; if (hFontFirstLine) DeleteObject(hFontFirstLine); @@ -72,7 +71,7 @@ int ReloadFont(WPARAM, LPARAM) return 0; } -int TTBLoaded(WPARAM, LPARAM) +static int TTBLoaded(WPARAM, LPARAM) { TTBButton ttb = {}; ttb.pszService = "Popup/EnableDisableMenuCommand"; @@ -163,7 +162,7 @@ static void InitFonts() ReloadFont(0, 0); } -void InitMenuItems(void) +static void InitMenuItems(void) { bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1; @@ -187,7 +186,7 @@ void InitMenuItems(void) hMenuItem = Menu_AddMainMenuItem(&mi); } -int ModulesLoaded(WPARAM, LPARAM) +static int ModulesLoaded(WPARAM, LPARAM) { MNotifyGetLink(); @@ -205,7 +204,7 @@ int ModulesLoaded(WPARAM, LPARAM) return 0; } -int PreShutdown(WPARAM, LPARAM) +static int PreShutdown(WPARAM, LPARAM) { bShutdown = true; DeinitMessagePump(); @@ -229,6 +228,8 @@ extern "C" int __declspec(dllexport) Load(void) return 0; } +///////////////////////////////////////////////////////////////////////////////////////// + extern "C" int __declspec(dllexport) Unload() { DeleteObject(hFontFirstLine); -- cgit v1.2.3