// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Web_UI_Interop_H #define WINRT_Windows_Web_UI_Interop_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.Web.UI.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.UI.Core.2.h" #include "winrt/impl/Windows.Web.UI.2.h" #include "winrt/impl/Windows.Web.UI.Interop.2.h" namespace winrt::impl { template auto consume_Windows_Web_UI_Interop_IWebViewControlAcceleratorKeyPressedEventArgs::EventType() const { winrt::Windows::UI::Core::CoreAcceleratorKeyEventType 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_EventType(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EventType(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlAcceleratorKeyPressedEventArgs::VirtualKey() const { winrt::Windows::System::VirtualKey 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_VirtualKey(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VirtualKey(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlAcceleratorKeyPressedEventArgs::KeyStatus() const { winrt::Windows::UI::Core::CorePhysicalKeyStatus 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_KeyStatus(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_KeyStatus(put_abi(value))); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlAcceleratorKeyPressedEventArgs::RoutingStage() const { winrt::Windows::Web::UI::Interop::WebViewControlAcceleratorKeyRoutingStage 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_RoutingStage(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RoutingStage(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlAcceleratorKeyPressedEventArgs::Handled() 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_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlAcceleratorKeyPressedEventArgs::Handled(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_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlMoveFocusRequestedEventArgs::Reason() const { winrt::Windows::Web::UI::Interop::WebViewControlMoveFocusReason 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_Reason(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::ProcessId() const { uint32_t 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_ProcessId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProcessId(&value)); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::EnterpriseId() 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_EnterpriseId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EnterpriseId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::IsPrivateNetworkClientServerCapabilityEnabled() 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_IsPrivateNetworkClientServerCapabilityEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPrivateNetworkClientServerCapabilityEnabled(&value)); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::CreateWebViewControlAsync(int64_t hostWindowHandle, winrt::Windows::Foundation::Rect const& bounds) const { void* operation{}; 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->CreateWebViewControlAsync(hostWindowHandle, impl::bind_in(bounds), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWebViewControlAsync(hostWindowHandle, impl::bind_in(bounds), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::GetWebViewControls() const { void* result{}; 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->GetWebViewControls(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetWebViewControls(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::Terminate() 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->Terminate()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Terminate()); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::ProcessExited(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_ProcessExited(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ProcessExited(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::ProcessExited(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ProcessExited(handler)); } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcess::ProcessExited(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_ProcessExited(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ProcessExited(impl::bind_in(token)); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcessFactory::CreateWithOptions(winrt::Windows::Web::UI::Interop::WebViewControlProcessOptions const& processOptions) const { void* result{}; 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->CreateWithOptions(*(void**)(&processOptions), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithOptions(*(void**)(&processOptions), &result)); } return winrt::Windows::Web::UI::Interop::WebViewControlProcess{ result, take_ownership_from_abi }; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcessOptions::EnterpriseId(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_EnterpriseId(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_EnterpriseId(*(void**)(&value))); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcessOptions::EnterpriseId() 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_EnterpriseId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EnterpriseId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcessOptions::PrivateNetworkClientServerCapability(winrt::Windows::Web::UI::Interop::WebViewControlProcessCapabilityState 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_PrivateNetworkClientServerCapability(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PrivateNetworkClientServerCapability(static_cast(value))); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlProcessOptions::PrivateNetworkClientServerCapability() const { winrt::Windows::Web::UI::Interop::WebViewControlProcessCapabilityState 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_PrivateNetworkClientServerCapability(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrivateNetworkClientServerCapability(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::Process() 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_Process(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Process(&value)); } return winrt::Windows::Web::UI::Interop::WebViewControlProcess{ value, take_ownership_from_abi }; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::Scale(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_Scale(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Scale(value)); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::Scale() 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_Scale(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Scale(&value)); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::Bounds(winrt::Windows::Foundation::Rect 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_Bounds(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Bounds(impl::bind_in(value))); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::Bounds() const { winrt::Windows::Foundation::Rect 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_Bounds(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Bounds(put_abi(value))); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::IsVisible(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_IsVisible(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsVisible(value)); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::IsVisible() 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_IsVisible(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsVisible(&value)); } return value; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::Close() 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->Close()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Close()); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::MoveFocus(winrt::Windows::Web::UI::Interop::WebViewControlMoveFocusReason const& reason) 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->MoveFocus(static_cast(reason))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MoveFocus(static_cast(reason))); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::MoveFocusRequested(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_MoveFocusRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MoveFocusRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::MoveFocusRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, MoveFocusRequested(handler)); } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::MoveFocusRequested(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_MoveFocusRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MoveFocusRequested(impl::bind_in(token)); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::AcceleratorKeyPressed(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_AcceleratorKeyPressed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AcceleratorKeyPressed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::AcceleratorKeyPressed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AcceleratorKeyPressed(handler)); } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite::AcceleratorKeyPressed(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_AcceleratorKeyPressed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AcceleratorKeyPressed(impl::bind_in(token)); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite2::GotFocus(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_GotFocus(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_GotFocus(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite2::GotFocus(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, GotFocus(handler)); } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite2::GotFocus(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_GotFocus(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_GotFocus(impl::bind_in(token)); } } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite2::LostFocus(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_LostFocus(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_LostFocus(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite2::LostFocus(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, LostFocus(handler)); } template auto consume_Windows_Web_UI_Interop_IWebViewControlSite2::LostFocus(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_LostFocus(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_LostFocus(impl::bind_in(token)); } } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_EventType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EventType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VirtualKey(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VirtualKey()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_KeyStatus(struct struct_Windows_UI_Core_CorePhysicalKeyStatus* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().KeyStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RoutingStage(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RoutingStage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProcessId(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProcessId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EnterpriseId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnterpriseId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPrivateNetworkClientServerCapabilityEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPrivateNetworkClientServerCapabilityEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWebViewControlAsync(int64_t hostWindowHandle, winrt::Windows::Foundation::Rect bounds, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateWebViewControlAsync(hostWindowHandle, *reinterpret_cast(&bounds))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetWebViewControls(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetWebViewControls()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Terminate() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Terminate(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ProcessExited(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ProcessExited(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ProcessExited(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ProcessExited(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithOptions(void* processOptions, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithOptions(*reinterpret_cast(&processOptions))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_EnterpriseId(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnterpriseId(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EnterpriseId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnterpriseId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PrivateNetworkClientServerCapability(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PrivateNetworkClientServerCapability(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrivateNetworkClientServerCapability(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrivateNetworkClientServerCapability()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Process(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Process()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Scale(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Scale(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Scale(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Scale()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Bounds(winrt::Windows::Foundation::Rect value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Bounds(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Bounds(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Bounds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsVisible(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsVisible(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsVisible(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsVisible()); 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(); } int32_t __stdcall MoveFocus(int32_t reason) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MoveFocus(*reinterpret_cast(&reason)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_MoveFocusRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MoveFocusRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MoveFocusRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MoveFocusRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_AcceleratorKeyPressed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AcceleratorKeyPressed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AcceleratorKeyPressed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AcceleratorKeyPressed(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_GotFocus(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GotFocus(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GotFocus(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GotFocus(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_LostFocus(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().LostFocus(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_LostFocus(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().LostFocus(*reinterpret_cast(&token)); return 0; } }; #endif } WINRT_EXPORT namespace winrt::Windows::Web::UI::Interop { inline WebViewControlProcess::WebViewControlProcess() : WebViewControlProcess(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline WebViewControlProcess::WebViewControlProcess(winrt::Windows::Web::UI::Interop::WebViewControlProcessOptions const& processOptions) : WebViewControlProcess(impl::call_factory([&](IWebViewControlProcessFactory const& f) { return f.CreateWithOptions(processOptions); })) { } inline WebViewControlProcessOptions::WebViewControlProcessOptions() : WebViewControlProcessOptions(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif