// C++/WinRT v2.0.220110.5 // 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.220110.5"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.220110.5" #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 WINRT_IMPL_AUTO(bool) consume_Windows_UI_WebUI_Core_IWebUICommandBar::Visible() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_Visible(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::Visible(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->put_Visible(value)); } template WINRT_IMPL_AUTO(double) consume_Windows_UI_WebUI_Core_IWebUICommandBar::Opacity() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_Opacity(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::Opacity(double value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->put_Opacity(value)); } template WINRT_IMPL_AUTO(winrt::Windows::UI::Color) consume_Windows_UI_WebUI_Core_IWebUICommandBar::ForegroundColor() const { winrt::Windows::UI::Color value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_ForegroundColor(put_abi(value))); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::ForegroundColor(winrt::Windows::UI::Color const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->put_ForegroundColor(impl::bind_in(value))); } template WINRT_IMPL_AUTO(winrt::Windows::UI::Color) consume_Windows_UI_WebUI_Core_IWebUICommandBar::BackgroundColor() const { winrt::Windows::UI::Color value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_BackgroundColor(put_abi(value))); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::BackgroundColor(winrt::Windows::UI::Color const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->put_BackgroundColor(impl::bind_in(value))); } template WINRT_IMPL_AUTO(winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode) consume_Windows_UI_WebUI_Core_IWebUICommandBar::ClosedDisplayMode() const { winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_ClosedDisplayMode(reinterpret_cast(&value))); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::ClosedDisplayMode(winrt::Windows::UI::WebUI::Core::WebUICommandBarClosedDisplayMode const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->put_ClosedDisplayMode(static_cast(value))); } template WINRT_IMPL_AUTO(bool) consume_Windows_UI_WebUI_Core_IWebUICommandBar::IsOpen() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_IsOpen(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::IsOpen(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->put_IsOpen(value)); } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::Size) consume_Windows_UI_WebUI_Core_IWebUICommandBar::Size() const { winrt::Windows::Foundation::Size value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_Size(put_abi(value))); return value; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::Collections::IObservableVector) consume_Windows_UI_WebUI_Core_IWebUICommandBar::PrimaryCommands() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_PrimaryCommands(&value)); return winrt::Windows::Foundation::Collections::IObservableVector{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::Collections::IObservableVector) consume_Windows_UI_WebUI_Core_IWebUICommandBar::SecondaryCommands() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->get_SecondaryCommands(&value)); return winrt::Windows::Foundation::Collections::IObservableVector{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::event_token) consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuOpened(winrt::Windows::UI::WebUI::Core::MenuOpenedEventHandler const& handler) const { winrt::event_token value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->add_MenuOpened(*(void**)(&handler), put_abi(value))); return value; } template typename consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuOpened_revoker 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 WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuOpened(winrt::event_token const& value) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->remove_MenuOpened(impl::bind_in(value)); } template WINRT_IMPL_AUTO(winrt::event_token) consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuClosed(winrt::Windows::UI::WebUI::Core::MenuClosedEventHandler const& handler) const { winrt::event_token value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->add_MenuClosed(*(void**)(&handler), put_abi(value))); return value; } template typename consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuClosed_revoker 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 WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::MenuClosed(winrt::event_token const& value) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->remove_MenuClosed(impl::bind_in(value)); } template WINRT_IMPL_AUTO(winrt::event_token) consume_Windows_UI_WebUI_Core_IWebUICommandBar::SizeChanged(winrt::Windows::UI::WebUI::Core::SizeChangedEventHandler const& handler) const { winrt::event_token value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->add_SizeChanged(*(void**)(&handler), put_abi(value))); return value; } template typename consume_Windows_UI_WebUI_Core_IWebUICommandBar::SizeChanged_revoker 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 WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBar::SizeChanged(winrt::event_token const& value) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBar)->remove_SizeChanged(impl::bind_in(value)); } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::Uri) consume_Windows_UI_WebUI_Core_IWebUICommandBarBitmapIcon::Uri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarBitmapIcon)->get_Uri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarBitmapIcon::Uri(winrt::Windows::Foundation::Uri const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarBitmapIcon)->put_Uri(*(void**)(&value))); } template WINRT_IMPL_AUTO(winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon) consume_Windows_UI_WebUI_Core_IWebUICommandBarBitmapIconFactory::Create(winrt::Windows::Foundation::Uri const& uri) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarBitmapIconFactory)->Create(*(void**)(&uri), &instance)); return winrt::Windows::UI::WebUI::Core::WebUICommandBarBitmapIcon{ instance, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(hstring) consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::Text() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarConfirmationButton)->get_Text(&value)); return hstring{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::Text(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarConfirmationButton)->put_Text(*(void**)(&value))); } template WINRT_IMPL_AUTO(winrt::event_token) consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::ItemInvoked(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarConfirmationButton)->add_ItemInvoked(*(void**)(&handler), put_abi(token))); return token; } template typename consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::ItemInvoked_revoker 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 WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarConfirmationButton::ItemInvoked(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarConfirmationButton)->remove_ItemInvoked(impl::bind_in(token)); } template WINRT_IMPL_AUTO(bool) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Enabled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->get_Enabled(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Enabled(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->put_Enabled(value)); } template WINRT_IMPL_AUTO(hstring) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Label() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->get_Label(&value)); return hstring{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Label(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->put_Label(*(void**)(&value))); } template WINRT_IMPL_AUTO(bool) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::IsToggleButton() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->get_IsToggleButton(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::IsToggleButton(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->put_IsToggleButton(value)); } template WINRT_IMPL_AUTO(bool) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::IsChecked() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->get_IsChecked(&value)); return value; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::IsChecked(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->put_IsChecked(value)); } template WINRT_IMPL_AUTO(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Icon() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->get_Icon(&value)); return winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::Icon(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIcon const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->put_Icon(*(void**)(&value))); } template WINRT_IMPL_AUTO(winrt::event_token) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::ItemInvoked(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->add_ItemInvoked(*(void**)(&handler), put_abi(token))); return token; } template typename consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::ItemInvoked_revoker 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 WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarIconButton::ItemInvoked(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarIconButton)->remove_ItemInvoked(impl::bind_in(token)); } template WINRT_IMPL_AUTO(bool) consume_Windows_UI_WebUI_Core_IWebUICommandBarItemInvokedEventArgs::IsPrimaryCommand() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarItemInvokedEventArgs)->get_IsPrimaryCommand(&value)); return value; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::Size) consume_Windows_UI_WebUI_Core_IWebUICommandBarSizeChangedEventArgs::Size() const { winrt::Windows::Foundation::Size value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarSizeChangedEventArgs)->get_Size(put_abi(value))); return value; } template WINRT_IMPL_AUTO(winrt::Windows::UI::WebUI::Core::WebUICommandBar) consume_Windows_UI_WebUI_Core_IWebUICommandBarStatics::GetForCurrentView() const { void* commandBar{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarStatics)->GetForCurrentView(&commandBar)); return winrt::Windows::UI::WebUI::Core::WebUICommandBar{ commandBar, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(hstring) consume_Windows_UI_WebUI_Core_IWebUICommandBarSymbolIcon::Symbol() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarSymbolIcon)->get_Symbol(&value)); return hstring{ value, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_WebUI_Core_IWebUICommandBarSymbolIcon::Symbol(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarSymbolIcon)->put_Symbol(*(void**)(&value))); } template WINRT_IMPL_AUTO(winrt::Windows::UI::WebUI::Core::WebUICommandBarSymbolIcon) consume_Windows_UI_WebUI_Core_IWebUICommandBarSymbolIconFactory::Create(param::hstring const& symbol) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::Core::IWebUICommandBarSymbolIconFactory)->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, M method) : MenuClosedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(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, M method) : MenuOpenedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(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, M method) : SizeChangedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(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