From 62384056910fc8fef88e1d99c62b3fe7ac313ac2 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sat, 12 Sep 2015 10:36:30 +0000 Subject: Toaster: removed crutches, normal event handler git-svn-id: http://svn.miranda-ng.org/main/trunk@15330 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Toaster/src/stdafx.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'plugins/Toaster/src/stdafx.h') diff --git a/plugins/Toaster/src/stdafx.h b/plugins/Toaster/src/stdafx.h index 2e8a5bb94d..57eaf9c735 100644 --- a/plugins/Toaster/src/stdafx.h +++ b/plugins/Toaster/src/stdafx.h @@ -25,6 +25,11 @@ #include "version.h" #include "resource.h" +__forceinline bool isChatRoom(MCONTACT hContact) +{ + return (db_get_b(hContact, GetContactProto(hContact), "ChatRoom", 0) == 1); +} + typedef void(__cdecl *pEventHandler)(void*); const wchar_t AppUserModelID[] = _T("MirandaNG"); DEFINE_PROPERTYKEY(PKEY_AppUserModel_ID, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 5); @@ -33,6 +38,8 @@ DEFINE_PROPERTYKEY(PKEY_AppUserModel_ID, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, #define CHECKHR(x) if (FAILED(x)) return x; +class ToastNotification; + #include "string_reference_wrapper.h" #include "toast_event_handler.h" #include "toast_notification.h" @@ -58,7 +65,16 @@ struct ToastData HICON hIcon; bool bForcehIcon; - ToastData(MCONTACT _hContact, const TCHAR *_tszTitle, const TCHAR *_tszText, HICON _hIcon = NULL, bool b = false) : hContact(_hContact), tszTitle(mir_tstrdup(_tszTitle)), tszText(mir_tstrdup(_tszText)), hIcon(_hIcon), bForcehIcon(b) {} + WNDPROC pPopupProc; + void *vPopupData; + + ToastData(MCONTACT _hContact, const TCHAR *_tszTitle, const TCHAR *_tszText, HICON _hIcon = NULL, bool b = false) : + hContact(_hContact), + tszTitle(mir_tstrdup(_tszTitle)), + tszText(mir_tstrdup(_tszText)), + hIcon(_hIcon), + bForcehIcon(b) + {} ~ToastData() { mir_free(tszTitle); @@ -71,6 +87,10 @@ struct ClassData int iFlags; HICON hIcon; HANDLE handle; + + WNDPROC pPopupProc; + void *vPopupData; + ClassData(int f, HICON h = NULL) : iFlags(f), hIcon(h) { Utils_GetRandom(&handle, sizeof(handle)); -- cgit v1.2.3