diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2015-07-31 22:48:44 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2015-07-31 22:48:44 +0000 |
commit | a08e1cf9777b4a3766c91be2685aaf37c24fbd4e (patch) | |
tree | 76f00a6a8c26c04d84f1e259fcf4bdf4b984a0d1 /plugins/Toaster/src/toast_event_handler.h | |
parent | aa7b69500fc5ce34840076de537dbfab2c31ab81 (diff) |
Toaster: initial commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@14775 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Toaster/src/toast_event_handler.h')
-rw-r--r-- | plugins/Toaster/src/toast_event_handler.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/Toaster/src/toast_event_handler.h b/plugins/Toaster/src/toast_event_handler.h new file mode 100644 index 0000000000..10d2f1422f --- /dev/null +++ b/plugins/Toaster/src/toast_event_handler.h @@ -0,0 +1,26 @@ +#ifndef _TOAST_EVENT_HANDLER_H_
+#define _TOAST_EVENT_HANDLER_H_
+
+typedef ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::UI::Notifications::ToastNotification*, ::IInspectable*> DesktopToastActivatedEventHandler;
+
+class ToastEventHandler : public Microsoft::WRL::Implements<ABI::Windows::Foundation::ITypedEventHandler<ABI::Windows::UI::Notifications::ToastNotification*, ::IInspectable*>>
+{
+public:
+ ToastEventHandler::ToastEventHandler();
+ ToastEventHandler::ToastEventHandler(_In_ pEventHandler callback, _In_ void* arg = nullptr);
+ ~ToastEventHandler();
+
+ IFACEMETHODIMP_(ULONG) AddRef();
+ IFACEMETHODIMP_(ULONG) Release();
+
+ IFACEMETHODIMP QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppv);
+
+ IFACEMETHODIMP Invoke(_In_ ABI::Windows::UI::Notifications::IToastNotification* sender, _In_ IInspectable* args);
+
+private:
+ ULONG _ref;
+ void* _arg;
+ pEventHandler _callback;
+};
+
+#endif //_TOAST_EVENT_HANDLER_H_
\ No newline at end of file |