// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Microsoft_UI_Xaml_Navigation_H #define WINRT_Microsoft_UI_Xaml_Navigation_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Microsoft.UI.Xaml.h" #include "winrt/impl/Microsoft.UI.Xaml.2.h" #include "winrt/impl/Microsoft.UI.Xaml.Media.Animation.2.h" #include "winrt/impl/Microsoft.UI.Xaml.Navigation.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.UI.Xaml.Interop.2.h" namespace winrt::impl { template auto consume_Microsoft_UI_Xaml_Navigation_IFrameNavigationOptions< D>::IsNavigationStackEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsNavigationStackEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsNavigationStackEnabled(&value)); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_IFrameNavigationOptions< D>::IsNavigationStackEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsNavigationStackEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsNavigationStackEnabled(value)); } } template auto consume_Microsoft_UI_Xaml_Navigation_IFrameNavigationOptions< D>::TransitionInfoOverride() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TransitionInfoOverride(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TransitionInfoOverride(&value)); } return winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_IFrameNavigationOptions:: TransitionInfoOverride(winrt::Microsoft::UI::Xaml::Media::Animation:: NavigationTransitionInfo const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptions, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->put_TransitionInfoOverride(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_TransitionInfoOverride(*(void**)(&value))); } } template auto consume_Microsoft_UI_Xaml_Navigation_IFrameNavigationOptionsFactory:: CreateInstance( winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptionsFactory, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateInstance( *(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance( *(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); } return winrt::Microsoft::UI::Xaml::Navigation::FrameNavigationOptions{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigatingCancelEventArgs< D>::Cancel() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigatingCancelEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Cancel(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Cancel(&value)); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigatingCancelEventArgs::Cancel( bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigatingCancelEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Cancel(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Cancel(value)); } } template auto consume_Microsoft_UI_Xaml_Navigation_INavigatingCancelEventArgs< D>::NavigationMode() const { winrt::Microsoft::UI::Xaml::Navigation::NavigationMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigatingCancelEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NavigationMode( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NavigationMode( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigatingCancelEventArgs< D>::SourcePageType() const { winrt::Windows::UI::Xaml::Interop::TypeName value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigatingCancelEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigatingCancelEventArgs< D>::Parameter() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigatingCancelEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Parameter(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Parameter(&value)); } return winrt::Windows::Foundation::IInspectable{value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigatingCancelEventArgs< D>::NavigationTransitionInfo() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigatingCancelEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NavigationTransitionInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NavigationTransitionInfo(&value)); } return winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationEventArgs::Content() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationEventArgs, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Content(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Content(&value)); } return winrt::Windows::Foundation::IInspectable{value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationEventArgs::Parameter() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationEventArgs, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Parameter(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Parameter(&value)); } return winrt::Windows::Foundation::IInspectable{value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationEventArgs< D>::NavigationTransitionInfo() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationEventArgs, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NavigationTransitionInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NavigationTransitionInfo(&value)); } return winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationEventArgs< D>::SourcePageType() const { winrt::Windows::UI::Xaml::Interop::TypeName value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationEventArgs, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationEventArgs< D>::NavigationMode() const { winrt::Microsoft::UI::Xaml::Navigation::NavigationMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationEventArgs, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NavigationMode( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NavigationMode( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationEventArgs::Uri() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationEventArgs, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Uri(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uri(&value)); } return winrt::Windows::Foundation::Uri{value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationEventArgs::Uri( winrt::Windows::Foundation::Uri const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationEventArgs, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Uri(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Uri(*(void**)(&value))); } } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationFailedEventArgs< D>::Exception() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationFailedEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Exception(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Exception(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationFailedEventArgs< D>::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationFailedEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationFailedEventArgs< D>::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationFailedEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Microsoft_UI_Xaml_Navigation_INavigationFailedEventArgs< D>::SourcePageType() const { winrt::Windows::UI::Xaml::Interop::TypeName value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::INavigationFailedEventArgs, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_IPageStackEntry::SourcePageType() const { winrt::Windows::UI::Xaml::Interop::TypeName value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntry>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntry, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SourcePageType(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Xaml_Navigation_IPageStackEntry::Parameter() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntry>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntry, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Parameter(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Parameter(&value)); } return winrt::Windows::Foundation::IInspectable{value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_IPageStackEntry< D>::NavigationTransitionInfo() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntry>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntry, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NavigationTransitionInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NavigationTransitionInfo(&value)); } return winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_IPageStackEntryFactory:: CreateInstance( winrt::Windows::UI::Xaml::Interop::TypeName const& sourcePageType, winrt::Windows::Foundation::IInspectable const& parameter, winrt::Microsoft::UI::Xaml::Media::Animation:: NavigationTransitionInfo const& navigationTransitionInfo) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntryFactory, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateInstance( impl::bind_in(sourcePageType), *(void**)(¶meter), *(void**)(&navigationTransitionInfo), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance( impl::bind_in(sourcePageType), *(void**)(¶meter), *(void**)(&navigationTransitionInfo), &value)); } return winrt::Microsoft::UI::Xaml::Navigation::PageStackEntry{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Xaml_Navigation_IPageStackEntryStatics< D>::SourcePageTypeProperty() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntryStatics, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SourcePageTypeProperty(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SourcePageTypeProperty(&value)); } return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi}; } template struct delegate final : implements_delegate< winrt::Microsoft::UI::Xaml::Navigation::NavigatedEventHandler, H> { delegate(H&& handler) : implements_delegate< winrt::Microsoft::UI::Xaml::Navigation::NavigatedEventHandler, H>( std::forward(handler)) {} int32_t __stdcall Invoke(void* sender, void* e) noexcept final try { (*this)( *reinterpret_cast( &sender), *reinterpret_cast< winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const*>( &e)); return 0; } catch (...) { return to_hresult(); } }; template struct delegate< winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventHandler, H> final : implements_delegate< winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventHandler, H> { 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< winrt::Microsoft::UI::Xaml::Navigation::NavigationFailedEventHandler, H> final : implements_delegate< winrt::Microsoft::UI::Xaml::Navigation::NavigationFailedEventHandler, H> { 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< winrt::Microsoft::UI::Xaml::Navigation::NavigationStoppedEventHandler, H> final : implements_delegate< winrt::Microsoft::UI::Xaml::Navigation::NavigationStoppedEventHandler, H> { 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< winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const*>( &e)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptions> { int32_t __stdcall get_IsNavigationStackEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsNavigationStackEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsNavigationStackEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsNavigationStackEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TransitionInfoOverride(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo>( this->shim().TransitionInfoOverride()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TransitionInfoOverride(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TransitionInfoOverride( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptionsFactory> : produce_base { int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try { if (innerInterface) *innerInterface = nullptr; winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface; clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::UI::Xaml::Navigation::FrameNavigationOptions>( this->shim().CreateInstance( *reinterpret_cast( &baseInterface), winrt_impl_innerInterface)); if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::UI::Xaml::Navigation::INavigatingCancelEventArgs> : produce_base< D, winrt::Microsoft::UI::Xaml::Navigation::INavigatingCancelEventArgs> { int32_t __stdcall get_Cancel(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Cancel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Cancel(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Cancel(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NavigationMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().NavigationMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourcePageType( struct struct_Windows_UI_Xaml_Interop_TypeName* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().SourcePageType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Parameter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Parameter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NavigationTransitionInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo>( this->shim().NavigationTransitionInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Xaml::Navigation::INavigationEventArgs> { int32_t __stdcall get_Content(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Content()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Parameter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Parameter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NavigationTransitionInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo>( this->shim().NavigationTransitionInfo()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourcePageType( struct struct_Windows_UI_Xaml_Interop_TypeName* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().SourcePageType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NavigationMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().NavigationMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Uri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Uri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Uri( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::UI::Xaml::Navigation::INavigationFailedEventArgs> : produce_base< D, winrt::Microsoft::UI::Xaml::Navigation::INavigationFailedEventArgs> { int32_t __stdcall get_Exception(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Exception()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SourcePageType( struct struct_Windows_UI_Xaml_Interop_TypeName* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().SourcePageType()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SourcePageType( struct struct_Windows_UI_Xaml_Interop_TypeName* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().SourcePageType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Parameter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Parameter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NavigationTransitionInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo>( this->shim().NavigationTransitionInfo()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntryFactory> { int32_t __stdcall CreateInstance( struct struct_Windows_UI_Xaml_Interop_TypeName sourcePageType, void* parameter, void* navigationTransitionInfo, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance( *reinterpret_cast( &sourcePageType), *reinterpret_cast( ¶meter), *reinterpret_cast( &navigationTransitionInfo))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Xaml::Navigation::IPageStackEntryStatics> { int32_t __stdcall get_SourcePageTypeProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().SourcePageTypeProperty()); return 0; } catch (...) { return to_hresult(); } }; #endif } // namespace winrt::impl WINRT_EXPORT namespace winrt::Microsoft::UI::Xaml::Navigation { inline FrameNavigationOptions::FrameNavigationOptions() { winrt::Windows::Foundation::IInspectable baseInterface, innerInterface; *this = impl::call_factory( [&](IFrameNavigationOptionsFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); }); } inline PageStackEntry::PageStackEntry( winrt::Windows::UI::Xaml::Interop::TypeName const& sourcePageType, winrt::Windows::Foundation::IInspectable const& parameter, winrt::Microsoft::UI::Xaml::Media::Animation:: NavigationTransitionInfo const& navigationTransitionInfo) : PageStackEntry( impl::call_factory( [&](IPageStackEntryFactory const& f) { return f.CreateInstance(sourcePageType, parameter, navigationTransitionInfo); })) {} inline auto PageStackEntry::SourcePageTypeProperty() { return impl::call_factory_cast< winrt::Microsoft::UI::Xaml::DependencyProperty (*)( IPageStackEntryStatics const&), PageStackEntry, IPageStackEntryStatics>( [](IPageStackEntryStatics const& f) { return f.SourcePageTypeProperty(); }); } 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::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e) const { check_hresult((*(impl::abi_t**)this) ->Invoke(*(void**)(&sender), *(void**)(&e))); } template NavigatingCancelEventHandler::NavigatingCancelEventHandler(L handler) : NavigatingCancelEventHandler( impl::make_delegate( std::forward(handler))) {} template NavigatingCancelEventHandler::NavigatingCancelEventHandler(F * handler) : NavigatingCancelEventHandler( [=](auto&&... args) { return handler(args...); }) {} template NavigatingCancelEventHandler::NavigatingCancelEventHandler(O * object, M method) : NavigatingCancelEventHandler( [=](auto&&... args) { return ((*object).*(method))(args...); }) {} template NavigatingCancelEventHandler::NavigatingCancelEventHandler( com_ptr && object, M method) : NavigatingCancelEventHandler( [o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) {} template NavigatingCancelEventHandler::NavigatingCancelEventHandler( weak_ref && object, LM && lambda_or_method) : NavigatingCancelEventHandler( [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 NavigatingCancelEventHandler::NavigatingCancelEventHandler( std::shared_ptr && object, M method) : NavigatingCancelEventHandler( [o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) {} template NavigatingCancelEventHandler::NavigatingCancelEventHandler( std::weak_ptr && object, LM && lambda_or_method) : NavigatingCancelEventHandler( [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 NavigatingCancelEventHandler::operator()( winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Navigation::NavigatingCancelEventArgs const& e) const { check_hresult((*(impl::abi_t**)this) ->Invoke(*(void**)(&sender), *(void**)(&e))); } template NavigationFailedEventHandler::NavigationFailedEventHandler(L handler) : NavigationFailedEventHandler( impl::make_delegate( std::forward(handler))) {} template NavigationFailedEventHandler::NavigationFailedEventHandler(F * handler) : NavigationFailedEventHandler( [=](auto&&... args) { return handler(args...); }) {} template NavigationFailedEventHandler::NavigationFailedEventHandler(O * object, M method) : NavigationFailedEventHandler( [=](auto&&... args) { return ((*object).*(method))(args...); }) {} template NavigationFailedEventHandler::NavigationFailedEventHandler( com_ptr && object, M method) : NavigationFailedEventHandler( [o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) {} template NavigationFailedEventHandler::NavigationFailedEventHandler( weak_ref && object, LM && lambda_or_method) : NavigationFailedEventHandler( [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 NavigationFailedEventHandler::NavigationFailedEventHandler( std::shared_ptr && object, M method) : NavigationFailedEventHandler( [o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) {} template NavigationFailedEventHandler::NavigationFailedEventHandler( std::weak_ptr && object, LM && lambda_or_method) : NavigationFailedEventHandler( [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 NavigationFailedEventHandler::operator()( winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Navigation::NavigationFailedEventArgs const& e) const { check_hresult((*(impl::abi_t**)this) ->Invoke(*(void**)(&sender), *(void**)(&e))); } template NavigationStoppedEventHandler::NavigationStoppedEventHandler(L handler) : NavigationStoppedEventHandler( impl::make_delegate( std::forward(handler))) {} template NavigationStoppedEventHandler::NavigationStoppedEventHandler(F * handler) : NavigationStoppedEventHandler( [=](auto&&... args) { return handler(args...); }) {} template NavigationStoppedEventHandler::NavigationStoppedEventHandler(O * object, M method) : NavigationStoppedEventHandler( [=](auto&&... args) { return ((*object).*(method))(args...); }) {} template NavigationStoppedEventHandler::NavigationStoppedEventHandler( com_ptr && object, M method) : NavigationStoppedEventHandler( [o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) {} template NavigationStoppedEventHandler::NavigationStoppedEventHandler( weak_ref && object, LM && lambda_or_method) : NavigationStoppedEventHandler( [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 NavigationStoppedEventHandler::NavigationStoppedEventHandler( std::shared_ptr && object, M method) : NavigationStoppedEventHandler( [o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) {} template NavigationStoppedEventHandler::NavigationStoppedEventHandler( std::weak_ptr && object, LM && lambda_or_method) : NavigationStoppedEventHandler( [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 NavigationStoppedEventHandler::operator()( winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e) const { check_hresult((*(impl::abi_t**)this) ->Invoke(*(void**)(&sender), *(void**)(&e))); } template struct FrameNavigationOptionsT : implements, impl::require< D, winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptions>, impl::base { using composable = FrameNavigationOptions; protected: FrameNavigationOptionsT() { impl::call_factory( [&](IFrameNavigationOptionsFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); }); } }; } namespace std { #ifndef WINRT_LEAN_AND_MEAN template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::UI::Xaml::Navigation::IFrameNavigationOptionsFactory> : 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 } // namespace std #endif