// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #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.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #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" #include "winrt/impl/Microsoft.Graphics.Display.2.h" namespace winrt::impl { template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::CurrentAdvancedColorKind() const { winrt::Microsoft::Graphics::Display::DisplayAdvancedColorKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_CurrentAdvancedColorKind(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::RedPrimary() const { winrt::Windows::Foundation::Point value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_RedPrimary(put_abi(value))); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::GreenPrimary() const { winrt::Windows::Foundation::Point value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_GreenPrimary(put_abi(value))); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::BluePrimary() const { winrt::Windows::Foundation::Point value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_BluePrimary(put_abi(value))); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::WhitePoint() const { winrt::Windows::Foundation::Point value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_WhitePoint(put_abi(value))); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::MaxLuminanceInNits() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_MaxLuminanceInNits(&value)); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::MinLuminanceInNits() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_MinLuminanceInNits(&value)); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::MaxAverageFullFrameLuminanceInNits() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_MaxAverageFullFrameLuminanceInNits(&value)); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::SdrWhiteLevelInNits() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->get_SdrWhiteLevelInNits(&value)); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo::IsHdrMetadataFormatCurrentlySupported(winrt::Microsoft::Graphics::Display::DisplayHdrMetadataFormat const& format) const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo)->IsAdvancedColorKindAvailable(static_cast(kind), &result)); return result; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::DispatcherQueue() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->get_DispatcherQueue(&value)); return winrt::Microsoft::UI::Dispatching::DispatcherQueue{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::IsStereoEnabled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->get_IsStereoEnabled(&value)); return value; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::IsStereoEnabledChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->add_IsStereoEnabledChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::IsStereoEnabledChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, IsStereoEnabledChanged(handler)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::IsStereoEnabledChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->remove_IsStereoEnabledChanged(impl::bind_in(token)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::GetColorProfileAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->GetColorProfileAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::GetColorProfile() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->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 const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->add_ColorProfileChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::ColorProfileChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ColorProfileChanged(handler)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::ColorProfileChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->remove_ColorProfileChanged(impl::bind_in(token)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::GetAdvancedColorInfo() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->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 const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->add_AdvancedColorInfoChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::AdvancedColorInfoChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler 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 { WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->remove_AdvancedColorInfoChanged(impl::bind_in(token)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::Destroyed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->add_Destroyed(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_Graphics_Display_IDisplayInformation::Destroyed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler 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 { WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformation)->remove_Destroyed(impl::bind_in(token)); } template auto consume_Microsoft_Graphics_Display_IDisplayInformationStatics::CreateForWindowId(winrt::Microsoft::UI::WindowId const& windowId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformationStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Graphics::Display::IDisplayInformationStatics)->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 { int32_t __stdcall get_CurrentAdvancedColorKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(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(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 { 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 } 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 } #endif