From 915dd4c738c9d1ed7306386358cbdb2e0b45c1d5 Mon Sep 17 00:00:00 2001 From: LAGonauta Date: Sat, 27 Mar 2021 06:55:09 -0300 Subject: [PATCH] Add MIT licensed winrt headers --- .../windows-notification/yolort/LICENSE.md | 22 + .../yolort/include/WindowsNumerics.impl.h | 62 + .../include/winrt/Windows.Data.Xml.Dom.h | 3 + .../winrt/Windows.Foundation.Collections.h | 3 + .../yolort/include/winrt/Windows.Foundation.h | 3 + .../include/winrt/Windows.UI.Notifications.h | 3 + .../yolort/include/winrt/Windows.UI.h | 3 + .../yolort/include/winrt/base.h | 3 + .../include/winrt/yolort_impl/corostub.hpp | 28 + .../yolort_impl/winrt/Windows.Data.Xml.Dom.h | 1691 ++++ .../winrt/Windows.Foundation.Collections.h | 2721 ++++++ .../yolort_impl/winrt/Windows.Foundation.h | 3526 +++++++ .../winrt/Windows.UI.Notifications.h | 3733 ++++++++ .../winrt/yolort_impl/winrt/Windows.UI.h | 2647 ++++++ .../include/winrt/yolort_impl/winrt/base.h | 8109 +++++++++++++++++ .../winrt/impl/Windows.ApplicationModel.0.h | 2281 +++++ .../winrt/impl/Windows.ApplicationModel.1.h | 369 + .../winrt/impl/Windows.ApplicationModel.2.h | 213 + .../winrt/impl/Windows.Data.Xml.Dom.0.h | 1108 +++ .../winrt/impl/Windows.Data.Xml.Dom.1.h | 190 + .../winrt/impl/Windows.Data.Xml.Dom.2.h | 102 + .../winrt/impl/Windows.Foundation.0.h | 1353 +++ .../winrt/impl/Windows.Foundation.1.h | 218 + .../winrt/impl/Windows.Foundation.2.h | 212 + .../impl/Windows.Foundation.Collections.0.h | 605 ++ .../impl/Windows.Foundation.Collections.1.h | 133 + .../impl/Windows.Foundation.Collections.2.h | 58 + .../winrt/impl/Windows.Storage.0.h | 2859 ++++++ .../winrt/impl/Windows.Storage.1.h | 448 + .../winrt/impl/Windows.Storage.2.h | 293 + .../winrt/impl/Windows.Storage.Search.0.h | 937 ++ .../winrt/impl/Windows.Storage.Search.1.h | 135 + .../winrt/impl/Windows.Storage.Search.2.h | 91 + .../winrt/impl/Windows.Storage.Streams.0.h | 941 ++ .../winrt/impl/Windows.Storage.Streams.1.h | 143 + .../winrt/impl/Windows.Storage.Streams.2.h | 108 + .../yolort_impl/winrt/impl/Windows.System.0.h | 3703 ++++++++ .../yolort_impl/winrt/impl/Windows.System.1.h | 524 ++ .../yolort_impl/winrt/impl/Windows.System.2.h | 355 + .../impl/Windows.System.RemoteSystems.0.h | 2905 ++++++ .../impl/Windows.System.RemoteSystems.1.h | 488 + .../impl/Windows.System.RemoteSystems.2.h | 264 + .../yolort_impl/winrt/impl/Windows.UI.0.h | 563 ++ .../yolort_impl/winrt/impl/Windows.UI.1.h | 61 + .../yolort_impl/winrt/impl/Windows.UI.2.h | 190 + .../winrt/impl/Windows.UI.Notifications.0.h | 3050 +++++++ .../winrt/impl/Windows.UI.Notifications.1.h | 467 + .../winrt/impl/Windows.UI.Notifications.2.h | 263 + .../yolort/include/winrt/yolort_impl/yolo.ipp | 133 + .../yolort/winrt-2.0.190620.2+yolort1.7z | Bin 0 -> 2723012 bytes 50 files changed, 48320 insertions(+) create mode 100644 plugins/windows-notification/yolort/LICENSE.md create mode 100644 plugins/windows-notification/yolort/include/WindowsNumerics.impl.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.Data.Xml.Dom.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.Foundation.Collections.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.Foundation.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.UI.Notifications.h create mode 100644 plugins/windows-notification/yolort/include/winrt/Windows.UI.h create mode 100644 plugins/windows-notification/yolort/include/winrt/base.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/corostub.hpp create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Data.Xml.Dom.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.Collections.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/base.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.ApplicationModel.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.ApplicationModel.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.ApplicationModel.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Data.Xml.Dom.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Data.Xml.Dom.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Data.Xml.Dom.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.Collections.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.Collections.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Foundation.Collections.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Search.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Search.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Search.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Streams.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Streams.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.Storage.Streams.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.RemoteSystems.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.RemoteSystems.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.System.RemoteSystems.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.Notifications.0.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.Notifications.1.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/impl/Windows.UI.Notifications.2.h create mode 100644 plugins/windows-notification/yolort/include/winrt/yolort_impl/yolo.ipp create mode 100644 plugins/windows-notification/yolort/winrt-2.0.190620.2+yolort1.7z diff --git a/plugins/windows-notification/yolort/LICENSE.md b/plugins/windows-notification/yolort/LICENSE.md new file mode 100644 index 00000000..3e7cd2b9 --- /dev/null +++ b/plugins/windows-notification/yolort/LICENSE.md @@ -0,0 +1,22 @@ + +Copyright © Microsoft Corporation +Copyright © 2021, [mjk](https://github.com/Yuubi-san) +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/windows-notification/yolort/include/WindowsNumerics.impl.h b/plugins/windows-notification/yolort/include/WindowsNumerics.impl.h new file mode 100644 index 00000000..e687c85d --- /dev/null +++ b/plugins/windows-notification/yolort/include/WindowsNumerics.impl.h @@ -0,0 +1,62 @@ + +// Copyright © 2021, mjk + +// This file is merely to cheaply plug compilability holes in windows 10 winrt +// APIs that use types from the non-free(?) WindowsNumerics library +// unconditionally, i. e., unguarded by __has_include. +// MinGW will probably have a complete implementation in the future, at which +// point this file may turn into a part of the problem it solves now (FIXME). + +#ifndef YOLORT_WINDOWSNUMERICS_IMPL_H +#define YOLORT_WINDOWSNUMERICS_IMPL_H + +#include +#include + +_WINDOWS_NUMERICS_BEGIN_NAMESPACE_ +{ + // These definitions make sense to *me*, but one cannot be sure microsoft + // didn't add proprietary extensions to mathematics. + +#define define_mathy_type(name, T, N, ...) \ + struct name \ + { \ + private: \ + constexpr auto _tie() const \ + { \ + auto members = std::tie( __VA_ARGS__ ); \ + static_assert( std::tuple_size_v == (N) ); \ + return members; \ + } \ + public: \ + T __VA_ARGS__; \ + friend constexpr auto operator==( const name &l, const name &r ) \ + { return l._tie() == r._tie(); } \ + } + +#define define_vector_type(T,N,...) define_mathy_type(T##N, T, N, __VA_ARGS__) + define_vector_type(float,2,x,y); + define_vector_type(float,3,x,y,z); + define_vector_type(float,4,x,y,z,w); +#undef define_vector_type + +#define define_matrix_type(T,N,M) struct T##N##x##M : std::array {} + define_matrix_type(float,2,2); + define_matrix_type(float,2,3); + define_matrix_type(float,2,4); + define_matrix_type(float,3,2); + define_matrix_type(float,3,3); + define_matrix_type(float,3,4); + define_matrix_type(float,4,2); + define_matrix_type(float,4,3); + define_matrix_type(float,4,4); +#undef define_matrix_type + + define_mathy_type(quaternion, float, 4, a,b,c,d ); + define_mathy_type(plane, float, 3+1, x,y,z, d ); + +#undef define_mathy_type +} +_WINDOWS_NUMERICS_END_NAMESPACE_ + +#endif // YOLORT_WINDOWSNUMERICS_IMPL_H diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.Data.Xml.Dom.h b/plugins/windows-notification/yolort/include/winrt/Windows.Data.Xml.Dom.h new file mode 100644 index 00000000..85d87dab --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.Data.Xml.Dom.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.Collections.h b/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.Collections.h new file mode 100644 index 00000000..f4175bc3 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.Collections.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.h b/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.h new file mode 100644 index 00000000..e0ab0e3c --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.Foundation.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.UI.Notifications.h b/plugins/windows-notification/yolort/include/winrt/Windows.UI.Notifications.h new file mode 100644 index 00000000..7b3ef9b8 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.UI.Notifications.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/Windows.UI.h b/plugins/windows-notification/yolort/include/winrt/Windows.UI.h new file mode 100644 index 00000000..d980c116 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/Windows.UI.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/base.h b/plugins/windows-notification/yolort/include/winrt/base.h new file mode 100644 index 00000000..8a61f54b --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/base.h @@ -0,0 +1,3 @@ +#define HEADER_IMPL +#include +#undef HEADER_IMPL diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/corostub.hpp b/plugins/windows-notification/yolort/include/winrt/yolort_impl/corostub.hpp new file mode 100644 index 00000000..8328a837 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/corostub.hpp @@ -0,0 +1,28 @@ + +// Copyright © 2021, mjk + +#ifndef YOLORT_IMPL_COROSTUB_HPP +#define YOLORT_IMPL_COROSTUB_HPP + +namespace corostub +{ + template + struct coroutine_handle + { + coroutine_handle() = default; + coroutine_handle( decltype(nullptr) ); + void *address() const; + void operator()() const {} + operator bool() const; + static coroutine_handle<> from_address( ... ); + }; + + struct suspend_always {}; + struct suspend_never {}; + + template + struct coroutine_traits; +} + +#endif // YOLORT_IMPL_COROSTUB_HPP + diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Data.Xml.Dom.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Data.Xml.Dom.h new file mode 100644 index 00000000..8f15cc3e --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Data.Xml.Dom.h @@ -0,0 +1,1691 @@ +// C++/WinRT v2.0.190620.2 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef WINRT_Windows_Data_Xml_Dom_H +#define WINRT_Windows_Data_Xml_Dom_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "impl/Windows.Foundation.2.h" +#include "impl/Windows.Foundation.Collections.2.h" +#include "impl/Windows.Storage.2.h" +#include "impl/Windows.Storage.Streams.2.h" +#include "impl/Windows.Data.Xml.Dom.2.h" +namespace winrt::impl +{ + template auto consume_Windows_Data_Xml_Dom_IDtdEntity::PublicId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdEntity)->get_PublicId(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IDtdEntity::SystemId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdEntity)->get_SystemId(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IDtdEntity::NotationName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdEntity)->get_NotationName(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IDtdNotation::PublicId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdNotation)->get_PublicId(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IDtdNotation::SystemId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IDtdNotation)->get_SystemId(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlAttribute::Name() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlAttribute)->get_Name(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlAttribute::Specified() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlAttribute)->get_Specified(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlAttribute::Value() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlAttribute)->get_Value(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlAttribute::Value(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlAttribute)->put_Value(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::Data() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->get_Data(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::Data(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->put_Data(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::Length() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->get_Length(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::SubstringData(uint32_t offset, uint32_t count) const + { + void* data{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->SubstringData(offset, count, &data)); + return hstring{ data, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::AppendData(param::hstring const& data) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->AppendData(*(void**)(&data))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::InsertData(uint32_t offset, param::hstring const& data) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->InsertData(offset, *(void**)(&data))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::DeleteData(uint32_t offset, uint32_t count) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->DeleteData(offset, count)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlCharacterData::ReplaceData(uint32_t offset, uint32_t count, param::hstring const& data) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlCharacterData)->ReplaceData(offset, count, *(void**)(&data))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::Doctype() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->get_Doctype(&value)); + return Windows::Data::Xml::Dom::XmlDocumentType{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::Implementation() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->get_Implementation(&value)); + return Windows::Data::Xml::Dom::XmlDomImplementation{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::DocumentElement() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->get_DocumentElement(&value)); + return Windows::Data::Xml::Dom::XmlElement{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateElement(param::hstring const& tagName) const + { + void* newElement{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateElement(*(void**)(&tagName), &newElement)); + return Windows::Data::Xml::Dom::XmlElement{ newElement, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateDocumentFragment() const + { + void* newDocumentFragment{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateDocumentFragment(&newDocumentFragment)); + return Windows::Data::Xml::Dom::XmlDocumentFragment{ newDocumentFragment, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateTextNode(param::hstring const& data) const + { + void* newTextNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateTextNode(*(void**)(&data), &newTextNode)); + return Windows::Data::Xml::Dom::XmlText{ newTextNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateComment(param::hstring const& data) const + { + void* newComment{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateComment(*(void**)(&data), &newComment)); + return Windows::Data::Xml::Dom::XmlComment{ newComment, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateProcessingInstruction(param::hstring const& target, param::hstring const& data) const + { + void* newProcessingInstruction{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateProcessingInstruction(*(void**)(&target), *(void**)(&data), &newProcessingInstruction)); + return Windows::Data::Xml::Dom::XmlProcessingInstruction{ newProcessingInstruction, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateAttribute(param::hstring const& name) const + { + void* newAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateAttribute(*(void**)(&name), &newAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ newAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateEntityReference(param::hstring const& name) const + { + void* newEntityReference{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateEntityReference(*(void**)(&name), &newEntityReference)); + return Windows::Data::Xml::Dom::XmlEntityReference{ newEntityReference, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::GetElementsByTagName(param::hstring const& tagName) const + { + void* elements{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->GetElementsByTagName(*(void**)(&tagName), &elements)); + return Windows::Data::Xml::Dom::XmlNodeList{ elements, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateCDataSection(param::hstring const& data) const + { + void* newCDataSection{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateCDataSection(*(void**)(&data), &newCDataSection)); + return Windows::Data::Xml::Dom::XmlCDataSection{ newCDataSection, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::DocumentUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->get_DocumentUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateAttributeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& qualifiedName) const + { + void* newAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateAttributeNS(*(void**)(&namespaceUri), *(void**)(&qualifiedName), &newAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ newAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::CreateElementNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& qualifiedName) const + { + void* newElement{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->CreateElementNS(*(void**)(&namespaceUri), *(void**)(&qualifiedName), &newElement)); + return Windows::Data::Xml::Dom::XmlElement{ newElement, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::GetElementById(param::hstring const& elementId) const + { + void* element{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->GetElementById(*(void**)(&elementId), &element)); + return Windows::Data::Xml::Dom::XmlElement{ element, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocument::ImportNode(Windows::Data::Xml::Dom::IXmlNode const& node, bool deep) const + { + void* newNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocument)->ImportNode(*(void**)(&node), deep, &newNode)); + return Windows::Data::Xml::Dom::IXmlNode{ newNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO::LoadXml(param::hstring const& xml) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO)->LoadXml(*(void**)(&xml))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO::LoadXml(param::hstring const& xml, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO)->LoadXmlWithSettings(*(void**)(&xml), *(void**)(&loadSettings))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO::SaveToFileAsync(Windows::Storage::IStorageFile const& file) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO)->SaveToFileAsync(*(void**)(&file), &asyncInfo)); + return Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO2::LoadXmlFromBuffer(Windows::Storage::Streams::IBuffer const& buffer) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO2)->LoadXmlFromBuffer(*(void**)(&buffer))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentIO2::LoadXmlFromBuffer(Windows::Storage::Streams::IBuffer const& buffer, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentIO2)->LoadXmlFromBufferWithSettings(*(void**)(&buffer), *(void**)(&loadSettings))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentStatics::LoadFromUriAsync(Windows::Foundation::Uri const& uri) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentStatics)->LoadFromUriAsync(*(void**)(&uri), &asyncInfo)); + return Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentStatics::LoadFromUriAsync(Windows::Foundation::Uri const& uri, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentStatics)->LoadFromUriWithSettingsAsync(*(void**)(&uri), *(void**)(&loadSettings), &asyncInfo)); + return Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentStatics::LoadFromFileAsync(Windows::Storage::IStorageFile const& file) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentStatics)->LoadFromFileAsync(*(void**)(&file), &asyncInfo)); + return Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentStatics::LoadFromFileAsync(Windows::Storage::IStorageFile const& file, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) const + { + void* asyncInfo{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentStatics)->LoadFromFileWithSettingsAsync(*(void**)(&file), *(void**)(&loadSettings), &asyncInfo)); + return Windows::Foundation::IAsyncOperation{ asyncInfo, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentType::Name() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentType)->get_Name(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentType::Entities() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentType)->get_Entities(&value)); + return Windows::Data::Xml::Dom::XmlNamedNodeMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDocumentType::Notations() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDocumentType)->get_Notations(&value)); + return Windows::Data::Xml::Dom::XmlNamedNodeMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlDomImplementation::HasFeature(param::hstring const& feature, Windows::Foundation::IInspectable const& version) const + { + bool featureSupported; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlDomImplementation)->HasFeature(*(void**)(&feature), *(void**)(&version), &featureSupported)); + return featureSupported; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::TagName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->get_TagName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetAttribute(param::hstring const& attributeName) const + { + void* attributeValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetAttribute(*(void**)(&attributeName), &attributeValue)); + return hstring{ attributeValue, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::SetAttribute(param::hstring const& attributeName, param::hstring const& attributeValue) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->SetAttribute(*(void**)(&attributeName), *(void**)(&attributeValue))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::RemoveAttribute(param::hstring const& attributeName) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->RemoveAttribute(*(void**)(&attributeName))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetAttributeNode(param::hstring const& attributeName) const + { + void* attributeNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetAttributeNode(*(void**)(&attributeName), &attributeNode)); + return Windows::Data::Xml::Dom::XmlAttribute{ attributeNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::SetAttributeNode(Windows::Data::Xml::Dom::XmlAttribute const& newAttribute) const + { + void* previousAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->SetAttributeNode(*(void**)(&newAttribute), &previousAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ previousAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::RemoveAttributeNode(Windows::Data::Xml::Dom::XmlAttribute const& attributeNode) const + { + void* removedAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->RemoveAttributeNode(*(void**)(&attributeNode), &removedAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ removedAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetElementsByTagName(param::hstring const& tagName) const + { + void* elements{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetElementsByTagName(*(void**)(&tagName), &elements)); + return Windows::Data::Xml::Dom::XmlNodeList{ elements, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::SetAttributeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& qualifiedName, param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->SetAttributeNS(*(void**)(&namespaceUri), *(void**)(&qualifiedName), *(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetAttributeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& localName) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetAttributeNS(*(void**)(&namespaceUri), *(void**)(&localName), &value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::RemoveAttributeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& localName) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->RemoveAttributeNS(*(void**)(&namespaceUri), *(void**)(&localName))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::SetAttributeNodeNS(Windows::Data::Xml::Dom::XmlAttribute const& newAttribute) const + { + void* previousAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->SetAttributeNodeNS(*(void**)(&newAttribute), &previousAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ previousAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlElement::GetAttributeNodeNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& localName) const + { + void* previousAttribute{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlElement)->GetAttributeNodeNS(*(void**)(&namespaceUri), *(void**)(&localName), &previousAttribute)); + return Windows::Data::Xml::Dom::XmlAttribute{ previousAttribute, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::MaxElementDepth() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_MaxElementDepth(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::MaxElementDepth(uint32_t value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_MaxElementDepth(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ProhibitDtd() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_ProhibitDtd(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ProhibitDtd(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_ProhibitDtd(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ResolveExternals() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_ResolveExternals(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ResolveExternals(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_ResolveExternals(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ValidateOnParse() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_ValidateOnParse(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ValidateOnParse(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_ValidateOnParse(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ElementContentWhiteSpace() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->get_ElementContentWhiteSpace(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlLoadSettings::ElementContentWhiteSpace(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlLoadSettings)->put_ElementContentWhiteSpace(value)); + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::Length() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->get_Length(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::Item(uint32_t index) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->Item(index, &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::GetNamedItem(param::hstring const& name) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->GetNamedItem(*(void**)(&name), &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::SetNamedItem(Windows::Data::Xml::Dom::IXmlNode const& node) const + { + void* previousNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->SetNamedItem(*(void**)(&node), &previousNode)); + return Windows::Data::Xml::Dom::IXmlNode{ previousNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::RemoveNamedItem(param::hstring const& name) const + { + void* previousNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->RemoveNamedItem(*(void**)(&name), &previousNode)); + return Windows::Data::Xml::Dom::IXmlNode{ previousNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::GetNamedItemNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& name) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->GetNamedItemNS(*(void**)(&namespaceUri), *(void**)(&name), &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::RemoveNamedItemNS(Windows::Foundation::IInspectable const& namespaceUri, param::hstring const& name) const + { + void* previousNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->RemoveNamedItemNS(*(void**)(&namespaceUri), *(void**)(&name), &previousNode)); + return Windows::Data::Xml::Dom::IXmlNode{ previousNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNamedNodeMap::SetNamedItemNS(Windows::Data::Xml::Dom::IXmlNode const& node) const + { + void* previousNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNamedNodeMap)->SetNamedItemNS(*(void**)(&node), &previousNode)); + return Windows::Data::Xml::Dom::IXmlNode{ previousNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NodeValue() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NodeValue(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NodeValue(Windows::Foundation::IInspectable const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->put_NodeValue(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NodeType() const + { + Windows::Data::Xml::Dom::NodeType value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NodeType(put_abi(value))); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NodeName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NodeName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::ParentNode() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_ParentNode(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::ChildNodes() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_ChildNodes(&value)); + return Windows::Data::Xml::Dom::XmlNodeList{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::FirstChild() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_FirstChild(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::LastChild() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_LastChild(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::PreviousSibling() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_PreviousSibling(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NextSibling() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NextSibling(&value)); + return Windows::Data::Xml::Dom::IXmlNode{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::Attributes() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_Attributes(&value)); + return Windows::Data::Xml::Dom::XmlNamedNodeMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::HasChildNodes() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->HasChildNodes(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::OwnerDocument() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_OwnerDocument(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::InsertBefore(Windows::Data::Xml::Dom::IXmlNode const& newChild, Windows::Data::Xml::Dom::IXmlNode const& referenceChild) const + { + void* insertedChild{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->InsertBefore(*(void**)(&newChild), *(void**)(&referenceChild), &insertedChild)); + return Windows::Data::Xml::Dom::IXmlNode{ insertedChild, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::ReplaceChild(Windows::Data::Xml::Dom::IXmlNode const& newChild, Windows::Data::Xml::Dom::IXmlNode const& referenceChild) const + { + void* previousChild{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->ReplaceChild(*(void**)(&newChild), *(void**)(&referenceChild), &previousChild)); + return Windows::Data::Xml::Dom::IXmlNode{ previousChild, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::RemoveChild(Windows::Data::Xml::Dom::IXmlNode const& childNode) const + { + void* removedChild{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->RemoveChild(*(void**)(&childNode), &removedChild)); + return Windows::Data::Xml::Dom::IXmlNode{ removedChild, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::AppendChild(Windows::Data::Xml::Dom::IXmlNode const& newChild) const + { + void* appendedChild{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->AppendChild(*(void**)(&newChild), &appendedChild)); + return Windows::Data::Xml::Dom::IXmlNode{ appendedChild, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::CloneNode(bool deep) const + { + void* newNode{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->CloneNode(deep, &newNode)); + return Windows::Data::Xml::Dom::IXmlNode{ newNode, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::NamespaceUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_NamespaceUri(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::LocalName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_LocalName(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::Prefix() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->get_Prefix(&value)); + return Windows::Foundation::IInspectable{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::Normalize() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->Normalize()); + } + template auto consume_Windows_Data_Xml_Dom_IXmlNode::Prefix(Windows::Foundation::IInspectable const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNode)->put_Prefix(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeList::Length() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeList)->get_Length(&value)); + return value; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeList::Item(uint32_t index) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeList)->Item(index, &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSelector::SelectSingleNode(param::hstring const& xpath) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSelector)->SelectSingleNode(*(void**)(&xpath), &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSelector::SelectNodes(param::hstring const& xpath) const + { + void* nodelist{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSelector)->SelectNodes(*(void**)(&xpath), &nodelist)); + return Windows::Data::Xml::Dom::XmlNodeList{ nodelist, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSelector::SelectSingleNodeNS(param::hstring const& xpath, Windows::Foundation::IInspectable const& namespaces) const + { + void* node{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSelector)->SelectSingleNodeNS(*(void**)(&xpath), *(void**)(&namespaces), &node)); + return Windows::Data::Xml::Dom::IXmlNode{ node, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSelector::SelectNodesNS(param::hstring const& xpath, Windows::Foundation::IInspectable const& namespaces) const + { + void* nodelist{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSelector)->SelectNodesNS(*(void**)(&xpath), *(void**)(&namespaces), &nodelist)); + return Windows::Data::Xml::Dom::XmlNodeList{ nodelist, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSerializer::GetXml() const + { + void* outerXml{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSerializer)->GetXml(&outerXml)); + return hstring{ outerXml, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSerializer::InnerText() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSerializer)->get_InnerText(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlNodeSerializer::InnerText(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlNodeSerializer)->put_InnerText(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlProcessingInstruction::Target() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlProcessingInstruction)->get_Target(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlProcessingInstruction::Data() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlProcessingInstruction)->get_Data(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Data_Xml_Dom_IXmlProcessingInstruction::Data(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlProcessingInstruction)->put_Data(*(void**)(&value))); + } + template auto consume_Windows_Data_Xml_Dom_IXmlText::SplitText(uint32_t offset) const + { + void* secondPart{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Data::Xml::Dom::IXmlText)->SplitText(offset, &secondPart)); + return Windows::Data::Xml::Dom::IXmlText{ secondPart, take_ownership_from_abi }; + } + template + struct produce : produce_base + { + int32_t __stdcall get_PublicId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PublicId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SystemId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SystemId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NotationName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NotationName()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_PublicId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PublicId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SystemId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SystemId()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Name(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Name()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Specified(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Specified()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Value(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Value(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Value(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Data(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Data()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Data(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Data(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Length(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Length()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SubstringData(uint32_t offset, uint32_t count, void** data) noexcept final try + { + clear_abi(data); + typename D::abi_guard guard(this->shim()); + *data = detach_from(this->shim().SubstringData(offset, count)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall AppendData(void* data) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().AppendData(*reinterpret_cast(&data)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall InsertData(uint32_t offset, void* data) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().InsertData(offset, *reinterpret_cast(&data)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall DeleteData(uint32_t offset, uint32_t count) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().DeleteData(offset, count); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ReplaceData(uint32_t offset, uint32_t count, void* data) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ReplaceData(offset, count, *reinterpret_cast(&data)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Doctype(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Doctype()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Implementation(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Implementation()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DocumentElement(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DocumentElement()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateElement(void* tagName, void** newElement) noexcept final try + { + clear_abi(newElement); + typename D::abi_guard guard(this->shim()); + *newElement = detach_from(this->shim().CreateElement(*reinterpret_cast(&tagName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDocumentFragment(void** newDocumentFragment) noexcept final try + { + clear_abi(newDocumentFragment); + typename D::abi_guard guard(this->shim()); + *newDocumentFragment = detach_from(this->shim().CreateDocumentFragment()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTextNode(void* data, void** newTextNode) noexcept final try + { + clear_abi(newTextNode); + typename D::abi_guard guard(this->shim()); + *newTextNode = detach_from(this->shim().CreateTextNode(*reinterpret_cast(&data))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateComment(void* data, void** newComment) noexcept final try + { + clear_abi(newComment); + typename D::abi_guard guard(this->shim()); + *newComment = detach_from(this->shim().CreateComment(*reinterpret_cast(&data))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateProcessingInstruction(void* target, void* data, void** newProcessingInstruction) noexcept final try + { + clear_abi(newProcessingInstruction); + typename D::abi_guard guard(this->shim()); + *newProcessingInstruction = detach_from(this->shim().CreateProcessingInstruction(*reinterpret_cast(&target), *reinterpret_cast(&data))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateAttribute(void* name, void** newAttribute) noexcept final try + { + clear_abi(newAttribute); + typename D::abi_guard guard(this->shim()); + *newAttribute = detach_from(this->shim().CreateAttribute(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateEntityReference(void* name, void** newEntityReference) noexcept final try + { + clear_abi(newEntityReference); + typename D::abi_guard guard(this->shim()); + *newEntityReference = detach_from(this->shim().CreateEntityReference(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetElementsByTagName(void* tagName, void** elements) noexcept final try + { + clear_abi(elements); + typename D::abi_guard guard(this->shim()); + *elements = detach_from(this->shim().GetElementsByTagName(*reinterpret_cast(&tagName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateCDataSection(void* data, void** newCDataSection) noexcept final try + { + clear_abi(newCDataSection); + typename D::abi_guard guard(this->shim()); + *newCDataSection = detach_from(this->shim().CreateCDataSection(*reinterpret_cast(&data))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DocumentUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DocumentUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateAttributeNS(void* namespaceUri, void* qualifiedName, void** newAttribute) noexcept final try + { + clear_abi(newAttribute); + typename D::abi_guard guard(this->shim()); + *newAttribute = detach_from(this->shim().CreateAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateElementNS(void* namespaceUri, void* qualifiedName, void** newElement) noexcept final try + { + clear_abi(newElement); + typename D::abi_guard guard(this->shim()); + *newElement = detach_from(this->shim().CreateElementNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetElementById(void* elementId, void** element) noexcept final try + { + clear_abi(element); + typename D::abi_guard guard(this->shim()); + *element = detach_from(this->shim().GetElementById(*reinterpret_cast(&elementId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ImportNode(void* node, bool deep, void** newNode) noexcept final try + { + clear_abi(newNode); + typename D::abi_guard guard(this->shim()); + *newNode = detach_from(this->shim().ImportNode(*reinterpret_cast(&node), deep)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall LoadXml(void* xml) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LoadXml(*reinterpret_cast(&xml)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadXmlWithSettings(void* xml, void* loadSettings) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LoadXml(*reinterpret_cast(&xml), *reinterpret_cast(&loadSettings)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SaveToFileAsync(void* file, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from(this->shim().SaveToFileAsync(*reinterpret_cast(&file))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall LoadXmlFromBuffer(void* buffer) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LoadXmlFromBuffer(*reinterpret_cast(&buffer)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadXmlFromBufferWithSettings(void* buffer, void* loadSettings) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LoadXmlFromBuffer(*reinterpret_cast(&buffer), *reinterpret_cast(&loadSettings)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall LoadFromUriAsync(void* uri, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from>(this->shim().LoadFromUriAsync(*reinterpret_cast(&uri))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadFromUriWithSettingsAsync(void* uri, void* loadSettings, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from>(this->shim().LoadFromUriAsync(*reinterpret_cast(&uri), *reinterpret_cast(&loadSettings))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadFromFileAsync(void* file, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from>(this->shim().LoadFromFileAsync(*reinterpret_cast(&file))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall LoadFromFileWithSettingsAsync(void* file, void* loadSettings, void** asyncInfo) noexcept final try + { + clear_abi(asyncInfo); + typename D::abi_guard guard(this->shim()); + *asyncInfo = detach_from>(this->shim().LoadFromFileAsync(*reinterpret_cast(&file), *reinterpret_cast(&loadSettings))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Name(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Name()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Entities(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Entities()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Notations(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Notations()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall HasFeature(void* feature, void* version, bool* featureSupported) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *featureSupported = detach_from(this->shim().HasFeature(*reinterpret_cast(&feature), *reinterpret_cast(&version))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_TagName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().TagName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetAttribute(void* attributeName, void** attributeValue) noexcept final try + { + clear_abi(attributeValue); + typename D::abi_guard guard(this->shim()); + *attributeValue = detach_from(this->shim().GetAttribute(*reinterpret_cast(&attributeName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAttribute(void* attributeName, void* attributeValue) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SetAttribute(*reinterpret_cast(&attributeName), *reinterpret_cast(&attributeValue)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAttribute(void* attributeName) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAttribute(*reinterpret_cast(&attributeName)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetAttributeNode(void* attributeName, void** attributeNode) noexcept final try + { + clear_abi(attributeNode); + typename D::abi_guard guard(this->shim()); + *attributeNode = detach_from(this->shim().GetAttributeNode(*reinterpret_cast(&attributeName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAttributeNode(void* newAttribute, void** previousAttribute) noexcept final try + { + clear_abi(previousAttribute); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_from(this->shim().SetAttributeNode(*reinterpret_cast(&newAttribute))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAttributeNode(void* attributeNode, void** removedAttribute) noexcept final try + { + clear_abi(removedAttribute); + typename D::abi_guard guard(this->shim()); + *removedAttribute = detach_from(this->shim().RemoveAttributeNode(*reinterpret_cast(&attributeNode))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetElementsByTagName(void* tagName, void** elements) noexcept final try + { + clear_abi(elements); + typename D::abi_guard guard(this->shim()); + *elements = detach_from(this->shim().GetElementsByTagName(*reinterpret_cast(&tagName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAttributeNS(void* namespaceUri, void* qualifiedName, void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SetAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&qualifiedName), *reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetAttributeNS(void* namespaceUri, void* localName, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAttributeNS(void* namespaceUri, void* localName) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAttributeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAttributeNodeNS(void* newAttribute, void** previousAttribute) noexcept final try + { + clear_abi(previousAttribute); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_from(this->shim().SetAttributeNodeNS(*reinterpret_cast(&newAttribute))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetAttributeNodeNS(void* namespaceUri, void* localName, void** previousAttribute) noexcept final try + { + clear_abi(previousAttribute); + typename D::abi_guard guard(this->shim()); + *previousAttribute = detach_from(this->shim().GetAttributeNodeNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&localName))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_MaxElementDepth(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MaxElementDepth()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_MaxElementDepth(uint32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().MaxElementDepth(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ProhibitDtd(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ProhibitDtd()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ProhibitDtd(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ProhibitDtd(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ResolveExternals(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ResolveExternals()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ResolveExternals(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ResolveExternals(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ValidateOnParse(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ValidateOnParse()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ValidateOnParse(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ValidateOnParse(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ElementContentWhiteSpace(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ElementContentWhiteSpace()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ElementContentWhiteSpace(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ElementContentWhiteSpace(value); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Length(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Length()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Item(uint32_t index, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().Item(index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetNamedItem(void* name, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().GetNamedItem(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetNamedItem(void* node, void** previousNode) noexcept final try + { + clear_abi(previousNode); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_from(this->shim().SetNamedItem(*reinterpret_cast(&node))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveNamedItem(void* name, void** previousNode) noexcept final try + { + clear_abi(previousNode); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_from(this->shim().RemoveNamedItem(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetNamedItemNS(void* namespaceUri, void* name, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().GetNamedItemNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveNamedItemNS(void* namespaceUri, void* name, void** previousNode) noexcept final try + { + clear_abi(previousNode); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_from(this->shim().RemoveNamedItemNS(*reinterpret_cast(&namespaceUri), *reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetNamedItemNS(void* node, void** previousNode) noexcept final try + { + clear_abi(previousNode); + typename D::abi_guard guard(this->shim()); + *previousNode = detach_from(this->shim().SetNamedItemNS(*reinterpret_cast(&node))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_NodeValue(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NodeValue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_NodeValue(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().NodeValue(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NodeType(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NodeType()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NodeName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NodeName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ParentNode(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ParentNode()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ChildNodes(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ChildNodes()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_FirstChild(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().FirstChild()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LastChild(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LastChild()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PreviousSibling(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PreviousSibling()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NextSibling(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NextSibling()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Attributes(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Attributes()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall HasChildNodes(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HasChildNodes()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_OwnerDocument(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().OwnerDocument()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall InsertBefore(void* newChild, void* referenceChild, void** insertedChild) noexcept final try + { + clear_abi(insertedChild); + typename D::abi_guard guard(this->shim()); + *insertedChild = detach_from(this->shim().InsertBefore(*reinterpret_cast(&newChild), *reinterpret_cast(&referenceChild))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ReplaceChild(void* newChild, void* referenceChild, void** previousChild) noexcept final try + { + clear_abi(previousChild); + typename D::abi_guard guard(this->shim()); + *previousChild = detach_from(this->shim().ReplaceChild(*reinterpret_cast(&newChild), *reinterpret_cast(&referenceChild))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveChild(void* childNode, void** removedChild) noexcept final try + { + clear_abi(removedChild); + typename D::abi_guard guard(this->shim()); + *removedChild = detach_from(this->shim().RemoveChild(*reinterpret_cast(&childNode))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall AppendChild(void* newChild, void** appendedChild) noexcept final try + { + clear_abi(appendedChild); + typename D::abi_guard guard(this->shim()); + *appendedChild = detach_from(this->shim().AppendChild(*reinterpret_cast(&newChild))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CloneNode(bool deep, void** newNode) noexcept final try + { + clear_abi(newNode); + typename D::abi_guard guard(this->shim()); + *newNode = detach_from(this->shim().CloneNode(deep)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NamespaceUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NamespaceUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LocalName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LocalName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Prefix(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Prefix()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Normalize() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Normalize(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Prefix(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Prefix(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Length(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Length()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Item(uint32_t index, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().Item(index)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall SelectSingleNode(void* xpath, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().SelectSingleNode(*reinterpret_cast(&xpath))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SelectNodes(void* xpath, void** nodelist) noexcept final try + { + clear_abi(nodelist); + typename D::abi_guard guard(this->shim()); + *nodelist = detach_from(this->shim().SelectNodes(*reinterpret_cast(&xpath))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SelectSingleNodeNS(void* xpath, void* namespaces, void** node) noexcept final try + { + clear_abi(node); + typename D::abi_guard guard(this->shim()); + *node = detach_from(this->shim().SelectSingleNodeNS(*reinterpret_cast(&xpath), *reinterpret_cast(&namespaces))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SelectNodesNS(void* xpath, void* namespaces, void** nodelist) noexcept final try + { + clear_abi(nodelist); + typename D::abi_guard guard(this->shim()); + *nodelist = detach_from(this->shim().SelectNodesNS(*reinterpret_cast(&xpath), *reinterpret_cast(&namespaces))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetXml(void** outerXml) noexcept final try + { + clear_abi(outerXml); + typename D::abi_guard guard(this->shim()); + *outerXml = detach_from(this->shim().GetXml()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_InnerText(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().InnerText()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_InnerText(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().InnerText(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Target(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Target()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Data(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Data()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Data(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Data(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall SplitText(uint32_t offset, void** secondPart) noexcept final try + { + clear_abi(secondPart); + typename D::abi_guard guard(this->shim()); + *secondPart = detach_from(this->shim().SplitText(offset)); + return 0; + } + catch (...) { return to_hresult(); } + }; +} +namespace winrt::Windows::Data::Xml::Dom +{ + inline XmlDocument::XmlDocument() : + XmlDocument(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline auto XmlDocument::LoadFromUriAsync(Windows::Foundation::Uri const& uri) + { + return impl::call_factory([&](auto&& f) { return f.LoadFromUriAsync(uri); }); + } + inline auto XmlDocument::LoadFromUriAsync(Windows::Foundation::Uri const& uri, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) + { + return impl::call_factory([&](auto&& f) { return f.LoadFromUriAsync(uri, loadSettings); }); + } + inline auto XmlDocument::LoadFromFileAsync(Windows::Storage::IStorageFile const& file) + { + return impl::call_factory([&](auto&& f) { return f.LoadFromFileAsync(file); }); + } + inline auto XmlDocument::LoadFromFileAsync(Windows::Storage::IStorageFile const& file, Windows::Data::Xml::Dom::XmlLoadSettings const& loadSettings) + { + return impl::call_factory([&](auto&& f) { return f.LoadFromFileAsync(file, loadSettings); }); + } + inline XmlLoadSettings::XmlLoadSettings() : + XmlLoadSettings(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } +} +namespace std +{ + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.Collections.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.Collections.h new file mode 100644 index 00000000..2e322ed5 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.Collections.h @@ -0,0 +1,2721 @@ +// C++/WinRT v2.0.190620.2 +// Patched with YoloRT + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright © 2021, mjk +// Licensed under the MIT License. + +#ifndef WINRT_Windows_Foundation_Collections_H +#define WINRT_Windows_Foundation_Collections_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "Windows.Foundation.h" +#include "impl/Windows.Foundation.2.h" +#include "impl/Windows.Foundation.Collections.2.h" +namespace winrt::impl +{ + template auto consume_Windows_Foundation_Collections_IIterable::First() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterable)->First(&winrt_impl_result)); + return Windows::Foundation::Collections::IIterator{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_Collections_IIterator::Current() const + { + T winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterator)->get_Current(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IIterator::HasCurrent() const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterator)->get_HasCurrent(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IIterator::MoveNext() const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterator)->MoveNext(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IIterator::GetMany(array_view items) const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IIterator)->GetMany(items.size(), put_abi(items), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IKeyValuePair::Key() const + { + K winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IKeyValuePair)->get_Key(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IKeyValuePair::Value() const + { + V winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IKeyValuePair)->get_Value(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapChangedEventArgs::CollectionChange() const + { + Windows::Foundation::Collections::CollectionChange winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapChangedEventArgs)->get_CollectionChange(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapChangedEventArgs::Key() const + { + K winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapChangedEventArgs)->get_Key(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapView::Lookup(impl::param_type const& key) const + { + V winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapView)->Lookup(impl::bind_in(key), put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapView::Size() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapView)->get_Size(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapView::HasKey(impl::param_type const& key) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapView)->HasKey(impl::bind_in(key), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMapView::Split(Windows::Foundation::Collections::IMapView& first, Windows::Foundation::Collections::IMapView& second) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMapView)->Split(impl::bind_out(first), impl::bind_out(second))); + } + template auto consume_Windows_Foundation_Collections_IMap::Lookup(impl::param_type const& key) const + { + V winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->Lookup(impl::bind_in(key), put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMap::Size() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->get_Size(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMap::HasKey(impl::param_type const& key) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->HasKey(impl::bind_in(key), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMap::GetView() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->GetView(&winrt_impl_result)); + return Windows::Foundation::Collections::IMapView{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_Collections_IMap::Insert(impl::param_type const& key, impl::param_type const& value) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->Insert(impl::bind_in(key), impl::bind_in(value), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IMap::Remove(impl::param_type const& key) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->Remove(impl::bind_in(key))); + } + template auto consume_Windows_Foundation_Collections_IMap::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IMap)->Clear()); + } + template auto consume_Windows_Foundation_Collections_IObservableMap::MapChanged(Windows::Foundation::Collections::MapChangedEventHandler const& vhnd) const + { + winrt::event_token winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IObservableMap)->add_MapChanged(*(void**)(&vhnd), put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template typename consume_Windows_Foundation_Collections_IObservableMap::MapChanged_revoker consume_Windows_Foundation_Collections_IObservableMap::MapChanged(auto_revoke_t, Windows::Foundation::Collections::MapChangedEventHandler const& vhnd) const + { + return impl::make_event_revoker(this, MapChanged(vhnd)); + } + template auto consume_Windows_Foundation_Collections_IObservableMap::MapChanged(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::Foundation::Collections::IObservableMap)->remove_MapChanged(impl::bind_in(token))); + } + template auto consume_Windows_Foundation_Collections_IObservableVector::VectorChanged(Windows::Foundation::Collections::VectorChangedEventHandler const& vhnd) const + { + winrt::event_token winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IObservableVector)->add_VectorChanged(*(void**)(&vhnd), put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template typename consume_Windows_Foundation_Collections_IObservableVector::VectorChanged_revoker consume_Windows_Foundation_Collections_IObservableVector::VectorChanged(auto_revoke_t, Windows::Foundation::Collections::VectorChangedEventHandler const& vhnd) const + { + return impl::make_event_revoker(this, VectorChanged(vhnd)); + } + template auto consume_Windows_Foundation_Collections_IObservableVector::VectorChanged(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::Foundation::Collections::IObservableVector)->remove_VectorChanged(impl::bind_in(token))); + } + template auto consume_Windows_Foundation_Collections_IVectorChangedEventArgs::CollectionChange() const + { + Windows::Foundation::Collections::CollectionChange value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorChangedEventArgs)->get_CollectionChange(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_Collections_IVectorChangedEventArgs::Index() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorChangedEventArgs)->get_Index(&value)); + return value; + } + template auto consume_Windows_Foundation_Collections_IVectorView::GetAt(uint32_t index) const + { + T winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorView)->GetAt(index, put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVectorView::Size() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorView)->get_Size(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVectorView::IndexOf(impl::param_type const& value, uint32_t& index) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorView)->IndexOf(impl::bind_in(value), &index, &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVectorView::GetMany(uint32_t startIndex, array_view items) const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVectorView)->GetMany(startIndex, items.size(), put_abi(items), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::GetAt(uint32_t index) const + { + T winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->GetAt(index, put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::Size() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->get_Size(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::GetView() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->GetView(&winrt_impl_result)); + return Windows::Foundation::Collections::IVectorView{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_Collections_IVector::IndexOf(impl::param_type const& value, uint32_t& index) const + { + bool winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->IndexOf(impl::bind_in(value), &index, &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::SetAt(uint32_t index, impl::param_type const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->SetAt(index, impl::bind_in(value))); + } + template auto consume_Windows_Foundation_Collections_IVector::InsertAt(uint32_t index, impl::param_type const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->InsertAt(index, impl::bind_in(value))); + } + template auto consume_Windows_Foundation_Collections_IVector::RemoveAt(uint32_t index) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->RemoveAt(index)); + } + template auto consume_Windows_Foundation_Collections_IVector::Append(impl::param_type const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->Append(impl::bind_in(value))); + } + template auto consume_Windows_Foundation_Collections_IVector::RemoveAtEnd() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->RemoveAtEnd()); + } + template auto consume_Windows_Foundation_Collections_IVector::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->Clear()); + } + template auto consume_Windows_Foundation_Collections_IVector::GetMany(uint32_t startIndex, array_view items) const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->GetMany(startIndex, items.size(), put_abi(items), &winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_Collections_IVector::ReplaceAll(array_view items) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::Collections::IVector)->ReplaceAll(items.size(), get_abi(items))); + } + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* sender, void* event) noexcept final try + { + (*this)(*reinterpret_cast const*>(&sender), *reinterpret_cast const*>(&event)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* sender, void* event) noexcept final try + { + (*this)(*reinterpret_cast const*>(&sender), *reinterpret_cast(&event)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall First(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().First()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_Current(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Current()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HasCurrent(bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().HasCurrent()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall MoveNext(bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().MoveNext()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetMany(uint32_t __itemsSize, arg_out items, uint32_t* winrt_impl_result) noexcept final try + { + zero_abi(items, __itemsSize); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetMany(array_view(reinterpret_cast(items), reinterpret_cast(items) + __itemsSize))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_Key(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Key()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Value(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_CollectionChange(int32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().CollectionChange()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Key(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Key()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall Lookup(arg_in key, arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Lookup(*reinterpret_cast(&key))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Size(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Size()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall HasKey(arg_in key, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().HasKey(*reinterpret_cast(&key))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Split(void** first, void** second) noexcept final try + { + clear_abi(first); + clear_abi(second); + typename D::abi_guard guard(this->shim()); + this->shim().Split(*reinterpret_cast*>(first), *reinterpret_cast*>(second)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall Lookup(arg_in key, arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Lookup(*reinterpret_cast(&key))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Size(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Size()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall HasKey(arg_in key, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().HasKey(*reinterpret_cast(&key))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetView(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().GetView()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Insert(arg_in key, arg_in value, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Insert(*reinterpret_cast(&key), *reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Remove(arg_in key) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Remove(*reinterpret_cast(&key)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall add_MapChanged(void* vhnd, winrt::event_token* winrt_impl_result) noexcept final try + { + zero_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().MapChanged(*reinterpret_cast const*>(&vhnd))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_MapChanged(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().MapChanged(*reinterpret_cast(&token)); + return 0; + } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall add_VectorChanged(void* vhnd, winrt::event_token* winrt_impl_result) noexcept final try + { + zero_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().VectorChanged(*reinterpret_cast const*>(&vhnd))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_VectorChanged(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().VectorChanged(*reinterpret_cast(&token)); + return 0; + } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_CollectionChange(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CollectionChange()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Index(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Index()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall GetAt(uint32_t index, arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetAt(index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Size(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Size()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall IndexOf(arg_in value, uint32_t* index, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().IndexOf(*reinterpret_cast(&value), *index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetMany(uint32_t startIndex, uint32_t __itemsSize, arg_out items, uint32_t* winrt_impl_result) noexcept final try + { + zero_abi(items, __itemsSize); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetMany(startIndex, array_view(reinterpret_cast(items), reinterpret_cast(items) + __itemsSize))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall GetAt(uint32_t index, arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetAt(index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Size(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Size()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetView(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().GetView()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall IndexOf(arg_in value, uint32_t* index, bool* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().IndexOf(*reinterpret_cast(&value), *index)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall SetAt(uint32_t index, arg_in value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SetAt(index, *reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall InsertAt(uint32_t index, arg_in value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().InsertAt(index, *reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAt(uint32_t index) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAt(index); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Append(arg_in value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Append(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAtEnd() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveAtEnd(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetMany(uint32_t startIndex, uint32_t __itemsSize, arg_out items, uint32_t* winrt_impl_result) noexcept final try + { + zero_abi(items, __itemsSize); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetMany(startIndex, array_view(reinterpret_cast(items), reinterpret_cast(items) + __itemsSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ReplaceAll(uint32_t __itemsSize, arg_out items) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ReplaceAll(array_view(reinterpret_cast(items), reinterpret_cast(items) + __itemsSize)); + return 0; + } + catch (...) { return to_hresult(); } + }; +} +namespace winrt::Windows::Foundation::Collections +{ + inline PropertySet::PropertySet() : + PropertySet(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline StringMap::StringMap() : + StringMap(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline ValueSet::ValueSet() : + ValueSet(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(L handler) : + MapChangedEventHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(F* handler) : + MapChangedEventHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(O* object, M method) : + MapChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(com_ptr&& object, M method) : + MapChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template MapChangedEventHandler::MapChangedEventHandler(weak_ref&& object, M method) : + MapChangedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto MapChangedEventHandler::operator()(Windows::Foundation::Collections::IObservableMap const& sender, Windows::Foundation::Collections::IMapChangedEventArgs const& event) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&sender), *(void**)(&event))); + } + template template VectorChangedEventHandler::VectorChangedEventHandler(L handler) : + VectorChangedEventHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template VectorChangedEventHandler::VectorChangedEventHandler(F* handler) : + VectorChangedEventHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template VectorChangedEventHandler::VectorChangedEventHandler(O* object, M method) : + VectorChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template VectorChangedEventHandler::VectorChangedEventHandler(com_ptr&& object, M method) : + VectorChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template VectorChangedEventHandler::VectorChangedEventHandler(weak_ref&& object, M method) : + VectorChangedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto VectorChangedEventHandler::operator()(Windows::Foundation::Collections::IObservableVector const& sender, Windows::Foundation::Collections::IVectorChangedEventArgs const& event) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&sender), *(void**)(&event))); + } +} +namespace std +{ + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} + +namespace winrt::impl +{ + namespace wfc = Windows::Foundation::Collections; + + template + struct fast_iterator + { + using iterator_category = std::input_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T * ; + using reference = T & ; + + fast_iterator(T const& collection, uint32_t const index) noexcept : + m_collection(&collection), + m_index(index) + {} + + fast_iterator& operator++() noexcept + { + ++m_index; + return*this; + } + + auto operator*() const + { + return m_collection->GetAt(m_index); + } + + bool operator==(fast_iterator const& other) const noexcept + { + WINRT_ASSERT(m_collection == other.m_collection); + return m_index == other.m_index; + } + + bool operator!=(fast_iterator const& other) const noexcept + { + return !(*this == other); + } + + private: + + T const* m_collection = nullptr; + uint32_t m_index = 0; + }; + + template + class has_GetAt + { + template ().GetAt(0))> static constexpr bool get_value(int) { return true; } + template static constexpr bool get_value(...) { return false; } + + public: + + static constexpr bool value = get_value(0); + }; + + template ::value>* = nullptr> + auto begin(T const& collection) -> decltype(collection.First()) + { + auto result = collection.First(); + + if (!result.HasCurrent()) + { + return {}; + } + + return result; + } + + template ::value>* = nullptr> + auto end([[maybe_unused]] T const& collection) noexcept -> decltype(collection.First()) + { + return {}; + } + + template ::value>* = nullptr> + fast_iterator begin(T const& collection) noexcept + { + return fast_iterator(collection, 0); + } + + template ::value>* = nullptr> + fast_iterator end(T const& collection) + { + return fast_iterator(collection, collection.Size()); + } + + template + struct key_value_pair; + + template + struct key_value_pair> : implements>, wfc::IKeyValuePair> + { + key_value_pair(K key, V value) : + m_key(std::move(key)), + m_value(std::move(value)) + { + } + + K Key() const + { + return m_key; + } + + V Value() const + { + return m_value; + } + + private: + + K const m_key; + V const m_value; + }; + + template + struct is_key_value_pair : std::false_type {}; + + template + struct is_key_value_pair> : std::true_type {}; + + struct input_scope + { + void invalidate_scope() noexcept + { + m_invalid = true; + } + + void check_scope() const + { + if (m_invalid) + { + throw hresult_illegal_method_call(); + } + } + + private: + + bool m_invalid{}; + }; + + struct no_collection_version + { + struct iterator_type + { + iterator_type(no_collection_version const&) noexcept + { + } + + void check_version(no_collection_version const&) const noexcept + { + } + }; + }; + + struct collection_version + { + struct iterator_type + { + iterator_type(collection_version const& version) noexcept : + m_snapshot(version.get_version()) + { + } + + void check_version(collection_version const& version) const + { + if (version.get_version() != m_snapshot) + { + throw hresult_changed_state(); + } + } + + private: + + uint32_t const m_snapshot; + }; + + uint32_t get_version() const noexcept + { + return m_version; + } + + void increment_version() noexcept + { + ++m_version; + } + + private: + + std::atomic m_version{}; + }; + + template + struct range_container + { + T const first; + T const last; + + auto begin() const noexcept + { + return first; + } + + auto end() const noexcept + { + return last; + } + }; +} + +namespace winrt +{ + template + struct iterable_base : Version + { + template + static constexpr auto const& wrap_value(U const& value) noexcept + { + return value; + } + + template + static constexpr auto const& unwrap_value(U const& value) noexcept + { + return value; + } + + auto First() + { + return make(static_cast(this)); + } + + protected: + + template + auto copy_n(InputIt first, Size count, OutputIt result) const + { + if constexpr (std::is_same_v().get_container().begin())> && !impl::is_key_value_pair::value) + { + std::copy_n(first, count, result); + } + else + { + return std::transform(first, std::next(first, count), result, [&](auto&& value) + { + if constexpr (!impl::is_key_value_pair::value) + { + return static_cast(*this).unwrap_value(value); + } + else + { + return make>(static_cast(*this).unwrap_value(value.first), static_cast(*this).unwrap_value(value.second)); + } + }); + } + } + + private: + + struct iterator : Version::iterator_type, implements> + { + void abi_enter() + { + m_owner->abi_enter(); + this->check_version(*m_owner); + } + + void abi_exit() + { + m_owner->abi_exit(); + } + + explicit iterator(D* const owner) noexcept : + Version::iterator_type(*owner), + m_current(owner->get_container().begin()), + m_end(owner->get_container().end()) + { + m_owner.copy_from(owner); + } + + T Current() const + { + if (m_current == m_end) + { + throw hresult_out_of_bounds(); + } + + if constexpr (!impl::is_key_value_pair::value) + { + return m_owner->unwrap_value(*m_current); + } + else + { + return make>(m_owner->unwrap_value(m_current->first), m_owner->unwrap_value(m_current->second)); + } + } + + bool HasCurrent() const noexcept + { + return m_current != m_end; + } + + bool MoveNext() noexcept + { + if (m_current != m_end) + { + ++m_current; + } + + return HasCurrent(); + } + + uint32_t GetMany(array_view values) + { + uint32_t const actual = (std::min)(static_cast(std::distance(m_current, m_end)), values.size()); + m_owner->copy_n(m_current, actual, values.begin()); + std::advance(m_current, actual); + return actual; + } + + private: + + com_ptr m_owner; + decltype(m_owner->get_container().begin()) m_current; + decltype(m_owner->get_container().end()) const m_end; + }; + }; + + template + struct vector_view_base : iterable_base + { + T GetAt(uint32_t const index) const + { + if (index >= Size()) + { + throw hresult_out_of_bounds(); + } + + return static_cast(*this).unwrap_value(*std::next(static_cast(*this).get_container().begin(), index)); + } + + uint32_t Size() const noexcept + { + return static_cast(std::distance(static_cast(*this).get_container().begin(), static_cast(*this).get_container().end())); + } + + bool IndexOf(T const& value, uint32_t& index) const noexcept + { + auto first = std::find_if(static_cast(*this).get_container().begin(), static_cast(*this).get_container().end(), [&](auto&& match) + { + return value == static_cast(*this).unwrap_value(match); + }); + + index = static_cast(first - static_cast(*this).get_container().begin()); + return index < Size(); + } + + uint32_t GetMany(uint32_t const startIndex, array_view values) const + { + if (startIndex >= Size()) + { + return 0; + } + + uint32_t const actual = (std::min)(Size() - startIndex, values.size()); + this->copy_n(static_cast(*this).get_container().begin() + startIndex, actual, values.begin()); + return actual; + } + }; + + template + struct vector_base : vector_view_base + { + Windows::Foundation::Collections::IVectorView GetView() const noexcept + { + return static_cast(*this); + } + + void SetAt(uint32_t const index, T const& value) + { + if (index >= static_cast(*this).get_container().size()) + { + throw hresult_out_of_bounds(); + } + + this->increment_version(); + static_cast(*this).get_container()[index] = static_cast(*this).wrap_value(value); + } + + void InsertAt(uint32_t const index, T const& value) + { + if (index > static_cast(*this).get_container().size()) + { + throw hresult_out_of_bounds(); + } + + this->increment_version(); + static_cast(*this).get_container().insert(static_cast(*this).get_container().begin() + index, static_cast(*this).wrap_value(value)); + } + + void RemoveAt(uint32_t const index) + { + if (index >= static_cast(*this).get_container().size()) + { + throw hresult_out_of_bounds(); + } + + this->increment_version(); + static_cast(*this).get_container().erase(static_cast(*this).get_container().begin() + index); + } + + void Append(T const& value) + { + this->increment_version(); + static_cast(*this).get_container().push_back(static_cast(*this).wrap_value(value)); + } + + void RemoveAtEnd() + { + if (static_cast(*this).get_container().empty()) + { + throw hresult_out_of_bounds(); + } + + this->increment_version(); + static_cast(*this).get_container().pop_back(); + } + + void Clear() noexcept + { + this->increment_version(); + static_cast(*this).get_container().clear(); + } + + void ReplaceAll(array_view value) + { + this->increment_version(); + assign(value.begin(), value.end()); + } + + private: + + template + void assign(InputIt first, InputIt last) + { + using container_type = std::remove_reference_t(*this).get_container())>; + + if constexpr (std::is_same_v) + { + static_cast(*this).get_container().assign(first, last); + } + else + { + auto& container = static_cast(*this).get_container(); + container.clear(); + container.reserve(std::distance(first, last)); + + std::transform(first, last, std::back_inserter(container), [&](auto&& value) + { + return static_cast(*this).wrap_value(value); + }); + } + } + }; + + template + struct observable_vector_base : vector_base + { + event_token VectorChanged(Windows::Foundation::Collections::VectorChangedEventHandler const& handler) + { + return m_changed.add(handler); + } + + void VectorChanged(event_token const cookie) + { + m_changed.remove(cookie); + } + + void SetAt(uint32_t const index, T const& value) + { + vector_base::SetAt(index, value); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemChanged, index); + } + + void InsertAt(uint32_t const index, T const& value) + { + vector_base::InsertAt(index, value); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemInserted, index); + } + + void RemoveAt(uint32_t const index) + { + vector_base::RemoveAt(index); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemRemoved, index); + } + + void Append(T const& value) + { + vector_base::Append(value); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemInserted, this->Size() - 1); + } + + void RemoveAtEnd() + { + vector_base::RemoveAtEnd(); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemRemoved, this->Size()); + } + + void Clear() + { + vector_base::Clear(); + call_changed(Windows::Foundation::Collections::CollectionChange::Reset, 0); + } + + void ReplaceAll(array_view value) + { + vector_base::ReplaceAll(value); + call_changed(Windows::Foundation::Collections::CollectionChange::Reset, 0); + } + + protected: + + void call_changed(Windows::Foundation::Collections::CollectionChange const change, uint32_t const index) + { + m_changed(static_cast(*this), make(change, index)); + } + + private: + + event> m_changed; + + struct args : implements + { + args(Windows::Foundation::Collections::CollectionChange const change, uint32_t const index) noexcept : + m_change(change), + m_index(index) + { + } + + Windows::Foundation::Collections::CollectionChange CollectionChange() const noexcept + { + return m_change; + } + + uint32_t Index() const noexcept + { + return m_index; + } + + private: + + Windows::Foundation::Collections::CollectionChange const m_change; + uint32_t const m_index; + }; + }; + + template + struct map_view_base : iterable_base, Version> + { + V Lookup(K const& key) const + { + auto pair = static_cast(*this).get_container().find(static_cast(*this).wrap_value(key)); + + if (pair == static_cast(*this).get_container().end()) + { + throw hresult_out_of_bounds(); + } + + return static_cast(*this).unwrap_value(pair->second); + } + + uint32_t Size() const noexcept + { + return static_cast(static_cast(*this).get_container().size()); + } + + bool HasKey(K const& key) const noexcept + { + return static_cast(*this).get_container().find(static_cast(*this).wrap_value(key)) != static_cast(*this).get_container().end(); + } + + void Split(Windows::Foundation::Collections::IMapView& first, Windows::Foundation::Collections::IMapView& second) const noexcept + { + first = nullptr; + second = nullptr; + } + }; + + template + struct map_base : map_view_base + { + Windows::Foundation::Collections::IMapView GetView() const + { + return static_cast(*this); + } + + bool Insert(K const& key, V const& value) + { + this->increment_version(); + auto pair = static_cast(*this).get_container().insert_or_assign(static_cast(*this).wrap_value(key), static_cast(*this).wrap_value(value)); + return !pair.second; + } + + void Remove(K const& key) + { + this->increment_version(); + static_cast(*this).get_container().erase(static_cast(*this).wrap_value(key)); + } + + void Clear() noexcept + { + this->increment_version(); + static_cast(*this).get_container().clear(); + } + }; + + template + struct observable_map_base : map_base + { + event_token MapChanged(Windows::Foundation::Collections::MapChangedEventHandler const& handler) + { + return m_changed.add(handler); + } + + void MapChanged(event_token const cookie) + { + m_changed.remove(cookie); + } + + bool Insert(K const& key, V const& value) + { + bool const result = map_base::Insert(key, value); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemInserted, key); + return result; + } + + void Remove(K const& key) + { + map_base::Remove(key); + call_changed(Windows::Foundation::Collections::CollectionChange::ItemRemoved, key); + } + + void Clear() noexcept + { + map_base::Clear(); + call_changed(Windows::Foundation::Collections::CollectionChange::Reset, impl::empty_value()); + } + + private: + + event> m_changed; + + void call_changed(Windows::Foundation::Collections::CollectionChange const change, K const& key) + { + m_changed(static_cast(*this), make(change, key)); + } + + struct args : implements> + { + args(Windows::Foundation::Collections::CollectionChange const change, K const& key) noexcept : + m_change(change), + m_key(key) + { + } + + Windows::Foundation::Collections::CollectionChange CollectionChange() const noexcept + { + return m_change; + } + + K Key() const noexcept + { + return m_key; + } + + private: + + Windows::Foundation::Collections::CollectionChange const m_change; + K const m_key; + }; + }; +} + +namespace winrt::impl +{ + template + struct input_iterable : + implements, non_agile, no_weak_ref, wfc::IIterable>, + iterable_base, T> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_iterable(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container const m_values; + }; + + template + struct scoped_input_iterable : + input_scope, + implements, non_agile, no_weak_ref, wfc::IIterable>, + iterable_base, T> + { + void abi_enter() const + { + check_scope(); + } + + scoped_input_iterable(InputIt first, InputIt last) : m_begin(first), m_end(last) + { + } + + auto get_container() const noexcept + { + return range_container{ m_begin, m_end }; + } + +#if defined(_DEBUG) && !defined(WINRT_NO_MAKE_DETECTION) + void use_make_function_to_create_this_object() final + { + } +#endif + + private: + + InputIt const m_begin; + InputIt const m_end; + }; + + template + auto make_input_iterable(Container&& values) + { + return make>(std::forward(values)); + } + + template + auto make_scoped_input_iterable(InputIt first, InputIt last) + { + using interface_type = wfc::IIterable; + std::pair result; + auto ptr = new scoped_input_iterable(first, last); + *put_abi(result.first) = to_abi(ptr); + result.second = ptr; + return result; + } +} + +namespace winrt::param +{ + template + struct iterable + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IIterable; + + iterable(std::nullptr_t) noexcept + { + } + + iterable(iterable const& values) = delete; + iterable& operator=(iterable const& values) = delete; + + iterable(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_pair.first, winrt::get_abi(values)); + } + + template >* = nullptr> + iterable(Collection const& values) noexcept + { + m_pair.first = values; + } + + template + iterable(std::vector&& values) : m_pair(impl::make_input_iterable(std::move(values)), nullptr) + { + } + + template + iterable(std::vector const& values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + iterable(std::initializer_list values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + template >* = nullptr> + iterable(std::initializer_list values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + template + iterable(InputIt first, InputIt last) : m_pair(impl::make_scoped_input_iterable(first, last)) + { + } + + ~iterable() noexcept + { + if (m_pair.second) + { + m_pair.second->invalidate_scope(); + } + + if (!m_owned) + { + detach_abi(m_pair.first); + } + } + + operator interface_type const& () const noexcept + { + return m_pair.first; + } + + private: + + std::pair m_pair; + bool m_owned{ true }; + }; + + template + struct iterable> + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IIterable; + + iterable(std::nullptr_t) noexcept + { + } + + iterable(iterable const& values) = delete; + iterable& operator=(iterable const& values) = delete; + + iterable(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_pair.first, winrt::get_abi(values)); + } + + template >* = nullptr> + iterable(Collection const& values) noexcept + { + m_pair.first = values; + } + + template + iterable(std::map&& values) : m_pair(impl::make_input_iterable(std::move(values)), nullptr) + { + } + + template + iterable(std::map const& values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + template + iterable(std::unordered_map&& values) : m_pair(impl::make_input_iterable(std::move(values)), nullptr) + { + } + + template + iterable(std::unordered_map const& values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + iterable(std::initializer_list> values) : m_pair(impl::make_scoped_input_iterable(values.begin(), values.end())) + { + } + + template + iterable(InputIt first, InputIt last) : m_pair(impl::make_scoped_input_iterable(first, last)) + { + } + + ~iterable() noexcept + { + if (m_pair.second) + { + m_pair.second->invalidate_scope(); + } + + if (!m_owned) + { + detach_abi(m_pair.first); + } + } + + operator interface_type const& () const noexcept + { + return m_pair.first; + } + + private: + + std::pair m_pair; + bool m_owned{ true }; + }; + + template + auto get_abi(iterable const& object) noexcept + { + return *(void**)(&object); + } + + template + struct async_iterable + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IIterable; + + async_iterable(std::nullptr_t) noexcept + { + } + + async_iterable(async_iterable const& values) = delete; + async_iterable& operator=(async_iterable const& values) = delete; + + async_iterable(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + async_iterable(Collection const& values) noexcept + { + m_interface = values; + } + + template + async_iterable(std::vector&& values) : + m_interface(impl::make_input_iterable(std::move(values))) + { + } + + async_iterable(std::initializer_list values) : + m_interface(impl::make_input_iterable(std::vector(values))) + { + } + + ~async_iterable() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + struct async_iterable> + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IIterable; + + async_iterable(std::nullptr_t) noexcept + { + } + + async_iterable(async_iterable const& values) = delete; + async_iterable& operator=(async_iterable const& values) = delete; + + async_iterable(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + async_iterable(Collection const& values) noexcept + { + m_interface = values; + } + + template + async_iterable(std::map&& values) : + m_interface(impl::make_input_iterable(std::move(values))) + { + } + + template + async_iterable(std::unordered_map&& values) : + m_interface(impl::make_input_iterable(std::move(values))) + { + } + + async_iterable(std::initializer_list> values) : + m_interface(impl::make_input_iterable(std::map(values))) + { + } + + ~async_iterable() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(async_iterable const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct input_vector_view : + implements, non_agile, no_weak_ref, wfc::IVectorView, wfc::IIterable>, + vector_view_base, T> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_vector_view(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container const m_values; + }; + + template + struct scoped_input_vector_view : + input_scope, + implements, non_agile, no_weak_ref, wfc::IVectorView, wfc::IIterable>, + vector_view_base, T> + { + void abi_enter() const + { + check_scope(); + } + + scoped_input_vector_view(InputIt first, InputIt last) : m_begin(first), m_end(last) + { + } + + auto get_container() const noexcept + { + return range_container{ m_begin, m_end }; + } + +#if defined(_DEBUG) && !defined(WINRT_NO_MAKE_DETECTION) + void use_make_function_to_create_this_object() final + { + } +#endif + + private: + + InputIt const m_begin; + InputIt const m_end; + }; + + template + auto make_scoped_input_vector_view(InputIt first, InputIt last) + { + using interface_type = wfc::IVectorView; + std::pair result; + auto ptr = new scoped_input_vector_view(first, last); + *put_abi(result.first) = to_abi(ptr); + result.second = ptr; + return result; + } +} + +namespace winrt::param +{ + template + struct vector_view + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IVectorView; + + vector_view(std::nullptr_t) noexcept + { + } + + vector_view(vector_view const& values) = delete; + vector_view& operator=(vector_view const& values) = delete; + + vector_view(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_pair.first, winrt::get_abi(values)); + } + + template >* = nullptr> + vector_view(Collection const& values) noexcept + { + m_pair.first = values; + } + + template + vector_view(std::vector&& values) : m_pair(make>>(std::move(values)), nullptr) + { + } + + template + vector_view(std::vector const& values) : m_pair(impl::make_scoped_input_vector_view(values.begin(), values.end())) + { + } + + vector_view(std::initializer_list values) : m_pair(impl::make_scoped_input_vector_view(values.begin(), values.end())) + { + } + + template >* = nullptr> + vector_view(std::initializer_list values) : m_pair(impl::make_scoped_input_vector_view(values.begin(), values.end())) + { + } + + template + vector_view(InputIt first, InputIt last) : m_pair(impl::make_scoped_input_vector_view(first, last)) + { + } + + ~vector_view() noexcept + { + if (m_pair.second) + { + m_pair.second->invalidate_scope(); + } + + if (!m_owned) + { + detach_abi(m_pair.first); + } + } + + operator interface_type const& () const noexcept + { + return m_pair.first; + } + + private: + + std::pair m_pair; + bool m_owned{ true }; + }; + + template + auto get_abi(vector_view const& object) noexcept + { + return *(void**)(&object); + } + + template + struct async_vector_view + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IVectorView; + + async_vector_view(std::nullptr_t) noexcept + { + } + + async_vector_view(async_vector_view const& values) = delete; + async_vector_view& operator=(async_vector_view const& values) = delete; + + async_vector_view(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + async_vector_view(Collection const& values) noexcept + { + m_interface = values; + } + + template + async_vector_view(std::vector&& values) : + m_interface(make>>(std::move(values))) + { + } + + async_vector_view(std::initializer_list values) : + m_interface(make>>(values)) + { + } + + ~async_vector_view() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(async_vector_view const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct input_map_view : + implements, non_agile, no_weak_ref, wfc::IMapView, wfc::IIterable>>, + map_view_base, K, V> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_map_view(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container const m_values; + }; + + template + struct scoped_input_map_view : + input_scope, + implements, non_agile, no_weak_ref, wfc::IMapView, wfc::IIterable>>, + map_view_base, K, V> + { + void abi_enter() const + { + check_scope(); + } + + explicit scoped_input_map_view(Container const& values) : m_values(values) + { + } + + auto& get_container() const noexcept + { + return m_values; + } + +#if defined(_DEBUG) && !defined(WINRT_NO_MAKE_DETECTION) + void use_make_function_to_create_this_object() final + { + } +#endif + + private: + + Container const& m_values; + }; + + template + auto make_input_map_view(Container&& values) + { + return make>(std::forward(values)); + } + + template + auto make_scoped_input_map_view(Container const& values) + { + using interface_type = wfc::IMapView; + std::pair result; + auto ptr = new scoped_input_map_view(values); + *put_abi(result.first) = to_abi(ptr); + result.second = ptr; + return result; + } +} + +namespace winrt::param +{ + template + struct map_view + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IMapView; + + map_view(std::nullptr_t) noexcept + { + } + + map_view(map_view const& values) = delete; + map_view& operator=(map_view const& values) = delete; + + map_view(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_pair.first, winrt::get_abi(values)); + } + + template >* = nullptr> + map_view(Collection const& values) noexcept + { + m_pair.first = values; + } + + template + map_view(std::map&& values) : m_pair(impl::make_input_map_view(std::move(values)), nullptr) + { + } + + template + map_view(std::map const& values) : m_pair(impl::make_scoped_input_map_view(values)) + { + } + + template + map_view(std::unordered_map&& values) : m_pair(impl::make_input_map_view(std::move(values)), nullptr) + { + } + + template + map_view(std::unordered_map const& values) : m_pair(impl::make_scoped_input_map_view(values)) + { + } + + map_view(std::initializer_list> values) : m_pair(impl::make_input_map_view(std::map(values)), nullptr) + { + } + + ~map_view() noexcept + { + if (m_pair.second) + { + m_pair.second->invalidate_scope(); + } + + if (!m_owned) + { + detach_abi(m_pair.first); + } + } + + operator interface_type const& () const noexcept + { + return m_pair.first; + } + + private: + + std::pair m_pair; + bool m_owned{ true }; + }; + + template + auto get_abi(map_view const& object) noexcept + { + return *(void**)(&object); + } + + template + struct async_map_view + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IMapView; + + async_map_view(std::nullptr_t) noexcept + { + } + + async_map_view(async_map_view const& values) = delete; + async_map_view& operator=(async_map_view const& values) = delete; + + async_map_view(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + async_map_view(Collection const& values) noexcept + { + m_interface = values; + } + + template + async_map_view(std::map&& values) : + m_interface(impl::make_input_map_view(std::move(values))) + { + } + + template + async_map_view(std::unordered_map&& values) : + m_interface(impl::make_input_map_view(std::move(values))) + { + } + + async_map_view(std::initializer_list> values) : + m_interface(impl::make_input_map_view(std::map(values))) + { + } + + ~async_map_view() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(async_map_view const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct input_vector : + implements, wfc::IVector, wfc::IVectorView, wfc::IIterable>, + vector_base, T> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_vector(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container m_values; + }; +} + +namespace winrt::param +{ + template + struct vector + { + using value_type = T; + using interface_type = Windows::Foundation::Collections::IVector; + + vector(std::nullptr_t) noexcept + { + } + + vector(vector const& values) = delete; + vector& operator=(vector const& values) = delete; + + vector(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + vector(Collection const& values) noexcept + { + m_interface = values; + } + + template + vector(std::vector&& values) : + m_interface(make>>(std::move(values))) + { + } + + vector(std::initializer_list values) : + m_interface(make>>(values)) + { + } + + ~vector() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(vector const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct input_map : + implements, wfc::IMap, wfc::IMapView, wfc::IIterable>>, + map_base, K, V> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit input_map(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container m_values; + }; + + template + auto make_input_map(Container&& values) + { + return make>(std::forward(values)); + } +} + +namespace winrt::param +{ + template + struct map + { + using value_type = Windows::Foundation::Collections::IKeyValuePair; + using interface_type = Windows::Foundation::Collections::IMap; + + map(std::nullptr_t) noexcept + { + } + + map(map const& values) = delete; + map& operator=(map const& values) = delete; + + map(interface_type const& values) noexcept : m_owned(false) + { + attach_abi(m_interface, winrt::get_abi(values)); + } + + template >* = nullptr> + map(Collection const& values) noexcept + { + m_interface = values; + } + + template + map(std::map&& values) : + m_interface(impl::make_input_map(std::move(values))) + { + } + + template + map(std::unordered_map&& values) : + m_interface(impl::make_input_map(std::move(values))) + { + } + + map(std::initializer_list> values) : + m_interface(impl::make_input_map(std::map(values))) + { + } + + ~map() noexcept + { + if (!m_owned) + { + detach_abi(m_interface); + } + } + + operator interface_type const& () const noexcept + { + return m_interface; + } + + private: + + interface_type m_interface; + bool m_owned{ true }; + }; + + template + auto get_abi(map const& object) noexcept + { + return *(void**)(&object); + } +} + +namespace winrt::impl +{ + template + struct inspectable_observable_vector : + observable_vector_base, Windows::Foundation::IInspectable>, + implements, + wfc::IObservableVector, wfc::IVector, wfc::IVectorView, wfc::IIterable> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit inspectable_observable_vector(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container m_values; + }; + + template + struct convertible_observable_vector : + observable_vector_base, T>, + implements, + wfc::IObservableVector, wfc::IVector, wfc::IVectorView, wfc::IIterable, + wfc::IObservableVector, wfc::IVector, wfc::IVectorView, wfc::IIterable> + { + static_assert(!std::is_same_v); + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + using container_type = convertible_observable_vector; + using base_type = observable_vector_base, T>; + + explicit convertible_observable_vector(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + auto First() + { + struct result + { + container_type* container; + + operator wfc::IIterator() + { + return static_cast(container)->First(); + } + + operator wfc::IIterator() + { + return make(container); + } + }; + + return result{ this }; + } + + auto GetAt(uint32_t const index) const + { + struct result + { + base_type const* container; + uint32_t const index; + + operator T() const + { + return container->GetAt(index); + } + + operator Windows::Foundation::IInspectable() const + { + return box_value(container->GetAt(index)); + } + }; + + return result{ this, index }; + } + + using base_type::IndexOf; + + bool IndexOf(Windows::Foundation::IInspectable const& value, uint32_t& index) const + { + return IndexOf(unbox_value(value), index); + } + + using base_type::GetMany; + + uint32_t GetMany(uint32_t const startIndex, array_view values) const + { + if (startIndex >= m_values.size()) + { + return 0; + } + + uint32_t const actual = (std::min)(static_cast(m_values.size() - startIndex), values.size()); + + std::transform(m_values.begin() + startIndex, m_values.begin() + startIndex + actual, values.begin(), [&](auto && value) + { + return box_value(value); + }); + + return actual; + } + + auto GetView() const noexcept + { + struct result + { + container_type const* container; + + operator wfc::IVectorView() const + { + return *container; + } + + operator wfc::IVectorView() const + { + return *container; + } + }; + + return result{ this }; + } + + using base_type::SetAt; + + void SetAt(uint32_t const index, Windows::Foundation::IInspectable const& value) + { + SetAt(index, unbox_value(value)); + } + + using base_type::InsertAt; + + void InsertAt(uint32_t const index, Windows::Foundation::IInspectable const& value) + { + InsertAt(index, unbox_value(value)); + } + + using base_type::Append; + + void Append(Windows::Foundation::IInspectable const& value) + { + Append(unbox_value(value)); + } + + using base_type::ReplaceAll; + + void ReplaceAll(array_view values) + { + this->increment_version(); + m_values.clear(); + m_values.reserve(values.size()); + + std::transform(values.begin(), values.end(), std::back_inserter(m_values), [&](auto && value) + { + return unbox_value(value); + }); + + this->call_changed(Windows::Foundation::Collections::CollectionChange::Reset, 0); + } + + using base_type::VectorChanged; + + event_token VectorChanged(wfc::VectorChangedEventHandler const& handler) + { + return base_type::VectorChanged([handler](auto && sender, auto && args) + { + handler(sender.template try_as>(), args); + }); + } + + private: + + struct iterator : + impl::collection_version::iterator_type, + implements> + { + void abi_enter() + { + check_version(*m_owner); + } + + explicit iterator(container_type* const container) noexcept : + impl::collection_version::iterator_type(*container), + m_current(container->get_container().begin()), + m_end(container->get_container().end()) + { + m_owner.copy_from(container); + } + + Windows::Foundation::IInspectable Current() const + { + if (m_current == m_end) + { + throw hresult_out_of_bounds(); + } + + return box_value(*m_current); + } + + bool HasCurrent() const noexcept + { + return m_current != m_end; + } + + bool MoveNext() noexcept + { + if (m_current != m_end) + { + ++m_current; + } + + return HasCurrent(); + } + + uint32_t GetMany(array_view values) + { + uint32_t const actual = (std::min)(static_cast(std::distance(m_current, m_end)), values.size()); + + std::transform(m_current, m_current + actual, values.begin(), [&](auto && value) + { + return box_value(value); + }); + + std::advance(m_current, actual); + return actual; + } + + private: + + com_ptr m_owner; + decltype(m_owner->get_container().begin()) m_current; + decltype(m_owner->get_container().end()) const m_end; + }; + + Container m_values; + }; +} + +namespace winrt +{ + template > + Windows::Foundation::Collections::IVector single_threaded_vector(std::vector&& values = {}) + { + return make>>(std::move(values)); + } + + template > + Windows::Foundation::Collections::IObservableVector single_threaded_observable_vector(std::vector&& values = {}) + { + if constexpr (std::is_same_v) + { + return make>>(std::move(values)); + } + else + { + return make>>(std::move(values)); + } + } +} + +namespace winrt::impl +{ + template + struct observable_map : + implements, wfc::IObservableMap, wfc::IMap, wfc::IMapView, wfc::IIterable>>, + observable_map_base, K, V> + { + static_assert(std::is_same_v>, "Must be constructed with rvalue."); + + explicit observable_map(Container&& values) : m_values(std::forward(values)) + { + } + + auto& get_container() noexcept + { + return m_values; + } + + auto& get_container() const noexcept + { + return m_values; + } + + private: + + Container m_values; + }; +} + +namespace winrt +{ + template , typename Allocator = std::allocator>> + Windows::Foundation::Collections::IMap single_threaded_map() + { + return make>>(std::map{}); + } + + template , typename Allocator = std::allocator>> + Windows::Foundation::Collections::IMap single_threaded_map(std::map&& values) + { + return make>>(std::move(values)); + } + + template , typename KeyEqual = std::equal_to, typename Allocator = std::allocator>> + Windows::Foundation::Collections::IMap single_threaded_map(std::unordered_map&& values) + { + return make>>(std::move(values)); + } + + template , typename Allocator = std::allocator>> + Windows::Foundation::Collections::IObservableMap single_threaded_observable_map() + { + return make>>(std::map{}); + } + + template , typename Allocator = std::allocator>> + Windows::Foundation::Collections::IObservableMap single_threaded_observable_map(std::map&& values) + { + return make>>(std::move(values)); + } + + template , typename KeyEqual = std::equal_to, typename Allocator = std::allocator>> + Windows::Foundation::Collections::IObservableMap single_threaded_observable_map(std::unordered_map&& values) + { + return make>>(std::move(values)); + } +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.h new file mode 100644 index 00000000..067512dc --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.Foundation.h @@ -0,0 +1,3526 @@ +// C++/WinRT v2.0.190620.2 +// Patched with YoloRT + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright © 2021, mjk +// Licensed under the MIT License. + +#ifndef WINRT_Windows_Foundation_H +#define WINRT_Windows_Foundation_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "impl/Windows.Foundation.Collections.2.h" +#include "impl/Windows.Foundation.2.h" +namespace winrt::impl +{ + template auto consume_Windows_Foundation_IAsyncAction::Completed(Windows::Foundation::AsyncActionCompletedHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncAction)->put_Completed(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncAction::Completed() const + { + void* handler{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncAction)->get_Completed(&handler)); + return Windows::Foundation::AsyncActionCompletedHandler{ handler, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncAction::GetResults() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncAction)->GetResults()); + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::Progress(Windows::Foundation::AsyncActionProgressHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->put_Progress(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::Progress() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->get_Progress(&winrt_impl_result)); + return Windows::Foundation::AsyncActionProgressHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::Completed(Windows::Foundation::AsyncActionWithProgressCompletedHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->put_Completed(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::Completed() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->get_Completed(&winrt_impl_result)); + return Windows::Foundation::AsyncActionWithProgressCompletedHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncActionWithProgress::GetResults() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncActionWithProgress)->GetResults()); + } + template auto consume_Windows_Foundation_IAsyncInfo::Id() const + { + uint32_t winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->get_Id(&winrt_impl_result)); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IAsyncInfo::Status() const + { + Windows::Foundation::AsyncStatus winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->get_Status(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IAsyncInfo::ErrorCode() const + { + winrt::hresult winrt_impl_result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->get_ErrorCode(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IAsyncInfo::Cancel() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->Cancel()); + } + template auto consume_Windows_Foundation_IAsyncInfo::Close() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncInfo)->Close()); + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::Progress(Windows::Foundation::AsyncOperationProgressHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->put_Progress(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::Progress() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->get_Progress(&winrt_impl_result)); + return Windows::Foundation::AsyncOperationProgressHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::Completed(Windows::Foundation::AsyncOperationWithProgressCompletedHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->put_Completed(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::Completed() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->get_Completed(&winrt_impl_result)); + return Windows::Foundation::AsyncOperationWithProgressCompletedHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncOperationWithProgress::GetResults() const + { + TResult winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperationWithProgress)->GetResults(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IAsyncOperation::Completed(Windows::Foundation::AsyncOperationCompletedHandler const& handler) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperation)->put_Completed(*(void**)(&handler))); + } + template auto consume_Windows_Foundation_IAsyncOperation::Completed() const + { + void* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperation)->get_Completed(&winrt_impl_result)); + return Windows::Foundation::AsyncOperationCompletedHandler{ winrt_impl_result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IAsyncOperation::GetResults() const + { + TResult winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IAsyncOperation)->GetResults(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IClosable::Close() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IClosable)->Close()); + } + template auto consume_Windows_Foundation_IDeferral::Complete() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IDeferral)->Complete()); + } + template auto consume_Windows_Foundation_IDeferralFactory::Create(Windows::Foundation::DeferralCompletedHandler const& handler) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IDeferralFactory)->Create(*(void**)(&handler), &result)); + return Windows::Foundation::Deferral{ result, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IGetActivationFactory::GetActivationFactory(param::hstring const& activatableClassId) const + { + void* factory{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IGetActivationFactory)->GetActivationFactory(*(void**)(&activatableClassId), &factory)); + return Windows::Foundation::IInspectable{ factory, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IGuidHelperStatics::CreateNewGuid() const + { + winrt::guid result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IGuidHelperStatics)->CreateNewGuid(put_abi(result))); + return result; + } + template auto consume_Windows_Foundation_IGuidHelperStatics::Empty() const + { + winrt::guid value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IGuidHelperStatics)->get_Empty(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IGuidHelperStatics::Equals(winrt::guid const& target, winrt::guid const& value) const + { + bool result; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IGuidHelperStatics)->Equals(impl::bind_in(target), impl::bind_in(value), &result)); + return result; + } + template auto consume_Windows_Foundation_IMemoryBuffer::CreateReference() const + { + void* reference{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBuffer)->CreateReference(&reference)); + return Windows::Foundation::IMemoryBufferReference{ reference, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IMemoryBufferFactory::Create(uint32_t capacity) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBufferFactory)->Create(capacity, &value)); + return Windows::Foundation::MemoryBuffer{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IMemoryBufferReference::Capacity() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBufferReference)->get_Capacity(&value)); + return value; + } + template auto consume_Windows_Foundation_IMemoryBufferReference::Closed(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token cookie; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBufferReference)->add_Closed(*(void**)(&handler), put_abi(cookie))); + return cookie; + } + template typename consume_Windows_Foundation_IMemoryBufferReference::Closed_revoker consume_Windows_Foundation_IMemoryBufferReference::Closed(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, Closed(handler)); + } + template auto consume_Windows_Foundation_IMemoryBufferReference::Closed(winrt::event_token const& cookie) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::Foundation::IMemoryBufferReference)->remove_Closed(impl::bind_in(cookie))); + } + template auto consume_Windows_Foundation_IPropertyValue::Type() const + { + Windows::Foundation::PropertyType value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->get_Type(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::IsNumericScalar() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->get_IsNumericScalar(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt8() const + { + uint8_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt8(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt16() const + { + int16_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt16(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt16() const + { + uint16_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt16(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt32() const + { + int32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt32(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt32() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt32(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt64() const + { + int64_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt64(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt64() const + { + uint64_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt64(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetSingle() const + { + float value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetSingle(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetDouble() const + { + double value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetDouble(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetChar16() const + { + char16_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetChar16(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetBoolean() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetBoolean(&value)); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetString() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetString(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValue::GetGuid() const + { + winrt::guid value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetGuid(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetDateTime() const + { + Windows::Foundation::DateTime value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetDateTime(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetTimeSpan() const + { + Windows::Foundation::TimeSpan value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetTimeSpan(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetPoint() const + { + Windows::Foundation::Point value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetPoint(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetSize() const + { + Windows::Foundation::Size value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetSize(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetRect() const + { + Windows::Foundation::Rect value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetRect(put_abi(value))); + return value; + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt8Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt8Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt16Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt16Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt16Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt16Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt32Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt32Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt32Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt32Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetInt64Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInt64Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetUInt64Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetUInt64Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetSingleArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetSingleArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetDoubleArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetDoubleArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetChar16Array(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetChar16Array(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetBooleanArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetBooleanArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetStringArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetStringArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetInspectableArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetInspectableArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetGuidArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetGuidArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetDateTimeArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetDateTimeArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetTimeSpanArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetTimeSpanArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetPointArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetPointArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetSizeArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetSizeArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValue::GetRectArray(com_array& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValue)->GetRectArray(impl::put_size_abi(value), put_abi(value))); + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateEmpty() const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateEmpty(&propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt8(uint8_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt8(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt16(int16_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt16(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt16(uint16_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt16(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt32(int32_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt32(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt32(uint32_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt32(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt64(int64_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt64(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt64(uint64_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt64(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateSingle(float value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateSingle(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateDouble(double value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateDouble(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateChar16(char16_t value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateChar16(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateBoolean(bool value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateBoolean(value, &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateString(param::hstring const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateString(*(void**)(&value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInspectable(Windows::Foundation::IInspectable const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInspectable(*(void**)(&value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateGuid(winrt::guid const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateGuid(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateDateTime(Windows::Foundation::DateTime const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateDateTime(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateTimeSpan(Windows::Foundation::TimeSpan const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateTimeSpan(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreatePoint(Windows::Foundation::Point const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreatePoint(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateSize(Windows::Foundation::Size const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateSize(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateRect(Windows::Foundation::Rect const& value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateRect(impl::bind_in(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt8Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt8Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt16Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt16Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt16Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt16Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt32Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt32Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt32Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt32Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInt64Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInt64Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateUInt64Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateUInt64Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateSingleArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateSingleArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateDoubleArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateDoubleArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateChar16Array(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateChar16Array(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateBooleanArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateBooleanArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateStringArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateStringArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateInspectableArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateInspectableArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateGuidArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateGuidArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateDateTimeArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateDateTimeArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateTimeSpanArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateTimeSpanArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreatePointArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreatePointArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateSizeArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateSizeArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IPropertyValueStatics::CreateRectArray(array_view value) const + { + void* propertyValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IPropertyValueStatics)->CreateRectArray(value.size(), get_abi(value), &propertyValue)); + return Windows::Foundation::IInspectable{ propertyValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IReferenceArray::Value() const + { + uint32_t winrt_impl_result_impl_size{}; + T* winrt_impl_result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IReferenceArray)->get_Value(&winrt_impl_result_impl_size, &winrt_impl_result)); + return com_array{ winrt_impl_result, winrt_impl_result_impl_size, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IReference::Value() const + { + T winrt_impl_result{ empty_value() }; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IReference)->get_Value(put_abi(winrt_impl_result))); + return winrt_impl_result; + } + template auto consume_Windows_Foundation_IStringable::ToString() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IStringable)->ToString(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriEscapeStatics::UnescapeComponent(param::hstring const& toUnescape) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriEscapeStatics)->UnescapeComponent(*(void**)(&toUnescape), &value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriEscapeStatics::EscapeComponent(param::hstring const& toEscape) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriEscapeStatics)->EscapeComponent(*(void**)(&toEscape), &value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::AbsoluteUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_AbsoluteUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::DisplayUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_DisplayUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Domain() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Domain(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Extension() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Extension(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Fragment() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Fragment(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Host() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Host(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Password() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Password(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Path() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Path(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Query() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Query(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::QueryParsed() const + { + void* ppWwwFormUrlDecoder{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_QueryParsed(&ppWwwFormUrlDecoder)); + return Windows::Foundation::WwwFormUrlDecoder{ ppWwwFormUrlDecoder, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::RawUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_RawUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::SchemeName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_SchemeName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::UserName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_UserName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Port() const + { + int32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Port(&value)); + return value; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Suspicious() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->get_Suspicious(&value)); + return value; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::Equals(Windows::Foundation::Uri const& pUri) const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->Equals(*(void**)(&pUri), &value)); + return value; + } + template auto consume_Windows_Foundation_IUriRuntimeClass::CombineUri(param::hstring const& relativeUri) const + { + void* instance{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClass)->CombineUri(*(void**)(&relativeUri), &instance)); + return Windows::Foundation::Uri{ instance, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClassFactory::CreateUri(param::hstring const& uri) const + { + void* instance{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClassFactory)->CreateUri(*(void**)(&uri), &instance)); + return Windows::Foundation::Uri{ instance, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClassFactory::CreateWithRelativeUri(param::hstring const& baseUri, param::hstring const& relativeUri) const + { + void* instance{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClassFactory)->CreateWithRelativeUri(*(void**)(&baseUri), *(void**)(&relativeUri), &instance)); + return Windows::Foundation::Uri{ instance, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClassWithAbsoluteCanonicalUri::AbsoluteCanonicalUri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClassWithAbsoluteCanonicalUri)->get_AbsoluteCanonicalUri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IUriRuntimeClassWithAbsoluteCanonicalUri::DisplayIri() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IUriRuntimeClassWithAbsoluteCanonicalUri)->get_DisplayIri(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IWwwFormUrlDecoderEntry::Name() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IWwwFormUrlDecoderEntry)->get_Name(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IWwwFormUrlDecoderEntry::Value() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IWwwFormUrlDecoderEntry)->get_Value(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IWwwFormUrlDecoderRuntimeClass::GetFirstValueByName(param::hstring const& name) const + { + void* phstrValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IWwwFormUrlDecoderRuntimeClass)->GetFirstValueByName(*(void**)(&name), &phstrValue)); + return hstring{ phstrValue, take_ownership_from_abi }; + } + template auto consume_Windows_Foundation_IWwwFormUrlDecoderRuntimeClassFactory::CreateWwwFormUrlDecoder(param::hstring const& query) const + { + void* instance{}; + check_hresult(WINRT_IMPL_SHIM(Windows::Foundation::IWwwFormUrlDecoderRuntimeClassFactory)->CreateWwwFormUrlDecoder(*(void**)(&query), &instance)); + return Windows::Foundation::WwwFormUrlDecoder{ instance, take_ownership_from_abi }; + } + template struct delegate : implements_delegate + { + delegate(H&& handler) : implements_delegate(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, int32_t asyncStatus) noexcept final try + { + (*this)(*reinterpret_cast(&asyncInfo), *reinterpret_cast(&asyncStatus)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, arg_in progressInfo) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&progressInfo)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, int32_t asyncStatus) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&asyncStatus)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, int32_t asyncStatus) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&asyncStatus)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, arg_in progressInfo) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&progressInfo)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* asyncInfo, int32_t asyncStatus) noexcept final try + { + (*this)(*reinterpret_cast const*>(&asyncInfo), *reinterpret_cast(&asyncStatus)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate : implements_delegate + { + delegate(H&& handler) : implements_delegate(std::forward(handler)) {} + + int32_t __stdcall Invoke() noexcept final try + { + (*this)(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(void* sender, arg_in args) noexcept final try + { + (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&args)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template struct delegate, H> : implements_delegate, H> + { + delegate(H&& handler) : implements_delegate, H>(std::forward(handler)) {} + + int32_t __stdcall Invoke(arg_in sender, arg_in args) noexcept final try + { + (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&args)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall put_Completed(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Completed(*reinterpret_cast(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Completed(void** handler) noexcept final try + { + clear_abi(handler); + typename D::abi_guard guard(this->shim()); + *handler = detach_from(this->shim().Completed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetResults() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().GetResults(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall put_Progress(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Progress(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Progress(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Progress()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Completed(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Completed(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Completed(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Completed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetResults() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().GetResults(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Id(uint32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Status(int32_t* winrt_impl_result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Status()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ErrorCode(winrt::hresult* winrt_impl_result) noexcept final try + { + zero_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().ErrorCode()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Cancel() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Cancel(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Close() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Close(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall put_Progress(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Progress(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Progress(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Progress()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Completed(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Completed(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Completed(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Completed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetResults(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetResults()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall put_Completed(void* handler) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Completed(*reinterpret_cast const*>(&handler)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Completed(void** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from>(this->shim().Completed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetResults(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().GetResults()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Close() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Close(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Complete() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Complete(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Create(void* handler, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().Create(*reinterpret_cast(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetActivationFactory(void* activatableClassId, void** factory) noexcept final try + { + clear_abi(factory); + typename D::abi_guard guard(this->shim()); + *factory = detach_from(this->shim().GetActivationFactory(*reinterpret_cast(&activatableClassId))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateNewGuid(winrt::guid* result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateNewGuid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Empty(winrt::guid* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Empty()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Equals(winrt::guid const& target, winrt::guid const& value, bool* result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().Equals(*reinterpret_cast(&target), *reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateReference(void** reference) noexcept final try + { + clear_abi(reference); + typename D::abi_guard guard(this->shim()); + *reference = detach_from(this->shim().CreateReference()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Create(uint32_t capacity, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Create(capacity)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Capacity(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Capacity()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall add_Closed(void* handler, winrt::event_token* cookie) noexcept final try + { + zero_abi(cookie); + typename D::abi_guard guard(this->shim()); + *cookie = detach_from(this->shim().Closed(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_Closed(winrt::event_token cookie) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().Closed(*reinterpret_cast(&cookie)); + return 0; + } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Type(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Type()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_IsNumericScalar(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().IsNumericScalar()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt8(uint8_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetUInt8()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt16(int16_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetInt16()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt16(uint16_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetUInt16()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt32(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetInt32()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt32(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetUInt32()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt64(int64_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetInt64()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt64(uint64_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetUInt64()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetSingle(float* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetSingle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDouble(double* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetDouble()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetChar16(char16_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetChar16()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetBoolean(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetBoolean()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetString(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetString()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetGuid(winrt::guid* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetGuid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDateTime(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetDateTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTimeSpan(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetTimeSpan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetPoint(Windows::Foundation::Point* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetPoint()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetSize(Windows::Foundation::Size* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetSize()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetRect(Windows::Foundation::Rect* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GetRect()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt8Array(uint32_t* __valueSize, uint8_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetUInt8Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt16Array(uint32_t* __valueSize, int16_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetInt16Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt16Array(uint32_t* __valueSize, uint16_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetUInt16Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt32Array(uint32_t* __valueSize, int32_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetInt32Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt32Array(uint32_t* __valueSize, uint32_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetUInt32Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInt64Array(uint32_t* __valueSize, int64_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetInt64Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetUInt64Array(uint32_t* __valueSize, uint64_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetUInt64Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetSingleArray(uint32_t* __valueSize, float** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetSingleArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDoubleArray(uint32_t* __valueSize, double** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetDoubleArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetChar16Array(uint32_t* __valueSize, char16_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetChar16Array(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetBooleanArray(uint32_t* __valueSize, bool** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetBooleanArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetStringArray(uint32_t* __valueSize, void*** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetStringArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetInspectableArray(uint32_t* __valueSize, void*** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetInspectableArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetGuidArray(uint32_t* __valueSize, winrt::guid** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetGuidArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDateTimeArray(uint32_t* __valueSize, int64_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetDateTimeArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTimeSpanArray(uint32_t* __valueSize, int64_t** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetTimeSpanArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetPointArray(uint32_t* __valueSize, Windows::Foundation::Point** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetPointArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetSizeArray(uint32_t* __valueSize, Windows::Foundation::Size** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetSizeArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetRectArray(uint32_t* __valueSize, Windows::Foundation::Rect** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + this->shim().GetRectArray(detach_abi(__valueSize, value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateEmpty(void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateEmpty()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt8(uint8_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt8(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt16(int16_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt16(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt16(uint16_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt16(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt32(int32_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt32(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt32(uint32_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt32(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt64(int64_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt64(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt64(uint64_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt64(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateSingle(float value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateSingle(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDouble(double value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateDouble(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateChar16(char16_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateChar16(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBoolean(bool value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateBoolean(value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateString(void* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateString(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInspectable(void* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInspectable(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateGuid(winrt::guid value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateGuid(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDateTime(int64_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateDateTime(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTimeSpan(int64_t value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateTimeSpan(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreatePoint(Windows::Foundation::Point value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreatePoint(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateSize(Windows::Foundation::Size value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateSize(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateRect(Windows::Foundation::Rect value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateRect(*reinterpret_cast(&value))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt8Array(uint32_t __valueSize, uint8_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt8Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt16Array(uint32_t __valueSize, int16_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt16Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt16Array(uint32_t __valueSize, uint16_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt16Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt32Array(uint32_t __valueSize, int32_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt32Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt32Array(uint32_t __valueSize, uint32_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt32Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInt64Array(uint32_t __valueSize, int64_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInt64Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateUInt64Array(uint32_t __valueSize, uint64_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateUInt64Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateSingleArray(uint32_t __valueSize, float* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateSingleArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDoubleArray(uint32_t __valueSize, double* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateDoubleArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateChar16Array(uint32_t __valueSize, char16_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateChar16Array(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBooleanArray(uint32_t __valueSize, bool* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateBooleanArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateStringArray(uint32_t __valueSize, void** value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateStringArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateInspectableArray(uint32_t __valueSize, void** value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateInspectableArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateGuidArray(uint32_t __valueSize, winrt::guid* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateGuidArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateDateTimeArray(uint32_t __valueSize, int64_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateDateTimeArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTimeSpanArray(uint32_t __valueSize, int64_t* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateTimeSpanArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreatePointArray(uint32_t __valueSize, Windows::Foundation::Point* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreatePointArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateSizeArray(uint32_t __valueSize, Windows::Foundation::Size* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateSizeArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateRectArray(uint32_t __valueSize, Windows::Foundation::Rect* value, void** propertyValue) noexcept final try + { + clear_abi(propertyValue); + typename D::abi_guard guard(this->shim()); + *propertyValue = detach_from(this->shim().CreateRectArray(array_view(reinterpret_cast(value), reinterpret_cast(value) + __valueSize))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_Value(uint32_t* __winrt_impl_resultSize, T** winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + std::tie(*__winrt_impl_resultSize, *winrt_impl_result) = detach_abi(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce> : produce_base> + { + int32_t __stdcall get_Value(arg_out winrt_impl_result) noexcept final try + { + clear_abi(winrt_impl_result); + typename D::abi_guard guard(this->shim()); + *winrt_impl_result = detach_from(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall ToString(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ToString()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall UnescapeComponent(void* toUnescape, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UnescapeComponent(*reinterpret_cast(&toUnescape))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall EscapeComponent(void* toEscape, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().EscapeComponent(*reinterpret_cast(&toEscape))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_AbsoluteUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AbsoluteUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DisplayUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DisplayUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Domain(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Domain()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Extension(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Extension()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Fragment(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Fragment()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Host(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Host()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Password(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Password()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Path(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Path()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Query(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Query()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_QueryParsed(void** ppWwwFormUrlDecoder) noexcept final try + { + clear_abi(ppWwwFormUrlDecoder); + typename D::abi_guard guard(this->shim()); + *ppWwwFormUrlDecoder = detach_from(this->shim().QueryParsed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RawUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RawUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SchemeName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SchemeName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_UserName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UserName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Port(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Port()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Suspicious(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Suspicious()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Equals(void* pUri, bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Equals(*reinterpret_cast(&pUri))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CombineUri(void* relativeUri, void** instance) noexcept final try + { + clear_abi(instance); + typename D::abi_guard guard(this->shim()); + *instance = detach_from(this->shim().CombineUri(*reinterpret_cast(&relativeUri))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateUri(void* uri, void** instance) noexcept final try + { + clear_abi(instance); + typename D::abi_guard guard(this->shim()); + *instance = detach_from(this->shim().CreateUri(*reinterpret_cast(&uri))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateWithRelativeUri(void* baseUri, void* relativeUri, void** instance) noexcept final try + { + clear_abi(instance); + typename D::abi_guard guard(this->shim()); + *instance = detach_from(this->shim().CreateWithRelativeUri(*reinterpret_cast(&baseUri), *reinterpret_cast(&relativeUri))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_AbsoluteCanonicalUri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AbsoluteCanonicalUri()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DisplayIri(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DisplayIri()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Name(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Name()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Value(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Value()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetFirstValueByName(void* name, void** phstrValue) noexcept final try + { + clear_abi(phstrValue); + typename D::abi_guard guard(this->shim()); + *phstrValue = detach_from(this->shim().GetFirstValueByName(*reinterpret_cast(&name))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateWwwFormUrlDecoder(void* query, void** instance) noexcept final try + { + clear_abi(instance); + typename D::abi_guard guard(this->shim()); + *instance = detach_from(this->shim().CreateWwwFormUrlDecoder(*reinterpret_cast(&query))); + return 0; + } + catch (...) { return to_hresult(); } + }; +} +namespace winrt::Windows::Foundation +{ + inline Deferral::Deferral(Windows::Foundation::DeferralCompletedHandler const& handler) : + Deferral(impl::call_factory([&](auto&& f) { return f.Create(handler); })) + { + } + inline auto GuidHelper::CreateNewGuid() + { + return impl::call_factory([&](auto&& f) { return f.CreateNewGuid(); }); + } + inline auto GuidHelper::Empty() + { + return impl::call_factory([&](auto&& f) { return f.Empty(); }); + } + inline auto GuidHelper::Equals(winrt::guid const& target, winrt::guid const& value) + { + return impl::call_factory([&](auto&& f) { return f.Equals(target, value); }); + } + inline MemoryBuffer::MemoryBuffer(uint32_t capacity) : + MemoryBuffer(impl::call_factory([&](auto&& f) { return f.Create(capacity); })) + { + } + inline auto PropertyValue::CreateEmpty() + { + return impl::call_factory([&](auto&& f) { return f.CreateEmpty(); }); + } + inline auto PropertyValue::CreateUInt8(uint8_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt8(value); }); + } + inline auto PropertyValue::CreateInt16(int16_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt16(value); }); + } + inline auto PropertyValue::CreateUInt16(uint16_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt16(value); }); + } + inline auto PropertyValue::CreateInt32(int32_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt32(value); }); + } + inline auto PropertyValue::CreateUInt32(uint32_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt32(value); }); + } + inline auto PropertyValue::CreateInt64(int64_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt64(value); }); + } + inline auto PropertyValue::CreateUInt64(uint64_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt64(value); }); + } + inline auto PropertyValue::CreateSingle(float value) + { + return impl::call_factory([&](auto&& f) { return f.CreateSingle(value); }); + } + inline auto PropertyValue::CreateDouble(double value) + { + return impl::call_factory([&](auto&& f) { return f.CreateDouble(value); }); + } + inline auto PropertyValue::CreateChar16(char16_t value) + { + return impl::call_factory([&](auto&& f) { return f.CreateChar16(value); }); + } + inline auto PropertyValue::CreateBoolean(bool value) + { + return impl::call_factory([&](auto&& f) { return f.CreateBoolean(value); }); + } + inline auto PropertyValue::CreateString(param::hstring const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateString(value); }); + } + inline auto PropertyValue::CreateInspectable(Windows::Foundation::IInspectable const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInspectable(value); }); + } + inline auto PropertyValue::CreateGuid(winrt::guid const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateGuid(value); }); + } + inline auto PropertyValue::CreateDateTime(Windows::Foundation::DateTime const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateDateTime(value); }); + } + inline auto PropertyValue::CreateTimeSpan(Windows::Foundation::TimeSpan const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateTimeSpan(value); }); + } + inline auto PropertyValue::CreatePoint(Windows::Foundation::Point const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreatePoint(value); }); + } + inline auto PropertyValue::CreateSize(Windows::Foundation::Size const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateSize(value); }); + } + inline auto PropertyValue::CreateRect(Windows::Foundation::Rect const& value) + { + return impl::call_factory([&](auto&& f) { return f.CreateRect(value); }); + } + inline auto PropertyValue::CreateUInt8Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt8Array(value); }); + } + inline auto PropertyValue::CreateInt16Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt16Array(value); }); + } + inline auto PropertyValue::CreateUInt16Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt16Array(value); }); + } + inline auto PropertyValue::CreateInt32Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt32Array(value); }); + } + inline auto PropertyValue::CreateUInt32Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt32Array(value); }); + } + inline auto PropertyValue::CreateInt64Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInt64Array(value); }); + } + inline auto PropertyValue::CreateUInt64Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateUInt64Array(value); }); + } + inline auto PropertyValue::CreateSingleArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateSingleArray(value); }); + } + inline auto PropertyValue::CreateDoubleArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateDoubleArray(value); }); + } + inline auto PropertyValue::CreateChar16Array(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateChar16Array(value); }); + } + inline auto PropertyValue::CreateBooleanArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateBooleanArray(value); }); + } + inline auto PropertyValue::CreateStringArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateStringArray(value); }); + } + inline auto PropertyValue::CreateInspectableArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateInspectableArray(value); }); + } + inline auto PropertyValue::CreateGuidArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateGuidArray(value); }); + } + inline auto PropertyValue::CreateDateTimeArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateDateTimeArray(value); }); + } + inline auto PropertyValue::CreateTimeSpanArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateTimeSpanArray(value); }); + } + inline auto PropertyValue::CreatePointArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreatePointArray(value); }); + } + inline auto PropertyValue::CreateSizeArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateSizeArray(value); }); + } + inline auto PropertyValue::CreateRectArray(array_view value) + { + return impl::call_factory([&](auto&& f) { return f.CreateRectArray(value); }); + } + inline auto Uri::UnescapeComponent(param::hstring const& toUnescape) + { + return impl::call_factory([&](auto&& f) { return f.UnescapeComponent(toUnescape); }); + } + inline auto Uri::EscapeComponent(param::hstring const& toEscape) + { + return impl::call_factory([&](auto&& f) { return f.EscapeComponent(toEscape); }); + } + inline Uri::Uri(param::hstring const& uri) : + Uri(impl::call_factory([&](auto&& f) { return f.CreateUri(uri); })) + { + } + inline Uri::Uri(param::hstring const& baseUri, param::hstring const& relativeUri) : + Uri(impl::call_factory([&](auto&& f) { return f.CreateWithRelativeUri(baseUri, relativeUri); })) + { + } + inline WwwFormUrlDecoder::WwwFormUrlDecoder(param::hstring const& query) : + WwwFormUrlDecoder(impl::call_factory([&](auto&& f) { return f.CreateWwwFormUrlDecoder(query); })) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(L handler) : + AsyncActionCompletedHandler(impl::make_delegate(std::forward(handler))) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(F* handler) : + AsyncActionCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(O* object, M method) : + AsyncActionCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(com_ptr&& object, M method) : + AsyncActionCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template AsyncActionCompletedHandler::AsyncActionCompletedHandler(weak_ref&& object, M method) : + AsyncActionCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + inline auto AsyncActionCompletedHandler::operator()(Windows::Foundation::IAsyncAction const& asyncInfo, Windows::Foundation::AsyncStatus const& asyncStatus) const + { + check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&asyncInfo), static_cast(asyncStatus))); + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(L handler) : + AsyncActionProgressHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(F* handler) : + AsyncActionProgressHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(O* object, M method) : + AsyncActionProgressHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(com_ptr&& object, M method) : + AsyncActionProgressHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncActionProgressHandler::AsyncActionProgressHandler(weak_ref&& object, M method) : + AsyncActionProgressHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncActionProgressHandler::operator()(Windows::Foundation::IAsyncActionWithProgress const& asyncInfo, impl::param_type const& progressInfo) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), impl::bind_in(progressInfo))); + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(L handler) : + AsyncActionWithProgressCompletedHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(F* handler) : + AsyncActionWithProgressCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(O* object, M method) : + AsyncActionWithProgressCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(com_ptr&& object, M method) : + AsyncActionWithProgressCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncActionWithProgressCompletedHandler::AsyncActionWithProgressCompletedHandler(weak_ref&& object, M method) : + AsyncActionWithProgressCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncActionWithProgressCompletedHandler::operator()(Windows::Foundation::IAsyncActionWithProgress const& asyncInfo, Windows::Foundation::AsyncStatus const& asyncStatus) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), static_cast(asyncStatus))); + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(L handler) : + AsyncOperationCompletedHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(F* handler) : + AsyncOperationCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(O* object, M method) : + AsyncOperationCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(com_ptr&& object, M method) : + AsyncOperationCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncOperationCompletedHandler::AsyncOperationCompletedHandler(weak_ref&& object, M method) : + AsyncOperationCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncOperationCompletedHandler::operator()(Windows::Foundation::IAsyncOperation const& asyncInfo, Windows::Foundation::AsyncStatus const& asyncStatus) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), static_cast(asyncStatus))); + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(L handler) : + AsyncOperationProgressHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(F* handler) : + AsyncOperationProgressHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(O* object, M method) : + AsyncOperationProgressHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(com_ptr&& object, M method) : + AsyncOperationProgressHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncOperationProgressHandler::AsyncOperationProgressHandler(weak_ref&& object, M method) : + AsyncOperationProgressHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncOperationProgressHandler::operator()(Windows::Foundation::IAsyncOperationWithProgress const& asyncInfo, impl::param_type const& progressInfo) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), impl::bind_in(progressInfo))); + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(L handler) : + AsyncOperationWithProgressCompletedHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(F* handler) : + AsyncOperationWithProgressCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(O* object, M method) : + AsyncOperationWithProgressCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(com_ptr&& object, M method) : + AsyncOperationWithProgressCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template AsyncOperationWithProgressCompletedHandler::AsyncOperationWithProgressCompletedHandler(weak_ref&& object, M method) : + AsyncOperationWithProgressCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto AsyncOperationWithProgressCompletedHandler::operator()(Windows::Foundation::IAsyncOperationWithProgress const& asyncInfo, Windows::Foundation::AsyncStatus const& asyncStatus) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&asyncInfo), static_cast(asyncStatus))); + } + template DeferralCompletedHandler::DeferralCompletedHandler(L handler) : + DeferralCompletedHandler(impl::make_delegate(std::forward(handler))) + { + } + template DeferralCompletedHandler::DeferralCompletedHandler(F* handler) : + DeferralCompletedHandler([=](auto&&... args) { return handler(args...); }) + { + } + template DeferralCompletedHandler::DeferralCompletedHandler(O* object, M method) : + DeferralCompletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template DeferralCompletedHandler::DeferralCompletedHandler(com_ptr&& object, M method) : + DeferralCompletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template DeferralCompletedHandler::DeferralCompletedHandler(weak_ref&& object, M method) : + DeferralCompletedHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + inline auto DeferralCompletedHandler::operator()() const + { + check_hresult((*(impl::abi_t**)this)->Invoke()); + } + template template EventHandler::EventHandler(L handler) : + EventHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template EventHandler::EventHandler(F* handler) : + EventHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template EventHandler::EventHandler(O* object, M method) : + EventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template EventHandler::EventHandler(com_ptr&& object, M method) : + EventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template EventHandler::EventHandler(weak_ref&& object, M method) : + EventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto EventHandler::operator()(Windows::Foundation::IInspectable const& sender, impl::param_type const& args) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(*(void**)(&sender), impl::bind_in(args))); + } + template template TypedEventHandler::TypedEventHandler(L handler) : + TypedEventHandler(impl::make_delegate>(std::forward(handler))) + { + } + template template TypedEventHandler::TypedEventHandler(F* handler) : + TypedEventHandler([=](auto&&... args) { return handler(args...); }) + { + } + template template TypedEventHandler::TypedEventHandler(O* object, M method) : + TypedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) + { + } + template template TypedEventHandler::TypedEventHandler(com_ptr&& object, M method) : + TypedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) + { + } + template template TypedEventHandler::TypedEventHandler(weak_ref&& object, M method) : + TypedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } }) + { + } + template auto TypedEventHandler::operator()(impl::param_type const& sender, impl::param_type const& args) const + { + check_hresult((*(impl::abi_t>**)this)->Invoke(impl::bind_in(sender), impl::bind_in(args))); + } +} +namespace std +{ + template<> struct hash : winrt::impl::hash_base {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template struct hash> : winrt::impl::hash_base> {}; + template struct hash> : winrt::impl::hash_base> {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} + +namespace winrt::impl +{ + template + struct reference : implements, Windows::Foundation::IReference, Windows::Foundation::IPropertyValue> + { + reference(T const& value) : m_value(value) + { + } + + T Value() const + { + return m_value; + } + + Windows::Foundation::PropertyType Type() const noexcept + { + return Windows::Foundation::PropertyType::OtherType; + } + + static constexpr bool IsNumericScalar() noexcept + { + return std::is_arithmetic_v || std::is_enum_v; + } + + uint8_t GetUInt8() const + { + return to_scalar(); + } + + int16_t GetInt16() const + { + return to_scalar(); + } + + uint16_t GetUInt16() const + { + return to_scalar(); + } + + int32_t GetInt32() const + { + return to_scalar(); + } + + uint32_t GetUInt32() const + { + return to_scalar(); + } + + int64_t GetInt64() const + { + return to_scalar(); + } + + uint64_t GetUInt64() const + { + return to_scalar(); + } + + float GetSingle() { throw hresult_not_implemented(); } + double GetDouble() { throw hresult_not_implemented(); } + char16_t GetChar16() { throw hresult_not_implemented(); } + bool GetBoolean() { throw hresult_not_implemented(); } + hstring GetString() { throw hresult_not_implemented(); } + guid GetGuid() { throw hresult_not_implemented(); } + Windows::Foundation::DateTime GetDateTime() { throw hresult_not_implemented(); } + Windows::Foundation::TimeSpan GetTimeSpan() { throw hresult_not_implemented(); } + Windows::Foundation::Point GetPoint() { throw hresult_not_implemented(); } + Windows::Foundation::Size GetSize() { throw hresult_not_implemented(); } + Windows::Foundation::Rect GetRect() { throw hresult_not_implemented(); } + void GetUInt8Array(com_array &) { throw hresult_not_implemented(); } + void GetInt16Array(com_array &) { throw hresult_not_implemented(); } + void GetUInt16Array(com_array &) { throw hresult_not_implemented(); } + void GetInt32Array(com_array &) { throw hresult_not_implemented(); } + void GetUInt32Array(com_array &) { throw hresult_not_implemented(); } + void GetInt64Array(com_array &) { throw hresult_not_implemented(); } + void GetUInt64Array(com_array &) { throw hresult_not_implemented(); } + void GetSingleArray(com_array &) { throw hresult_not_implemented(); } + void GetDoubleArray(com_array &) { throw hresult_not_implemented(); } + void GetChar16Array(com_array &) { throw hresult_not_implemented(); } + void GetBooleanArray(com_array &) { throw hresult_not_implemented(); } + void GetStringArray(com_array &) { throw hresult_not_implemented(); } + void GetInspectableArray(com_array &) { throw hresult_not_implemented(); } + void GetGuidArray(com_array &) { throw hresult_not_implemented(); } + void GetDateTimeArray(com_array &) { throw hresult_not_implemented(); } + void GetTimeSpanArray(com_array &) { throw hresult_not_implemented(); } + void GetPointArray(com_array &) { throw hresult_not_implemented(); } + void GetSizeArray(com_array &) { throw hresult_not_implemented(); } + void GetRectArray(com_array &) { throw hresult_not_implemented(); } + + private: + + template + To to_scalar() const + { + if constexpr (IsNumericScalar()) + { + return static_cast(m_value); + } + else + { + throw hresult_not_implemented(); + } + } + + T m_value; + }; + + template + struct reference_traits + { + static auto make(T const& value) { return winrt::make>(value); } + }; + + template <> + struct reference_traits + { + static auto make(uint8_t value) { return Windows::Foundation::PropertyValue::CreateUInt8(value); } + }; + + template <> + struct reference_traits + { + static auto make(uint16_t value) { return Windows::Foundation::PropertyValue::CreateUInt16(value); } + }; + + template <> + struct reference_traits + { + static auto make(int16_t value) { return Windows::Foundation::PropertyValue::CreateInt16(value); } + }; + + template <> + struct reference_traits + { + static auto make(uint32_t value) { return Windows::Foundation::PropertyValue::CreateUInt32(value); } + }; + + template <> + struct reference_traits + { + static auto make(int32_t value) { return Windows::Foundation::PropertyValue::CreateInt32(value); } + }; + + template <> + struct reference_traits + { + static auto make(uint64_t value) { return Windows::Foundation::PropertyValue::CreateUInt64(value); } + }; + + template <> + struct reference_traits + { + static auto make(int64_t value) { return Windows::Foundation::PropertyValue::CreateInt64(value); } + }; + + template <> + struct reference_traits + { + static auto make(float value) { return Windows::Foundation::PropertyValue::CreateSingle(value); } + }; + + template <> + struct reference_traits + { + static auto make(double value) { return Windows::Foundation::PropertyValue::CreateDouble(value); } + }; + + template <> + struct reference_traits + { + static auto make(char16_t value) { return Windows::Foundation::PropertyValue::CreateChar16(value); } + }; + + template <> + struct reference_traits + { + static auto make(bool value) { return Windows::Foundation::PropertyValue::CreateBoolean(value); } + }; + + template <> + struct reference_traits + { + static auto make(hstring const& value) { return Windows::Foundation::PropertyValue::CreateString(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::IInspectable const& value) { return Windows::Foundation::PropertyValue::CreateInspectable(value); } + }; + + template <> + struct reference_traits + { + static auto make(guid const& value) { return Windows::Foundation::PropertyValue::CreateGuid(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::DateTime value) { return Windows::Foundation::PropertyValue::CreateDateTime(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::TimeSpan value) { return Windows::Foundation::PropertyValue::CreateTimeSpan(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::Point const& value) { return Windows::Foundation::PropertyValue::CreatePoint(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::Size const& value) { return Windows::Foundation::PropertyValue::CreateSize(value); } + }; + + template <> + struct reference_traits + { + static auto make(Windows::Foundation::Rect const& value) { return Windows::Foundation::PropertyValue::CreateRect(value); } + }; +} + +namespace winrt::Windows::Foundation +{ + template + bool operator==(IReference const& left, IReference const& right) + { + if (get_abi(left) == get_abi(right)) + { + return true; + } + + if (!left || !right) + { + return false; + } + + return left.Value() == right.Value(); + } + + template + bool operator!=(IReference const& left, IReference const& right) + { + return !(left == right); + } +} + +namespace winrt +{ + inline Windows::Foundation::IInspectable box_value(param::hstring const& value) + { + return Windows::Foundation::IReference(*(hstring*)(&value)); + } + + template >> + Windows::Foundation::IInspectable box_value(T const& value) + { + if constexpr (std::is_base_of_v) + { + return value; + } + else + { + return Windows::Foundation::IReference(value); + } + } + + template + T unbox_value(Windows::Foundation::IInspectable const& value) + { + if constexpr (std::is_base_of_v) + { + return value.as(); + } + else if constexpr (std::is_enum_v) + { + if (auto temp = value.try_as>()) + { + return temp.Value(); + } + else + { + return static_cast(value.as>>().Value()); + } + } + else + { + return value.as>().Value(); + } + } + + template + hstring unbox_value_or(Windows::Foundation::IInspectable const& value, param::hstring const& default_value) + { + if (value) + { + if (auto temp = value.try_as>()) + { + return temp.Value(); + } + } + + return *(hstring*)(&default_value); + } + + template >> + T unbox_value_or(Windows::Foundation::IInspectable const& value, T const& default_value) + { + if (value) + { + if constexpr (std::is_base_of_v) + { + if (auto temp = value.try_as()) + { + return temp; + } + } + else if constexpr (std::is_enum_v) + { + if (auto temp = value.try_as>()) + { + return temp.Value(); + } + + if (auto temp = value.try_as>>()) + { + return static_cast(temp.Value()); + } + } + else + { + if (auto temp = value.try_as>()) + { + return temp.Value(); + } + } + } + + return default_value; + } +} + +namespace winrt +{ + template + using optional = Windows::Foundation::IReference; +} + +namespace winrt::impl +{ + template + struct async_completed_handler; + + template + using async_completed_handler_t = typename async_completed_handler::type; + + template <> + struct async_completed_handler + { + using type = Windows::Foundation::AsyncActionCompletedHandler; + }; + + template + struct async_completed_handler> + { + using type = Windows::Foundation::AsyncActionWithProgressCompletedHandler; + }; + + template + struct async_completed_handler> + { + using type = Windows::Foundation::AsyncOperationCompletedHandler; + }; + + template + struct async_completed_handler> + { + using type = Windows::Foundation::AsyncOperationWithProgressCompletedHandler; + }; + + inline bool is_sta() noexcept + { + int32_t aptType; + int32_t aptTypeQualifier; + return (error_ok == CoGetApartmentType(&aptType, &aptTypeQualifier)) && ((aptType == 0 /*APTTYPE_STA*/) || (aptType == 3 /*APTTYPE_MAINSTA*/)); + } + + inline void check_sta_blocking_wait() noexcept + { + // Note: A blocking wait on the UI thread for an asynchronous operation can cause a deadlock. + // See https://docs.microsoft.com/windows/uwp/cpp-and-winrt-apis/concurrency#block-the-calling-thread + WINRT_ASSERT(!is_sta()); + } + + template + void wait_for_completed(Async const& async, uint32_t const timeout) + { + void* event = check_pointer(CreateEventW(nullptr, true, false, nullptr)); + + // The delegate is a local to ensure that the event outlives the call to WaitForSingleObject. + async_completed_handler_t delegate = [event = handle(event)](auto && ...) + { + WINRT_VERIFY(SetEvent(event.get())); + }; + + async.Completed(delegate); + WaitForSingleObject(event, timeout); + } + + template + auto wait_for(Async const& async, Windows::Foundation::TimeSpan const& timeout) + { + check_sta_blocking_wait(); + wait_for_completed(async, static_cast(std::chrono::duration_cast(timeout).count())); + return async.Status(); + } + + template + auto wait_get(Async const& async) + { + check_sta_blocking_wait(); + + if (async.Status() == Windows::Foundation::AsyncStatus::Started) + { + wait_for_completed(async, 0xFFFFFFFF); // INFINITE + } + + return async.GetResults(); + } + + template + struct await_adapter + { + Async const& async; + + bool await_ready() const + { + return async.Status() == Windows::Foundation::AsyncStatus::Completed; + } + + void await_suspend(winrt::impl::coroutine_handle<> handle) const + { + auto context = capture(CoGetObjectContext); + + async.Completed([handle, context = std::move(context)](auto const&, Windows::Foundation::AsyncStatus) + { + com_callback_args args{}; + args.data = handle.address(); + + auto callback = [](com_callback_args* args) noexcept -> int32_t + { + winrt::impl::coroutine_handle<>::from_address(args->data)(); + return error_ok; + }; + + check_hresult(context->ContextCallback(callback, &args, guid_of(), 5, nullptr)); + }); + } + + auto await_resume() const + { + return async.GetResults(); + } + }; +} + +#ifdef _RESUMABLE_FUNCTIONS_SUPPORTED +namespace winrt::Windows::Foundation +{ + inline impl::await_adapter operator co_await(IAsyncAction const& async) + { + return{ async }; + } + + template + impl::await_adapter> operator co_await(IAsyncActionWithProgress const& async) + { + return{ async }; + } + + template + impl::await_adapter> operator co_await(IAsyncOperation const& async) + { + return{ async }; + } + + template + impl::await_adapter> operator co_await(IAsyncOperationWithProgress const& async) + { + return{ async }; + } +} +#endif + +namespace winrt +{ + struct get_progress_token_t {}; + + inline get_progress_token_t get_progress_token() noexcept + { + return{}; + } + + struct get_cancellation_token_t {}; + + inline get_cancellation_token_t get_cancellation_token() noexcept + { + return{}; + } +} + +namespace winrt::impl +{ + template + struct cancellation_token + { + cancellation_token(Promise* promise) noexcept : m_promise(promise) + { + } + + bool await_ready() const noexcept + { + return true; + } + + void await_suspend(winrt::impl::coroutine_handle<>) const noexcept + { + } + + cancellation_token await_resume() const noexcept + { + return *this; + } + + bool operator()() const noexcept + { + return m_promise->Status() == Windows::Foundation::AsyncStatus::Canceled; + } + + void callback(winrt::delegate<>&& cancel) noexcept + { + m_promise->cancellation_callback(std::move(cancel)); + } + + private: + + Promise* m_promise; + }; + + template + struct progress_token + { + progress_token(Promise* promise) noexcept : + m_promise(promise) + { + } + + bool await_ready() const noexcept + { + return true; + } + + void await_suspend(winrt::impl::coroutine_handle<>) const noexcept + { + } + + progress_token await_resume() const noexcept + { + return *this; + } + + void operator()(Progress const& result) + { + m_promise->set_progress(result); + } + + private: + + Promise* m_promise; + }; + + template + struct promise_base : implements + { + using AsyncStatus = Windows::Foundation::AsyncStatus; + + unsigned long __stdcall Release() noexcept + { + uint32_t const remaining = this->subtract_reference(); + + if (remaining == 0) + { + std::atomic_thread_fence(std::memory_order_acquire); + winrt::impl::coroutine_handle::from_promise(*static_cast(this)).destroy(); + } + + return remaining; + } + + void Completed(async_completed_handler_t const& handler) + { + AsyncStatus status; + + { + slim_lock_guard const guard(m_lock); + + if (m_completed_assigned) + { + throw hresult_illegal_delegate_assignment(); + } + + m_completed_assigned = true; + + if (m_status == AsyncStatus::Started) + { + m_completed = make_agile_delegate(handler); + return; + } + + status = m_status; + } + + if (handler) + { + invoke(handler, *this, status); + } + } + + auto Completed() noexcept + { + slim_lock_guard const guard(m_lock); + return m_completed; + } + + uint32_t Id() const noexcept + { + return 1; + } + + AsyncStatus Status() noexcept + { + slim_lock_guard const guard(m_lock); + return m_status; + } + + hresult ErrorCode() noexcept + { + try + { + slim_lock_guard const guard(m_lock); + rethrow_if_failed(); + return error_ok; + } + catch (...) + { + return to_hresult(); + } + } + + void Cancel() noexcept + { + winrt::delegate<> cancel; + + { + slim_lock_guard const guard(m_lock); + + if (m_status == AsyncStatus::Started) + { + m_status = AsyncStatus::Canceled; + m_exception = std::make_exception_ptr(hresult_canceled()); + cancel = std::move(m_cancel); + } + } + + if (cancel) + { + cancel(); + } + } + + void Close() const noexcept + { + } + + auto GetResults() + { + slim_lock_guard const guard(m_lock); + + if (m_status == AsyncStatus::Completed) + { + return static_cast(this)->get_return_value(); + } + + rethrow_if_failed(); + WINRT_ASSERT(m_status == AsyncStatus::Started); + throw hresult_illegal_method_call(); + } + + AsyncInterface get_return_object() const noexcept + { + return *this; + } + + void get_return_value() const noexcept + { + } + + void set_completed() noexcept + { + async_completed_handler_t handler; + AsyncStatus status; + + { + slim_lock_guard const guard(m_lock); + + if (m_status == AsyncStatus::Started) + { + m_status = AsyncStatus::Completed; + } + + handler = std::move(this->m_completed); + status = this->m_status; + } + + if (handler) + { + invoke(handler, *this, status); + } + } + + winrt::impl::suspend_never initial_suspend() const noexcept + { + return{}; + } + + struct final_suspend_awaiter + { + promise_base* promise; + + bool await_ready() const noexcept + { + return false; + } + + void await_resume() const noexcept + { + } + + bool await_suspend(winrt::impl::coroutine_handle<>) const noexcept + { + promise->set_completed(); + uint32_t const remaining = promise->subtract_reference(); + + if (remaining == 0) + { + std::atomic_thread_fence(std::memory_order_acquire); + } + + return remaining > 0; + } + }; + + auto final_suspend() noexcept + { + return final_suspend_awaiter{ this }; + } + + void unhandled_exception() noexcept + { + slim_lock_guard const guard(m_lock); + WINRT_ASSERT(m_status == AsyncStatus::Started || m_status == AsyncStatus::Canceled); + m_exception = std::current_exception(); + + try + { + std::rethrow_exception(m_exception); + } + catch (hresult_canceled const&) + { + m_status = AsyncStatus::Canceled; + } + catch (...) + { + m_status = AsyncStatus::Error; + } + } + + template + Expression&& await_transform(Expression&& expression) + { + if (Status() == AsyncStatus::Canceled) + { + throw winrt::hresult_canceled(); + } + + return std::forward(expression); + } + + cancellation_token await_transform(get_cancellation_token_t) noexcept + { + return{ static_cast(this) }; + } + + progress_token await_transform(get_progress_token_t) noexcept + { + return{ static_cast(this) }; + } + + void cancellation_callback(winrt::delegate<>&& cancel) noexcept + { + { + slim_lock_guard const guard(m_lock); + + if (m_status != AsyncStatus::Canceled) + { + m_cancel = std::move(cancel); + return; + } + } + + cancel(); + } + +#if defined(_DEBUG) && !defined(WINRT_NO_MAKE_DETECTION) + void use_make_function_to_create_this_object() final + { + } +#endif + + protected: + + void rethrow_if_failed() const + { + if (m_status == AsyncStatus::Error || m_status == AsyncStatus::Canceled) + { + std::rethrow_exception(m_exception); + } + } + + std::exception_ptr m_exception{}; + slim_mutex m_lock; + async_completed_handler_t m_completed; + winrt::delegate<> m_cancel; + AsyncStatus m_status{ AsyncStatus::Started }; + bool m_completed_assigned{ false }; + }; +} + +#ifdef __cpp_lib_coroutine +namespace std +#elif __has_include() +namespace std::experimental +#else +namespace corostub +#endif +{ + template + struct coroutine_traits + { + struct promise_type final : winrt::impl::promise_base + { + void return_void() const noexcept + { + } + }; + }; + + template + struct coroutine_traits, Args...> + { + struct promise_type final : winrt::impl::promise_base, TProgress> + { + using ProgressHandler = winrt::Windows::Foundation::AsyncActionProgressHandler; + + void Progress(ProgressHandler const& handler) noexcept + { + winrt::slim_lock_guard const guard(this->m_lock); + m_progress = winrt::impl::make_agile_delegate(handler); + } + + ProgressHandler Progress() noexcept + { + winrt::slim_lock_guard const guard(this->m_lock); + return m_progress; + } + + void return_void() const noexcept + { + } + + void set_progress(TProgress const& result) + { + if (auto handler = Progress()) + { + winrt::impl::invoke(handler, *this, result); + } + } + + ProgressHandler m_progress; + }; + }; + + template + struct coroutine_traits, Args...> + { + struct promise_type final : winrt::impl::promise_base> + { + TResult get_return_value() noexcept + { + return std::move(m_result); + } + + void return_value(TResult&& value) noexcept + { + m_result = std::move(value); + } + + void return_value(TResult const& value) noexcept + { + m_result = value; + } + + TResult m_result{ winrt::impl::empty_value() }; + }; + }; + + template + struct coroutine_traits, Args...> + { + struct promise_type final : winrt::impl::promise_base, TProgress> + { + using ProgressHandler = winrt::Windows::Foundation::AsyncOperationProgressHandler; + + void Progress(ProgressHandler const& handler) noexcept + { + winrt::slim_lock_guard const guard(this->m_lock); + m_progress = winrt::impl::make_agile_delegate(handler); + } + + ProgressHandler Progress() noexcept + { + winrt::slim_lock_guard const guard(this->m_lock); + return m_progress; + } + + TResult get_return_value() noexcept + { + return std::move(m_result); + } + + void return_value(TResult&& value) noexcept + { + m_result = std::move(value); + } + + void return_value(TResult const& value) noexcept + { + m_result = value; + } + + void set_progress(TProgress const& result) + { + if (auto handler = Progress()) + { + winrt::impl::invoke(handler, *this, result); + } + } + + TResult m_result{ winrt::impl::empty_value() }; + ProgressHandler m_progress; + }; + }; +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h new file mode 100644 index 00000000..46bb1313 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.Notifications.h @@ -0,0 +1,3733 @@ +// C++/WinRT v2.0.190620.2 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef WINRT_Windows_UI_Notifications_H +#define WINRT_Windows_UI_Notifications_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "Windows.UI.h" +#include "impl/Windows.ApplicationModel.2.h" +#include "impl/Windows.Data.Xml.Dom.2.h" +#include "impl/Windows.Foundation.2.h" +#include "impl/Windows.Foundation.Collections.2.h" +#include "impl/Windows.System.2.h" +#include "impl/Windows.UI.Notifications.2.h" +namespace winrt::impl +{ + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationContent::Kind() const + { + Windows::UI::Notifications::AdaptiveNotificationContentKind value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationContent)->get_Kind(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationContent::Hints() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationContent)->get_Hints(&value)); + return Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationText::Text() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationText)->get_Text(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationText::Text(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationText)->put_Text(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationText::Language() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationText)->get_Language(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IAdaptiveNotificationText::Language(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IAdaptiveNotificationText)->put_Language(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IBadgeNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IBadgeNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeNotificationFactory::CreateBadgeNotification(Windows::Data::Xml::Dom::XmlDocument const& content) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeNotificationFactory)->CreateBadgeNotification(*(void**)(&content), &value)); + return Windows::UI::Notifications::BadgeNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForApplication() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerForUser)->CreateBadgeUpdaterForApplication(&result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerForUser)->CreateBadgeUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerForUser::CreateBadgeUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerForUser)->CreateBadgeUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerForUser::User() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerForUser)->get_User(&value)); + return Windows::System::User{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForApplication() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics)->CreateBadgeUpdaterForApplication(&result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics)->CreateBadgeUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics::CreateBadgeUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics)->CreateBadgeUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::BadgeUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::BadgeTemplateType const& type) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics)->GetTemplateContent(static_cast(type), &result)); + return Windows::Data::Xml::Dom::XmlDocument{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdateManagerStatics2::GetForUser(Windows::System::User const& user) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdateManagerStatics2)->GetForUser(*(void**)(&user), &result)); + return Windows::UI::Notifications::BadgeUpdateManagerForUser{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::Update(Windows::UI::Notifications::BadgeNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->Update(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->Clear()); + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& badgeContent, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->StartPeriodicUpdate(*(void**)(&badgeContent), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& badgeContent, Windows::Foundation::DateTime const& startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->StartPeriodicUpdateAtTime(*(void**)(&badgeContent), impl::bind_in(startTime), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_IBadgeUpdater::StopPeriodicUpdate() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IBadgeUpdater)->StopPeriodicUpdate()); + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::Style() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_Style(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::Wrap() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_Wrap(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::MaxLines() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_MaxLines(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::MinLines() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_MinLines(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::TextStacking() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_TextStacking(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationHintsStatics::Align() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationHintsStatics)->get_Align(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Caption() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Caption(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Body() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Body(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Base() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Base(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Subtitle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Subtitle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Title() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Title(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Subheader() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Subheader(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::Header() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_Header(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::TitleNumeral() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_TitleNumeral(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::SubheaderNumeral() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderNumeral(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::HeaderNumeral() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderNumeral(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::CaptionSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_CaptionSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::BodySubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_BodySubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::BaseSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_BaseSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::SubtitleSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_SubtitleSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::TitleSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_TitleSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::SubheaderSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::SubheaderNumeralSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_SubheaderNumeralSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::HeaderSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownAdaptiveNotificationTextStylesStatics::HeaderNumeralSubtle() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownAdaptiveNotificationTextStylesStatics)->get_HeaderNumeralSubtle(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IKnownNotificationBindingsStatics::ToastGeneric() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IKnownNotificationBindingsStatics)->get_ToastGeneric(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotification::Visual() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotification)->get_Visual(&value)); + return Windows::UI::Notifications::NotificationVisual{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotification::Visual(Windows::UI::Notifications::NotificationVisual const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotification)->put_Visual(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Template() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->get_Template(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Template(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->put_Template(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Language() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->get_Language(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Language(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->put_Language(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotificationBinding::Hints() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->get_Hints(&value)); + return Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationBinding::GetTextElements() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationBinding)->GetTextElements(&result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationData::Values() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationData)->get_Values(&value)); + return Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationData::SequenceNumber() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationData)->get_SequenceNumber(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_INotificationData::SequenceNumber(uint32_t value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationData)->put_SequenceNumber(value)); + } + template auto consume_Windows_UI_Notifications_INotificationDataFactory::CreateNotificationData(param::iterable> const& initialValues, uint32_t sequenceNumber) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationDataFactory)->CreateNotificationDataWithValuesAndSequenceNumber(*(void**)(&initialValues), sequenceNumber, &value)); + return Windows::UI::Notifications::NotificationData{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationDataFactory::CreateNotificationData(param::iterable> const& initialValues) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationDataFactory)->CreateNotificationDataWithValues(*(void**)(&initialValues), &value)); + return Windows::UI::Notifications::NotificationData{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationVisual::Language() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationVisual)->get_Language(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationVisual::Language(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationVisual)->put_Language(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_INotificationVisual::Bindings() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationVisual)->get_Bindings(&value)); + return Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_INotificationVisual::GetBinding(param::hstring const& templateName) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::INotificationVisual)->GetBinding(*(void**)(&templateName), &result)); + return Windows::UI::Notifications::NotificationBinding{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::DeliveryTime() const + { + Windows::Foundation::DateTime value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_DeliveryTime(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Tag(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->put_Tag(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Tag() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_Tag(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Id(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->put_Id(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotification::Id() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotification)->get_Id(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledTileNotificationFactory::CreateScheduledTileNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledTileNotificationFactory)->CreateScheduledTileNotification(*(void**)(&content), impl::bind_in(deliveryTime), &value)); + return Windows::UI::Notifications::ScheduledTileNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::DeliveryTime() const + { + Windows::Foundation::DateTime value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_DeliveryTime(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::SnoozeInterval() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_SnoozeInterval(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::MaximumSnoozeCount() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_MaximumSnoozeCount(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::Id(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->put_Id(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification::Id() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification)->get_Id(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::Tag(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->put_Tag(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::Tag() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->get_Tag(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::Group(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->put_Group(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::Group() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->get_Group(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::SuppressPopup(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->put_SuppressPopup(value)); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification2::SuppressPopup() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification2)->get_SuppressPopup(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification3::NotificationMirroring() const + { + Windows::UI::Notifications::NotificationMirroring value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification3)->get_NotificationMirroring(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification3::NotificationMirroring(Windows::UI::Notifications::NotificationMirroring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification3)->put_NotificationMirroring(static_cast(value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification3::RemoteId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification3)->get_RemoteId(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification3::RemoteId(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification3)->put_RemoteId(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification4::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification4)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotification4::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotification4)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationFactory::CreateScheduledToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationFactory)->CreateScheduledToastNotification(*(void**)(&content), impl::bind_in(deliveryTime), &value)); + return Windows::UI::Notifications::ScheduledToastNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationFactory::CreateScheduledToastNotificationRecurring(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime, Windows::Foundation::TimeSpan const& snoozeInterval, uint32_t maximumSnoozeCount) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationFactory)->CreateScheduledToastNotificationRecurring(*(void**)(&content), impl::bind_in(deliveryTime), impl::bind_in(snoozeInterval), maximumSnoozeCount, &value)); + return Windows::UI::Notifications::ScheduledToastNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationShowingEventArgs::Cancel() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationShowingEventArgs)->get_Cancel(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationShowingEventArgs::Cancel(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationShowingEventArgs)->put_Cancel(value)); + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationShowingEventArgs::ScheduledToastNotification() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationShowingEventArgs)->get_ScheduledToastNotification(&value)); + return Windows::UI::Notifications::ScheduledToastNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IScheduledToastNotificationShowingEventArgs::GetDeferral() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IScheduledToastNotificationShowingEventArgs)->GetDeferral(&result)); + return Windows::Foundation::Deferral{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IShownTileNotification::Arguments() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IShownTileNotification)->get_Arguments(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutNotificationFactory::CreateTileFlyoutNotification(Windows::Data::Xml::Dom::XmlDocument const& content) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutNotificationFactory)->CreateTileFlyoutNotification(*(void**)(&content), &value)); + return Windows::UI::Notifications::TileFlyoutNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForApplication() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics)->CreateTileFlyoutUpdaterForApplication(&result)); + return Windows::UI::Notifications::TileFlyoutUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics)->CreateTileFlyoutUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::TileFlyoutUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdateManagerStatics::CreateTileFlyoutUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics)->CreateTileFlyoutUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::TileFlyoutUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::TileFlyoutTemplateType const& type) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdateManagerStatics)->GetTemplateContent(static_cast(type), &result)); + return Windows::Data::Xml::Dom::XmlDocument{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::Update(Windows::UI::Notifications::TileFlyoutNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->Update(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->Clear()); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& tileFlyoutContent, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->StartPeriodicUpdate(*(void**)(&tileFlyoutContent), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& tileFlyoutContent, Windows::Foundation::DateTime const& startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->StartPeriodicUpdateAtTime(*(void**)(&tileFlyoutContent), impl::bind_in(startTime), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::StopPeriodicUpdate() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->StopPeriodicUpdate()); + } + template auto consume_Windows_UI_Notifications_ITileFlyoutUpdater::Setting() const + { + Windows::UI::Notifications::NotificationSetting value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileFlyoutUpdater)->get_Setting(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_ITileNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_ITileNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileNotification::Tag(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->put_Tag(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_ITileNotification::Tag() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotification)->get_Tag(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileNotificationFactory::CreateTileNotification(Windows::Data::Xml::Dom::XmlDocument const& content) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileNotificationFactory)->CreateTileNotification(*(void**)(&content), &value)); + return Windows::UI::Notifications::TileNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerForUser::CreateTileUpdaterForApplicationForUser() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerForUser)->CreateTileUpdaterForApplication(&result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerForUser::CreateTileUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerForUser)->CreateTileUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerForUser::CreateTileUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerForUser)->CreateTileUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerForUser::User() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerForUser)->get_User(&value)); + return Windows::System::User{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics::CreateTileUpdaterForApplication() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics)->CreateTileUpdaterForApplication(&result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics::CreateTileUpdaterForApplication(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics)->CreateTileUpdaterForApplicationWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics::CreateTileUpdaterForSecondaryTile(param::hstring const& tileId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics)->CreateTileUpdaterForSecondaryTile(*(void**)(&tileId), &result)); + return Windows::UI::Notifications::TileUpdater{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics::GetTemplateContent(Windows::UI::Notifications::TileTemplateType const& type) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics)->GetTemplateContent(static_cast(type), &result)); + return Windows::Data::Xml::Dom::XmlDocument{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdateManagerStatics2::GetForUser(Windows::System::User const& user) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdateManagerStatics2)->GetForUser(*(void**)(&user), &result)); + return Windows::UI::Notifications::TileUpdateManagerForUser{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdater::Update(Windows::UI::Notifications::TileNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->Update(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->Clear()); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::EnableNotificationQueue(bool enable) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->EnableNotificationQueue(enable)); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::Setting() const + { + Windows::UI::Notifications::NotificationSetting value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->get_Setting(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_ITileUpdater::AddToSchedule(Windows::UI::Notifications::ScheduledTileNotification const& scheduledTile) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->AddToSchedule(*(void**)(&scheduledTile))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::RemoveFromSchedule(Windows::UI::Notifications::ScheduledTileNotification const& scheduledTile) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->RemoveFromSchedule(*(void**)(&scheduledTile))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::GetScheduledTileNotifications() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->GetScheduledTileNotifications(&result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& tileContent, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StartPeriodicUpdate(*(void**)(&tileContent), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StartPeriodicUpdate(Windows::Foundation::Uri const& tileContent, Windows::Foundation::DateTime const& startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StartPeriodicUpdateAtTime(*(void**)(&tileContent), impl::bind_in(startTime), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StopPeriodicUpdate() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StopPeriodicUpdate()); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StartPeriodicUpdateBatch(param::iterable const& tileContents, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StartPeriodicUpdateBatch(*(void**)(&tileContents), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater::StartPeriodicUpdateBatch(param::iterable const& tileContents, Windows::Foundation::DateTime const& startTime, Windows::UI::Notifications::PeriodicUpdateRecurrence const& requestedInterval) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater)->StartPeriodicUpdateBatchAtTime(*(void**)(&tileContents), impl::bind_in(startTime), static_cast(requestedInterval))); + } + template auto consume_Windows_UI_Notifications_ITileUpdater2::EnableNotificationQueueForSquare150x150(bool enable) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater2)->EnableNotificationQueueForSquare150x150(enable)); + } + template auto consume_Windows_UI_Notifications_ITileUpdater2::EnableNotificationQueueForWide310x150(bool enable) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater2)->EnableNotificationQueueForWide310x150(enable)); + } + template auto consume_Windows_UI_Notifications_ITileUpdater2::EnableNotificationQueueForSquare310x310(bool enable) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::ITileUpdater2)->EnableNotificationQueueForSquare310x310(enable)); + } + template auto consume_Windows_UI_Notifications_IToastActivatedEventArgs::Arguments() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastActivatedEventArgs)->get_Arguments(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastActivatedEventArgs2::UserInput() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastActivatedEventArgs2)->get_UserInput(&value)); + return Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::Id() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->get_Id(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::DisplayName() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->get_DisplayName(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::DisplayName(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->put_DisplayName(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastCollection::LaunchArgs() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->get_LaunchArgs(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::LaunchArgs(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->put_LaunchArgs(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastCollection::Icon() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->get_Icon(&value)); + return Windows::Foundation::Uri{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollection::Icon(Windows::Foundation::Uri const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollection)->put_Icon(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastCollectionFactory::CreateInstance(param::hstring const& collectionId, param::hstring const& displayName, param::hstring const& launchArgs, Windows::Foundation::Uri const& iconUri) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionFactory)->CreateInstance(*(void**)(&collectionId), *(void**)(&displayName), *(void**)(&launchArgs), *(void**)(&iconUri), &value)); + return Windows::UI::Notifications::ToastCollection{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::SaveToastCollectionAsync(Windows::UI::Notifications::ToastCollection const& collection) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->SaveToastCollectionAsync(*(void**)(&collection), &operation)); + return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::FindAllToastCollectionsAsync() const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->FindAllToastCollectionsAsync(&operation)); + return Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::GetToastCollectionAsync(param::hstring const& collectionId) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->GetToastCollectionAsync(*(void**)(&collectionId), &operation)); + return Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::RemoveToastCollectionAsync(param::hstring const& collectionId) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->RemoveToastCollectionAsync(*(void**)(&collectionId), &operation)); + return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::RemoveAllToastCollectionsAsync() const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->RemoveAllToastCollectionsAsync(&operation)); + return Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::User() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->get_User(&value)); + return Windows::System::User{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastCollectionManager::AppId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastCollectionManager)->get_AppId(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastDismissedEventArgs::Reason() const + { + Windows::UI::Notifications::ToastDismissalReason value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastDismissedEventArgs)->get_Reason(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastFailedEventArgs::ErrorCode() const + { + winrt::hresult value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastFailedEventArgs)->get_ErrorCode(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification::Content() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->get_Content(&value)); + return Windows::Data::Xml::Dom::XmlDocument{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification::ExpirationTime(Windows::Foundation::IReference const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->put_ExpirationTime(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification::ExpirationTime() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->get_ExpirationTime(&value)); + return Windows::Foundation::IReference{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification::Dismissed(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token token; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->add_Dismissed(*(void**)(&handler), put_abi(token))); + return token; + } + template typename consume_Windows_UI_Notifications_IToastNotification::Dismissed_revoker consume_Windows_UI_Notifications_IToastNotification::Dismissed(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, Dismissed(handler)); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Dismissed(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->remove_Dismissed(impl::bind_in(token))); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Activated(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token token; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->add_Activated(*(void**)(&handler), put_abi(token))); + return token; + } + template typename consume_Windows_UI_Notifications_IToastNotification::Activated_revoker consume_Windows_UI_Notifications_IToastNotification::Activated(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, Activated(handler)); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Activated(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->remove_Activated(impl::bind_in(token))); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Failed(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token token; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->add_Failed(*(void**)(&handler), put_abi(token))); + return token; + } + template typename consume_Windows_UI_Notifications_IToastNotification::Failed_revoker consume_Windows_UI_Notifications_IToastNotification::Failed(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, Failed(handler)); + } + template auto consume_Windows_UI_Notifications_IToastNotification::Failed(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification)->remove_Failed(impl::bind_in(token))); + } + template auto consume_Windows_UI_Notifications_IToastNotification2::Tag(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->put_Tag(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification2::Tag() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->get_Tag(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification2::Group(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->put_Group(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification2::Group() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->get_Group(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification2::SuppressPopup(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->put_SuppressPopup(value)); + } + template auto consume_Windows_UI_Notifications_IToastNotification2::SuppressPopup() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification2)->get_SuppressPopup(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification3::NotificationMirroring() const + { + Windows::UI::Notifications::NotificationMirroring value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification3)->get_NotificationMirroring(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification3::NotificationMirroring(Windows::UI::Notifications::NotificationMirroring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification3)->put_NotificationMirroring(static_cast(value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification3::RemoteId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification3)->get_RemoteId(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification3::RemoteId(param::hstring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification3)->put_RemoteId(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification4::Data() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification4)->get_Data(&value)); + return Windows::UI::Notifications::NotificationData{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotification4::Data(Windows::UI::Notifications::NotificationData const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification4)->put_Data(*(void**)(&value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification4::Priority() const + { + Windows::UI::Notifications::ToastNotificationPriority value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification4)->get_Priority(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification4::Priority(Windows::UI::Notifications::ToastNotificationPriority const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification4)->put_Priority(static_cast(value))); + } + template auto consume_Windows_UI_Notifications_IToastNotification6::ExpiresOnReboot() const + { + bool value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification6)->get_ExpiresOnReboot(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotification6::ExpiresOnReboot(bool value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotification6)->put_ExpiresOnReboot(value)); + } + template auto consume_Windows_UI_Notifications_IToastNotificationActionTriggerDetail::Argument() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationActionTriggerDetail)->get_Argument(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationActionTriggerDetail::UserInput() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationActionTriggerDetail)->get_UserInput(&value)); + return Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationFactory::CreateToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content) const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationFactory)->CreateToastNotification(*(void**)(&content), &value)); + return Windows::UI::Notifications::ToastNotification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::RemoveGroup(param::hstring const& group) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->RemoveGroup(*(void**)(&group))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::RemoveGroup(param::hstring const& group, param::hstring const& applicationId) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->RemoveGroupWithId(*(void**)(&group), *(void**)(&applicationId))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Remove(param::hstring const& tag, param::hstring const& group, param::hstring const& applicationId) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->RemoveGroupedTagWithId(*(void**)(&tag), *(void**)(&group), *(void**)(&applicationId))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Remove(param::hstring const& tag, param::hstring const& group) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->RemoveGroupedTag(*(void**)(&tag), *(void**)(&group))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Remove(param::hstring const& tag) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->Remove(*(void**)(&tag))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Clear() const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->Clear()); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory::Clear(param::hstring const& applicationId) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory)->ClearWithId(*(void**)(&applicationId))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory2::GetHistory() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory2)->GetHistory(&result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistory2::GetHistory(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistory2)->GetHistoryWithId(*(void**)(&applicationId), &result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistoryChangedTriggerDetail::ChangeType() const + { + Windows::UI::Notifications::ToastHistoryChangedType value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistoryChangedTriggerDetail)->get_ChangeType(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotificationHistoryChangedTriggerDetail2::CollectionId() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationHistoryChangedTriggerDetail2)->get_CollectionId(&value)); + return hstring{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser::CreateToastNotifier() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser)->CreateToastNotifier(&result)); + return Windows::UI::Notifications::ToastNotifier{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser::CreateToastNotifier(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser)->CreateToastNotifierWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::ToastNotifier{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser::History() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser)->get_History(&value)); + return Windows::UI::Notifications::ToastNotificationHistory{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser::User() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser)->get_User(&value)); + return Windows::System::User{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser2::GetToastNotifierForToastCollectionIdAsync(param::hstring const& collectionId) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser2)->GetToastNotifierForToastCollectionIdAsync(*(void**)(&collectionId), &operation)); + return Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser2::GetHistoryForToastCollectionIdAsync(param::hstring const& collectionId) const + { + void* operation{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser2)->GetHistoryForToastCollectionIdAsync(*(void**)(&collectionId), &operation)); + return Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser2::GetToastCollectionManager() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser2)->GetToastCollectionManager(&result)); + return Windows::UI::Notifications::ToastCollectionManager{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerForUser2::GetToastCollectionManager(param::hstring const& appId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerForUser2)->GetToastCollectionManagerWithAppId(*(void**)(&appId), &result)); + return Windows::UI::Notifications::ToastCollectionManager{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics::CreateToastNotifier() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics)->CreateToastNotifier(&result)); + return Windows::UI::Notifications::ToastNotifier{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics::CreateToastNotifier(param::hstring const& applicationId) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics)->CreateToastNotifierWithId(*(void**)(&applicationId), &result)); + return Windows::UI::Notifications::ToastNotifier{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics::GetTemplateContent(Windows::UI::Notifications::ToastTemplateType const& type) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics)->GetTemplateContent(static_cast(type), &result)); + return Windows::Data::Xml::Dom::XmlDocument{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics2::History() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics2)->get_History(&value)); + return Windows::UI::Notifications::ToastNotificationHistory{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics4::GetForUser(Windows::System::User const& user) const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics4)->GetForUser(*(void**)(&user), &result)); + return Windows::UI::Notifications::ToastNotificationManagerForUser{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics4::ConfigureNotificationMirroring(Windows::UI::Notifications::NotificationMirroring const& value) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics4)->ConfigureNotificationMirroring(static_cast(value))); + } + template auto consume_Windows_UI_Notifications_IToastNotificationManagerStatics5::GetDefault() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotificationManagerStatics5)->GetDefault(&result)); + return Windows::UI::Notifications::ToastNotificationManagerForUser{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotifier::Show(Windows::UI::Notifications::ToastNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->Show(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_IToastNotifier::Hide(Windows::UI::Notifications::ToastNotification const& notification) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->Hide(*(void**)(¬ification))); + } + template auto consume_Windows_UI_Notifications_IToastNotifier::Setting() const + { + Windows::UI::Notifications::NotificationSetting value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->get_Setting(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IToastNotifier::AddToSchedule(Windows::UI::Notifications::ScheduledToastNotification const& scheduledToast) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->AddToSchedule(*(void**)(&scheduledToast))); + } + template auto consume_Windows_UI_Notifications_IToastNotifier::RemoveFromSchedule(Windows::UI::Notifications::ScheduledToastNotification const& scheduledToast) const + { + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->RemoveFromSchedule(*(void**)(&scheduledToast))); + } + template auto consume_Windows_UI_Notifications_IToastNotifier::GetScheduledToastNotifications() const + { + void* result{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier)->GetScheduledToastNotifications(&result)); + return Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IToastNotifier2::Update(Windows::UI::Notifications::NotificationData const& data, param::hstring const& tag, param::hstring const& group) const + { + Windows::UI::Notifications::NotificationUpdateResult result; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier2)->UpdateWithTagAndGroup(*(void**)(&data), *(void**)(&tag), *(void**)(&group), put_abi(result))); + return result; + } + template auto consume_Windows_UI_Notifications_IToastNotifier2::Update(Windows::UI::Notifications::NotificationData const& data, param::hstring const& tag) const + { + Windows::UI::Notifications::NotificationUpdateResult result; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier2)->UpdateWithTag(*(void**)(&data), *(void**)(&tag), put_abi(result))); + return result; + } + template auto consume_Windows_UI_Notifications_IToastNotifier3::ScheduledToastNotificationShowing(Windows::Foundation::TypedEventHandler const& handler) const + { + winrt::event_token token; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier3)->add_ScheduledToastNotificationShowing(*(void**)(&handler), put_abi(token))); + return token; + } + template typename consume_Windows_UI_Notifications_IToastNotifier3::ScheduledToastNotificationShowing_revoker consume_Windows_UI_Notifications_IToastNotifier3::ScheduledToastNotificationShowing(auto_revoke_t, Windows::Foundation::TypedEventHandler const& handler) const + { + return impl::make_event_revoker(this, ScheduledToastNotificationShowing(handler)); + } + template auto consume_Windows_UI_Notifications_IToastNotifier3::ScheduledToastNotificationShowing(winrt::event_token const& token) const noexcept + { + WINRT_VERIFY_(0, WINRT_IMPL_SHIM(Windows::UI::Notifications::IToastNotifier3)->remove_ScheduledToastNotificationShowing(impl::bind_in(token))); + } + template auto consume_Windows_UI_Notifications_IUserNotification::Notification() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotification)->get_Notification(&value)); + return Windows::UI::Notifications::Notification{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IUserNotification::AppInfo() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotification)->get_AppInfo(&value)); + return Windows::ApplicationModel::AppInfo{ value, take_ownership_from_abi }; + } + template auto consume_Windows_UI_Notifications_IUserNotification::Id() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotification)->get_Id(&value)); + return value; + } + template auto consume_Windows_UI_Notifications_IUserNotification::CreationTime() const + { + Windows::Foundation::DateTime value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotification)->get_CreationTime(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IUserNotificationChangedEventArgs::ChangeKind() const + { + Windows::UI::Notifications::UserNotificationChangedKind value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotificationChangedEventArgs)->get_ChangeKind(put_abi(value))); + return value; + } + template auto consume_Windows_UI_Notifications_IUserNotificationChangedEventArgs::UserNotificationId() const + { + uint32_t value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::Notifications::IUserNotificationChangedEventArgs)->get_UserNotificationId(&value)); + return value; + } + template + struct produce : produce_base + { + int32_t __stdcall get_Kind(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Kind()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Hints(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().Hints()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Text(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Text()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Text(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Text(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Language(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Language()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Language(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Language(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateBadgeNotification(void* content, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateBadgeNotification(*reinterpret_cast(&content))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateBadgeUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForApplication()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBadgeUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBadgeUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_User(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().User()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateBadgeUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForApplication()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBadgeUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateBadgeUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateBadgeUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTemplateContent(int32_t type, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetTemplateContent(*reinterpret_cast(&type))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetForUser(void* user, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Update(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Update(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdate(void* badgeContent, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&badgeContent), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateAtTime(void* badgeContent, int64_t startTime, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&badgeContent), *reinterpret_cast(&startTime), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StopPeriodicUpdate() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StopPeriodicUpdate(); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Style(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Style()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Wrap(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Wrap()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MaxLines(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MaxLines()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MinLines(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MinLines()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_TextStacking(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().TextStacking()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Align(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Align()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Caption(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Caption()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Body(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Body()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Base(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Base()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Subtitle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Subtitle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Title(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Title()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Subheader(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Subheader()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Header(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Header()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_TitleNumeral(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().TitleNumeral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SubheaderNumeral(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SubheaderNumeral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HeaderNumeral(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HeaderNumeral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_CaptionSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CaptionSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BodySubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BodySubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BaseSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BaseSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SubtitleSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SubtitleSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_TitleSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().TitleSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SubheaderSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SubheaderSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SubheaderNumeralSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SubheaderNumeralSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HeaderSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HeaderSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HeaderNumeralSubtle(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HeaderNumeralSubtle()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ToastGeneric(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ToastGeneric()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Visual(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Visual()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Visual(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Visual(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Template(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Template()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Template(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Template(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Language(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Language()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Language(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Language(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Hints(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().Hints()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTextElements(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetTextElements()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Values(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().Values()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SequenceNumber(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SequenceNumber()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_SequenceNumber(uint32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SequenceNumber(value); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateNotificationDataWithValuesAndSequenceNumber(void* initialValues, uint32_t sequenceNumber, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateNotificationData(*reinterpret_cast> const*>(&initialValues), sequenceNumber)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateNotificationDataWithValues(void* initialValues, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateNotificationData(*reinterpret_cast> const*>(&initialValues))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Language(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Language()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Language(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Language(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Bindings(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().Bindings()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetBinding(void* templateName, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetBinding(*reinterpret_cast(&templateName))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DeliveryTime(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DeliveryTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Tag(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tag(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tag()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Id(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Id(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Id(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateScheduledTileNotification(void* content, int64_t deliveryTime, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateScheduledTileNotification(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DeliveryTime(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DeliveryTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SnoozeInterval(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().SnoozeInterval()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MaximumSnoozeCount(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MaximumSnoozeCount()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Id(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Id(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Id(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall put_Tag(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tag(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tag()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Group(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Group(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Group(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Group()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_SuppressPopup(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SuppressPopup(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SuppressPopup(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SuppressPopup()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_NotificationMirroring(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NotificationMirroring()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_NotificationMirroring(int32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().NotificationMirroring(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RemoteId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RemoteId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_RemoteId(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoteId(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateScheduledToastNotification(void* content, int64_t deliveryTime, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateScheduledToastNotification(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateScheduledToastNotificationRecurring(void* content, int64_t deliveryTime, int64_t snoozeInterval, uint32_t maximumSnoozeCount, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateScheduledToastNotificationRecurring(*reinterpret_cast(&content), *reinterpret_cast(&deliveryTime), *reinterpret_cast(&snoozeInterval), maximumSnoozeCount)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Cancel(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Cancel()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Cancel(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Cancel(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ScheduledToastNotification(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ScheduledToastNotification()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetDeferral(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetDeferral()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Arguments(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Arguments()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileFlyoutNotification(void* content, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateTileFlyoutNotification(*reinterpret_cast(&content))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileFlyoutUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileFlyoutUpdaterForApplication()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileFlyoutUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileFlyoutUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileFlyoutUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileFlyoutUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTemplateContent(int32_t type, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetTemplateContent(*reinterpret_cast(&type))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Update(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Update(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdate(void* tileFlyoutContent, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileFlyoutContent), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateAtTime(void* tileFlyoutContent, int64_t startTime, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileFlyoutContent), *reinterpret_cast(&startTime), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StopPeriodicUpdate() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StopPeriodicUpdate(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Setting(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Setting()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Tag(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tag(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tag()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileNotification(void* content, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateTileNotification(*reinterpret_cast(&content))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForApplicationForUser()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_User(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().User()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateTileUpdaterForApplication(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForApplication()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileUpdaterForApplicationWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForApplication(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateTileUpdaterForSecondaryTile(void* tileId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateTileUpdaterForSecondaryTile(*reinterpret_cast(&tileId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTemplateContent(int32_t type, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetTemplateContent(*reinterpret_cast(&type))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetForUser(void* user, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Update(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Update(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall EnableNotificationQueue(bool enable) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().EnableNotificationQueue(enable); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Setting(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Setting()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall AddToSchedule(void* scheduledTile) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().AddToSchedule(*reinterpret_cast(&scheduledTile)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveFromSchedule(void* scheduledTile) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveFromSchedule(*reinterpret_cast(&scheduledTile)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetScheduledTileNotifications(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetScheduledTileNotifications()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdate(void* tileContent, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileContent), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateAtTime(void* tileContent, int64_t startTime, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdate(*reinterpret_cast(&tileContent), *reinterpret_cast(&startTime), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StopPeriodicUpdate() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StopPeriodicUpdate(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateBatch(void* tileContents, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdateBatch(*reinterpret_cast const*>(&tileContents), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall StartPeriodicUpdateBatchAtTime(void* tileContents, int64_t startTime, int32_t requestedInterval) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().StartPeriodicUpdateBatch(*reinterpret_cast const*>(&tileContents), *reinterpret_cast(&startTime), *reinterpret_cast(&requestedInterval)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall EnableNotificationQueueForSquare150x150(bool enable) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().EnableNotificationQueueForSquare150x150(enable); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall EnableNotificationQueueForWide310x150(bool enable) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().EnableNotificationQueueForWide310x150(enable); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall EnableNotificationQueueForSquare310x310(bool enable) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().EnableNotificationQueueForSquare310x310(enable); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Arguments(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Arguments()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_UserInput(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UserInput()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Id(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DisplayName(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DisplayName()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_DisplayName(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().DisplayName(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LaunchArgs(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LaunchArgs()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_LaunchArgs(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().LaunchArgs(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Icon(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Icon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Icon(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Icon(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateInstance(void* collectionId, void* displayName, void* launchArgs, void* iconUri, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&collectionId), *reinterpret_cast(&displayName), *reinterpret_cast(&launchArgs), *reinterpret_cast(&iconUri))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall SaveToastCollectionAsync(void* collection, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from(this->shim().SaveToastCollectionAsync(*reinterpret_cast(&collection))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall FindAllToastCollectionsAsync(void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from>>(this->shim().FindAllToastCollectionsAsync()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetToastCollectionAsync(void* collectionId, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from>(this->shim().GetToastCollectionAsync(*reinterpret_cast(&collectionId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveToastCollectionAsync(void* collectionId, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from(this->shim().RemoveToastCollectionAsync(*reinterpret_cast(&collectionId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveAllToastCollectionsAsync(void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from(this->shim().RemoveAllToastCollectionsAsync()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_User(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().User()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_AppId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AppId()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Reason(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Reason()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ErrorCode(winrt::hresult* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ErrorCode()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Content(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Content()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpirationTime(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpirationTime(*reinterpret_cast const*>(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ExpirationTime(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from>(this->shim().ExpirationTime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall add_Dismissed(void* handler, winrt::event_token* token) noexcept final try + { + zero_abi(token); + typename D::abi_guard guard(this->shim()); + *token = detach_from(this->shim().Dismissed(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_Dismissed(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().Dismissed(*reinterpret_cast(&token)); + return 0; + } + int32_t __stdcall add_Activated(void* handler, winrt::event_token* token) noexcept final try + { + zero_abi(token); + typename D::abi_guard guard(this->shim()); + *token = detach_from(this->shim().Activated(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_Activated(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().Activated(*reinterpret_cast(&token)); + return 0; + } + int32_t __stdcall add_Failed(void* handler, winrt::event_token* token) noexcept final try + { + zero_abi(token); + typename D::abi_guard guard(this->shim()); + *token = detach_from(this->shim().Failed(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_Failed(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().Failed(*reinterpret_cast(&token)); + return 0; + } + }; + template + struct produce : produce_base + { + int32_t __stdcall put_Tag(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Tag(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tag(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tag()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Group(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Group(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Group(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Group()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_SuppressPopup(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().SuppressPopup(value); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SuppressPopup(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SuppressPopup()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_NotificationMirroring(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NotificationMirroring()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_NotificationMirroring(int32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().NotificationMirroring(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RemoteId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RemoteId()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_RemoteId(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoteId(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Data(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Data()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Data(void* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Data(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Priority(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Priority()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_Priority(int32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Priority(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ExpiresOnReboot(bool* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ExpiresOnReboot()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall put_ExpiresOnReboot(bool value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ExpiresOnReboot(value); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Argument(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Argument()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_UserInput(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UserInput()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateToastNotification(void* content, void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreateToastNotification(*reinterpret_cast(&content))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall RemoveGroup(void* group) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveGroup(*reinterpret_cast(&group)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveGroupWithId(void* group, void* applicationId) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveGroup(*reinterpret_cast(&group), *reinterpret_cast(&applicationId)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveGroupedTagWithId(void* tag, void* group, void* applicationId) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Remove(*reinterpret_cast(&tag), *reinterpret_cast(&group), *reinterpret_cast(&applicationId)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveGroupedTag(void* tag, void* group) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Remove(*reinterpret_cast(&tag), *reinterpret_cast(&group)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Remove(void* tag) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Remove(*reinterpret_cast(&tag)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Clear() noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ClearWithId(void* applicationId) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Clear(*reinterpret_cast(&applicationId)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetHistory(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetHistory()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetHistoryWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetHistory(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ChangeType(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ChangeType()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_CollectionId(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CollectionId()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateToastNotifier(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateToastNotifier()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateToastNotifierWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateToastNotifier(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_History(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().History()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_User(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().User()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetToastNotifierForToastCollectionIdAsync(void* collectionId, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from>(this->shim().GetToastNotifierForToastCollectionIdAsync(*reinterpret_cast(&collectionId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetHistoryForToastCollectionIdAsync(void* collectionId, void** operation) noexcept final try + { + clear_abi(operation); + typename D::abi_guard guard(this->shim()); + *operation = detach_from>(this->shim().GetHistoryForToastCollectionIdAsync(*reinterpret_cast(&collectionId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetToastCollectionManager(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetToastCollectionManager()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetToastCollectionManagerWithAppId(void* appId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetToastCollectionManager(*reinterpret_cast(&appId))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall CreateToastNotifier(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateToastNotifier()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall CreateToastNotifierWithId(void* applicationId, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().CreateToastNotifier(*reinterpret_cast(&applicationId))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetTemplateContent(int32_t type, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetTemplateContent(*reinterpret_cast(&type))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_History(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().History()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetForUser(void* user, void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall ConfigureNotificationMirroring(int32_t value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().ConfigureNotificationMirroring(*reinterpret_cast(&value)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall GetDefault(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().GetDefault()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall Show(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Show(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall Hide(void* notification) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().Hide(*reinterpret_cast(¬ification)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Setting(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Setting()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall AddToSchedule(void* scheduledToast) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().AddToSchedule(*reinterpret_cast(&scheduledToast)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall RemoveFromSchedule(void* scheduledToast) noexcept final try + { + typename D::abi_guard guard(this->shim()); + this->shim().RemoveFromSchedule(*reinterpret_cast(&scheduledToast)); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall GetScheduledToastNotifications(void** result) noexcept final try + { + clear_abi(result); + typename D::abi_guard guard(this->shim()); + *result = detach_from>(this->shim().GetScheduledToastNotifications()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall UpdateWithTagAndGroup(void* data, void* tag, void* group, int32_t* result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().Update(*reinterpret_cast(&data), *reinterpret_cast(&tag), *reinterpret_cast(&group))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall UpdateWithTag(void* data, void* tag, int32_t* result) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *result = detach_from(this->shim().Update(*reinterpret_cast(&data), *reinterpret_cast(&tag))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall add_ScheduledToastNotificationShowing(void* handler, winrt::event_token* token) noexcept final try + { + zero_abi(token); + typename D::abi_guard guard(this->shim()); + *token = detach_from(this->shim().ScheduledToastNotificationShowing(*reinterpret_cast const*>(&handler))); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall remove_ScheduledToastNotificationShowing(winrt::event_token token) noexcept final + { + typename D::abi_guard guard(this->shim()); + this->shim().ScheduledToastNotificationShowing(*reinterpret_cast(&token)); + return 0; + } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_Notification(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Notification()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_AppInfo(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AppInfo()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Id(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Id()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_CreationTime(int64_t* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CreationTime()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_ChangeKind(int32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ChangeKind()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_UserNotificationId(uint32_t* value) noexcept final try + { + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UserNotificationId()); + return 0; + } + catch (...) { return to_hresult(); } + }; +} +namespace winrt::Windows::UI::Notifications +{ + constexpr auto operator|(NotificationKinds const left, NotificationKinds const right) noexcept + { + return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); + } + constexpr auto operator|=(NotificationKinds& left, NotificationKinds const right) noexcept + { + left = left | right; + return left; + } + constexpr auto operator&(NotificationKinds const left, NotificationKinds const right) noexcept + { + return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); + } + constexpr auto operator&=(NotificationKinds& left, NotificationKinds const right) noexcept + { + left = left & right; + return left; + } + constexpr auto operator~(NotificationKinds const value) noexcept + { + return static_cast(~impl::to_underlying_type(value)); + } + constexpr auto operator^(NotificationKinds const left, NotificationKinds const right) noexcept + { + return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); + } + constexpr auto operator^=(NotificationKinds& left, NotificationKinds const right) noexcept + { + left = left ^ right; + return left; + } + inline AdaptiveNotificationText::AdaptiveNotificationText() : + AdaptiveNotificationText(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline BadgeNotification::BadgeNotification(Windows::Data::Xml::Dom::XmlDocument const& content) : + BadgeNotification(impl::call_factory([&](auto&& f) { return f.CreateBadgeNotification(content); })) + { + } + inline auto BadgeUpdateManager::CreateBadgeUpdaterForApplication() + { + return impl::call_factory([&](auto&& f) { return f.CreateBadgeUpdaterForApplication(); }); + } + inline auto BadgeUpdateManager::CreateBadgeUpdaterForApplication(param::hstring const& applicationId) + { + return impl::call_factory([&](auto&& f) { return f.CreateBadgeUpdaterForApplication(applicationId); }); + } + inline auto BadgeUpdateManager::CreateBadgeUpdaterForSecondaryTile(param::hstring const& tileId) + { + return impl::call_factory([&](auto&& f) { return f.CreateBadgeUpdaterForSecondaryTile(tileId); }); + } + inline auto BadgeUpdateManager::GetTemplateContent(Windows::UI::Notifications::BadgeTemplateType const& type) + { + return impl::call_factory([&](auto&& f) { return f.GetTemplateContent(type); }); + } + inline auto BadgeUpdateManager::GetForUser(Windows::System::User const& user) + { + return impl::call_factory([&](auto&& f) { return f.GetForUser(user); }); + } + inline auto KnownAdaptiveNotificationHints::Style() + { + return impl::call_factory([&](auto&& f) { return f.Style(); }); + } + inline auto KnownAdaptiveNotificationHints::Wrap() + { + return impl::call_factory([&](auto&& f) { return f.Wrap(); }); + } + inline auto KnownAdaptiveNotificationHints::MaxLines() + { + return impl::call_factory([&](auto&& f) { return f.MaxLines(); }); + } + inline auto KnownAdaptiveNotificationHints::MinLines() + { + return impl::call_factory([&](auto&& f) { return f.MinLines(); }); + } + inline auto KnownAdaptiveNotificationHints::TextStacking() + { + return impl::call_factory([&](auto&& f) { return f.TextStacking(); }); + } + inline auto KnownAdaptiveNotificationHints::Align() + { + return impl::call_factory([&](auto&& f) { return f.Align(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Caption() + { + return impl::call_factory([&](auto&& f) { return f.Caption(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Body() + { + return impl::call_factory([&](auto&& f) { return f.Body(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Base() + { + return impl::call_factory([&](auto&& f) { return f.Base(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Subtitle() + { + return impl::call_factory([&](auto&& f) { return f.Subtitle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Title() + { + return impl::call_factory([&](auto&& f) { return f.Title(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Subheader() + { + return impl::call_factory([&](auto&& f) { return f.Subheader(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::Header() + { + return impl::call_factory([&](auto&& f) { return f.Header(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::TitleNumeral() + { + return impl::call_factory([&](auto&& f) { return f.TitleNumeral(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::SubheaderNumeral() + { + return impl::call_factory([&](auto&& f) { return f.SubheaderNumeral(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::HeaderNumeral() + { + return impl::call_factory([&](auto&& f) { return f.HeaderNumeral(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::CaptionSubtle() + { + return impl::call_factory([&](auto&& f) { return f.CaptionSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::BodySubtle() + { + return impl::call_factory([&](auto&& f) { return f.BodySubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::BaseSubtle() + { + return impl::call_factory([&](auto&& f) { return f.BaseSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::SubtitleSubtle() + { + return impl::call_factory([&](auto&& f) { return f.SubtitleSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::TitleSubtle() + { + return impl::call_factory([&](auto&& f) { return f.TitleSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::SubheaderSubtle() + { + return impl::call_factory([&](auto&& f) { return f.SubheaderSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::SubheaderNumeralSubtle() + { + return impl::call_factory([&](auto&& f) { return f.SubheaderNumeralSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::HeaderSubtle() + { + return impl::call_factory([&](auto&& f) { return f.HeaderSubtle(); }); + } + inline auto KnownAdaptiveNotificationTextStyles::HeaderNumeralSubtle() + { + return impl::call_factory([&](auto&& f) { return f.HeaderNumeralSubtle(); }); + } + inline auto KnownNotificationBindings::ToastGeneric() + { + return impl::call_factory([&](auto&& f) { return f.ToastGeneric(); }); + } + inline Notification::Notification() : + Notification(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline NotificationData::NotificationData() : + NotificationData(impl::call_factory([](auto&& f) { return f.template ActivateInstance(); })) + { + } + inline NotificationData::NotificationData(param::iterable> const& initialValues, uint32_t sequenceNumber) : + NotificationData(impl::call_factory([&](auto&& f) { return f.CreateNotificationData(initialValues, sequenceNumber); })) + { + } + inline NotificationData::NotificationData(param::iterable> const& initialValues) : + NotificationData(impl::call_factory([&](auto&& f) { return f.CreateNotificationData(initialValues); })) + { + } + inline ScheduledTileNotification::ScheduledTileNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime) : + ScheduledTileNotification(impl::call_factory([&](auto&& f) { return f.CreateScheduledTileNotification(content, deliveryTime); })) + { + } + inline ScheduledToastNotification::ScheduledToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime) : + ScheduledToastNotification(impl::call_factory([&](auto&& f) { return f.CreateScheduledToastNotification(content, deliveryTime); })) + { + } + inline ScheduledToastNotification::ScheduledToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content, Windows::Foundation::DateTime const& deliveryTime, Windows::Foundation::TimeSpan const& snoozeInterval, uint32_t maximumSnoozeCount) : + ScheduledToastNotification(impl::call_factory([&](auto&& f) { return f.CreateScheduledToastNotificationRecurring(content, deliveryTime, snoozeInterval, maximumSnoozeCount); })) + { + } + inline TileFlyoutNotification::TileFlyoutNotification(Windows::Data::Xml::Dom::XmlDocument const& content) : + TileFlyoutNotification(impl::call_factory([&](auto&& f) { return f.CreateTileFlyoutNotification(content); })) + { + } + inline auto TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForApplication() + { + return impl::call_factory([&](auto&& f) { return f.CreateTileFlyoutUpdaterForApplication(); }); + } + inline auto TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForApplication(param::hstring const& applicationId) + { + return impl::call_factory([&](auto&& f) { return f.CreateTileFlyoutUpdaterForApplication(applicationId); }); + } + inline auto TileFlyoutUpdateManager::CreateTileFlyoutUpdaterForSecondaryTile(param::hstring const& tileId) + { + return impl::call_factory([&](auto&& f) { return f.CreateTileFlyoutUpdaterForSecondaryTile(tileId); }); + } + inline auto TileFlyoutUpdateManager::GetTemplateContent(Windows::UI::Notifications::TileFlyoutTemplateType const& type) + { + return impl::call_factory([&](auto&& f) { return f.GetTemplateContent(type); }); + } + inline TileNotification::TileNotification(Windows::Data::Xml::Dom::XmlDocument const& content) : + TileNotification(impl::call_factory([&](auto&& f) { return f.CreateTileNotification(content); })) + { + } + inline auto TileUpdateManager::CreateTileUpdaterForApplication() + { + return impl::call_factory([&](auto&& f) { return f.CreateTileUpdaterForApplication(); }); + } + inline auto TileUpdateManager::CreateTileUpdaterForApplication(param::hstring const& applicationId) + { + return impl::call_factory([&](auto&& f) { return f.CreateTileUpdaterForApplication(applicationId); }); + } + inline auto TileUpdateManager::CreateTileUpdaterForSecondaryTile(param::hstring const& tileId) + { + return impl::call_factory([&](auto&& f) { return f.CreateTileUpdaterForSecondaryTile(tileId); }); + } + inline auto TileUpdateManager::GetTemplateContent(Windows::UI::Notifications::TileTemplateType const& type) + { + return impl::call_factory([&](auto&& f) { return f.GetTemplateContent(type); }); + } + inline auto TileUpdateManager::GetForUser(Windows::System::User const& user) + { + return impl::call_factory([&](auto&& f) { return f.GetForUser(user); }); + } + inline ToastCollection::ToastCollection(param::hstring const& collectionId, param::hstring const& displayName, param::hstring const& launchArgs, Windows::Foundation::Uri const& iconUri) : + ToastCollection(impl::call_factory([&](auto&& f) { return f.CreateInstance(collectionId, displayName, launchArgs, iconUri); })) + { + } + inline ToastNotification::ToastNotification(Windows::Data::Xml::Dom::XmlDocument const& content) : + ToastNotification(impl::call_factory([&](auto&& f) { return f.CreateToastNotification(content); })) + { + } + inline auto ToastNotificationManager::CreateToastNotifier() + { + return impl::call_factory([&](auto&& f) { return f.CreateToastNotifier(); }); + } + inline auto ToastNotificationManager::CreateToastNotifier(param::hstring const& applicationId) + { + return impl::call_factory([&](auto&& f) { return f.CreateToastNotifier(applicationId); }); + } + inline auto ToastNotificationManager::GetTemplateContent(Windows::UI::Notifications::ToastTemplateType const& type) + { + return impl::call_factory([&](auto&& f) { return f.GetTemplateContent(type); }); + } + inline auto ToastNotificationManager::History() + { + return impl::call_factory([&](auto&& f) { return f.History(); }); + } + inline auto ToastNotificationManager::GetForUser(Windows::System::User const& user) + { + return impl::call_factory([&](auto&& f) { return f.GetForUser(user); }); + } + inline auto ToastNotificationManager::ConfigureNotificationMirroring(Windows::UI::Notifications::NotificationMirroring const& value) + { + impl::call_factory([&](auto&& f) { return f.ConfigureNotificationMirroring(value); }); + } + inline auto ToastNotificationManager::GetDefault() + { + return impl::call_factory([&](auto&& f) { return f.GetDefault(); }); + } +} +namespace std +{ + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.h new file mode 100644 index 00000000..f122e18e --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/Windows.UI.h @@ -0,0 +1,2647 @@ +// C++/WinRT v2.0.190620.2 + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#ifndef WINRT_Windows_UI_H +#define WINRT_Windows_UI_H +#include "base.h" +static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers."); +#include "impl/Windows.UI.2.h" +namespace winrt::impl +{ + template auto consume_Windows_UI_IColorHelperStatics::FromArgb(uint8_t a, uint8_t r, uint8_t g, uint8_t b) const + { + Windows::UI::Color returnValue; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorHelperStatics)->FromArgb(a, r, g, b, put_abi(returnValue))); + return returnValue; + } + template auto consume_Windows_UI_IColorHelperStatics2::ToDisplayName(Windows::UI::Color const& color) const + { + void* returnValue{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorHelperStatics2)->ToDisplayName(impl::bind_in(color), &returnValue)); + return hstring{ returnValue, take_ownership_from_abi }; + } + template auto consume_Windows_UI_IColorsStatics::AliceBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_AliceBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::AntiqueWhite() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_AntiqueWhite(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Aqua() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Aqua(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Aquamarine() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Aquamarine(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Azure() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Azure(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Beige() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Beige(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Bisque() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Bisque(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Black() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Black(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::BlanchedAlmond() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_BlanchedAlmond(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Blue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Blue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::BlueViolet() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_BlueViolet(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Brown() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Brown(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::BurlyWood() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_BurlyWood(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::CadetBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_CadetBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Chartreuse() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Chartreuse(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Chocolate() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Chocolate(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Coral() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Coral(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::CornflowerBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_CornflowerBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Cornsilk() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Cornsilk(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Crimson() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Crimson(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Cyan() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Cyan(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkCyan() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkCyan(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkGoldenrod() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkGoldenrod(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkKhaki() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkKhaki(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkMagenta() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkMagenta(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkOliveGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkOliveGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkOrange() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkOrange(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkOrchid() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkOrchid(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkSalmon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkSalmon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkSeaGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkSeaGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkSlateBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkSlateBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkSlateGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkSlateGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkTurquoise() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkTurquoise(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DarkViolet() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DarkViolet(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DeepPink() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DeepPink(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DeepSkyBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DeepSkyBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DimGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DimGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::DodgerBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_DodgerBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Firebrick() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Firebrick(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::FloralWhite() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_FloralWhite(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::ForestGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_ForestGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Fuchsia() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Fuchsia(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Gainsboro() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Gainsboro(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::GhostWhite() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_GhostWhite(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Gold() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Gold(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Goldenrod() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Goldenrod(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Gray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Gray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Green() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Green(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::GreenYellow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_GreenYellow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Honeydew() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Honeydew(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::HotPink() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_HotPink(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::IndianRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_IndianRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Indigo() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Indigo(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Ivory() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Ivory(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Khaki() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Khaki(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Lavender() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Lavender(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LavenderBlush() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LavenderBlush(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LawnGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LawnGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LemonChiffon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LemonChiffon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightCoral() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightCoral(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightCyan() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightCyan(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightGoldenrodYellow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightGoldenrodYellow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightPink() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightPink(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSalmon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSalmon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSeaGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSeaGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSkyBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSkyBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSlateGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSlateGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightSteelBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightSteelBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LightYellow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LightYellow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Lime() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Lime(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::LimeGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_LimeGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Linen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Linen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Magenta() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Magenta(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Maroon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Maroon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumAquamarine() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumAquamarine(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumOrchid() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumOrchid(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumPurple() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumPurple(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumSeaGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumSeaGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumSlateBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumSlateBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumSpringGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumSpringGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumTurquoise() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumTurquoise(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MediumVioletRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MediumVioletRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MidnightBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MidnightBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MintCream() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MintCream(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::MistyRose() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_MistyRose(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Moccasin() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Moccasin(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::NavajoWhite() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_NavajoWhite(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Navy() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Navy(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::OldLace() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_OldLace(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Olive() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Olive(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::OliveDrab() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_OliveDrab(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Orange() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Orange(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::OrangeRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_OrangeRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Orchid() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Orchid(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PaleGoldenrod() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PaleGoldenrod(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PaleGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PaleGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PaleTurquoise() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PaleTurquoise(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PaleVioletRed() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PaleVioletRed(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PapayaWhip() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PapayaWhip(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PeachPuff() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PeachPuff(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Peru() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Peru(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Pink() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Pink(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Plum() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Plum(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::PowderBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_PowderBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Purple() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Purple(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Red() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Red(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::RosyBrown() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_RosyBrown(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::RoyalBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_RoyalBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SaddleBrown() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SaddleBrown(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Salmon() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Salmon(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SandyBrown() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SandyBrown(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SeaGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SeaGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SeaShell() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SeaShell(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Sienna() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Sienna(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Silver() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Silver(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SkyBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SkyBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SlateBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SlateBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SlateGray() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SlateGray(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Snow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Snow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SpringGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SpringGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::SteelBlue() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_SteelBlue(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Tan() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Tan(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Teal() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Teal(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Thistle() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Thistle(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Tomato() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Tomato(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Transparent() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Transparent(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Turquoise() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Turquoise(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Violet() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Violet(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Wheat() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Wheat(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::White() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_White(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::WhiteSmoke() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_WhiteSmoke(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::Yellow() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_Yellow(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IColorsStatics::YellowGreen() const + { + Windows::UI::Color value; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IColorsStatics)->get_YellowGreen(put_abi(value))); + return value; + } + template auto consume_Windows_UI_IUIContentRoot::UIContext() const + { + void* value{}; + check_hresult(WINRT_IMPL_SHIM(Windows::UI::IUIContentRoot)->get_UIContext(&value)); + return Windows::UI::UIContext{ value, take_ownership_from_abi }; + } + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall FromArgb(uint8_t a, uint8_t r, uint8_t g, uint8_t b, struct struct_Windows_UI_Color* returnValue) noexcept final try + { + zero_abi(returnValue); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_from(this->shim().FromArgb(a, r, g, b)); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall ToDisplayName(struct struct_Windows_UI_Color color, void** returnValue) noexcept final try + { + clear_abi(returnValue); + typename D::abi_guard guard(this->shim()); + *returnValue = detach_from(this->shim().ToDisplayName(*reinterpret_cast(&color))); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; + template + struct produce : produce_base + { + int32_t __stdcall get_AliceBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AliceBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_AntiqueWhite(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().AntiqueWhite()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Aqua(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Aqua()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Aquamarine(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Aquamarine()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Azure(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Azure()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Beige(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Beige()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Bisque(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Bisque()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Black(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Black()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BlanchedAlmond(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BlanchedAlmond()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Blue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Blue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BlueViolet(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BlueViolet()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Brown(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Brown()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_BurlyWood(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().BurlyWood()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_CadetBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CadetBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Chartreuse(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Chartreuse()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Chocolate(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Chocolate()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Coral(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Coral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_CornflowerBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().CornflowerBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Cornsilk(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Cornsilk()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Crimson(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Crimson()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Cyan(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Cyan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkCyan(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkCyan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkGoldenrod(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkGoldenrod()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkKhaki(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkKhaki()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkMagenta(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkMagenta()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkOliveGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkOliveGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkOrange(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkOrange()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkOrchid(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkOrchid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkSalmon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkSalmon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkSeaGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkSeaGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkSlateBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkSlateBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkSlateGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkSlateGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkTurquoise(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkTurquoise()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DarkViolet(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DarkViolet()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DeepPink(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DeepPink()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DeepSkyBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DeepSkyBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DimGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DimGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_DodgerBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().DodgerBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Firebrick(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Firebrick()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_FloralWhite(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().FloralWhite()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_ForestGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().ForestGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Fuchsia(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Fuchsia()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Gainsboro(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Gainsboro()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_GhostWhite(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GhostWhite()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Gold(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Gold()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Goldenrod(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Goldenrod()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Gray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Gray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Green(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Green()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_GreenYellow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().GreenYellow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Honeydew(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Honeydew()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_HotPink(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().HotPink()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_IndianRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().IndianRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Indigo(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Indigo()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Ivory(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Ivory()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Khaki(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Khaki()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Lavender(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Lavender()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LavenderBlush(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LavenderBlush()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LawnGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LawnGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LemonChiffon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LemonChiffon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightCoral(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightCoral()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightCyan(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightCyan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightGoldenrodYellow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightGoldenrodYellow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightPink(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightPink()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSalmon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSalmon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSeaGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSeaGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSkyBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSkyBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSlateGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSlateGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightSteelBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightSteelBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LightYellow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LightYellow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Lime(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Lime()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_LimeGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().LimeGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Linen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Linen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Magenta(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Magenta()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Maroon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Maroon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumAquamarine(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumAquamarine()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumOrchid(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumOrchid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumPurple(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumPurple()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumSeaGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumSeaGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumSlateBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumSlateBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumSpringGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumSpringGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumTurquoise(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumTurquoise()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MediumVioletRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MediumVioletRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MidnightBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MidnightBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MintCream(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MintCream()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_MistyRose(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().MistyRose()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Moccasin(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Moccasin()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_NavajoWhite(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().NavajoWhite()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Navy(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Navy()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_OldLace(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().OldLace()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Olive(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Olive()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_OliveDrab(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().OliveDrab()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Orange(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Orange()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_OrangeRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().OrangeRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Orchid(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Orchid()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PaleGoldenrod(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PaleGoldenrod()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PaleGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PaleGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PaleTurquoise(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PaleTurquoise()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PaleVioletRed(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PaleVioletRed()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PapayaWhip(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PapayaWhip()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PeachPuff(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PeachPuff()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Peru(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Peru()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Pink(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Pink()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Plum(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Plum()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_PowderBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().PowderBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Purple(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Purple()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Red(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Red()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RosyBrown(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RosyBrown()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_RoyalBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().RoyalBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SaddleBrown(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SaddleBrown()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Salmon(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Salmon()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SandyBrown(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SandyBrown()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SeaGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SeaGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SeaShell(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SeaShell()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Sienna(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Sienna()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Silver(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Silver()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SkyBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SkyBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SlateBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SlateBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SlateGray(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SlateGray()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Snow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Snow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SpringGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SpringGreen()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_SteelBlue(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().SteelBlue()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tan(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tan()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Teal(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Teal()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Thistle(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Thistle()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Tomato(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Tomato()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Transparent(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Transparent()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Turquoise(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Turquoise()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Violet(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Violet()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Wheat(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Wheat()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_White(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().White()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_WhiteSmoke(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().WhiteSmoke()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_Yellow(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().Yellow()); + return 0; + } + catch (...) { return to_hresult(); } + int32_t __stdcall get_YellowGreen(struct struct_Windows_UI_Color* value) noexcept final try + { + zero_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().YellowGreen()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + int32_t __stdcall get_UIContext(void** value) noexcept final try + { + clear_abi(value); + typename D::abi_guard guard(this->shim()); + *value = detach_from(this->shim().UIContext()); + return 0; + } + catch (...) { return to_hresult(); } + }; + template + struct produce : produce_base + { + }; +} +namespace winrt::Windows::UI +{ + inline auto ColorHelper::FromArgb(uint8_t a, uint8_t r, uint8_t g, uint8_t b) + { + return impl::call_factory([&](auto&& f) { return f.FromArgb(a, r, g, b); }); + } + inline auto ColorHelper::ToDisplayName(Windows::UI::Color const& color) + { + return impl::call_factory([&](auto&& f) { return f.ToDisplayName(color); }); + } + inline auto Colors::AliceBlue() + { + return impl::call_factory([&](auto&& f) { return f.AliceBlue(); }); + } + inline auto Colors::AntiqueWhite() + { + return impl::call_factory([&](auto&& f) { return f.AntiqueWhite(); }); + } + inline auto Colors::Aqua() + { + return impl::call_factory([&](auto&& f) { return f.Aqua(); }); + } + inline auto Colors::Aquamarine() + { + return impl::call_factory([&](auto&& f) { return f.Aquamarine(); }); + } + inline auto Colors::Azure() + { + return impl::call_factory([&](auto&& f) { return f.Azure(); }); + } + inline auto Colors::Beige() + { + return impl::call_factory([&](auto&& f) { return f.Beige(); }); + } + inline auto Colors::Bisque() + { + return impl::call_factory([&](auto&& f) { return f.Bisque(); }); + } + inline auto Colors::Black() + { + return impl::call_factory([&](auto&& f) { return f.Black(); }); + } + inline auto Colors::BlanchedAlmond() + { + return impl::call_factory([&](auto&& f) { return f.BlanchedAlmond(); }); + } + inline auto Colors::Blue() + { + return impl::call_factory([&](auto&& f) { return f.Blue(); }); + } + inline auto Colors::BlueViolet() + { + return impl::call_factory([&](auto&& f) { return f.BlueViolet(); }); + } + inline auto Colors::Brown() + { + return impl::call_factory([&](auto&& f) { return f.Brown(); }); + } + inline auto Colors::BurlyWood() + { + return impl::call_factory([&](auto&& f) { return f.BurlyWood(); }); + } + inline auto Colors::CadetBlue() + { + return impl::call_factory([&](auto&& f) { return f.CadetBlue(); }); + } + inline auto Colors::Chartreuse() + { + return impl::call_factory([&](auto&& f) { return f.Chartreuse(); }); + } + inline auto Colors::Chocolate() + { + return impl::call_factory([&](auto&& f) { return f.Chocolate(); }); + } + inline auto Colors::Coral() + { + return impl::call_factory([&](auto&& f) { return f.Coral(); }); + } + inline auto Colors::CornflowerBlue() + { + return impl::call_factory([&](auto&& f) { return f.CornflowerBlue(); }); + } + inline auto Colors::Cornsilk() + { + return impl::call_factory([&](auto&& f) { return f.Cornsilk(); }); + } + inline auto Colors::Crimson() + { + return impl::call_factory([&](auto&& f) { return f.Crimson(); }); + } + inline auto Colors::Cyan() + { + return impl::call_factory([&](auto&& f) { return f.Cyan(); }); + } + inline auto Colors::DarkBlue() + { + return impl::call_factory([&](auto&& f) { return f.DarkBlue(); }); + } + inline auto Colors::DarkCyan() + { + return impl::call_factory([&](auto&& f) { return f.DarkCyan(); }); + } + inline auto Colors::DarkGoldenrod() + { + return impl::call_factory([&](auto&& f) { return f.DarkGoldenrod(); }); + } + inline auto Colors::DarkGray() + { + return impl::call_factory([&](auto&& f) { return f.DarkGray(); }); + } + inline auto Colors::DarkGreen() + { + return impl::call_factory([&](auto&& f) { return f.DarkGreen(); }); + } + inline auto Colors::DarkKhaki() + { + return impl::call_factory([&](auto&& f) { return f.DarkKhaki(); }); + } + inline auto Colors::DarkMagenta() + { + return impl::call_factory([&](auto&& f) { return f.DarkMagenta(); }); + } + inline auto Colors::DarkOliveGreen() + { + return impl::call_factory([&](auto&& f) { return f.DarkOliveGreen(); }); + } + inline auto Colors::DarkOrange() + { + return impl::call_factory([&](auto&& f) { return f.DarkOrange(); }); + } + inline auto Colors::DarkOrchid() + { + return impl::call_factory([&](auto&& f) { return f.DarkOrchid(); }); + } + inline auto Colors::DarkRed() + { + return impl::call_factory([&](auto&& f) { return f.DarkRed(); }); + } + inline auto Colors::DarkSalmon() + { + return impl::call_factory([&](auto&& f) { return f.DarkSalmon(); }); + } + inline auto Colors::DarkSeaGreen() + { + return impl::call_factory([&](auto&& f) { return f.DarkSeaGreen(); }); + } + inline auto Colors::DarkSlateBlue() + { + return impl::call_factory([&](auto&& f) { return f.DarkSlateBlue(); }); + } + inline auto Colors::DarkSlateGray() + { + return impl::call_factory([&](auto&& f) { return f.DarkSlateGray(); }); + } + inline auto Colors::DarkTurquoise() + { + return impl::call_factory([&](auto&& f) { return f.DarkTurquoise(); }); + } + inline auto Colors::DarkViolet() + { + return impl::call_factory([&](auto&& f) { return f.DarkViolet(); }); + } + inline auto Colors::DeepPink() + { + return impl::call_factory([&](auto&& f) { return f.DeepPink(); }); + } + inline auto Colors::DeepSkyBlue() + { + return impl::call_factory([&](auto&& f) { return f.DeepSkyBlue(); }); + } + inline auto Colors::DimGray() + { + return impl::call_factory([&](auto&& f) { return f.DimGray(); }); + } + inline auto Colors::DodgerBlue() + { + return impl::call_factory([&](auto&& f) { return f.DodgerBlue(); }); + } + inline auto Colors::Firebrick() + { + return impl::call_factory([&](auto&& f) { return f.Firebrick(); }); + } + inline auto Colors::FloralWhite() + { + return impl::call_factory([&](auto&& f) { return f.FloralWhite(); }); + } + inline auto Colors::ForestGreen() + { + return impl::call_factory([&](auto&& f) { return f.ForestGreen(); }); + } + inline auto Colors::Fuchsia() + { + return impl::call_factory([&](auto&& f) { return f.Fuchsia(); }); + } + inline auto Colors::Gainsboro() + { + return impl::call_factory([&](auto&& f) { return f.Gainsboro(); }); + } + inline auto Colors::GhostWhite() + { + return impl::call_factory([&](auto&& f) { return f.GhostWhite(); }); + } + inline auto Colors::Gold() + { + return impl::call_factory([&](auto&& f) { return f.Gold(); }); + } + inline auto Colors::Goldenrod() + { + return impl::call_factory([&](auto&& f) { return f.Goldenrod(); }); + } + inline auto Colors::Gray() + { + return impl::call_factory([&](auto&& f) { return f.Gray(); }); + } + inline auto Colors::Green() + { + return impl::call_factory([&](auto&& f) { return f.Green(); }); + } + inline auto Colors::GreenYellow() + { + return impl::call_factory([&](auto&& f) { return f.GreenYellow(); }); + } + inline auto Colors::Honeydew() + { + return impl::call_factory([&](auto&& f) { return f.Honeydew(); }); + } + inline auto Colors::HotPink() + { + return impl::call_factory([&](auto&& f) { return f.HotPink(); }); + } + inline auto Colors::IndianRed() + { + return impl::call_factory([&](auto&& f) { return f.IndianRed(); }); + } + inline auto Colors::Indigo() + { + return impl::call_factory([&](auto&& f) { return f.Indigo(); }); + } + inline auto Colors::Ivory() + { + return impl::call_factory([&](auto&& f) { return f.Ivory(); }); + } + inline auto Colors::Khaki() + { + return impl::call_factory([&](auto&& f) { return f.Khaki(); }); + } + inline auto Colors::Lavender() + { + return impl::call_factory([&](auto&& f) { return f.Lavender(); }); + } + inline auto Colors::LavenderBlush() + { + return impl::call_factory([&](auto&& f) { return f.LavenderBlush(); }); + } + inline auto Colors::LawnGreen() + { + return impl::call_factory([&](auto&& f) { return f.LawnGreen(); }); + } + inline auto Colors::LemonChiffon() + { + return impl::call_factory([&](auto&& f) { return f.LemonChiffon(); }); + } + inline auto Colors::LightBlue() + { + return impl::call_factory([&](auto&& f) { return f.LightBlue(); }); + } + inline auto Colors::LightCoral() + { + return impl::call_factory([&](auto&& f) { return f.LightCoral(); }); + } + inline auto Colors::LightCyan() + { + return impl::call_factory([&](auto&& f) { return f.LightCyan(); }); + } + inline auto Colors::LightGoldenrodYellow() + { + return impl::call_factory([&](auto&& f) { return f.LightGoldenrodYellow(); }); + } + inline auto Colors::LightGreen() + { + return impl::call_factory([&](auto&& f) { return f.LightGreen(); }); + } + inline auto Colors::LightGray() + { + return impl::call_factory([&](auto&& f) { return f.LightGray(); }); + } + inline auto Colors::LightPink() + { + return impl::call_factory([&](auto&& f) { return f.LightPink(); }); + } + inline auto Colors::LightSalmon() + { + return impl::call_factory([&](auto&& f) { return f.LightSalmon(); }); + } + inline auto Colors::LightSeaGreen() + { + return impl::call_factory([&](auto&& f) { return f.LightSeaGreen(); }); + } + inline auto Colors::LightSkyBlue() + { + return impl::call_factory([&](auto&& f) { return f.LightSkyBlue(); }); + } + inline auto Colors::LightSlateGray() + { + return impl::call_factory([&](auto&& f) { return f.LightSlateGray(); }); + } + inline auto Colors::LightSteelBlue() + { + return impl::call_factory([&](auto&& f) { return f.LightSteelBlue(); }); + } + inline auto Colors::LightYellow() + { + return impl::call_factory([&](auto&& f) { return f.LightYellow(); }); + } + inline auto Colors::Lime() + { + return impl::call_factory([&](auto&& f) { return f.Lime(); }); + } + inline auto Colors::LimeGreen() + { + return impl::call_factory([&](auto&& f) { return f.LimeGreen(); }); + } + inline auto Colors::Linen() + { + return impl::call_factory([&](auto&& f) { return f.Linen(); }); + } + inline auto Colors::Magenta() + { + return impl::call_factory([&](auto&& f) { return f.Magenta(); }); + } + inline auto Colors::Maroon() + { + return impl::call_factory([&](auto&& f) { return f.Maroon(); }); + } + inline auto Colors::MediumAquamarine() + { + return impl::call_factory([&](auto&& f) { return f.MediumAquamarine(); }); + } + inline auto Colors::MediumBlue() + { + return impl::call_factory([&](auto&& f) { return f.MediumBlue(); }); + } + inline auto Colors::MediumOrchid() + { + return impl::call_factory([&](auto&& f) { return f.MediumOrchid(); }); + } + inline auto Colors::MediumPurple() + { + return impl::call_factory([&](auto&& f) { return f.MediumPurple(); }); + } + inline auto Colors::MediumSeaGreen() + { + return impl::call_factory([&](auto&& f) { return f.MediumSeaGreen(); }); + } + inline auto Colors::MediumSlateBlue() + { + return impl::call_factory([&](auto&& f) { return f.MediumSlateBlue(); }); + } + inline auto Colors::MediumSpringGreen() + { + return impl::call_factory([&](auto&& f) { return f.MediumSpringGreen(); }); + } + inline auto Colors::MediumTurquoise() + { + return impl::call_factory([&](auto&& f) { return f.MediumTurquoise(); }); + } + inline auto Colors::MediumVioletRed() + { + return impl::call_factory([&](auto&& f) { return f.MediumVioletRed(); }); + } + inline auto Colors::MidnightBlue() + { + return impl::call_factory([&](auto&& f) { return f.MidnightBlue(); }); + } + inline auto Colors::MintCream() + { + return impl::call_factory([&](auto&& f) { return f.MintCream(); }); + } + inline auto Colors::MistyRose() + { + return impl::call_factory([&](auto&& f) { return f.MistyRose(); }); + } + inline auto Colors::Moccasin() + { + return impl::call_factory([&](auto&& f) { return f.Moccasin(); }); + } + inline auto Colors::NavajoWhite() + { + return impl::call_factory([&](auto&& f) { return f.NavajoWhite(); }); + } + inline auto Colors::Navy() + { + return impl::call_factory([&](auto&& f) { return f.Navy(); }); + } + inline auto Colors::OldLace() + { + return impl::call_factory([&](auto&& f) { return f.OldLace(); }); + } + inline auto Colors::Olive() + { + return impl::call_factory([&](auto&& f) { return f.Olive(); }); + } + inline auto Colors::OliveDrab() + { + return impl::call_factory([&](auto&& f) { return f.OliveDrab(); }); + } + inline auto Colors::Orange() + { + return impl::call_factory([&](auto&& f) { return f.Orange(); }); + } + inline auto Colors::OrangeRed() + { + return impl::call_factory([&](auto&& f) { return f.OrangeRed(); }); + } + inline auto Colors::Orchid() + { + return impl::call_factory([&](auto&& f) { return f.Orchid(); }); + } + inline auto Colors::PaleGoldenrod() + { + return impl::call_factory([&](auto&& f) { return f.PaleGoldenrod(); }); + } + inline auto Colors::PaleGreen() + { + return impl::call_factory([&](auto&& f) { return f.PaleGreen(); }); + } + inline auto Colors::PaleTurquoise() + { + return impl::call_factory([&](auto&& f) { return f.PaleTurquoise(); }); + } + inline auto Colors::PaleVioletRed() + { + return impl::call_factory([&](auto&& f) { return f.PaleVioletRed(); }); + } + inline auto Colors::PapayaWhip() + { + return impl::call_factory([&](auto&& f) { return f.PapayaWhip(); }); + } + inline auto Colors::PeachPuff() + { + return impl::call_factory([&](auto&& f) { return f.PeachPuff(); }); + } + inline auto Colors::Peru() + { + return impl::call_factory([&](auto&& f) { return f.Peru(); }); + } + inline auto Colors::Pink() + { + return impl::call_factory([&](auto&& f) { return f.Pink(); }); + } + inline auto Colors::Plum() + { + return impl::call_factory([&](auto&& f) { return f.Plum(); }); + } + inline auto Colors::PowderBlue() + { + return impl::call_factory([&](auto&& f) { return f.PowderBlue(); }); + } + inline auto Colors::Purple() + { + return impl::call_factory([&](auto&& f) { return f.Purple(); }); + } + inline auto Colors::Red() + { + return impl::call_factory([&](auto&& f) { return f.Red(); }); + } + inline auto Colors::RosyBrown() + { + return impl::call_factory([&](auto&& f) { return f.RosyBrown(); }); + } + inline auto Colors::RoyalBlue() + { + return impl::call_factory([&](auto&& f) { return f.RoyalBlue(); }); + } + inline auto Colors::SaddleBrown() + { + return impl::call_factory([&](auto&& f) { return f.SaddleBrown(); }); + } + inline auto Colors::Salmon() + { + return impl::call_factory([&](auto&& f) { return f.Salmon(); }); + } + inline auto Colors::SandyBrown() + { + return impl::call_factory([&](auto&& f) { return f.SandyBrown(); }); + } + inline auto Colors::SeaGreen() + { + return impl::call_factory([&](auto&& f) { return f.SeaGreen(); }); + } + inline auto Colors::SeaShell() + { + return impl::call_factory([&](auto&& f) { return f.SeaShell(); }); + } + inline auto Colors::Sienna() + { + return impl::call_factory([&](auto&& f) { return f.Sienna(); }); + } + inline auto Colors::Silver() + { + return impl::call_factory([&](auto&& f) { return f.Silver(); }); + } + inline auto Colors::SkyBlue() + { + return impl::call_factory([&](auto&& f) { return f.SkyBlue(); }); + } + inline auto Colors::SlateBlue() + { + return impl::call_factory([&](auto&& f) { return f.SlateBlue(); }); + } + inline auto Colors::SlateGray() + { + return impl::call_factory([&](auto&& f) { return f.SlateGray(); }); + } + inline auto Colors::Snow() + { + return impl::call_factory([&](auto&& f) { return f.Snow(); }); + } + inline auto Colors::SpringGreen() + { + return impl::call_factory([&](auto&& f) { return f.SpringGreen(); }); + } + inline auto Colors::SteelBlue() + { + return impl::call_factory([&](auto&& f) { return f.SteelBlue(); }); + } + inline auto Colors::Tan() + { + return impl::call_factory([&](auto&& f) { return f.Tan(); }); + } + inline auto Colors::Teal() + { + return impl::call_factory([&](auto&& f) { return f.Teal(); }); + } + inline auto Colors::Thistle() + { + return impl::call_factory([&](auto&& f) { return f.Thistle(); }); + } + inline auto Colors::Tomato() + { + return impl::call_factory([&](auto&& f) { return f.Tomato(); }); + } + inline auto Colors::Transparent() + { + return impl::call_factory([&](auto&& f) { return f.Transparent(); }); + } + inline auto Colors::Turquoise() + { + return impl::call_factory([&](auto&& f) { return f.Turquoise(); }); + } + inline auto Colors::Violet() + { + return impl::call_factory([&](auto&& f) { return f.Violet(); }); + } + inline auto Colors::Wheat() + { + return impl::call_factory([&](auto&& f) { return f.Wheat(); }); + } + inline auto Colors::White() + { + return impl::call_factory([&](auto&& f) { return f.White(); }); + } + inline auto Colors::WhiteSmoke() + { + return impl::call_factory([&](auto&& f) { return f.WhiteSmoke(); }); + } + inline auto Colors::Yellow() + { + return impl::call_factory([&](auto&& f) { return f.Yellow(); }); + } + inline auto Colors::YellowGreen() + { + return impl::call_factory([&](auto&& f) { return f.YellowGreen(); }); + } +} +namespace std +{ + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; + template<> struct hash : winrt::impl::hash_base {}; +} +#endif diff --git a/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/base.h b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/base.h new file mode 100644 index 00000000..e68a8167 --- /dev/null +++ b/plugins/windows-notification/yolort/include/winrt/yolort_impl/winrt/base.h @@ -0,0 +1,8109 @@ +// C++/WinRT v2.0.190620.2 +// Patched with YoloRT + +// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright © 2021, mjk +// Licensed under the MIT License. + +#ifndef WINRT_BASE_H +#define WINRT_BASE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __has_include() +#define WINRT_NUMERICS +#if __has_include() +// mingw 6.0.0 headers don't have this and it *seems* unused in winrt, but +// leaving it in just in case: +#include +#endif +#define _WINDOWS_NUMERICS_NAMESPACE_ winrt::Windows::Foundation::Numerics +#define _WINDOWS_NUMERICS_BEGIN_NAMESPACE_ namespace winrt::Windows::Foundation::Numerics +#define _WINDOWS_NUMERICS_END_NAMESPACE_ +#ifdef __clang__ +#define _XM_NO_INTRINSICS_ +#endif +#include +#ifdef __clang__ +#undef _XM_NO_INTRINSICS_ +#endif +#undef _WINDOWS_NUMERICS_NAMESPACE_ +#undef _WINDOWS_NUMERICS_BEGIN_NAMESPACE_ +#undef _WINDOWS_NUMERICS_END_NAMESPACE_ +#endif + +#ifdef __cpp_lib_coroutine + +#include +#define _RESUMABLE_FUNCTIONS_SUPPORTED + +namespace winrt::impl +{ + template + using coroutine_handle = std::coroutine_handle; + + using suspend_always = std::suspend_always; + using suspend_never = std::suspend_never; +} + +#elif __has_include() + +#include +#define _RESUMABLE_FUNCTIONS_SUPPORTED + +namespace winrt::impl +{ + // the spaces after `::` protect against the evils of sed: + + template + using coroutine_handle = std::experimental:: coroutine_handle; + + using suspend_always = std::experimental:: suspend_always; + using suspend_never = std::experimental:: suspend_never; +} + +#else + +#include + +namespace winrt::impl +{ + template + using coroutine_handle = corostub::coroutine_handle; + + using suspend_always = corostub::suspend_always; + using suspend_never = corostub::suspend_never; +} + +#endif + +#ifdef _DEBUG + +#define WINRT_ASSERT _ASSERTE +#define WINRT_VERIFY WINRT_ASSERT +#define WINRT_VERIFY_(result, expression) WINRT_ASSERT(result == expression) + +#else + +#define WINRT_ASSERT(expression) ((void)0) +#define WINRT_VERIFY(expression) (void)(expression) +#define WINRT_VERIFY_(result, expression) (void)(expression) + +#endif + +#define WINRT_IMPL_SHIM(...) (*(abi_t<__VA_ARGS__>**)&static_cast<__VA_ARGS__ const&>(static_cast(*this))) + +#ifndef WINRT_EXTERNAL_CATCH_CLAUSE +#define WINRT_EXTERNAL_CATCH_CLAUSE +#endif + +// Note: this is a workaround for a false-positive warning produced by the Visual C++ 15.9 compiler. +#pragma warning(disable : 5046) + +namespace winrt::impl +{ +#ifdef __IUnknown_INTERFACE_DEFINED__ +#define WINRT_WINDOWS_ABI + using hresult_type = long; + using ref_count_type = unsigned long; +#else + using hresult_type = int32_t; + using ref_count_type = uint32_t; +#endif + + using ptp_io = struct tp_io*; + using ptp_timer = struct tp_timer*; + using ptp_wait = struct tp_wait*; + using ptp_pool = struct tp_pool*; + using srwlock = struct srwlock_*; + using condition_variable = struct condition_variable_*; + using bstr = wchar_t*; +} + +namespace winrt +{ + struct hresult + { + int32_t value{}; + + constexpr hresult() noexcept = default; + + constexpr hresult(int32_t const value) noexcept : value(value) + { + } + + constexpr operator int32_t() const noexcept + { + return value; + } + }; + + struct guid + { + uint32_t Data1; + uint16_t Data2; + uint16_t Data3; + uint8_t Data4[8]; + + guid() noexcept = default; + + constexpr guid(uint32_t const Data1, uint16_t const Data2, uint16_t const Data3, std::array const& Data4) noexcept : + Data1(Data1), + Data2(Data2), + Data3(Data3), + Data4{ Data4[0], Data4[1], Data4[2], Data4[3], Data4[4], Data4[5], Data4[6], Data4[7] } + { + } + +#ifdef WINRT_WINDOWS_ABI + + constexpr guid(GUID const& value) noexcept : + Data1(value.Data1), + Data2(value.Data2), + Data3(value.Data3), + Data4{ value.Data4[0], value.Data4[1], value.Data4[2], value.Data4[3], value.Data4[4], value.Data4[5], value.Data4[6], value.Data4[7] } + { + + } + + operator GUID const&() const noexcept + { + return reinterpret_cast(*this); + } + +#endif + }; + + inline bool operator==(guid const& left, guid const& right) noexcept + { + return !memcmp(&left, &right, sizeof(guid)); + } + + inline bool operator!=(guid const& left, guid const& right) noexcept + { + return !(left == right); + } +} + +namespace winrt::Windows::Foundation +{ + enum class TrustLevel : int32_t + { + BaseTrust, + PartialTrust, + FullTrust + }; + + struct IUnknown; + struct IInspectable; + struct IActivationFactory; +} + + +namespace winrt { +extern "C" +{ + int32_t __stdcall GetRestrictedErrorInfo(void** info) noexcept; + int32_t __stdcall RoGetActivationFactory(void* classId, winrt::guid const& iid, void** factory) noexcept; + int32_t __stdcall RoInitialize(uint32_t type) noexcept; + int32_t __stdcall RoOriginateLanguageException(int32_t error, void* message, void* exception) noexcept; + void __stdcall RoUninitialize() noexcept; + int32_t __stdcall SetRestrictedErrorInfo(void* info) noexcept; + int32_t __stdcall RoGetAgileReference(uint32_t options, winrt::guid const& iid, void* object, void** reference) noexcept; + inline const auto &CoIncrementMTAUsage = *[] + { + using farproc = void(); + extern void *LoadLibraryW(const wchar_t *) noexcept __stdcall; + extern farproc *GetProcAddress(void *, const char *) noexcept __stdcall; + + using F = int32_t __stdcall(void **) noexcept; + const auto fp = reinterpret_cast(GetProcAddress(LoadLibraryW(L"ole32.dll"),"CoIncrementMTAUsage")); + if (not fp) + throw std::runtime_error{"couldn't load CoIncrementMTAUsage from ole32.dll"}; + return fp; + }(); + [[noreturn]] void __stdcall RoFailFastWithErrorContext(int32_t error) noexcept; + int32_t __stdcall RoTransformError(int32_t oldError, int32_t newError, void* message) noexcept; + + int32_t __stdcall WindowsCreateString(wchar_t const* sourceString, uint32_t length, void** string) noexcept; + int32_t __stdcall WindowsCreateStringReference(wchar_t const* sourceString, uint32_t length, void* hstringHeader, void** string) noexcept; + int32_t __stdcall WindowsDuplicateString(void* string, void** newString) noexcept; + int32_t __stdcall WindowsDeleteString(void* string) noexcept; + int32_t __stdcall WindowsStringHasEmbeddedNull(void* string, int* hasEmbedNull) noexcept; + int32_t __stdcall WindowsPreallocateStringBuffer(uint32_t length, wchar_t** charBuffer, void** bufferHandle) noexcept; + int32_t __stdcall WindowsDeleteStringBuffer(void* bufferHandle) noexcept; + int32_t __stdcall WindowsPromoteStringBuffer(void* bufferHandle, void** string) noexcept; + int32_t __stdcall WindowsConcatString(void* string1, void* string2, void** newString) noexcept; + wchar_t const* __stdcall WindowsGetStringRawBuffer(void* string, uint32_t* length) noexcept; + uint32_t __stdcall WindowsGetStringLen(void* string) noexcept; + + int32_t __stdcall CoCreateFreeThreadedMarshaler(void* outer, void** marshaler) noexcept; + int32_t __stdcall CoCreateInstance(winrt::guid const& clsid, void* outer, uint32_t context, winrt::guid const& iid, void** object) noexcept; + int32_t __stdcall CoGetCallContext(winrt::guid const& iid, void** object) noexcept; + int32_t __stdcall CoGetObjectContext(winrt::guid const& iid, void** object) noexcept; + int32_t __stdcall CoGetApartmentType(int32_t* type, int32_t* qualifier) noexcept; + void* __stdcall CoTaskMemAlloc(std::size_t size) noexcept; + void __stdcall CoTaskMemFree(void* ptr) noexcept; + void __stdcall SysFreeString(winrt::impl::bstr string) noexcept; + uint32_t __stdcall SysStringLen(winrt::impl::bstr string) noexcept; + int32_t __stdcall IIDFromString(wchar_t const* string, winrt::guid* iid) noexcept; + int32_t __stdcall MultiByteToWideChar(uint32_t codepage, uint32_t flags, char const* in_string, int32_t in_size, wchar_t* out_string, int32_t out_size) noexcept; + int32_t __stdcall WideCharToMultiByte(uint32_t codepage, uint32_t flags, wchar_t const* int_string, int32_t in_size, char* out_string, int32_t out_size, char const* default_char, int32_t* default_used) noexcept; + int32_t __stdcall HeapFree(void* heap, uint32_t flags, void* value) noexcept; + void* __stdcall GetProcessHeap() noexcept; + uint32_t __stdcall FormatMessageW(uint32_t flags, void const* source, uint32_t code, uint32_t language, wchar_t* buffer, uint32_t size, va_list* arguments) noexcept; + uint32_t __stdcall GetLastError() noexcept; + void __stdcall GetSystemTimePreciseAsFileTime(void* result) noexcept; + + int32_t __stdcall OpenProcessToken(void* process, uint32_t access, void** token) noexcept; + void* __stdcall GetCurrentProcess() noexcept; + int32_t __stdcall DuplicateToken(void* existing, uint32_t level, void** duplicate) noexcept; + int32_t __stdcall OpenThreadToken(void* thread, uint32_t access, int32_t self, void** token) noexcept; + void* __stdcall GetCurrentThread() noexcept; + int32_t __stdcall SetThreadToken(void** thread, void* token) noexcept; + + void __stdcall AcquireSRWLockExclusive(winrt::impl::srwlock* lock) noexcept; + void __stdcall AcquireSRWLockShared(winrt::impl::srwlock* lock) noexcept; + uint8_t __stdcall TryAcquireSRWLockExclusive(winrt::impl::srwlock* lock) noexcept; + uint8_t __stdcall TryAcquireSRWLockShared(winrt::impl::srwlock* lock) noexcept; + void __stdcall ReleaseSRWLockExclusive(winrt::impl::srwlock* lock) noexcept; + void __stdcall ReleaseSRWLockShared(winrt::impl::srwlock* lock) noexcept; + int32_t __stdcall SleepConditionVariableSRW(winrt::impl::condition_variable* cv, winrt::impl::srwlock* lock, uint32_t milliseconds, uint32_t flags) noexcept; + void __stdcall WakeConditionVariable(winrt::impl::condition_variable* cv) noexcept; + void __stdcall WakeAllConditionVariable(winrt::impl::condition_variable* cv) noexcept; + void* __stdcall InterlockedPushEntrySList(void* head, void* entry) noexcept; + void* __stdcall InterlockedFlushSList(void* head) noexcept; + + void* __stdcall CreateEventW(void*, int32_t, int32_t, void*) noexcept; + int32_t __stdcall SetEvent(void*) noexcept; + int32_t __stdcall CloseHandle(void* hObject) noexcept; + uint32_t __stdcall WaitForSingleObject(void* handle, uint32_t milliseconds) noexcept; + + int32_t __stdcall TrySubmitThreadpoolCallback(void(__stdcall *callback)(void*, void* context), void* context, void*) noexcept; + winrt::impl::ptp_timer __stdcall CreateThreadpoolTimer(void(__stdcall *callback)(void*, void* context, void*), void* context, void*) noexcept; + void __stdcall SetThreadpoolTimer(winrt::impl::ptp_timer timer, void* time, uint32_t period, uint32_t window) noexcept; + void __stdcall CloseThreadpoolTimer(winrt::impl::ptp_timer timer) noexcept; + winrt::impl::ptp_wait __stdcall CreateThreadpoolWait(void(__stdcall *callback)(void*, void* context, void*, uint32_t result), void* context, void*) noexcept; + void __stdcall SetThreadpoolWait(winrt::impl::ptp_wait wait, void* handle, void* timeout) noexcept; + void __stdcall CloseThreadpoolWait(winrt::impl::ptp_wait wait) noexcept; + winrt::impl::ptp_io __stdcall CreateThreadpoolIo(void* object, void(__stdcall *callback)(void*, void* context, void* overlapped, uint32_t result, std::size_t bytes, void*) noexcept, void* context, void*) noexcept; + void __stdcall StartThreadpoolIo(winrt::impl::ptp_io io) noexcept; + void __stdcall CancelThreadpoolIo(winrt::impl::ptp_io io) noexcept; + void __stdcall CloseThreadpoolIo(winrt::impl::ptp_io io) noexcept; + winrt::impl::ptp_pool __stdcall CreateThreadpool(void* reserved) noexcept; + void __stdcall SetThreadpoolThreadMaximum(winrt::impl::ptp_pool pool, uint32_t value) noexcept; + int32_t __stdcall SetThreadpoolThreadMinimum(winrt::impl::ptp_pool pool, uint32_t value) noexcept; + void __stdcall CloseThreadpool(winrt::impl::ptp_pool pool) noexcept; + + int32_t __stdcall WINRT_CanUnloadNow() noexcept; + int32_t __stdcall WINRT_GetActivationFactory(void* classId, void** factory) noexcept; +} +} // namespace winrt + +#ifdef _M_HYBRID +#define WINRT_IMPL_LINK(function, count) __pragma(comment(linker, "/alternatename:#WINRT_" #function "@" #count "=#" #function "@" #count)) +#elif _M_IX86 +#define WINRT_IMPL_LINK(function, count) __pragma(comment(linker, "/alternatename:_WINRT_" #function "@" #count "=_" #function "@" #count)) +#else +#define WINRT_IMPL_LINK(function, count) __pragma(comment(linker, "/alternatename:WINRT_" #function "=" #function)) +#endif + +WINRT_IMPL_LINK(GetRestrictedErrorInfo, 4) +WINRT_IMPL_LINK(RoGetActivationFactory, 12) +WINRT_IMPL_LINK(RoInitialize, 4) +WINRT_IMPL_LINK(RoOriginateLanguageException, 12) +WINRT_IMPL_LINK(RoUninitialize, 0) +WINRT_IMPL_LINK(SetRestrictedErrorInfo, 4) +WINRT_IMPL_LINK(RoGetAgileReference, 16) +WINRT_IMPL_LINK(CoIncrementMTAUsage, 4) +WINRT_IMPL_LINK(RoFailFastWithErrorContext, 4) +WINRT_IMPL_LINK(RoTransformError, 12) + +WINRT_IMPL_LINK(WindowsCreateString, 12) +WINRT_IMPL_LINK(WindowsCreateStringReference, 16) +WINRT_IMPL_LINK(WindowsDuplicateString, 8) +WINRT_IMPL_LINK(WindowsDeleteString, 4) +WINRT_IMPL_LINK(WindowsStringHasEmbeddedNull, 8) +WINRT_IMPL_LINK(WindowsPreallocateStringBuffer, 12) +WINRT_IMPL_LINK(WindowsDeleteStringBuffer, 4) +WINRT_IMPL_LINK(WindowsPromoteStringBuffer, 8) +WINRT_IMPL_LINK(WindowsConcatString, 12) +WINRT_IMPL_LINK(WindowsGetStringRawBuffer, 8) +WINRT_IMPL_LINK(WindowsGetStringLen, 4) + +WINRT_IMPL_LINK(CoCreateFreeThreadedMarshaler, 8) +WINRT_IMPL_LINK(CoCreateInstance, 20) +WINRT_IMPL_LINK(CoGetCallContext, 8) +WINRT_IMPL_LINK(CoGetObjectContext, 8) +WINRT_IMPL_LINK(CoGetApartmentType, 8) +WINRT_IMPL_LINK(CoTaskMemAlloc, 4) +WINRT_IMPL_LINK(CoTaskMemFree, 4) +WINRT_IMPL_LINK(SysFreeString, 4) +WINRT_IMPL_LINK(SysStringLen, 4) +WINRT_IMPL_LINK(IIDFromString, 8) +WINRT_IMPL_LINK(MultiByteToWideChar, 24) +WINRT_IMPL_LINK(WideCharToMultiByte, 32) +WINRT_IMPL_LINK(HeapFree, 12) +WINRT_IMPL_LINK(GetProcessHeap, 0) +WINRT_IMPL_LINK(FormatMessageW, 28) +WINRT_IMPL_LINK(GetLastError, 0) +WINRT_IMPL_LINK(GetSystemTimePreciseAsFileTime, 4) + +WINRT_IMPL_LINK(OpenProcessToken, 12) +WINRT_IMPL_LINK(GetCurrentProcess, 0) +WINRT_IMPL_LINK(DuplicateToken, 12) +WINRT_IMPL_LINK(OpenThreadToken, 16) +WINRT_IMPL_LINK(GetCurrentThread, 0) +WINRT_IMPL_LINK(SetThreadToken, 8) + +WINRT_IMPL_LINK(AcquireSRWLockExclusive, 4) +WINRT_IMPL_LINK(AcquireSRWLockShared, 4) +WINRT_IMPL_LINK(TryAcquireSRWLockExclusive, 4) +WINRT_IMPL_LINK(TryAcquireSRWLockShared, 4) +WINRT_IMPL_LINK(ReleaseSRWLockExclusive, 4) +WINRT_IMPL_LINK(ReleaseSRWLockShared, 4) +WINRT_IMPL_LINK(SleepConditionVariableSRW, 16) +WINRT_IMPL_LINK(WakeConditionVariable, 4) +WINRT_IMPL_LINK(WakeAllConditionVariable, 4) +WINRT_IMPL_LINK(InterlockedPushEntrySList, 8) +WINRT_IMPL_LINK(InterlockedFlushSList, 4) + +WINRT_IMPL_LINK(CreateEventW, 16) +WINRT_IMPL_LINK(SetEvent, 4) +WINRT_IMPL_LINK(CloseHandle, 4) +WINRT_IMPL_LINK(WaitForSingleObject, 8) + +WINRT_IMPL_LINK(TrySubmitThreadpoolCallback, 12) +WINRT_IMPL_LINK(CreateThreadpoolTimer, 12) +WINRT_IMPL_LINK(SetThreadpoolTimer, 16) +WINRT_IMPL_LINK(CloseThreadpoolTimer, 4) +WINRT_IMPL_LINK(CreateThreadpoolWait, 12) +WINRT_IMPL_LINK(SetThreadpoolWait, 12) +WINRT_IMPL_LINK(CloseThreadpoolWait, 4) +WINRT_IMPL_LINK(CreateThreadpoolIo, 16) +WINRT_IMPL_LINK(StartThreadpoolIo, 4) +WINRT_IMPL_LINK(CancelThreadpoolIo, 4) +WINRT_IMPL_LINK(CloseThreadpoolIo, 4) +WINRT_IMPL_LINK(CreateThreadpool, 4) +WINRT_IMPL_LINK(SetThreadpoolThreadMaximum, 8) +WINRT_IMPL_LINK(SetThreadpoolThreadMinimum, 8) +WINRT_IMPL_LINK(CloseThreadpool, 4) + +#undef WINRT_IMPL_LINK + +namespace winrt +{ + void check_hresult(hresult const result); + hresult to_hresult() noexcept; + + template + D* get_self(I const& from) noexcept; + + struct take_ownership_from_abi_t {}; + inline constexpr take_ownership_from_abi_t take_ownership_from_abi{}; + + template + struct com_ptr; + + namespace param + { + template + struct iterable; + + template + struct async_iterable; + + template + struct map_view; + + template + struct async_map_view; + + template + struct map; + + template + struct vector_view; + + template + struct async_vector_view; + + template + struct vector; + } +} + +namespace winrt::impl +{ + using namespace std::literals; + + template + void blocking_suspend(Async const& async); + + template + struct reference_traits; + + template + struct identity + { + using type = T; + }; + + template + struct abi + { + using type = T; + }; + + template + struct abi>> + { + using type = std::underlying_type_t; + }; + + template + using abi_t = typename abi::type; + + template + struct consume; + + template + using consume_t = typename consume::template type; + + template + struct delegate; + + template > + struct default_interface + { + using type = T; + }; + + struct basic_category; + struct interface_category; + struct delegate_category; + struct enum_category; + struct class_category; + + template + struct category + { + using type = void; + }; + + template + using category_t = typename category::type; + + template + inline constexpr bool has_category_v = !std::is_same_v, void>; + + template + struct pinterface_category; + + template + struct struct_category; + + template + struct category_signature; + + template + struct signature + { + static constexpr auto data{ category_signature::type, T>::data }; + }; + + template + struct missing_guid_of + { + static constexpr bool value{}; + }; + + template + struct missing_guid + { + static_assert(missing_guid_of::value, "Support for non-WinRT interfaces is disabled. To enable, simply #include before any C++/WinRT headers."); + }; + +#ifdef WINRT_WINDOWS_ABI + template + struct guid_storage + { + static constexpr guid value{ __uuidof(T) }; + }; +#else + template + struct guid_storage : missing_guid {}; +#endif + + template + constexpr auto to_underlying_type(T const value) noexcept + { + return static_cast>(value); + } + + template > + struct is_implements : std::false_type {}; + + template + struct is_implements> : std::true_type {}; + + template + inline constexpr bool is_implements_v = is_implements::value; + + template + struct require_one : consume_t + { + operator I() const noexcept + { + return static_cast(this)->template try_as(); + } + }; + + template + struct __declspec(empty_bases) require : require_one... + {}; + + template + struct base_one + { + operator I() const noexcept + { + return static_cast(this)->template try_as(); + } + }; + + template + struct __declspec(empty_bases) base : base_one... + {}; + + template + T empty_value() noexcept + { + if constexpr (std::is_base_of_v) + { + return nullptr; + } + else + { + return {}; + } + } + + template + struct arg + { + using in = abi_t; + }; + + template + struct arg>> + { + using in = void*; + }; + + template + using arg_in = typename arg::in; + + template + using arg_out = arg_in*; + + template + struct produce_base; + + template + struct produce : produce_base + { + }; + + template + struct wrapped_type + { + using type = T; + }; + + template + struct wrapped_type> + { + using type = T; + }; + + template + using wrapped_type_t = typename wrapped_type::type; + + template