// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Microsoft_Graphics_Display_H #define WINRT_Microsoft_Graphics_Display_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/impl/Microsoft.Graphics.Display.2.h" #include "winrt/impl/Microsoft.UI.2.h" #include "winrt/impl/Microsoft.UI.Dispatching.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" namespace winrt::impl { template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::CurrentAdvancedColorKind() const { winrt::Microsoft::Graphics::Display::DisplayAdvancedColorKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CurrentAdvancedColorKind( reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentAdvancedColorKind( reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::RedPrimary() 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< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RedPrimary(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RedPrimary(put_abi(value))); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::GreenPrimary() 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< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_GreenPrimary(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GreenPrimary(put_abi(value))); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::BluePrimary() 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< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BluePrimary(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BluePrimary(put_abi(value))); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::WhitePoint() 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< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_WhitePoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WhitePoint(put_abi(value))); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::MaxLuminanceInNits() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MaxLuminanceInNits(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxLuminanceInNits(&value)); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::MinLuminanceInNits() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MinLuminanceInNits(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MinLuminanceInNits(&value)); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::MaxAverageFullFrameLuminanceInNits() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->get_MaxAverageFullFrameLuminanceInNits(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_MaxAverageFullFrameLuminanceInNits(&value)); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo< D>::SdrWhiteLevelInNits() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SdrWhiteLevelInNits(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SdrWhiteLevelInNits(&value)); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo:: IsHdrMetadataFormatCurrentlySupported( winrt::Microsoft::Graphics::Display::DisplayHdrMetadataFormat const& format) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsHdrMetadataFormatCurrentlySupported( static_cast(format), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsHdrMetadataFormatCurrentlySupported( static_cast(format), &result)); } return result; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo:: IsAdvancedColorKindAvailable( winrt::Microsoft::Graphics::Display::DisplayAdvancedColorKind const& kind) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsAdvancedColorKindAvailable( static_cast(kind), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsAdvancedColorKindAvailable( static_cast(kind), &result)); } return result; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation< D>::DispatcherQueue() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult(_winrt_abi_type->get_DispatcherQueue(&value)); } return winrt::Microsoft::UI::Dispatching::DispatcherQueue{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation< D>::IsStereoEnabled() const { bool value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsStereoEnabled(&value)); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult(_winrt_abi_type->get_IsStereoEnabled(&value)); } return value; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation:: IsStereoEnabledChanged( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Graphics::Display::DisplayInformation, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_IsStereoEnabledChanged( *(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult(_winrt_abi_type->add_IsStereoEnabledChanged( *(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation:: IsStereoEnabledChanged( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Graphics::Display::DisplayInformation, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker( this, IsStereoEnabledChanged(handler)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation< D>::IsStereoEnabledChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_IsStereoEnabledChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *( abi_t**)this; _winrt_abi_type->remove_IsStereoEnabledChanged(impl::bind_in(token)); } } template auto consume_Microsoft_Graphics_Display_IDisplayInformation< D>::GetColorProfileAsync() const { void* operation{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetColorProfileAsync(&operation)); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult(_winrt_abi_type->GetColorProfileAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Windows::Storage::Streams::IRandomAccessStream>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation< D>::GetColorProfile() const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetColorProfile(&result)); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult(_winrt_abi_type->GetColorProfile(&result)); } return winrt::Windows::Storage::Streams::IRandomAccessStream{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation:: ColorProfileChanged( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Graphics::Display::DisplayInformation, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ColorProfileChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult(_winrt_abi_type->add_ColorProfileChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation:: ColorProfileChanged( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Graphics::Display::DisplayInformation, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker( this, ColorProfileChanged(handler)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation< D>::ColorProfileChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ColorProfileChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *( abi_t**)this; _winrt_abi_type->remove_ColorProfileChanged(impl::bind_in(token)); } } template auto consume_Microsoft_Graphics_Display_IDisplayInformation< D>::GetAdvancedColorInfo() const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAdvancedColorInfo(&result)); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult(_winrt_abi_type->GetAdvancedColorInfo(&result)); } return winrt::Microsoft::Graphics::Display::DisplayAdvancedColorInfo{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation:: AdvancedColorInfoChanged( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Graphics::Display::DisplayInformation, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_AdvancedColorInfoChanged( *(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult(_winrt_abi_type->add_AdvancedColorInfoChanged( *(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation:: AdvancedColorInfoChanged( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Graphics::Display::DisplayInformation, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker( this, AdvancedColorInfoChanged(handler)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation:: AdvancedColorInfoChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_AdvancedColorInfoChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *( abi_t**)this; _winrt_abi_type->remove_AdvancedColorInfoChanged(impl::bind_in(token)); } } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::Destroyed( winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Graphics::Display::DisplayInformation, winrt::Windows::Foundation::IInspectable> const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->add_Destroyed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *( abi_t**)this; check_hresult( _winrt_abi_type->add_Destroyed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::Destroyed( auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler< winrt::Microsoft::Graphics::Display::DisplayInformation, winrt::Windows::Foundation::IInspectable> const& handler) const { return impl::make_event_revoker(this, Destroyed(handler)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::Destroyed( winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v< D, winrt::Microsoft::Graphics::Display::IDisplayInformation>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformation, D const*>( static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_Destroyed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *( abi_t**)this; _winrt_abi_type->remove_Destroyed(impl::bind_in(token)); } } template auto consume_Microsoft_Graphics_Display_IDisplayInformationStatics:: CreateForWindowId(winrt::Microsoft::UI::WindowId const& windowId) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformationStatics, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->CreateForWindowId(impl::bind_in(windowId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->CreateForWindowId(impl::bind_in(windowId), &result)); } return winrt::Microsoft::Graphics::Display::DisplayInformation{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Graphics_Display_IDisplayInformationStatics:: CreateForDisplayId(winrt::Microsoft::UI::DisplayId const& displayId) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Graphics::Display::IDisplayInformationStatics, D const*>(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult( _winrt_abi_type->CreateForDisplayId(impl::bind_in(displayId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->CreateForDisplayId(impl::bind_in(displayId), &result)); } return winrt::Microsoft::Graphics::Display::DisplayInformation{ result, take_ownership_from_abi}; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo> { int32_t __stdcall get_CurrentAdvancedColorKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Graphics::Display::DisplayAdvancedColorKind>( this->shim().CurrentAdvancedColorKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RedPrimary( winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().RedPrimary()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GreenPrimary( winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().GreenPrimary()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BluePrimary( winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().BluePrimary()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WhitePoint( winrt::Windows::Foundation::Point* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().WhitePoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxLuminanceInNits(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxLuminanceInNits()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MinLuminanceInNits(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MinLuminanceInNits()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxAverageFullFrameLuminanceInNits( double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxAverageFullFrameLuminanceInNits()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SdrWhiteLevelInNits(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SdrWhiteLevelInNits()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsHdrMetadataFormatCurrentlySupported( int32_t format, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsHdrMetadataFormatCurrentlySupported( *reinterpret_cast(&format))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsAdvancedColorKindAvailable(int32_t kind, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsAdvancedColorKindAvailable( *reinterpret_cast(&kind))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DispatcherQueue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from( this->shim().DispatcherQueue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsStereoEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsStereoEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_IsStereoEnabledChanged( void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().IsStereoEnabledChanged( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_IsStereoEnabledChanged( winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().IsStereoEnabledChanged( *reinterpret_cast(&token)); return 0; } int32_t __stdcall GetColorProfileAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().GetColorProfileAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetColorProfile(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetColorProfile()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ColorProfileChanged( void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ColorProfileChanged( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ColorProfileChanged( winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ColorProfileChanged( *reinterpret_cast(&token)); return 0; } int32_t __stdcall GetAdvancedColorInfo(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from< winrt::Microsoft::Graphics::Display::DisplayAdvancedColorInfo>( this->shim().GetAdvancedColorInfo()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_AdvancedColorInfoChanged( void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AdvancedColorInfoChanged( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AdvancedColorInfoChanged( winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AdvancedColorInfoChanged( *reinterpret_cast(&token)); return 0; } int32_t __stdcall add_Destroyed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Destroyed( *reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Destroyed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Destroyed( *reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Graphics::Display::IDisplayInformationStatics> { int32_t __stdcall CreateForWindowId( struct struct_Microsoft_UI_WindowId windowId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().CreateForWindowId( *reinterpret_cast( &windowId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForDisplayId( struct struct_Microsoft_UI_DisplayId displayId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().CreateForDisplayId( *reinterpret_cast( &displayId))); return 0; } catch (...) { return to_hresult(); } }; #endif } // namespace winrt::impl WINRT_EXPORT namespace winrt::Microsoft::Graphics::Display { inline auto DisplayInformation::CreateForWindowId( winrt::Microsoft::UI::WindowId const& windowId) { return impl::call_factory( [&](IDisplayInformationStatics const& f) { return f.CreateForWindowId(windowId); }); } inline auto DisplayInformation::CreateForDisplayId( winrt::Microsoft::UI::DisplayId const& displayId) { return impl::call_factory( [&](IDisplayInformationStatics const& f) { return f.CreateForDisplayId(displayId); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } // namespace std #endif