summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/toast_notification.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Toaster/src/toast_notification.h')
-rw-r--r--plugins/Toaster/src/toast_notification.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/Toaster/src/toast_notification.h b/plugins/Toaster/src/toast_notification.h
index b99e3036a3..757cf269d5 100644
--- a/plugins/Toaster/src/toast_notification.h
+++ b/plugins/Toaster/src/toast_notification.h
@@ -7,6 +7,11 @@ typedef __FITypedEventHandler_2_Windows__CUI__CNotifications__CToastNotification
typedef __FITypedEventHandler_2_Windows__CUI__CNotifications__CToastNotification_Windows__CUI__CNotifications__CToastDismissedEventArgs ToastDismissHandler;
typedef __FITypedEventHandler_2_Windows__CUI__CNotifications__CToastNotification_Windows__CUI__CNotifications__CToastFailedEventArgs ToastFailHandler;
+class ToastNotification;
+
+extern OBJLIST<ToastNotification> lstNotifications;
+extern mir_cs csNotifications;
+
class ToastNotification
{
private:
@@ -34,15 +39,13 @@ private:
public:
ToastNotification(_In_ wchar_t* text, _In_ wchar_t* caption = nullptr, _In_ wchar_t* imagePath = nullptr, MCONTACT hContact = 0, WNDPROC pWndProc = nullptr, void *pData = nullptr);
- ToastNotification::~ToastNotification();
+ ~ToastNotification();
inline void Destroy()
- {
- extern OBJLIST<ToastNotification> lstNotifications;
- lstNotifications.remove(this);
+ { mir_cslock lck(csNotifications); lstNotifications.remove(this);
}
- HRESULT OnActivate(_In_ ABI::Windows::UI::Notifications::IToastNotification*, IInspectable* aInspectable);
+ HRESULT OnActivate(_In_ ABI::Windows::UI::Notifications::IToastNotification*, IInspectable*);
HRESULT OnDismiss(_In_ ABI::Windows::UI::Notifications::IToastNotification*, _In_ ABI::Windows::UI::Notifications::IToastDismissedEventArgs*);
HRESULT OnFail(_In_ ABI::Windows::UI::Notifications::IToastNotification*, _In_ ABI::Windows::UI::Notifications::IToastFailedEventArgs*);
@@ -53,7 +56,7 @@ public:
{ return _hContact;
}
- inline LRESULT ToastNotification::CallPopupProc(UINT uMsg)
+ inline LRESULT CallPopupProc(UINT uMsg)
{ return (_pfnPopupProc ? _pfnPopupProc((HWND)this, uMsg, 0, 0) : 0);
}