// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Microsoft_UI_Windowing_H #define WINRT_Microsoft_UI_Windowing_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.h" #include "winrt/impl/Microsoft.UI.2.h" #include "winrt/impl/Microsoft.UI.Dispatching.2.h" #include "winrt/impl/Microsoft.UI.Windowing.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Graphics.2.h" #include "winrt/impl/Windows.UI.2.h" namespace winrt::impl { template auto consume_Microsoft_UI_Windowing_IAppWindow::Id() const { winrt::Microsoft::UI::WindowId value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Id(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindow::IsShownInSwitchers() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsShownInSwitchers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsShownInSwitchers(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindow::IsShownInSwitchers( bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsShownInSwitchers(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsShownInSwitchers(value)); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::IsVisible() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsVisible(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsVisible(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindow::OwnerWindowId() const { winrt::Microsoft::UI::WindowId value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_OwnerWindowId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OwnerWindowId(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Position() const { winrt::Windows::Graphics::PointInt32 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Presenter() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Presenter(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Presenter(&value)); } return winrt::Microsoft::UI::Windowing::AppWindowPresenter{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Size() const { winrt::Windows::Graphics::SizeInt32 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Size(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Size(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Title() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Title(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Title(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Title( param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Title(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::TitleBar() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TitleBar(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TitleBar(&value)); } return winrt::Microsoft::UI::Windowing::AppWindowTitleBar{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Destroy() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Destroy()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Destroy()); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::Hide() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Hide()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Hide()); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::Move( winrt::Windows::Graphics::PointInt32 const& position) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Move(impl::bind_in(position))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Move(impl::bind_in(position))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::MoveAndResize( winrt::Windows::Graphics::RectInt32 const& rect) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MoveAndResize(impl::bind_in(rect))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MoveAndResize(impl::bind_in(rect))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::MoveAndResize( winrt::Windows::Graphics::RectInt32 const& rect, winrt::Microsoft::UI::Windowing::DisplayArea const& displayarea) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MoveAndResizeRelativeToDisplayArea( impl::bind_in(rect), *(void**)(&displayarea))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MoveAndResizeRelativeToDisplayArea( impl::bind_in(rect), *(void**)(&displayarea))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::Resize( winrt::Windows::Graphics::SizeInt32 const& size) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Resize(impl::bind_in(size))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Resize(impl::bind_in(size))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::SetIcon( param::hstring const& iconPath) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetIcon(*(void**)(&iconPath))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetIcon(*(void**)(&iconPath))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::SetIcon( winrt::Microsoft::UI::IconId const& iconId) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetIconWithIconId(impl::bind_in(iconId))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetIconWithIconId(impl::bind_in(iconId))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::SetPresenter( winrt::Microsoft::UI::Windowing::AppWindowPresenter const& appWindowPresenter) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->SetPresenter(*(void**)(&appWindowPresenter))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->SetPresenter(*(void**)(&appWindowPresenter))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::SetPresenter( winrt::Microsoft::UI::Windowing::AppWindowPresenterKind const& appWindowPresenterKind) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPresenterByKind( static_cast(appWindowPresenterKind))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPresenterByKind( static_cast(appWindowPresenterKind))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::Show() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Show()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Show()); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::Show( bool activateWindow) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShowWithActivation(activateWindow)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShowWithActivation(activateWindow)); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::Changed( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::AppWindow, winrt::Microsoft::UI::Windowing::AppWindowChangedEventArgs> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->add_Changed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->add_Changed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Changed( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::AppWindow, winrt::Microsoft::UI::Windowing::AppWindowChangedEventArgs> const& handler) const { return impl::make_event_revoker(this, Changed(handler)); } template auto consume_Microsoft_UI_Windowing_IAppWindow::Changed( winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Changed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Changed(impl::bind_in(token)); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::Closing( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::AppWindow, winrt::Microsoft::UI::Windowing::AppWindowClosingEventArgs> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->add_Closing(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Closing( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::AppWindow, winrt::Microsoft::UI::Windowing::AppWindowClosingEventArgs> const& handler) const { return impl::make_event_revoker(this, Closing(handler)); } template auto consume_Microsoft_UI_Windowing_IAppWindow::Closing( winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Closing(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Closing(impl::bind_in(token)); } } template auto consume_Microsoft_UI_Windowing_IAppWindow::Destroying( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::AppWindow, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->add_Destroying(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->add_Destroying(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_UI_Windowing_IAppWindow::Destroying( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::AppWindow, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker(this, Destroying(handler)); } template auto consume_Microsoft_UI_Windowing_IAppWindow::Destroying( winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Destroying(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Destroying(impl::bind_in(token)); } } template auto consume_Microsoft_UI_Windowing_IAppWindow2::ClientSize() const { winrt::Windows::Graphics::SizeInt32 value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ClientSize(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ClientSize(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindow2::MoveInZOrderAtBottom() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MoveInZOrderAtBottom()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MoveInZOrderAtBottom()); } } template auto consume_Microsoft_UI_Windowing_IAppWindow2::MoveInZOrderAtTop() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MoveInZOrderAtTop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MoveInZOrderAtTop()); } } template auto consume_Microsoft_UI_Windowing_IAppWindow2::MoveInZOrderBelow( winrt::Microsoft::UI::WindowId const& windowId) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MoveInZOrderBelow(impl::bind_in(windowId))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MoveInZOrderBelow(impl::bind_in(windowId))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow2::ResizeClient( winrt::Windows::Graphics::SizeInt32 const& size) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ResizeClient(impl::bind_in(size))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ResizeClient(impl::bind_in(size))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow2< D>::ShowOnceWithRequestedStartupState() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ShowOnceWithRequestedStartupState()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShowOnceWithRequestedStartupState()); } } template auto consume_Microsoft_UI_Windowing_IAppWindow3:: AssociateWithDispatcherQueue( winrt::Microsoft::UI::Dispatching::DispatcherQueue const& dispatcherQueue) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->AssociateWithDispatcherQueue( *(void**)(&dispatcherQueue))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AssociateWithDispatcherQueue( *(void**)(&dispatcherQueue))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow3::DispatcherQueue() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } return winrt::Microsoft::UI::Dispatching::DispatcherQueue{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindow4::SetTaskbarIcon( param::hstring const& iconPath) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetTaskbarIcon(*(void**)(&iconPath))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetTaskbarIcon(*(void**)(&iconPath))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow4::SetTaskbarIcon( winrt::Microsoft::UI::IconId const& iconId) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->SetTaskbarIconWithIconId(impl::bind_in(iconId))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->SetTaskbarIconWithIconId(impl::bind_in(iconId))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow4::SetTitleBarIcon( param::hstring const& iconPath) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetTitleBarIcon(*(void**)(&iconPath))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetTitleBarIcon(*(void**)(&iconPath))); } } template auto consume_Microsoft_UI_Windowing_IAppWindow4::SetTitleBarIcon( winrt::Microsoft::UI::IconId const& iconId) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->SetTitleBarIconWithIconId(impl::bind_in(iconId))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->SetTitleBarIconWithIconId(impl::bind_in(iconId))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowChangedEventArgs< D>::DidPositionChange() 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::Windowing::IAppWindowChangedEventArgs, 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_DidPositionChange(&value)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::UI::Windowing::IAppWindowChangedEventArgs>**)this; check_hresult(_winrt_abi_type->get_DidPositionChange(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowChangedEventArgs< D>::DidPresenterChange() 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::Windowing::IAppWindowChangedEventArgs, 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_DidPresenterChange(&value)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::UI::Windowing::IAppWindowChangedEventArgs>**)this; check_hresult(_winrt_abi_type->get_DidPresenterChange(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowChangedEventArgs< D>::DidSizeChange() 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::Windowing::IAppWindowChangedEventArgs, 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_DidSizeChange(&value)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::UI::Windowing::IAppWindowChangedEventArgs>**)this; check_hresult(_winrt_abi_type->get_DidSizeChange(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowChangedEventArgs< D>::DidVisibilityChange() 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::Windowing::IAppWindowChangedEventArgs, 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_DidVisibilityChange(&value)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::UI::Windowing::IAppWindowChangedEventArgs>**)this; check_hresult(_winrt_abi_type->get_DidVisibilityChange(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowChangedEventArgs2< D>::DidZOrderChange() 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::Windowing::IAppWindowChangedEventArgs2, 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_DidZOrderChange(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DidZOrderChange(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowChangedEventArgs2< D>::IsZOrderAtBottom() 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::Windowing::IAppWindowChangedEventArgs2, 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_IsZOrderAtBottom(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsZOrderAtBottom(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowChangedEventArgs2< D>::IsZOrderAtTop() 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::Windowing::IAppWindowChangedEventArgs2, 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_IsZOrderAtTop(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsZOrderAtTop(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowChangedEventArgs2< D>::ZOrderBelowWindowId() const { winrt::Microsoft::UI::WindowId 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::Windowing::IAppWindowChangedEventArgs2, 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_ZOrderBelowWindowId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ZOrderBelowWindowId(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowClosingEventArgs::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::Windowing::IAppWindowClosingEventArgs, 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< winrt::Microsoft::UI::Windowing::IAppWindowClosingEventArgs>**)this; check_hresult(_winrt_abi_type->get_Cancel(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowClosingEventArgs::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::Windowing::IAppWindowClosingEventArgs, 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< winrt::Microsoft::UI::Windowing::IAppWindowClosingEventArgs>**)this; check_hresult(_winrt_abi_type->put_Cancel(value)); } } template auto consume_Microsoft_UI_Windowing_IAppWindowPresenter::Kind() const { winrt::Microsoft::UI::Windowing::AppWindowPresenterKind value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowPresenter, 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_Kind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_Kind(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowStatics::Create() const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowStatics, 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->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Microsoft::UI::Windowing::AppWindow{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowStatics::Create( winrt::Microsoft::UI::Windowing::AppWindowPresenter const& appWindowPresenter) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowStatics, 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->CreateWithPresenter( *(void**)(&appWindowPresenter), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithPresenter( *(void**)(&appWindowPresenter), &result)); } return winrt::Microsoft::UI::Windowing::AppWindow{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowStatics::Create( winrt::Microsoft::UI::Windowing::AppWindowPresenter const& appWindowPresenter, winrt::Microsoft::UI::WindowId const& ownerWindowId) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowStatics, 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->CreateWithPresenterAndOwner( *(void**)(&appWindowPresenter), impl::bind_in(ownerWindowId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithPresenterAndOwner( *(void**)(&appWindowPresenter), impl::bind_in(ownerWindowId), &result)); } return winrt::Microsoft::UI::Windowing::AppWindow{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowStatics::GetFromWindowId( winrt::Microsoft::UI::WindowId const& windowId) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowStatics, 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->GetFromWindowId(impl::bind_in(windowId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->GetFromWindowId(impl::bind_in(windowId), &result)); } return winrt::Microsoft::UI::Windowing::AppWindow{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowStatics2::Create( winrt::Microsoft::UI::Windowing::AppWindowPresenter const& appWindowPresenter, winrt::Microsoft::UI::WindowId const& ownerWindowId, winrt::Microsoft::UI::Dispatching::DispatcherQueue const& DispatcherQueue) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowStatics2>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowStatics2, 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->CreateWithDispatcherQueue( *(void**)(&appWindowPresenter), impl::bind_in(ownerWindowId), *(void**)(&DispatcherQueue), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithDispatcherQueue( *(void**)(&appWindowPresenter), impl::bind_in(ownerWindowId), *(void**)(&DispatcherQueue), &result)); } return winrt::Microsoft::UI::Windowing::AppWindow{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::BackgroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_BackgroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BackgroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::BackgroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_BackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_BackgroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ButtonBackgroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonBackgroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonBackgroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: ButtonBackgroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ButtonBackgroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ButtonForegroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonForegroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonForegroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: ButtonForegroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ButtonForegroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ButtonHoverBackgroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonHoverBackgroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonHoverBackgroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: ButtonHoverBackgroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonHoverBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ButtonHoverBackgroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ButtonHoverForegroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonHoverForegroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonHoverForegroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: ButtonHoverForegroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonHoverForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ButtonHoverForegroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ButtonInactiveBackgroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonInactiveBackgroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonInactiveBackgroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: ButtonInactiveBackgroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonInactiveBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ButtonInactiveBackgroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ButtonInactiveForegroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonInactiveForegroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonInactiveForegroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: ButtonInactiveForegroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonInactiveForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ButtonInactiveForegroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ButtonPressedBackgroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonPressedBackgroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonPressedBackgroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: ButtonPressedBackgroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonPressedBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ButtonPressedBackgroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ButtonPressedForegroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonPressedForegroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonPressedForegroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: ButtonPressedForegroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ButtonPressedForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_ButtonPressedForegroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ExtendsContentIntoTitleBar() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ExtendsContentIntoTitleBar(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendsContentIntoTitleBar(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::ExtendsContentIntoTitleBar(bool value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ExtendsContentIntoTitleBar(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ExtendsContentIntoTitleBar(value)); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::ForegroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ForegroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ForegroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::ForegroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_ForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ForegroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::Height() const { int32_t value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_Height(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Height(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::IconShowOptions() const { winrt::Microsoft::UI::Windowing::IconShowOptions value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_IconShowOptions( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IconShowOptions( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::IconShowOptions( winrt::Microsoft::UI::Windowing::IconShowOptions const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_IconShowOptions(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_IconShowOptions(static_cast(value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::InactiveBackgroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_InactiveBackgroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InactiveBackgroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: InactiveBackgroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_InactiveBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_InactiveBackgroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar< D>::InactiveForegroundColor() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_InactiveForegroundColor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InactiveForegroundColor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar:: InactiveForegroundColor( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_InactiveForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_InactiveForegroundColor(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::LeftInset() const { int32_t value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_LeftInset(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LeftInset(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::RightInset() const { int32_t value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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_RightInset(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RightInset(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::ResetToDefault() const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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->ResetToDefault()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ResetToDefault()); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar::SetDragRectangles( array_view value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar, 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->SetDragRectangles(value.size(), get_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->SetDragRectangles(value.size(), get_abi(value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar2< D>::PreferredHeightOption() const { winrt::Microsoft::UI::Windowing::TitleBarHeightOption value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar2>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar2, 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_PreferredHeightOption( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredHeightOption( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar2:: PreferredHeightOption( winrt::Microsoft::UI::Windowing::TitleBarHeightOption const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar2>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar2, 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_PreferredHeightOption( static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PreferredHeightOption( static_cast(value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar3::PreferredTheme() const { winrt::Microsoft::UI::Windowing::TitleBarTheme value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar3, 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_PreferredTheme( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredTheme( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBar3::PreferredTheme( winrt::Microsoft::UI::Windowing::TitleBarTheme const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IAppWindowTitleBar3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IAppWindowTitleBar3, 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_PreferredTheme(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_PreferredTheme(static_cast(value))); } } template auto consume_Microsoft_UI_Windowing_IAppWindowTitleBarStatics< D>::IsCustomizationSupported() const { bool result{}; 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::Windowing::IAppWindowTitleBarStatics, 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->IsCustomizationSupported(&result)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::UI::Windowing::IAppWindowTitleBarStatics>**)this; check_hresult(_winrt_abi_type->IsCustomizationSupported(&result)); } return result; } template auto consume_Microsoft_UI_Windowing_ICompactOverlayPresenter::InitialSize() const { winrt::Microsoft::UI::Windowing::CompactOverlaySize 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::Windowing::ICompactOverlayPresenter, 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_InitialSize(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult( _winrt_abi_type->get_InitialSize(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Windowing_ICompactOverlayPresenter::InitialSize( winrt::Microsoft::UI::Windowing::CompactOverlaySize 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::Windowing::ICompactOverlayPresenter, 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_InitialSize(static_cast(value))); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult( _winrt_abi_type->put_InitialSize(static_cast(value))); } } template auto consume_Microsoft_UI_Windowing_ICompactOverlayPresenterStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::ICompactOverlayPresenterStatics, 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->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Microsoft::UI::Windowing::CompactOverlayPresenter{ result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IDisplayArea::DisplayId() const { winrt::Microsoft::UI::DisplayId value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayArea>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DisplayId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayId(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IDisplayArea::IsPrimary() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayArea>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsPrimary(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPrimary(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IDisplayArea::OuterBounds() const { winrt::Windows::Graphics::RectInt32 value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayArea>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_OuterBounds(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OuterBounds(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IDisplayArea::WorkArea() const { winrt::Windows::Graphics::RectInt32 value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayArea>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_WorkArea(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WorkArea(put_abi(value))); } return value; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaStatics::Primary() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaStatics, 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_Primary(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Primary(&value)); } return winrt::Microsoft::UI::Windowing::DisplayArea{value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaStatics::CreateWatcher() const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaStatics, 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->CreateWatcher(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWatcher(&result)); } return winrt::Microsoft::UI::Windowing::DisplayAreaWatcher{ result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaStatics::FindAll() const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaStatics, 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->FindAll(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAll(&result)); } return winrt::Windows::Foundation::Collections::IVectorView< winrt::Microsoft::UI::Windowing::DisplayArea>{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaStatics::GetFromWindowId( winrt::Microsoft::UI::WindowId const& windowId, winrt::Microsoft::UI::Windowing::DisplayAreaFallback const& displayAreaFallback) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaStatics, 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->GetFromWindowId( impl::bind_in(windowId), static_cast(displayAreaFallback), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetFromWindowId( impl::bind_in(windowId), static_cast(displayAreaFallback), &result)); } return winrt::Microsoft::UI::Windowing::DisplayArea{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaStatics::GetFromPoint( winrt::Windows::Graphics::PointInt32 const& point, winrt::Microsoft::UI::Windowing::DisplayAreaFallback const& displayAreaFallback) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaStatics, 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->GetFromPoint( impl::bind_in(point), static_cast(displayAreaFallback), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetFromPoint( impl::bind_in(point), static_cast(displayAreaFallback), &result)); } return winrt::Microsoft::UI::Windowing::DisplayArea{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaStatics::GetFromRect( winrt::Windows::Graphics::RectInt32 const& rect, winrt::Microsoft::UI::Windowing::DisplayAreaFallback const& displayAreaFallback) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaStatics>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaStatics, 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->GetFromRect( impl::bind_in(rect), static_cast(displayAreaFallback), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetFromRect( impl::bind_in(rect), static_cast(displayAreaFallback), &result)); } return winrt::Microsoft::UI::Windowing::DisplayArea{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaStatics2::GetFromDisplayId( winrt::Microsoft::UI::DisplayId const& displayId) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaStatics2>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaStatics2, 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->GetFromDisplayId(impl::bind_in(displayId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->GetFromDisplayId(impl::bind_in(displayId), &result)); } return winrt::Microsoft::UI::Windowing::DisplayArea{result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Status() const { winrt::Microsoft::UI::Windowing::DisplayAreaWatcherStatus value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Start() const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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->Start()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Start()); } } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Stop() const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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->Stop()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Stop()); } } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Added( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Microsoft::UI::Windowing::DisplayArea> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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->add_Added(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->add_Added(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Added( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Microsoft::UI::Windowing::DisplayArea> const& handler) const { return impl::make_event_revoker(this, Added(handler)); } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Added( winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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; _winrt_abi_type->remove_Added(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Added(impl::bind_in(token)); } } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher:: EnumerationCompleted( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_EnumerationCompleted(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher:: EnumerationCompleted( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker( this, EnumerationCompleted(handler)); } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher< D>::EnumerationCompleted(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_EnumerationCompleted(impl::bind_in(token)); } } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Removed( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Microsoft::UI::Windowing::DisplayArea> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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->add_Removed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->add_Removed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Removed( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Microsoft::UI::Windowing::DisplayArea> const& handler) const { return impl::make_event_revoker(this, Removed(handler)); } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Removed( winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Removed(impl::bind_in(token)); } } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Stopped( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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->add_Stopped(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->add_Stopped(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Stopped( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker(this, Stopped(handler)); } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Stopped( winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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; _winrt_abi_type->remove_Stopped(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Stopped(impl::bind_in(token)); } } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Updated( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Microsoft::UI::Windowing::DisplayArea> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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->add_Updated(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->add_Updated(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Updated( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher, winrt::Microsoft::UI::Windowing::DisplayArea> const& handler) const { return impl::make_event_revoker(this, Updated(handler)); } template auto consume_Microsoft_UI_Windowing_IDisplayAreaWatcher::Updated( winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IDisplayAreaWatcher, 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; _winrt_abi_type->remove_Updated(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Updated(impl::bind_in(token)); } } template auto consume_Microsoft_UI_Windowing_IFullScreenPresenterStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IFullScreenPresenterStatics, 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->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Microsoft::UI::Windowing::FullScreenPresenter{ result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::HasBorder() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_HasBorder(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasBorder(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::HasTitleBar() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_HasTitleBar(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasTitleBar(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsAlwaysOnTop() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsAlwaysOnTop(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsAlwaysOnTop(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsAlwaysOnTop( bool value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsAlwaysOnTop(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsAlwaysOnTop(value)); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsMaximizable() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsMaximizable(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsMaximizable(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsMaximizable( bool value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsMaximizable(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsMaximizable(value)); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsMinimizable() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsMinimizable(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsMinimizable(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsMinimizable( bool value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsMinimizable(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsMinimizable(value)); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsModal() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsModal(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsModal(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsModal( bool value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsModal(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsModal(value)); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsResizable() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsResizable(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsResizable(&value)); } return value; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::IsResizable( bool value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_IsResizable(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsResizable(value)); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::State() const { winrt::Microsoft::UI::Windowing::OverlappedPresenterState value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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_State(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_State(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::Maximize() const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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->Maximize()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Maximize()); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::Minimize() const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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->Minimize()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Minimize()); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter::Restore() const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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->Restore()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Restore()); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter< D>::SetBorderAndTitleBar(bool hasBorder, bool hasTitleBar) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter, 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->SetBorderAndTitleBar(hasBorder, hasTitleBar)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->SetBorderAndTitleBar(hasBorder, hasTitleBar)); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter2::Minimize( bool activateWindow) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter2>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter2, 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->MinimizeWithActivation(activateWindow)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MinimizeWithActivation(activateWindow)); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter2::Restore( bool activateWindow) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter2>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter2, 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->RestoreWithActivation(activateWindow)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RestoreWithActivation(activateWindow)); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter3< D>::PreferredMinimumHeight() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter3, 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_PreferredMinimumHeight(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredMinimumHeight(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter3:: PreferredMinimumHeight( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter3, 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_PreferredMinimumHeight(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_PreferredMinimumHeight(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter3< D>::PreferredMinimumWidth() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter3, 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_PreferredMinimumWidth(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredMinimumWidth(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter3:: PreferredMinimumWidth( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter3, 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_PreferredMinimumWidth(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_PreferredMinimumWidth(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter3< D>::PreferredMaximumWidth() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter3, 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_PreferredMaximumWidth(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredMaximumWidth(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter3:: PreferredMaximumWidth( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter3, 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_PreferredMaximumWidth(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_PreferredMaximumWidth(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter3< D>::PreferredMaximumHeight() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter3, 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_PreferredMaximumHeight(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreferredMaximumHeight(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenter3:: PreferredMaximumHeight( winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenter3>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenter3, 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_PreferredMaximumHeight(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_PreferredMaximumHeight(*(void**)(&value))); } } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenterStatics::Create() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenterStatics, 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->Create(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(&result)); } return winrt::Microsoft::UI::Windowing::OverlappedPresenter{ result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenterStatics< D>::CreateForContextMenu() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenterStatics, 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->CreateForContextMenu(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateForContextMenu(&result)); } return winrt::Microsoft::UI::Windowing::OverlappedPresenter{ result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenterStatics< D>::CreateForDialog() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenterStatics, 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->CreateForDialog(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateForDialog(&result)); } return winrt::Microsoft::UI::Windowing::OverlappedPresenter{ result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenterStatics< D>::CreateForToolWindow() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::UI::Windowing::IOverlappedPresenterStatics, 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->CreateForToolWindow(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateForToolWindow(&result)); } return winrt::Microsoft::UI::Windowing::OverlappedPresenter{ result, take_ownership_from_abi}; } template auto consume_Microsoft_UI_Windowing_IOverlappedPresenterStatics2< D>::RequestedStartupState() const { winrt::Microsoft::UI::Windowing::OverlappedPresenterState 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::Windowing::IOverlappedPresenterStatics2, 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_RequestedStartupState( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RequestedStartupState( reinterpret_cast(&value))); } return value; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id( struct struct_Microsoft_UI_WindowId* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsShownInSwitchers(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsShownInSwitchers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsShownInSwitchers(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsShownInSwitchers(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsVisible(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsVisible()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OwnerWindowId( struct struct_Microsoft_UI_WindowId* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().OwnerWindowId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Position( struct struct_Windows_Graphics_PointInt32* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Position()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Presenter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Presenter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Size( struct struct_Windows_Graphics_SizeInt32* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Size()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Title(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Title()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Title(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Title(*reinterpret_cast(&value)); 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 Destroy() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Destroy(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Hide() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Hide(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Move( struct struct_Windows_Graphics_PointInt32 position) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Move( *reinterpret_cast( &position)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall MoveAndResize( struct struct_Windows_Graphics_RectInt32 rect) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MoveAndResize( *reinterpret_cast(&rect)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall MoveAndResizeRelativeToDisplayArea( struct struct_Windows_Graphics_RectInt32 rect, void* displayarea) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MoveAndResize( *reinterpret_cast(&rect), *reinterpret_cast( &displayarea)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Resize( struct struct_Windows_Graphics_SizeInt32 size) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Resize( *reinterpret_cast(&size)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetIcon(void* iconPath) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetIcon(*reinterpret_cast(&iconPath)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetIconWithIconId( struct struct_Microsoft_UI_IconId iconId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetIcon( *reinterpret_cast(&iconId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPresenter(void* appWindowPresenter) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPresenter( *reinterpret_cast< winrt::Microsoft::UI::Windowing::AppWindowPresenter const*>( &appWindowPresenter)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPresenterByKind( int32_t appWindowPresenterKind) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPresenter( *reinterpret_cast< winrt::Microsoft::UI::Windowing::AppWindowPresenterKind const*>( &appWindowPresenterKind)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Show() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowWithActivation(bool activateWindow) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show(activateWindow); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Changed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Changed( *reinterpret_cast const*>( &handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Changed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Changed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Closing(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Closing( *reinterpret_cast const*>( &handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Closing(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Closing(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Destroying(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Destroying( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Destroying(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Destroying( *reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ClientSize( struct struct_Windows_Graphics_SizeInt32* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().ClientSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall MoveInZOrderAtBottom() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MoveInZOrderAtBottom(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall MoveInZOrderAtTop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MoveInZOrderAtTop(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall MoveInZOrderBelow( struct struct_Microsoft_UI_WindowId windowId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MoveInZOrderBelow( *reinterpret_cast(&windowId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ResizeClient( struct struct_Windows_Graphics_SizeInt32 size) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ResizeClient( *reinterpret_cast(&size)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowOnceWithRequestedStartupState() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowOnceWithRequestedStartupState(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AssociateWithDispatcherQueue( void* dispatcherQueue) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AssociateWithDispatcherQueue( *reinterpret_cast< winrt::Microsoft::UI::Dispatching::DispatcherQueue const*>( &dispatcherQueue)); return 0; } catch (...) { return to_hresult(); } 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 SetTaskbarIcon(void* iconPath) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetTaskbarIcon(*reinterpret_cast(&iconPath)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetTaskbarIconWithIconId( struct struct_Microsoft_UI_IconId iconId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetTaskbarIcon( *reinterpret_cast(&iconId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetTitleBarIcon(void* iconPath) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetTitleBarIcon(*reinterpret_cast(&iconPath)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetTitleBarIconWithIconId( struct struct_Microsoft_UI_IconId iconId) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetTitleBarIcon( *reinterpret_cast(&iconId)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Windowing::IAppWindowChangedEventArgs> { int32_t __stdcall get_DidPositionChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidPositionChange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DidPresenterChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidPresenterChange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DidSizeChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidSizeChange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DidVisibilityChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidVisibilityChange()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Windowing::IAppWindowChangedEventArgs2> { int32_t __stdcall get_DidZOrderChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidZOrderChange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsZOrderAtBottom(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsZOrderAtBottom()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsZOrderAtTop(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsZOrderAtTop()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ZOrderBelowWindowId( struct struct_Microsoft_UI_WindowId* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().ZOrderBelowWindowId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Windowing::IAppWindowClosingEventArgs> { 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Kind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Kind()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Windowing::IAppWindowPresenterFactory> {}; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithPresenter(void* appWindowPresenter, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().Create( *reinterpret_cast< winrt::Microsoft::UI::Windowing::AppWindowPresenter const*>( &appWindowPresenter))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithPresenterAndOwner( void* appWindowPresenter, struct struct_Microsoft_UI_WindowId ownerWindowId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().Create( *reinterpret_cast< winrt::Microsoft::UI::Windowing::AppWindowPresenter const*>( &appWindowPresenter), *reinterpret_cast( &ownerWindowId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFromWindowId( struct struct_Microsoft_UI_WindowId windowId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetFromWindowId( *reinterpret_cast( &windowId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithDispatcherQueue( void* appWindowPresenter, struct struct_Microsoft_UI_WindowId ownerWindowId, void* DispatcherQueue, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().Create( *reinterpret_cast< winrt::Microsoft::UI::Windowing::AppWindowPresenter const*>( &appWindowPresenter), *reinterpret_cast( &ownerWindowId), *reinterpret_cast< winrt::Microsoft::UI::Dispatching::DispatcherQueue const*>( &DispatcherQueue))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BackgroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().BackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_BackgroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().BackgroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonBackgroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ButtonBackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ButtonBackgroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ButtonBackgroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonForegroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ButtonForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ButtonForegroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ButtonForegroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonHoverBackgroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ButtonHoverBackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ButtonHoverBackgroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ButtonHoverBackgroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonHoverForegroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ButtonHoverForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ButtonHoverForegroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ButtonHoverForegroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonInactiveBackgroundColor( void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ButtonInactiveBackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ButtonInactiveBackgroundColor( void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ButtonInactiveBackgroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonInactiveForegroundColor( void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ButtonInactiveForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ButtonInactiveForegroundColor( void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ButtonInactiveForegroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonPressedBackgroundColor( void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ButtonPressedBackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ButtonPressedBackgroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ButtonPressedBackgroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonPressedForegroundColor( void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ButtonPressedForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ButtonPressedForegroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ButtonPressedForegroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendsContentIntoTitleBar(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendsContentIntoTitleBar()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ExtendsContentIntoTitleBar(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ExtendsContentIntoTitleBar(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ForegroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().ForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ForegroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ForegroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Height(int32_t* 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 get_IconShowOptions(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().IconShowOptions()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IconShowOptions(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IconShowOptions( *reinterpret_cast< winrt::Microsoft::UI::Windowing::IconShowOptions const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InactiveBackgroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().InactiveBackgroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_InactiveBackgroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InactiveBackgroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InactiveForegroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::IReference>( this->shim().InactiveForegroundColor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_InactiveForegroundColor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InactiveForegroundColor( *reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LeftInset(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LeftInset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RightInset(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RightInset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ResetToDefault() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ResetToDefault(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDragRectangles( uint32_t __valueSize, struct struct_Windows_Graphics_RectInt32* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetDragRectangles( array_view( reinterpret_cast(value), reinterpret_cast( value) + __valueSize)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PreferredHeightOption(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().PreferredHeightOption()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredHeightOption(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredHeightOption( *reinterpret_cast< winrt::Microsoft::UI::Windowing::TitleBarHeightOption const*>( &value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PreferredTheme(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().PreferredTheme()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredTheme(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredTheme( *reinterpret_cast< winrt::Microsoft::UI::Windowing::TitleBarTheme const*>(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsCustomizationSupported(bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsCustomizationSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InitialSize(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().InitialSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_InitialSize(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InitialSize( *reinterpret_cast< winrt::Microsoft::UI::Windowing::CompactOverlaySize const*>( &value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Windowing::ICompactOverlayPresenterStatics> { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().Create()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayId( struct struct_Microsoft_UI_DisplayId* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPrimary(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPrimary()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OuterBounds( struct struct_Windows_Graphics_RectInt32* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().OuterBounds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WorkArea( struct struct_Windows_Graphics_RectInt32* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().WorkArea()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Primary(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Primary()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWatcher(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().CreateWatcher()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAll(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().FindAll()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFromWindowId( struct struct_Microsoft_UI_WindowId windowId, int32_t displayAreaFallback, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetFromWindowId( *reinterpret_cast(&windowId), *reinterpret_cast< winrt::Microsoft::UI::Windowing::DisplayAreaFallback const*>( &displayAreaFallback))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFromPoint( struct struct_Windows_Graphics_PointInt32 point, int32_t displayAreaFallback, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetFromPoint( *reinterpret_cast( &point), *reinterpret_cast< winrt::Microsoft::UI::Windowing::DisplayAreaFallback const*>( &displayAreaFallback))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetFromRect(struct struct_Windows_Graphics_RectInt32 rect, int32_t displayAreaFallback, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetFromRect( *reinterpret_cast( &rect), *reinterpret_cast< winrt::Microsoft::UI::Windowing::DisplayAreaFallback const*>( &displayAreaFallback))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetFromDisplayId( struct struct_Microsoft_UI_DisplayId displayId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetFromDisplayId( *reinterpret_cast( &displayId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().Status()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Added(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Added( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Added(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Added(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_EnumerationCompleted( void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().EnumerationCompleted( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_EnumerationCompleted( winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().EnumerationCompleted( *reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Removed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Removed( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Removed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Removed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Stopped(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Stopped( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Stopped(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Stopped(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Updated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Updated( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Updated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Updated(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base {}; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Windowing::IFullScreenPresenterStatics> { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().Create()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_HasBorder(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasBorder()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasTitleBar(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasTitleBar()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsAlwaysOnTop(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsAlwaysOnTop()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsAlwaysOnTop(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsAlwaysOnTop(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsMaximizable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMaximizable()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsMaximizable(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsMaximizable(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsMinimizable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMinimizable()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsMinimizable(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsMinimizable(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsModal(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsModal()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsModal(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsModal(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsResizable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsResizable()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsResizable(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsResizable(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Maximize() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Maximize(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Minimize() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Minimize(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Restore() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Restore(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetBorderAndTitleBar(bool hasBorder, bool hasTitleBar) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetBorderAndTitleBar(hasBorder, hasTitleBar); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall MinimizeWithActivation(bool activateWindow) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Minimize(activateWindow); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RestoreWithActivation(bool activateWindow) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Restore(activateWindow); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PreferredMinimumHeight(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>( this->shim().PreferredMinimumHeight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredMinimumHeight(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredMinimumHeight( *reinterpret_cast< winrt::Windows::Foundation::IReference const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredMinimumWidth(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>( this->shim().PreferredMinimumWidth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredMinimumWidth(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredMinimumWidth( *reinterpret_cast< winrt::Windows::Foundation::IReference const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredMaximumWidth(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>( this->shim().PreferredMaximumWidth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredMaximumWidth(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredMaximumWidth( *reinterpret_cast< winrt::Windows::Foundation::IReference const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredMaximumHeight(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>( this->shim().PreferredMaximumHeight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredMaximumHeight(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredMaximumHeight( *reinterpret_cast< winrt::Windows::Foundation::IReference const*>(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenterStatics> { int32_t __stdcall Create(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().Create()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForContextMenu(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().CreateForContextMenu()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForDialog(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().CreateForDialog()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForToolWindow(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().CreateForToolWindow()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::UI::Windowing::IOverlappedPresenterStatics2> { int32_t __stdcall get_RequestedStartupState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().RequestedStartupState()); return 0; } catch (...) { return to_hresult(); } }; #endif } // namespace winrt::impl WINRT_EXPORT namespace winrt::Microsoft::UI::Windowing { inline auto AppWindow::Create() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::AppWindow (*)( IAppWindowStatics const&), AppWindow, IAppWindowStatics>( [](IAppWindowStatics const& f) { return f.Create(); }); } inline auto AppWindow::Create( winrt::Microsoft::UI::Windowing::AppWindowPresenter const& appWindowPresenter) { return impl::call_factory( [&](IAppWindowStatics const& f) { return f.Create(appWindowPresenter); }); } inline auto AppWindow::Create( winrt::Microsoft::UI::Windowing::AppWindowPresenter const& appWindowPresenter, winrt::Microsoft::UI::WindowId const& ownerWindowId) { return impl::call_factory( [&](IAppWindowStatics const& f) { return f.Create(appWindowPresenter, ownerWindowId); }); } inline auto AppWindow::GetFromWindowId( winrt::Microsoft::UI::WindowId const& windowId) { return impl::call_factory( [&](IAppWindowStatics const& f) { return f.GetFromWindowId(windowId); }); } inline auto AppWindow::Create( winrt::Microsoft::UI::Windowing::AppWindowPresenter const& appWindowPresenter, winrt::Microsoft::UI::WindowId const& ownerWindowId, winrt::Microsoft::UI::Dispatching::DispatcherQueue const& DispatcherQueue) { return impl::call_factory( [&](IAppWindowStatics2 const& f) { return f.Create(appWindowPresenter, ownerWindowId, DispatcherQueue); }); } inline auto AppWindowTitleBar::IsCustomizationSupported() { return impl::call_factory_cast( [](IAppWindowTitleBarStatics const& f) { return f.IsCustomizationSupported(); }); } inline auto CompactOverlayPresenter::Create() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::CompactOverlayPresenter (*)( ICompactOverlayPresenterStatics const&), CompactOverlayPresenter, ICompactOverlayPresenterStatics>( [](ICompactOverlayPresenterStatics const& f) { return f.Create(); }); } inline auto DisplayArea::Primary() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::DisplayArea (*)( IDisplayAreaStatics const&), DisplayArea, IDisplayAreaStatics>( [](IDisplayAreaStatics const& f) { return f.Primary(); }); } inline auto DisplayArea::CreateWatcher() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::DisplayAreaWatcher (*)( IDisplayAreaStatics const&), DisplayArea, IDisplayAreaStatics>( [](IDisplayAreaStatics const& f) { return f.CreateWatcher(); }); } inline auto DisplayArea::FindAll() { return impl::call_factory_cast< winrt::Windows::Foundation::Collections::IVectorView< winrt::Microsoft::UI::Windowing::DisplayArea> (*)( IDisplayAreaStatics const&), DisplayArea, IDisplayAreaStatics>( [](IDisplayAreaStatics const& f) { return f.FindAll(); }); } inline auto DisplayArea::GetFromWindowId( winrt::Microsoft::UI::WindowId const& windowId, winrt::Microsoft::UI::Windowing::DisplayAreaFallback const& displayAreaFallback) { return impl::call_factory( [&](IDisplayAreaStatics const& f) { return f.GetFromWindowId(windowId, displayAreaFallback); }); } inline auto DisplayArea::GetFromPoint( winrt::Windows::Graphics::PointInt32 const& point, winrt::Microsoft::UI::Windowing::DisplayAreaFallback const& displayAreaFallback) { return impl::call_factory( [&](IDisplayAreaStatics const& f) { return f.GetFromPoint(point, displayAreaFallback); }); } inline auto DisplayArea::GetFromRect( winrt::Windows::Graphics::RectInt32 const& rect, winrt::Microsoft::UI::Windowing::DisplayAreaFallback const& displayAreaFallback) { return impl::call_factory( [&](IDisplayAreaStatics const& f) { return f.GetFromRect(rect, displayAreaFallback); }); } inline auto DisplayArea::GetFromDisplayId( winrt::Microsoft::UI::DisplayId const& displayId) { return impl::call_factory( [&](IDisplayAreaStatics2 const& f) { return f.GetFromDisplayId(displayId); }); } inline auto FullScreenPresenter::Create() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::FullScreenPresenter (*)( IFullScreenPresenterStatics const&), FullScreenPresenter, IFullScreenPresenterStatics>( [](IFullScreenPresenterStatics const& f) { return f.Create(); }); } inline auto OverlappedPresenter::Create() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::OverlappedPresenter (*)( IOverlappedPresenterStatics const&), OverlappedPresenter, IOverlappedPresenterStatics>( [](IOverlappedPresenterStatics const& f) { return f.Create(); }); } inline auto OverlappedPresenter::CreateForContextMenu() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::OverlappedPresenter (*)( IOverlappedPresenterStatics const&), OverlappedPresenter, IOverlappedPresenterStatics>( [](IOverlappedPresenterStatics const& f) { return f.CreateForContextMenu(); }); } inline auto OverlappedPresenter::CreateForDialog() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::OverlappedPresenter (*)( IOverlappedPresenterStatics const&), OverlappedPresenter, IOverlappedPresenterStatics>( [](IOverlappedPresenterStatics const& f) { return f.CreateForDialog(); }); } inline auto OverlappedPresenter::CreateForToolWindow() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::OverlappedPresenter (*)( IOverlappedPresenterStatics const&), OverlappedPresenter, IOverlappedPresenterStatics>( [](IOverlappedPresenterStatics const& f) { return f.CreateForToolWindow(); }); } inline auto OverlappedPresenter::RequestedStartupState() { return impl::call_factory_cast< winrt::Microsoft::UI::Windowing::OverlappedPresenterState (*)( IOverlappedPresenterStatics2 const&), OverlappedPresenter, IOverlappedPresenterStatics2>( [](IOverlappedPresenterStatics2 const& f) { return f.RequestedStartupState(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } // namespace std #endif