// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_ApplicationModel_Core_H #define WINRT_Windows_ApplicationModel_Core_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.ApplicationModel.h" #include "winrt/impl/Windows.ApplicationModel.2.h" #include "winrt/impl/Windows.ApplicationModel.Activation.2.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.ApplicationModel.Core.2.h" namespace winrt::impl { template auto consume_Windows_ApplicationModel_Core_IAppListEntry::DisplayInfo() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IAppListEntry)->get_DisplayInfo(&value)); return winrt::Windows::ApplicationModel::AppDisplayInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_IAppListEntry::LaunchAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IAppListEntry)->LaunchAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_IAppListEntry2::AppUserModelId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IAppListEntry2)->get_AppUserModelId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_IAppListEntry3::LaunchForUserAsync(winrt::Windows::System::User const& user) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IAppListEntry3)->LaunchForUserAsync(*(void**)(&user), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_IAppListEntry4::AppInfo() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IAppListEntry4)->get_AppInfo(&value)); return winrt::Windows::ApplicationModel::AppInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Suspending(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->add_Suspending(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Suspending(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, Suspending(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Suspending(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->remove_Suspending(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Resuming(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->add_Resuming(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Resuming(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, Resuming(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Resuming(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->remove_Resuming(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Properties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->get_Properties(&value)); return winrt::Windows::Foundation::Collections::IPropertySet{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::GetCurrentView() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->GetCurrentView(&value)); return winrt::Windows::ApplicationModel::Core::CoreApplicationView{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::Run(winrt::Windows::ApplicationModel::Core::IFrameworkViewSource const& viewSource) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->Run(*(void**)(&viewSource))); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication::RunWithActivationFactories(winrt::Windows::Foundation::IGetActivationFactory const& activationFactoryCallback) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication)->RunWithActivationFactories(*(void**)(&activationFactoryCallback))); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::BackgroundActivated(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication2)->add_BackgroundActivated(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::BackgroundActivated(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, BackgroundActivated(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::BackgroundActivated(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication2)->remove_BackgroundActivated(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::LeavingBackground(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication2)->add_LeavingBackground(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::LeavingBackground(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, LeavingBackground(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::LeavingBackground(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication2)->remove_LeavingBackground(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::EnteredBackground(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication2)->add_EnteredBackground(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::EnteredBackground(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, EnteredBackground(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::EnteredBackground(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication2)->remove_EnteredBackground(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication2::EnablePrelaunch(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication2)->EnablePrelaunch(value)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplication3::RequestRestartAsync(param::hstring const& launchArguments) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication3)->RequestRestartAsync(*(void**)(&launchArguments), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplication3::RequestRestartForUserAsync(winrt::Windows::System::User const& user, param::hstring const& launchArguments) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplication3)->RequestRestartForUserAsync(*(void**)(&user), *(void**)(&launchArguments), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationExit::Exit() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationExit)->Exit()); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationExit::Exiting(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationExit)->add_Exiting(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationExit::Exiting(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, Exiting(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationExit::Exiting(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationExit)->remove_Exiting(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationUnhandledError::UnhandledErrorDetected(winrt::Windows::Foundation::EventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationUnhandledError)->add_UnhandledErrorDetected(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationUnhandledError::UnhandledErrorDetected(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) const { return impl::make_event_revoker(this, UnhandledErrorDetected(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationUnhandledError::UnhandledErrorDetected(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationUnhandledError)->remove_UnhandledErrorDetected(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationUseCount::IncrementApplicationUseCount() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationUseCount)->IncrementApplicationUseCount()); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationUseCount::DecrementApplicationUseCount() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationUseCount)->DecrementApplicationUseCount()); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView::CoreWindow() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView)->get_CoreWindow(&value)); return winrt::Windows::UI::Core::CoreWindow{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView::Activated(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView)->add_Activated(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView::Activated(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Activated(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView::Activated(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView)->remove_Activated(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView::IsMain() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView)->get_IsMain(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView::IsHosted() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView)->get_IsHosted(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView2::Dispatcher() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView2)->get_Dispatcher(&value)); return winrt::Windows::UI::Core::CoreDispatcher{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView3::IsComponent() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView3)->get_IsComponent(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView3::TitleBar() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView3)->get_TitleBar(&value)); return winrt::Windows::ApplicationModel::Core::CoreApplicationViewTitleBar{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView3::HostedViewClosing(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView3)->add_HostedViewClosing(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView3::HostedViewClosing(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, HostedViewClosing(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView3::HostedViewClosing(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView3)->remove_HostedViewClosing(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView5::Properties() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView5)->get_Properties(&value)); return winrt::Windows::Foundation::Collections::IPropertySet{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationView6::DispatcherQueue() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationView6)->get_DispatcherQueue(&value)); return winrt::Windows::System::DispatcherQueue{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::ExtendViewIntoTitleBar(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->put_ExtendViewIntoTitleBar(value)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::ExtendViewIntoTitleBar() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->get_ExtendViewIntoTitleBar(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::SystemOverlayLeftInset() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->get_SystemOverlayLeftInset(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::SystemOverlayRightInset() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->get_SystemOverlayRightInset(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::Height() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->get_Height(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::LayoutMetricsChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->add_LayoutMetricsChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::LayoutMetricsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, LayoutMetricsChanged(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::LayoutMetricsChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->remove_LayoutMetricsChanged(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::IsVisible() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->get_IsVisible(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::IsVisibleChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->add_IsVisibleChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::IsVisibleChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, IsVisibleChanged(handler)); } template auto consume_Windows_ApplicationModel_Core_ICoreApplicationViewTitleBar::IsVisibleChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreApplicationViewTitleBar)->remove_IsVisibleChanged(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_Core_ICoreImmersiveApplication::Views() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreImmersiveApplication)->get_Views(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreImmersiveApplication::CreateNewView(param::hstring const& runtimeType, param::hstring const& entryPoint) const { void* view{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreImmersiveApplication)->CreateNewView(*(void**)(&runtimeType), *(void**)(&entryPoint), &view)); return winrt::Windows::ApplicationModel::Core::CoreApplicationView{ view, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreImmersiveApplication::MainView() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreImmersiveApplication)->get_MainView(&value)); return winrt::Windows::ApplicationModel::Core::CoreApplicationView{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreImmersiveApplication2::CreateNewView() const { void* view{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreImmersiveApplication2)->CreateNewViewFromMainView(&view)); return winrt::Windows::ApplicationModel::Core::CoreApplicationView{ view, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_ICoreImmersiveApplication3::CreateNewView(winrt::Windows::ApplicationModel::Core::IFrameworkViewSource const& viewSource) const { void* view{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::ICoreImmersiveApplication3)->CreateNewViewWithViewSource(*(void**)(&viewSource), &view)); return winrt::Windows::ApplicationModel::Core::CoreApplicationView{ view, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_IFrameworkView::Initialize(winrt::Windows::ApplicationModel::Core::CoreApplicationView const& applicationView) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IFrameworkView)->Initialize(*(void**)(&applicationView))); } template auto consume_Windows_ApplicationModel_Core_IFrameworkView::SetWindow(winrt::Windows::UI::Core::CoreWindow const& window) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IFrameworkView)->SetWindow(*(void**)(&window))); } template auto consume_Windows_ApplicationModel_Core_IFrameworkView::Load(param::hstring const& entryPoint) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IFrameworkView)->Load(*(void**)(&entryPoint))); } template auto consume_Windows_ApplicationModel_Core_IFrameworkView::Run() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IFrameworkView)->Run()); } template auto consume_Windows_ApplicationModel_Core_IFrameworkView::Uninitialize() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IFrameworkView)->Uninitialize()); } template auto consume_Windows_ApplicationModel_Core_IFrameworkViewSource::CreateView() const { void* viewProvider{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IFrameworkViewSource)->CreateView(&viewProvider)); return winrt::Windows::ApplicationModel::Core::IFrameworkView{ viewProvider, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_IHostedViewClosingEventArgs::GetDeferral() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IHostedViewClosingEventArgs)->GetDeferral(&result)); return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_Core_IUnhandledError::Handled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IUnhandledError)->get_Handled(&value)); return value; } template auto consume_Windows_ApplicationModel_Core_IUnhandledError::Propagate() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IUnhandledError)->Propagate()); } template auto consume_Windows_ApplicationModel_Core_IUnhandledErrorDetectedEventArgs::UnhandledError() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::Core::IUnhandledErrorDetectedEventArgs)->get_UnhandledError(&value)); return winrt::Windows::ApplicationModel::Core::UnhandledError{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayInfo()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppUserModelId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppUserModelId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall LaunchForUserAsync(void* user, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchForUserAsync(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall 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 const*>(&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 const*>(&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 get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentView(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentView()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Run(void* viewSource) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Run(*reinterpret_cast(&viewSource)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RunWithActivationFactories(void* activationFactoryCallback) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RunWithActivationFactories(*reinterpret_cast(&activationFactoryCallback)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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 const*>(&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; } 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 const*>(&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 const*>(&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 Exit() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Exit(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Exiting(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Exiting(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Exiting(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Exiting(*reinterpret_cast(&token)); return 0; } }; #endif template struct produce : produce_base { int32_t __stdcall add_UnhandledErrorDetected(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().UnhandledErrorDetected(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_UnhandledErrorDetected(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().UnhandledErrorDetected(*reinterpret_cast(&token)); return 0; } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IncrementApplicationUseCount() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IncrementApplicationUseCount(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DecrementApplicationUseCount() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DecrementApplicationUseCount(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CoreWindow(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CoreWindow()); return 0; } catch (...) { return to_hresult(); } 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_IsMain(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMain()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsHosted(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsHosted()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Dispatcher(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Dispatcher()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsComponent(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsComponent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TitleBar(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TitleBar()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_HostedViewClosing(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().HostedViewClosing(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_HostedViewClosing(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().HostedViewClosing(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DispatcherQueue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DispatcherQueue()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_ExtendViewIntoTitleBar(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ExtendViewIntoTitleBar(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendViewIntoTitleBar(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendViewIntoTitleBar()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SystemOverlayLeftInset(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SystemOverlayLeftInset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SystemOverlayRightInset(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SystemOverlayRightInset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Height(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Height()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_LayoutMetricsChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().LayoutMetricsChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_LayoutMetricsChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().LayoutMetricsChanged(*reinterpret_cast(&token)); return 0; } 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 add_IsVisibleChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().IsVisibleChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_IsVisibleChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().IsVisibleChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Views(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Views()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateNewView(void* runtimeType, void* entryPoint, void** view) noexcept final try { clear_abi(view); typename D::abi_guard guard(this->shim()); *view = detach_from(this->shim().CreateNewView(*reinterpret_cast(&runtimeType), *reinterpret_cast(&entryPoint))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MainView(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MainView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateNewViewFromMainView(void** view) noexcept final try { clear_abi(view); typename D::abi_guard guard(this->shim()); *view = detach_from(this->shim().CreateNewView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateNewViewWithViewSource(void* viewSource, void** view) noexcept final try { clear_abi(view); typename D::abi_guard guard(this->shim()); *view = detach_from(this->shim().CreateNewView(*reinterpret_cast(&viewSource))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall Initialize(void* applicationView) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Initialize(*reinterpret_cast(&applicationView)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetWindow(void* window) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetWindow(*reinterpret_cast(&window)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Load(void* entryPoint) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Load(*reinterpret_cast(&entryPoint)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Run() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Run(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Uninitialize() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Uninitialize(); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall CreateView(void** viewProvider) noexcept final try { clear_abi(viewProvider); typename D::abi_guard guard(this->shim()); *viewProvider = detach_from(this->shim().CreateView()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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 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 Propagate() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Propagate(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_UnhandledError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UnhandledError()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::ApplicationModel::Core { inline auto CoreApplication::Id() { return impl::call_factory_cast([](ICoreApplication const& f) { return f.Id(); }); } inline auto CoreApplication::Suspending(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](ICoreApplication const& f) { return f.Suspending(handler); }); } inline auto CoreApplication::Suspending(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return CoreApplication::Suspending_revoker{ f, f.Suspending(handler) }; } inline auto CoreApplication::Suspending(winrt::event_token const& token) { impl::call_factory([&](ICoreApplication const& f) { return f.Suspending(token); }); } inline auto CoreApplication::Resuming(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](ICoreApplication const& f) { return f.Resuming(handler); }); } inline auto CoreApplication::Resuming(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return CoreApplication::Resuming_revoker{ f, f.Resuming(handler) }; } inline auto CoreApplication::Resuming(winrt::event_token const& token) { impl::call_factory([&](ICoreApplication const& f) { return f.Resuming(token); }); } inline auto CoreApplication::Properties() { return impl::call_factory_cast([](ICoreApplication const& f) { return f.Properties(); }); } inline auto CoreApplication::GetCurrentView() { return impl::call_factory_cast([](ICoreApplication const& f) { return f.GetCurrentView(); }); } inline auto CoreApplication::Run(winrt::Windows::ApplicationModel::Core::IFrameworkViewSource const& viewSource) { impl::call_factory([&](ICoreApplication const& f) { return f.Run(viewSource); }); } inline auto CoreApplication::RunWithActivationFactories(winrt::Windows::Foundation::IGetActivationFactory const& activationFactoryCallback) { impl::call_factory([&](ICoreApplication const& f) { return f.RunWithActivationFactories(activationFactoryCallback); }); } inline auto CoreApplication::BackgroundActivated(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](ICoreApplication2 const& f) { return f.BackgroundActivated(handler); }); } inline auto CoreApplication::BackgroundActivated(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return CoreApplication::BackgroundActivated_revoker{ f, f.BackgroundActivated(handler) }; } inline auto CoreApplication::BackgroundActivated(winrt::event_token const& token) { impl::call_factory([&](ICoreApplication2 const& f) { return f.BackgroundActivated(token); }); } inline auto CoreApplication::LeavingBackground(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](ICoreApplication2 const& f) { return f.LeavingBackground(handler); }); } inline auto CoreApplication::LeavingBackground(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return CoreApplication::LeavingBackground_revoker{ f, f.LeavingBackground(handler) }; } inline auto CoreApplication::LeavingBackground(winrt::event_token const& token) { impl::call_factory([&](ICoreApplication2 const& f) { return f.LeavingBackground(token); }); } inline auto CoreApplication::EnteredBackground(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](ICoreApplication2 const& f) { return f.EnteredBackground(handler); }); } inline auto CoreApplication::EnteredBackground(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return CoreApplication::EnteredBackground_revoker{ f, f.EnteredBackground(handler) }; } inline auto CoreApplication::EnteredBackground(winrt::event_token const& token) { impl::call_factory([&](ICoreApplication2 const& f) { return f.EnteredBackground(token); }); } inline auto CoreApplication::EnablePrelaunch(bool value) { impl::call_factory([&](ICoreApplication2 const& f) { return f.EnablePrelaunch(value); }); } inline auto CoreApplication::RequestRestartAsync(param::hstring const& launchArguments) { return impl::call_factory([&](ICoreApplication3 const& f) { return f.RequestRestartAsync(launchArguments); }); } inline auto CoreApplication::RequestRestartForUserAsync(winrt::Windows::System::User const& user, param::hstring const& launchArguments) { return impl::call_factory([&](ICoreApplication3 const& f) { return f.RequestRestartForUserAsync(user, launchArguments); }); } inline auto CoreApplication::Exit() { impl::call_factory_cast([](ICoreApplicationExit const& f) { return f.Exit(); }); } inline auto CoreApplication::Exiting(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](ICoreApplicationExit const& f) { return f.Exiting(handler); }); } inline auto CoreApplication::Exiting(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return CoreApplication::Exiting_revoker{ f, f.Exiting(handler) }; } inline auto CoreApplication::Exiting(winrt::event_token const& token) { impl::call_factory([&](ICoreApplicationExit const& f) { return f.Exiting(token); }); } inline auto CoreApplication::UnhandledErrorDetected(winrt::Windows::Foundation::EventHandler const& handler) { return impl::call_factory([&](ICoreApplicationUnhandledError const& f) { return f.UnhandledErrorDetected(handler); }); } inline auto CoreApplication::UnhandledErrorDetected(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& handler) { auto f = get_activation_factory(); return CoreApplication::UnhandledErrorDetected_revoker{ f, f.UnhandledErrorDetected(handler) }; } inline auto CoreApplication::UnhandledErrorDetected(winrt::event_token const& token) { impl::call_factory([&](ICoreApplicationUnhandledError const& f) { return f.UnhandledErrorDetected(token); }); } inline auto CoreApplication::IncrementApplicationUseCount() { impl::call_factory_cast([](ICoreApplicationUseCount const& f) { return f.IncrementApplicationUseCount(); }); } inline auto CoreApplication::DecrementApplicationUseCount() { impl::call_factory_cast([](ICoreApplicationUseCount const& f) { return f.DecrementApplicationUseCount(); }); } inline auto CoreApplication::Views() { return impl::call_factory_cast(*)(ICoreImmersiveApplication const&), CoreApplication, ICoreImmersiveApplication>([](ICoreImmersiveApplication const& f) { return f.Views(); }); } inline auto CoreApplication::CreateNewView(param::hstring const& runtimeType, param::hstring const& entryPoint) { return impl::call_factory([&](ICoreImmersiveApplication const& f) { return f.CreateNewView(runtimeType, entryPoint); }); } inline auto CoreApplication::MainView() { return impl::call_factory_cast([](ICoreImmersiveApplication const& f) { return f.MainView(); }); } inline auto CoreApplication::CreateNewView() { return impl::call_factory_cast([](ICoreImmersiveApplication2 const& f) { return f.CreateNewView(); }); } inline auto CoreApplication::CreateNewView(winrt::Windows::ApplicationModel::Core::IFrameworkViewSource const& viewSource) { return impl::call_factory([&](ICoreImmersiveApplication3 const& f) { return f.CreateNewView(viewSource); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif