From a08e1cf9777b4a3766c91be2685aaf37c24fbd4e Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Fri, 31 Jul 2015 22:48:44 +0000 Subject: Toaster: initial commit git-svn-id: http://svn.miranda-ng.org/main/trunk@14775 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Toaster/src/toast_notification.h | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 plugins/Toaster/src/toast_notification.h (limited to 'plugins/Toaster/src/toast_notification.h') 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 _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 -- cgit v1.2.3