summaryrefslogtreecommitdiff
path: root/plugins/YAPP/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-24 18:08:07 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-24 18:08:07 +0000
commit555ce4dfcc5b028219da4e6401a32f7f976044ae (patch)
tree77ad49c389f73170ae4ece6d79742e5dff00d1ec /plugins/YAPP/src
parentef62ee59a0cd7ce34af0f62fbe4768ac12320edb (diff)
plugins cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@6211 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAPP/src')
-rw-r--r--plugins/YAPP/src/message_pump.cpp2
-rw-r--r--plugins/YAPP/src/popwin.cpp43
-rw-r--r--plugins/YAPP/src/popwin.h1
3 files changed, 11 insertions, 35 deletions
diff --git a/plugins/YAPP/src/message_pump.cpp b/plugins/YAPP/src/message_pump.cpp
index a54c2cbba9..a08fb213f7 100644
--- a/plugins/YAPP/src/message_pump.cpp
+++ b/plugins/YAPP/src/message_pump.cpp
@@ -69,8 +69,6 @@ bool is_workstation_locked()
unsigned __stdcall MessagePumpThread(void* param)
{
- InitWindowStack();
-
if (param) SetEvent((HANDLE)param);
MSG hwndMsg = {0};
diff --git a/plugins/YAPP/src/popwin.cpp b/plugins/YAPP/src/popwin.cpp
index 5e2a766daf..abb3ba2010 100644
--- a/plugins/YAPP/src/popwin.cpp
+++ b/plugins/YAPP/src/popwin.cpp
@@ -1,11 +1,5 @@
#include "common.h"
-HMODULE hUserDll;
-BOOL (WINAPI *MySetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD) = 0;
-BOOL (WINAPI *MyAnimateWindow)(HWND hWnd,DWORD dwTime,DWORD dwFlags) = 0;
-HMONITOR (WINAPI *MyMonitorFromRect)(LPCRECT rect, DWORD flags) = 0;
-BOOL (WINAPI *MyGetMonitorInfo)(HMONITOR hMonitor, LPMONITORINFO mi) = 0;
-
#define ID_CLOSETIMER 0x0101
#define ID_MOVETIMER 0x0102
@@ -85,16 +79,16 @@ void AddWindowToStack(HWND hwnd) {
RECT wa_rect;
SystemParametersInfo(SPI_GETWORKAREA, 0, &wa_rect, 0);
- if (options.use_mim_monitor && MyMonitorFromRect && MyGetMonitorInfo)
+ if (options.use_mim_monitor)
{
RECT clr;
GetWindowRect((HWND)CallService(MS_CLUI_GETHWND, 0, 0), &clr);
- HMONITOR hMonitor = MyMonitorFromRect(&clr, MONITOR_DEFAULTTONEAREST);
+ HMONITOR hMonitor = MonitorFromRect(&clr, MONITOR_DEFAULTTONEAREST);
if (hMonitor)
{
MONITORINFO mi;
mi.cbSize = sizeof(mi);
- if (MyGetMonitorInfo(hMonitor, &mi))
+ if (GetMonitorInfo(hMonitor, &mi))
wa_rect = mi.rcWork;
}
}
@@ -276,16 +270,14 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
#endif
#ifdef LWA_ALPHA
- if (MySetLayeredWindowAttributes) {
- MySetLayeredWindowAttributes(hwnd, RGB(0,0,0), (int)(options.opacity / 100.0 * 255), LWA_ALPHA);
- if (options.trans_bg) {
- COLORREF bg;
- if (pd->colorBack == pd->colorText)
- bg = colBg;
- else
- bg = pd->colorBack;
- MySetLayeredWindowAttributes(hwnd, bg, 0, LWA_COLORKEY);
- }
+ SetLayeredWindowAttributes(hwnd, RGB(0,0,0), (int)(options.opacity / 100.0 * 255), LWA_ALPHA);
+ if (options.trans_bg) {
+ COLORREF bg;
+ if (pd->colorBack == pd->colorText)
+ bg = colBg;
+ else
+ bg = pd->colorBack;
+ SetLayeredWindowAttributes(hwnd, bg, 0, LWA_COLORKEY);
}
#endif
PostMessage(hwnd, UM_INITPOPUP, (WPARAM)hwnd, 0);
@@ -746,19 +738,6 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
-void InitWindowStack()
-{
- hUserDll = GetModuleHandle(_T("user32.dll"));
- if (hUserDll) {
- MySetLayeredWindowAttributes = (BOOL (WINAPI *)(HWND,COLORREF,BYTE,DWORD))GetProcAddress(hUserDll, "SetLayeredWindowAttributes");
- MyAnimateWindow=(BOOL (WINAPI*)(HWND,DWORD,DWORD))GetProcAddress(hUserDll,"AnimateWindow");
- MyMonitorFromRect=(HMONITOR (WINAPI*)(LPCRECT,DWORD))GetProcAddress(hUserDll, "MonitorFromRect");
- MyGetMonitorInfo=(BOOL (WINAPI*)(HMONITOR,LPMONITORINFO))GetProcAddress(hUserDll, "GetMonitorInfoW");
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
void PopupData::SetIcon(HICON hNewIcon)
{
if (flags & PDF_ICOLIB) {
diff --git a/plugins/YAPP/src/popwin.h b/plugins/YAPP/src/popwin.h
index d4b49b308c..c206ea2176 100644
--- a/plugins/YAPP/src/popwin.h
+++ b/plugins/YAPP/src/popwin.h
@@ -19,7 +19,6 @@
#define ANIMATE_HORZ 1
#define ANIMATE_VERT 2
-void InitWindowStack();
void DeinitWindowStack();
void BroadcastMessage(UINT msg, WPARAM wParam, LPARAM lParam);