From ef05f20f8191c1c3d93df3356969ce016119487e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 10 Jul 2014 18:37:52 +0000 Subject: - we don't broadcast added events anymore; - fix for User Typing notifications; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@9759 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/utils.h | 91 +++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 44 deletions(-) (limited to 'plugins/TabSRMM/src/utils.h') diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h index a3f83f42bc..4f081363f6 100644 --- a/plugins/TabSRMM/src/utils.h +++ b/plugins/TabSRMM/src/utils.h @@ -65,48 +65,51 @@ public: CMD_MSGDIALOG = 2, CMD_INFOPANEL = 4, }; - static int TSAPI FindRTLLocale (TWindowData *dat); - static TCHAR* TSAPI GetPreviewWithEllipsis (TCHAR *szText, size_t iMaxLen); - static TCHAR* TSAPI FilterEventMarkers (TCHAR *wszText); - static const TCHAR* TSAPI FormatRaw (TWindowData *dat, const TCHAR *msg, int flags, BOOL isSent); - static const TCHAR* TSAPI FormatTitleBar (const TWindowData *dat, const TCHAR *szFormat); - static char* TSAPI FilterEventMarkers (char *szText); - static const TCHAR* TSAPI DoubleAmpersands (TCHAR *pszText); - static void TSAPI RTF_CTableInit (); - static void TSAPI RTF_ColorAdd (const TCHAR *tszColname, size_t length); - static void TSAPI CreateColorMap (TCHAR *Text); - static int TSAPI RTFColorToIndex (int iCol); - static int TSAPI ReadContainerSettingsFromDB (const MCONTACT hContact, TContainerSettings *cs, const char *szKey = 0); - static int TSAPI WriteContainerSettingsToDB (const MCONTACT hContact, TContainerSettings *cs, const char *szKey = 0); - static void TSAPI SettingsToContainer (TContainerData *pContainer); - static void TSAPI ContainerToSettings (TContainerData *pContainer); - static void TSAPI ReadPrivateContainerSettings (TContainerData *pContainer, bool fForce = false); - static void TSAPI SaveContainerSettings (TContainerData *pContainer, const char *szSetting); - static DWORD CALLBACK StreamOut (DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb); - static LRESULT TSAPI CmdDispatcher (UINT uType, HWND hwndDlg, UINT cmd, WPARAM wParam, LPARAM lParam, TWindowData *dat = 0, - TContainerData *pContainer = 0); - static void TSAPI addMenuItem (const HMENU& m, MENUITEMINFO& mii, HICON hIcon, - const TCHAR *szText, UINT uID, UINT pos); - static void TSAPI enableDlgControl (const HWND hwnd, UINT id, BOOL fEnable = 1); - static void TSAPI showDlgControl (const HWND hwnd, UINT id, int showCmd); - static int TSAPI mustPlaySound (const TWindowData *dat); - static HICON TSAPI iconFromAvatar (const TWindowData *dat); - static void TSAPI getIconSize (HICON hIcon, int& sizeX, int& sizeY); - - static bool TSAPI extractResource (const HMODULE h, const UINT uID, const TCHAR *tszName, const TCHAR *tszPath, - const TCHAR *tszFilename, bool fForceOverwrite); - static void TSAPI scaleAvatarHeightLimited (const HBITMAP hBm, double& dNewWidth, double& dNewHeight, const LONG maxHeight); - - static AVATARCACHEENTRY* TSAPI loadAvatarFromAVS (const MCONTACT hContact); - static void TSAPI sanitizeFilename (wchar_t *tszFilename); - static void TSAPI ensureTralingBackslash (wchar_t *szPathname); - - static HMODULE TSAPI loadSystemLibrary (const wchar_t* szFilename); - - static INT_PTR CALLBACK PopupDlgProcError (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); - static const TCHAR* extractURLFromRichEdit (const ENLINK* _e, const HWND hwndRich); - - template static size_t TSAPI CopyToClipBoard(T* _t, const HWND hwndOwner) + + static int FindRTLLocale(TWindowData *dat); + static TCHAR* GetPreviewWithEllipsis(TCHAR *szText, size_t iMaxLen); + static TCHAR* FilterEventMarkers(TCHAR *wszText); + static LPCTSTR FormatRaw(TWindowData *dat, const TCHAR *msg, int flags, BOOL isSent); + static LPCTSTR FormatTitleBar(const TWindowData *dat, const TCHAR *szFormat); + static char* FilterEventMarkers(char *szText); + static LPCTSTR DoubleAmpersands(TCHAR *pszText); + static void RTF_CTableInit(); + static void RTF_ColorAdd(const TCHAR *tszColname, size_t length); + static void CreateColorMap(TCHAR *Text); + static int RTFColorToIndex(int iCol); + static int ReadContainerSettingsFromDB(const MCONTACT hContact, TContainerSettings *cs, const char *szKey = 0); + static int WriteContainerSettingsToDB(const MCONTACT hContact, TContainerSettings *cs, const char *szKey = 0); + static void SettingsToContainer(TContainerData *pContainer); + static void ContainerToSettings(TContainerData *pContainer); + static void ReadPrivateContainerSettings(TContainerData *pContainer, bool fForce = false); + static void SaveContainerSettings(TContainerData *pContainer, const char *szSetting); + + static DWORD CALLBACK StreamOut(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb); + static LRESULT CmdDispatcher(UINT uType, HWND hwndDlg, UINT cmd, WPARAM wParam, LPARAM lParam, TWindowData *dat = 0, TContainerData *pContainer = 0); + + static void addMenuItem(const HMENU& m, MENUITEMINFO& mii, HICON hIcon, const TCHAR *szText, UINT uID, UINT pos); + static void enableDlgControl(const HWND hwnd, UINT id, BOOL fEnable = 1); + static void showDlgControl(const HWND hwnd, UINT id, int showCmd); + static int mustPlaySound(const TWindowData *dat); + static HICON iconFromAvatar(const TWindowData *dat); + static void getIconSize(HICON hIcon, int& sizeX, int& sizeY); + + static bool extractResource(const HMODULE h, const UINT uID, const TCHAR *tszName, const TCHAR *tszPath, const TCHAR *tszFilename, bool fForceOverwrite); + static void scaleAvatarHeightLimited(const HBITMAP hBm, double& dNewWidth, double& dNewHeight, const LONG maxHeight); + + static AVATARCACHEENTRY* loadAvatarFromAVS(const MCONTACT hContact); + + static void sanitizeFilename(wchar_t *tszFilename); + static void ensureTralingBackslash(wchar_t *szPathname); + + static void sendContactMessage(MCONTACT hContact, UINT uMsg, WPARAM wParam, LPARAM lParam); + + static HMODULE loadSystemLibrary(const wchar_t* szFilename); + + static INT_PTR CALLBACK PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + static LPCTSTR extractURLFromRichEdit(const ENLINK* _e, const HWND hwndRich); + + template static size_t CopyToClipBoard(T* _t, const HWND hwndOwner) { if (!OpenClipboard(hwndOwner) || _t == 0) return 0; @@ -126,7 +129,7 @@ public: return(i); } - template static void AddToFileList(T ***pppFiles, int *totalCount, const TCHAR* szFilename) + template static void AddToFileList(T ***pppFiles, int *totalCount, LPCTSTR szFilename) { size_t _s = sizeof(T); @@ -184,7 +187,7 @@ public: static int rtf_ctable_size; }; -LRESULT TSAPI _dlgReturn(HWND hWnd, LRESULT result); +LRESULT _dlgReturn(HWND hWnd, LRESULT result); -- cgit v1.2.3