diff options
author | George Hazan <george.hazan@gmail.com> | 2015-01-16 17:49:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-01-16 17:49:54 +0000 |
commit | 85c0b6a96f366bdf0ca334ee7cb1877fb3f2288c (patch) | |
tree | fe07935255b7432938f282419c3ab1378524c02f /plugins/KeyboardNotify | |
parent | 8a09c895c4cd0e9cc87c38181ae2913dba77c30b (diff) |
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
Diffstat (limited to 'plugins/KeyboardNotify')
-rw-r--r-- | plugins/KeyboardNotify/src/main.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
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)) |