diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-06 21:25:07 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-06 21:25:07 +0300 |
commit | 4f5b5ef8c908156bd30d5bb391c1e238cbcc2f0c (patch) | |
tree | 425ddf661b958e7a10c8b955105b267ea9252135 | |
parent | aba87b6bcc2158bc7a070ce4027aee687d554d77 (diff) |
CLIST_INTERFACE::pfnRemoveItemFromGroup => Clist_RemoveItemFromGroup
CLIST_INTERFACE::pfnFreeGroup => suspended
-rw-r--r-- | include/delphi/m_clistint.inc | 4 | ||||
-rw-r--r-- | include/m_clistint.h | 83 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 154938 -> 155212 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 150072 -> 150322 bytes | |||
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clc.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/clc.h | 4 | ||||
-rw-r--r-- | src/mir_app/src/clcitems.cpp | 14 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 |
12 files changed, 63 insertions, 62 deletions
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc index 8883c966d4..d89db6b8dd 100644 --- a/include/delphi/m_clistint.inc +++ b/include/delphi/m_clistint.inc @@ -317,10 +317,10 @@ type (* clcitems.c *)
pfnCreateClcContact : function :PClcContact; cdecl;
pfnAddGroup : function (hwnd:HWND; var dat:TClcData; szName:TChar; flags:dword; groupId:int; calcTotalMembers:int):PClcGroup; cdecl;
- pfnRemoveItemFromGroup : function (hwnd:HWND; var group:TClcGroup; var contact:TClcContact; updateTotalCount:int):PClcGroup; cdecl;
+ blablablabla23 : procedure; cdecl;
pfnFreeContact : procedure (var contact:TClcContact); cdecl;
- pfnFreeGroup : procedure (var group:TClcGroup); cdecl;
+ blablablabla22 : procedure; cdecl;
pfnAddInfoItemToGroup : function (var group:TClcGroup; flags:int; pszText:TChar):PClcContact; cdecl;
pfnAddItemToGroup : function (var group:TClcGroup; iAboveItem:int):PClcContact; cdecl;
diff --git a/include/m_clistint.h b/include/m_clistint.h index b5f0ae991e..86b504f70b 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -246,44 +246,45 @@ struct MenuProto /////////////////////////////////////////////////////////////////////////////////////////
// functions
-EXTERN_C MIR_APP_DLL(DWORD) Clist_ContactToHItem(ClcContact *contact);
-EXTERN_C MIR_APP_DLL(HANDLE) Clist_ContactToItemHandle(ClcContact *contact, DWORD *nmFlags);
-
-EXTERN_C MIR_APP_DLL(void) Clist_Broadcast(int msg, WPARAM wParam, LPARAM lParam);
-EXTERN_C MIR_APP_DLL(void) Clist_BroadcastAsync(int msg, WPARAM wParam, LPARAM lParam);
-
-EXTERN_C MIR_APP_DLL(void) Clist_CalcEipPosition(ClcData *dat, ClcContact *contact, ClcGroup *group, POINT *result);
-EXTERN_C MIR_APP_DLL(void) Clist_ChangeContactIcon(MCONTACT hContact, int iIcon);
-EXTERN_C MIR_APP_DLL(int) Clist_ClcStatusToPf2(int status);
-EXTERN_C MIR_APP_DLL(void) Clist_DeleteFromContactList(HWND hwnd, ClcData *dat);
-EXTERN_C MIR_APP_DLL(void) Clist_DeleteItemFromTree(HWND hwnd, MCONTACT hItem);
-EXTERN_C MIR_APP_DLL(void) Clist_DoSelectionDefaultAction(HWND hwnd, ClcData *dat);
-EXTERN_C MIR_APP_DLL(void) Clist_DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, HICON eventIcon);
-EXTERN_C MIR_APP_DLL(void) Clist_EndRename(ClcData *dat, int save);
-EXTERN_C MIR_APP_DLL(void) Clist_EnsureVisible(HWND hwnd, ClcData *dat, int iItem, int partialOk);
-EXTERN_C MIR_APP_DLL(int) Clist_EventsProcessTrayDoubleClick(int index);
-EXTERN_C MIR_APP_DLL(bool) Clist_FindItem(HWND hwnd, ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible);
-EXTERN_C MIR_APP_DLL(DWORD) Clist_GetDefaultExStyle(void);
-EXTERN_C MIR_APP_DLL(void) Clist_GetFontSetting(int i, LOGFONT *lf, COLORREF *colour);
-EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GetGroupCountsText(ClcData *dat, ClcContact *contact);
-EXTERN_C MIR_APP_DLL(void) Clist_HideInfoTip(ClcData *dat);
-EXTERN_C MIR_APP_DLL(void) Clist_InitAutoRebuild(HWND hWnd);
-EXTERN_C MIR_APP_DLL(void) Clist_InvalidateItem(HWND hwnd, ClcData *dat, int iItem);
-EXTERN_C MIR_APP_DLL(int) Clist_IsHiddenMode(ClcData *dat, int status);
-EXTERN_C MIR_APP_DLL(void) Clist_LoadContactTree(void);
-EXTERN_C MIR_APP_DLL(void) Clist_NotifyNewContact(HWND hwnd, MCONTACT hContact);
-EXTERN_C MIR_APP_DLL(void) Clist_RecalculateGroupCheckboxes(ClcData *dat);
-EXTERN_C MIR_APP_DLL(void) Clist_SaveStateAndRebuildList(HWND hwnd, ClcData *dat);
-EXTERN_C MIR_APP_DLL(void) Clist_SetGroupChildCheckboxes(ClcGroup *group, int checked);
-
-EXTERN_C MIR_APP_DLL(int) Clist_TrayIconAdd(HWND hwnd, const char *szProto, const char *szIconProto, int status);
-EXTERN_C MIR_APP_DLL(int) Clist_TrayIconDestroy(HWND hwnd);
-EXTERN_C MIR_APP_DLL(void) Clist_TrayIconIconsChanged(void);
-EXTERN_C MIR_APP_DLL(wchar_t*) Clist_TrayIconMakeTooltip(const wchar_t *szPrefix, const char *szProto);
-EXTERN_C MIR_APP_DLL(void) Clist_TrayIconRemove(HWND hwnd, const char *szProto);
-EXTERN_C MIR_APP_DLL(int) Clist_TrayIconSetBaseInfo(HICON hIcon, const char *szPreferredProto);
-EXTERN_C MIR_APP_DLL(void) Clist_TrayIconUpdateBase(const char *szChangedProto);
-EXTERN_C MIR_APP_DLL(void) Clist_TraySetTimer();
+EXTERN_C MIR_APP_DLL(DWORD) Clist_ContactToHItem(ClcContact *contact);
+EXTERN_C MIR_APP_DLL(HANDLE) Clist_ContactToItemHandle(ClcContact *contact, DWORD *nmFlags);
+
+EXTERN_C MIR_APP_DLL(void) Clist_Broadcast(int msg, WPARAM wParam, LPARAM lParam);
+EXTERN_C MIR_APP_DLL(void) Clist_BroadcastAsync(int msg, WPARAM wParam, LPARAM lParam);
+
+EXTERN_C MIR_APP_DLL(void) Clist_CalcEipPosition(ClcData *dat, ClcContact *contact, ClcGroup *group, POINT *result);
+EXTERN_C MIR_APP_DLL(void) Clist_ChangeContactIcon(MCONTACT hContact, int iIcon);
+EXTERN_C MIR_APP_DLL(int) Clist_ClcStatusToPf2(int status);
+EXTERN_C MIR_APP_DLL(void) Clist_DeleteFromContactList(HWND hwnd, ClcData *dat);
+EXTERN_C MIR_APP_DLL(void) Clist_DeleteItemFromTree(HWND hwnd, MCONTACT hItem);
+EXTERN_C MIR_APP_DLL(void) Clist_DoSelectionDefaultAction(HWND hwnd, ClcData *dat);
+EXTERN_C MIR_APP_DLL(void) Clist_DrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, HICON eventIcon);
+EXTERN_C MIR_APP_DLL(void) Clist_EndRename(ClcData *dat, int save);
+EXTERN_C MIR_APP_DLL(void) Clist_EnsureVisible(HWND hwnd, ClcData *dat, int iItem, int partialOk);
+EXTERN_C MIR_APP_DLL(int) Clist_EventsProcessTrayDoubleClick(int index);
+EXTERN_C MIR_APP_DLL(bool) Clist_FindItem(HWND hwnd, ClcData *dat, DWORD dwItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible);
+EXTERN_C MIR_APP_DLL(DWORD) Clist_GetDefaultExStyle(void);
+EXTERN_C MIR_APP_DLL(void) Clist_GetFontSetting(int i, LOGFONT *lf, COLORREF *colour);
+EXTERN_C MIR_APP_DLL(wchar_t*) Clist_GetGroupCountsText(ClcData *dat, ClcContact *contact);
+EXTERN_C MIR_APP_DLL(void) Clist_HideInfoTip(ClcData *dat);
+EXTERN_C MIR_APP_DLL(void) Clist_InitAutoRebuild(HWND hWnd);
+EXTERN_C MIR_APP_DLL(void) Clist_InvalidateItem(HWND hwnd, ClcData *dat, int iItem);
+EXTERN_C MIR_APP_DLL(int) Clist_IsHiddenMode(ClcData *dat, int status);
+EXTERN_C MIR_APP_DLL(void) Clist_LoadContactTree(void);
+EXTERN_C MIR_APP_DLL(void) Clist_NotifyNewContact(HWND hwnd, MCONTACT hContact);
+EXTERN_C MIR_APP_DLL(void) Clist_RecalculateGroupCheckboxes(ClcData *dat);
+EXTERN_C MIR_APP_DLL(ClcGroup*) Clist_RemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount);
+EXTERN_C MIR_APP_DLL(void) Clist_SaveStateAndRebuildList(HWND hwnd, ClcData *dat);
+EXTERN_C MIR_APP_DLL(void) Clist_SetGroupChildCheckboxes(ClcGroup *group, int checked);
+
+EXTERN_C MIR_APP_DLL(int) Clist_TrayIconAdd(HWND hwnd, const char *szProto, const char *szIconProto, int status);
+EXTERN_C MIR_APP_DLL(int) Clist_TrayIconDestroy(HWND hwnd);
+EXTERN_C MIR_APP_DLL(void) Clist_TrayIconIconsChanged(void);
+EXTERN_C MIR_APP_DLL(wchar_t*) Clist_TrayIconMakeTooltip(const wchar_t *szPrefix, const char *szProto);
+EXTERN_C MIR_APP_DLL(void) Clist_TrayIconRemove(HWND hwnd, const char *szProto);
+EXTERN_C MIR_APP_DLL(int) Clist_TrayIconSetBaseInfo(HICON hIcon, const char *szPreferredProto);
+EXTERN_C MIR_APP_DLL(void) Clist_TrayIconUpdateBase(const char *szChangedProto);
+EXTERN_C MIR_APP_DLL(void) Clist_TraySetTimer();
EXTERN_C MIR_APP_DLL(ClcCacheEntry*) Clist_GetCacheEntry(MCONTACT hContact);
@@ -340,10 +341,10 @@ struct CLIST_INTERFACE /* clcitems.c */
ClcContact* (*pfnCreateClcContact)(void);
ClcGroup* (*pfnAddGroup)(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
- ClcGroup* (*pfnRemoveItemFromGroup)(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount);
-
+ void (*blablablabla23)();
+
void (*pfnFreeContact)(ClcContact *contact);
- void (*pfnFreeGroup)(ClcGroup *group);
+ void (*blablablabla22)();
ClcContact* (*pfnAddInfoItemToGroup)(ClcGroup *group, int flags, const wchar_t *pszText);
ClcContact* (*pfnAddItemToGroup)(ClcGroup *group, int iAboveItem);
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex f282b9dd99..3e38fb65a0 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex b956f0d481..bfbf250f40 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 29e4e4ccee..dd2c1c367c 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1374,7 +1374,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && ((style & CLS_HIDEOFFLINE) || group->hideOffline || g_CluiData.bFilterEffective)) { // CLVM changed
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, nullptr) != -1)
hSelItem = Clist_ContactToHItem(selcontact);
- pcli->pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
+ Clist_RemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
needRepaint = TRUE;
dat->bNeedsResort = true;
}
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 93906325b3..650ad15bd2 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -343,7 +343,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, nullptr) != -1)
hSelItem = Clist_ContactToHItem(selcontact);
- pcli->pfnRemoveItemFromGroup(hwnd, group, contact, 0);
+ Clist_RemoveItemFromGroup(hwnd, group, contact, 0);
contactRemoved = TRUE;
recalcScrollBar = 1;
}
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index a486029bb9..9cd81ba7d2 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -520,7 +520,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, nullptr) != -1)
hSelItem = Clist_ContactToHItem(selcontact);
- cli.pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
+ Clist_RemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
}
else {
contact->iImage = (WORD)lParam;
@@ -1278,7 +1278,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam DestroyWindow(dat->hwndRenameEdit);
if (dat->hBmpBackground)
DeleteObject(dat->hBmpBackground);
- cli.pfnFreeGroup(&dat->list);
+ FreeGroup(&dat->list);
delete dat;
cli.pfnUnregisterFileDropping(hwnd);
WindowList_Remove(hClcWindowList, hwnd);
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 9bddc54ad2..5a9099cd49 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -54,14 +54,14 @@ ClcContact* fnFindItem(DWORD dwItem, ClcContact *contact); /* clcitems.c */
ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags, int groupId, int calcTotalMembers);
-ClcGroup* fnRemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount);
ClcContact* fnAddInfoItemToGroup(ClcGroup *group, int flags, const wchar_t *pszText);
ClcContact* fnAddItemToGroup(ClcGroup *group, int iAboveItem);
ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact);
void fnFreeContact(ClcContact *p);
-void fnFreeGroup(ClcGroup *group);
+
+void FreeGroup(ClcGroup *group);
void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline);
void fnRebuildEntireList(HWND hwnd, ClcData *dat);
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index 51a90d5fc3..ad290a31eb 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -119,12 +119,12 @@ ClcGroup* fnAddGroup(HWND hwnd, ClcData *dat, const wchar_t *szName, DWORD flags void fnFreeContact(ClcContact* p) { if (p->type == CLCIT_GROUP) { - cli.pfnFreeGroup(p->group); + FreeGroup(p->group); delete p->group; p->group = nullptr; } } -void fnFreeGroup(ClcGroup *group) +void FreeGroup(ClcGroup *group) { if (!group) return; @@ -273,7 +273,7 @@ void fnAddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTo group->totalMembers++; } -ClcGroup* fnRemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount) +MIR_APP_DLL(ClcGroup*) Clist_RemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount) { int iContact = group->cl.indexOf(contact); if (iContact == -1) @@ -293,7 +293,7 @@ ClcGroup* fnRemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, if ((GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_HIDEEMPTYGROUPS) && group->cl.getCount() == 0 && group->parent != nullptr) for (auto &cc : group->parent->cl) if (cc->type == CLCIT_GROUP && cc->groupId == group->groupId) - return cli.pfnRemoveItemFromGroup(hwnd, group->parent, cc, 0); + return Clist_RemoveItemFromGroup(hwnd, group->parent, cc, 0); return group; } @@ -333,7 +333,7 @@ MIR_APP_DLL(void) Clist_DeleteItemFromTree(HWND hwnd, MCONTACT hItem) } mir_free(dbv.ptszVal); } - else cli.pfnRemoveItemFromGroup(hwnd, group, contact, 1); + else Clist_RemoveItemFromGroup(hwnd, group, contact, 1); } int fnGetContactHiddenStatus(MCONTACT hContact, char*, ClcData*) @@ -415,7 +415,7 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) ClcContact *cc = group->cl[group->scanIndex]; if (cc->type == CLCIT_GROUP) { if (cc->group->cl.getCount() == 0) { - group = cli.pfnRemoveItemFromGroup(hwnd, group, cc, 0); + group = Clist_RemoveItemFromGroup(hwnd, group, cc, 0); } else { group = cc->group; @@ -662,7 +662,7 @@ MIR_APP_DLL(void) Clist_SaveStateAndRebuildList(HWND hwnd, ClcData *dat) group->scanIndex++; } - cli.pfnFreeGroup(&dat->list); + FreeGroup(&dat->list); cli.pfnRebuildEntireList(hwnd, dat); group = &dat->list; diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index d397005691..b885d86ba2 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -76,13 +76,11 @@ void InitClistCore() cli.pfnAddGroup = fnAddGroup;
cli.pfnAddItemToGroup = fnAddItemToGroup;
cli.pfnCreateClcContact = fnCreateClcContact;
- cli.pfnRemoveItemFromGroup = fnRemoveItemFromGroup;
- cli.pfnFreeContact = fnFreeContact;
- cli.pfnFreeGroup = fnFreeGroup;
- cli.pfnAddInfoItemToGroup = fnAddInfoItemToGroup;
- cli.pfnAddContactToGroup = fnAddContactToGroup;
- cli.pfnAddContactToTree = fnAddContactToTree;
+ cli.pfnFreeContact = fnFreeContact;
+ cli.pfnAddInfoItemToGroup = fnAddInfoItemToGroup;
+ cli.pfnAddContactToGroup = fnAddContactToGroup;
+ cli.pfnAddContactToTree = fnAddContactToTree;
cli.pfnRebuildEntireList = fnRebuildEntireList;
cli.pfnGetGroupContentsCount = fnGetGroupContentsCount;
cli.pfnSortCLC = fnSortCLC;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 0e6f53b6dd..e8b2c97f9b 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -574,3 +574,4 @@ Clist_EnsureVisible @593 Clist_GetGroupCountsText @594
Clist_SaveStateAndRebuildList @595
Clist_DeleteItemFromTree @596
+Clist_RemoveItemFromGroup @597
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 929ffeae10..d9782165d9 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -574,3 +574,4 @@ Clist_EnsureVisible @593 Clist_GetGroupCountsText @594
Clist_SaveStateAndRebuildList @595
Clist_DeleteItemFromTree @596
+Clist_RemoveItemFromGroup @597
|