From 2c5081fe7d0e6b155847c5ead1b32b4b42bfe4ae Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 2 Nov 2016 18:30:41 +0300 Subject: - common mouse hovering processing code moved to MIR_APP_DLL - now all chats support mToolTip --- include/m_chat.h | 2 + include/m_chat_int.h | 155 ++++++++++++++++++++++++++------------------------- 2 files changed, 81 insertions(+), 76 deletions(-) (limited to 'include') diff --git a/include/m_chat.h b/include/m_chat.h index 479b44ceee..12917f70ac 100644 --- a/include/m_chat.h +++ b/include/m_chat.h @@ -387,6 +387,8 @@ EXTERN_C MIR_APP_DLL(int) Chat_ChangeUserId(const char *szModule, const wchar_t EXTERN_C MIR_APP_DLL(int) Chat_SendUserMessage(const char *szModule, const wchar_t *wszId, const wchar_t *wszText); EXTERN_C MIR_APP_DLL(int) Chat_SetStatusbarText(const char *szModule, const wchar_t *wszId, const wchar_t *wszText); +EXTERN_C MIR_APP_DLL(void) Chat_HoverMouse(struct SESSION_INFO *si, HWND hwnd, LPARAM lParam, bool bUseToolTip); + ///////////////////////////////////////////////////////////////////////////////////////// #define GC_SSE_ONLYLISTED 0x0001 // processes only listed contacts, resets all contacts otherwise diff --git a/include/m_chat_int.h b/include/m_chat_int.h index eccd2318b8..9bc689994d 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -133,106 +133,109 @@ struct GCModuleInfoBase struct COMMANDINFO { - char *lpCommand; - COMMANDINFO *last, *next; + char *lpCommand; + COMMANDINFO *last, *next; }; struct FONTINFO { - LOGFONT lf; - COLORREF color; + LOGFONT lf; + COLORREF color; }; struct LOGINFO { - wchar_t *ptszText; - wchar_t *ptszNick; - wchar_t *ptszUID; - wchar_t *ptszStatus; - wchar_t *ptszUserInfo; - BOOL bIsMe; - BOOL bIsHighlighted; - time_t time; - int iType; + wchar_t *ptszText; + wchar_t *ptszNick; + wchar_t *ptszUID; + wchar_t *ptszStatus; + wchar_t *ptszUserInfo; + BOOL bIsMe; + BOOL bIsHighlighted; + time_t time; + int iType; DWORD dwFlags; - LOGINFO *next, *prev; + LOGINFO *next, *prev; }; struct STATUSINFO { - wchar_t* pszGroup; - HICON hIcon; - WORD Status; - STATUSINFO *next; + wchar_t *pszGroup; + HICON hIcon; + WORD Status; + STATUSINFO *next; }; struct USERINFO { - wchar_t* pszNick; - wchar_t* pszUID; - WORD Status; - int iStatusEx; - WORD ContactStatus; - USERINFO *next; + wchar_t* pszNick; + wchar_t* pszUID; + WORD Status; + int iStatusEx; + WORD ContactStatus; + USERINFO *next; }; struct GCSessionInfoBase { - HWND hWnd; + HWND hWnd; - BOOL bFGSet; - BOOL bBGSet; - BOOL bFilterEnabled; - BOOL bNicklistEnabled; - BOOL bInitDone; + BOOL bFGSet; + BOOL bBGSet; + BOOL bFilterEnabled; + BOOL bNicklistEnabled; + BOOL bInitDone; BOOL bTrimmed; - char* pszModule; - wchar_t* ptszID; - wchar_t* ptszName; - wchar_t* ptszStatusbarText; - wchar_t* ptszTopic; - - int iType; - int iFG; - int iBG; - int iSplitterY; - int iSplitterX; - int iLogFilterFlags; - int nUsersInNicklist; - int iEventCount; - int iWidth; - int iHeight; - int iStatusCount; - - WORD wStatus; - WORD wState; - WORD wCommandsNum; - void *pItemData; + char* pszModule; + wchar_t* ptszID; + wchar_t* ptszName; + wchar_t* ptszStatusbarText; + wchar_t* ptszTopic; + + int iType; + int iFG; + int iBG; + int iSplitterY; + int iSplitterX; + int iLogFilterFlags; + int nUsersInNicklist; + int iEventCount; + int iWidth; + int iHeight; + int iStatusCount; + + WORD wStatus; + WORD wState; + WORD wCommandsNum; + void *pItemData; MCONTACT hContact; - HWND hwndStatus; - time_t LastTime; - - COMMANDINFO* lpCommands; - COMMANDINFO* lpCurrentCommand; - LOGINFO* pLog; - LOGINFO* pLogEnd; - USERINFO* pUsers; - USERINFO* pMe; - STATUSINFO* pStatuses; - - wchar_t pszLogFileName[MAX_PATH]; + HWND hwndStatus; + time_t LastTime; + + BOOL isToolTip; + int currentHovered; + + COMMANDINFO* lpCommands; + COMMANDINFO* lpCurrentCommand; + LOGINFO* pLog; + LOGINFO* pLogEnd; + USERINFO* pUsers; + USERINFO* pMe; + STATUSINFO* pStatuses; + + wchar_t pszLogFileName[MAX_PATH]; SESSION_INFO *next; }; struct GCLogStreamDataBase { - char* buffer; - int bufferOffset, bufferLen; - HWND hwnd; - LOGINFO* lin; - BOOL bStripFormat; - BOOL bRedraw; + char* buffer; + int bufferOffset, bufferLen; + HWND hwnd; + LOGINFO* lin; + BOOL bStripFormat; + BOOL bRedraw; SESSION_INFO *si; }; @@ -266,12 +269,12 @@ struct GlobalLogSettingsBase int iSplitterY; int iWidth; int iHeight; - wchar_t* pszTimeStamp; - wchar_t* pszTimeStampLog; - wchar_t* pszIncomingNick; - wchar_t* pszOutgoingNick; - wchar_t* pszHighlightWords; - wchar_t* pszLogDir; + wchar_t *pszTimeStamp; + wchar_t *pszTimeStampLog; + wchar_t *pszIncomingNick; + wchar_t *pszOutgoingNick; + wchar_t *pszHighlightWords; + wchar_t *pszLogDir; HFONT UserListFont; HFONT UserListHeadingsFont; HFONT NameFont; -- cgit v1.2.3