summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_aniavatars.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-23 23:29:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-23 23:29:25 +0300
commit176e52e14fd0358a7f26ca8d7b0205244dfde2e7 (patch)
tree10da2f8951d20103af0215c38d07ea96ba61c191 /plugins/Clist_modern/src/modern_aniavatars.cpp
parent91b13500b47a51f3a284d9f409b7b8dac167a06d (diff)
no need to initialize pcli variable in each plugin (only in Clist_*)
Diffstat (limited to 'plugins/Clist_modern/src/modern_aniavatars.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_aniavatars.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp
index b9e2d04ab6..7cfd68746a 100644
--- a/plugins/Clist_modern/src/modern_aniavatars.cpp
+++ b/plugins/Clist_modern/src/modern_aniavatars.cpp
@@ -229,7 +229,7 @@ static void CALLBACK _AniAva_SyncCallerUserAPCProc(DWORD_PTR dwParam)
static INT_PTR _AniAva_CreateAvatarWindowSync_Worker(WPARAM tszName, LPARAM)
{
HWND hwnd = CreateWindowEx(WS_EX_TOPMOST | WS_EX_TRANSPARENT | WS_EX_NOPARENTNOTIFY, ANIAVAWINDOWCLASS,
- (wchar_t*)tszName, WS_POPUP, 0, 0, 1, 1, pcli->hwndContactList, nullptr, pcli->hInst, nullptr);
+ (wchar_t*)tszName, WS_POPUP, 0, 0, 1, 1, g_CLI.hwndContactList, nullptr, g_CLI.hInst, nullptr);
return (INT_PTR)hwnd;
}
@@ -474,9 +474,9 @@ static void _AniAva_LoadOptions()
static void _AniAva_InvalidateParent(ANIAVA_WINDOWINFO * dat)
{
if (!IMMEDIATE_DRAW) return;
- HWND hwndParent = pcli->hwndContactTree;
+ HWND hwndParent = g_CLI.hwndContactTree;
RECT rcPos = dat->rcPos;
- pcli->pfnInvalidateRect(hwndParent, &rcPos, FALSE);
+ g_CLI.pfnInvalidateRect(hwndParent, &rcPos, FALSE);
}
static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent = nullptr, RECT *rcInParent = nullptr)
@@ -571,7 +571,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent = nullpt
// intersect visible area
// update layered window
- GetWindowRect(pcli->hwndContactTree, &clistRect);
+ GetWindowRect(g_CLI.hwndContactTree, &clistRect);
if (dat->rcPos.top < 0) {
pt_from.y += -dat->rcPos.top;
szWnd.cy += dat->rcPos.top;
@@ -596,7 +596,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent = nullpt
exStyle |= WS_EX_LAYERED;
SetWindowLongPtr(dat->hWindow, GWL_EXSTYLE, exStyle);
if (!IMMEDIATE_DRAW)
- SetWindowPos(pcli->hwndContactTree, dat->hWindow, 0, 0, 0, 0, SWP_ASYNCWINDOWPOS | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
+ SetWindowPos(g_CLI.hwndContactTree, dat->hWindow, 0, 0, 0, 0, SWP_ASYNCWINDOWPOS | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSENDCHANGING);
UpdateLayeredWindow(dat->hWindow, hDC_animation, &ptWnd, &szWnd, copyFromDC, &pt_from, RGB(0, 0, 0), &bf, ULW_ALPHA);
}
@@ -695,10 +695,10 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
if (dat->bOrderTop)
SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_ASYNCWINDOWPOS);
else {
- LONG exStyle = GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE);
- SetWindowPos(pcli->hwndContactList, hwnd, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ LONG exStyle = GetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE);
+ SetWindowPos(g_CLI.hwndContactList, hwnd, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
if (!(exStyle & WS_EX_TOPMOST))
- SetWindowPos(pcli->hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ SetWindowPos(g_CLI.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
}
return 0;
@@ -710,10 +710,10 @@ static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
if (dat->bOrderTop)
SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_ASYNCWINDOWPOS);
else {
- LONG exStyle = GetWindowLongPtr(pcli->hwndContactList, GWL_EXSTYLE);
- SetWindowPos(pcli->hwndContactList, hwnd, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ LONG exStyle = GetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE);
+ SetWindowPos(g_CLI.hwndContactList, hwnd, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
if (!(exStyle&WS_EX_TOPMOST))
- SetWindowPos(pcli->hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+ SetWindowPos(g_CLI.hwndContactList, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
}
}
@@ -915,7 +915,7 @@ int AniAva_SetAvatarPos(MCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha
_itoa((int)hContact, szName + 10, 16);
HWND hwnd = _AniAva_CreateAvatarWindowSync(_A2T(szName));
- HWND parent = GetAncestor(pcli->hwndContactList, GA_PARENT);
+ HWND parent = GetAncestor(g_CLI.hwndContactList, GA_PARENT);
pai->hWindow = hwnd;
SendMessage(hwnd, AAM_SETPARENT, (WPARAM)parent, 0);
@@ -957,7 +957,7 @@ int AniAva_UpdateOptions()
}
if (bReloadAvatars)
- PostMessage(pcli->hwndContactTree, INTM_AVATARCHANGED, 0, 0);
+ PostMessage(g_CLI.hwndContactTree, INTM_AVATARCHANGED, 0, 0);
else
AniAva_RedrawAllAvatars(TRUE);
return 0;
@@ -970,7 +970,7 @@ void AniAva_UpdateParent()
{
aacheck;
mir_cslock lck(s_CS);
- HWND parent = GetAncestor(pcli->hwndContactList, GA_PARENT);
+ HWND parent = GetAncestor(g_CLI.hwndContactList, GA_PARENT);
for (auto &it : s_Objects)
SendMessage(it->hWindow, AAM_SETPARENT, (WPARAM)parent, 0);
}