// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Graphics_Display_Core_H #define WINRT_Windows_Graphics_Display_Core_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/Windows.Graphics.Display.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Graphics.Display.Core.2.h" namespace winrt::impl { template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::GetSupportedDisplayModes() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformation)->GetSupportedDisplayModes(&result)); return winrt::Windows::Foundation::Collections::IVectorView{ result, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::GetCurrentDisplayMode() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformation)->GetCurrentDisplayMode(&result)); return winrt::Windows::Graphics::Display::Core::HdmiDisplayMode{ result, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::SetDefaultDisplayModeAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformation)->SetDefaultDisplayModeAsync(&operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::RequestSetCurrentDisplayModeAsync(winrt::Windows::Graphics::Display::Core::HdmiDisplayMode const& mode) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformation)->RequestSetCurrentDisplayModeAsync(*(void**)(&mode), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::RequestSetCurrentDisplayModeAsync(winrt::Windows::Graphics::Display::Core::HdmiDisplayMode const& mode, winrt::Windows::Graphics::Display::Core::HdmiDisplayHdrOption const& hdrOption) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformation)->RequestSetCurrentDisplayModeWithHdrAsync(*(void**)(&mode), static_cast(hdrOption), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::RequestSetCurrentDisplayModeAsync(winrt::Windows::Graphics::Display::Core::HdmiDisplayMode const& mode, winrt::Windows::Graphics::Display::Core::HdmiDisplayHdrOption const& hdrOption, winrt::Windows::Graphics::Display::Core::HdmiDisplayHdr2086Metadata const& hdrMetadata) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformation)->RequestSetCurrentDisplayModeWithHdrAndMetadataAsync(*(void**)(&mode), static_cast(hdrOption), impl::bind_in(hdrMetadata), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::DisplayModesChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformation)->add_DisplayModesChanged(*(void**)(&value), put_abi(token))); return token; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::DisplayModesChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, DisplayModesChanged(value)); } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformation::DisplayModesChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformation)->remove_DisplayModesChanged(impl::bind_in(token)); } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayInformationStatics::GetForCurrentView() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayInformationStatics)->GetForCurrentView(&result)); return winrt::Windows::Graphics::Display::Core::HdmiDisplayInformation{ result, take_ownership_from_abi }; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::ResolutionWidthInRawPixels() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_ResolutionWidthInRawPixels(&value)); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::ResolutionHeightInRawPixels() const { uint32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_ResolutionHeightInRawPixels(&value)); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::RefreshRate() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_RefreshRate(&value)); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::StereoEnabled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_StereoEnabled(&value)); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::BitsPerPixel() const { uint16_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_BitsPerPixel(&value)); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::IsEqual(winrt::Windows::Graphics::Display::Core::HdmiDisplayMode const& mode) const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->IsEqual(*(void**)(&mode), &result)); return result; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::ColorSpace() const { winrt::Windows::Graphics::Display::Core::HdmiDisplayColorSpace value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_ColorSpace(reinterpret_cast(&value))); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::PixelEncoding() const { winrt::Windows::Graphics::Display::Core::HdmiDisplayPixelEncoding value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_PixelEncoding(reinterpret_cast(&value))); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::IsSdrLuminanceSupported() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_IsSdrLuminanceSupported(&value)); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::IsSmpte2084Supported() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_IsSmpte2084Supported(&value)); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode::Is2086MetadataSupported() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode)->get_Is2086MetadataSupported(&value)); return value; } template auto consume_Windows_Graphics_Display_Core_IHdmiDisplayMode2::IsDolbyVisionLowLatencySupported() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Graphics::Display::Core::IHdmiDisplayMode2)->get_IsDolbyVisionLowLatencySupported(&value)); return value; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetSupportedDisplayModes(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().GetSupportedDisplayModes()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentDisplayMode(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetCurrentDisplayMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDefaultDisplayModeAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetDefaultDisplayModeAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestSetCurrentDisplayModeAsync(void* mode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestSetCurrentDisplayModeAsync(*reinterpret_cast(&mode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestSetCurrentDisplayModeWithHdrAsync(void* mode, int32_t hdrOption, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestSetCurrentDisplayModeAsync(*reinterpret_cast(&mode), *reinterpret_cast(&hdrOption))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestSetCurrentDisplayModeWithHdrAndMetadataAsync(void* mode, int32_t hdrOption, struct struct_Windows_Graphics_Display_Core_HdmiDisplayHdr2086Metadata hdrMetadata, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestSetCurrentDisplayModeAsync(*reinterpret_cast(&mode), *reinterpret_cast(&hdrOption), *reinterpret_cast(&hdrMetadata))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_DisplayModesChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DisplayModesChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DisplayModesChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DisplayModesChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResolutionWidthInRawPixels(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResolutionWidthInRawPixels()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ResolutionHeightInRawPixels(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResolutionHeightInRawPixels()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RefreshRate(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RefreshRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StereoEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StereoEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BitsPerPixel(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BitsPerPixel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsEqual(void* mode, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsEqual(*reinterpret_cast(&mode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ColorSpace(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ColorSpace()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PixelEncoding(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelEncoding()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsSdrLuminanceSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSdrLuminanceSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsSmpte2084Supported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSmpte2084Supported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Is2086MetadataSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Is2086MetadataSupported()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsDolbyVisionLowLatencySupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsDolbyVisionLowLatencySupported()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Graphics::Display::Core { inline auto HdmiDisplayInformation::GetForCurrentView() { return impl::call_factory_cast([](IHdmiDisplayInformationStatics const& f) { return f.GetForCurrentView(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif