From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - HANDLE hContact => HCONTACT - GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Popup/src/avatars.cpp | 2 +- plugins/Popup/src/avatars.h | 4 ++-- plugins/Popup/src/avatars_flash.h | 2 +- plugins/Popup/src/avatars_gif.cpp | 2 +- plugins/Popup/src/avatars_gif.h | 2 +- plugins/Popup/src/avatars_simple.cpp | 11 ++++++----- plugins/Popup/src/avatars_simple.h | 2 +- plugins/Popup/src/common.h | 4 ++-- plugins/Popup/src/opt_contacts.cpp | 4 ++-- plugins/Popup/src/popup_wnd2.cpp | 29 +++++++++++++++-------------- plugins/Popup/src/popup_wnd2.h | 2 +- plugins/Popup/src/srmm_menu.cpp | 4 ++-- 12 files changed, 35 insertions(+), 33 deletions(-) (limited to 'plugins/Popup/src') diff --git a/plugins/Popup/src/avatars.cpp b/plugins/Popup/src/avatars.cpp index e7d90a396f..79dd9d2b38 100644 --- a/plugins/Popup/src/avatars.cpp +++ b/plugins/Popup/src/avatars.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "headers.h" -PopupAvatar *PopupAvatar::create(HANDLE hContact) +PopupAvatar *PopupAvatar::create(HCONTACT hContact) { if (hContact) { diff --git a/plugins/Popup/src/avatars.h b/plugins/Popup/src/avatars.h index 3b44fab739..369940611f 100644 --- a/plugins/Popup/src/avatars.h +++ b/plugins/Popup/src/avatars.h @@ -31,7 +31,7 @@ protected: bool bIsAnimated, bIsValid; public: - PopupAvatar(HANDLE hContact) {} + PopupAvatar(HANDLE h) {} virtual ~PopupAvatar() {} virtual int activeFrameDelay() = 0; virtual void draw(MyBitmap *bmp, int x, int y, int w, int h, POPUPOPTIONS *options) = 0; @@ -42,7 +42,7 @@ public: inline int getWidth() { return width; } inline int getHeight() { return height; } - static PopupAvatar *create(HANDLE hContact); + static PopupAvatar *create(HCONTACT hContact); }; #endif // __avatars_h__ diff --git a/plugins/Popup/src/avatars_flash.h b/plugins/Popup/src/avatars_flash.h index cc9d49c707..a01919f242 100644 --- a/plugins/Popup/src/avatars_flash.h +++ b/plugins/Popup/src/avatars_flash.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class FlashAvatar: public PopupAvatar { public: - FlashAvatar(HANDLE hContact); + FlashAvatar(HCONTACT hContact); virtual ~FlashAvatar(); virtual int activeFrameDelay() = 0; virtual void draw(MyBitmap *bmp, int x, int y, int w, int h, POPUPOPTIONS *options) = 0; diff --git a/plugins/Popup/src/avatars_gif.cpp b/plugins/Popup/src/avatars_gif.cpp index 0641c94a57..5526f9cef3 100644 --- a/plugins/Popup/src/avatars_gif.cpp +++ b/plugins/Popup/src/avatars_gif.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "headers.h" -GifAvatar::GifAvatar(HANDLE hContact): PopupAvatar(hContact) +GifAvatar::GifAvatar(HCONTACT hContact): PopupAvatar(hContact) { av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0); bIsAnimated = true; diff --git a/plugins/Popup/src/avatars_gif.h b/plugins/Popup/src/avatars_gif.h index 14bf35b45e..51d6a6a7a0 100644 --- a/plugins/Popup/src/avatars_gif.h +++ b/plugins/Popup/src/avatars_gif.h @@ -37,7 +37,7 @@ protected: SIZE frameSize; public: - GifAvatar(HANDLE hContact); + GifAvatar(HCONTACT hContact); virtual ~GifAvatar(); virtual int activeFrameDelay(); virtual void draw(MyBitmap *bmp, int x, int y, int w, int h, POPUPOPTIONS *options); diff --git a/plugins/Popup/src/avatars_simple.cpp b/plugins/Popup/src/avatars_simple.cpp index 8852d008cf..86c9b6dd15 100644 --- a/plugins/Popup/src/avatars_simple.cpp +++ b/plugins/Popup/src/avatars_simple.cpp @@ -23,7 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "headers.h" -SimpleAvatar::SimpleAvatar(HANDLE hContact, bool bUseBitmap): PopupAvatar(bUseBitmap ? 0 : hContact) +SimpleAvatar::SimpleAvatar(HANDLE h, bool bUseBitmap) : + PopupAvatar((bUseBitmap) ? 0 : h) { bIsAnimated = false; bIsValid = true; @@ -31,7 +32,7 @@ SimpleAvatar::SimpleAvatar(HANDLE hContact, bool bUseBitmap): PopupAvatar(bUseBi if (bUseBitmap) { BITMAP bmp; - GetObject((HBITMAP)hContact, sizeof(bmp), &bmp); + GetObject((HBITMAP)h, sizeof(bmp), &bmp); width = abs(bmp.bmWidth); height = abs(bmp.bmHeight); @@ -39,15 +40,15 @@ SimpleAvatar::SimpleAvatar(HANDLE hContact, bool bUseBitmap): PopupAvatar(bUseBi av = new avatarCacheEntry; av->bmHeight = abs(bmp.bmHeight); av->bmWidth = abs(bmp.bmWidth); - av->hbmPic = (HBITMAP)hContact; + av->hbmPic = (HBITMAP)h; av->dwFlags = AVS_BITMAP_VALID; return; } - if (hContact && ServiceExists(MS_AV_GETAVATARBITMAP)) + if (h && ServiceExists(MS_AV_GETAVATARBITMAP)) { avNeedFree = false; - av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0); + av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)h, 0); if (av) { if (av->hbmPic && (av->dwFlags&AVS_BITMAP_VALID) && !(av->dwFlags&AVS_HIDEONCLIST) && !(av->dwFlags&AVS_NOTREADY)) diff --git a/plugins/Popup/src/avatars_simple.h b/plugins/Popup/src/avatars_simple.h index a919d168d9..25ae0e702a 100644 --- a/plugins/Popup/src/avatars_simple.h +++ b/plugins/Popup/src/avatars_simple.h @@ -31,7 +31,7 @@ private: bool avNeedFree; public: - SimpleAvatar(HANDLE hContact, bool bUseBitmap = false); + SimpleAvatar(HANDLE h, bool bUseBitmap = false); virtual ~SimpleAvatar(); virtual int activeFrameDelay(); virtual void draw(MyBitmap *bmp, int x, int y, int w, int h, POPUPOPTIONS *options); diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h index 5700f7f55f..11bf939fd4 100644 --- a/plugins/Popup/src/common.h +++ b/plugins/Popup/src/common.h @@ -51,7 +51,7 @@ inline int Byte2Percentile(int vByte) { return (vByte*100)/255; } inline int Percentile2Byte(int vPerc) { return (vPerc*255)/100; } //===== Strings & MirandaDB ================== -inline char *db_get_s(HANDLE hContact, const char *ModuleName, const char *SettingName, const char *Default) +inline char *db_get_s(HCONTACT hContact, const char *ModuleName, const char *SettingName, const char *Default) { DBVARIANT dbv; db_get(hContact, ModuleName, SettingName, &dbv); @@ -66,7 +66,7 @@ inline char *db_get_s(HANDLE hContact, const char *ModuleName, const char *Setti return result; } -inline INT_PTR DBGetContactSettingStringX(HANDLE hContact, const char *ModuleName, const char *SettingName, const char *Default, const int retType) +inline INT_PTR DBGetContactSettingStringX(HCONTACT hContact, const char *ModuleName, const char *SettingName, const char *Default, const int retType) { INT_PTR ret = NULL; diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp index da4b535f21..5e7f3494e7 100644 --- a/plugins/Popup/src/opt_contacts.cpp +++ b/plugins/Popup/src/opt_contacts.cpp @@ -85,7 +85,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l switch (((LPNMHDR)lParam)->code) { case PSN_APPLY: HWND hwndList = GetDlgItem(hwnd, IDC_LIST); - for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0); for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i) { if (SendMessage(hwndList,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(i,0))) { @@ -117,7 +117,7 @@ static void sttResetListOptions(HWND hwndList) static void sttSetAllContactIcons(HWND hwndList) { - for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0); DWORD dwMode = db_get_b(hContact, MODULNAME, "ShowMode", 0); for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i) diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index f6d493138d..5f0f2e65f3 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -744,7 +744,7 @@ void PopupWnd2::setIcon(HICON hNewIcon) void PopupWnd2::updateData(POPUPDATAW_V2 *ppd) { - m_hContact = ppd->lchContact; + m_hContact = ppd->lchContact; m_clBack = ppd->colorBack; m_clClock = m_clTitle = m_clText = ppd->colorText; @@ -774,11 +774,11 @@ void PopupWnd2::updateData(POPUPDATAW_V2 *ppd) void PopupWnd2::updateData(POPUPDATA2 *ppd) { - m_hContact = ppd->lchContact; + m_hContact = ppd->lchContact; m_clBack = ppd->colorBack; - m_clClock = m_clTitle = m_clText = ppd->colorText; - m_iTimeout = ppd->iSeconds; + m_clClock = m_clTitle = m_clText = ppd->colorText; + m_iTimeout = ppd->iSeconds; mir_free(m_lpzText); mir_free(m_lpzTitle); mir_free(m_lpwzText); mir_free(m_lpwzTitle); @@ -930,27 +930,28 @@ LRESULT CALLBACK NullWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l return DefWindowProc(hwnd, message, wParam, lParam); } -struct ReplyEditData +struct ReplyEditData { - HWND hwndPopup; - HANDLE hContact; - WNDPROC oldWndProc; + HWND hwndPopup; + HCONTACT hContact; + WNDPROC oldWndProc; }; -BOOL IsUtfSendAvailable(HANDLE hContact) +BOOL IsUtfSendAvailable(HCONTACT hContact) { char* szProto = GetContactProto(hContact); if (szProto == NULL) return FALSE; //check for MetaContact and get szProto from subcontact if (strcmp(szProto, gszMetaProto)==0) { - HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0); - if (!hSubContact) return FALSE; + HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0); + if (!hSubContact) + return FALSE; szProto = GetContactProto(hSubContact); } return(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDUTF) ? TRUE : FALSE; } -void AddMessageToDB(HANDLE hContact, char *msg, int flag/*bool utf*/) +void AddMessageToDB(HCONTACT hContact, char *msg, int flag/*bool utf*/) { DBEVENTINFO dbei = {0}; dbei.cbSize = sizeof(dbei); @@ -1491,13 +1492,13 @@ void WindowThread(void *arg) // Menu Host LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { - static HANDLE hContact = NULL; + static HCONTACT hContact = NULL; switch (message) { case UM_SHOWMENU: { - hContact = (HANDLE)lParam; + hContact = (HCONTACT)lParam; POINT pt = {0}; HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT,(WPARAM)hContact,0); GetCursorPos(&pt); diff --git a/plugins/Popup/src/popup_wnd2.h b/plugins/Popup/src/popup_wnd2.h index ef4760d496..4c851275d9 100644 --- a/plugins/Popup/src/popup_wnd2.h +++ b/plugins/Popup/src/popup_wnd2.h @@ -68,7 +68,7 @@ private: // other data Formula::Args m_args; - HANDLE m_hContact, m_hContactPassed; + HCONTACT m_hContact, m_hContactPassed; WNDPROC m_PluginWindowProc; void *m_PluginData; diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index ae757444a3..655ab46604 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static HANDLE hDialogsList = NULL; -static void SrmmMenu_UpdateIcon(HANDLE hContact) +static void SrmmMenu_UpdateIcon(HCONTACT hContact) { if (!hContact) return; @@ -73,7 +73,7 @@ static int SrmmMenu_ProcessIconClick(WPARAM wParam, LPARAM lParam) if (lstrcmpA(sicd->szModule, MODULNAME)) return 0; - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; if (!hContact) return 0; -- cgit v1.2.3