summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/KeyboardNotify/src/main.cpp')
-rw-r--r--plugins/KeyboardNotify/src/main.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp
index 0ec2edad37..9bff1e4283 100644
--- a/plugins/KeyboardNotify/src/main.cpp
+++ b/plugins/KeyboardNotify/src/main.cpp
@@ -121,20 +121,20 @@ 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(HCONTACT, BOOL *);
+BOOL CheckMsgWnd(MCONTACT, BOOL *);
-BOOL isMetaContactsSubContact(HCONTACT hMetaContact, HCONTACT hContact)
+BOOL isMetaContactsSubContact(MCONTACT hMetaContact, MCONTACT hContact)
{
char *szProto = GetContactProto(hMetaContact);
if (szProto && !strcmp(szMetaProto, szProto)) { // Safety check
int i = db_get_dw(hContact, szMetaProto, "ContactNumber", -1);
- if (i >= 0 && hContact == (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i))
+ if (i >= 0 && hContact == (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i))
return TRUE;
}
return FALSE;
}
-BOOL checkOpenWindow(HCONTACT hContact)
+BOOL checkOpenWindow(MCONTACT hContact)
{
BOOL found, focus;
@@ -143,7 +143,7 @@ BOOL checkOpenWindow(HCONTACT hContact)
found = CheckMsgWnd(hContact, &focus);
if (!found && szMetaProto && bMetaProtoEnabled) {
- HCONTACT hMetaContact = (HCONTACT)db_get_dw(hContact, szMetaProto, "Handle", 0);
+ MCONTACT hMetaContact = (MCONTACT)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(HCONTACT hContact)
+DBEVENTINFO createMsgEventInfo(MCONTACT hContact)
{
DBEVENTINFO einfo = { sizeof(einfo) };
einfo.eventType = EVENTTYPE_MESSAGE;
@@ -229,7 +229,7 @@ DBEVENTINFO createMsgEventInfo(HCONTACT hContact)
return einfo;
}
-DBEVENTINFO readEventInfo(HANDLE hDbEvent, HCONTACT hContact)
+DBEVENTINFO readEventInfo(HANDLE hDbEvent, MCONTACT hContact)
{
if (hDbEvent == NCONVERS_BLINKID) // we need to handle nconvers' blink event
return createMsgEventInfo(hContact);
@@ -239,7 +239,7 @@ DBEVENTINFO readEventInfo(HANDLE hDbEvent, HCONTACT hContact)
return einfo;
}
-BOOL checkIgnore(HCONTACT hContact, WORD eventType)
+BOOL checkIgnore(MCONTACT hContact, WORD eventType)
{
return !IsIgnored(hContact, eventType);
}
@@ -256,12 +256,12 @@ BOOL checkProtocol(char *szProto)
return FALSE;
}
-BOOL metaCheckProtocol(char *szProto, HCONTACT hContact, WORD eventType)
+BOOL metaCheckProtocol(char *szProto, MCONTACT hContact, WORD eventType)
{
- HCONTACT hSubContact=NULL;
+ MCONTACT hSubContact=NULL;
if (szMetaProto && bMetaProtoEnabled && szProto && !strcmp(szMetaProto, szProto))
- if (hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0))
+ if (hSubContact = (MCONTACT)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, HCONTACT hContact, WORD eventType)
+BOOL contactCheckProtocol(char *szProto, MCONTACT hContact, WORD eventType)
{
if (szMetaProto && bMetaProtoEnabled && hContact) {
- HCONTACT hMetaContact = (HCONTACT)db_get_dw(hContact, szMetaProto, "Handle", 0);
+ MCONTACT hMetaContact = (MCONTACT)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)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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(HCONTACT hContact, BOOL *focus)
+BOOL CheckMsgWnd(MCONTACT hContact, BOOL *focus)
{
if (ServiceExists(MS_MSG_GETWINDOWDATA)) { // use the new message API
MessageWindowData mwd = { sizeof(MessageWindowData) };