summaryrefslogtreecommitdiff
path: root/plugins/Clist_blind
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-27 14:57:51 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-27 14:57:51 +0300
commit9ec3c7e78e560356066b272ad7a38d3d333de1b5 (patch)
treee72efa33a5af633cc83503efd31bdbc17ebf781e /plugins/Clist_blind
parent66ab99eb5b5c47a01e1cc6613af07426abbeb19b (diff)
global variable name standardization
Diffstat (limited to 'plugins/Clist_blind')
-rw-r--r--plugins/Clist_blind/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_blind/src/clistopts.cpp2
-rw-r--r--plugins/Clist_blind/src/cluiopts.cpp66
-rw-r--r--plugins/Clist_blind/src/init.cpp30
4 files changed, 50 insertions, 50 deletions
diff --git a/plugins/Clist_blind/src/clistmenus.cpp b/plugins/Clist_blind/src/clistmenus.cpp
index a9278b4009..741f21060c 100644
--- a/plugins/Clist_blind/src/clistmenus.cpp
+++ b/plugins/Clist_blind/src/clistmenus.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
INT_PTR CloseAction(WPARAM, LPARAM)
{
if (Miranda_OkToExit())
- DestroyWindow(g_CLI.hwndContactList);
+ DestroyWindow(g_clistApi.hwndContactList);
return 0;
}
diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp
index 142d70fb8d..eb0c7fb5e6 100644
--- a/plugins/Clist_blind/src/clistopts.cpp
+++ b/plugins/Clist_blind/src/clistopts.cpp
@@ -164,7 +164,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
Clist_TrayIconIconsChanged();
Clist_LoadContactTree(); /* this won't do job properly since it only really works when changes happen */
- g_CLI.pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID); /* force reshuffle */
+ g_clistApi.pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID); /* force reshuffle */
return TRUE;
}
break;
diff --git a/plugins/Clist_blind/src/cluiopts.cpp b/plugins/Clist_blind/src/cluiopts.cpp
index a3828746f9..56c397973e 100644
--- a/plugins/Clist_blind/src/cluiopts.cpp
+++ b/plugins/Clist_blind/src/cluiopts.cpp
@@ -170,52 +170,52 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
wchar_t title[256];
GetDlgItemText(hwndDlg, IDC_TITLETEXT, title, _countof(title));
db_set_ws(NULL, "CList", "TitleText", title);
- SetWindowText(g_CLI.hwndContactList, title);
+ SetWindowText(g_clistApi.hwndContactList, title);
}
- g_CLI.pfnLoadCluiGlobalOpts();
- SetWindowPos(g_CLI.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0,
+ g_clistApi.pfnLoadCluiGlobalOpts();
+ SetWindowPos(g_clistApi.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_ONTOP) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0,
SWP_NOMOVE | SWP_NOSIZE);
if (IsDlgButtonChecked(hwndDlg, IDC_TOOLWND)) {
// Window must be hidden to dynamically remove the taskbar button.
// See http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_programming/taskbar.asp
WINDOWPLACEMENT p;
p.length = sizeof(p);
- GetWindowPlacement(g_CLI.hwndContactList, &p);
- ShowWindow(g_CLI.hwndContactList, SW_HIDE);
- SetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE,
- GetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE) | WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE);
- SetWindowPlacement(g_CLI.hwndContactList, &p);
+ GetWindowPlacement(g_clistApi.hwndContactList, &p);
+ ShowWindow(g_clistApi.hwndContactList, SW_HIDE);
+ SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE,
+ GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) | WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE);
+ SetWindowPlacement(g_clistApi.hwndContactList, &p);
}
- else SetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE) & ~WS_EX_TOOLWINDOW);
+ else SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) & ~WS_EX_TOOLWINDOW);
if (IsDlgButtonChecked(hwndDlg, IDC_ONDESKTOP)) {
HWND hProgMan = FindWindowA("Progman", nullptr);
if (IsWindow(hProgMan))
- SetParent(g_CLI.hwndContactList, hProgMan);
+ SetParent(g_clistApi.hwndContactList, hProgMan);
}
- else SetParent(g_CLI.hwndContactList, nullptr);
+ else SetParent(g_clistApi.hwndContactList, nullptr);
if (IsDlgButtonChecked(hwndDlg, IDC_SHOWCAPTION))
- SetWindowLongPtr(g_CLI.hwndContactList, GWL_STYLE,
- GetWindowLongPtr(g_CLI.hwndContactList, GWL_STYLE) | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX);
+ SetWindowLongPtr(g_clistApi.hwndContactList, GWL_STYLE,
+ GetWindowLongPtr(g_clistApi.hwndContactList, GWL_STYLE) | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX);
else
- SetWindowLongPtr(g_CLI.hwndContactList, GWL_STYLE,
- GetWindowLongPtr(g_CLI.hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX));
+ SetWindowLongPtr(g_clistApi.hwndContactList, GWL_STYLE,
+ GetWindowLongPtr(g_clistApi.hwndContactList, GWL_STYLE) & ~(WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX));
if (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_SHOWMAINMENU))
- SetMenu(g_CLI.hwndContactList, nullptr);
+ SetMenu(g_clistApi.hwndContactList, nullptr);
else
- SetMenu(g_CLI.hwndContactList, g_CLI.hMenuMain);
- SetWindowPos(g_CLI.hwndContactList, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
- RedrawWindow(g_CLI.hwndContactList, nullptr, nullptr, RDW_FRAME | RDW_INVALIDATE);
- if (IsIconic(g_CLI.hwndContactList) && BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TOOLWND))
- ShowWindow(g_CLI.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY) ? SW_HIDE : SW_SHOW);
+ SetMenu(g_clistApi.hwndContactList, g_clistApi.hMenuMain);
+ SetWindowPos(g_clistApi.hwndContactList, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
+ RedrawWindow(g_clistApi.hwndContactList, nullptr, nullptr, RDW_FRAME | RDW_INVALIDATE);
+ if (IsIconic(g_clistApi.hwndContactList) && BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_TOOLWND))
+ ShowWindow(g_clistApi.hwndContactList, IsDlgButtonChecked(hwndDlg, IDC_MIN2TRAY) ? SW_HIDE : SW_SHOW);
if (IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT)) {
- SetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
- SetLayeredWindowAttributes(g_CLI.hwndContactList, RGB(0, 0, 0), (BYTE)db_get_b(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
+ SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetLayeredWindowAttributes(g_clistApi.hwndContactList, RGB(0, 0, 0), (BYTE)db_get_b(NULL, "CList", "AutoAlpha", SETTING_AUTOALPHA_DEFAULT), LWA_ALPHA);
}
- else SetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_CLI.hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
+ else SetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE, GetWindowLongPtr(g_clistApi.hwndContactList, GWL_EXSTYLE) & ~WS_EX_LAYERED);
- SendMessage(g_CLI.hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
+ SendMessage(g_clistApi.hwndContactTree, WM_SIZE, 0, 0); //forces it to send a cln_listsizechanged
return TRUE;
}
break;
@@ -274,22 +274,22 @@ static INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L
db_set_b(NULL, "CLUI", "SBarRightClk", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_RIGHTMIRANDA));
db_set_b(NULL, "CLUI", "EqualSections", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_EQUALSECTIONS));
db_set_b(NULL, "CLUI", "SBarBevel", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SBPANELBEVEL));
- g_CLI.pfnLoadCluiGlobalOpts();
+ g_clistApi.pfnLoadCluiGlobalOpts();
if (db_get_b(NULL, "CLUI", "ShowGrip", 1) != (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWGRIP)) {
- HWND parent = GetParent(g_CLI.hwndStatus);
+ HWND parent = GetParent(g_clistApi.hwndStatus);
int flags = WS_CHILD | CCS_BOTTOM;
db_set_b(NULL, "CLUI", "ShowGrip", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWGRIP));
- ShowWindow(g_CLI.hwndStatus, SW_HIDE);
- DestroyWindow(g_CLI.hwndStatus);
+ ShowWindow(g_clistApi.hwndStatus, SW_HIDE);
+ DestroyWindow(g_clistApi.hwndStatus);
flags |= db_get_b(NULL, "CLUI", "ShowSBar", 1) ? WS_VISIBLE : 0;
flags |= db_get_b(NULL, "CLUI", "ShowGrip", 1) ? SBARS_SIZEGRIP : 0;
- g_CLI.hwndStatus = CreateWindow(STATUSCLASSNAME, nullptr, flags, 0, 0, 0, 0, parent, nullptr, g_plugin.getInst(), nullptr);
+ g_clistApi.hwndStatus = CreateWindow(STATUSCLASSNAME, nullptr, flags, 0, 0, 0, 0, parent, nullptr, g_plugin.getInst(), nullptr);
}
if (IsDlgButtonChecked(hwndDlg, IDC_SHOWSBAR))
- ShowWindow(g_CLI.hwndStatus, SW_SHOW);
+ ShowWindow(g_clistApi.hwndStatus, SW_SHOW);
else
- ShowWindow(g_CLI.hwndStatus, SW_HIDE);
- SendMessage(g_CLI.hwndContactList, WM_SIZE, 0, 0);
+ ShowWindow(g_clistApi.hwndStatus, SW_HIDE);
+ SendMessage(g_clistApi.hwndContactList, WM_SIZE, 0, 0);
return TRUE;
}
break;
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp
index 676be214fb..a4f2527ad5 100644
--- a/plugins/Clist_blind/src/init.cpp
+++ b/plugins/Clist_blind/src/init.cpp
@@ -109,7 +109,7 @@ static int OnOptsInit(WPARAM wParam, LPARAM lParam)
static INT_PTR GetStatusMode(WPARAM, LPARAM)
{
- return g_CLI.currentDesiredStatusMode;
+ return g_clistApi.currentDesiredStatusMode;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -121,19 +121,19 @@ extern "C" int __declspec(dllexport) CListInitialise()
g_bSortByProto = db_get_b(NULL, "CList", "SortByProto", SETTING_SORTBYPROTO_DEFAULT);
Clist_GetInterface();
- coreCli = g_CLI;
- g_CLI.hInst = g_plugin.getInst();
- g_CLI.pfnPaintClc = PaintClc;
- g_CLI.pfnContactListWndProc = ContactListWndProc;
- g_CLI.pfnContactListControlWndProc = ContactListControlWndProc;
- g_CLI.pfnRebuildEntireList = RebuildEntireList;
- g_CLI.pfnSetGroupExpand = SetGroupExpand;
- g_CLI.pfnRecalcScrollBar = RecalcScrollBar;
- g_CLI.pfnScrollTo = ScrollTo;
- g_CLI.pfnLoadClcOptions = LoadClcOptions;
- g_CLI.pfnGetRowHeight = GetRowHeight;
- g_CLI.pfnSortCLC = SortCLC;
- g_CLI.pfnCompareContacts = CompareContacts;
+ coreCli = g_clistApi;
+ g_clistApi.hInst = g_plugin.getInst();
+ g_clistApi.pfnPaintClc = PaintClc;
+ g_clistApi.pfnContactListWndProc = ContactListWndProc;
+ g_clistApi.pfnContactListControlWndProc = ContactListControlWndProc;
+ g_clistApi.pfnRebuildEntireList = RebuildEntireList;
+ g_clistApi.pfnSetGroupExpand = SetGroupExpand;
+ g_clistApi.pfnRecalcScrollBar = RecalcScrollBar;
+ g_clistApi.pfnScrollTo = ScrollTo;
+ g_clistApi.pfnLoadClcOptions = LoadClcOptions;
+ g_clistApi.pfnGetRowHeight = GetRowHeight;
+ g_clistApi.pfnSortCLC = SortCLC;
+ g_clistApi.pfnCompareContacts = CompareContacts;
CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode);
@@ -383,7 +383,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
KillTimer(hwnd, TIMERID_INFOTIP);
KillTimer(hwnd, TIMERID_RENAME);
dat->szQuickSearch[0] = 0;
- g_CLI.pfnInvalidateRect(hwnd, nullptr, FALSE);
+ g_clistApi.pfnInvalidateRect(hwnd, nullptr, FALSE);
Clist_EnsureVisible(hwnd, (ClcData*)dat, dat->selection, 0);
UpdateWindow(hwnd);
break;