From c9b740a178828eae5cc4be7ab054e5f26d3a27e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 21 Sep 2023 14:34:07 +0300 Subject: MessageWindowEventData: useless structure removed --- include/m_message.h | 16 ++++------------ include/m_srmm_int.h | 17 ++++++++++------- 2 files changed, 14 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/m_message.h b/include/m_message.h index 975ff417b6..684069bb36 100644 --- a/include/m_message.h +++ b/include/m_message.h @@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#include ///////////////////////////////////////////////////////////////////////////////////////// // brings up the send message dialog for a contact @@ -52,23 +53,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ///////////////////////////////////////////////////////////////////////////////////////// // gets fired when a message window appears/disappears -// wparam = 0 -// lparam = (WPARAM)(MessageWindowEventData*)hWindowEvent; +// wparam = MSG_WINDOW_EVT_* constant +// lparam = (WPARAM)(CSrmmBaseDialog*)pDialog; #define MSG_WINDOW_EVT_OPENING 1 // window is about to be opened #define MSG_WINDOW_EVT_OPEN 2 // window has been opened #define MSG_WINDOW_EVT_CLOSING 3 // window is about to be closed #define MSG_WINDOW_EVT_CLOSE 4 // window has been closed -struct MessageWindowEventData -{ - MCONTACT hContact; - HWND hwndWindow; // top level window for the contact - uint32_t uType; // see event types above - HWND hwndInput; // input area window for the contact (or NULL if there is none) - HWND hwndLog; // log area window for the contact (or NULL if there is none) -}; - #define ME_MSG_WINDOWEVENT "MessageAPI/WindowEvent" ///////////////////////////////////////////////////////////////////////////////////////// @@ -84,7 +76,7 @@ struct MessageWindowData { HWND hwndWindow; //top level window for the contact or NULL if no window exists int uState; // see window states - class CSrmmBaseDialog *pDlg; // window class object + CSrmmBaseDialog *pDlg; // window class object }; EXTERN_C MIR_APP_DLL(int) Srmm_GetWindowData(MCONTACT hContact, MessageWindowData &mwd); diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index 2dd9488c0a..67059a625f 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_SRMM_INT_H__ #define M_SRMM_INT_H__ 1 +#include + #include #define SRMM_MODULE "SRMM" @@ -332,23 +334,24 @@ public: virtual void AddLog(const LOGINFO &lin); virtual void CloseTab() {} - virtual void DrawNickList(USERINFO *ui, DRAWITEMSTRUCT *dis) PURE; - virtual void EventAdded(MEVENT, const DB::EventInfo &dbei) PURE; - virtual bool GetFirstEvent() PURE; - virtual bool IsActive() const PURE; - virtual void LoadSettings() PURE; - virtual void RemakeLog() PURE; + virtual void DrawNickList(USERINFO *ui, DRAWITEMSTRUCT *dis) = 0; + virtual void EventAdded(MEVENT, const DB::EventInfo &dbei) = 0; + virtual bool GetFirstEvent() = 0; + virtual bool IsActive() const = 0; + virtual void LoadSettings() = 0; + virtual void RemakeLog() = 0; virtual void SetStatusText(const wchar_t *, HICON) {} virtual void ShowFilterMenu() {} virtual void UpdateFilterButton(); virtual void UpdateOptions(); virtual void UpdateStatusBar() {} - virtual void UpdateTitle() PURE; + virtual void UpdateTitle() = 0; virtual LRESULT WndProc_Message(UINT msg, WPARAM wParam, LPARAM lParam); virtual LRESULT WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam); __forceinline bool isChat() const { return m_si != nullptr; } + __forceinline MWindow GetInput() const { return m_message.GetHwnd(); } __forceinline SESSION_INFO *getChat() const { return m_si; } __forceinline CSrmmLogWindow *log() const { return m_pLog; } -- cgit v1.2.3