diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-28 12:41:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-28 12:41:49 +0000 |
commit | dcab83811dfb2d8f2a64c606995cd8ca35c1f6bb (patch) | |
tree | 3806b1c86a1791ce8b406672765ff4abeffa5a80 /src | |
parent | 19e55c9c066703b870c116740821cc6727e72697 (diff) |
2 static functions removed from CLIST_INTERFACE.
git-svn-id: http://svn.miranda-ng.org/main/trunk@16881 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/clc.cpp | 18 | ||||
-rw-r--r-- | src/mir_app/src/clc.h | 14 | ||||
-rw-r--r-- | src/mir_app/src/clcidents.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/clcitems.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/clcmsgs.cpp | 20 | ||||
-rw-r--r-- | src/mir_app/src/clcutils.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 2 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 2 |
9 files changed, 41 insertions, 41 deletions
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 9f3f8c46c4..26bfc36841 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -497,7 +497,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam if (!cli.pfnFindItem(hwnd, dat, wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (UINT_PTR)cli.pfnContactToHItem(selcontact);
+ hSelItem = Clist_ContactToHItem(selcontact);
cli.pfnAddContactToTree(hwnd, dat, wParam, (style & CLS_CONTACTLIST) == 0, 0);
cli.pfnFindItem(hwnd, dat, wParam, &contact, NULL, NULL);
if (contact) {
@@ -512,7 +512,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (UINT_PTR)cli.pfnContactToHItem(selcontact);
+ hSelItem = Clist_ContactToHItem(selcontact);
cli.pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
}
else {
@@ -779,7 +779,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
}
else {
@@ -868,7 +868,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam it.isGroup = contact->type == CLCIT_GROUP;
it.hItem = (contact->type == CLCIT_GROUP) ? (HANDLE)contact->groupId : (HANDLE)contact->hContact;
it.cbSize = sizeof(it);
- dat->hInfoTipItem = cli.pfnContactToHItem(contact);
+ dat->hInfoTipItem = Clist_ContactToHItem(contact);
NotifyEventHooks(hShowInfoTipEvent, 0, (LPARAM)&it);
}
break;
@@ -942,7 +942,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
}
if (!(hitFlags & (CLCHT_ONITEMICON | CLCHT_ONITEMLABEL | CLCHT_ONITEMCHECK))) {
@@ -954,7 +954,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam if (hit == -1)
nm.hItem = NULL;
else
- nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
nm.iColumn = hitFlags & CLCHT_ONITEMEXTRA ? HIBYTE(HIWORD(hitFlags)) : -1;
nm.pt = dat->ptDragStart;
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
@@ -1029,7 +1029,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
dat->dragStage &= ~DRAGSTAGEF_OUTSIDE;
}
@@ -1066,7 +1066,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
nm.pt = pt;
if (SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm))
return 0;
@@ -1141,7 +1141,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
nm.flags = 0;
- nm.hItem = cli.pfnContactToItemHandle(contact, &nm.flags);
+ nm.hItem = Clist_ContactToItemHandle(contact, &nm.flags);
nm.pt = pt;
SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)& nm);
}
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index ba2c718153..1ab8c2fefb 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -39,18 +39,16 @@ extern int g_IconWidth, g_IconHeight; extern MWindowList hClcWindowList;
extern HIMAGELIST hCListImages;
-void fnClcOptionsChanged(void);
-void fnClcBroadcast(int msg, WPARAM wParam, LPARAM lParam);
-void fnInitAutoRebuild(HWND hWnd);
+void fnClcOptionsChanged(void);
+void fnClcBroadcast(int msg, WPARAM wParam, LPARAM lParam);
+void fnInitAutoRebuild(HWND hWnd);
LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
/* clcidents.c */
-int fnGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
-int fnFindItem(HWND hwnd, struct ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible);
-int fnGetRowByIndex(struct ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup);
-HANDLE fnContactToHItem(ClcContact *contact);
-HANDLE fnContactToItemHandle(ClcContact *contact, DWORD *nmFlags);
+int fnGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
+int fnFindItem(HWND hwnd, struct ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible);
+int fnGetRowByIndex(struct ClcData *dat, int testindex, ClcContact **contact, ClcGroup **subgroup);
/* clcitems.c */
ClcGroup* fnAddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
diff --git a/src/mir_app/src/clcidents.cpp b/src/mir_app/src/clcidents.cpp index a287626133..fe310a8c97 100644 --- a/src/mir_app/src/clcidents.cpp +++ b/src/mir_app/src/clcidents.cpp @@ -176,20 +176,20 @@ int fnGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGroup return -1;
}
-HANDLE fnContactToHItem(ClcContact *contact)
+MIR_APP_DLL(DWORD) Clist_ContactToHItem(ClcContact *contact)
{
switch (contact->type) {
case CLCIT_CONTACT:
- return (HANDLE)contact->hContact;
+ return contact->hContact;
case CLCIT_GROUP:
- return (HANDLE)(contact->groupId | HCONTACT_ISGROUP);
+ return contact->groupId | HCONTACT_ISGROUP;
case CLCIT_INFO:
- return (HANDLE)((UINT_PTR)contact->hContact | HCONTACT_ISINFO);
+ return contact->hContact | HCONTACT_ISINFO;
}
return NULL;
}
-HANDLE fnContactToItemHandle(ClcContact *contact, DWORD *nmFlags)
+MIR_APP_DLL(HANDLE) Clist_ContactToItemHandle(ClcContact *contact, DWORD *nmFlags)
{
switch (contact->type) {
case CLCIT_CONTACT:
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index 772eecfb54..37ddd166ee 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -343,7 +343,7 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) dat->list.expanded = 1; dat->list.hideOffline = db_get_b(NULL, "CLC", "HideOfflineRoot", 0) && (style & CLS_USEGROUPS); dat->list.cl.destroy(); - dat->list.totalMembers = 0;
+ dat->list.totalMembers = 0; dat->selection = -1; for (int i = 1;; i++) { @@ -357,9 +357,9 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { if (style & CLS_SHOWHIDDEN || !db_get_b(hContact, "CList", "Hidden", 0)) { ClcGroup *group; - ptrT tszGroupName(db_get_tsa(hContact, "CList", "Group"));
- if (tszGroupName == NULL)
- group = &dat->list;
+ ptrT tszGroupName(db_get_tsa(hContact, "CList", "Group")); + if (tszGroupName == NULL) + group = &dat->list; else { group = cli.pfnAddGroup(hwnd, dat, tszGroupName, (DWORD)-1, 0, 0); if (group == NULL && style & CLS_SHOWHIDDEN) @@ -550,7 +550,7 @@ void fnSortCLC(HWND hwnd, ClcData *dat, int useInsertionSort) if (cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) == -1) hSelItem = NULL; else - hSelItem = (UINT_PTR)cli.pfnContactToHItem(selcontact); + hSelItem = Clist_ContactToHItem(selcontact); group->scanIndex = 0; SortGroup(dat, group, useInsertionSort); for (;;) { diff --git a/src/mir_app/src/clcmsgs.cpp b/src/mir_app/src/clcmsgs.cpp index b433ab3e7c..bd9bd1a4b7 100644 --- a/src/mir_app/src/clcmsgs.cpp +++ b/src/mir_app/src/clcmsgs.cpp @@ -191,7 +191,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar case CLM_GETNEXTITEM:
if (wParam == CLGN_ROOT) {
if (dat->list.cl.getCount())
- return (LRESULT)cli.pfnContactToHItem(dat->list.cl[0]);
+ return Clist_ContactToHItem(dat->list.cl[0]);
return NULL;
}
@@ -206,7 +206,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar group = contact->group;
if (group->cl.getCount() == 0)
return NULL;
- return (LRESULT)cli.pfnContactToHItem(group->cl[0]);
+ return Clist_ContactToHItem(group->cl[0]);
case CLGN_PARENT:
return group->groupId | HCONTACT_ISGROUP;
@@ -216,14 +216,14 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar if (++i >= group->cl.getCount())
return NULL;
} while (group->cl[i]->type == CLCIT_DIVIDER);
- return (LRESULT)cli.pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
case CLGN_PREVIOUS:
do {
if (--i < 0)
return NULL;
} while (group->cl[i]->type == CLCIT_DIVIDER);
- return (LRESULT)cli.pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
case CLGN_NEXTCONTACT:
for (i++; i < group->cl.getCount(); i++)
@@ -231,7 +231,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar break;
if (i >= group->cl.getCount())
return NULL;
- return (LRESULT)cli.pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
case CLGN_PREVIOUSCONTACT:
if (i >= group->cl.getCount())
@@ -241,7 +241,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar break;
if (i < 0)
return NULL;
- return (LRESULT)cli.pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
case CLGN_NEXTGROUP:
for (i++; i < group->cl.getCount(); i++)
@@ -249,7 +249,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar break;
if (i >= group->cl.getCount())
return NULL;
- return (LRESULT)cli.pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
case CLGN_PREVIOUSGROUP:
if (i >= group->cl.getCount())
@@ -259,7 +259,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar break;
if (i < 0)
return NULL;
- return (LRESULT)cli.pfnContactToHItem(group->cl[i]);
+ return Clist_ContactToHItem(group->cl[i]);
}
return NULL;
@@ -269,7 +269,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar case CLM_GETSELECTION:
if (cli.pfnGetRowByIndex(dat, dat->selection, &contact, NULL) == -1)
return NULL;
- return (LRESULT)cli.pfnContactToHItem(contact);
+ return Clist_ContactToHItem(contact);
case CLM_GETTEXTCOLOR:
if (wParam > FONTID_MAX)
@@ -285,7 +285,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar if (hit == -1)
return NULL;
}
- return (LRESULT)cli.pfnContactToHItem(contact);
+ return Clist_ContactToHItem(contact);
case CLM_SELECTITEM:
if (!cli.pfnFindItem(hwnd, dat, wParam, &contact, &group, NULL))
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index da0f86b0ad..b8cdb04f8f 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -635,8 +635,8 @@ void fnHideInfoTip(HWND, ClcData *dat) return;
CLCINFOTIP it = { 0 };
- it.isGroup = IsHContactGroup((UINT_PTR)dat->hInfoTipItem);
- it.hItem = (HANDLE)((UINT_PTR)dat->hInfoTipItem & ~HCONTACT_ISGROUP);
+ it.isGroup = IsHContactGroup(dat->hInfoTipItem);
+ it.hItem = (HANDLE)(dat->hInfoTipItem & ~HCONTACT_ISGROUP);
it.cbSize = sizeof(it);
dat->hInfoTipItem = NULL;
NotifyEventHooks(hHideInfoTipEvent, 0, (LPARAM)&it);
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index 70b8ef420c..7fc033e22c 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -81,8 +81,6 @@ static INT_PTR srvRetrieveInterface(WPARAM, LPARAM) cli.pfnGetRowsPriorTo = fnGetRowsPriorTo;
cli.pfnFindItem = fnFindItem;
cli.pfnGetRowByIndex = fnGetRowByIndex;
- cli.pfnContactToHItem = fnContactToHItem;
- cli.pfnContactToItemHandle = fnContactToItemHandle;
cli.pfnAddGroup = fnAddGroup;
cli.pfnAddItemToGroup = fnAddItemToGroup;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 83558a0ecf..07184f4596 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -260,3 +260,5 @@ Clist_GroupRename @258 Clist_EndRebuild @259
Clist_GroupAdded @260
Contact_GetInfo @261
+Clist_ContactToHItem @262
+Clist_ContactToItemHandle @263
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index e4d27302d3..962847263d 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -260,3 +260,5 @@ Clist_GroupRename @258 Clist_EndRebuild @259
Clist_GroupAdded @260
Contact_GetInfo @261
+Clist_ContactToHItem @262
+Clist_ContactToItemHandle @263
|