summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-04 21:07:46 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-04 21:07:46 +0300
commitd4b6de0fb4ca58063eb2f424c77e74e703022b63 (patch)
tree831c18be8048b34ddacf132c1bb204e92cd9cb92
parent53156bdc6edde511dbdf5e999756cd80d0a97e13 (diff)
static function CLIST_INTERFACE::pfnGetContactIcon exported as Clist_GetContactIcon (history++ to be recompiled)
-rw-r--r--include/delphi/m_clist.inc5
-rw-r--r--include/delphi/m_clistint.inc259
-rw-r--r--include/m_clist.h7
-rw-r--r--include/m_clistint.h1
-rw-r--r--libs/win32/mir_app.libbin145158 -> 145402 bytes
-rw-r--r--libs/win64/mir_app.libbin141042 -> 141268 bytes
-rw-r--r--plugins/Clist_modern/src/init.cpp1
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clistevents.cpp6
-rw-r--r--plugins/Clist_modern/src/modern_clistmod.cpp8
-rw-r--r--plugins/Clist_modern/src/modern_commonprototypes.h1
-rw-r--r--plugins/Clist_nicer/src/clc.cpp4
-rw-r--r--plugins/Clist_nicer/src/clcitems.cpp4
-rw-r--r--plugins/Clist_nicer/src/clcpaint.cpp4
-rw-r--r--plugins/Clist_nicer/src/clistevents.cpp2
-rw-r--r--plugins/FavContacts/src/menu.cpp2
-rw-r--r--plugins/FloatingContacts/src/thumbs.cpp4
-rw-r--r--plugins/HistoryPlusPlus/GlobalSearch.pas2
-rw-r--r--plugins/NewAwaySysMod/src/ContactList.cpp2
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp4
-rw-r--r--plugins/QuickSearch/sr_window.pas2
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/SeenPlugin/src/missed.cpp2
-rw-r--r--plugins/TipperYM/src/popwin.cpp2
-rw-r--r--src/mir_app/src/clc.cpp2
-rw-r--r--src/mir_app/src/clc.h1
-rw-r--r--src/mir_app/src/clcitems.cpp2
-rw-r--r--src/mir_app/src/clistcore.cpp5
-rw-r--r--src/mir_app/src/clistevents.cpp2
-rw-r--r--src/mir_app/src/clistmod.cpp4
-rw-r--r--src/mir_app/src/meta_menu.cpp2
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
34 files changed, 139 insertions, 217 deletions
diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc
index 58094ef97a..7d9c279396 100644
--- a/include/delphi/m_clist.inc
+++ b/include/delphi/m_clist.inc
@@ -149,6 +149,11 @@ const
}
function Clist_MenuProcessHotkey(virtKey:uint) : integer; stdcall; external AppDll;
+ {
+ returns the icon's index of specified contact in the internal image list or -1
+ }
+ function Clist_GetContactIcon(hContact:TMCONTACT) : integer; stdcall; external AppDll;
+
{
wParam : 0
lParam : 0
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc
index 97be0ac711..b413f2967b 100644
--- a/include/delphi/m_clistint.inc
+++ b/include/delphi/m_clistint.inc
@@ -297,130 +297,123 @@ type
clcProto : PClcProtoStatus;
(* clc.h *)
- pfnClcOptionsChanged : procedure; cdecl;
- pfnBuildGroupPopupMenu : function (_para1:PClcGroup):HMENU; cdecl;
+ pfnClcOptionsChanged : procedure; cdecl;
+ pfnBuildGroupPopupMenu : function (_para1:PClcGroup):HMENU; cdecl;
- pfnContactListControlWndProc:function(hwnd:HWND; msg:uint; wParam:WPARAM; lParam:LPARAM):LRESULT; stdcall;
+ pfnContactListControlWndProc : function(hwnd:HWND; msg:uint; wParam:WPARAM; lParam:LPARAM):LRESULT; stdcall;
(* clcfiledrop.c *)
- pfnRegisterFileDropping : procedure (hwnd:HWND); cdecl;
- pfnUnregisterFileDropping : procedure (hwnd:HWND); cdecl;
+ pfnRegisterFileDropping : procedure (hwnd:HWND); cdecl;
+ pfnUnregisterFileDropping : procedure (hwnd:HWND); cdecl;
(* clcidents.c *)
- blablabla6 : procedure; cdecl;
+ blablabla6 : procedure; cdecl;
- pfnGetRowsPriorTo : function (var group:TClcGroup; var subgroup:TClcGroup;
- contactIndex:int):int; cdecl;
- pfnGetRowByIndex : function (var dat:TClcData; testindex:int;
- var contact:PClcContact; var subgroup:PClcGroup):int; cdecl;
- unused1 : function (var contact:TClcContact):THANDLE;cdecl;
- unused2 : function (var contact:TClcContact; var nmFlags:dword):THANDLE; cdecl;
+ pfnGetRowsPriorTo : function (var group:TClcGroup; var subgroup:TClcGroup; contactIndex:int):int; cdecl;
+ pfnGetRowByIndex : function (var dat:TClcData; testindex:int; var contact:PClcContact; var subgroup:PClcGroup):int; cdecl;
+ unused1 : function (var contact:TClcContact):THANDLE;cdecl;
+ unused2 : function (var contact:TClcContact; var nmFlags:dword):THANDLE; cdecl;
(* 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;
-
- pfnFreeContact : procedure (var contact:TClcContact); cdecl;
- pfnFreeGroup : procedure (var group:TClcGroup); cdecl;
-
- pfnAddInfoItemToGroup : function (var group:TClcGroup; flags:int; pszText:TChar):PClcContact; cdecl;
- pfnAddItemToGroup : function (var group:TClcGroup; iAboveItem:int):PClcContact; cdecl;
- pfnAddContactToGroup : function (var dat:TClcData; var group:TClcGroup; hContact:TMCONTACT):PClcContact; cdecl;
- pfnAddContactToTree : procedure (hwnd:HWND; var dat:TClcData; hContact:TMCONTACT; updateTotalCount:int; checkHideOffline:int); cdecl;
- pfnDeleteItemFromTree : procedure (hwnd:HWND; hItem:TMCONTACT); cdecl;
- pfnRebuildEntireList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
- pfnGetGroupContentsCount : function (var group:TClcGroup; visibleOnly:int):int; cdecl;
- pfnSortCLC : procedure (hwnd:HWND; var dat:TClcData; useInsertionSort:int); cdecl;
- pfnSaveStateAndRebuildList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ 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;
+
+ pfnFreeContact : procedure (var contact:TClcContact); cdecl;
+ pfnFreeGroup : procedure (var group:TClcGroup); cdecl;
+
+ pfnAddInfoItemToGroup : function (var group:TClcGroup; flags:int; pszText:TChar):PClcContact; cdecl;
+ pfnAddItemToGroup : function (var group:TClcGroup; iAboveItem:int):PClcContact; cdecl;
+ pfnAddContactToGroup : function (var dat:TClcData; var group:TClcGroup; hContact:TMCONTACT):PClcContact; cdecl;
+ pfnAddContactToTree : procedure (hwnd:HWND; var dat:TClcData; hContact:TMCONTACT; updateTotalCount:int; checkHideOffline:int); cdecl;
+ pfnDeleteItemFromTree : procedure (hwnd:HWND; hItem:TMCONTACT); cdecl;
+ pfnRebuildEntireList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnGetGroupContentsCount : function (var group:TClcGroup; visibleOnly:int):int; cdecl;
+ pfnSortCLC : procedure (hwnd:HWND; var dat:TClcData; useInsertionSort:int); cdecl;
+ pfnSaveStateAndRebuildList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
(* clcmsgs.c *)
- pfnProcessExternalMessages : function (hwnd:HWND; var dat:TClcData; msg:uint;
- wParam:WPARAM; lParam:LPARAM):LRESULT; cdecl;
+ pfnProcessExternalMessages : function (hwnd:HWND; var dat:TClcData; msg:uint; wParam:WPARAM; lParam:LPARAM):LRESULT; cdecl;
(* clcpaint.c *)
- pfnPaintClc : procedure (hwnd:HWND; var dat:TClcData; hdc:HDC; var rcPaint:TRECT); cdecl;
+ 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;
- 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;
- pfnRecalcScrollBar : procedure (hwnd:HWND; var dat:TClcData); cdecl;
- pfnSetGroupExpand : procedure (hwnd:HWND; var dat:TClcData; var group:TClcGroup; newState:int); cdecl;
- pfnDoSelectionDefaultAction : procedure (hwnd:HWND; var dat:TClcData); cdecl;
- pfnFindRowByText : function (hwnd:HWND; var dat:TClcData; text:TChar; prefixOk:int):int; cdecl;
- pfnEndRename : procedure (hwnd:HWND; var dat:TClcData; save:int); cdecl;
- pfnDeleteFromContactList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
- pfnBeginRenameSelection : procedure (hwnd:HWND; var dat:TClcData); cdecl;
- pfnCalcEipPosition : procedure (var dat:TClcData; var contact:TClcContact; var group:TClcGroup; var result:TPOINT); cdecl;
- pfnGetDropTargetInformation : function (hwnd:HWND; var dat:TClcData; pt:TPOINT):int; cdecl;
- pfnClcStatusToPf2 : function (status:int):int; cdecl;
- pfnIsHiddenMode : function (var dat:TClcData; status:int):int; cdecl;
- pfnHideInfoTip : procedure (hwnd:HWND; var dat:TClcData); cdecl;
- pfnNotifyNewContact : procedure (hwnd:HWND; hContact:TMCONTACT); cdecl;
- pfnGetDefaultExStyle : function :dword; cdecl;
- pfnGetDefaultFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl;
- pfnGetFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl;
- pfnLoadClcOptions : procedure (hwnd:HWND; var dat:TClcData; bFirst: int); cdecl;
- pfnRecalculateGroupCheckboxes : procedure (hwnd:HWND; var dat:TClcData); cdecl;
- pfnSetGroupChildCheckboxes : procedure (var group:TClcGroup; checked:int); cdecl;
- pfnInvalidateItem : procedure (hwnd:HWND; var dat:TClcData; iItem:int); cdecl;
-
- pfnGetRowBottomY : function (var dat:TClcData; item:int):int; cdecl;
- pfnGetRowHeight : function (var dat:TClcData; item:int):int; cdecl;
- pfnGetRowTopY : function (var dat:TClcData; item:int):int; cdecl;
- pfnGetRowTotalHeight : function (var dat:TClcData):int; cdecl;
- pfnRowHitTest : function (var dat:TClcData; y:int):int; cdecl;
+ pfnGetGroupCountsText : function (var dat:TClcData; var contact:TClcContact):PAnsiChar; 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;
+ pfnRecalcScrollBar : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnSetGroupExpand : procedure (hwnd:HWND; var dat:TClcData; var group:TClcGroup; newState:int); cdecl;
+ pfnDoSelectionDefaultAction : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnFindRowByText : function (hwnd:HWND; var dat:TClcData; text:TChar; prefixOk:int):int; cdecl;
+ pfnEndRename : procedure (hwnd:HWND; var dat:TClcData; save:int); cdecl;
+ pfnDeleteFromContactList : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnBeginRenameSelection : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnCalcEipPosition : procedure (var dat:TClcData; var contact:TClcContact; var group:TClcGroup; var result:TPOINT); cdecl;
+ pfnGetDropTargetInformation : function (hwnd:HWND; var dat:TClcData; pt:TPOINT):int; cdecl;
+ pfnClcStatusToPf2 : function (status:int):int; cdecl;
+ pfnIsHiddenMode : function (var dat:TClcData; status:int):int; cdecl;
+ pfnHideInfoTip : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnNotifyNewContact : procedure (hwnd:HWND; hContact:TMCONTACT); cdecl;
+ pfnGetDefaultExStyle : function :dword; cdecl;
+ pfnGetDefaultFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl;
+ pfnGetFontSetting : procedure (i:int; var lf:LOGFONT; var colour:COLORREF); cdecl;
+ pfnLoadClcOptions : procedure (hwnd:HWND; var dat:TClcData; bFirst: int); cdecl;
+ pfnRecalculateGroupCheckboxes : procedure (hwnd:HWND; var dat:TClcData); cdecl;
+ pfnSetGroupChildCheckboxes : procedure (var group:TClcGroup; checked:int); cdecl;
+ pfnInvalidateItem : procedure (hwnd:HWND; var dat:TClcData; iItem:int); cdecl;
+
+ pfnGetRowBottomY : function (var dat:TClcData; item:int):int; cdecl;
+ pfnGetRowHeight : function (var dat:TClcData; item:int):int; cdecl;
+ pfnGetRowTopY : function (var dat:TClcData; item:int):int; cdecl;
+ pfnGetRowTotalHeight : function (var dat:TClcData):int; cdecl;
+ pfnRowHitTest : function (var dat:TClcData; y:int):int; cdecl;
(* clistevents.c *)
pfnEventsProcessContactDoubleClick : function (hContact:TMCONTACT):int; cdecl;
pfnEventsProcessTrayDoubleClick : function (_para1:int):int; cdecl;
(* clistmod.c *)
- pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:TMCONTACT):int; cdecl;
- pfnShowHide : function :int; cdecl;
- pfnGetStatusModeDescription : function (mode:int; flags:int) : PWideChar; cdecl;
-
+ pfnIconFromStatusMode : function (szProto:PAnsiChar; status:int; hContact:TMCONTACT):int; cdecl;
+ pfnShowHide : function :int; cdecl;
+ pfnGetStatusModeDescription : function (mode:int; flags:int) : PWideChar; cdecl;
+
(* clistsettings.c *)
- pfnGetCacheEntry : function (hContact:TMCONTACT):PClcCacheEntry; cdecl;
- pfnCreateCacheItem : function (hContact:TMCONTACT):PClcCacheEntry; cdecl;
- pfnCheckCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
- pfnFreeCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
+ pfnGetCacheEntry : function (hContact:TMCONTACT):PClcCacheEntry; cdecl;
+ pfnCreateCacheItem : function (hContact:TMCONTACT):PClcCacheEntry; cdecl;
+ pfnCheckCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
+ pfnFreeCacheItem : procedure (_para1:PClcCacheEntry); cdecl;
pfnGetContactDisplayName : function (hContact:TMCONTACT; mode:int):PWideChar; cdecl;
pfnInvalidateDisplayNameCacheEntry : procedure (hContact:TMCONTACT); cdecl;
(* clisttray.c *)
- pfnTrayIconUpdateWithImageList : procedure (iImage:int; szNewTip:TChar; szPreferredProto:PAnsiChar); cdecl;
- pfnTrayIconUpdateBase : procedure (szChangedProto:PAnsiChar); cdecl;
- pfnTrayIconSetToBase : procedure (szPreferredProto:PAnsiChar); cdecl;
- pfnTrayIconIconsChanged : procedure ; cdecl;
- pfnTrayIconPauseAutoHide : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
- pfnTrayIconProcessMessage : function (wParam:WPARAM; lParam:LPARAM):int_ptr; cdecl;
- blablabla5 : procedure; cdecl;
-
- (* clui.c *)
- pfnContactListWndProc:function(hwnd:HWND; msg:uint; wParam:WPARAM; lParam:LPARAM):int; stdcall;
-
- pfnCluiProtocolStatusChanged : procedure (status:int; szProto:PAnsiChar); cdecl;
- pfnDrawMenuItem : procedure (_para1:PDRAWITEMSTRUCT; _para2:HICON; _para3:HICON); cdecl;
- pfnLoadCluiGlobalOpts : procedure ; cdecl;
- pfnInvalidateRect : function (hwnd:HWND; var lpRect:TRECT; bErase:bool):bool; cdecl;
- pfnOnCreateClc : procedure ; cdecl;
-
- (* contact.c *)
- pfnChangeContactIcon : procedure (hContact:TMCONTACT; iIcon:int; add:int); cdecl;
- pfnLoadContactTree : procedure ; cdecl;
- pfnCompareContacts : function (var contact1:TClcContact; var contact2:TClcContact):int; cdecl;
- pfnSetHideOffline : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
-
- (* docking.c *)
- pfnDocking_ProcessWindowMessage : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
+ pfnTrayIconUpdateWithImageList : procedure (iImage:int; szNewTip:TChar; szPreferredProto:PAnsiChar); cdecl;
+ pfnTrayIconUpdateBase : procedure (szChangedProto:PAnsiChar); cdecl;
+ pfnTrayIconSetToBase : procedure (szPreferredProto:PAnsiChar); cdecl;
+ pfnTrayIconIconsChanged : procedure ; cdecl;
+ pfnTrayIconPauseAutoHide : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
+ pfnTrayIconProcessMessage : function (wParam:WPARAM; lParam:LPARAM):int_ptr; cdecl;
+ blablabla5 : procedure; cdecl;
+
+ (* clui.c *)
+ pfnContactListWndProc : function(hwnd:HWND; msg:uint; wParam:WPARAM; lParam:LPARAM):int; stdcall;
+
+ pfnCluiProtocolStatusChanged : procedure (status:int; szProto:PAnsiChar); cdecl;
+ pfnDrawMenuItem : procedure (_para1:PDRAWITEMSTRUCT; _para2:HICON; _para3:HICON); cdecl;
+ pfnLoadCluiGlobalOpts : procedure ; cdecl;
+ pfnInvalidateRect : function (hwnd:HWND; var lpRect:TRECT; bErase:bool):bool; cdecl;
+ pfnOnCreateClc : procedure ; cdecl;
+
+ (* contact.c *)
+ pfnChangeContactIcon : procedure (hContact:TMCONTACT; iIcon:int; add:int); cdecl;
+ pfnLoadContactTree : procedure ; cdecl;
+ pfnCompareContacts : function (var contact1:TClcContact; var contact2:TClcContact):int; cdecl;
+ pfnSetHideOffline : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
+
+ (* docking.c *)
+ pfnDocking_ProcessWindowMessage : function (wParam:WPARAM; lParam:LPARAM):int; cdecl;
(*************************************************************************************
* version 2 - events processing
@@ -432,76 +425,6 @@ type
pfnGetEvent : function (hContact:TMCONTACT; idx:int):PCLISTEVENT; cdecl;
pfnRemoveEvent : function (hContact:TMCONTACT; hDbEvent:TMEVENT):int; cdecl;
- pfnGetImlIconIndex : function (hIcon:HICON):int; cdecl;
-
- (*************************************************************************************
- * version 3 additions
- *************************************************************************************)
-
- pfnGetWindowVisibleState : function (hWnd:HWND; iStepX:int; iStepY:int):int; cdecl;
-
- (*************************************************************************************
- * version 4 additions (0.7.0.x) - genmenu
- *************************************************************************************)
-
- menuProtos : PMenuProto;
- menuProtoCount : int;
-
- hPreBuildStatusMenuEvent : THANDLE;
- currentStatusMenuItem : int;
- currentDesiredStatusMode : int;
- bDisplayLocked : bool;
- bAutoRebuild : bool;
-
- pfnGetProtocolMenu : function (_para1:PAnsiChar):HGENMENU; cdecl;
- pfnGetProtoIndexByPos : function (var proto:PPROTOCOLDESCRIPTOR; protoCnt:int; Pos:int):int; cdecl;
- pfnReloadProtoMenus : procedure ; cdecl;
-
- (*************************************************************************************
- * version 5 additions (0.7.0.x) - tray icons
- *************************************************************************************)
-
- trayIcon : PtrayIconInfo_t;
- trayIconCount : int;
- shellVersion : int;
- cycleTimerId : uint_ptr;
- cycleStep : int;
- szTip : TChar;
- bTrayMenuOnScreen : bool;
-
- pfnGetIconFromStatusMode : function (hContact:TMCONTACT; szProto:PAnsiChar; status:int):HICON; cdecl;
-
- pfnInitTray : procedure ; cdecl;
- pfnUninitTray : procedure ; cdecl;
-
- pfnTrayIconAdd : function (hwnd:HWND; szProto:PAnsiChar; szIconProto:PAnsiChar; status:int):int; cdecl;
- pfnTrayIconDestroy : function (hwnd:HWND):int; cdecl;
- pfnTrayIconInit : function (hwnd:HWND):int; cdecl;
- pfnTrayIconMakeTooltip : function (szPrefix:TChar; szProto:PAnsiChar):TChar; cdecl;
- pfnTrayIconRemove : procedure (hwnd:HWND; szProto:PAnsiChar); cdecl;
- pfnTrayIconSetBaseInfo : function (hIcon:HICON; szPreferredProto:PAnsiChar):int; cdecl;
- pfnTrayIconTaskbarCreated : procedure (hwnd:HWND); cdecl;
- pfnTrayIconUpdate : function (hNewIcon:HICON; szNewTip:TChar;
- szPreferredProto:PAnsiChar; isBase:int):int; cdecl;
-
- pfnTrayCycleTimerProc : procedure(hwnd:HWND;message:uint;idEvent:uint_ptr;dwTime:dword); stdcall;
-
- (*************************************************************************************
- * version 6 additions (0.8.0.x) - accounts
- *************************************************************************************)
- pfnGetAccountIndexByPos : function (pos:int):int; cdecl;
-
- (*************************************************************************************
- * version 7 additions (0.11.0.x) - extra images
- *************************************************************************************)
- pfnReloadExtraIcons: procedure; cdecl;
- pfnSetAllExtraIcons: procedure(hContact:TMCONTACT); cdecl;
-
- (*************************************************************************************
- * Miranda NG additions
- *************************************************************************************)
-
- pfnGetContactIcon: function (hContact:TMCONTACT):int; cdecl;
end;
function Clist_GetInterface : PCLIST_INTERFACE; stdcall; external AppDll;
diff --git a/include/m_clist.h b/include/m_clist.h
index a35d4680e1..43d67477bd 100644
--- a/include/m_clist.h
+++ b/include/m_clist.h
@@ -450,11 +450,16 @@ EXTERN_C MIR_APP_DLL(HMENU) Clist_GroupBuildMenu(void);
EXTERN_C MIR_APP_DLL(void) Clist_EndRebuild(void);
/////////////////////////////////////////////////////////////////////////////////////////
-// do the message processing associated with double clicking a contact
+// does the message processing associated with double clicking a contact
EXTERN_C MIR_APP_DLL(void) Clist_ContactDoubleClicked(MCONTACT hContact);
/////////////////////////////////////////////////////////////////////////////////////////
+// returns the icon's index of specified contact in the internal image list or -1
+
+EXTERN_C MIR_APP_DLL(int) Clist_GetContactIcon(MCONTACT hContact);
+
+/////////////////////////////////////////////////////////////////////////////////////////
// change the group a contact belongs to
// returns 0 on success, nonzero on failure
// use hGroup = NULL to put the contact in no group
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 30a0301348..ef1771a4b7 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -484,7 +484,6 @@ struct CLIST_INTERFACE
/*************************************************************************************
* Miranda NG additions
*************************************************************************************/
- int (*pfnGetContactIcon)(MCONTACT hContact);
int (*pfnTrayCalcChanged)(const char *szChangedProto, int averageMode, int iProtoCount);
void (*pfnSetContactCheckboxes)(ClcContact *cc, int checked);
};
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib
index edb5568706..1cec3160e6 100644
--- a/libs/win32/mir_app.lib
+++ b/libs/win32/mir_app.lib
Binary files differ
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index da9004490c..8da2a03460 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp
index 03be2402e9..553f41a45a 100644
--- a/plugins/Clist_modern/src/init.cpp
+++ b/plugins/Clist_modern/src/init.cpp
@@ -174,7 +174,6 @@ static HRESULT SubclassClistInterface()
pcli->pfnGetContactHiddenStatus = CLVM_GetContactHiddenStatus;
// partialy overloaded - call default handlers from inside
- pcli->pfnGetContactIcon = cli_GetContactIcon;
pcli->pfnIconFromStatusMode = cli_IconFromStatusMode;
pcli->pfnLoadCluiGlobalOpts = CLUI_cli_LoadCluiGlobalOpts;
pcli->pfnLoadClcOptions = cli_LoadCLCOptions;
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 090f7c5284..7cfbdaeddd 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -1317,7 +1317,7 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wPara
static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM lParam)
{
bool needRepaint = false;
- int contacticon = corecli.pfnGetContactIcon(wParam);
+ int contacticon = Clist_GetContactIcon(wParam);
MCONTACT hSelItem = 0;
ClcGroup *selgroup;
@@ -1333,7 +1333,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wParam
bool isVisiblebyFilter = (((style & CLS_SHOWHIDDEN) && nHiddenStatus != -1) || !nHiddenStatus);
bool ifVisibleByClui = !pcli->pfnIsHiddenMode(dat, status);
bool isVisible = (g_CluiData.bFilterEffective & CLVM_FILTER_STATUS) ? TRUE : ifVisibleByClui;
- bool isIconChanged = cli_GetContactIcon(wParam) != LOWORD(lParam);
+ bool isIconChanged = Clist_GetContactIcon(wParam) != LOWORD(lParam);
int shouldShow = isVisiblebyFilter && (isVisible || isIconChanged);
@@ -1513,11 +1513,11 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM
Cache_GetNthLineText(dat, pdnce, 3);
}
- SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon(wParam));
+ SendMessage(hwnd, INTM_ICONCHANGED, wParam, Clist_GetContactIcon(wParam));
if (contact->type == CLCIT_CONTACT) {
if (!contact->bImageIsSpecial && pdnce->getStatus() > ID_STATUS_OFFLINE)
- contact->iImage = corecli.pfnGetContactIcon(wParam);
+ contact->iImage = Clist_GetContactIcon(wParam);
if (contact->iSubNumber && contact->subcontacts && contact->subcontacts->type == CLCIT_CONTACT)
Clist_Broadcast(INTM_STATUSCHANGED, contact->subcontacts->hContact, 0); //forward status changing to host meta contact
}
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp
index 557f4edbe3..9dfe3505b6 100644
--- a/plugins/Clist_modern/src/modern_clcitems.cpp
+++ b/plugins/Clist_modern/src/modern_clcitems.cpp
@@ -61,7 +61,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup)
p.avatar_pos = AVATAR_POS_DONT_HAVE;
Cache_GetAvatar(dat, &p);
- p.iImage = corecli.pfnGetContactIcon(pdnce->hContact);
+ p.iImage = Clist_GetContactIcon(pdnce->hContact);
memset(p.iExtraImage, 0xFF, sizeof(p.iExtraImage));
p.proto = pdnce->szProto;
p.type = CLCIT_CONTACT;
@@ -163,7 +163,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcCacheEntry *pdnce, ClcGroup
Cache_GetAvatar(dat, cont);
Cache_GetText(dat, cont);
Cache_GetTimezone(dat, cont->hContact);
- cont->iImage = corecli.pfnGetContactIcon(hContact);
+ cont->iImage = Clist_GetContactIcon(hContact);
cont->bContactRate = db_get_b(hContact, "CList", "Rate", 0);
}
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp
index a336f326f9..bfc45dcb56 100644
--- a/plugins/Clist_modern/src/modern_clistevents.cpp
+++ b/plugins/Clist_modern/src/modern_clistevents.cpp
@@ -288,7 +288,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
rc.left += 26;
if (g_CluiData.hUpdateContact != 0) {
wchar_t *szName = pcli->pfnGetContactDisplayName(g_CluiData.hUpdateContact, 0);
- int iIcon = cli_GetContactIcon(g_CluiData.hUpdateContact);
+ int iIcon = Clist_GetContactIcon(g_CluiData.hUpdateContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
rc.left += 18;
@@ -303,7 +303,7 @@ static int EventArea_DrawWorker(HWND hWnd, HDC hDC)
NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
wchar_t *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
- int iIcon = cli_GetContactIcon(nmi->hContact);
+ int iIcon = Clist_GetContactIcon(nmi->hContact);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
rc.left += 18;
ske_ImageList_DrawEx(g_himlCListClc, nmi->iIcon, hDC, 4, (rc.bottom + rc.top) / 2 - 8, 16, 16, CLR_NONE, CLR_NONE, ILD_NORMAL);
@@ -366,7 +366,7 @@ static LRESULT CALLBACK EventArea_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
if (GetMenuItemInfoA(g_CluiData.hMenuNotify, (UINT)dis->itemID, FALSE, &mii) != 0) {
NotifyMenuItemExData *nmi = (NotifyMenuItemExData *)mii.dwItemData;
if (nmi) {
- int iIcon = cli_GetContactIcon(nmi->hContact);
+ int iIcon = Clist_GetContactIcon(nmi->hContact);
ske_ImageList_DrawEx(g_himlCListClc, nmi->iIcon, dis->hDC, 2, (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
ske_ImageList_DrawEx(g_himlCListClc, iIcon, dis->hDC, 2 + GetSystemMetrics(SM_CXSMICON) + 2, (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);
return TRUE;
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp
index 650bd4181a..7d1bf35620 100644
--- a/plugins/Clist_modern/src/modern_clistmod.cpp
+++ b/plugins/Clist_modern/src/modern_clistmod.cpp
@@ -105,14 +105,6 @@ int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact)
return corecli.pfnIconFromStatusMode(szProto, nStatus, 0);
}
-int cli_GetContactIcon(MCONTACT hContact)
-{
- int res = corecli.pfnGetContactIcon(hContact);
- if (res != -1)
- res &= 0xFFFF;
- return res;
-}
-
int GetContactIconC(ClcCacheEntry *p)
{
return pcli->pfnIconFromStatusMode(p->szProto, p->szProto == nullptr ? ID_STATUS_OFFLINE : p->m_iStatus, p->hContact);
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h
index d1cdfe9726..0a3245518b 100644
--- a/plugins/Clist_modern/src/modern_commonprototypes.h
+++ b/plugins/Clist_modern/src/modern_commonprototypes.h
@@ -233,7 +233,6 @@ int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly);
int cliFindRowByText(HWND hwnd, ClcData *dat, const wchar_t *text, int prefixOk);
int cliGetRowsPriorTo(ClcGroup *group, ClcGroup *subgroup, int contactIndex);
int cli_IconFromStatusMode(const char *szProto, int nStatus, MCONTACT hContact);
-int cli_GetContactIcon(MCONTACT hContact);
int cli_RemoveEvent(MCONTACT hContact, MEVENT hDbEvent);
void cli_FreeContact(ClcContact*);
void cli_SetContactCheckboxes(ClcContact*, int);
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index d1c94a1ff9..c56b4265d7 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -320,7 +320,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
int shouldShow = (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN ||
!CLVM_GetContactHiddenStatus(hContact, szProto, dat)) && ((cfg::dat.bFilterEffective ? TRUE : !pcli->pfnIsHiddenMode(dat, status)) ||
- pcli->pfnGetContactIcon(hContact) != lParam); // XXX CLVM changed - this means an offline msg is flashing, so the contact should be shown
+ Clist_GetContactIcon(hContact) != lParam); // XXX CLVM changed - this means an offline msg is flashing, so the contact should be shown
if (!Clist_FindItem(hwnd, dat, hContact, &contact, &group, nullptr)) {
if (shouldShow && db_is_contact(wParam)) {
@@ -377,7 +377,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
if (contact->bIsMeta && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
contact->hSubContact = db_mc_getMostOnline(contact->hContact);
contact->metaProto = GetContactProto(contact->hSubContact);
- contact->iImage = pcli->pfnGetContactIcon(contact->hSubContact);
+ contact->iImage = Clist_GetContactIcon(contact->hSubContact);
if (contact->pExtra) {
TExtraCache *pSub = cfg::getCache(contact->hSubContact, contact->metaProto);
ClcContact *subContact;
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp
index a85e549302..45eb501421 100644
--- a/plugins/Clist_nicer/src/clcitems.cpp
+++ b/plugins/Clist_nicer/src/clcitems.cpp
@@ -108,10 +108,10 @@ ClcContact* AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hCo
if (p->bIsMeta && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
p->hSubContact = db_mc_getMostOnline(hContact);
p->metaProto = GetContactProto(p->hSubContact);
- p->iImage = pcli->pfnGetContactIcon(p->hSubContact);
+ p->iImage = Clist_GetContactIcon(p->hSubContact);
}
else {
- p->iImage = pcli->pfnGetContactIcon(hContact);
+ p->iImage = Clist_GetContactIcon(hContact);
p->metaProto = nullptr;
}
diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp
index 2aceaab9ee..88dbc9f368 100644
--- a/plugins/Clist_nicer/src/clcpaint.cpp
+++ b/plugins/Clist_nicer/src/clcpaint.cpp
@@ -201,7 +201,7 @@ void PaintNotifyArea(HDC hDC, RECT *rc)
int iCount = GetMenuItemCount(cfg::dat.hMenuNotify);
if (cfg::dat.hUpdateContact != 0) {
wchar_t *szName = pcli->pfnGetContactDisplayName(cfg::dat.hUpdateContact, 0);
- int iIcon = pcli->pfnGetContactIcon(cfg::dat.hUpdateContact);
+ int iIcon = Clist_GetContactIcon(cfg::dat.hUpdateContact);
ImageList_DrawEx(hCListImages, iIcon, hDC, rc->left, (rc->bottom + rc->top - g_cysmIcon) / 2, g_cxsmIcon, g_cysmIcon, CLR_NONE, CLR_NONE, ILD_NORMAL);
rc->left += 18;
@@ -216,7 +216,7 @@ void PaintNotifyArea(HDC hDC, RECT *rc)
NotifyMenuItemExData *nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
wchar_t *szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);
- int iIcon = pcli->pfnGetContactIcon(nmi->hContact);
+ int iIcon = Clist_GetContactIcon(nmi->hContact);
ImageList_DrawEx(hCListImages, iIcon, hDC, rc->left, (rc->bottom + rc->top - g_cysmIcon) / 2, g_cxsmIcon, g_cysmIcon, CLR_NONE, CLR_NONE, ILD_NORMAL);
rc->left += 18;
ImageList_DrawEx(hCListImages, nmi->iIcon, hDC, 4, (rc->bottom + rc->top) / 2 - 8, 16, 16, CLR_NONE, CLR_NONE, ILD_NORMAL);
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp
index d9856cec30..4f3cfee501 100644
--- a/plugins/Clist_nicer/src/clistevents.cpp
+++ b/plugins/Clist_nicer/src/clistevents.cpp
@@ -118,7 +118,7 @@ LRESULT CALLBACK EventAreaWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
if (GetMenuItemInfoA(cfg::dat.hMenuNotify, (UINT)dis->itemID, FALSE, &mii) != 0) {
nmi = (struct NotifyMenuItemExData *) mii.dwItemData;
if (nmi) {
- iIcon = pcli->pfnGetContactIcon(nmi->hContact);
+ iIcon = Clist_GetContactIcon(nmi->hContact);
hIcon = ImageList_GetIcon(hCListImages, iIcon, ILD_NORMAL);
pcli->pfnDrawMenuItem(dis, hIcon, nmi->hIcon);
return TRUE;
diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp
index 4770696e65..ea2702ecd9 100644
--- a/plugins/FavContacts/src/menu.cpp
+++ b/plugins/FavContacts/src/menu.cpp
@@ -242,7 +242,7 @@ static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = nullp
char *proto = GetContactProto(hContact);
HIMAGELIST hIml = Clist_GetImageList();
- int iIcon = pcli->pfnGetContactIcon(hContact);
+ int iIcon = Clist_GetContactIcon(hContact);
if (db_get_dw(hContact, proto, "IdleTS", 0)) {
ImageList_DrawDimmed(hIml, iIcon, hdcTemp,
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp
index 46a593c656..33c49626f9 100644
--- a/plugins/FloatingContacts/src/thumbs.cpp
+++ b/plugins/FloatingContacts/src/thumbs.cpp
@@ -300,8 +300,8 @@ void ThumbInfo::ResizeThumb()
void ThumbInfo::RefreshContactIcon(int _iIcon)
{
- if (_iIcon == 0xFFFFFFFF || ImageList_GetImageCount(himlMiranda) <= _iIcon)
- iIcon = pcli->pfnGetContactIcon(hContact);
+ if (_iIcon == -1 || ImageList_GetImageCount(himlMiranda) <= _iIcon)
+ iIcon = Clist_GetContactIcon(hContact);
else
iIcon = _iIcon;
diff --git a/plugins/HistoryPlusPlus/GlobalSearch.pas b/plugins/HistoryPlusPlus/GlobalSearch.pas
index 5beb129b1d..05952b571e 100644
--- a/plugins/HistoryPlusPlus/GlobalSearch.pas
+++ b/plugins/HistoryPlusPlus/GlobalSearch.pas
@@ -532,7 +532,7 @@ begin
li.Caption := LastAddedContact.Name;
Inc(ContactsFound);
end;
- li.ImageIndex := cli^.pfnGetContactIcon(CurContact);
+ li.ImageIndex := Clist_GetContactIcon(CurContact);
li.Data := Pointer(CurContact);
end;
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp
index 464a2881cf..a5330645b9 100644
--- a/plugins/NewAwaySysMod/src/ContactList.cpp
+++ b/plugins/NewAwaySysMod/src/ContactList.cpp
@@ -371,7 +371,7 @@ HTREEITEM CCList::AddContact(MCONTACT hContact)
tvIns.item.pszText = pcli->pfnGetContactDisplayName(hContact, 0);
tvIns.hInsertAfter = TVI_ROOT;
tvIns.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
- tvIns.item.iImage = tvIns.item.iSelectedImage = pcli->pfnGetContactIcon(hContact);
+ tvIns.item.iImage = tvIns.item.iSelectedImage = Clist_GetContactIcon(hContact);
tvIns.item.lParam = Items.AddElem(CCLItemData(hContact));
return TreeView_InsertItem(hTreeView, &tvIns);
}
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 629faddd9a..4b4c689f3c 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -436,7 +436,7 @@ void EnableButtons(HWND hwndDlg, MCONTACT hContact)
EnableWindow(GetDlgItem(hwndDlg, IDC_HISTORY), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_MENU), TRUE);
- HICON ico = ImageList_GetIcon(hIml, pcli->pfnGetContactIcon(hContact), ILD_IMAGE);
+ HICON ico = ImageList_GetIcon(hIml, Clist_GetContactIcon(hContact), ILD_IMAGE);
SendDlgItemMessage(hwndDlg, IDC_ICO, STM_SETICON, (WPARAM)ico, 0);
}
}
@@ -966,7 +966,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
// Draw icon
rc.left = lpdis->rcItem.left + 5;
rc.top = (lpdis->rcItem.bottom + lpdis->rcItem.top - icon_height) / 2;
- ImageList_Draw(hIml, pcli->pfnGetContactIcon(contacts[lpdis->itemData]->hcontact), lpdis->hDC, rc.left, rc.top, ILD_NORMAL);
+ ImageList_Draw(hIml, Clist_GetContactIcon(contacts[lpdis->itemData]->hcontact), lpdis->hDC, rc.left, rc.top, ILD_NORMAL);
// Make rect for text
rc.left += icon_width + 5;
diff --git a/plugins/QuickSearch/sr_window.pas b/plugins/QuickSearch/sr_window.pas
index e1d44f8e11..2aa6e6238c 100644
--- a/plugins/QuickSearch/sr_window.pas
+++ b/plugins/QuickSearch/sr_window.pas
@@ -123,7 +123,7 @@ begin
FillChar(li,SizeOf(li),0);
li.iItem :=100000; //!! need append
li.mask :=LVIF_IMAGE or LVIF_PARAM;
- li.iImage:=cli^.pfnGetContactIcon(hContact);
+ li.iImage:=Clist_GetContactIcon(hContact);
li.lParam:=num;
li.iItem :=SendMessageW(grid,LVM_INSERTITEMW,0,lparam(@li));
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 89e281b136..01c1330e71 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -248,7 +248,7 @@ INT_PTR CALLBACK ShowListMainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM
str = _A2T(strtim);
str += cname;
lvi.pszText = (LPTSTR)str.c_str();
- lvi.iImage = pcli->pfnGetContactIcon(curContact->second);
+ lvi.iImage = Clist_GetContactIcon(curContact->second);
ListView_InsertItem(hList, &lvi);
i++;
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp
index 8f202e7f61..c24473164e 100644
--- a/plugins/SeenPlugin/src/missed.cpp
+++ b/plugins/SeenPlugin/src/missed.cpp
@@ -52,7 +52,7 @@ int ResetMissed(void)
int CheckIfOnline(void)
{
for (auto &hContact : Contacts())
- if (pcli->pfnGetContactIcon(hContact) != ICON_OFFLINE)
+ if (Clist_GetContactIcon(hContact) != ICON_OFFLINE)
db_set_b(hContact, S_MOD, "Missed", 2);
return 0;
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 9fa2057686..de2d28047b 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -298,7 +298,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
pwd->iIndent = opt.iTextIndent;
pwd->iSidebarWidth = opt.iSidebarWidth;
pwd->hContact = (DWORD_PTR)pwd->clcit.hItem;
- pwd->iIconIndex = pcli->pfnGetContactIcon(pwd->hContact);
+ pwd->iIconIndex = Clist_GetContactIcon(pwd->hContact);
// don't use stored status message
if (!opt.bWaitForContent)
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 90c37c5913..5fe2cd43d2 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
// this means an offline msg is flashing, so the contact should be shown
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
int shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b(wParam, "CList", "Hidden", 0))
- && (!cli.pfnIsHiddenMode(dat, status) || cli.pfnGetContactIcon(wParam) != lParam);
+ && (!cli.pfnIsHiddenMode(dat, status) || Clist_GetContactIcon(wParam) != lParam);
contact = nullptr;
group = nullptr;
diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h
index 3b82c9c07d..6a3dbe6e0f 100644
--- a/src/mir_app/src/clc.h
+++ b/src/mir_app/src/clc.h
@@ -143,7 +143,6 @@ int fnGetImlIconIndex(HICON hIcon);
int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent);
/* clistmod.c */
-int fnGetContactIcon(MCONTACT hContact);
int fnIconFromStatusMode(const char *szProto, int status, MCONTACT hContact);
int fnShowHide(void);
HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status);
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 4a6a537463..15edcc8975 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -186,7 +186,7 @@ ClcContact* fnAddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact
ClcContact *cc = cli.pfnAddItemToGroup(group, index + 1);
cc->type = CLCIT_CONTACT;
- cc->iImage = cli.pfnGetContactIcon(hContact);
+ cc->iImage = Clist_GetContactIcon(hContact);
cc->hContact = hContact;
cc->proto = szProto;
cc->pce = pce;
diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp
index afac74bb60..780b692aa1 100644
--- a/src/mir_app/src/clistcore.cpp
+++ b/src/mir_app/src/clistcore.cpp
@@ -126,7 +126,6 @@ void InitClistCore()
cli.pfnLoadClcOptions = fnLoadClcOptions;
cli.pfnRecalculateGroupCheckboxes = fnRecalculateGroupCheckboxes;
cli.pfnSetGroupChildCheckboxes = fnSetGroupChildCheckboxes;
- cli.pfnSetContactCheckboxes = fnSetContactCheckboxes;
cli.pfnInvalidateItem = fnInvalidateItem;
cli.pfnGetRowBottomY = fnGetRowBottomY;
cli.pfnGetRowHeight = fnGetRowHeight;
@@ -166,7 +165,6 @@ void InitClistCore()
cli.pfnTrayIconTaskbarCreated = fnTrayIconTaskbarCreated;
cli.pfnTrayIconUpdate = fnTrayIconUpdate;
cli.pfnTrayIconUpdateBase = fnTrayIconUpdateBase;
- cli.pfnTrayCalcChanged = fnTrayCalcChanged;
cli.pfnTrayIconUpdateWithImageList = fnTrayIconUpdateWithImageList;
cli.pfnContactListWndProc = fnContactListWndProc;
@@ -196,7 +194,8 @@ void InitClistCore()
cli.pfnReloadExtraIcons = fnReloadExtraIcons;
cli.pfnSetAllExtraIcons = fnSetAllExtraIcons;
- cli.pfnGetContactIcon = fnGetContactIcon;
+ cli.pfnTrayCalcChanged = fnTrayCalcChanged;
+ cli.pfnSetContactCheckboxes = fnSetContactCheckboxes;
}
MIR_APP_DLL(CLIST_INTERFACE*) Clist_GetInterface(void)
diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp
index c000f1462f..23ad631518 100644
--- a/src/mir_app/src/clistevents.cpp
+++ b/src/mir_app/src/clistevents.cpp
@@ -212,7 +212,7 @@ int fnRemoveEvent(MCONTACT hContact, MEVENT dbEvent)
// Update contact's icon
char *szProto = GetContactProto(hContact);
- cli.pfnChangeContactIcon(pEvent->hContact, cli.pfnGetContactIcon(pEvent->hContact));
+ cli.pfnChangeContactIcon(pEvent->hContact, Clist_GetContactIcon(pEvent->hContact));
// Free any memory allocated to the event
g_cliEvents.remove(pEvent);
diff --git a/src/mir_app/src/clistmod.cpp b/src/mir_app/src/clistmod.cpp
index 5e2ee7c22f..9681a2c8d9 100644
--- a/src/mir_app/src/clistmod.cpp
+++ b/src/mir_app/src/clistmod.cpp
@@ -151,13 +151,13 @@ int fnIconFromStatusMode(const char *szProto, int status, MCONTACT)
return index + 1;
for (auto &it : protoIconIndex)
- if (mir_strcmp(szProto, it->szProto) == 0)
+ if (!mir_strcmp(szProto, it->szProto))
return it->iIconBase + index;
return 1;
}
-int fnGetContactIcon(MCONTACT hContact)
+MIR_APP_DLL(int) Clist_GetContactIcon(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
return cli.pfnIconFromStatusMode(szProto,
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index 29811574ae..954202464d 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -282,7 +282,7 @@ int Meta_ModifyMenu(WPARAM hMeta, LPARAM)
}
else ptszName = cli.pfnGetContactDisplayName(hContact, 0);
- HICON hIcon = ImageList_GetIcon(hCListImages, cli.pfnGetContactIcon(hContact), 0);
+ HICON hIcon = ImageList_GetIcon(hCListImages, Clist_GetContactIcon(hContact), 0);
Menu_ModifyItem(hMenuContact[i], ptszName, hIcon, 0);
DestroyIcon(hIcon);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index cd44fb5702..8e5792b29f 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -536,3 +536,4 @@ Proto_SetUniqueId @549
Clist_GetProtocolVisibility @556
?Accounts@@YGAAU?$LIST@UPROTOACCOUNT@@@@XZ @557 NONAME
Clist_InitAutoRebuild @558
+Clist_GetContactIcon @559
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 2e25954dc0..f79999b61b 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -536,3 +536,4 @@ Proto_SetUniqueId @549
Clist_GetProtocolVisibility @556
?Accounts@@YAAEAU?$LIST@UPROTOACCOUNT@@@@XZ @557 NONAME
Clist_InitAutoRebuild @558
+Clist_GetContactIcon @559