// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_UI_WebUI_H #define WINRT_Windows_UI_WebUI_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.UI.h" #include "winrt/impl/Windows.ApplicationModel.2.h" #include "winrt/impl/Windows.ApplicationModel.Activation.2.h" #include "winrt/impl/Windows.ApplicationModel.Background.2.h" #include "winrt/impl/Windows.ApplicationModel.Core.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Graphics.Printing.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.Web.UI.2.h" #include "winrt/impl/Windows.UI.WebUI.2.h" namespace winrt::impl { template auto consume_Windows_UI_WebUI_IActivatedDeferral::Complete() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IActivatedDeferral)->Complete()); } template auto consume_Windows_UI_WebUI_IActivatedEventArgsDeferral::ActivatedOperation() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IActivatedEventArgsDeferral)->get_ActivatedOperation(&value)); return winrt::Windows::UI::WebUI::ActivatedOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IActivatedOperation::GetDeferral() const { void* deferral{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IActivatedOperation)->GetDeferral(&deferral)); return winrt::Windows::UI::WebUI::ActivatedDeferral{ deferral, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::Content() const { winrt::Windows::UI::WebUI::PrintContent value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_Content(reinterpret_cast(&value))); return value; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::Content(winrt::Windows::UI::WebUI::PrintContent const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->put_Content(static_cast(value))); } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::LeftMargin() const { float value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_LeftMargin(&value)); return value; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::LeftMargin(float value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->put_LeftMargin(value)); } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::TopMargin() const { float value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_TopMargin(&value)); return value; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::TopMargin(float value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->put_TopMargin(value)); } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::RightMargin() const { float value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_RightMargin(&value)); return value; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::RightMargin(float value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->put_RightMargin(value)); } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::BottomMargin() const { float value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_BottomMargin(&value)); return value; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::BottomMargin(float value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->put_BottomMargin(value)); } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::EnableHeaderFooter() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_EnableHeaderFooter(&value)); return value; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::EnableHeaderFooter(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->put_EnableHeaderFooter(value)); } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::ShrinkToFit() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_ShrinkToFit(&value)); return value; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::ShrinkToFit(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->put_ShrinkToFit(value)); } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::PercentScale() const { float pScalePercent{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_PercentScale(&pScalePercent)); return pScalePercent; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::PercentScale(float scalePercent) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->put_PercentScale(scalePercent)); } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::PageRange() const { void* pstrPageRange{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->get_PageRange(&pstrPageRange)); return hstring{ pstrPageRange, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IHtmlPrintDocumentSource::TrySetPageRange(param::hstring const& strPageRange) const { bool pfSuccess{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IHtmlPrintDocumentSource)->TrySetPageRange(*(void**)(&strPageRange), &pfSuccess)); return pfSuccess; } template auto consume_Windows_UI_WebUI_INewWebUIViewCreatedEventArgs::WebUIView() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::INewWebUIViewCreatedEventArgs)->get_WebUIView(&value)); return winrt::Windows::UI::WebUI::WebUIView{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_INewWebUIViewCreatedEventArgs::ActivatedEventArgs() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::INewWebUIViewCreatedEventArgs)->get_ActivatedEventArgs(&value)); return winrt::Windows::ApplicationModel::Activation::IActivatedEventArgs{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_INewWebUIViewCreatedEventArgs::HasPendingNavigate() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::INewWebUIViewCreatedEventArgs)->get_HasPendingNavigate(&value)); return value; } template auto consume_Windows_UI_WebUI_INewWebUIViewCreatedEventArgs::GetDeferral() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::INewWebUIViewCreatedEventArgs)->GetDeferral(&result)); return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Activated(winrt::Windows::UI::WebUI::ActivatedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics)->add_Activated(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Activated(auto_revoke_t, winrt::Windows::UI::WebUI::ActivatedEventHandler const& handler) const { return impl::make_event_revoker(this, Activated(handler)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Activated(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics)->remove_Activated(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Suspending(winrt::Windows::UI::WebUI::SuspendingEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics)->add_Suspending(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Suspending(auto_revoke_t, winrt::Windows::UI::WebUI::SuspendingEventHandler const& handler) const { return impl::make_event_revoker(this, Suspending(handler)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Suspending(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics)->remove_Suspending(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Resuming(winrt::Windows::UI::WebUI::ResumingEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics)->add_Resuming(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Resuming(auto_revoke_t, winrt::Windows::UI::WebUI::ResumingEventHandler const& handler) const { return impl::make_event_revoker(this, Resuming(handler)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Resuming(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics)->remove_Resuming(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Navigated(winrt::Windows::UI::WebUI::NavigatedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics)->add_Navigated(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Navigated(auto_revoke_t, winrt::Windows::UI::WebUI::NavigatedEventHandler const& handler) const { return impl::make_event_revoker(this, Navigated(handler)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics::Navigated(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics)->remove_Navigated(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics2::LeavingBackground(winrt::Windows::UI::WebUI::LeavingBackgroundEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics2)->add_LeavingBackground(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics2::LeavingBackground(auto_revoke_t, winrt::Windows::UI::WebUI::LeavingBackgroundEventHandler const& handler) const { return impl::make_event_revoker(this, LeavingBackground(handler)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics2::LeavingBackground(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics2)->remove_LeavingBackground(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics2::EnteredBackground(winrt::Windows::UI::WebUI::EnteredBackgroundEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics2)->add_EnteredBackground(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics2::EnteredBackground(auto_revoke_t, winrt::Windows::UI::WebUI::EnteredBackgroundEventHandler const& handler) const { return impl::make_event_revoker(this, EnteredBackground(handler)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics2::EnteredBackground(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics2)->remove_EnteredBackground(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics2::EnablePrelaunch(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics2)->EnablePrelaunch(value)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics3::RequestRestartAsync(param::hstring const& launchArguments) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics3)->RequestRestartAsync(*(void**)(&launchArguments), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics3::RequestRestartForUserAsync(winrt::Windows::System::User const& user, param::hstring const& launchArguments) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics3)->RequestRestartForUserAsync(*(void**)(&user), *(void**)(&launchArguments), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics4::NewWebUIViewCreated(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics4)->add_NewWebUIViewCreated(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics4::NewWebUIViewCreated(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, NewWebUIViewCreated(handler)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics4::NewWebUIViewCreated(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics4)->remove_NewWebUIViewCreated(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics4::BackgroundActivated(winrt::Windows::UI::WebUI::BackgroundActivatedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics4)->add_BackgroundActivated(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics4::BackgroundActivated(auto_revoke_t, winrt::Windows::UI::WebUI::BackgroundActivatedEventHandler const& handler) const { return impl::make_event_revoker(this, BackgroundActivated(handler)); } template auto consume_Windows_UI_WebUI_IWebUIActivationStatics4::BackgroundActivated(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIActivationStatics4)->remove_BackgroundActivated(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIBackgroundTaskInstance::Succeeded() const { bool succeeded{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIBackgroundTaskInstance)->get_Succeeded(&succeeded)); return succeeded; } template auto consume_Windows_UI_WebUI_IWebUIBackgroundTaskInstance::Succeeded(bool succeeded) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIBackgroundTaskInstance)->put_Succeeded(succeeded)); } template auto consume_Windows_UI_WebUI_IWebUIBackgroundTaskInstanceStatics::Current() const { void* backgroundTaskInstance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIBackgroundTaskInstanceStatics)->get_Current(&backgroundTaskInstance)); return winrt::Windows::UI::WebUI::IWebUIBackgroundTaskInstance{ backgroundTaskInstance, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IWebUINavigatedDeferral::Complete() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUINavigatedDeferral)->Complete()); } template auto consume_Windows_UI_WebUI_IWebUINavigatedEventArgs::NavigatedOperation() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUINavigatedEventArgs)->get_NavigatedOperation(&value)); return winrt::Windows::UI::WebUI::WebUINavigatedOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IWebUINavigatedOperation::GetDeferral() const { void* deferral{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUINavigatedOperation)->GetDeferral(&deferral)); return winrt::Windows::UI::WebUI::WebUINavigatedDeferral{ deferral, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IWebUIView::ApplicationViewId() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIView)->get_ApplicationViewId(&value)); return value; } template auto consume_Windows_UI_WebUI_IWebUIView::Closed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIView)->add_Closed(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIView::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Closed(handler)); } template auto consume_Windows_UI_WebUI_IWebUIView::Closed(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIView)->remove_Closed(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIView::Activated(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIView)->add_Activated(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_UI_WebUI_IWebUIView::Activated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Activated(handler)); } template auto consume_Windows_UI_WebUI_IWebUIView::Activated(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIView)->remove_Activated(impl::bind_in(token)); } template auto consume_Windows_UI_WebUI_IWebUIView::IgnoreApplicationContentUriRulesNavigationRestrictions() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIView)->get_IgnoreApplicationContentUriRulesNavigationRestrictions(&value)); return value; } template auto consume_Windows_UI_WebUI_IWebUIView::IgnoreApplicationContentUriRulesNavigationRestrictions(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIView)->put_IgnoreApplicationContentUriRulesNavigationRestrictions(value)); } template auto consume_Windows_UI_WebUI_IWebUIViewStatics::CreateAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIViewStatics)->CreateAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_UI_WebUI_IWebUIViewStatics::CreateAsync(winrt::Windows::Foundation::Uri const& uri) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::WebUI::IWebUIViewStatics)->CreateWithUriAsync(*(void**)(&uri), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* sender, void* eventArgs) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&eventArgs)); 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* sender, void* eventArgs) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&eventArgs)); 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* sender, void* e) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&e)); 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* sender, void* e) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&e)); 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* sender, void* e) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&e)); 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* sender) noexcept final try { (*this)(*reinterpret_cast(&sender)); 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* sender, void* e) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&e)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Complete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Complete(); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_ActivatedOperation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ActivatedOperation()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeferral(void** deferral) noexcept final try { clear_abi(deferral); typename D::abi_guard guard(this->shim()); *deferral = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Content(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Content()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Content(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Content(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LeftMargin(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LeftMargin()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_LeftMargin(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().LeftMargin(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TopMargin(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TopMargin()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TopMargin(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TopMargin(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RightMargin(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RightMargin()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RightMargin(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RightMargin(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BottomMargin(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BottomMargin()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_BottomMargin(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BottomMargin(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EnableHeaderFooter(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnableHeaderFooter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_EnableHeaderFooter(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnableHeaderFooter(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ShrinkToFit(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShrinkToFit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ShrinkToFit(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShrinkToFit(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PercentScale(float* pScalePercent) noexcept final try { typename D::abi_guard guard(this->shim()); *pScalePercent = detach_from(this->shim().PercentScale()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PercentScale(float scalePercent) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PercentScale(scalePercent); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PageRange(void** pstrPageRange) noexcept final try { clear_abi(pstrPageRange); typename D::abi_guard guard(this->shim()); *pstrPageRange = detach_from(this->shim().PageRange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TrySetPageRange(void* strPageRange, bool* pfSuccess) noexcept final try { typename D::abi_guard guard(this->shim()); *pfSuccess = detach_from(this->shim().TrySetPageRange(*reinterpret_cast(&strPageRange))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WebUIView(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WebUIView()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ActivatedEventArgs(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ActivatedEventArgs()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasPendingNavigate(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasPendingNavigate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_Activated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Activated(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Activated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Activated(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Suspending(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Suspending(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Suspending(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Suspending(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Resuming(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Resuming(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Resuming(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Resuming(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Navigated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Navigated(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Navigated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Navigated(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_LeavingBackground(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().LeavingBackground(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_LeavingBackground(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().LeavingBackground(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_EnteredBackground(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().EnteredBackground(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_EnteredBackground(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().EnteredBackground(*reinterpret_cast(&token)); return 0; } int32_t __stdcall EnablePrelaunch(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnablePrelaunch(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestRestartAsync(void* launchArguments, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestRestartAsync(*reinterpret_cast(&launchArguments))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestRestartForUserAsync(void* user, void* launchArguments, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestRestartForUserAsync(*reinterpret_cast(&user), *reinterpret_cast(&launchArguments))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_NewWebUIViewCreated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().NewWebUIViewCreated(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_NewWebUIViewCreated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().NewWebUIViewCreated(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BackgroundActivated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BackgroundActivated(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BackgroundActivated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BackgroundActivated(*reinterpret_cast(&token)); return 0; } }; #endif template struct produce : produce_base { int32_t __stdcall get_Succeeded(bool* succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); *succeeded = detach_from(this->shim().Succeeded()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Succeeded(bool succeeded) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Succeeded(succeeded); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Current(void** backgroundTaskInstance) noexcept final try { clear_abi(backgroundTaskInstance); typename D::abi_guard guard(this->shim()); *backgroundTaskInstance = detach_from(this->shim().Current()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Complete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Complete(); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_NavigatedOperation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NavigatedOperation()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeferral(void** deferral) noexcept final try { clear_abi(deferral); typename D::abi_guard guard(this->shim()); *deferral = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ApplicationViewId(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ApplicationViewId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Closed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Closed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Closed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Activated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Activated(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Activated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Activated(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_IgnoreApplicationContentUriRulesNavigationRestrictions(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IgnoreApplicationContentUriRulesNavigationRestrictions()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IgnoreApplicationContentUriRulesNavigationRestrictions(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IgnoreApplicationContentUriRulesNavigationRestrictions(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithUriAsync(void* uri, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateAsync(*reinterpret_cast(&uri))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::UI::WebUI { inline auto WebUIApplication::Activated(winrt::Windows::UI::WebUI::ActivatedEventHandler const& handler) { return impl::call_factory([&](IWebUIActivationStatics const& f) { return f.Activated(handler); }); } inline auto WebUIApplication::Activated(auto_revoke_t, winrt::Windows::UI::WebUI::ActivatedEventHandler const& handler) { auto f = get_activation_factory(); return WebUIApplication::Activated_revoker{ f, f.Activated(handler) }; } inline auto WebUIApplication::Activated(winrt::event_token const& token) { impl::call_factory([&](IWebUIActivationStatics const& f) { return f.Activated(token); }); } inline auto WebUIApplication::Suspending(winrt::Windows::UI::WebUI::SuspendingEventHandler const& handler) { return impl::call_factory([&](IWebUIActivationStatics const& f) { return f.Suspending(handler); }); } inline auto WebUIApplication::Suspending(auto_revoke_t, winrt::Windows::UI::WebUI::SuspendingEventHandler const& handler) { auto f = get_activation_factory(); return WebUIApplication::Suspending_revoker{ f, f.Suspending(handler) }; } inline auto WebUIApplication::Suspending(winrt::event_token const& token) { impl::call_factory([&](IWebUIActivationStatics const& f) { return f.Suspending(token); }); } inline auto WebUIApplication::Resuming(winrt::Windows::UI::WebUI::ResumingEventHandler const& handler) { return impl::call_factory([&](IWebUIActivationStatics const& f) { return f.Resuming(handler); }); } inline auto WebUIApplication::Resuming(auto_revoke_t, winrt::Windows::UI::WebUI::ResumingEventHandler const& handler) { auto f = get_activation_factory(); return WebUIApplication::Resuming_revoker{ f, f.Resuming(handler) }; } inline auto WebUIApplication::Resuming(winrt::event_token const& token) { impl::call_factory([&](IWebUIActivationStatics const& f) { return f.Resuming(token); }); } inline auto WebUIApplication::Navigated(winrt::Windows::UI::WebUI::NavigatedEventHandler const& handler) { return impl::call_factory([&](IWebUIActivationStatics const& f) { return f.Navigated(handler); }); } inline auto WebUIApplication::Navigated(auto_revoke_t, winrt::Windows::UI::WebUI::NavigatedEventHandler const& handler) { auto f = get_activation_factory(); return WebUIApplication::Navigated_revoker{ f, f.Navigated(handler) }; } inline auto WebUIApplication::Navigated(winrt::event_token const& token) { impl::call_factory([&](IWebUIActivationStatics const& f) { return f.Navigated(token); }); } inline auto WebUIApplication::LeavingBackground(winrt::Windows::UI::WebUI::LeavingBackgroundEventHandler const& handler) { return impl::call_factory([&](IWebUIActivationStatics2 const& f) { return f.LeavingBackground(handler); }); } inline auto WebUIApplication::LeavingBackground(auto_revoke_t, winrt::Windows::UI::WebUI::LeavingBackgroundEventHandler const& handler) { auto f = get_activation_factory(); return WebUIApplication::LeavingBackground_revoker{ f, f.LeavingBackground(handler) }; } inline auto WebUIApplication::LeavingBackground(winrt::event_token const& token) { impl::call_factory([&](IWebUIActivationStatics2 const& f) { return f.LeavingBackground(token); }); } inline auto WebUIApplication::EnteredBackground(winrt::Windows::UI::WebUI::EnteredBackgroundEventHandler const& handler) { return impl::call_factory([&](IWebUIActivationStatics2 const& f) { return f.EnteredBackground(handler); }); } inline auto WebUIApplication::EnteredBackground(auto_revoke_t, winrt::Windows::UI::WebUI::EnteredBackgroundEventHandler const& handler) { auto f = get_activation_factory(); return WebUIApplication::EnteredBackground_revoker{ f, f.EnteredBackground(handler) }; } inline auto WebUIApplication::EnteredBackground(winrt::event_token const& token) { impl::call_factory([&](IWebUIActivationStatics2 const& f) { return f.EnteredBackground(token); }); } inline auto WebUIApplication::EnablePrelaunch(bool value) { impl::call_factory([&](IWebUIActivationStatics2 const& f) { return f.EnablePrelaunch(value); }); } inline auto WebUIApplication::RequestRestartAsync(param::hstring const& launchArguments) { return impl::call_factory([&](IWebUIActivationStatics3 const& f) { return f.RequestRestartAsync(launchArguments); }); } inline auto WebUIApplication::RequestRestartForUserAsync(winrt::Windows::System::User const& user, param::hstring const& launchArguments) { return impl::call_factory([&](IWebUIActivationStatics3 const& f) { return f.RequestRestartForUserAsync(user, launchArguments); }); } inline auto WebUIApplication::NewWebUIViewCreated(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](IWebUIActivationStatics4 const& f) { return f.NewWebUIViewCreated(handler); }); } inline auto WebUIApplication::NewWebUIViewCreated(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return WebUIApplication::NewWebUIViewCreated_revoker{ f, f.NewWebUIViewCreated(handler) }; } inline auto WebUIApplication::NewWebUIViewCreated(winrt::event_token const& token) { impl::call_factory([&](IWebUIActivationStatics4 const& f) { return f.NewWebUIViewCreated(token); }); } inline auto WebUIApplication::BackgroundActivated(winrt::Windows::UI::WebUI::BackgroundActivatedEventHandler const& handler) { return impl::call_factory([&](IWebUIActivationStatics4 const& f) { return f.BackgroundActivated(handler); }); } inline auto WebUIApplication::BackgroundActivated(auto_revoke_t, winrt::Windows::UI::WebUI::BackgroundActivatedEventHandler const& handler) { auto f = get_activation_factory(); return WebUIApplication::BackgroundActivated_revoker{ f, f.BackgroundActivated(handler) }; } inline auto WebUIApplication::BackgroundActivated(winrt::event_token const& token) { impl::call_factory([&](IWebUIActivationStatics4 const& f) { return f.BackgroundActivated(token); }); } inline auto WebUIBackgroundTaskInstance::Current() { return impl::call_factory_cast([](IWebUIBackgroundTaskInstanceStatics const& f) { return f.Current(); }); } inline auto WebUIView::CreateAsync() { return impl::call_factory_cast(*)(IWebUIViewStatics const&), WebUIView, IWebUIViewStatics>([](IWebUIViewStatics const& f) { return f.CreateAsync(); }); } inline auto WebUIView::CreateAsync(winrt::Windows::Foundation::Uri const& uri) { return impl::call_factory([&](IWebUIViewStatics const& f) { return f.CreateAsync(uri); }); } template ActivatedEventHandler::ActivatedEventHandler(L handler) : ActivatedEventHandler(impl::make_delegate(std::forward(handler))) { } template ActivatedEventHandler::ActivatedEventHandler(F* handler) : ActivatedEventHandler([=](auto&&... args) { return handler(args...); }) { } template ActivatedEventHandler::ActivatedEventHandler(O* object, M method) : ActivatedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template ActivatedEventHandler::ActivatedEventHandler(com_ptr&& object, M method) : ActivatedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template ActivatedEventHandler::ActivatedEventHandler(weak_ref&& object, LM&& lambda_or_method) : ActivatedEventHandler([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 ActivatedEventHandler::ActivatedEventHandler(std::shared_ptr&& object, M method) : ActivatedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template ActivatedEventHandler::ActivatedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : ActivatedEventHandler([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 ActivatedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::ApplicationModel::Activation::IActivatedEventArgs const& eventArgs) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&eventArgs))); } template BackgroundActivatedEventHandler::BackgroundActivatedEventHandler(L handler) : BackgroundActivatedEventHandler(impl::make_delegate(std::forward(handler))) { } template BackgroundActivatedEventHandler::BackgroundActivatedEventHandler(F* handler) : BackgroundActivatedEventHandler([=](auto&&... args) { return handler(args...); }) { } template BackgroundActivatedEventHandler::BackgroundActivatedEventHandler(O* object, M method) : BackgroundActivatedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template BackgroundActivatedEventHandler::BackgroundActivatedEventHandler(com_ptr&& object, M method) : BackgroundActivatedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template BackgroundActivatedEventHandler::BackgroundActivatedEventHandler(weak_ref&& object, LM&& lambda_or_method) : BackgroundActivatedEventHandler([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 BackgroundActivatedEventHandler::BackgroundActivatedEventHandler(std::shared_ptr&& object, M method) : BackgroundActivatedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template BackgroundActivatedEventHandler::BackgroundActivatedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : BackgroundActivatedEventHandler([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 BackgroundActivatedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::ApplicationModel::Activation::IBackgroundActivatedEventArgs const& eventArgs) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&eventArgs))); } template EnteredBackgroundEventHandler::EnteredBackgroundEventHandler(L handler) : EnteredBackgroundEventHandler(impl::make_delegate(std::forward(handler))) { } template EnteredBackgroundEventHandler::EnteredBackgroundEventHandler(F* handler) : EnteredBackgroundEventHandler([=](auto&&... args) { return handler(args...); }) { } template EnteredBackgroundEventHandler::EnteredBackgroundEventHandler(O* object, M method) : EnteredBackgroundEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template EnteredBackgroundEventHandler::EnteredBackgroundEventHandler(com_ptr&& object, M method) : EnteredBackgroundEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template EnteredBackgroundEventHandler::EnteredBackgroundEventHandler(weak_ref&& object, LM&& lambda_or_method) : EnteredBackgroundEventHandler([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 EnteredBackgroundEventHandler::EnteredBackgroundEventHandler(std::shared_ptr&& object, M method) : EnteredBackgroundEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template EnteredBackgroundEventHandler::EnteredBackgroundEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : EnteredBackgroundEventHandler([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 EnteredBackgroundEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::ApplicationModel::IEnteredBackgroundEventArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&e))); } template LeavingBackgroundEventHandler::LeavingBackgroundEventHandler(L handler) : LeavingBackgroundEventHandler(impl::make_delegate(std::forward(handler))) { } template LeavingBackgroundEventHandler::LeavingBackgroundEventHandler(F* handler) : LeavingBackgroundEventHandler([=](auto&&... args) { return handler(args...); }) { } template LeavingBackgroundEventHandler::LeavingBackgroundEventHandler(O* object, M method) : LeavingBackgroundEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template LeavingBackgroundEventHandler::LeavingBackgroundEventHandler(com_ptr&& object, M method) : LeavingBackgroundEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template LeavingBackgroundEventHandler::LeavingBackgroundEventHandler(weak_ref&& object, LM&& lambda_or_method) : LeavingBackgroundEventHandler([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 LeavingBackgroundEventHandler::LeavingBackgroundEventHandler(std::shared_ptr&& object, M method) : LeavingBackgroundEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template LeavingBackgroundEventHandler::LeavingBackgroundEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : LeavingBackgroundEventHandler([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 LeavingBackgroundEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::ApplicationModel::ILeavingBackgroundEventArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&e))); } template NavigatedEventHandler::NavigatedEventHandler(L handler) : NavigatedEventHandler(impl::make_delegate(std::forward(handler))) { } template NavigatedEventHandler::NavigatedEventHandler(F* handler) : NavigatedEventHandler([=](auto&&... args) { return handler(args...); }) { } template NavigatedEventHandler::NavigatedEventHandler(O* object, M method) : NavigatedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template NavigatedEventHandler::NavigatedEventHandler(com_ptr&& object, M method) : NavigatedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template NavigatedEventHandler::NavigatedEventHandler(weak_ref&& object, LM&& lambda_or_method) : NavigatedEventHandler([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 NavigatedEventHandler::NavigatedEventHandler(std::shared_ptr&& object, M method) : NavigatedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template NavigatedEventHandler::NavigatedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : NavigatedEventHandler([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 NavigatedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::WebUI::IWebUINavigatedEventArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&e))); } template ResumingEventHandler::ResumingEventHandler(L handler) : ResumingEventHandler(impl::make_delegate(std::forward(handler))) { } template ResumingEventHandler::ResumingEventHandler(F* handler) : ResumingEventHandler([=](auto&&... args) { return handler(args...); }) { } template ResumingEventHandler::ResumingEventHandler(O* object, M method) : ResumingEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template ResumingEventHandler::ResumingEventHandler(com_ptr&& object, M method) : ResumingEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template ResumingEventHandler::ResumingEventHandler(weak_ref&& object, LM&& lambda_or_method) : ResumingEventHandler([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 ResumingEventHandler::ResumingEventHandler(std::shared_ptr&& object, M method) : ResumingEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template ResumingEventHandler::ResumingEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : ResumingEventHandler([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 ResumingEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender))); } template SuspendingEventHandler::SuspendingEventHandler(L handler) : SuspendingEventHandler(impl::make_delegate(std::forward(handler))) { } template SuspendingEventHandler::SuspendingEventHandler(F* handler) : SuspendingEventHandler([=](auto&&... args) { return handler(args...); }) { } template SuspendingEventHandler::SuspendingEventHandler(O* object, M method) : SuspendingEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template SuspendingEventHandler::SuspendingEventHandler(com_ptr&& object, M method) : SuspendingEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template SuspendingEventHandler::SuspendingEventHandler(weak_ref&& object, LM&& lambda_or_method) : SuspendingEventHandler([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 SuspendingEventHandler::SuspendingEventHandler(std::shared_ptr&& object, M method) : SuspendingEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template SuspendingEventHandler::SuspendingEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : SuspendingEventHandler([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 SuspendingEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::ApplicationModel::ISuspendingEventArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&e))); } } 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 {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif