// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_UI_WindowManagement_H #define WINRT_Windows_UI_WindowManagement_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.UI.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.UI.2.h" #include "winrt/impl/Windows.UI.Composition.2.h" #include "winrt/impl/Windows.UI.WindowManagement.2.h" namespace winrt::impl { template auto consume_Windows_UI_WindowManagement_IAppWindow::Content() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Content(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Content(&value)); } return winrt::Windows::UI::UIContentRoot{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::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::Windows::System::DispatcherQueue{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::Frame() 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_Frame(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Frame(&value)); } return winrt::Windows::UI::WindowManagement::AppWindowFrame{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_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_Windows_UI_WindowManagement_IAppWindow::PersistedStateId() 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_PersistedStateId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PersistedStateId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::PersistedStateId(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_PersistedStateId(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PersistedStateId(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_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::Windows::UI::WindowManagement::AppWindowPresenter{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_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_Windows_UI_WindowManagement_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_Windows_UI_WindowManagement_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::Windows::UI::WindowManagement::AppWindowTitleBar{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::UIContext() 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_UIContext(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UIContext(&value)); } return winrt::Windows::UI::UIContext{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::WindowingEnvironment() 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_WindowingEnvironment(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WindowingEnvironment(&value)); } return winrt::Windows::UI::WindowManagement::WindowingEnvironment{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::CloseAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CloseAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CloseAsync(&operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::GetPlacement() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetPlacement(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPlacement(&result)); } return winrt::Windows::UI::WindowManagement::AppWindowPlacement{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::GetDisplayRegions() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDisplayRegions(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDisplayRegions(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::RequestMoveToDisplayRegion(winrt::Windows::UI::WindowManagement::DisplayRegion const& displayRegion) 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->RequestMoveToDisplayRegion(*(void**)(&displayRegion))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestMoveToDisplayRegion(*(void**)(&displayRegion))); } } template auto consume_Windows_UI_WindowManagement_IAppWindow::RequestMoveAdjacentToCurrentView() 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->RequestMoveAdjacentToCurrentView()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestMoveAdjacentToCurrentView()); } } template auto consume_Windows_UI_WindowManagement_IAppWindow::RequestMoveAdjacentToWindow(winrt::Windows::UI::WindowManagement::AppWindow const& anchorWindow) 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->RequestMoveAdjacentToWindow(*(void**)(&anchorWindow))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestMoveAdjacentToWindow(*(void**)(&anchorWindow))); } } template auto consume_Windows_UI_WindowManagement_IAppWindow::RequestMoveRelativeToWindowContent(winrt::Windows::UI::WindowManagement::AppWindow const& anchorWindow, winrt::Windows::Foundation::Point const& contentOffset) 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->RequestMoveRelativeToWindowContent(*(void**)(&anchorWindow), impl::bind_in(contentOffset))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestMoveRelativeToWindowContent(*(void**)(&anchorWindow), impl::bind_in(contentOffset))); } } template auto consume_Windows_UI_WindowManagement_IAppWindow::RequestMoveRelativeToCurrentViewContent(winrt::Windows::Foundation::Point const& contentOffset) 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->RequestMoveRelativeToCurrentViewContent(impl::bind_in(contentOffset))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestMoveRelativeToCurrentViewContent(impl::bind_in(contentOffset))); } } template auto consume_Windows_UI_WindowManagement_IAppWindow::RequestMoveRelativeToDisplayRegion(winrt::Windows::UI::WindowManagement::DisplayRegion const& displayRegion, winrt::Windows::Foundation::Point const& displayRegionOffset) 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->RequestMoveRelativeToDisplayRegion(*(void**)(&displayRegion), impl::bind_in(displayRegionOffset))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestMoveRelativeToDisplayRegion(*(void**)(&displayRegion), impl::bind_in(displayRegionOffset))); } } template auto consume_Windows_UI_WindowManagement_IAppWindow::RequestSize(winrt::Windows::Foundation::Size const& frameSize) 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->RequestSize(impl::bind_in(frameSize))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestSize(impl::bind_in(frameSize))); } } template auto consume_Windows_UI_WindowManagement_IAppWindow::TryShowAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryShowAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryShowAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindow::Changed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_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_Windows_UI_WindowManagement_IAppWindow::Changed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Changed(handler)); } template auto consume_Windows_UI_WindowManagement_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_Windows_UI_WindowManagement_IAppWindow::Closed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_Closed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_UI_WindowManagement_IAppWindow::Closed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Closed(handler)); } template auto consume_Windows_UI_WindowManagement_IAppWindow::Closed(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_Closed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_Closed(impl::bind_in(token)); } } template auto consume_Windows_UI_WindowManagement_IAppWindow::CloseRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_CloseRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_CloseRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_UI_WindowManagement_IAppWindow::CloseRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, CloseRequested(handler)); } template auto consume_Windows_UI_WindowManagement_IAppWindow::CloseRequested(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_CloseRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_CloseRequested(impl::bind_in(token)); } } template auto consume_Windows_UI_WindowManagement_IAppWindowChangedEventArgs::DidAvailableWindowPresentationsChange() 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_DidAvailableWindowPresentationsChange(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DidAvailableWindowPresentationsChange(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowChangedEventArgs::DidDisplayRegionsChange() 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_DidDisplayRegionsChange(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DidDisplayRegionsChange(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowChangedEventArgs::DidFrameChange() 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_DidFrameChange(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DidFrameChange(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowChangedEventArgs::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(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**)this; check_hresult(_winrt_abi_type->get_DidSizeChange(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowChangedEventArgs::DidTitleBarChange() 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_DidTitleBarChange(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DidTitleBarChange(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowChangedEventArgs::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(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**)this; check_hresult(_winrt_abi_type->get_DidVisibilityChange(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowChangedEventArgs::DidWindowingEnvironmentChange() 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_DidWindowingEnvironmentChange(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DidWindowingEnvironmentChange(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowChangedEventArgs::DidWindowPresentationChange() 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_DidWindowPresentationChange(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DidWindowPresentationChange(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowCloseRequestedEventArgs::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(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Cancel(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Cancel(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowCloseRequestedEventArgs::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(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Cancel(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Cancel(value)); } } template auto consume_Windows_UI_WindowManagement_IAppWindowCloseRequestedEventArgs::GetDeferral() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&result)); } return winrt::Windows::Foundation::Deferral{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindowClosedEventArgs::Reason() const { winrt::Windows::UI::WindowManagement::AppWindowClosedReason value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast(&value))); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowFrame::DragRegionVisuals() 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_DragRegionVisuals(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DragRegionVisuals(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindowFrameStyle::GetFrameStyle() const { winrt::Windows::UI::WindowManagement::AppWindowFrameStyle result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetFrameStyle(reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetFrameStyle(reinterpret_cast(&result))); } return result; } template auto consume_Windows_UI_WindowManagement_IAppWindowFrameStyle::SetFrameStyle(winrt::Windows::UI::WindowManagement::AppWindowFrameStyle const& frameStyle) 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->SetFrameStyle(static_cast(frameStyle))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetFrameStyle(static_cast(frameStyle))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowPlacement::DisplayRegion() 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_DisplayRegion(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayRegion(&value)); } return winrt::Windows::UI::WindowManagement::DisplayRegion{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindowPlacement::Offset() const { winrt::Windows::Foundation::Point 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_Offset(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Offset(put_abi(value))); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowPlacement::Size() const { winrt::Windows::Foundation::Size 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_Windows_UI_WindowManagement_IAppWindowPresentationConfiguration::Kind() const { winrt::Windows::UI::WindowManagement::AppWindowPresentationKind 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_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_Windows_UI_WindowManagement_IAppWindowPresenter::GetConfiguration() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetConfiguration(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetConfiguration(&result)); } return winrt::Windows::UI::WindowManagement::AppWindowPresentationConfiguration{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindowPresenter::IsPresentationSupported(winrt::Windows::UI::WindowManagement::AppWindowPresentationKind const& presentationKind) 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(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->IsPresentationSupported(static_cast(presentationKind), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsPresentationSupported(static_cast(presentationKind), &result)); } return result; } template auto consume_Windows_UI_WindowManagement_IAppWindowPresenter::RequestPresentation(winrt::Windows::UI::WindowManagement::AppWindowPresentationConfiguration const& configuration) 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(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->RequestPresentation(*(void**)(&configuration), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestPresentation(*(void**)(&configuration), &result)); } return result; } template auto consume_Windows_UI_WindowManagement_IAppWindowPresenter::RequestPresentation(winrt::Windows::UI::WindowManagement::AppWindowPresentationKind const& presentationKind) 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(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->RequestPresentationByKind(static_cast(presentationKind), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestPresentationByKind(static_cast(presentationKind), &result)); } return result; } template auto consume_Windows_UI_WindowManagement_IAppWindowStatics::TryCreateAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->TryCreateAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryCreateAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindowStatics::ClearAllPersistedState() 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->ClearAllPersistedState()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ClearAllPersistedState()); } } template auto consume_Windows_UI_WindowManagement_IAppWindowStatics::ClearPersistedState(param::hstring const& key) 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->ClearPersistedState(*(void**)(&key))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ClearPersistedState(*(void**)(&key))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::BackgroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::BackgroundColor(winrt::Windows::Foundation::IReference 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_BackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_BackgroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonBackgroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonBackgroundColor(winrt::Windows::Foundation::IReference 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_ButtonBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ButtonBackgroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonForegroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonForegroundColor(winrt::Windows::Foundation::IReference 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_ButtonForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ButtonForegroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonHoverBackgroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonHoverBackgroundColor(winrt::Windows::Foundation::IReference 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_ButtonHoverBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ButtonHoverBackgroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonHoverForegroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonHoverForegroundColor(winrt::Windows::Foundation::IReference 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_ButtonHoverForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ButtonHoverForegroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonInactiveBackgroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonInactiveBackgroundColor(winrt::Windows::Foundation::IReference 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_ButtonInactiveBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ButtonInactiveBackgroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonInactiveForegroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonInactiveForegroundColor(winrt::Windows::Foundation::IReference 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_ButtonInactiveForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ButtonInactiveForegroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonPressedBackgroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonPressedBackgroundColor(winrt::Windows::Foundation::IReference 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_ButtonPressedBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ButtonPressedBackgroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonPressedForegroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ButtonPressedForegroundColor(winrt::Windows::Foundation::IReference 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_ButtonPressedForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ButtonPressedForegroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ExtendsContentIntoTitleBar() 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_ExtendsContentIntoTitleBar(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendsContentIntoTitleBar(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ExtendsContentIntoTitleBar(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_ExtendsContentIntoTitleBar(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ExtendsContentIntoTitleBar(value)); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::ForegroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::ForegroundColor(winrt::Windows::Foundation::IReference 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_ForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ForegroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::InactiveBackgroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::InactiveBackgroundColor(winrt::Windows::Foundation::IReference 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_InactiveBackgroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_InactiveBackgroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::InactiveForegroundColor() 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_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_Windows_UI_WindowManagement_IAppWindowTitleBar::InactiveForegroundColor(winrt::Windows::Foundation::IReference 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_InactiveForegroundColor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_InactiveForegroundColor(*(void**)(&value))); } } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::IsVisible() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsVisible(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsVisible(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBar::GetTitleBarOcclusions() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetTitleBarOcclusions(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetTitleBarOcclusions(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBarOcclusion::OccludingRect() const { winrt::Windows::Foundation::Rect value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_OccludingRect(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OccludingRect(put_abi(value))); } return value; } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBarVisibility::GetPreferredVisibility() const { winrt::Windows::UI::WindowManagement::AppWindowTitleBarVisibility result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetPreferredVisibility(reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPreferredVisibility(reinterpret_cast(&result))); } return result; } template auto consume_Windows_UI_WindowManagement_IAppWindowTitleBarVisibility::SetPreferredVisibility(winrt::Windows::UI::WindowManagement::AppWindowTitleBarVisibility const& visibilityMode) 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->SetPreferredVisibility(static_cast(visibilityMode))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPreferredVisibility(static_cast(visibilityMode))); } } template auto consume_Windows_UI_WindowManagement_IDisplayRegion::DisplayMonitorDeviceId() 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_DisplayMonitorDeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayMonitorDeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IDisplayRegion::IsVisible() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsVisible(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsVisible(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IDisplayRegion::WorkAreaOffset() const { winrt::Windows::Foundation::Point 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_WorkAreaOffset(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WorkAreaOffset(put_abi(value))); } return value; } template auto consume_Windows_UI_WindowManagement_IDisplayRegion::WorkAreaSize() const { winrt::Windows::Foundation::Size 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_WorkAreaSize(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WorkAreaSize(put_abi(value))); } return value; } template auto consume_Windows_UI_WindowManagement_IDisplayRegion::WindowingEnvironment() 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_WindowingEnvironment(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WindowingEnvironment(&value)); } return winrt::Windows::UI::WindowManagement::WindowingEnvironment{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IDisplayRegion::Changed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_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_Windows_UI_WindowManagement_IDisplayRegion::Changed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Changed(handler)); } template auto consume_Windows_UI_WindowManagement_IDisplayRegion::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_Windows_UI_WindowManagement_IFullScreenPresentationConfiguration::IsExclusive() 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_IsExclusive(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsExclusive(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IFullScreenPresentationConfiguration::IsExclusive(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_IsExclusive(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsExclusive(value)); } } template auto consume_Windows_UI_WindowManagement_IWindowServicesStatics::FindAllTopLevelWindowIds() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllTopLevelWindowIds(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllTopLevelWindowIds(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IWindowingEnvironment::IsEnabled() 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_IsEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } return value; } template auto consume_Windows_UI_WindowManagement_IWindowingEnvironment::Kind() const { winrt::Windows::UI::WindowManagement::WindowingEnvironmentKind 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_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_Windows_UI_WindowManagement_IWindowingEnvironment::GetDisplayRegions() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDisplayRegions(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDisplayRegions(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IWindowingEnvironment::Changed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_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_Windows_UI_WindowManagement_IWindowingEnvironment::Changed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Changed(handler)); } template auto consume_Windows_UI_WindowManagement_IWindowingEnvironment::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_Windows_UI_WindowManagement_IWindowingEnvironmentAddedEventArgs::WindowingEnvironment() 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_WindowingEnvironment(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WindowingEnvironment(&value)); } return winrt::Windows::UI::WindowManagement::WindowingEnvironment{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IWindowingEnvironmentRemovedEventArgs::WindowingEnvironment() 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_WindowingEnvironment(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WindowingEnvironment(&value)); } return winrt::Windows::UI::WindowManagement::WindowingEnvironment{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IWindowingEnvironmentStatics::FindAll() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAll(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAll(&result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_WindowManagement_IWindowingEnvironmentStatics::FindAll(winrt::Windows::UI::WindowManagement::WindowingEnvironmentKind const& kind) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllWithKind(static_cast(kind), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllWithKind(static_cast(kind), &result)); } return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Content(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Content()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_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(); } int32_t __stdcall get_Frame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Frame()); 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_PersistedStateId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PersistedStateId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PersistedStateId(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PersistedStateId(*reinterpret_cast(&value)); 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_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 get_UIContext(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UIContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WindowingEnvironment(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WindowingEnvironment()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CloseAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().CloseAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPlacement(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetPlacement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDisplayRegions(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetDisplayRegions()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestMoveToDisplayRegion(void* displayRegion) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RequestMoveToDisplayRegion(*reinterpret_cast(&displayRegion)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestMoveAdjacentToCurrentView() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RequestMoveAdjacentToCurrentView(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestMoveAdjacentToWindow(void* anchorWindow) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RequestMoveAdjacentToWindow(*reinterpret_cast(&anchorWindow)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestMoveRelativeToWindowContent(void* anchorWindow, winrt::Windows::Foundation::Point contentOffset) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RequestMoveRelativeToWindowContent(*reinterpret_cast(&anchorWindow), *reinterpret_cast(&contentOffset)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestMoveRelativeToCurrentViewContent(winrt::Windows::Foundation::Point contentOffset) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RequestMoveRelativeToCurrentViewContent(*reinterpret_cast(&contentOffset)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestMoveRelativeToDisplayRegion(void* displayRegion, winrt::Windows::Foundation::Point displayRegionOffset) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RequestMoveRelativeToDisplayRegion(*reinterpret_cast(&displayRegion), *reinterpret_cast(&displayRegionOffset)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestSize(winrt::Windows::Foundation::Size frameSize) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RequestSize(*reinterpret_cast(&frameSize)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryShowAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TryShowAsync()); 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_Closed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Closed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Closed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Closed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_CloseRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().CloseRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_CloseRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().CloseRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DidAvailableWindowPresentationsChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidAvailableWindowPresentationsChange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DidDisplayRegionsChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidDisplayRegionsChange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DidFrameChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidFrameChange()); 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_DidTitleBarChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidTitleBarChange()); 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(); } int32_t __stdcall get_DidWindowingEnvironmentChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidWindowingEnvironmentChange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DidWindowPresentationChange(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DidWindowPresentationChange()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Cancel(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Cancel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Cancel(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Cancel(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Reason(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Reason()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DragRegionVisuals(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DragRegionVisuals()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetFrameStyle(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetFrameStyle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetFrameStyle(int32_t frameStyle) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetFrameStyle(*reinterpret_cast(&frameStyle)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayRegion(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayRegion()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Offset(winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Offset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Size(winrt::Windows::Foundation::Size* 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(); } }; #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 { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetConfiguration(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetConfiguration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsPresentationSupported(int32_t presentationKind, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsPresentationSupported(*reinterpret_cast(&presentationKind))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestPresentation(void* configuration, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().RequestPresentation(*reinterpret_cast(&configuration))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestPresentationByKind(int32_t presentationKind, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().RequestPresentation(*reinterpret_cast(&presentationKind))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall TryCreateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TryCreateAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ClearAllPersistedState() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClearAllPersistedState(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ClearPersistedState(void* key) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClearPersistedState(*reinterpret_cast(&key)); 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>(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>(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>(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>(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>(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>(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>(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>(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>(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>(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_InactiveBackgroundColor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(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>(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_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 GetTitleBarOcclusions(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetTitleBarOcclusions()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_OccludingRect(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OccludingRect()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetPreferredVisibility(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetPreferredVisibility()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPreferredVisibility(int32_t visibilityMode) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPreferredVisibility(*reinterpret_cast(&visibilityMode)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayMonitorDeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayMonitorDeviceId()); 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_WorkAreaOffset(winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WorkAreaOffset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WorkAreaSize(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WorkAreaSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WindowingEnvironment(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WindowingEnvironment()); 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; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsExclusive(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsExclusive()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsExclusive(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsExclusive(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FindAllTopLevelWindowIds(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().FindAllTopLevelWindowIds()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } 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(); } int32_t __stdcall GetDisplayRegions(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetDisplayRegions()); 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; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WindowingEnvironment(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WindowingEnvironment()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WindowingEnvironment(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WindowingEnvironment()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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 FindAllWithKind(int32_t kind, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().FindAll(*reinterpret_cast(&kind))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::UI::WindowManagement { inline auto AppWindow::TryCreateAsync() { return impl::call_factory_cast(*)(IAppWindowStatics const&), AppWindow, IAppWindowStatics>([](IAppWindowStatics const& f) { return f.TryCreateAsync(); }); } inline auto AppWindow::ClearAllPersistedState() { impl::call_factory_cast([](IAppWindowStatics const& f) { return f.ClearAllPersistedState(); }); } inline auto AppWindow::ClearPersistedState(param::hstring const& key) { impl::call_factory([&](IAppWindowStatics const& f) { return f.ClearPersistedState(key); }); } inline CompactOverlayPresentationConfiguration::CompactOverlayPresentationConfiguration() : CompactOverlayPresentationConfiguration(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline DefaultPresentationConfiguration::DefaultPresentationConfiguration() : DefaultPresentationConfiguration(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline FullScreenPresentationConfiguration::FullScreenPresentationConfiguration() : FullScreenPresentationConfiguration(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto WindowServices::FindAllTopLevelWindowIds() { return impl::call_factory_cast(*)(IWindowServicesStatics const&), WindowServices, IWindowServicesStatics>([](IWindowServicesStatics const& f) { return f.FindAllTopLevelWindowIds(); }); } inline auto WindowingEnvironment::FindAll() { return impl::call_factory_cast(*)(IWindowingEnvironmentStatics const&), WindowingEnvironment, IWindowingEnvironmentStatics>([](IWindowingEnvironmentStatics const& f) { return f.FindAll(); }); } inline auto WindowingEnvironment::FindAll(winrt::Windows::UI::WindowManagement::WindowingEnvironmentKind const& kind) { return impl::call_factory([&](IWindowingEnvironmentStatics const& f) { return f.FindAll(kind); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif