From 85c0b6a96f366bdf0ca334ee7cb1877fb3f2288c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 16 Jan 2015 17:49:54 +0000 Subject: MEVENT - the strict type for events, they are not HANDLE anymore git-svn-id: http://svn.miranda-ng.org/main/trunk@11866 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/KeyboardNotify/src/main.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/KeyboardNotify/src') diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index cbcdc60627..ae7e48fd98 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -24,7 +24,7 @@ #include "Common.h" -#define NCONVERS_BLINKID ((HANDLE)123456) //nconvers' random identifier used to flash an icon for "incoming message" on contact list +#define NCONVERS_BLINKID ((MEVENT)123456) //nconvers' random identifier used to flash an icon for "incoming message" on contact list HINSTANCE hInst; @@ -202,7 +202,7 @@ DBEVENTINFO createMsgEventInfo(MCONTACT hContact) return einfo; } -DBEVENTINFO readEventInfo(HANDLE hDbEvent, MCONTACT hContact) +DBEVENTINFO readEventInfo(MEVENT hDbEvent, MCONTACT hContact) { if (hDbEvent == NCONVERS_BLINKID) // we need to handle nconvers' blink event return createMsgEventInfo(hContact); @@ -330,12 +330,12 @@ static void FlashThreadFunction() } } -BOOL checkMsgTimestamp(MCONTACT hContact, HANDLE hEventCurrent, DWORD timestampCurrent) +BOOL checkMsgTimestamp(MCONTACT hContact, MEVENT hEventCurrent, DWORD timestampCurrent) { if (!bFlashIfMsgOlder) return TRUE; - for (HANDLE hEvent = db_event_prev(hContact, hEventCurrent); hEvent; hEvent = db_event_prev(hContact, hEvent)) { + for (MEVENT hEvent = db_event_prev(hContact, hEventCurrent); hEvent; hEvent = db_event_prev(hContact, hEvent)) { DBEVENTINFO einfo = { sizeof(einfo) }; if(!db_event_get(hEvent, &einfo)) { if ((einfo.timestamp + wSecondsOlder) <= timestampCurrent) @@ -395,10 +395,8 @@ BOOL checkXstatus(char *szProto) // 'Pings' the FlashThread to keep the LEDs flashing. -static int PluginMessageEventHook(WPARAM hContact, LPARAM lParam) +static int PluginMessageEventHook(WPARAM hContact, LPARAM hEvent) { - HANDLE hEvent = (HANDLE)lParam; - //get DBEVENTINFO without pBlob DBEVENTINFO einfo = { sizeof(einfo) }; if (!db_event_get(hEvent, &einfo) && !(einfo.flags & DBEF_SENT)) -- cgit v1.2.3