From 06a79b9469f4d187132cd148411d9b92c7e35e6f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 30 Oct 2012 20:46:01 +0000 Subject: fix for that hell with ClcCacheEntryBase git-svn-id: http://svn.miranda-ng.org/main/trunk@2120 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/hdr/modern_clist.h | 8 +- .../Clist_modern/src/hdr/modern_commonheaders.h | 6 +- .../Clist_modern/src/hdr/modern_commonprototypes.h | 329 +++++++++++---------- plugins/Clist_modern/src/hdr/modern_static_clui.h | 4 +- plugins/Clist_modern/src/init.cpp | 4 +- plugins/Clist_modern/src/modern_awaymsg.cpp | 2 +- plugins/Clist_modern/src/modern_cachefuncs.cpp | 6 +- plugins/Clist_modern/src/modern_clc.cpp | 2 +- plugins/Clist_modern/src/modern_clcitems.cpp | 41 ++- plugins/Clist_modern/src/modern_clistmod.cpp | 6 +- plugins/Clist_modern/src/modern_clistsettings.cpp | 66 ++--- plugins/Clist_modern/src/modern_clui.cpp | 6 +- plugins/Clist_modern/src/modern_extraimage.cpp | 4 +- plugins/Clist_modern/src/modern_gettextasync.cpp | 2 +- .../Clist_modern/src/modern_rowheight_funcs.cpp | 6 +- plugins/Clist_mw/src/CLUIFrames/extraimage.cpp | 4 +- plugins/Clist_mw/src/clc.cpp | 4 +- plugins/Clist_mw/src/clcidents.cpp | 18 +- plugins/Clist_mw/src/clcitems.cpp | 8 +- plugins/Clist_mw/src/clist.h | 6 +- plugins/Clist_mw/src/clistmod.cpp | 4 +- plugins/Clist_mw/src/clistsettings.cpp | 35 +-- plugins/Clist_mw/src/clui.cpp | 4 +- plugins/Clist_mw/src/contact.cpp | 2 +- plugins/Clist_mw/src/init.cpp | 10 +- 25 files changed, 290 insertions(+), 297 deletions(-) (limited to 'plugins') diff --git a/plugins/Clist_modern/src/hdr/modern_clist.h b/plugins/Clist_modern/src/hdr/modern_clist.h index 527bf18b64..82f473d390 100644 --- a/plugins/Clist_modern/src/hdr/modern_clist.h +++ b/plugins/Clist_modern/src/hdr/modern_clist.h @@ -68,19 +68,19 @@ public: DestroySmileyList(); } - void ReplaceSmileys(struct SHORTDATA *dat, struct displayNameCacheEntry *pdnce, TCHAR *szText, BOOL replace_smileys); + void ReplaceSmileys(struct SHORTDATA *dat, struct ClcCacheEntry *pdnce, TCHAR *szText, BOOL replace_smileys); /** Destroy smiley list */ void DestroySmileyList(); /** Copy Smiley List */ void _CopySmileyList( SortedList *plInput ); - void AddListeningToIcon(struct SHORTDATA *dat, struct displayNameCacheEntry *pdnce, TCHAR *szText, BOOL replace_smileys); + void AddListeningToIcon(struct SHORTDATA *dat, struct ClcCacheEntry *pdnce, TCHAR *szText, BOOL replace_smileys); }; /////////////////////////////////////////////////////////////////////////////// -struct displayNameCacheEntry : public ClcCacheEntryBase +struct ClcCacheEntry : public ClcCacheEntryBase { int m_cache_nNoHiddenOffline; @@ -110,7 +110,7 @@ struct displayNameCacheEntry : public ClcCacheEntryBase void freeName(void); }; -typedef displayNameCacheEntry *pdisplayNameCacheEntry, *PDNCE; +typedef ClcCacheEntry *pClcCacheEntry, *PDNCE; /////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h index d577b431a7..d2ce7442a8 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h +++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h @@ -337,10 +337,10 @@ int AniAva_RenderAvatar( HANDLE hContact, HDC hdcMem, RECT * rc ); #define CCI_OTHER ~( CCI_NAME|CCI_GROUP|CCI_PROTO|CCI_STATUS|CCI_LINES|CCI_TIME ) #define CCI_ALL (0xFFFFFFFF) -void CListSettings_FreeCacheItemData(pdisplayNameCacheEntry pDst); +void CListSettings_FreeCacheItemData(pClcCacheEntry pDst); int CLUI_SyncGetPDNCE(WPARAM wParam, LPARAM lParam); -WORD pdnce___GetStatus(pdisplayNameCacheEntry pdnce); -void pdnce___SetStatus( pdisplayNameCacheEntry pdnce, WORD wStatus ); +WORD pdnce___GetStatus(pClcCacheEntry pdnce); +void pdnce___SetStatus( pClcCacheEntry pdnce, WORD wStatus ); /* move to list module */ typedef void (*ItemDestuctor)(void*); diff --git a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h index 21abadc64c..d687ae06f2 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h @@ -89,91 +89,91 @@ typedef INT_PTR (*PSYNCCALLBACKPROC)(WPARAM,LPARAM); /* CLCItems */ -BOOL CLCItems_IsShowOfflineGroup(ClcGroup* group); +BOOL CLCItems_IsShowOfflineGroup(ClcGroup* group); /* CListMod */ -int CListMod_HideWindow(HWND hwndContactList, int mode); +int CListMod_HideWindow(HWND hwndContactList, int mode); /* CLUI */ HANDLE RegisterIcolibIconHandle(char * szIcoID, char *szSectionName, char * szDescription, TCHAR * tszDefaultFile, int iDefaultIndex, HINSTANCE hDefaultModule, int iDefaultResource ); -void CLUI_UpdateAeroGlass(); -void CLUI_ChangeWindowMode(); -BOOL CLUI_CheckOwnedByClui(HWND hwnd); -INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam); -int CLUI_HideBehindEdge(); -int CLUI_IconsChanged(WPARAM,LPARAM); -int CLUI_IsInMainWindow(HWND hwnd); -HICON CLUI_LoadIconFromExternalFile (char *filename,int i,BOOL UseLibrary,bool registerit,char *IconName,char *SectName,char *Description,int internalidx, BOOL * needFree); -int CLUI_OnSkinLoad(WPARAM wParam, LPARAM lParam); -int CLUI_ReloadCLUIOptions(); -int CLUI_ShowFromBehindEdge(); -int CLUI_SizingGetWindowRect(HWND hwnd,RECT * rc); -int CLUI_SizingOnBorder(POINT ,int); -int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam); -int CLUI_TestCursorOnBorders(); -int CLUI_UpdateTimer(BYTE BringIn); -void CLUI_UpdateLayeredMode(); +void CLUI_UpdateAeroGlass(); +void CLUI_ChangeWindowMode(); +BOOL CLUI_CheckOwnedByClui(HWND hwnd); +INT_PTR CLUI_GetConnectingIconService(WPARAM wParam,LPARAM lParam); +int CLUI_HideBehindEdge(); +int CLUI_IconsChanged(WPARAM,LPARAM); +int CLUI_IsInMainWindow(HWND hwnd); +HICON CLUI_LoadIconFromExternalFile (char *filename,int i,BOOL UseLibrary,bool registerit,char *IconName,char *SectName,char *Description,int internalidx, BOOL * needFree); +int CLUI_OnSkinLoad(WPARAM wParam, LPARAM lParam); +int CLUI_ReloadCLUIOptions(); +int CLUI_ShowFromBehindEdge(); +int CLUI_SizingGetWindowRect(HWND hwnd,RECT * rc); +int CLUI_SizingOnBorder(POINT ,int); +int CLUI_SmoothAlphaTransition(HWND hwnd, BYTE GoalAlpha, BOOL wParam); +int CLUI_TestCursorOnBorders(); +int CLUI_UpdateTimer(BYTE BringIn); +void CLUI_UpdateLayeredMode(); UINT_PTR CLUI_SafeSetTimer(HWND hwnd, int ID, int Timeout, TIMERPROC proc); /* CLUIServices */ -INT_PTR CLUIServices_ProtocolStatusChanged(WPARAM wParam,LPARAM lParam); +INT_PTR CLUIServices_ProtocolStatusChanged(WPARAM wParam,LPARAM lParam); -int CLUIUnreadEmailCountChanged(WPARAM wParam,LPARAM lParam); +int CLUIUnreadEmailCountChanged(WPARAM wParam,LPARAM lParam); /* GDIPlus */ BOOL GDIPlus_AlphaBlend(HDC hdcDest,int nXOriginDest,int nYOriginDest,int nWidthDest,int nHeightDest,HDC hdcSrc,int nXOriginSrc,int nYOriginSrc,int nWidthSrc,int nHeightSrc, BLENDFUNCTION * blendFunction); HBITMAP GDIPlus_LoadGlyphImage(char *szFileName); /* EventArea */ -void EventArea_ConfigureEventArea(); +void EventArea_ConfigureEventArea(); /* ExtraImage */ -void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact); +void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact); /* ModernSkinButton */ -int ModernSkinButton_AddButton(HWND parent,char * ID,char * CommandService,char * StateDefService,char * HandeService, int Left, int Top, int Right, int Bottom, DWORD AlignedTo,TCHAR * Hint,char * DBkey,char * TypeDef,int MinWidth, int MinHeight); -int ModernSkinButtonLoadModule(); -int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT * r); +int ModernSkinButton_AddButton(HWND parent,char * ID,char * CommandService,char * StateDefService,char * HandeService, int Left, int Top, int Right, int Bottom, DWORD AlignedTo,TCHAR * Hint,char * DBkey,char * TypeDef,int MinWidth, int MinHeight); +int ModernSkinButtonLoadModule(); +int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT * r); int ModernSkinButtonUnloadModule(WPARAM,LPARAM); /* RowHeight */ -int RowHeight_CalcRowHeight(struct ClcData *dat, HWND hwnd, ClcContact *contact, int item); +int RowHeight_CalcRowHeight(struct ClcData *dat, HWND hwnd, ClcContact *contact, int item); /* SkinEngine */ -BOOL ske_AlphaBlend(HDC hdcDest,int nXOriginDest,int nYOriginDest,int nWidthDest,int nHeightDest,HDC hdcSrc,int nXOriginSrc,int nYOriginSrc,int nWidthSrc,int nHeightSrc,BLENDFUNCTION blendFunction); -void ske_ApplyTransluency(void); -int ske_BltBackImage (HWND destHWND, HDC destDC, RECT * BltClientRect); +BOOL ske_AlphaBlend(HDC hdcDest,int nXOriginDest,int nYOriginDest,int nWidthDest,int nHeightDest,HDC hdcSrc,int nXOriginSrc,int nYOriginSrc,int nWidthSrc,int nHeightSrc,BLENDFUNCTION blendFunction); +void ske_ApplyTransluency(void); +int ske_BltBackImage (HWND destHWND, HDC destDC, RECT * BltClientRect); HBITMAP ske_CreateDIB32(int cx, int cy); HBITMAP ske_CreateDIB32Point(int cx, int cy, void ** bits); -HRGN ske_CreateOpaqueRgn(BYTE Level, bool Opaque); -HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop,BYTE alpha); -int ske_DrawImageAt(HDC hdc, RECT *rc); -BOOL ske_DrawIconEx(HDC hdc,int xLeft,int yTop,HICON hIcon,int cxWidth,int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags); +HRGN ske_CreateOpaqueRgn(BYTE Level, bool Opaque); +HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop,BYTE alpha); +int ske_DrawImageAt(HDC hdc, RECT *rc); +BOOL ske_DrawIconEx(HDC hdc,int xLeft,int yTop,HICON hIcon,int cxWidth,int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags); int ske_DrawNonFramedObjects(BOOL Erase,RECT *r); -BOOL ske_DrawText(HDC hdc, LPCTSTR lpString, int nCount, RECT * lpRect, UINT format); -BOOL ske_DrawTextA(HDC hdc, char * lpString, int nCount, RECT * lpRect, UINT format); -LPSKINOBJECTDESCRIPTOR ske_FindObjectByName(const char * szName, BYTE objType, SKINOBJECTSLIST* Skin); +BOOL ske_DrawText(HDC hdc, LPCTSTR lpString, int nCount, RECT * lpRect, UINT format); +BOOL ske_DrawTextA(HDC hdc, char * lpString, int nCount, RECT * lpRect, UINT format); +LPSKINOBJECTDESCRIPTOR ske_FindObjectByName(const char * szName, BYTE objType, SKINOBJECTSLIST* Skin); HBITMAP ske_GetCurrentWindowImage(); -int ske_GetFullFilename(char * buf, char *file, char * skinfolder,BOOL madeAbsolute); -int ske_GetSkinFolder(char * szFileName, char * t2); -BOOL ske_ImageList_DrawEx( HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,int dy,COLORREF rgbBk,COLORREF rgbFg,UINT fStyle); -HICON ske_ImageList_GetIcon(HIMAGELIST himl, int i, UINT fStyle); +int ske_GetFullFilename(char * buf, char *file, char * skinfolder,BOOL madeAbsolute); +int ske_GetSkinFolder(char * szFileName, char * t2); +BOOL ske_ImageList_DrawEx( HIMAGELIST himl,int i,HDC hdcDst,int x,int y,int dx,int dy,COLORREF rgbBk,COLORREF rgbFg,UINT fStyle); +HICON ske_ImageList_GetIcon(HIMAGELIST himl, int i, UINT fStyle); int ske_JustUpdateWindowImageRect(RECT * rty); HBITMAP ske_LoadGlyphImage(char * szFileName); HRESULT SkinEngineLoadModule(); -void ske_LoadSkinFromDB(void); -int ske_LoadSkinFromIniFile(TCHAR*, BOOL); -TCHAR* ske_ParseText(TCHAR *stzText); -int ske_PrepeareImageButDontUpdateIt(RECT * r); +void ske_LoadSkinFromDB(void); +int ske_LoadSkinFromIniFile(TCHAR*, BOOL); +TCHAR* ske_ParseText(TCHAR *stzText); +int ske_PrepeareImageButDontUpdateIt(RECT * r); int ske_ReCreateBackImage(BOOL Erase,RECT *w); -int ske_RedrawCompleteWindow(); -BOOL ske_ResetTextEffect(HDC); -BOOL ske_SelectTextEffect(HDC hdc, BYTE EffectID, DWORD FirstColor, DWORD SecondColor); -INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam); -BOOL ske_SetRectOpaque(HDC memdc,RECT *fr, BOOL force = FALSE ); -BOOL ske_SetRgnOpaque(HDC memdc,HRGN hrgn, BOOL force = FALSE ); -BOOL ske_TextOut(HDC hdc, int x, int y, LPCTSTR lpString, int nCount); -BOOL ske_TextOutA(HDC hdc, int x, int y, char * lpString, int nCount); +int ske_RedrawCompleteWindow(); +BOOL ske_ResetTextEffect(HDC); +BOOL ske_SelectTextEffect(HDC hdc, BYTE EffectID, DWORD FirstColor, DWORD SecondColor); +INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam); +BOOL ske_SetRectOpaque(HDC memdc,RECT *fr, BOOL force = FALSE ); +BOOL ske_SetRgnOpaque(HDC memdc,HRGN hrgn, BOOL force = FALSE ); +BOOL ske_TextOut(HDC hdc, int x, int y, LPCTSTR lpString, int nCount); +BOOL ske_TextOutA(HDC hdc, int x, int y, char * lpString, int nCount); int ske_UnloadGlyphImage(HBITMAP hbmp); int SkinEngineUnloadModule(); int ske_UpdateWindowImage(); @@ -190,7 +190,7 @@ int CLUIFrames_SetLayeredMode( BOOL fLayeredMode, HWND hwnd ); int CLUIFrames_SetParentForContainers( HWND parent ); int CLUIFramesOnClistResize(WPARAM wParam,LPARAM lParam); -FRAMEWND * FindFrameByItsHWND(HWND FrameHwnd); //cluiframes.c +FRAMEWND * FindFrameByItsHWND(HWND FrameHwnd); //cluiframes.c //int callProxied_DrawTitleBar(HDC hdcMem2,RECT * rect,int Frameid); int DrawTitleBar(HDC hdcMem2,RECT * rect,int Frameid); @@ -200,75 +200,76 @@ int SetAlpha(BYTE Alpha); /* others TODO: move above */ -int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam); -void DrawBackGround(HWND hwnd,HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, DWORD backgroundBmpUse ); -HRESULT BackgroundsLoadModule(); -int BackgroundsUnloadModule(); -BOOL wildcmp(const char * name, const char * mask, BYTE option); //mod_skin_selector.c -BOOL wildcmpi(char * name, char * mask); //mod_skin_selector.c -BOOL wildcmpi(WCHAR* name, WCHAR* mask); //mod_skin_selector.c -INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); //SkinEditor.c -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(HANDLE hContact); //clistsettings.c +int Docking_ProcessWindowMessage(WPARAM wParam,LPARAM lParam); +void DrawBackGround(HWND hwnd,HDC mhdc, HBITMAP hBmpBackground, COLORREF bkColour, DWORD backgroundBmpUse ); +HRESULT BackgroundsLoadModule(); +int BackgroundsUnloadModule(); +BOOL wildcmp(const char * name, const char * mask, BYTE option); //mod_skin_selector.c +BOOL wildcmpi(char * name, char * mask); //mod_skin_selector.c +BOOL wildcmpi(WCHAR* name, WCHAR* mask); //mod_skin_selector.c +INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); //SkinEditor.c +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(HANDLE hContact); //clistsettings.c char* GetParamN(char * string, char * buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces); //mod_skin_selector.c -DWORD CompareContacts2_getLMTime(HANDLE u); //contact.c -DWORD mod_CalcHash(const char * a); //mod_skin_selector.c -HICON cliGetIconFromStatusMode(HANDLE hContact, const char *szProto,int status); //clistmod.c -HICON GetMainStatusOverlay(int STATUS); //clc.c -int __fastcall CLVM_GetContactHiddenStatus(HANDLE hContact, char *szStatus, struct ClcData *dat); //clcitems.c -int BgStatusBarChange(WPARAM wParam,LPARAM lParam); //clcopts.c -int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack); //clc.c -int ModernSkinButtonDeleteAll(); //modernbutton.c -int GetAverageMode( void ); //clisttray.c -int GetContactCachedStatus(HANDLE hContact); //clistsettings.c -INT_PTR GetContactIcon(WPARAM wParam,LPARAM lParam); //clistmod.c -int GetContactIconC(pdisplayNameCacheEntry cacheEntry); //clistmod.c -int GetContactIndex(ClcGroup *group,ClcContact *contact); //clcidents.c -int GetStatusForContact(HANDLE hContact,char *szProto); //clistsettings.c -int InitCustomMenus(void); //clistmenus.c -int InitFramesMenus(void); //framesmenus.c -int LoadMoveToGroup(); //movetogroup.c -int LoadPositionsFromDB(BYTE * OrderPos); //clistopts.c -int LoadStatusBarData(); //modern_statusbar.c -int MenuModulesLoaded(WPARAM wParam,LPARAM lParam); //clistmenu.c -int MenuModulesShutdown(WPARAM wParam,LPARAM lParam); //clistmenu.c -int MenuProcessCommand(WPARAM wParam,LPARAM lParam); //clistmenu.c -int ModifyMenuItemProxy(WPARAM wParam,LPARAM lParam); //framesmenu.c -int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam); //cluiframes.c -int ProcessCommandProxy(WPARAM wParam,LPARAM lParam); //framesmenu.c -int QueueAllFramesUpdating (BYTE); //cluiframes.c -int RecursiveDeleteMenu(HMENU hMenu); //clistmenus.c -int ModernSkinButtonRedrawAll(HDC hdc); //modern_button.c -int RegisterButtonByParce(char * ObjectName, char * Params); //mod_skin_selector.c -int RestoreAllContactData(struct ClcData *dat); //cache_funcs.c - -int SkinSelector_DeleteMask(MODERNMASK * mm); //mod_skin_selector.c -int StoreAllContactData(struct ClcData *dat); //cache_func.c -INT_PTR ToggleHideOffline(WPARAM wParam,LPARAM lParam); //contact.c -INT_PTR ToggleGroups(WPARAM wParam,LPARAM lParam); //contact.c -INT_PTR SetUseGroups(WPARAM wParam,LPARAM lParam); //contact.c -INT_PTR ToggleSounds(WPARAM wParam,LPARAM lParam); //contact.c -int UnitFramesMenu(); //framesmenu.c -void ClcOptionsChanged(); //clc.c -void Docking_GetMonitorRectFromWindow(HWND hWnd,RECT *rc); //Docking.c -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 InitTray(); //clisttray.c -void InvalidateDNCEbyPointer(HANDLE hContact,pdisplayNameCacheEntry pdnce,int SettingType); //clistsettings.c -void ReAssignExtraIcons(); //extraimage.c -void ShutdownGdiPlus(); //gdiplus.cpp -void TextOutWithGDIp(HDC hDestDC, int x, int y, LPCTSTR lpString, int nCount); //gdiplus.cpp -void UninitCustomMenus(); //clistmenus.c -void UnloadAvatarOverlayIcon(); //clc.c -void UnLoadContactListModule(); //clistmod.c -void UpdateAllAvatars(struct ClcData *dat); //cache_func.c - //cluiframes.c -void gtaRenewText(HANDLE hContact); -int ExtraImage_ExtraIDToColumnNum(int extra); -int ExtraImage_ColumnNumToExtraID(int column); +DWORD CompareContacts2_getLMTime(HANDLE u); //contact.c +DWORD mod_CalcHash(const char * a); //mod_skin_selector.c +HICON cliGetIconFromStatusMode(HANDLE hContact, const char *szProto,int status); //clistmod.c +HICON GetMainStatusOverlay(int STATUS); //clc.c +int CLVM_GetContactHiddenStatus(HANDLE hContact, char *szStatus, struct ClcData *dat); //clcitems.c +int BgStatusBarChange(WPARAM wParam,LPARAM lParam); //clcopts.c +int ClcDoProtoAck(HANDLE wParam,ACKDATA * ack); //clc.c +int ModernSkinButtonDeleteAll(); //modernbutton.c +int GetAverageMode( void ); //clisttray.c +int GetContactCachedStatus(HANDLE hContact); //clistsettings.c +INT_PTR GetContactIcon(WPARAM wParam,LPARAM lParam); //clistmod.c +int GetContactIconC(pClcCacheEntry cacheEntry); //clistmod.c +int GetContactIndex(ClcGroup *group,ClcContact *contact); //clcidents.c +int GetStatusForContact(HANDLE hContact,char *szProto); //clistsettings.c +int InitCustomMenus(void); //clistmenus.c +int InitFramesMenus(void); //framesmenus.c +int LoadMoveToGroup(); //movetogroup.c +int LoadPositionsFromDB(BYTE * OrderPos); //clistopts.c +int LoadStatusBarData(); //modern_statusbar.c +int MenuModulesLoaded(WPARAM wParam,LPARAM lParam); //clistmenu.c +int MenuModulesShutdown(WPARAM wParam,LPARAM lParam); //clistmenu.c +int MenuProcessCommand(WPARAM wParam,LPARAM lParam); //clistmenu.c +int ModifyMenuItemProxy(WPARAM wParam,LPARAM lParam); //framesmenu.c +int OnFrameTitleBarBackgroundChange(WPARAM wParam,LPARAM lParam); //cluiframes.c +int ProcessCommandProxy(WPARAM wParam,LPARAM lParam); //framesmenu.c +int QueueAllFramesUpdating (BYTE); //cluiframes.c +int RecursiveDeleteMenu(HMENU hMenu); //clistmenus.c +int ModernSkinButtonRedrawAll(HDC hdc); //modern_button.c +int RegisterButtonByParce(char * ObjectName, char * Params); //mod_skin_selector.c +int RestoreAllContactData(struct ClcData *dat); //cache_funcs.c + +int SkinSelector_DeleteMask(MODERNMASK * mm); //mod_skin_selector.c +int StoreAllContactData(struct ClcData *dat); //cache_func.c +INT_PTR ToggleHideOffline(WPARAM wParam,LPARAM lParam); //contact.c +INT_PTR ToggleGroups(WPARAM wParam,LPARAM lParam); //contact.c +INT_PTR SetUseGroups(WPARAM wParam,LPARAM lParam); //contact.c +INT_PTR ToggleSounds(WPARAM wParam,LPARAM lParam); //contact.c +int UnitFramesMenu(); //framesmenu.c +void ClcOptionsChanged(); //clc.c +void Docking_GetMonitorRectFromWindow(HWND hWnd,RECT *rc); //Docking.c +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 InitTray(); //clisttray.c +void InvalidateDNCEbyPointer(HANDLE hContact,pClcCacheEntry pdnce,int SettingType); //clistsettings.c +void ReAssignExtraIcons(); //extraimage.c +void ShutdownGdiPlus(); //gdiplus.cpp +void TextOutWithGDIp(HDC hDestDC, int x, int y, LPCTSTR lpString, int nCount); //gdiplus.cpp +void UninitCustomMenus(); //clistmenus.c +void UnloadAvatarOverlayIcon(); //clc.c +void UnLoadContactListModule(); //clistmod.c +void UpdateAllAvatars(struct ClcData *dat); //cache_func.c + +//cluiframes.c +void gtaRenewText(HANDLE hContact); +int ExtraImage_ExtraIDToColumnNum(int extra); +int ExtraImage_ColumnNumToExtraID(int column); int LoadSkinButtonModule(); void UninitSkinHotKeys(); @@ -283,45 +284,45 @@ void CustomizeButton(HWND); // INTERFACES -void cliCheckCacheItem(pdisplayNameCacheEntry pdnce); -void cliFreeCacheItem( pdisplayNameCacheEntry p ); -void cliRebuildEntireList(HWND hwnd,struct ClcData *dat); -void cliRecalcScrollBar(HWND hwnd,struct ClcData *dat); -void CLUI_cliOnCreateClc(void); -int cli_AddItemToGroup(ClcGroup *group, int iAboveItem); -int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText); -int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly); -int cliFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk); -int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex); -int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact); -int cli_RemoveEvent(HANDLE hContact, HANDLE hDbEvent); -void cli_AddContactToTree(HWND hwnd,struct ClcData *dat,HANDLE hContact,int updateTotalCount,int checkHideOffline); -void cli_DeleteItemFromTree(HWND hwnd, HANDLE hItem); -void cli_FreeContact( ClcContact* ); -void cli_FreeGroup( ClcGroup* ); -char* cli_GetGroupCountsText(struct ClcData *dat, ClcContact *contact); -void cli_ChangeContactIcon(HANDLE hContact,int iIcon,int add); +void cliCheckCacheItem(pClcCacheEntry pdnce); +void cliFreeCacheItem( pClcCacheEntry p ); +void cliRebuildEntireList(HWND hwnd,struct ClcData *dat); +void cliRecalcScrollBar(HWND hwnd,struct ClcData *dat); +void CLUI_cliOnCreateClc(void); +int cli_AddItemToGroup(ClcGroup *group, int iAboveItem); +int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText); +int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly); +int cliFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefixOk); +int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex); +int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact); +int cli_RemoveEvent(HANDLE hContact, HANDLE hDbEvent); +void cli_AddContactToTree(HWND hwnd,struct ClcData *dat,HANDLE hContact,int updateTotalCount,int checkHideOffline); +void cli_DeleteItemFromTree(HWND hwnd, HANDLE hItem); +void cli_FreeContact( ClcContact* ); +void cli_FreeGroup( ClcGroup* ); +char* cli_GetGroupCountsText(struct ClcData *dat, ClcContact *contact); +void cli_ChangeContactIcon(HANDLE hContact,int iIcon,int add); LRESULT cli_ProcessExternalMessages(HWND hwnd,struct ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam); -struct CListEvent* cliCreateEvent( void ); -struct CListEvent* cli_AddEvent(CLISTEVENT *cle); +struct CListEvent* cliCreateEvent( void ); +struct CListEvent* cli_AddEvent(CLISTEVENT *cle); LRESULT CALLBACK cli_ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -int cliShowHide(WPARAM wParam,LPARAM lParam); -BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase ); -int cliCompareContacts(const ClcContact *contact1,const ClcContact *contact2); -int cliFindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup **subgroup,int *isVisible); -void cliTrayIconUpdateBase(const char *szChangedProto); -void cliCluiProtocolStatusChanged(int status,const char * proto); -HMENU cliBuildGroupPopupMenu(ClcGroup *group); -void cliInvalidateDisplayNameCacheEntry(HANDLE hContact); -void cliCheckCacheItem(pdisplayNameCacheEntry pdnce); -void cli_SaveStateAndRebuildList(HWND hwnd, struct ClcData *dat); -void CLUI_cli_LoadCluiGlobalOpts(void); +int cliShowHide(WPARAM wParam,LPARAM lParam); +BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase ); +int cliCompareContacts(const ClcContact *contact1,const ClcContact *contact2); +int cliFindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,ClcContact **contact,ClcGroup **subgroup,int *isVisible); +void cliTrayIconUpdateBase(const char *szChangedProto); +void cliCluiProtocolStatusChanged(int status,const char * proto); +HMENU cliBuildGroupPopupMenu(ClcGroup *group); +void cliInvalidateDisplayNameCacheEntry(HANDLE hContact); +void cliCheckCacheItem(pClcCacheEntry pdnce); +void cli_SaveStateAndRebuildList(HWND hwnd, struct ClcData *dat); +void CLUI_cli_LoadCluiGlobalOpts(void); INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam); -BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase ); +BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase ); -ClcContact* cliCreateClcContact( void ); -ClcCacheEntryBase* cliCreateCacheItem(HANDLE hContact); -ClcCacheEntryBase* cliGetCacheEntry(HANDLE hContact); +ClcContact* cliCreateClcContact( void ); +ClcCacheEntry* cliCreateCacheItem(HANDLE hContact); +ClcCacheEntry* cliGetCacheEntry(HANDLE hContact); // FUNCTION POINTERS extern BOOL (WINAPI *g_proc_UpdateLayeredWindow)(HWND,HDC,POINT*,SIZE*,HDC,POINT*,COLORREF,BLENDFUNCTION*,DWORD); @@ -329,15 +330,15 @@ extern BOOL (WINAPI *g_proc_SetLayeredWindowAttributesNew)(HWND,COLORREF,BYTE,DW #define WM_DWMCOMPOSITIONCHANGED 0x031E -#define DWM_BB_ENABLE 0x00000001 -#define DWM_BB_BLURREGION 0x00000002 -#define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004 +#define DWM_BB_ENABLE 0x00000001 +#define DWM_BB_BLURREGION 0x00000002 +#define DWM_BB_TRANSITIONONMAXIMIZED 0x00000004 struct DWM_BLURBEHIND { - DWORD dwFlags; - BOOL fEnable; - HRGN hRgnBlur; - BOOL fTransitionOnMaximized; + DWORD dwFlags; + BOOL fEnable; + HRGN hRgnBlur; + BOOL fTransitionOnMaximized; }; extern HRESULT (WINAPI *g_proc_DWMEnableBlurBehindWindow)(HWND hWnd, DWM_BLURBEHIND *pBlurBehind); diff --git a/plugins/Clist_modern/src/hdr/modern_static_clui.h b/plugins/Clist_modern/src/hdr/modern_static_clui.h index 11e492e211..497474e1ee 100644 --- a/plugins/Clist_modern/src/hdr/modern_static_clui.h +++ b/plugins/Clist_modern/src/hdr/modern_static_clui.h @@ -65,8 +65,8 @@ int ClcEnterDragToScroll(HWND hwnd, int Y); int CListMod_ContactListShutdownProc(WPARAM wParam,LPARAM lParam); int CListMod_HideWindow(HWND hwndContactList, int mode); -int CListSettings_GetCopyFromCache(pdisplayNameCacheEntry pDest, DWORD flag); -int CListSettings_SetToCache(pdisplayNameCacheEntry pSrc, DWORD flag); +int CListSettings_GetCopyFromCache(pClcCacheEntry pDest, DWORD flag); +int CListSettings_SetToCache(pClcCacheEntry pSrc, DWORD flag); int CLUIServices_LoadModule(void); INT_PTR CLUIServices_SortList(WPARAM wParam,LPARAM lParam); diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 4d3fb7229f..6f2cef1528 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -165,8 +165,8 @@ static HRESULT SubclassClistInterface() pcli->bDisplayLocked = TRUE; - pcli->pfnCheckCacheItem = (void (*)(ClcCacheEntryBase*)) cliCheckCacheItem; - pcli->pfnFreeCacheItem = (void(*)(ClcCacheEntryBase*)) cliFreeCacheItem; + pcli->pfnCheckCacheItem = cliCheckCacheItem; + pcli->pfnFreeCacheItem = cliFreeCacheItem; pcli->pfnInvalidateDisplayNameCacheEntry = cliInvalidateDisplayNameCacheEntry; pcli->pfnTrayIconUpdateBase = cliTrayIconUpdateBase; diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index 342b3eefad..77e06dff5e 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -121,7 +121,7 @@ static int amThreadProc(HWND hwnd) DWORD time; HANDLE hContact; HANDLE ACK = 0; - displayNameCacheEntry dnce; + ClcCacheEntry dnce; memset( &dnce, 0, sizeof(dnce)); while (!MirandaExiting()) diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 575aba3a1c..2c49634412 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -51,8 +51,8 @@ static int CopySkipUnprintableChars(TCHAR *to, TCHAR * buf, DWORD size); static BOOL ExecuteOnAllContacts(struct ClcData *dat, ExecuteOnAllContactsFuncPtr func, void *param); static BOOL ExecuteOnAllContactsOfGroup(ClcGroup *group, ExecuteOnAllContactsFuncPtr func, void *param); int CLUI_SyncGetShortData(WPARAM wParam, LPARAM lParam); -void CListSettings_FreeCacheItemData(pdisplayNameCacheEntry pDst); -void CListSettings_FreeCacheItemDataOption( pdisplayNameCacheEntry pDst, DWORD flag ); +void CListSettings_FreeCacheItemData(pClcCacheEntry pDst); +void CListSettings_FreeCacheItemDataOption( pClcCacheEntry pDst, DWORD flag ); /* * Get time zone for contact */ @@ -83,7 +83,7 @@ void Cache_GetText(struct ClcData *dat, ClcContact *contact, BOOL forceRenew) } } -void CSmileyString::AddListeningToIcon(struct SHORTDATA *dat, pdisplayNameCacheEntry pdnce, TCHAR *szText, BOOL replace_smileys) +void CSmileyString::AddListeningToIcon(struct SHORTDATA *dat, pClcCacheEntry pdnce, TCHAR *szText, BOOL replace_smileys) { iMaxSmileyHeight = 0; DestroySmileyList(); diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 1725e0be57..b38f99efde 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -1841,7 +1841,7 @@ static LRESULT clcOnIntmStatusChanged(struct ClcData *dat, HWND hwnd, UINT msg, { int ret = corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam); if (wParam != 0) { - pdisplayNameCacheEntry pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry((HANDLE)wParam); + pClcCacheEntry pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry((HANDLE)wParam); if (pdnce && pdnce->m_cache_cszProto) { ClcContact *contact = NULL; pdnce___SetStatus( pdnce, GetStatusForContact(pdnce->hContact,pdnce->m_cache_cszProto)); diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index b912bf3762..c730ad66bb 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -31,8 +31,8 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) { int subcount,i,j; HANDLE hsub; - pdisplayNameCacheEntry cacheEntry; - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(cont->hContact); + pClcCacheEntry cacheEntry; + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(cont->hContact); cont->SubExpanded = (db_get_b(cont->hContact,"CList","Expanded",0) && (db_get_b(NULL,"CLC","MetaExpanding",SETTING_METAEXPANDING_DEFAULT))); subcount = (int)CallService(MS_MC_GETNUMCONTACTS,(WPARAM)cont->hContact,0); @@ -50,7 +50,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) i=0; for (j = 0; j < subcount; j++) { hsub = (HANDLE)CallService(MS_MC_GETSUBCONTACT,(WPARAM)cont->hContact,j); - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hsub); + cacheEntry = (pClcCacheEntry)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)) || wStatus != ID_STATUS_OFFLINE )) { @@ -152,7 +152,7 @@ int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText) static void _LoadDataToContact(ClcContact * cont, ClcGroup *group, struct ClcData *dat, HANDLE hContact) { - pdisplayNameCacheEntry cacheEntry = NULL; + pClcCacheEntry cacheEntry = NULL; WORD apparentMode; DWORD idleMode; char * szProto; @@ -168,7 +168,7 @@ static void _LoadDataToContact(ClcContact * cont, ClcGroup *group, struct ClcDat cont->hContact = hContact; pcli->pfnInvalidateDisplayNameCacheEntry(hContact); - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); szProto = cacheEntry->m_cache_cszProto; cont->proto = szProto; @@ -214,7 +214,7 @@ static void _LoadDataToContact(ClcContact * cont, ClcGroup *group, struct ClcDat cont->bContactRate = db_get_b(hContact, "CList", "Rate",0); } -static ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group, pdisplayNameCacheEntry cacheEntry) +static ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group, pClcCacheEntry cacheEntry) { HANDLE hContact; int i; @@ -228,7 +228,7 @@ static ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group, pdisp i = cli_AddItemToGroup(group,i+1); _LoadDataToContact(group->cl.items[i], group, dat, hContact); - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); ClearRowByIndexCache(); return group->cl.items[i]; } @@ -268,7 +268,7 @@ void cli_AddContactToTree(HWND hwnd,struct ClcData *dat,HANDLE hContact,int upda { ClcGroup *group; ClcContact * cont; - pdisplayNameCacheEntry cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); if (dat->IsMetaContactsEnabled && cacheEntry && cacheEntry->m_cache_nHiddenSubcontact) return; //contact should not be added if ( !dat->IsMetaContactsEnabled && cacheEntry && g_szMetaModuleName && !mir_strcmp(cacheEntry->m_cache_cszProto,g_szMetaModuleName)) return; corecli.pfnAddContactToTree(hwnd,dat,hContact,updateTotalCount,checkHideOffline); @@ -374,9 +374,9 @@ void cliRebuildEntireList(HWND hwnd,struct ClcData *dat) hContact = db_find_first(); while(hContact) { - pdisplayNameCacheEntry cacheEntry = NULL; + pClcCacheEntry cacheEntry = NULL; cont = NULL; - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); int nHiddenStatus = CLVM_GetContactHiddenStatus(hContact, NULL, dat); if ((style&CLS_SHOWHIDDEN && nHiddenStatus != -1) || !nHiddenStatus) @@ -626,7 +626,7 @@ void cli_SaveStateAndRebuildList(HWND hwnd, struct ClcData *dat) } -WORD pdnce___GetStatus(pdisplayNameCacheEntry pdnce) +WORD pdnce___GetStatus(pClcCacheEntry pdnce) { if ( !pdnce) return ID_STATUS_OFFLINE; @@ -642,7 +642,7 @@ WORD pdnce___GetStatus(pdisplayNameCacheEntry pdnce) } -void pdnce___SetStatus( pdisplayNameCacheEntry pdnce, WORD wStatus ) +void pdnce___SetStatus( pClcCacheEntry pdnce, WORD wStatus ) { if (pdnce) pdnce->m_cache_nStatus = wStatus; } @@ -654,13 +654,12 @@ ClcContact* cliCreateClcContact() return contact; } -ClcCacheEntryBase* cliCreateCacheItem( HANDLE hContact ) +ClcCacheEntry* cliCreateCacheItem( HANDLE hContact ) { - pdisplayNameCacheEntry p = (pdisplayNameCacheEntry)mir_calloc(sizeof( displayNameCacheEntry )); + pClcCacheEntry p = (pClcCacheEntry)mir_calloc(sizeof( ClcCacheEntry )); if (p == NULL) return NULL; - memset(p,0,sizeof( displayNameCacheEntry )); p->hContact = hContact; InvalidateDNCEbyPointer(hContact,p,0); p->szSecondLineText = NULL; @@ -672,19 +671,15 @@ ClcCacheEntryBase* cliCreateCacheItem( HANDLE hContact ) void cliInvalidateDisplayNameCacheEntry(HANDLE hContact) { - pdisplayNameCacheEntry p; - p = (pdisplayNameCacheEntry) pcli->pfnGetCacheEntry(hContact); - if (p) InvalidateDNCEbyPointer(hContact,p,0); + pClcCacheEntry p = pcli->pfnGetCacheEntry(hContact); + if (p) + InvalidateDNCEbyPointer(hContact,p,0); return; } char* cli_GetGroupCountsText(struct ClcData *dat, ClcContact *contact) { - char * res; - - res = corecli.pfnGetGroupCountsText(dat, contact); - - return res; + return corecli.pfnGetGroupCountsText(dat, contact); } int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly) diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index 1d1973a8af..74251d68eb 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -126,8 +126,8 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) // substitute params by mostonline contact datas HANDLE hMostOnlineContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hActContact,0); if (hMostOnlineContact) { - pdisplayNameCacheEntry cacheEntry; - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hMostOnlineContact); + pClcCacheEntry cacheEntry; + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hMostOnlineContact); if (cacheEntry && cacheEntry->m_cache_cszProto) { szActProto = cacheEntry->m_cache_cszProto; nActStatus = pdnce___GetStatus( cacheEntry ); @@ -155,7 +155,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) return corecli.pfnIconFromStatusMode(szProto,nStatus,NULL); } -int GetContactIconC(pdisplayNameCacheEntry cacheEntry) +int GetContactIconC(pClcCacheEntry cacheEntry) { return ExtIconFromStatusMode(cacheEntry->hContact,cacheEntry->m_cache_cszProto,cacheEntry->m_cache_cszProto == NULL ? ID_STATUS_OFFLINE : pdnce___GetStatus( cacheEntry )); } diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index cbea7018e0..ed07d24236 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -28,8 +28,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "hdr/modern_awaymsg.h" void InsertContactIntoTree(HANDLE hContact,int status); -static displayNameCacheEntry *displayNameCache; -void CListSettings_FreeCacheItemDataOption( pdisplayNameCacheEntry pDst, DWORD flag ); +static ClcCacheEntry *displayNameCache; +void CListSettings_FreeCacheItemDataOption( pClcCacheEntry pDst, DWORD flag ); int PostAutoRebuidMessage(HWND hwnd); static int displayNameCacheSize; @@ -40,14 +40,14 @@ char *GetProtoForContact(HANDLE hContact); int GetStatusForContact(HANDLE hContact,char *szProto); TCHAR *UnknownConctactTranslatedName = NULL; -void InvalidateDNCEbyPointer(HANDLE hContact,pdisplayNameCacheEntry pdnce,int SettingType); +void InvalidateDNCEbyPointer(HANDLE hContact,pClcCacheEntry pdnce,int SettingType); static int handleCompare( void* c1, void* c2 ) { INT_PTR p1, p2; - displayNameCacheEntry * dnce1 = (displayNameCacheEntry *)c1; - displayNameCacheEntry * dnce2 = (displayNameCacheEntry *)c2; + ClcCacheEntry * dnce1 = (ClcCacheEntry *)c1; + ClcCacheEntry * dnce2 = (ClcCacheEntry *)c2; p1 = (INT_PTR)dnce1->hContact; p2 = (INT_PTR)dnce2->hContact; @@ -75,9 +75,8 @@ void FreeDisplayNameCache() UninitCacheAsync(); UninitAwayMsgModule(); if ( clistCache != NULL ) { - int i; - for ( i=0; i < clistCache->realCount; i++) { - pcli->pfnFreeCacheItem(( ClcCacheEntryBase* )clistCache->items[i] ); + for (int i=0; i < clistCache->realCount; i++) { + pcli->pfnFreeCacheItem(( ClcCacheEntry* )clistCache->items[i] ); mir_free_and_nil( clistCache->items[i] ); } @@ -87,28 +86,29 @@ void FreeDisplayNameCache() } } -ClcCacheEntryBase* cliGetCacheEntry(HANDLE hContact) +ClcCacheEntry* cliGetCacheEntry(HANDLE hContact) { - ClcCacheEntryBase* p; - int idx; if ( !clistCache) return NULL; + + int idx; + ClcCacheEntry *p; if ( !List_GetIndex( clistCache, &hContact, &idx )) { if (( p = pcli->pfnCreateCacheItem( hContact )) != NULL ) { List_Insert( clistCache, p, idx ); pcli->pfnInvalidateDisplayNameCacheEntry( hContact ); } } - else p = ( ClcCacheEntryBase* )clistCache->items[idx]; + else p = (ClcCacheEntry*)clistCache->items[idx]; pcli->pfnCheckCacheItem( p ); return p; } -void CListSettings_FreeCacheItemData(pdisplayNameCacheEntry pDst) +void CListSettings_FreeCacheItemData(pClcCacheEntry pDst) { CListSettings_FreeCacheItemDataOption( pDst, CCI_ALL); } -void CListSettings_FreeCacheItemDataOption( pdisplayNameCacheEntry pDst, DWORD flag ) +void CListSettings_FreeCacheItemDataOption( pClcCacheEntry pDst, DWORD flag ) { if ( !pDst) return; @@ -127,11 +127,11 @@ void CListSettings_FreeCacheItemDataOption( pdisplayNameCacheEntry pDst, DWORD f } } -int CListSettings_GetCopyFromCache(pdisplayNameCacheEntry pDest, DWORD flag); -int CListSettings_SetToCache(pdisplayNameCacheEntry pSrc, DWORD flag); +int CListSettings_GetCopyFromCache(pClcCacheEntry pDest, DWORD flag); +int CListSettings_SetToCache(pClcCacheEntry pSrc, DWORD flag); -void CListSettings_CopyCacheItems(pdisplayNameCacheEntry pDst, pdisplayNameCacheEntry pSrc, DWORD flag) +void CListSettings_CopyCacheItems(pClcCacheEntry pDst, pClcCacheEntry pSrc, DWORD flag) { if ( !pDst || !pSrc) return; CListSettings_FreeCacheItemDataOption(pDst, flag); @@ -177,12 +177,12 @@ void CListSettings_CopyCacheItems(pdisplayNameCacheEntry pDst, pdisplayNameCache } } -int CListSettings_GetCopyFromCache(pdisplayNameCacheEntry pDest, DWORD flag) +int CListSettings_GetCopyFromCache(pClcCacheEntry pDest, DWORD flag) { if ( !pDest || !pDest->hContact) return -1; - pdisplayNameCacheEntry pSource = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(pDest->hContact); + pClcCacheEntry pSource = (pClcCacheEntry)pcli->pfnGetCacheEntry(pDest->hContact); if ( !pSource) return -1; @@ -190,12 +190,12 @@ int CListSettings_GetCopyFromCache(pdisplayNameCacheEntry pDest, DWORD flag) return 0; } -int CListSettings_SetToCache(pdisplayNameCacheEntry pSrc, DWORD flag) +int CListSettings_SetToCache(pClcCacheEntry pSrc, DWORD flag) { if ( !pSrc || !pSrc->hContact) return -1; - pdisplayNameCacheEntry pDst = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(pSrc->hContact); + pClcCacheEntry pDst = (pClcCacheEntry)pcli->pfnGetCacheEntry(pSrc->hContact); if ( !pDst) return -1; @@ -203,7 +203,7 @@ int CListSettings_SetToCache(pdisplayNameCacheEntry pSrc, DWORD flag) return 0; } -void cliFreeCacheItem( pdisplayNameCacheEntry p ) +void cliFreeCacheItem( pClcCacheEntry p ) { HANDLE hContact = p->hContact; TRACEVAR("cliFreeCacheItem hContact = %d",hContact); @@ -215,7 +215,7 @@ void cliFreeCacheItem( pdisplayNameCacheEntry p ) p->ssThirdLine.DestroySmileyList(); } -void cliCheckCacheItem(pdisplayNameCacheEntry pdnce) +void cliCheckCacheItem(pClcCacheEntry pdnce) { if (pdnce == NULL) return; @@ -301,7 +301,7 @@ void IvalidateDisplayNameCache(DWORD mode) } } -void InvalidateDNCEbyPointer(HANDLE hContact, pdisplayNameCacheEntry pdnce, int SettingType) +void InvalidateDNCEbyPointer(HANDLE hContact, pClcCacheEntry pdnce, int SettingType) { if (hContact == NULL || pdnce == NULL) return; @@ -348,8 +348,8 @@ void InvalidateDNCEbyPointer(HANDLE hContact, pdisplayNameCacheEntry pdnce, int char *GetContactCachedProtocol(HANDLE hContact) { - pdisplayNameCacheEntry cacheEntry = NULL; - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry cacheEntry = NULL; + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); if (cacheEntry && cacheEntry->m_cache_cszProto) return cacheEntry->m_cache_cszProto; @@ -366,7 +366,7 @@ int GetStatusForContact(HANDLE hContact,char *szProto) return (szProto) ? (int)(db_get_w((HANDLE)hContact,szProto,"Status",ID_STATUS_OFFLINE)) : ID_STATUS_OFFLINE; } -void displayNameCacheEntry::freeName() +void ClcCacheEntry::freeName() { if ( !isUnknown) mir_free(tszName); @@ -375,7 +375,7 @@ void displayNameCacheEntry::freeName() tszName = NULL; } -void displayNameCacheEntry::getName() +void ClcCacheEntry::getName() { if (UnknownConctactTranslatedName == NULL) UnknownConctactTranslatedName = TranslateT("(Unknown Contact)"); @@ -400,8 +400,8 @@ LBL_Unknown: int GetContactInfosForSort(HANDLE hContact,char **Proto,TCHAR **Name,int *Status) { - pdisplayNameCacheEntry cacheEntry = NULL; - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry cacheEntry = NULL; + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); if (cacheEntry != NULL) { if (Proto != NULL) *Proto = cacheEntry->m_cache_cszProto; @@ -414,8 +414,8 @@ int GetContactInfosForSort(HANDLE hContact,char **Proto,TCHAR **Name,int *Status int GetContactCachedStatus(HANDLE hContact) { - pdisplayNameCacheEntry cacheEntry = NULL; - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry cacheEntry = NULL; + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); return pdnce___GetStatus( cacheEntry ); } @@ -435,7 +435,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) if (MirandaExiting() || !pcli || !clistCache || hContact == NULL) return 0; - pdisplayNameCacheEntry pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); if (pdnce == NULL) { TRACE("!!! Very bad pdnce not found."); return 0; diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 70a3ece075..eb3219fee1 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -1450,13 +1450,13 @@ int CLUI_SizingGetWindowRect(HWND hwnd,RECT * rc) int CLUI_SyncGetPDNCE(WPARAM wParam, LPARAM lParam) { //log0("CLUI_SyncGetPDNCE"); - return CListSettings_GetCopyFromCache((pdisplayNameCacheEntry)lParam, wParam ? (DWORD) wParam : CCI_ALL ); + return CListSettings_GetCopyFromCache((pClcCacheEntry)lParam, wParam ? (DWORD) wParam : CCI_ALL ); } int CLUI_SyncSetPDNCE(WPARAM wParam, LPARAM lParam) { //log0("CLUI_SyncSetPDNCE"); - return CListSettings_SetToCache((pdisplayNameCacheEntry)lParam, wParam ? (DWORD) wParam : CCI_ALL ); + return CListSettings_SetToCache((pClcCacheEntry)lParam, wParam ? (DWORD) wParam : CCI_ALL ); } int CLUI_SyncGetShortData(WPARAM wParam, LPARAM lParam) @@ -2828,7 +2828,7 @@ LRESULT CLUI::OnClickNotify( NMCLISTCONTROL * pnmc ) { if ( !IsHContactGroup(hItem) && !IsHContactInfo(hItem)) { - pdisplayNameCacheEntry pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(pnmc->hItem); + pClcCacheEntry pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry(pnmc->hItem); if (pdnce == NULL) return 0; int extra = ExtraImage_ColumnNumToExtraID(pnmc->iColumn); diff --git a/plugins/Clist_modern/src/modern_extraimage.cpp b/plugins/Clist_modern/src/modern_extraimage.cpp index 8cfec7f76c..df51e1c126 100644 --- a/plugins/Clist_modern/src/modern_extraimage.cpp +++ b/plugins/Clist_modern/src/modern_extraimage.cpp @@ -265,7 +265,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact) char *(ImgIndex[64]); int maxpr,count,i; PROTOACCOUNT **accs; - pdisplayNameCacheEntry pdnce; + pClcCacheEntry pdnce; int em,pr,sms,a1,a2,w1,c1; int tick = 0; g_mutex_bSetAllExtraIconsCycle = 1; @@ -309,7 +309,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact) szProto = NULL; hItem = hContact; if (hItem == 0){continue;}; - pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hItem); + pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry(hItem); if (pdnce == NULL) {continue;}; // szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact,0); diff --git a/plugins/Clist_modern/src/modern_gettextasync.cpp b/plugins/Clist_modern/src/modern_gettextasync.cpp index d0ba4061cb..7dccece7b9 100644 --- a/plugins/Clist_modern/src/modern_gettextasync.cpp +++ b/plugins/Clist_modern/src/modern_gettextasync.cpp @@ -108,7 +108,7 @@ static int gtaThreadProc(void * lpParam) } if ( !MirandaExiting()) { - displayNameCacheEntry cacheEntry; + ClcCacheEntry cacheEntry; memset( &cacheEntry, 0, sizeof(cacheEntry)); cacheEntry.hContact = mpChain.hContact; if ( !Sync(CLUI_SyncGetPDNCE, (WPARAM) 0,(LPARAM)&cacheEntry)) diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index 7005e38d88..2a9a1df6ef 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -82,11 +82,11 @@ int mod_CalcRowHeight_worker(struct ClcData *dat, HWND hwnd, ClcContact *contact BYTE i=0; int res = 0; int height = 0; - displayNameCacheEntry * pdnce; + ClcCacheEntry * pdnce; BOOL hasAvatar = FALSE; DWORD style; style = GetWindowLongPtr(hwnd,GWL_STYLE); - pdnce = (displayNameCacheEntry*)pcli->pfnGetCacheEntry(contact->hContact); + pdnce = (ClcCacheEntry*)pcli->pfnGetCacheEntry(contact->hContact); if ( !RowHeights_Alloc(dat, item + 1)) return -1; @@ -560,7 +560,7 @@ int RowHeights_GetRowHeight_worker(struct ClcData *dat, HWND hwnd, ClcContact *c return -1; int height = 0; - displayNameCacheEntry *pdnce = (contact->type == CLCIT_CONTACT) ? (displayNameCacheEntry*)pcli->pfnGetCacheEntry(contact->hContact) : NULL; + ClcCacheEntry *pdnce = (contact->type == CLCIT_CONTACT) ? (ClcCacheEntry*)pcli->pfnGetCacheEntry(contact->hContact) : NULL; if (dat->row_variable_height) { if ( !dat->text_ignore_size_for_row_height) { diff --git a/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp b/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp index ca993eb818..49cc833397 100644 --- a/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp @@ -268,7 +268,7 @@ void SetAllExtraIcons(HWND hwndList,HANDLE hContact) char *ImgIndex[64]; int maxpr,count,i; PROTOACCOUNT **accs; - pdisplayNameCacheEntry pdnce; + pClcCacheEntry pdnce; int em,pr,sms,a1,a2,w1,c1; int tick = 0; BOOL hasExtraIconsService; @@ -310,7 +310,7 @@ void SetAllExtraIcons(HWND hwndList,HANDLE hContact) szProto = NULL; hItem = hContact; if (hItem == 0){continue;}; - pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hItem); + pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry(hItem); if (pdnce == NULL) {continue;}; // szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(WPARAM)hContact,0); diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index 840943b2e8..8852594d7e 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -63,7 +63,7 @@ void StatusUpdaterThread(void*) if (DBGetContactSettingByte(hContact,"CList","StatusMsgAuto",0)) { for (i = 0; i<5; i++) { if (hContact != NULL) { - pdisplayNameCacheEntry pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry((HANDLE)hContact); + pClcCacheEntry pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry((HANDLE)hContact); if (pdnce && !pdnce->protoNotExists && pdnce->szProto) CallContactService(hContact, PSS_GETAWAYMSG, 0, 0); @@ -147,7 +147,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L int recalcScrollBar = 0,shouldShow; HANDLE hSelItem = NULL; struct ClcContact *selcontact = NULL; - pdisplayNameCacheEntry cacheEntry = GetContactFullCacheEntry((HANDLE)wParam); + pClcCacheEntry cacheEntry = GetContactFullCacheEntry((HANDLE)wParam); WORD status; int needsResort = 0; diff --git a/plugins/Clist_mw/src/clcidents.cpp b/plugins/Clist_mw/src/clcidents.cpp index 2d706916a9..275a7316b0 100644 --- a/plugins/Clist_mw/src/clcidents.cpp +++ b/plugins/Clist_mw/src/clcidents.cpp @@ -80,23 +80,23 @@ int GetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex) return -1; } -pdisplayNameCacheEntry GetCLCFullCacheEntry(struct ClcData *dat,HANDLE hContact) +pClcCacheEntry GetCLCFullCacheEntry(struct ClcData *dat,HANDLE hContact) { if (hContact == 0) return NULL; - displayNameCacheEntry dnce; + ClcCacheEntry dnce; dnce.hContact = hContact; - displayNameCacheEntry *pdnce = (displayNameCacheEntry*)List_Find(&dat->lCLCContactsCache,&dnce); + ClcCacheEntry *pdnce = (ClcCacheEntry*)List_Find(&dat->lCLCContactsCache,&dnce); if (pdnce == NULL) { - pdnce = (displayNameCacheEntry*)mir_calloc(sizeof(displayNameCacheEntry)); + pdnce = (ClcCacheEntry*)mir_calloc(sizeof(ClcCacheEntry)); pdnce->hContact = hContact; int idx; List_GetIndex(&dat->lCLCContactsCache,pdnce,&idx); List_Insert(&dat->lCLCContactsCache,pdnce,idx); - displayNameCacheEntry *pdnce2 = (displayNameCacheEntry*)List_Find(&dat->lCLCContactsCache,&dnce);//for check + ClcCacheEntry *pdnce2 = (ClcCacheEntry*)List_Find(&dat->lCLCContactsCache,&dnce);//for check if (pdnce2->hContact != pdnce->hContact) return NULL; @@ -109,14 +109,14 @@ pdisplayNameCacheEntry GetCLCFullCacheEntry(struct ClcData *dat,HANDLE hContact) void ClearClcContactCache(struct ClcData *dat,HANDLE hContact) { - pdisplayNameCacheEntry cacheEntry; + pClcCacheEntry cacheEntry; if (hContact == INVALID_HANDLE_VALUE) { int i,tick; tick = GetTickCount(); for (i = 0;i<(dat->lCLCContactsCache.realCount);i++) { - pdisplayNameCacheEntry pdnce = (pdisplayNameCacheEntry)dat->lCLCContactsCache.items[i]; + pClcCacheEntry pdnce = (pClcCacheEntry)dat->lCLCContactsCache.items[i]; pdnce->ClcContact = NULL; } tick = GetTickCount()-tick; @@ -135,7 +135,7 @@ void ClearClcContactCache(struct ClcData *dat,HANDLE hContact) void SetClcContactCacheItem(struct ClcData *dat,HANDLE hContact,void *contact) { - pdisplayNameCacheEntry cacheEntry; + pClcCacheEntry cacheEntry; if ( !IsHContactGroup(hContact) && !IsHContactInfo(hContact)) { cacheEntry = GetCLCFullCacheEntry(dat,hContact); if (cacheEntry != NULL) @@ -153,7 +153,7 @@ int FindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,struct ClcContact **cont if (isVisible == NULL && hItem != NULL && subgroup == NULL && !IsHContactGroup(hItem) && !IsHContactInfo(hItem)) { //try use cache - pdisplayNameCacheEntry cacheEntry; + pClcCacheEntry cacheEntry; cacheEntry = GetCLCFullCacheEntry(dat,hItem); if (cacheEntry != NULL) { if (cacheEntry->ClcContact == NULL) { diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index 16d3c2e309..24c37b102e 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -41,7 +41,7 @@ void AddSubcontacts(struct ClcContact * cont) { int subcount,i,j; HANDLE hsub; - pdisplayNameCacheEntry cacheEntry; + pClcCacheEntry cacheEntry; cacheEntry = GetContactFullCacheEntry(cont->hContact); OutputDebugStringA("Proceed AddSubcontacts\r\n"); subcount = (int)CallService(MS_MC_GETNUMCONTACTS,(WPARAM)cont->hContact,0); @@ -111,7 +111,7 @@ int AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText) return i; } -static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group,pdisplayNameCacheEntry cacheEntry) +static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group,pClcCacheEntry cacheEntry) { char *szProto; WORD apparentMode; @@ -192,7 +192,7 @@ void AddContactToTree(HWND hwnd,struct ClcData *dat,HANDLE hContact,int updateTo if (FindItem(hwnd,dat,hContact,NULL,NULL,NULL) == 1) return; - pdisplayNameCacheEntry cacheEntry = GetContactFullCacheEntry(hContact); + pClcCacheEntry cacheEntry = GetContactFullCacheEntry(hContact); if (cacheEntry == NULL) return; @@ -357,7 +357,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat) hContact = db_find_first(); while(hContact) { - pdisplayNameCacheEntry cacheEntry; + pClcCacheEntry cacheEntry; cont = NULL; cacheEntry = GetContactFullCacheEntry(hContact); //cacheEntry->ClcContact = NULL; diff --git a/plugins/Clist_mw/src/clist.h b/plugins/Clist_mw/src/clist.h index 20c8a7ce80..56efca3218 100644 --- a/plugins/Clist_mw/src/clist.h +++ b/plugins/Clist_mw/src/clist.h @@ -31,7 +31,7 @@ void SortContacts(void); void ChangeContactIcon(HANDLE hContact,int iIcon,int add); int GetContactInfosForSort(HANDLE hContact,char **Proto,TCHAR **Name,int *Status); -struct displayNameCacheEntry : public ClcCacheEntryBase +struct ClcCacheEntry : public ClcCacheEntryBase { int noHiddenOffline; @@ -48,8 +48,8 @@ struct displayNameCacheEntry : public ClcCacheEntryBase boolean isUnknown; }; -typedef displayNameCacheEntry *pdisplayNameCacheEntry; +typedef ClcCacheEntry *pClcCacheEntry; -pdisplayNameCacheEntry GetContactFullCacheEntry(HANDLE hContact); +pClcCacheEntry GetContactFullCacheEntry(HANDLE hContact); #endif \ No newline at end of file diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index 2c0561fd7c..ff096bb96c 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -52,8 +52,8 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HANDLE hContact) // substitute params by mostonline contact datas HANDLE hMostOnlineContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hActContact,0); if (hMostOnlineContact && hMostOnlineContact != (HANDLE)CALLSERVICE_NOTFOUND) { - pdisplayNameCacheEntry cacheEntry; - cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hMostOnlineContact); + pClcCacheEntry cacheEntry; + cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hMostOnlineContact); if (cacheEntry && cacheEntry->szProto) { szActProto = cacheEntry->szProto; nActStatus = cacheEntry->status; diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp index d3a9be197a..fc843229ee 100644 --- a/plugins/Clist_mw/src/clistsettings.cpp +++ b/plugins/Clist_mw/src/clistsettings.cpp @@ -30,9 +30,9 @@ char *GetProtoForContact(HANDLE hContact); int GetStatusForContact(HANDLE hContact,char *szProto); TCHAR *UnknownConctactTranslatedName; extern boolean OnModulesLoadedCalled; -void InvalidateDisplayNameCacheEntryByPDNE(HANDLE hContact,pdisplayNameCacheEntry pdnce,int SettingType); +void InvalidateDisplayNameCacheEntryByPDNE(HANDLE hContact,pClcCacheEntry pdnce,int SettingType); -static int handleCompare( displayNameCacheEntry* c1, displayNameCacheEntry* c2 ) +static int handleCompare( ClcCacheEntry* c1, ClcCacheEntry* c2 ) { return (char*)c1->hContact - (char*)c2->hContact; } @@ -50,7 +50,7 @@ void InitDisplayNameCache(SortedList *list) i = 0; while (hContact != 0) { - displayNameCacheEntry *pdnce = (pdisplayNameCacheEntry)mir_calloc(sizeof(displayNameCacheEntry)); + ClcCacheEntry *pdnce = (pClcCacheEntry)mir_calloc(sizeof(ClcCacheEntry)); pdnce->hContact = hContact; InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,0); List_GetIndex(list,pdnce,&idx); @@ -59,9 +59,8 @@ void InitDisplayNameCache(SortedList *list) i++; } } -void FreeDisplayNameCacheItem(ClcCacheEntryBase *_p) +void FreeDisplayNameCacheItem(pClcCacheEntry p) { - pdisplayNameCacheEntry p = (pdisplayNameCacheEntry)_p; if ( p->tszName) { mir_free(p->tszName); p->tszName = NULL; } if ( p->szProto) { mir_free(p->szProto); p->szProto = NULL; } if ( p->tszGroup) { mir_free(p->tszGroup); p->tszGroup = NULL; } @@ -69,19 +68,17 @@ void FreeDisplayNameCacheItem(ClcCacheEntryBase *_p) void FreeDisplayNameCache(SortedList *list) { - int i; - - for ( i = 0; i < list->realCount; i++) { - FreeDisplayNameCacheItem((ClcCacheEntryBase*)list->items[i] ); + for (int i = 0; i < list->realCount; i++) { + FreeDisplayNameCacheItem((ClcCacheEntry*)list->items[i] ); mir_free(list->items[i]); } List_Destroy(list); } -void CheckPDNCE(ClcCacheEntryBase *_pdnce) +void CheckPDNCE(ClcCacheEntry *_pdnce) { - pdisplayNameCacheEntry pdnce = (pdisplayNameCacheEntry)_pdnce; + pClcCacheEntry pdnce = (pClcCacheEntry)_pdnce; if (pdnce == NULL) return; @@ -150,7 +147,7 @@ void CheckPDNCE(ClcCacheEntryBase *_pdnce) pdnce->IsExpanded = DBGetContactSettingByte(pdnce->hContact,"CList","Expanded",0); } -void InvalidateDisplayNameCacheEntryByPDNE(HANDLE hContact,pdisplayNameCacheEntry pdnce,int SettingType) +void InvalidateDisplayNameCacheEntryByPDNE(HANDLE hContact,pClcCacheEntry pdnce,int SettingType) { if ( hContact == NULL || pdnce == NULL ) return; @@ -201,7 +198,7 @@ void InvalidateDisplayNameCacheEntryByPDNE(HANDLE hContact,pdisplayNameCacheEntr char *GetContactCachedProtocol(HANDLE hContact) { - pdisplayNameCacheEntry cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); if (cacheEntry&&cacheEntry->szProto) return cacheEntry->szProto; @@ -247,9 +244,9 @@ TCHAR* GetNameForContact(HANDLE hContact,int flag,boolean *isUnknown) return result; } -pdisplayNameCacheEntry GetContactFullCacheEntry(HANDLE hContact) +pClcCacheEntry GetContactFullCacheEntry(HANDLE hContact) { - pdisplayNameCacheEntry cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); if (cacheEntry != NULL) return(cacheEntry); @@ -258,7 +255,7 @@ pdisplayNameCacheEntry GetContactFullCacheEntry(HANDLE hContact) int GetContactInfosForSort(HANDLE hContact,char **Proto,TCHAR **Name,int *Status) { - pdisplayNameCacheEntry cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); if (cacheEntry != NULL) { if (Proto != NULL) *Proto = cacheEntry->szProto; @@ -270,7 +267,7 @@ int GetContactInfosForSort(HANDLE hContact,char **Proto,TCHAR **Name,int *Status int GetContactCachedStatus(HANDLE hContact) { - pdisplayNameCacheEntry cacheEntry = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hContact); + pClcCacheEntry cacheEntry = (pClcCacheEntry)pcli->pfnGetCacheEntry(hContact); if (cacheEntry&&cacheEntry->status != 0) return cacheEntry->status; return 0; } @@ -278,7 +275,7 @@ int GetContactCachedStatus(HANDLE hContact) int ContactSettingChanged(WPARAM wParam,LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - pdisplayNameCacheEntry pdnce; + pClcCacheEntry pdnce; // Early exit if ((HANDLE)wParam == NULL) @@ -286,7 +283,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) __try { - pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry((HANDLE)wParam); + pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry((HANDLE)wParam); if (pdnce == NULL) { OutputDebugStringA("!!! Very bad pdnce not found."); diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp index bddf0478e0..77f55e5789 100644 --- a/plugins/Clist_mw/src/clui.cpp +++ b/plugins/Clist_mw/src/clui.cpp @@ -708,9 +708,9 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l if (!IsHContactGroup(hItem)&&!IsHContactInfo(hItem)) { int extra; - pdisplayNameCacheEntry pdnce; + pClcCacheEntry pdnce; - pdnce = (pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(nm->hItem); + pdnce = (pClcCacheEntry)pcli->pfnGetCacheEntry(nm->hItem); if (pdnce == NULL) return 0; extra = ColumnNumToExtra(nm->iColumn); diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp index c3c75ec8f4..2f95d98421 100644 --- a/plugins/Clist_mw/src/contact.cpp +++ b/plugins/Clist_mw/src/contact.cpp @@ -77,7 +77,7 @@ void LoadContactTree(void) { HANDLE hContact; int i,hideOffline,status,tick; - pdisplayNameCacheEntry cacheEntry; + pClcCacheEntry cacheEntry; diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp index ea29d0d419..b6d6c80c77 100644 --- a/plugins/Clist_mw/src/init.cpp +++ b/plugins/Clist_mw/src/init.cpp @@ -32,10 +32,10 @@ static HANDLE hCListShutdown = 0; HMENU BuildGroupPopupMenu( ClcGroup* group ); void CalcEipPosition( struct ClcData *dat, struct ClcContact *contact, ClcGroup *group, POINT *result); -void CheckPDNCE(ClcCacheEntryBase*); +void CheckPDNCE(ClcCacheEntry*); void CluiProtocolStatusChanged( int, const char* ); int CompareContacts( const struct ClcContact *contact1, const struct ClcContact *contact2 ); -void FreeDisplayNameCacheItem(ClcCacheEntryBase*); +void FreeDisplayNameCacheItem(ClcCacheEntry*); void GetDefaultFontSetting(int i,LOGFONT *lf,COLORREF *colour); void RebuildEntireList(HWND hwnd,struct ClcData *dat); void RecalcScrollBar(HWND hwnd,struct ClcData *dat); @@ -139,12 +139,12 @@ static struct ClcContact* fnCreateClcContact( void ) return (struct ClcContact*)mir_calloc( sizeof( struct ClcContact )); } -static ClcCacheEntryBase* fnCreateCacheItem( HANDLE hContact ) +static pClcCacheEntry fnCreateCacheItem( HANDLE hContact ) { - pdisplayNameCacheEntry p = (pdisplayNameCacheEntry)mir_calloc( sizeof( displayNameCacheEntry )); + pClcCacheEntry p = (pClcCacheEntry)mir_calloc( sizeof( ClcCacheEntry )); if ( p ) p->hContact = hContact; - return (ClcCacheEntryBase*)p; + return p; } extern "C" int __declspec(dllexport) CListInitialise() -- cgit v1.2.3