diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-12-29 18:02:18 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-12-29 18:02:18 +0000 |
commit | 99034f294331209fbfa1d5efacf7fb25f88e227d (patch) | |
tree | 69604b95ebbcab0d37f5b52d982b81ab52034ce7 /plugins/Toaster/src/toast_notification.h | |
parent | 4c506f7bcb8651fa2364d324b395e33171e6352d (diff) |
Toaster: forgotten cslocks
git-svn-id: http://svn.miranda-ng.org/main/trunk@15966 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src/toast_notification.h')
-rw-r--r-- | plugins/Toaster/src/toast_notification.h | 15 |
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);
}
|