diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-06 20:59:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-06 20:59:25 +0300 |
commit | 205963dfbb2297f5fab4adeec027342394329d2d (patch) | |
tree | bbf0df9820b79995c1b631bee47f8294c8ab4a83 | |
parent | da9aa1870502d88752c5482e3eb2d2548dd64984 (diff) |
CLIST_INTERFACE::pfnGetGroupCountsText => Clist_GetGroupCountsText
CLIST_INTERFACE::pfnEnsureVisible => Clist_EnsureVisible
-rw-r--r-- | include/delphi/m_clistint.inc | 4 | ||||
-rw-r--r-- | include/m_clistint.h | 8 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 153876 -> 154384 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 149090 -> 149556 bytes | |||
-rw-r--r-- | plugins/Clist_blind/src/clcpaint.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_blind/src/init.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcmsgs.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcpaint.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_rowheight_funcs.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcpaint.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcutils.cpp | 4 | ||||
-rw-r--r-- | src/core/stdclist/src/clcpaint.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clc.cpp | 12 | ||||
-rw-r--r-- | src/mir_app/src/clc.h | 2 | ||||
-rw-r--r-- | src/mir_app/src/clcmsgs.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/clcutils.cpp | 7 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 9 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 2 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 2 |
21 files changed, 48 insertions, 48 deletions
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc index 9d6a97348d..3b9185bedf 100644 --- a/include/delphi/m_clistint.inc +++ b/include/delphi/m_clistint.inc @@ -339,10 +339,10 @@ type pfnPaintClc : procedure (hwnd:HWND; var dat:TClcData; hdc:HDC; var rcPaint:TRECT); cdecl;
(* clcutils.c *)
- pfnGetGroupCountsText : function (var dat:TClcData; var contact:TClcContact):PAnsiChar; cdecl;
+ blablablabla19 : procedure; cdecl;
pfnHitTest : function (hwnd:HWND; var dat:TClcData; testx:int; testy:int; var contact:PClcContact; var group:PClcGroup; var flags:dword):int; cdecl;
pfnScrollTo : procedure (hwnd:HWND; var dat:TClcData; desty:int; noSmooth:int); cdecl;
- pfnEnsureVisible : procedure (hwnd:HWND; var dat:TClcData; iItem:int; partialOk:int); cdecl;
+ blablablabla18 : procedure; cdecl;
pfnRecalcScrollBar : procedure (hwnd:HWND; var dat:TClcData); cdecl;
pfnSetGroupExpand : procedure (hwnd:HWND; var dat:TClcData; var group:TClcGroup; newState:int); cdecl;
blablablabla17 : procedure; cdecl;
diff --git a/include/m_clistint.h b/include/m_clistint.h index 46ec233c56..f0ab35c6ea 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -252,17 +252,19 @@ EXTERN_C MIR_APP_DLL(HANDLE) Clist_ContactToItemHandle(ClcContact *contact, DW 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_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_CalcEipPosition(ClcData *dat, ClcContact *contact, ClcGroup *group, POINT *result);
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);
@@ -359,10 +361,10 @@ struct CLIST_INTERFACE void (*pfnPaintClc)(HWND hwnd, ClcData *dat, HDC hdc, RECT * rcPaint);
/* clcutils.c */
- wchar_t* (*pfnGetGroupCountsText)(ClcData *dat, ClcContact *contact);
+ void (*blablablabla19)();
int (*pfnHitTest)(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags);
void (*pfnScrollTo)(HWND hwnd, ClcData *dat, int desty, int noSmooth);
- void (*pfnEnsureVisible)(HWND hwnd, ClcData *dat, int iItem, int partialOk);
+ void (*blablablabla18)();
void (*pfnRecalcScrollBar)(HWND hwnd, ClcData *dat);
void (*pfnSetGroupExpand)(HWND hwnd, ClcData *dat, ClcGroup *group, int newState);
void (*blablablabla17)();
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex 6173676e7b..cfcdebff31 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 265113671d..34780479d6 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp index 26bc796c49..56bf6c6f66 100644 --- a/plugins/Clist_blind/src/clcpaint.cpp +++ b/plugins/Clist_blind/src/clcpaint.cpp @@ -307,7 +307,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) GetTextExtentPoint32(hdcMem, cc->szText, (int)mir_wstrlen(cc->szText), &textSize);
width = textSize.cx;
if (cc->type == CLCIT_GROUP) {
- szCounts = pcli->pfnGetGroupCountsText(dat, cc);
+ szCounts = Clist_GetGroupCountsText(dat, cc);
if (szCounts[0]) {
GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize);
ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight);
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index b5800648a9..4adbb48c05 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -396,7 +396,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L KillTimer(hwnd, TIMERID_RENAME);
dat->szQuickSearch[0] = 0;
pcli->pfnInvalidateRect(hwnd, nullptr, FALSE);
- pcli->pfnEnsureVisible(hwnd, (ClcData*)dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, (ClcData*)dat, dat->selection, 0);
UpdateWindow(hwnd);
break;
@@ -528,7 +528,7 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig) switch (item->type) {
case CLCIT_GROUP:
{
- wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, item);
+ wchar_t *szCounts = Clist_GetGroupCountsText(dat, item);
const wchar_t *t[] = {
L"%name%",
L"%count%",
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 39d920265c..23cca110e2 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -431,7 +431,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM dat->selection = index;
pcli->pfnInvalidateRect(hwnd, nullptr, FALSE);
- pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
return 0;
}
@@ -532,7 +532,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM ClcGroup *group2;
if (Clist_FindItem(hwnd, dat, contact->hContact, &contact2, &group2, nullptr)) {
int i = cliGetRowsPriorTo(&dat->list, group2, group2->cl.indexOf(contact2));
- pcli->pfnEnsureVisible(hwnd, dat, i + contact->iSubAllocated, 0);
+ Clist_EnsureVisible(hwnd, dat, i + contact->iSubAllocated, 0);
}
}
hitcontact = nullptr;
@@ -571,7 +571,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM if (dat->bCompactMode)
SendMessage(hwnd, WM_SIZE, 0, 0);
cliInvalidateRect(hwnd, nullptr, FALSE);
- pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
UpdateWindow(hwnd);
}
SetCapture(hwnd);
@@ -626,7 +626,7 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR ClcGroup *group;
if (Clist_FindItem(hwnd, dat, hitcontact->hContact, &contact, &group, nullptr)) {
i = cliGetRowsPriorTo(&dat->list, group, group->cl.indexOf(contact));
- pcli->pfnEnsureVisible(hwnd, dat, i + hitcontact->iSubAllocated, 0);
+ Clist_EnsureVisible(hwnd, dat, i + hitcontact->iSubAllocated, 0);
}
}
hitcontact = nullptr;
@@ -810,7 +810,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP SendMessage(hwnd, WM_SIZE, 0, 0);
if (dat->selection != -1)
- pcli->pfnEnsureVisible(hwnd, dat, hit, 0);
+ Clist_EnsureVisible(hwnd, dat, hit, 0);
return TRUE;
}
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index f40be03600..06f688619d 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -212,7 +212,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP }
dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, group, index);
- pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
}
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 6f33458f9d..0ddeeabdc4 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -780,7 +780,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R RECT count_rc = { 0 };
SIZE count_size = { 0 };
int space_width = 0;
- szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
+ szCounts = Clist_GetGroupCountsText(dat, Drawing);
// Has to draw the count?
if (szCounts && mir_wstrlen(szCounts) > 0) {
// calc width and height
@@ -852,7 +852,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R return;
}
else if (Drawing->type == CLCIT_GROUP) {
- szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
+ szCounts = Clist_GetGroupCountsText(dat, Drawing);
// Has to draw the count?
if (szCounts && szCounts[0]) {
RECT space_rc = fr_rc;
@@ -1001,7 +1001,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R RECT count_rc = { 0 };
SIZE count_size = { 0 };
int space_width = 0;
- wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
+ wchar_t *szCounts = Clist_GetGroupCountsText(dat, Drawing);
// Has to draw the count?
if (szCounts && mir_wstrlen(szCounts) > 0) {
// calc width and height
@@ -2197,7 +2197,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT if (Drawing->type == CLCIT_GROUP) {
int full_text_width = text_size.cx;
// Has to draw the count?
- wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
+ wchar_t *szCounts = Clist_GetGroupCountsText(dat, Drawing);
if (szCounts && szCounts[0]) {
RECT space_rc = free_row_rc;
RECT counts_rc = free_row_rc;
@@ -2683,7 +2683,7 @@ void CLCPaint::_DrawContactText(HDC hdcMem, ClcData *dat, ClcContact *Drawing, i void CLCPaint::_DrawContactSubText(HDC hdcMem, ClcData *dat, ClcContact *Drawing, int& selected, int& hottrack, RECT& text_rc, RECT *prcItem, UINT uTextFormat, BYTE itemType)
{
if (Drawing->type == CLCIT_GROUP) {
- wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing);
+ wchar_t *szCounts = Clist_GetGroupCountsText(dat, Drawing);
// Has to draw the count?
if (szCounts && szCounts[0]) {
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index 3bf61c98a3..4c259c58e1 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -70,7 +70,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) if (dat->text_replace_smileys && dat->first_line_draw_smileys && !dat->text_resize_smileys)
tmp = max(tmp, contact->ssText.iMaxSmileyHeight);
if (contact->type == CLCIT_GROUP) {
- wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, contact);
+ wchar_t *szCounts = Clist_GetGroupCountsText(dat, contact);
// Has the count?
if (szCounts && szCounts[0])
tmp = max(tmp, dat->fontModernInfo[contact->group->expanded ? FONTID_OPENGROUPCOUNTS : FONTID_CLOSEDGROUPCOUNTS].fontHeight);
@@ -108,7 +108,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) g_clcPainter.ChangeToFont(hdc, dat, g_clcPainter.GetBasicFontID(contact), nullptr);
g_clcPainter.GetTextSize(&size, hdc, dummyRect, contact->szText, contact->ssText.plText, 0, dat->text_resize_smileys ? 0 : contact->ssText.iMaxSmileyHeight);
if (contact->type == CLCIT_GROUP) {
- wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, contact);
+ wchar_t *szCounts = Clist_GetGroupCountsText(dat, contact);
if (szCounts && mir_wstrlen(szCounts) > 0) {
RECT count_rc = { 0 };
// calc width and height
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 839ba5f020..dd858bec85 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -620,7 +620,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L InvalidateRect(hwnd, nullptr, FALSE);
if (dat->selection != -1)
- pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
if (hitFlags & CLCHT_ONAVATAR && cfg::dat.bDblClkAvatars) {
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)contact->hContact, 0);
return TRUE;
@@ -645,7 +645,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (pt.x == -1 && pt.y == -1) {
dat->selection = pcli->pfnGetRowByIndex(dat, dat->selection, &contact, nullptr);
if (dat->selection != -1)
- pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
pt.x = dat->iconXSpace + 15;
pt.y = RowHeight::getItemTopY(dat, dat->selection) - dat->yScroll + (int)(dat->row_heights[dat->selection] * .7);
hitFlags = dat->selection == -1 ? CLCHT_NOWHERE : CLCHT_ONITEMLABEL;
@@ -656,7 +656,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
InvalidateRect(hwnd, nullptr, FALSE);
if (dat->selection != -1)
- pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
UpdateWindow(hwnd);
HMENU hMenu = nullptr;
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index a2476af09e..0db2306540 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -503,7 +503,7 @@ set_bg_l: if (type == CLCIT_GROUP) {
GetTextExtentPoint32(hdcMem, contact->szText, (int)mir_wstrlen(contact->szText), &textSize);
int width = textSize.cx;
- szCounts = pcli->pfnGetGroupCountsText(dat, contact);
+ szCounts = Clist_GetGroupCountsText(dat, contact);
if (szCounts[0]) {
GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize);
ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight);
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp index 82e9722c2f..c59a735535 100644 --- a/plugins/Clist_nicer/src/clcutils.cpp +++ b/plugins/Clist_nicer/src/clcutils.cpp @@ -168,7 +168,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontac width = textSize.cx;
if (hitcontact->type == CLCIT_GROUP) {
wchar_t *szCounts;
- szCounts = pcli->pfnGetGroupCountsText(dat, hitcontact);
+ szCounts = Clist_GetGroupCountsText(dat, hitcontact);
if (szCounts[0]) {
GetTextExtentPoint32(hdc, L" ", 1, &textSize);
width += textSize.cx;
@@ -309,7 +309,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c width = textSize.cx;
if (hitcontact->type == CLCIT_GROUP) {
wchar_t *szCounts;
- szCounts = pcli->pfnGetGroupCountsText(dat, hitcontact);
+ szCounts = Clist_GetGroupCountsText(dat, hitcontact);
if (szCounts[0]) {
GetTextExtentPoint32(hdc, L" ", 1, &textSize);
width += textSize.cx;
diff --git a/src/core/stdclist/src/clcpaint.cpp b/src/core/stdclist/src/clcpaint.cpp index 03a927d63d..05114952f2 100644 --- a/src/core/stdclist/src/clcpaint.cpp +++ b/src/core/stdclist/src/clcpaint.cpp @@ -318,7 +318,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) wchar_t *ptszGroupCount = nullptr;
if (cc->type == CLCIT_GROUP) {
- ptszGroupCount = pcli->pfnGetGroupCountsText(dat, cc);
+ ptszGroupCount = Clist_GetGroupCountsText(dat, cc);
if (*ptszGroupCount) {
GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize);
ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight);
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp index 011f315b78..a0a1f2f9f7 100644 --- a/src/mir_app/src/clc.cpp +++ b/src/mir_app/src/clc.cpp @@ -745,7 +745,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam if (dat->selection < 0)
dat->selection = 0;
cli.pfnInvalidateRect(hwnd, nullptr, FALSE);
- cli.pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
UpdateWindow(hwnd);
return 0;
}
@@ -803,7 +803,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam cli.pfnSaveStateAndRebuildList(hwnd, dat);
}
cli.pfnInvalidateRect(hwnd, nullptr, FALSE);
- cli.pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
}
else
cli.pfnInvalidateRect(hwnd, nullptr, FALSE);
@@ -960,7 +960,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam dat->selection = hit;
cli.pfnInvalidateRect(hwnd, nullptr, FALSE);
if (dat->selection != -1)
- cli.pfnEnsureVisible(hwnd, dat, hit, 0);
+ Clist_EnsureVisible(hwnd, dat, hit, 0);
UpdateWindow(hwnd);
if (dat->selection != -1 && (contact->type == CLCIT_CONTACT || contact->type == CLCIT_GROUP) && !(hitFlags & (CLCHT_ONITEMEXTRA | CLCHT_ONITEMCHECK))) {
SetCapture(hwnd);
@@ -1171,7 +1171,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam dat->selection = cli.pfnHitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, nullptr, &hitFlags);
cli.pfnInvalidateRect(hwnd, nullptr, FALSE);
if (dat->selection != -1)
- cli.pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
if (hitFlags & (CLCHT_ONITEMICON | CLCHT_ONITEMLABEL)) {
UpdateWindow(hwnd);
@@ -1194,7 +1194,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam if (pt.x == -1 && pt.y == -1) {
dat->selection = cli.pfnGetRowByIndex(dat, dat->selection, &contact, nullptr);
if (dat->selection != -1)
- cli.pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
pt.x = dat->iconXSpace + 15;
pt.y = cli.pfnGetRowTopY(dat, dat->selection) - dat->yScroll + (int)(cli.pfnGetRowHeight(dat, dat->selection) * .7);
hitFlags = (dat->selection == -1) ? CLCHT_NOWHERE : CLCHT_ONITEMLABEL;
@@ -1205,7 +1205,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam }
cli.pfnInvalidateRect(hwnd, nullptr, FALSE);
if (dat->selection != -1)
- cli.pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
UpdateWindow(hwnd);
if (dat->selection != -1 && hitFlags & (CLCHT_ONITEMICON | CLCHT_ONITEMCHECK | CLCHT_ONITEMLABEL)) {
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 8396747bc2..c8b0063219 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -75,10 +75,8 @@ int fnGetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat); LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
/* clcutils.c */
-wchar_t* fnGetGroupCountsText(ClcData *dat, ClcContact *contact);
int fnHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contact, ClcGroup **group, DWORD * flags);
void fnScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth);
-void fnEnsureVisible(HWND hwnd, ClcData *dat, int iItem, int partialOk);
void fnRecalcScrollBar(HWND hwnd, ClcData *dat);
void fnSetGroupExpand(HWND hwnd, ClcData *dat, ClcGroup *group, int newState);
int fnFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk);
diff --git a/src/mir_app/src/clcmsgs.cpp b/src/mir_app/src/clcmsgs.cpp index c13bf9924a..b96d80711d 100644 --- a/src/mir_app/src/clcmsgs.cpp +++ b/src/mir_app/src/clcmsgs.cpp @@ -101,7 +101,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar for (ClcGroup *tgroup = group; tgroup; tgroup = tgroup->parent)
cli.pfnSetGroupExpand(hwnd, dat, tgroup, 1);
- cli.pfnEnsureVisible(hwnd, dat, cli.pfnGetRowsPriorTo(&dat->list, group, group->cl.indexOf(contact)), 0);
+ Clist_EnsureVisible(hwnd, dat, cli.pfnGetRowsPriorTo(&dat->list, group, group->cl.indexOf(contact)), 0);
break;
case CLM_EXPAND:
@@ -294,7 +294,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar for (ClcGroup *tgroup = group; tgroup; tgroup = tgroup->parent)
cli.pfnSetGroupExpand(hwnd, dat, tgroup, 1);
dat->selection = cli.pfnGetRowsPriorTo(&dat->list, group, group->cl.indexOf(contact));
- cli.pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ Clist_EnsureVisible(hwnd, dat, dat->selection, 0);
break;
case CLM_SETBKBITMAP:
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp index cc2d806737..74e4039e38 100644 --- a/src/mir_app/src/clcutils.cpp +++ b/src/mir_app/src/clcutils.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern HANDLE hHideInfoTipEvent;
-wchar_t* fnGetGroupCountsText(ClcData *dat, ClcContact *contact)
+MIR_APP_DLL(wchar_t*) Clist_GetGroupCountsText(ClcData *dat, ClcContact *contact)
{
if (contact->type != CLCIT_GROUP || !(dat->exStyle & CLS_EX_SHOWGROUPCOUNTS))
return L"";
@@ -171,8 +171,7 @@ int fnHitTest(HWND hwnd, ClcData *dat, int testx, int testy, ClcContact **contac GetTextExtentPoint32(hdc, hitcontact->szText, (int)mir_wstrlen(hitcontact->szText), &textSize);
int width = textSize.cx;
if (hitcontact->type == CLCIT_GROUP) {
- wchar_t *szCounts;
- szCounts = cli.pfnGetGroupCountsText(dat, hitcontact);
+ wchar_t *szCounts = Clist_GetGroupCountsText(dat, hitcontact);
if (szCounts[0]) {
GetTextExtentPoint32(hdc, L" ", 1, &textSize);
width += textSize.cx;
@@ -243,7 +242,7 @@ void fnScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth) SetScrollPos(hwnd, SB_VERT, dat->yScroll, TRUE);
}
-void fnEnsureVisible(HWND hwnd, ClcData *dat, int iItem, int partialOk)
+MIR_APP_DLL(void) Clist_EnsureVisible(HWND hwnd, ClcData *dat, int iItem, int partialOk)
{
int itemy = cli.pfnGetRowTopY(dat, iItem), itemh = cli.pfnGetRowHeight(dat, iItem), newY = 0;
int moved = 0;
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index 37ba317f2a..eb10cce9fd 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -92,13 +92,10 @@ void InitClistCore() cli.pfnPaintClc = fnPaintClc;
- cli.pfnGetGroupCountsText = fnGetGroupCountsText;
- cli.pfnHitTest = fnHitTest;
- cli.pfnScrollTo = fnScrollTo;
- cli.pfnEnsureVisible = fnEnsureVisible;
- cli.pfnRecalcScrollBar = fnRecalcScrollBar;
+ cli.pfnHitTest = fnHitTest;
+ cli.pfnScrollTo = fnScrollTo;
+ cli.pfnRecalcScrollBar = fnRecalcScrollBar;
cli.pfnSetGroupExpand = fnSetGroupExpand;
-
cli.pfnFindRowByText = fnFindRowByText;
cli.pfnBeginRenameSelection = fnBeginRenameSelection;
cli.pfnIsVisibleContact = fnIsVisibleContact;
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 4af222c749..e88ae9c037 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -570,3 +570,5 @@ Clist_CalcEipPosition @589 Clist_DeleteFromContactList @590
Clist_EndRename @591
Clist_DoSelectionDefaultAction @592
+Clist_EnsureVisible @593
+Clist_GetGroupCountsText @594
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index fdab2e472d..8e84b5fcd6 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -570,3 +570,5 @@ Clist_CalcEipPosition @589 Clist_DeleteFromContactList @590
Clist_EndRename @591
Clist_DoSelectionDefaultAction @592
+Clist_EnsureVisible @593
+Clist_GetGroupCountsText @594
|