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/NewEventNotify/src/main.cpp | 8 ++++---- plugins/NewEventNotify/src/neweventnotify.h | 6 +++--- plugins/NewEventNotify/src/popup.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/NewEventNotify/src') diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index 9c5f46a6e2..63fd90ea86 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -60,7 +60,7 @@ HANDLE hHookedDeletedEvent; //wParam: contact-handle //lParam: dbevent-handle -int HookedNewEvent(WPARAM hContact, LPARAM lParam) +int HookedNewEvent(WPARAM hContact, LPARAM hDbEvent) { //are popups currently enabled? if (pluginOptions.bDisable) @@ -68,7 +68,7 @@ int HookedNewEvent(WPARAM hContact, LPARAM lParam) //get DBEVENTINFO without pBlob DBEVENTINFO dbe = { sizeof(dbe) }; - db_event_get((HANDLE)lParam, &dbe); + db_event_get(hDbEvent, &dbe); //do not show popups for sub-contacts if (hContact && db_mc_isSub(hContact)) @@ -103,9 +103,9 @@ int HookedNewEvent(WPARAM hContact, LPARAM lParam) //is another popup for this contact already present? -> merge message popups if enabled if (dbe.eventType == EVENTTYPE_MESSAGE && (pluginOptions.bMergePopup && NumberPopupData(hContact, EVENTTYPE_MESSAGE) != -1)) - PopupUpdate(hContact, (HANDLE)lParam); + PopupUpdate(hContact, hDbEvent); else - PopupShow(&pluginOptions, hContact, (HANDLE)lParam, (UINT)dbe.eventType); + PopupShow(&pluginOptions, hContact, hDbEvent, (UINT)dbe.eventType); return 0; } diff --git a/plugins/NewEventNotify/src/neweventnotify.h b/plugins/NewEventNotify/src/neweventnotify.h index 31e6295c3d..1d73bb6d6c 100644 --- a/plugins/NewEventNotify/src/neweventnotify.h +++ b/plugins/NewEventNotify/src/neweventnotify.h @@ -189,7 +189,7 @@ struct PLUGIN_OPTIONS struct EVENT_DATA_EX { - HANDLE hEvent; + MEVENT hEvent; int number; struct EVENT_DATA_EX* next; struct EVENT_DATA_EX* prev; @@ -212,8 +212,8 @@ struct PLUGIN_DATA //--------------------------- //---External Procedure Definitions -int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, HANDLE hEvent, UINT eventType); -int PopupUpdate(MCONTACT hContact, HANDLE hEvent); +int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, UINT eventType); +int PopupUpdate(MCONTACT hContact, MEVENT hEvent); int PopupPreview(PLUGIN_OPTIONS* pluginOptions); int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata); int OptionsInit(PLUGIN_OPTIONS* pluginOptions); diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index eb514b5406..e6b9e894d9 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -400,7 +400,7 @@ static TCHAR* GetEventPreview(DBEVENTINFO *dbei) return TranslateTS( mir_a2t(commentFix)); } -int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, HANDLE hEvent, UINT eventType) +int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, MEVENT hEvent, UINT eventType) { TCHAR* sampleEvent; long iSeconds; @@ -517,7 +517,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, HANDLE hEvent, U } -int PopupUpdate(MCONTACT hContact, HANDLE hEvent) +int PopupUpdate(MCONTACT hContact, MEVENT hEvent) { // merge only message popups PLUGIN_DATA *pdata = (PLUGIN_DATA*)PopupList[NumberPopupData(hContact, EVENTTYPE_MESSAGE)]; -- cgit v1.2.3