summaryrefslogtreecommitdiff
path: root/plugins/Toaster/src/toast_notification.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-07-31 22:48:44 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-07-31 22:48:44 +0000
commita08e1cf9777b4a3766c91be2685aaf37c24fbd4e (patch)
tree76f00a6a8c26c04d84f1e259fcf4bdf4b984a0d1 /plugins/Toaster/src/toast_notification.h
parentaa7b69500fc5ce34840076de537dbfab2c31ab81 (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_notification.h')
-rw-r--r--plugins/Toaster/src/toast_notification.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/Toaster/src/toast_notification.h b/plugins/Toaster/src/toast_notification.h
new file mode 100644
index 0000000000..4a9c7e16f8
--- /dev/null
+++ b/plugins/Toaster/src/toast_notification.h
@@ -0,0 +1,33 @@
+#ifndef _TOAST_NOTIFICATION_H_
+#define _TOAST_NOTIFICATION_H_
+
+class ToastNotification
+{
+private:
+ wchar_t* _text;
+ wchar_t* _caption;
+ wchar_t* _imagePath;
+
+ Microsoft::WRL::ComPtr<ABI::Windows::UI::Notifications::IToastNotificationManagerStatics> _notificationManager;
+
+ HRESULT GetNodeByTag(_In_ HSTRING tagName, _Outptr_ ABI::Windows::Data::Xml::Dom::IXmlNode **node, _In_ ABI::Windows::Data::Xml::Dom::IXmlDocument* xml);
+ HRESULT AddNode(_In_ HSTRING name, _Outptr_ ABI::Windows::Data::Xml::Dom::IXmlNode **node, _In_ ABI::Windows::Data::Xml::Dom::IXmlNode *rootNode, _In_ ABI::Windows::Data::Xml::Dom::IXmlDocument* xml);
+ HRESULT SetNodeValueString(_In_ HSTRING inputString, _In_ ABI::Windows::Data::Xml::Dom::IXmlNode* node, _In_ ABI::Windows::Data::Xml::Dom::IXmlDocument* xml);
+ HRESULT SetTextValues(_In_reads_(textValuesCount) wchar_t** textValues, _In_ UINT32 textValuesCount, _In_ ABI::Windows::Data::Xml::Dom::IXmlDocument* xml);
+ HRESULT SetImageSrc(_In_z_ wchar_t* imagePath, _In_ ABI::Windows::Data::Xml::Dom::IXmlDocument* xml);
+ HRESULT Setup(_In_ ABI::Windows::Data::Xml::Dom::IXmlDocument* xml);
+ HRESULT CreateXml(_Outptr_ ABI::Windows::Data::Xml::Dom::IXmlDocument** xml);
+ HRESULT Create(_Outptr_ ABI::Windows::UI::Notifications::IToastNotification** notification);
+
+public:
+ COLORREF background;
+ COLORREF foreground;
+
+ ToastNotification(_In_ wchar_t* text, _In_ wchar_t* caption = nullptr, _In_ wchar_t* imagePath = nullptr) throw();
+ ~ToastNotification();
+
+ HRESULT Show();
+ HRESULT Show(_In_ ToastEventHandler* handler);
+};
+
+#endif //_TOAST_NOTIFICATION_H_ \ No newline at end of file