// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_UI_WebUI_Core_H #define WINRT_Windows_UI_WebUI_Core_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.UI.WebUI.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.UI.2.h" #include "winrt/impl/Windows.UI.WebUI.Core.2.h" namespace winrt::impl { template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::Visible() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Visible(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Visible(&value)); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::Visible(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Visible(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Visible(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::Opacity() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Opacity(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Opacity(&value)); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::Opacity(double value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Opacity(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Opacity(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::ForegroundColor() const { winrt::Windows::UI::Color value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ForegroundColor(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ForegroundColor(put_abi(value))); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::ForegroundColor(winrt::Windows::UI::Color const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ForegroundColor(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ForegroundColor(impl::bind_in(value))); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::BackgroundColor() const { winrt::Windows::UI::Color value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BackgroundColor(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BackgroundColor(put_abi(value))); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::BackgroundColor(winrt::Windows::UI::Color const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_BackgroundColor(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_BackgroundColor(impl::bind_in(value))); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::ClosedDisplayMode() const { winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ClosedDisplayMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ClosedDisplayMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::ClosedDisplayMode(winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ClosedDisplayMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ClosedDisplayMode(static_cast(value))); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::IsOpen() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsOpen(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsOpen(&value)); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::IsOpen(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsOpen(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsOpen(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::Size() const { winrt::Windows::Foundation::Size value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Size(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Size(put_abi(value))); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::PrimaryCommands() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PrimaryCommands(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrimaryCommands(&value)); } return winrt::Windows::Foundation::Collections::IObservableVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::SecondaryCommands() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SecondaryCommands(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SecondaryCommands(&value)); } return winrt::Windows::Foundation::Collections::IObservableVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuOpened(winrt::Windows::UI::WebUI::Core::MenuOpenedEventHandler const& handler) const { winrt::event_token value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_MenuOpened(*(void**)(&handler), put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MenuOpened(*(void**)(&handler), put_abi(value))); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuOpened(auto_revoke_t, winrt::Windows::UI::WebUI::Core::MenuOpenedEventHandler const& handler) const { return impl::make_event_revoker(this, MenuOpened(handler)); } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuOpened(winrt::event_token const& value) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_MenuOpened(impl::bind_in(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MenuOpened(impl::bind_in(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuClosed(winrt::Windows::UI::WebUI::Core::MenuClosedEventHandler const& handler) const { winrt::event_token value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_MenuClosed(*(void**)(&handler), put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MenuClosed(*(void**)(&handler), put_abi(value))); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuClosed(auto_revoke_t, winrt::Windows::UI::WebUI::Core::MenuClosedEventHandler const& handler) const { return impl::make_event_revoker(this, MenuClosed(handler)); } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuClosed(winrt::event_token const& value) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_MenuClosed(impl::bind_in(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MenuClosed(impl::bind_in(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::SizeChanged(winrt::Windows::UI::WebUI::Core::SizeChangedEventHandler const& handler) const { winrt::event_token value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_SizeChanged(*(void**)(&handler), put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SizeChanged(*(void**)(&handler), put_abi(value))); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::SizeChanged(auto_revoke_t, winrt::Windows::UI::WebUI::Core::SizeChangedEventHandler const& handler) const { return impl::make_event_revoker(this, SizeChanged(handler)); } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBar::SizeChanged(winrt::event_token const& value) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_SizeChanged(impl::bind_in(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SizeChanged(impl::bind_in(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarBitmapIcon::Uri() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Uri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uri(&value)); } return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarBitmapIcon::Uri(winrt::Windows::Foundation::Uri const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Uri(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Uri(*(void**)(&value))); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarBitmapIconFactory::Create(winrt::Windows::Foundation::Uri const& uri) const { void* instance{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(*(void**)(&uri), &instance)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(*(void**)(&uri), &instance)); } return winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon{ instance, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::Text() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Text(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Text(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::Text(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Text(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Text(*(void**)(&value))); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::ItemInvoked(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::ItemInvoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ItemInvoked(handler)); } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::ItemInvoked(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Enabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Enabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Enabled(&value)); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Enabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Enabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Enabled(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Label() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Label(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Label(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Label(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Label(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Label(*(void**)(&value))); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::IsToggleButton() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsToggleButton(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsToggleButton(&value)); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::IsToggleButton(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsToggleButton(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsToggleButton(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::IsChecked() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsChecked(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsChecked(&value)); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::IsChecked(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsChecked(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsChecked(value)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Icon() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Icon(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Icon(&value)); } return winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Icon(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Icon(*(void**)(&value))); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::ItemInvoked(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ItemInvoked(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::ItemInvoked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ItemInvoked(handler)); } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::ItemInvoked(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ItemInvoked(impl::bind_in(token)); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarItemInvokedEventArgs::IsPrimaryCommand() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsPrimaryCommand(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPrimaryCommand(&value)); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarSizeChangedEventArgs::Size() const { winrt::Windows::Foundation::Size value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Size(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Size(put_abi(value))); } return value; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarStatics::GetForCurrentView() const { void* commandBar{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetForCurrentView(&commandBar)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetForCurrentView(&commandBar)); } return winrt::Windows::UI::WebUI::Core::WebUICommandBar{ commandBar, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarSymbolIcon::Symbol() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Symbol(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Symbol(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarSymbolIcon::Symbol(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Symbol(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Symbol(*(void**)(&value))); } } template auto consume_Windows_UI_WebUI_Core_IWebUICommandBarSymbolIconFactory::Create(param::hstring const& symbol) const { void* instance{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(*(void**)(&symbol), &instance)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(*(void**)(&symbol), &instance)); } return winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon{ instance, take_ownership_from_abi }; } template struct delegate final : 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 final : 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 final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* eventArgs) noexcept final try { (*this)(*reinterpret_cast(&eventArgs)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Visible(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Visible()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Visible(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Visible(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Opacity(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Opacity()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Opacity(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Opacity(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ForegroundColor(struct struct_Windows_UI_Color* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ForegroundColor(struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BackgroundColor(struct struct_Windows_UI_Color* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_BackgroundColor(struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClosedDisplayMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClosedDisplayMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClosedDisplayMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClosedDisplayMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsOpen(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsOpen()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsOpen(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsOpen(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Size(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Size()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrimaryCommands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PrimaryCommands()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SecondaryCommands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SecondaryCommands()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_MenuOpened(void* handler, winrt::event_token* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MenuOpened(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MenuOpened(winrt::event_token value) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MenuOpened(*reinterpret_cast(&value)); return 0; } int32_t __stdcall add_MenuClosed(void* handler, winrt::event_token* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MenuClosed(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MenuClosed(winrt::event_token value) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MenuClosed(*reinterpret_cast(&value)); return 0; } int32_t __stdcall add_SizeChanged(void* handler, winrt::event_token* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SizeChanged(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SizeChanged(winrt::event_token value) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SizeChanged(*reinterpret_cast(&value)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Uri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Uri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Uri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* uri, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().Create(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN 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 add_ItemInvoked(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ItemInvoked(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ItemInvoked(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ItemInvoked(*reinterpret_cast(&token)); return 0; } }; #endif template struct produce : produce_base { }; template struct produce : produce_base { }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Enabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Enabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Enabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Enabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Label(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Label()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Label(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Label(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsToggleButton(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsToggleButton()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsToggleButton(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsToggleButton(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsChecked(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsChecked()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsChecked(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsChecked(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(); } int32_t __stdcall add_ItemInvoked(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ItemInvoked(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ItemInvoked(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ItemInvoked(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsPrimaryCommand(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPrimaryCommand()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Size(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Size()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** commandBar) noexcept final try { clear_abi(commandBar); typename D::abi_guard guard(this->shim()); *commandBar = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Symbol(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Symbol()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Symbol(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Symbol(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* symbol, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().Create(*reinterpret_cast(&symbol))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::UI::WebUI::Core { inline auto WebUICommandBar::GetForCurrentView() { return impl::call_factory_cast([](IWebUICommandBarStatics const& f) { return f.GetForCurrentView(); }); } inline WebUICommandBarBitmapIcon::WebUICommandBarBitmapIcon() : WebUICommandBarBitmapIcon(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline WebUICommandBarBitmapIcon::WebUICommandBarBitmapIcon(winrt::Windows::Foundation::Uri const& uri) : WebUICommandBarBitmapIcon(impl::call_factory([&](IWebUICommandBarBitmapIconFactory const& f) { return f.Create(uri); })) { } inline WebUICommandBarConfirmationButton::WebUICommandBarConfirmationButton() : WebUICommandBarConfirmationButton(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline WebUICommandBarIconButton::WebUICommandBarIconButton() : WebUICommandBarIconButton(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline WebUICommandBarSymbolIcon::WebUICommandBarSymbolIcon() : WebUICommandBarSymbolIcon(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline WebUICommandBarSymbolIcon::WebUICommandBarSymbolIcon(param::hstring const& symbol) : WebUICommandBarSymbolIcon(impl::call_factory([&](IWebUICommandBarSymbolIconFactory const& f) { return f.Create(symbol); })) { } template MenuClosedEventHandler::MenuClosedEventHandler(L handler) : MenuClosedEventHandler(impl::make_delegate(std::forward(handler))) { } template MenuClosedEventHandler::MenuClosedEventHandler(F* handler) : MenuClosedEventHandler([=](auto&&... args) { return handler(args...); }) { } template MenuClosedEventHandler::MenuClosedEventHandler(O* object, M method) : MenuClosedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template MenuClosedEventHandler::MenuClosedEventHandler(com_ptr&& object, M method) : MenuClosedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template MenuClosedEventHandler::MenuClosedEventHandler(weak_ref&& object, LM&& lambda_or_method) : MenuClosedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template MenuClosedEventHandler::MenuClosedEventHandler(std::shared_ptr&& object, M method) : MenuClosedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template MenuClosedEventHandler::MenuClosedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : MenuClosedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto MenuClosedEventHandler::operator()() const { check_hresult((*(impl::abi_t**)this)->Invoke()); } template MenuOpenedEventHandler::MenuOpenedEventHandler(L handler) : MenuOpenedEventHandler(impl::make_delegate(std::forward(handler))) { } template MenuOpenedEventHandler::MenuOpenedEventHandler(F* handler) : MenuOpenedEventHandler([=](auto&&... args) { return handler(args...); }) { } template MenuOpenedEventHandler::MenuOpenedEventHandler(O* object, M method) : MenuOpenedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template MenuOpenedEventHandler::MenuOpenedEventHandler(com_ptr&& object, M method) : MenuOpenedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template MenuOpenedEventHandler::MenuOpenedEventHandler(weak_ref&& object, LM&& lambda_or_method) : MenuOpenedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template MenuOpenedEventHandler::MenuOpenedEventHandler(std::shared_ptr&& object, M method) : MenuOpenedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template MenuOpenedEventHandler::MenuOpenedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : MenuOpenedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto MenuOpenedEventHandler::operator()() const { check_hresult((*(impl::abi_t**)this)->Invoke()); } template SizeChangedEventHandler::SizeChangedEventHandler(L handler) : SizeChangedEventHandler(impl::make_delegate(std::forward(handler))) { } template SizeChangedEventHandler::SizeChangedEventHandler(F* handler) : SizeChangedEventHandler([=](auto&&... args) { return handler(args...); }) { } template SizeChangedEventHandler::SizeChangedEventHandler(O* object, M method) : SizeChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template SizeChangedEventHandler::SizeChangedEventHandler(com_ptr&& object, M method) : SizeChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template SizeChangedEventHandler::SizeChangedEventHandler(weak_ref&& object, LM&& lambda_or_method) : SizeChangedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template SizeChangedEventHandler::SizeChangedEventHandler(std::shared_ptr&& object, M method) : SizeChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template SizeChangedEventHandler::SizeChangedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : SizeChangedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto SizeChangedEventHandler::operator()(winrt::Windows::UI::WebUI::Core::WebUICommandBarSizeChangedEventArgs const& eventArgs) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&eventArgs))); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN 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 #ifdef __cpp_lib_format #endif } #endif