From 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 20:47:51 +0000 Subject: HCONTACT is not needed anymore git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/hdr/modern_awaymsg.h | 2 +- plugins/Clist_modern/src/hdr/modern_cache_funcs.h | 4 +- plugins/Clist_modern/src/hdr/modern_clc.h | 12 +-- plugins/Clist_modern/src/hdr/modern_clist.h | 6 +- .../Clist_modern/src/hdr/modern_commonheaders.h | 10 +-- .../Clist_modern/src/hdr/modern_commonprototypes.h | 38 ++++----- plugins/Clist_modern/src/hdr/modern_gettextasync.h | 4 +- .../Clist_modern/src/hdr/modern_global_structure.h | 2 +- .../Clist_modern/src/hdr/modern_skinned_profile.h | 8 +- plugins/Clist_modern/src/modern_aniavatars.cpp | 14 ++-- plugins/Clist_modern/src/modern_awaymsg.cpp | 10 +-- plugins/Clist_modern/src/modern_cachefuncs.cpp | 4 +- plugins/Clist_modern/src/modern_clc.cpp | 92 +++++++++++----------- plugins/Clist_modern/src/modern_clcidents.cpp | 6 +- plugins/Clist_modern/src/modern_clcitems.cpp | 34 ++++---- plugins/Clist_modern/src/modern_clcmsgs.cpp | 2 +- plugins/Clist_modern/src/modern_clistevents.cpp | 4 +- plugins/Clist_modern/src/modern_clistmenus.cpp | 8 +- plugins/Clist_modern/src/modern_clistmod.cpp | 12 +-- plugins/Clist_modern/src/modern_clistsettings.cpp | 30 +++---- plugins/Clist_modern/src/modern_clui.cpp | 6 +- plugins/Clist_modern/src/modern_contact.cpp | 10 +-- plugins/Clist_modern/src/modern_gettextasync.cpp | 6 +- .../Clist_modern/src/modern_rowheight_funcs.cpp | 4 +- plugins/Clist_modern/src/modern_skinengine.cpp | 8 +- plugins/Clist_modern/src/modern_viewmodebar.cpp | 12 +-- 26 files changed, 174 insertions(+), 174 deletions(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/hdr/modern_awaymsg.h b/plugins/Clist_modern/src/hdr/modern_awaymsg.h index df40446f2c..702358721c 100644 --- a/plugins/Clist_modern/src/hdr/modern_awaymsg.h +++ b/plugins/Clist_modern/src/hdr/modern_awaymsg.h @@ -34,4 +34,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void InitAwayMsgModule(); void UninitAwayMsgModule(); -void amRequestAwayMsg(HCONTACT hContact); +void amRequestAwayMsg(MCONTACT hContact); diff --git a/plugins/Clist_modern/src/hdr/modern_cache_funcs.h b/plugins/Clist_modern/src/hdr/modern_cache_funcs.h index 9b32eb6788..24dc9db73d 100644 --- a/plugins/Clist_modern/src/hdr/modern_cache_funcs.h +++ b/plugins/Clist_modern/src/hdr/modern_cache_funcs.h @@ -37,11 +37,11 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact); void Cache_GetSecondLineText(struct SHORTDATA *dat, ClcCacheEntry *pdnce); void Cache_GetThirdLineText(struct SHORTDATA *dat, ClcCacheEntry *pdnce); void Cache_GetAvatar(ClcData *dat, ClcContact *contact); -void Cache_GetTimezone(ClcData *dat, HCONTACT hContact); +void Cache_GetTimezone(ClcData *dat, MCONTACT hContact); int Cache_GetLineText(ClcCacheEntry *pdnce, int type, LPTSTR text, int text_size, TCHAR *variable_text, BOOL xstatus_has_priority, BOOL show_status_if_no_away, BOOL show_listening_if_no_away, BOOL use_name_and_message_for_xstatus, BOOL pdnce_time_show_only_if_different); -void amRequestAwayMsg(HCONTACT hContact); +void amRequestAwayMsg(MCONTACT hContact); #endif // __CACHE_FUNCS_H__ diff --git a/plugins/Clist_modern/src/hdr/modern_clc.h b/plugins/Clist_modern/src/hdr/modern_clc.h index 2e8cfe1224..5cffd61852 100644 --- a/plugins/Clist_modern/src/hdr/modern_clc.h +++ b/plugins/Clist_modern/src/hdr/modern_clc.h @@ -396,7 +396,7 @@ void ClcOptionsChanged(void); //clcidents.c int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex); -int FindItem(HWND hwnd, ClcData *dat, HCONTACT hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible, BOOL isIgnoreSubcontacts); +int FindItem(HWND hwnd, ClcData *dat, MCONTACT hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible, BOOL isIgnoreSubcontacts); int cliGetRowByIndex(ClcData *dat,int testindex,ClcContact **contact,ClcGroup **subgroup); HANDLE ContactToHItem(ClcContact *contact); HANDLE ContactToItemHandle(ClcContact *contact,DWORD *nmFlags); @@ -407,8 +407,8 @@ ClcGroup *cli_AddGroup(HWND hwnd,ClcData *dat,const TCHAR *szName,DWORD flags,in void cli_FreeGroup(ClcGroup *group); int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText); void cliRebuildEntireList(HWND hwnd, ClcData *dat); -void cli_DeleteItemFromTree(HWND hwnd, HCONTACT hItem); -void cli_AddContactToTree(HWND hwnd,ClcData *dat,HCONTACT hContact,int updateTotalCount,int checkHideOffline); +void cli_DeleteItemFromTree(HWND hwnd, MCONTACT hItem); +void cli_AddContactToTree(HWND hwnd,ClcData *dat,MCONTACT hContact,int updateTotalCount,int checkHideOffline); void cli_SortCLC(HWND hwnd,ClcData *dat,int useInsertionSort); int GetNewSelection(ClcGroup *group,int selection, int direction); @@ -433,13 +433,13 @@ DWORD GetDefaultExStyle(void); void GetFontSetting(int i,LOGFONT *lf,COLORREF *colour,BYTE *effect, COLORREF *eColour1,COLORREF *eColour2); //clistsettings.c -TCHAR * GetContactDisplayNameW(HCONTACT hContact, int mode ); +TCHAR * GetContactDisplayNameW(MCONTACT hContact, int mode ); //groups.c TCHAR* GetGroupNameTS( int idx, DWORD* pdwFlags ); int RenameGroupT(WPARAM groupID, LPARAM newName); -int GetContactCachedStatus(HCONTACT hContact); -char *GetContactCachedProtocol(HCONTACT hContact); +int GetContactCachedStatus(MCONTACT hContact); +char *GetContactCachedProtocol(MCONTACT hContact); #endif /* _CLC_H_ */ diff --git a/plugins/Clist_modern/src/hdr/modern_clist.h b/plugins/Clist_modern/src/hdr/modern_clist.h index 1c6c5923e8..65cfaeb76e 100644 --- a/plugins/Clist_modern/src/hdr/modern_clist.h +++ b/plugins/Clist_modern/src/hdr/modern_clist.h @@ -28,9 +28,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _CLIST_H_ void LoadContactTree(void); -HTREEITEM GetTreeItemByHContact(HCONTACT hContact); -void cli_ChangeContactIcon(HCONTACT hContact,int iIcon,int add); -int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Status); +HTREEITEM GetTreeItemByHContact(MCONTACT hContact); +void cli_ChangeContactIcon(MCONTACT hContact,int iIcon,int add); +int GetContactInfosForSort(MCONTACT hContact,char **Proto,TCHAR **Name,int *Status); /////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h index 636388c61a..320010f101 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h +++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h @@ -241,14 +241,14 @@ int AniAva_InitModule(); // HAVE TO BE AFTER GDI+ INITIALIZED int AniAva_UnloadModule(); int AniAva_UpdateOptions(); //reload options, //hot enable/disable engine -int AniAva_AddAvatar(HCONTACT hContact, TCHAR * szFilename, int width, int heigth); // adds avatars to be displayed -int AniAva_SetAvatarPos(HCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha); // update avatars pos -int AniAva_InvalidateAvatarPositions(HCONTACT hContact); // reset positions of avatars to be drawn (still be painted at same place) +int AniAva_AddAvatar(MCONTACT hContact, TCHAR * szFilename, int width, int heigth); // adds avatars to be displayed +int AniAva_SetAvatarPos(MCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha); // update avatars pos +int AniAva_InvalidateAvatarPositions(MCONTACT hContact); // reset positions of avatars to be drawn (still be painted at same place) int AniAva_RemoveInvalidatedAvatars(); // all avatars without validated position will be stop painted and probably removed -int AniAva_RemoveAvatar(HCONTACT hContact); // remove avatar +int AniAva_RemoveAvatar(MCONTACT hContact); // remove avatar int AniAva_RedrawAllAvatars(BOOL updateZOrder); // request to repaint all void AniAva_UpdateParent(); -int AniAva_RenderAvatar(HCONTACT hContact, HDC hdcMem, RECT *rc ); +int AniAva_RenderAvatar(MCONTACT hContact, HDC hdcMem, RECT *rc ); #define CCI_NAME 1 #define CCI_GROUP (1<<1) diff --git a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h index 838686b5d7..e6998c3a95 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h @@ -207,21 +207,21 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); //RowTemplate.c BOOL FindMenuHanleByGlobalID(HMENU hMenu, int globalID, struct _MenuItemHandles * dat); //GenMenu.c BOOL MatchMask(char *name, char *mask); //mod_skin_selector.c -char* GetContactCachedProtocol(HCONTACT hContact); //clistsettings.c +char* GetContactCachedProtocol(MCONTACT hContact); //clistsettings.c char* GetParamN(char *string, char *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces); //mod_skin_selector.c WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim, BOOL SkipSpaces); -DWORD CompareContacts2_getLMTime(HCONTACT u); //contact.c +DWORD CompareContacts2_getLMTime(MCONTACT u); //contact.c DWORD mod_CalcHash(const char * a); //mod_skin_selector.c -HICON cliGetIconFromStatusMode(HCONTACT hContact, const char *szProto,int status); //clistmod.c +HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto,int status); //clistmod.c HICON GetMainStatusOverlay(int STATUS); //clc.c -int __fastcall CLVM_GetContactHiddenStatus(HCONTACT hContact, char *szStatus, ClcData *dat); //clcitems.c +int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szStatus, ClcData *dat); //clcitems.c int BgStatusBarChange(WPARAM wParam,LPARAM lParam); //clcopts.c -int ClcDoProtoAck(HCONTACT wParam, ACKDATA *ack); //clc.c +int ClcDoProtoAck(MCONTACT wParam, ACKDATA *ack); //clc.c int ModernSkinButtonDeleteAll(); //modernbutton.c -int GetContactCachedStatus(HCONTACT hContact); //clistsettings.c +int GetContactCachedStatus(MCONTACT hContact); //clistsettings.c int GetContactIconC(ClcCacheEntry *cacheEntry); //clistmod.c int GetContactIndex(ClcGroup *group,ClcContact *contact); //clcidents.c -int GetStatusForContact(HCONTACT hContact,char *szProto); //clistsettings.c +int GetStatusForContact(MCONTACT hContact,char *szProto); //clistsettings.c int InitCustomMenus(void); //clistmenus.c int InitFramesMenus(void); //framesmenus.c int LoadMoveToGroup(); //movetogroup.c @@ -247,7 +247,7 @@ void Docking_GetMonitorRectFromWindow(HWND hWnd,RECT *rc); void DrawAvatarImageWithGDIp(HDC hDestDC,int x, int y, DWORD width, DWORD height, HBITMAP hbmp, int x1, int y1, DWORD width1, DWORD height1,DWORD flag,BYTE alpha); //gdiplus.cpp void FreeRowCell(); //RowHeight void InitGdiPlus(); //gdiplus.cpp -void InvalidateDNCEbyPointer(HCONTACT hContact,ClcCacheEntry *pdnce,int SettingType); //clistsettings.c +void InvalidateDNCEbyPointer(MCONTACT hContact,ClcCacheEntry *pdnce,int SettingType); //clistsettings.c void ShutdownGdiPlus(); //gdiplus.cpp void UninitCustomMenus(); //clistmenus.c void UnloadAvatarOverlayIcon(); //clc.c @@ -255,7 +255,7 @@ void UnLoadContactListModule(); / void UpdateAllAvatars(ClcData *dat); //cache_func.c //cluiframes.c -void gtaRenewText(HCONTACT hContact); +void gtaRenewText(MCONTACT hContact); int ExtraImage_ExtraIDToColumnNum(int extra); int LoadSkinButtonModule(); @@ -281,15 +281,15 @@ int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText); int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly); int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk); int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex); -int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact); -int cli_GetContactIcon(HCONTACT hContact); -int cli_RemoveEvent(HCONTACT hContact, HANDLE hDbEvent); -void cli_AddContactToTree(HWND hwnd,ClcData *dat,HCONTACT hContact,int updateTotalCount,int checkHideOffline); -void cli_DeleteItemFromTree(HWND hwnd, HCONTACT hItem); +int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact); +int cli_GetContactIcon(MCONTACT hContact); +int cli_RemoveEvent(MCONTACT hContact, HANDLE hDbEvent); +void cli_AddContactToTree(HWND hwnd,ClcData *dat,MCONTACT hContact,int updateTotalCount,int checkHideOffline); +void cli_DeleteItemFromTree(HWND hwnd, MCONTACT hItem); void cli_FreeContact( ClcContact* ); void cli_FreeGroup( ClcGroup* ); char* cli_GetGroupCountsText(ClcData *dat, ClcContact *contact); -void cli_ChangeContactIcon(HCONTACT hContact,int iIcon,int add); +void cli_ChangeContactIcon(MCONTACT hContact,int iIcon,int add); LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam); struct CListEvent* cliCreateEvent( void ); struct CListEvent* cli_AddEvent(CLISTEVENT *cle); @@ -302,7 +302,7 @@ int cliTrayCalcChanged(const char *szChangedProto, int averageMode, int netP int cliTrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam); void cliCluiProtocolStatusChanged(int status,const char * proto); HMENU cliBuildGroupPopupMenu(ClcGroup *group); -void cliInvalidateDisplayNameCacheEntry(HCONTACT hContact); +void cliInvalidateDisplayNameCacheEntry(MCONTACT hContact); void cliCheckCacheItem(ClcCacheEntry *pdnce); void cli_SaveStateAndRebuildList(HWND hwnd, ClcData *dat); void CLUI_cli_LoadCluiGlobalOpts(void); @@ -310,8 +310,8 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam); BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase ); ClcContact* cliCreateClcContact( void ); -ClcCacheEntry* cliCreateCacheItem(HCONTACT hContact); -ClcCacheEntry* cliGetCacheEntry(HCONTACT hContact); +ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact); +ClcCacheEntry* cliGetCacheEntry(MCONTACT hContact); #define WM_DWMCOMPOSITIONCHANGED 0x031E @@ -332,7 +332,7 @@ extern tPaintCallbackProc CLCPaint_PaintCallbackProc(HWND hWnd, HDC hDC, RECT *r /* SkinEngine.c */ -BYTE SkinDBGetContactSettingByte(HCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault); +BYTE SkinDBGetContactSettingByte(MCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault); extern OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1]; extern OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1]; diff --git a/plugins/Clist_modern/src/hdr/modern_gettextasync.h b/plugins/Clist_modern/src/hdr/modern_gettextasync.h index 4e8c7c6ed5..386b721b19 100644 --- a/plugins/Clist_modern/src/hdr/modern_gettextasync.h +++ b/plugins/Clist_modern/src/hdr/modern_gettextasync.h @@ -1,5 +1,5 @@ #pragma once void InitCacheAsync(); void UninitCacheAsync(); -void gtaRenewText(HCONTACT hContact); -int gtaAddRequest(ClcData *dat,ClcContact *contact,HCONTACT hContact); +void gtaRenewText(MCONTACT hContact); +int gtaAddRequest(ClcData *dat,ClcContact *contact,MCONTACT hContact); diff --git a/plugins/Clist_modern/src/hdr/modern_global_structure.h b/plugins/Clist_modern/src/hdr/modern_global_structure.h index 7be8dd2ff8..10b238cbfa 100644 --- a/plugins/Clist_modern/src/hdr/modern_global_structure.h +++ b/plugins/Clist_modern/src/hdr/modern_global_structure.h @@ -18,7 +18,7 @@ typedef struct tagCLUIDATA DWORD dwFlags; TCHAR *szNoEvents; int hIconNotify; - HCONTACT hUpdateContact; + MCONTACT hUpdateContact; /* Contact List View Mode */ TCHAR groupFilter[2048]; diff --git a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h b/plugins/Clist_modern/src/hdr/modern_skinned_profile.h index 0eebf53cba..20d662aee7 100644 --- a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h +++ b/plugins/Clist_modern/src/hdr/modern_skinned_profile.h @@ -233,10 +233,10 @@ public: HRESULT Init(); HRESULT Clear(); - static BYTE SpiGetSkinByte (HCONTACT hContact, const char * szSection, const char * szKey, const BYTE defValue ); - static WORD SpiGetSkinWord (HCONTACT hContact, const char * szSection, const char * szKey, const WORD defValue ); - static DWORD SpiGetSkinDword(HCONTACT hContact, const char * szSection, const char * szKey, const DWORD defValue ); - static BOOL SpiCheckSkinned(HCONTACT hContact, const char * szSection, const char * szKey ); + static BYTE SpiGetSkinByte (MCONTACT hContact, const char * szSection, const char * szKey, const BYTE defValue ); + static WORD SpiGetSkinWord (MCONTACT hContact, const char * szSection, const char * szKey, const WORD defValue ); + static DWORD SpiGetSkinDword(MCONTACT hContact, const char * szSection, const char * szKey, const DWORD defValue ); + static BOOL SpiCheckSkinned(MCONTACT hContact, const char * szSection, const char * szKey ); }; diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 1a27ac5079..03bd11a014 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -60,7 +60,7 @@ enum { struct ANIAVA_OBJECT { - HCONTACT hContact; + MCONTACT hContact; HWND hWindow; BOOL bInvalidPos; BOOL bToBeDeleted; @@ -284,7 +284,7 @@ int AniAva_UpdateOptions() } // adds avatars to be displayed -int AniAva_AddAvatar(HCONTACT hContact, TCHAR * szFilename, int width, int heigth) +int AniAva_AddAvatar(MCONTACT hContact, TCHAR * szFilename, int width, int heigth) { aacheck 0; if (!GDIPlus_IsAnimatedGif (szFilename)) @@ -344,7 +344,7 @@ void AniAva_UpdateParent() } } -ANIAVA_OBJECT * FindAvatarByContact(HCONTACT hContact ) +ANIAVA_OBJECT * FindAvatarByContact(MCONTACT hContact ) { for ( int i=0; i < s_Objects.getCount(); i++) { ANIAVA_OBJECT *pai = ((ANIAVA_OBJECT *)s_Objects[i]); @@ -354,7 +354,7 @@ ANIAVA_OBJECT * FindAvatarByContact(HCONTACT hContact ) return NULL; } -int AniAva_RenderAvatar(HCONTACT hContact, HDC hdcMem, RECT *rc ) +int AniAva_RenderAvatar(MCONTACT hContact, HDC hdcMem, RECT *rc ) { aacheck 0; mir_cslock lck(s_CS); @@ -365,7 +365,7 @@ int AniAva_RenderAvatar(HCONTACT hContact, HDC hdcMem, RECT *rc ) } // update avatars pos -int AniAva_SetAvatarPos(HCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha) +int AniAva_SetAvatarPos(MCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha) { aacheck 0; mir_cslock lck(s_CS); @@ -404,7 +404,7 @@ int AniAva_SetAvatarPos(HCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha return 1; } // remove avatar -int AniAva_RemoveAvatar(HCONTACT hContact) +int AniAva_RemoveAvatar(MCONTACT hContact) { aacheck 0; mir_cslock lck(s_CS); @@ -419,7 +419,7 @@ int AniAva_RemoveAvatar(HCONTACT hContact) return 1; } // reset positions of avatars to be drawn (still be painted at same place) -int AniAva_InvalidateAvatarPositions(HCONTACT hContact) +int AniAva_InvalidateAvatarPositions(MCONTACT hContact) { aacheck 0; mir_cslock lck(s_CS); diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index d38758b403..75cc325e06 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -45,7 +45,7 @@ static DWORD amRequestTick = 0; /* * Add contact handle to requests queue */ -static int amAddHandleToChain(HCONTACT hContact) +static int amAddHandleToChain(MCONTACT hContact) { mir_cslockfull lck(amCS); if (amItems.find((HANDLE)hContact) != NULL) @@ -60,13 +60,13 @@ static int amAddHandleToChain(HCONTACT hContact) /* * Gets handle from queue for request */ -static HCONTACT amGetCurrentChain() +static MCONTACT amGetCurrentChain() { mir_cslock lck(amCS); if (amItems.getCount() == 0) return NULL; - HCONTACT res = (HCONTACT)amItems[0]; + MCONTACT res = (MCONTACT)amItems[0]; amItems.remove(0); return res; } @@ -82,7 +82,7 @@ static void amThreadProc(void *) memset(&dnce, 0, sizeof(dnce)); while (!MirandaExiting()) { - HCONTACT hContact = amGetCurrentChain(); + MCONTACT hContact = amGetCurrentChain(); while (hContact) { DWORD time = GetTickCount(); if ((time-amRequestTick) < AMASKPERIOD) { @@ -143,7 +143,7 @@ BOOL amWakeThread() /* * Sub to be called outside on status changing to retrieve away message */ -void amRequestAwayMsg(HCONTACT hContact) +void amRequestAwayMsg(MCONTACT hContact) { if (!g_CluiData.bInternalAwayMsgDiscovery || !hContact) return; diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 0066366f4c..44415f83b4 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -54,7 +54,7 @@ void CListSettings_FreeCacheItemDataOption( ClcCacheEntry *pDst, DWORD flag ); /* * Get time zone for contact */ -void Cache_GetTimezone(ClcData *dat, HCONTACT hContact) +void Cache_GetTimezone(ClcData *dat, MCONTACT hContact) { ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(hContact); if (dat == NULL && pcli->hwndContactTree) @@ -205,7 +205,7 @@ void CSmileyString::ReplaceSmileys(struct SHORTDATA *dat, ClcCacheEntry *pdnce, sp.Protocolname = pdnce->m_cache_cszProto; if ( db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) != 1 && pdnce->m_cache_cszProto != NULL && g_szMetaModuleName && strcmp(pdnce->m_cache_cszProto, g_szMetaModuleName) == 0) { - HCONTACT hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (LPARAM)pdnce->hContact, 0); + MCONTACT hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (LPARAM)pdnce->hContact, 0); if (hContact != 0) sp.Protocolname = GetContactProto(hContact); } diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 9fb0abf495..2cbe60d814 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -162,7 +162,7 @@ static int clcHookSmileyAddOptionsChanged(WPARAM wParam,LPARAM lParam) static int clcHookProtoAck(WPARAM wParam, LPARAM lParam) { - return ClcDoProtoAck((HCONTACT)wParam, (ACKDATA*)lParam); + return ClcDoProtoAck((MCONTACT)wParam, (ACKDATA*)lParam); } static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam) @@ -259,7 +259,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) else if (!strcmp(cws->szSetting,"ListeningTo")) pcli->pfnClcBroadcast( INTM_STATUSMSGCHANGED,wParam,0); else if (!strcmp(cws->szSetting,"Transport") || !strcmp(cws->szSetting,"IsTransported")) { - pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam); + pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam); pcli->pfnClcBroadcast( CLM_AUTOREBUILD,wParam,0); } } @@ -274,8 +274,8 @@ static int clcHookDbEventAdded(WPARAM wParam,LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) }; db_event_get((HANDLE)lParam, &dbei); if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) { - ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((HCONTACT)wParam); - db_set_dw((HCONTACT)wParam, "CList", "mf_lastmsg", dbei.timestamp); + ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((MCONTACT)wParam); + db_set_dw((MCONTACT)wParam, "CList", "mf_lastmsg", dbei.timestamp); if (pdnce) pdnce->dwLastMsgTime = dbei.timestamp; } @@ -1257,7 +1257,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if ( ServiceExists(MS_MC_ADDTOMETA)) { ClcContact *contDest, *contSour; int res; - HCONTACT handle, hcontact; + MCONTACT handle, hcontact; cliGetRowByIndex(dat,dat->iDragItem,&contSour,NULL); cliGetRowByIndex(dat,dat->selection,&contDest,NULL); @@ -1265,23 +1265,23 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (contSour->type == CLCIT_CONTACT) { if (g_szMetaModuleName && mir_strcmp(contSour->proto,g_szMetaModuleName)) { if (!contSour->isSubcontact) { - HCONTACT hDest = contDest->hContact; + MCONTACT hDest = contDest->hContact; mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be converted to MetaContact and '%s' be added to it?"),contDest->szText, contSour->szText); res = MessageBox(hwnd,Wording,TranslateT("Converting to MetaContact"),MB_OKCANCEL|MB_ICONQUESTION); if (res == 1) { - handle = (HCONTACT)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hDest,0); + handle = (MCONTACT)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hDest,0); if (!handle) return 0; CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle); } } else { hcontact = contSour->hContact; - HCONTACT hfrom = contSour->subcontacts->hContact; - HCONTACT hdest = contDest->hContact; + MCONTACT hfrom = contSour->subcontacts->hContact; + MCONTACT hdest = contDest->hContact; mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be converted to MetaContact and '%s' be added to it (remove it from '%s')?"), contDest->szText,contSour->szText,contSour->subcontacts->szText); res = MessageBox(hwnd,Wording,TranslateT("Converting to MetaContact (Moving)"),MB_OKCANCEL|MB_ICONQUESTION); if (res == 1) { - HCONTACT handle = (HCONTACT)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hdest,0); + MCONTACT handle = (MCONTACT)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hdest,0); if (!handle) return 0; @@ -1303,8 +1303,8 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (contSour->type == CLCIT_CONTACT) { if (g_szMetaModuleName && strcmp(contSour->proto,g_szMetaModuleName)) { if (!contSour->isSubcontact) { - HCONTACT hcontact = contSour->hContact; - HCONTACT handle = contDest->hContact; + MCONTACT hcontact = contSour->hContact; + MCONTACT handle = contDest->hContact; mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be added to metacontact '%s'?"),contSour->szText, contDest->szText); res = MessageBox(hwnd,Wording,TranslateT("Adding contact to MetaContact"),MB_OKCANCEL|MB_ICONQUESTION); if (res == 1) { @@ -1314,16 +1314,16 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, } else { if (contSour->subcontacts == contDest) { - HCONTACT hsour = contSour->hContact; + MCONTACT hsour = contSour->hContact; mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be default?"),contSour->szText); res = MessageBox(hwnd,Wording,TranslateT("Set default contact"),MB_OKCANCEL|MB_ICONQUESTION); if (res == 1) CallService(MS_MC_SETDEFAULTCONTACT,(WPARAM)contDest->hContact,(LPARAM)hsour); } else { - HCONTACT hcontact = contSour->hContact; - HCONTACT hfrom = contSour->subcontacts->hContact; - HCONTACT handle = contDest->hContact; + MCONTACT hcontact = contSour->hContact; + MCONTACT hfrom = contSour->subcontacts->hContact; + MCONTACT handle = contDest->hContact; mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be removed from MetaContact '%s' and added to '%s'?"), contSour->szText,contSour->subcontacts->szText,contDest->szText); res = MessageBox(hwnd,Wording,TranslateT("Changing MetaContacts (Moving)"),MB_OKCANCEL|MB_ICONQUESTION); if (res == 1) { @@ -1347,8 +1347,8 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (contSour->type == CLCIT_CONTACT) { if (g_szMetaModuleName && strcmp(contSour->proto,g_szMetaModuleName)) { if (!contSour->isSubcontact) { - HCONTACT hcontact = contSour->hContact; - HCONTACT handle = contDest->subcontacts->hContact; + MCONTACT hcontact = contSour->hContact; + MCONTACT handle = contDest->subcontacts->hContact; mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be added to MetaContact '%s'?"), contSour->szText,contDest->subcontacts->szText); int res = MessageBox(hwnd,Wording,TranslateT("Changing MetaContacts (Moving)"),MB_OKCANCEL|MB_ICONQUESTION); if (res == 1) { @@ -1357,9 +1357,9 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, } } else if (contSour->subcontacts != contDest->subcontacts) { - HCONTACT hcontact = contSour->hContact; - HCONTACT hfrom = contSour->subcontacts->hContact; - HCONTACT handle = contDest->subcontacts->hContact; + MCONTACT hcontact = contSour->hContact; + MCONTACT hfrom = contSour->subcontacts->hContact; + MCONTACT handle = contDest->subcontacts->hContact; mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be removed from MetaContact '%s' and added to '%s'?"), contSour->szText,contSour->subcontacts->szText,contDest->subcontacts->szText); int res = MessageBox(hwnd,Wording,TranslateT("Changing MetaContacts (Moving)"),MB_OKCANCEL|MB_ICONQUESTION); if (res == 1) { @@ -1476,10 +1476,10 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM w memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage)); flags = contact->flags; } - pcli->pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam); - if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((HCONTACT)wParam, "CList", "Hidden", 0)) { + pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam); + if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0)) { NMCLISTCONTROL nm; - pcli->pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1); + pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1); if (pcli->pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) { memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage)); if (flags & CONTACTF_CHECKED) @@ -1505,24 +1505,24 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP BOOL needRepaint = FALSE; WORD status; RECT iconRect = {0}; - int contacticon = corecli.pfnGetContactIcon((HCONTACT)wParam); - HCONTACT hSelItem = NULL; + int contacticon = corecli.pfnGetContactIcon((MCONTACT)wParam); + MCONTACT hSelItem = NULL; ClcContact *selcontact = NULL; - char *szProto = GetContactProto((HCONTACT)wParam); + char *szProto = GetContactProto((MCONTACT)wParam); if (szProto == NULL) status = ID_STATUS_OFFLINE; else - status = GetContactCachedStatus((HCONTACT)wParam); + status = GetContactCachedStatus((MCONTACT)wParam); BOOL image_is_special = (LOWORD(contacticon) != (LOWORD(lParam))); //check only base icons - int nHiddenStatus = CLVM_GetContactHiddenStatus((HCONTACT)wParam, szProto, dat); + int nHiddenStatus = CLVM_GetContactHiddenStatus((MCONTACT)wParam, szProto, dat); DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); 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((HCONTACT)wParam) != LOWORD(lParam); + bool isIconChanged = cli_GetContactIcon((MCONTACT)wParam) != LOWORD(lParam); shouldShow = isVisiblebyFilter && ( isVisible || isIconChanged ) ; @@ -1531,15 +1531,15 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP if (!pcli->pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) { if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) { if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1) - hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact); - pcli->pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0); + hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact); + pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0); recalcScrollBar = 1; needRepaint = TRUE; pcli->pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL); if (contact) { contact->iImage = lParam; contact->image_is_special = image_is_special; - pcli->pfnNotifyNewContact(hwnd, (HCONTACT)wParam); + pcli->pfnNotifyNewContact(hwnd, (MCONTACT)wParam); dat->needsResort = 1; } } @@ -1553,7 +1553,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP 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, NULL) != -1) - hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact); + hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact); pcli->pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0); needRepaint = TRUE; recalcScrollBar = 1; @@ -1601,7 +1601,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP static LRESULT clcOnIntmAvatarChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ClcContact *contact; - if (FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, FALSE)) + if (FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE)) Cache_GetAvatar(dat, contact); else if (dat->use_avatar_service && !wParam) UpdateAllAvatars(dat); @@ -1613,7 +1613,7 @@ static LRESULT clcOnIntmAvatarChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM static LRESULT clcOnIntmTimeZoneChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ClcContact *contact; - if (!FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, FALSE)) + if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE)) return corecli.pfnContactListControlWndProc(hwnd,msg,wParam,lParam); if (contact) { @@ -1628,13 +1628,13 @@ static LRESULT clcOnIntmNameChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP { int ret = corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); - pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam); + pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam); ClcContact *contact; - if (!FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, FALSE)) + if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE)) return ret; - lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText)); + lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText)); if (contact) { Cache_GetText(dat,contact,1); cliRecalcScrollBar(hwnd,dat); @@ -1653,7 +1653,7 @@ static LRESULT clcOnIntmApparentModeChanged(ClcData *dat, HWND hwnd, UINT msg, W static LRESULT clcOnIntmStatusMsgChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { ClcContact *contact; - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; if (hContact == NULL || IsHContactInfo(hContact) || IsHContactGroup(hContact)) return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); if (!FindItem(hwnd,dat,hContact,&contact,NULL,NULL,FALSE)) @@ -1672,7 +1672,7 @@ static LRESULT clcOnIntmNotOnListChanged(ClcData *dat, HWND hwnd, UINT msg, WPAR DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; ClcContact *contact; - if (!FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, TRUE)) + if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, TRUE)) return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); if (contact->type != CLCIT_CONTACT) @@ -1702,18 +1702,18 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM { int ret = corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); if (wParam != 0) { - ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((HCONTACT)wParam); + ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((MCONTACT)wParam); if (pdnce && pdnce->m_cache_cszProto) { pdnce___SetStatus( pdnce, GetStatusForContact(pdnce->hContact,pdnce->m_cache_cszProto)); if (!dat->force_in_dialog && (dat->second_line_show || dat->third_line_show)) gtaRenewText(pdnce->hContact); - SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon((HCONTACT)wParam)); + SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon((MCONTACT)wParam)); ClcContact *contact; - if (FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, TRUE)) { + if (FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, TRUE)) { if (contact && contact->type == CLCIT_CONTACT) { if (!contact->image_is_special && pdnce___GetStatus( pdnce ) > ID_STATUS_OFFLINE) - contact->iImage = corecli.pfnGetContactIcon((HCONTACT)wParam); + contact->iImage = corecli.pfnGetContactIcon((MCONTACT)wParam); if (contact->isSubcontact && contact->subcontacts && contact->subcontacts->type == CLCIT_CONTACT) pcli->pfnClcBroadcast(INTM_STATUSCHANGED, (WPARAM)contact->subcontacts->hContact, 0); //forward status changing to host meta contact } @@ -1764,7 +1764,7 @@ int ClcUnloadModule() return 0; } -int ClcDoProtoAck(HCONTACT wParam, ACKDATA * ack) +int ClcDoProtoAck(MCONTACT wParam, ACKDATA * ack) { if (MirandaExiting()) return 0; if (ack->type == ACKTYPE_STATUS) { diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp index 26260fd015..93c5c3a9eb 100644 --- a/plugins/Clist_modern/src/modern_clcidents.cpp +++ b/plugins/Clist_modern/src/modern_clcidents.cpp @@ -106,10 +106,10 @@ int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex) int cliFindItem(HWND hwnd, ClcData *dat, HANDLE hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible) { - return FindItem(hwnd, dat, (HCONTACT)hItem, contact, subgroup, isVisible, FALSE); + return FindItem(hwnd, dat, (MCONTACT)hItem, contact, subgroup, isVisible, FALSE); } -int FindItem(HWND hwnd, ClcData *dat, HCONTACT hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible, BOOL isIgnoreSubcontacts) +int FindItem(HWND hwnd, ClcData *dat, MCONTACT hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible, BOOL isIgnoreSubcontacts) { int index = 0, i; int nowVisible = 1; @@ -140,7 +140,7 @@ int FindItem(HWND hwnd, ClcData *dat, HCONTACT hItem, ClcContact **contact, ClcG if (nowVisible) index++; if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR)hItem&~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) || (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == hItem) || - (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (HCONTACT)((UINT_PTR)hItem&~HCONTACT_ISINFO))) + (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (MCONTACT)((UINT_PTR)hItem&~HCONTACT_ISINFO))) { if (isVisible) { if (!nowVisible) *isVisible = 0; diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index dcb0d89b10..782ac49787 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -46,7 +46,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) cont->SubAllocated = subcount; int i=0; for (int j = 0; j < subcount; j++) { - HCONTACT hsub = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)cont->hContact, j); + MCONTACT hsub = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)cont->hContact, j); cacheEntry = pcli->pfnGetCacheEntry(hsub); WORD wStatus = pdnce___GetStatus(cacheEntry); if (showOfflineHereGroup || (!( db_get_b(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) && db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)) @@ -145,7 +145,7 @@ int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText) return i; } -static void _LoadDataToContact(ClcContact *cont, ClcGroup *group, ClcData *dat, HCONTACT hContact) +static void _LoadDataToContact(ClcContact *cont, ClcGroup *group, ClcData *dat, MCONTACT hContact) { ClcCacheEntry *cacheEntry = NULL; WORD apparentMode; @@ -211,7 +211,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcGroup *group, ClcData *dat, static ClcContact *AddContactToGroup(ClcData *dat,ClcGroup *group, ClcCacheEntry *cacheEntry) { - HCONTACT hContact; + MCONTACT hContact; int i; if (cacheEntry == NULL) return NULL; if (group == NULL) return NULL; @@ -259,7 +259,7 @@ void * AddTempGroup(HWND hwnd,ClcData *dat,const TCHAR *szName,DWORD flags,int g return NULL; } -void cli_AddContactToTree(HWND hwnd,ClcData *dat,HCONTACT hContact,int updateTotalCount,int checkHideOffline) +void cli_AddContactToTree(HWND hwnd,ClcData *dat,MCONTACT hContact,int updateTotalCount,int checkHideOffline) { ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact); if (dat->IsMetaContactsEnabled && cacheEntry && cacheEntry->m_cache_nHiddenSubcontact) @@ -277,7 +277,7 @@ void cli_AddContactToTree(HWND hwnd,ClcData *dat,HCONTACT hContact,int updateTot return; } -void cli_DeleteItemFromTree(HWND hwnd, HCONTACT hItem) +void cli_DeleteItemFromTree(HWND hwnd, MCONTACT hItem) { ClcData *dat = (ClcData *) GetWindowLongPtr(hwnd, 0); ClearRowByIndexCache(); @@ -300,16 +300,16 @@ __inline BOOL CLCItems_IsShowOfflineGroup(ClcGroup* group) return (groupFlags&GROUPF_SHOWOFFLINE) != 0; } -HCONTACT SaveSelection(ClcData *dat) +MCONTACT SaveSelection(ClcData *dat) { ClcContact *selcontact = NULL; if (pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) == -1) return NULL; - return (HCONTACT)pcli->pfnContactToHItem(selcontact); + return (MCONTACT)pcli->pfnContactToHItem(selcontact); } -int RestoreSelection(ClcData *dat, HCONTACT hSelected) +int RestoreSelection(ClcData *dat, MCONTACT hSelected) { ClcContact *selcontact = NULL; ClcGroup *selgroup = NULL; @@ -353,7 +353,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat) dat->list.cl.increment = 50; dat->needsResort = 1; - HCONTACT hSelected = SaveSelection(dat); + MCONTACT hSelected = SaveSelection(dat); dat->selection = -1; dat->HiLightMode = db_get_b(NULL,"CLC","HiLightMode",SETTING_HILIGHTMODE_DEFAULT); { @@ -366,7 +366,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat) } } - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { ClcCacheEntry *cacheEntry = NULL; cont = NULL; cacheEntry = pcli->pfnGetCacheEntry(hContact); @@ -432,7 +432,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat) void cli_SortCLC(HWND hwnd, ClcData *dat, int useInsertionSort) { - HCONTACT hSelected = SaveSelection(dat); + MCONTACT hSelected = SaveSelection(dat); corecli.pfnSortCLC(hwnd,dat,useInsertionSort); @@ -470,7 +470,7 @@ int GetNewSelection(ClcGroup *group, int selection, int direction) } struct SavedContactState_t { - HCONTACT hContact; + MCONTACT hContact; WORD iExtraImage[EXTRA_ICON_COUNT]; int checked; }; @@ -619,7 +619,7 @@ ClcContact* cliCreateClcContact() return contact; } -ClcCacheEntry* cliCreateCacheItem(HCONTACT hContact ) +ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact ) { ClcCacheEntry *p = (ClcCacheEntry *)mir_calloc(sizeof( ClcCacheEntry )); if (p == NULL) @@ -634,10 +634,10 @@ ClcCacheEntry* cliCreateCacheItem(HCONTACT hContact ) return p; } -void cliInvalidateDisplayNameCacheEntry(HCONTACT hContact) +void cliInvalidateDisplayNameCacheEntry(MCONTACT hContact) { - if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) - corecli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)INVALID_HANDLE_VALUE); + if (hContact == INVALID_CONTACT_ID) + corecli.pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID); else { ClcCacheEntry *p = pcli->pfnGetCacheEntry(hContact); if (p) @@ -685,7 +685,7 @@ int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly) * also cares about sub contacts (if meta is active) */ -int __fastcall CLVM_GetContactHiddenStatus(HCONTACT hContact, char *szProto, ClcData *dat) +int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat) { int dbHidden = db_get_b(hContact, "CList", "Hidden", 0); // default hidden state, always respect it. int filterResult = 1; diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index 652564c0ba..f0933fc4bc 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -35,7 +35,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara switch(msg) { case CLM_DELETEITEM: - pcli->pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam); + pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam); clcSetDelayTimer( TIMERID_DELAYEDRESORTCLC, hwnd, 1 ); //pcli->pfnSortCLC(hwnd, dat, 1); clcSetDelayTimer( TIMERID_RECALCSCROLLBAR, hwnd, 2 ); //pcli->pfnRecalcScrollBar(hwnd, dat); return 0; diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index bf19a6c5c2..841244e6a4 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -75,7 +75,7 @@ static int iconsOn; struct NotifyMenuItemExData { - HCONTACT hContact; + MCONTACT hContact; int iIcon; // icon index in the image list HICON hIcon; // corresponding icon handle HANDLE hDbEvent; @@ -176,7 +176,7 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle) } -int cli_RemoveEvent(HCONTACT hContact, HANDLE hDbEvent) +int cli_RemoveEvent(MCONTACT hContact, HANDLE hDbEvent) { int i; int res = 0; diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 78d7b35238..28db20bfde 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -94,7 +94,7 @@ static IconItem iconList[] = static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) { - BYTE bContactRate = db_get_b((HCONTACT)wParam, "CList", "Rate", 0); + BYTE bContactRate = db_get_b((MCONTACT)wParam, "CList", "Rate", 0); if ( bContactRate > SIZEOF(rates)-1) bContactRate = SIZEOF(rates)-1; @@ -149,7 +149,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mi.hIcon = NULL; mi.ptszName = LPGENT("Show even if offline"); - mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b((HCONTACT)wParam, "CList", "noOffline", 0) ? CMIF_CHECKED : 0); + mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b((MCONTACT)wParam, "CList", "noOffline", 0) ? CMIF_CHECKED : 0); mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE; mi.popupPosition = i+100000000; mi.position = -100000000; @@ -165,7 +165,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) INT_PTR FAV_SetRate(WPARAM hContact, LPARAM nRate) { if (hContact) - db_set_b((HCONTACT)hContact, "CList", "Rate", (BYTE)nRate); + db_set_b((MCONTACT)hContact, "CList", "Rate", (BYTE)nRate); return 0; } @@ -173,7 +173,7 @@ INT_PTR FAV_SetRate(WPARAM hContact, LPARAM nRate) INT_PTR FAV_ToggleShowOffline(WPARAM hContact,LPARAM lParam) { if (hContact) - db_set_b((HCONTACT)hContact, "CList", "noOffline", !db_get_b((HCONTACT)hContact, "CList", "noOffline", 0)); + db_set_b((MCONTACT)hContact, "CList", "noOffline", !db_get_b((MCONTACT)hContact, "CList", "noOffline", 0)); return 0; } diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index d7da7a01a5..943fde598e 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -42,7 +42,7 @@ int GetContactDisplayName(WPARAM wParam,LPARAM lParam); int CListOptInit(WPARAM wParam,LPARAM lParam); int SkinOptInit(WPARAM wParam,LPARAM lParam); int ModernSkinOptInit(WPARAM wParam,LPARAM lParam); -int EventsProcessContactDoubleClick(HCONTACT hContact); +int EventsProcessContactDoubleClick(MCONTACT hContact); INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam); @@ -52,7 +52,7 @@ void UninitTrayMenu(); HIMAGELIST hCListImages = NULL; //returns normal icon or combined with status overlay. Needs to be destroyed. -HICON cliGetIconFromStatusMode(HCONTACT hContact, const char *szProto,int status) +HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto,int status) { // check if options is turned on BYTE trayOption = db_get_b(NULL,"CLUI","XStatusTray",SETTING_TRAYOPTION_DEFAULT); @@ -81,15 +81,15 @@ HICON cliGetIconFromStatusMode(HCONTACT hContact, const char *szProto,int status return ske_ImageList_GetIcon(g_himlCListClc,pcli->pfnIconFromStatusMode(szProto,status,hContact),ILD_NORMAL); } -int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact) +int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact) { if (hContact && szProto) { char *szActProto = (char*)szProto; int nActStatus = nStatus; - HCONTACT hActContact = hContact; + MCONTACT hActContact = hContact; if (!db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) && g_szMetaModuleName && !mir_strcmp(szActProto,g_szMetaModuleName)) { // substitute params by mostonline contact datas - HCONTACT hMostOnlineContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hActContact, 0); + MCONTACT hMostOnlineContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hActContact, 0); if (hMostOnlineContact) { ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hMostOnlineContact); if (cacheEntry && cacheEntry->m_cache_cszProto) { @@ -118,7 +118,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact) return corecli.pfnIconFromStatusMode(szProto,nStatus,NULL); } -int cli_GetContactIcon(HCONTACT hContact) +int cli_GetContactIcon(MCONTACT hContact) { int res = corecli.pfnGetContactIcon(hContact); if (res != -1) diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 83c4edb7bd..f59c355d4a 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "hdr/modern_commonprototypes.h" #include "hdr/modern_awaymsg.h" -void InsertContactIntoTree(HCONTACT hContact,int status); +void InsertContactIntoTree(MCONTACT hContact,int status); static ClcCacheEntry *displayNameCache; void CListSettings_FreeCacheItemDataOption( ClcCacheEntry *pDst, DWORD flag ); @@ -36,11 +36,11 @@ static int displayNameCacheSize; BOOL CLM_AUTOREBUILD_WAS_POSTED = FALSE; SortedList *clistCache = NULL; -char *GetProtoForContact(HCONTACT hContact); -int GetStatusForContact(HCONTACT hContact,char *szProto); +char *GetProtoForContact(MCONTACT hContact); +int GetStatusForContact(MCONTACT hContact,char *szProto); TCHAR *UnknownConctactTranslatedName = NULL; -void InvalidateDNCEbyPointer(HCONTACT hContact,ClcCacheEntry *pdnce,int SettingType); +void InvalidateDNCEbyPointer(MCONTACT hContact,ClcCacheEntry *pdnce,int SettingType); static int handleCompare( void* c1, void* c2 ) { @@ -86,7 +86,7 @@ void FreeDisplayNameCache() } } -ClcCacheEntry* cliGetCacheEntry(HCONTACT hContact) +ClcCacheEntry* cliGetCacheEntry(MCONTACT hContact) { if (!clistCache) return NULL; @@ -205,7 +205,7 @@ int CListSettings_SetToCache(ClcCacheEntry *pSrc, DWORD flag) void cliFreeCacheItem( ClcCacheEntry *p ) { - HCONTACT hContact = p->hContact; + MCONTACT hContact = p->hContact; TRACEVAR("cliFreeCacheItem hContact = %d",hContact); p->freeName(); mir_free_and_nil(p->tszGroup); @@ -299,7 +299,7 @@ void IvalidateDisplayNameCache(DWORD mode) } } -void InvalidateDNCEbyPointer(HCONTACT hContact, ClcCacheEntry *pdnce, int SettingType) +void InvalidateDNCEbyPointer(MCONTACT hContact, ClcCacheEntry *pdnce, int SettingType) { if (hContact == NULL || pdnce == NULL) return; @@ -344,7 +344,7 @@ void InvalidateDNCEbyPointer(HCONTACT hContact, ClcCacheEntry *pdnce, int Settin pdnce->IsExpanded = -1; } -char *GetContactCachedProtocol(HCONTACT hContact) +char *GetContactCachedProtocol(MCONTACT hContact) { ClcCacheEntry *cacheEntry = NULL; cacheEntry = pcli->pfnGetCacheEntry(hContact); @@ -354,12 +354,12 @@ char *GetContactCachedProtocol(HCONTACT hContact) return NULL; } -char* GetProtoForContact(HCONTACT hContact) +char* GetProtoForContact(MCONTACT hContact) { return (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT,(WPARAM)hContact,0); } -int GetStatusForContact(HCONTACT hContact,char *szProto) +int GetStatusForContact(MCONTACT hContact,char *szProto) { return (szProto) ? (int)(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)) : ID_STATUS_OFFLINE; } @@ -393,7 +393,7 @@ LBL_Unknown: isUnknown = false; } -int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Status) +int GetContactInfosForSort(MCONTACT hContact,char **Proto,TCHAR **Name,int *Status) { ClcCacheEntry *cacheEntry = NULL; cacheEntry = pcli->pfnGetCacheEntry(hContact); @@ -407,7 +407,7 @@ int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Stat }; -int GetContactCachedStatus(HCONTACT hContact) +int GetContactCachedStatus(MCONTACT hContact) { ClcCacheEntry *cacheEntry = NULL; cacheEntry = pcli->pfnGetCacheEntry(hContact); @@ -417,7 +417,7 @@ int GetContactCachedStatus(HCONTACT hContact) int ContactAdded(WPARAM wParam,LPARAM lParam) { if (!MirandaExiting()) { - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode((char*)GetContactCachedProtocol(hContact),ID_STATUS_OFFLINE,hContact),1); ///by FYR pcli->pfnSortContacts(); } @@ -426,7 +426,7 @@ int ContactAdded(WPARAM wParam,LPARAM lParam) int ContactSettingChanged(WPARAM wParam,LPARAM lParam) { - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; if (MirandaExiting() || !pcli || !clistCache || hContact == NULL) return 0; @@ -494,7 +494,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) else if (!strcmp(cws->szSetting,"Hidden")) { InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type); if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) { - char *szProto = GetContactProto((HCONTACT)wParam); + char *szProto = GetContactProto((MCONTACT)wParam); cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE), hContact),1); //by FYR } diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 2ed245edd2..86db9f4b91 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -188,7 +188,7 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam) if ( lstrcmp( _T(CLISTCONTROL_CLASS), cls)) hwndClist = pcli->hwndContactList; - HCONTACT hItem = (HCONTACT)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0); + MCONTACT hItem = (MCONTACT)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0); Menu_ShowItem(hRenameMenuItem, hItem != 0); if (!hItem || !IsHContactContact(hItem) || !db_get_b(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT)) { @@ -240,7 +240,7 @@ INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam,LPARAM lParam) INT_PTR CLUI::Service_Menu_ShowContactAvatar(WPARAM wParam,LPARAM lParam) { - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; db_set_b(hContact, "CList", "HideContactAvatar", 0); @@ -250,7 +250,7 @@ INT_PTR CLUI::Service_Menu_ShowContactAvatar(WPARAM wParam,LPARAM lParam) INT_PTR CLUI::Service_Menu_HideContactAvatar(WPARAM wParam,LPARAM lParam) { - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; db_set_b(hContact, "CList", "HideContactAvatar", 1); diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index a4390b70d6..9607ed864b 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -42,13 +42,13 @@ struct {ID_STATUS_ONTHEPHONE,150}, {ID_STATUS_OUTTOLUNCH,425}}; -static int GetContactStatus(HCONTACT hContact) +static int GetContactStatus(MCONTACT hContact) { return (GetContactCachedStatus(hContact)); } -void cli_ChangeContactIcon(HCONTACT hContact, int iIcon, int add) +void cli_ChangeContactIcon(MCONTACT hContact, int iIcon, int add) { corecli.pfnChangeContactIcon(hContact, iIcon, add); } @@ -62,7 +62,7 @@ static int GetStatusModeOrdering(int statusMode) } -DWORD CompareContacts2_getLMTime(HCONTACT hContact) +DWORD CompareContacts2_getLMTime(MCONTACT hContact) { HANDLE hDbEvent = db_event_last(hContact); while(hDbEvent) { @@ -101,8 +101,8 @@ int CompareContacts2(const ClcContact *contact1,const ClcContact *contact2, int if ((INT_PTR)contact1 < 100 || (INT_PTR)contact2 < 100) return 0; - HCONTACT a = contact1->hContact; - HCONTACT b = contact2->hContact; + MCONTACT a = contact1->hContact; + MCONTACT b = contact2->hContact; namea = (TCHAR *)contact1->szText; statusa = GetContactCachedStatus(contact1->hContact); diff --git a/plugins/Clist_modern/src/modern_gettextasync.cpp b/plugins/Clist_modern/src/modern_gettextasync.cpp index 6194bcb3c2..32ab8042f8 100644 --- a/plugins/Clist_modern/src/modern_gettextasync.cpp +++ b/plugins/Clist_modern/src/modern_gettextasync.cpp @@ -42,7 +42,7 @@ int CLUI_SyncGetShortData(WPARAM wParam, LPARAM lParam); #define gtaunlock LeaveCriticalSection( >aCS ) typedef struct _GetTextAsyncItem { - HCONTACT hContact; + MCONTACT hContact; ClcData *dat; struct _GetTextAsyncItem *Next; } GTACHAINITEM; @@ -134,7 +134,7 @@ BOOL gtaWakeThread() return FALSE; } -int gtaAddRequest(ClcData *dat,ClcContact *contact,HCONTACT hContact) +int gtaAddRequest(ClcData *dat,ClcContact *contact,MCONTACT hContact) { if (MirandaExiting()) return 0; gtalock; @@ -159,7 +159,7 @@ int gtaAddRequest(ClcData *dat,ClcContact *contact,HCONTACT hContact) return FALSE; } -void gtaRenewText(HCONTACT hContact) +void gtaRenewText(MCONTACT hContact) { gtaAddRequest(NULL,NULL, hContact); } diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index db2a5a4ae0..e4166f89e9 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -165,7 +165,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i case TC_TEXT2: { int tmp = 0; - HCONTACT hContact = pdnce->hContact; + MCONTACT hContact = pdnce->hContact; if (dat->second_line_show && pdnce->szSecondLineText && pdnce->szSecondLineText[0] ) { tmp = dat->fontModernInfo[FONTID_SECONDLINE].fontHeight; @@ -192,7 +192,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i case TC_TEXT3: { - HCONTACT hContact = pdnce->hContact; + MCONTACT hContact = pdnce->hContact; int tmp = 0; if (dat->third_line_show && pdnce->szThirdLineText && pdnce->szThirdLineText[0]) { tmp = dat->fontModernInfo[FONTID_THIRDLINE].fontHeight; diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 74159b8b68..62eae4b80a 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -4081,7 +4081,7 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, BYTE alpha) #define SKINSETSECTION "SkinnedSettings" -BOOL SkinDBGetContactSetting(HCONTACT hContact, const char* szSection, const char*szKey, DBVARIANT * retdbv, BOOL * bSkinned ) +BOOL SkinDBGetContactSetting(MCONTACT hContact, const char* szSection, const char*szKey, DBVARIANT * retdbv, BOOL * bSkinned ) { if (!hContact) { //only for not contact settings char *szSkinKey; @@ -4096,7 +4096,7 @@ BOOL SkinDBGetContactSetting(HCONTACT hContact, const char* szSection, const cha return db_get(hContact, szSection, szKey, retdbv); } -BYTE SkinDBGetContactSettingByte(HCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault) +BYTE SkinDBGetContactSettingByte(MCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault) { DBVARIANT dbv = { 0 }; BOOL bSkinned = FALSE; @@ -4115,7 +4115,7 @@ BYTE SkinDBGetContactSettingByte(HCONTACT hContact, const char* szSection, const return bDefault; } -WORD SkinDBGetContactSettingWord(HCONTACT hContact, const char* szSection, const char*szKey, WORD wDefault) +WORD SkinDBGetContactSettingWord(MCONTACT hContact, const char* szSection, const char*szKey, WORD wDefault) { BOOL bSkinned = FALSE; DBVARIANT dbv = { 0 }; @@ -4132,7 +4132,7 @@ WORD SkinDBGetContactSettingWord(HCONTACT hContact, const char* szSection, const return wDefault; } -DWORD SkinDBGetContactSettingDword(HCONTACT hContact, const char* szSection, const char*szKey, DWORD dwDefault) +DWORD SkinDBGetContactSettingDword(MCONTACT hContact, const char* szSection, const char*szKey, DWORD dwDefault) { DBVARIANT dbv = { 0 }; BOOL bSkinned = FALSE; diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index db1f1e8b62..135448605c 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -164,7 +164,7 @@ static void ShowPage(HWND hwnd, int page) } } -static int UpdateClistItem(HCONTACT hContact, DWORD mask) +static int UpdateClistItem(MCONTACT hContact, DWORD mask) { for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++) SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE, @@ -188,8 +188,8 @@ static void UpdateStickies() DWORD localMask; int i; - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { - HCONTACT hItem = (HCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); if (hItem) SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, (BYTE)db_get_dw(hContact, CLVM_MODULE, g_szModename, 0) ? 1 : 0); localMask = HIWORD(db_get_dw(hContact, CLVM_MODULE, g_szModename, 0)); @@ -450,7 +450,7 @@ void SaveState() ptrA szModeName(mir_utf8encodeT(szTempModeName)); DWORD dwGlobalMask = GetMaskForItem(hInfoItem); - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { HANDLE hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); if (hItem == NULL) continue; @@ -656,7 +656,7 @@ void DeleteViewMode( char * szName ) SetWindowText(hwndSelector, TranslateT("All contacts")); } - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) if (db_get_dw(hContact, CLVM_MODULE, szName, -1) != -1) db_set_dw(hContact, CLVM_MODULE, szName, 0); } @@ -844,7 +844,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP } case IDC_CLEARALL: { - for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); if (hItem) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0); -- cgit v1.2.3