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/KeyboardNotify/src/ignore.cpp | 12 ++++++------ plugins/KeyboardNotify/src/ignore.h | 2 +- plugins/KeyboardNotify/src/main.cpp | 28 ++++++++++++++-------------- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'plugins/KeyboardNotify') diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index 6ce81f49cb..d32e9af102 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static const DWORD ignoreIdToPf1[IGNOREEVENT_MAX] = {PF1_IMRECV, PF1_URLRECV, PF1_FILERECV, 0xFFFFFFFF}; -static DWORD GetMask(HANDLE hContact) +static DWORD GetMask(HCONTACT hContact) { DWORD mask = db_get_dw(hContact, KEYBDMODULE, "Mask1", (DWORD)(-1)); if(mask == (DWORD)(-1)) { @@ -156,7 +156,7 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int } } -static void InitialiseItem(HWND hwndList, HANDLE hContact, HANDLE hItem, DWORD protoCaps) +static void InitialiseItem(HWND hwndList, HCONTACT hContact, HANDLE hItem, DWORD protoCaps) { DWORD mask; int i; @@ -169,7 +169,7 @@ static void InitialiseItem(HWND hwndList, HANDLE hContact, HANDLE hItem, DWORD p SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX+1, 2)); } -static void SaveItemMask(HWND hwndList, HANDLE hContact, HANDLE hItem, const char *pszSetting) +static void SaveItemMask(HWND hwndList, HCONTACT hContact, HANDLE hItem, const char *pszSetting) { DWORD mask; int i, iImage; @@ -186,7 +186,7 @@ static void SetAllContactIcons(HWND hwndList) { DWORD protoCaps; - 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); if(hItem && SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX, 0)) == EMPTY_EXTRA_ICON) { char *szProto = GetContactProto(hContact); @@ -310,7 +310,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA { case PSN_APPLY: { - 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)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0); if(hItem) SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1"); @@ -336,7 +336,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA return FALSE; } -BOOL IsIgnored(HANDLE hContact, WORD eventType) +BOOL IsIgnored(HCONTACT hContact, WORD eventType) { WORD ignoreID = 0; DWORD mask = GetMask(hContact); diff --git a/plugins/KeyboardNotify/src/ignore.h b/plugins/KeyboardNotify/src/ignore.h index a72df7b6f6..56c738e4da 100644 --- a/plugins/KeyboardNotify/src/ignore.h +++ b/plugins/KeyboardNotify/src/ignore.h @@ -16,5 +16,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -BOOL IsIgnored(HANDLE, WORD); +BOOL IsIgnored(HCONTACT, WORD); INT_PTR CALLBACK DlgProcIgnoreOptions(HWND, UINT, WPARAM, LPARAM); diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 4e47de9f8c..98dda0467d 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -121,9 +121,9 @@ static LRESULT CALLBACK KeyBoardHookFunction(int, WPARAM, LPARAM); static LRESULT CALLBACK MirandaMouseHookFunction(int, WPARAM, LPARAM); static LRESULT CALLBACK MirandaKeyBoardHookFunction(int, WPARAM, LPARAM); static LRESULT CALLBACK MirandaWndProcHookFunction(int, WPARAM, LPARAM); -BOOL CheckMsgWnd(HANDLE, BOOL *); +BOOL CheckMsgWnd(HCONTACT, BOOL *); -BOOL isMetaContactsSubContact(HANDLE hMetaContact, HANDLE hContact) +BOOL isMetaContactsSubContact(HCONTACT hMetaContact, HCONTACT hContact) { char *szProto = GetContactProto(hMetaContact); if (szProto && !strcmp(szMetaProto, szProto)) { // Safety check @@ -134,7 +134,7 @@ BOOL isMetaContactsSubContact(HANDLE hMetaContact, HANDLE hContact) return FALSE; } -BOOL checkOpenWindow(HANDLE hContact) +BOOL checkOpenWindow(HCONTACT hContact) { BOOL found, focus; @@ -143,7 +143,7 @@ BOOL checkOpenWindow(HANDLE hContact) found = CheckMsgWnd(hContact, &focus); if (!found && szMetaProto && bMetaProtoEnabled) { - HANDLE hMetaContact = (HANDLE)db_get_dw(hContact, szMetaProto, "Handle", 0); + HCONTACT hMetaContact = (HCONTACT)db_get_dw(hContact, szMetaProto, "Handle", 0); if (hMetaContact && isMetaContactsSubContact(hMetaContact, hContact)) found = CheckMsgWnd(hMetaContact, &focus); } @@ -221,7 +221,7 @@ BOOL checkGlobalXstatus() return protosSupporting == 0; } -DBEVENTINFO createMsgEventInfo(HANDLE hContact) +DBEVENTINFO createMsgEventInfo(HCONTACT hContact) { DBEVENTINFO einfo = { sizeof(einfo) }; einfo.eventType = EVENTTYPE_MESSAGE; @@ -229,7 +229,7 @@ DBEVENTINFO createMsgEventInfo(HANDLE hContact) return einfo; } -DBEVENTINFO readEventInfo(HANDLE hDbEvent, HANDLE hContact) +DBEVENTINFO readEventInfo(HANDLE hDbEvent, HCONTACT hContact) { if (hDbEvent == NCONVERS_BLINKID) // we need to handle nconvers' blink event return createMsgEventInfo(hContact); @@ -239,7 +239,7 @@ DBEVENTINFO readEventInfo(HANDLE hDbEvent, HANDLE hContact) return einfo; } -BOOL checkIgnore(HANDLE hContact, WORD eventType) +BOOL checkIgnore(HCONTACT hContact, WORD eventType) { return !IsIgnored(hContact, eventType); } @@ -256,12 +256,12 @@ BOOL checkProtocol(char *szProto) return FALSE; } -BOOL metaCheckProtocol(char *szProto, HANDLE hContact, WORD eventType) +BOOL metaCheckProtocol(char *szProto, HCONTACT hContact, WORD eventType) { - HANDLE hSubContact=NULL; + HCONTACT hSubContact=NULL; if (szMetaProto && bMetaProtoEnabled && szProto && !strcmp(szMetaProto, szProto)) - if (hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) + if (hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) szProto = GetContactProto(hSubContact); return checkProtocol(szProto) && checkIgnore(hSubContact?hSubContact:hContact, eventType); @@ -379,10 +379,10 @@ BOOL checkMsgTimestamp(HANDLE hEventCurrent, DWORD timestampCurrent) } -BOOL contactCheckProtocol(char *szProto, HANDLE hContact, WORD eventType) +BOOL contactCheckProtocol(char *szProto, HCONTACT hContact, WORD eventType) { if (szMetaProto && bMetaProtoEnabled && hContact) { - HANDLE hMetaContact = (HANDLE)db_get_dw(hContact, szMetaProto, "Handle", 0); + HCONTACT hMetaContact = (HCONTACT)db_get_dw(hContact, szMetaProto, "Handle", 0); if (hMetaContact && isMetaContactsSubContact(hMetaContact, hContact)) return FALSE; } @@ -427,7 +427,7 @@ BOOL checkXstatus(char *szProto) // 'Pings' the FlashThread to keep the LEDs flashing. static int PluginMessageEventHook(WPARAM wParam, LPARAM lParam) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; HANDLE hEvent = (HANDLE)lParam; //get DBEVENTINFO without pBlob @@ -986,7 +986,7 @@ static LRESULT CALLBACK MirandaWndProcHookFunction(int code, WPARAM wParam, LPAR return CallNextHookEx(hMirandaWndProcHook, code, wParam, lParam); } -BOOL CheckMsgWnd(HANDLE hContact, BOOL *focus) +BOOL CheckMsgWnd(HCONTACT hContact, BOOL *focus) { if (ServiceExists(MS_MSG_GETWINDOWDATA)) { // use the new message API MessageWindowData mwd = { sizeof(MessageWindowData) }; -- cgit v1.2.3