Files
2026-01-27 23:46:02 -08:00

991 lines
43 KiB
C++

// 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 <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::CurrentAdvancedColorKind() const {
winrt::Microsoft::Graphics::Display::DisplayAdvancedColorKind value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_CurrentAdvancedColorKind(
reinterpret_cast<int32_t*>(&value)));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->get_CurrentAdvancedColorKind(
reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::RedPrimary() const {
winrt::Windows::Foundation::Point value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_RedPrimary(put_abi(value)));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->get_RedPrimary(put_abi(value)));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::GreenPrimary() const {
winrt::Windows::Foundation::Point value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_GreenPrimary(put_abi(value)));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->get_GreenPrimary(put_abi(value)));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::BluePrimary() const {
winrt::Windows::Foundation::Point value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_BluePrimary(put_abi(value)));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->get_BluePrimary(put_abi(value)));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::WhitePoint() const {
winrt::Windows::Foundation::Point value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_WhitePoint(put_abi(value)));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->get_WhitePoint(put_abi(value)));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::MaxLuminanceInNits() const {
double value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_MaxLuminanceInNits(&value));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->get_MaxLuminanceInNits(&value));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::MinLuminanceInNits() const {
double value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_MinLuminanceInNits(&value));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->get_MinLuminanceInNits(&value));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::MaxAverageFullFrameLuminanceInNits() const {
double value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(
_winrt_abi_type->get_MaxAverageFullFrameLuminanceInNits(&value));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(
_winrt_abi_type->get_MaxAverageFullFrameLuminanceInNits(&value));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<
D>::SdrWhiteLevelInNits() const {
double value{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_SdrWhiteLevelInNits(&value));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->get_SdrWhiteLevelInNits(&value));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<D>::
IsHdrMetadataFormatCurrentlySupported(
winrt::Microsoft::Graphics::Display::DisplayHdrMetadataFormat const&
format) const {
bool result{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->IsHdrMetadataFormatCurrentlySupported(
static_cast<int32_t>(format), &result));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->IsHdrMetadataFormatCurrentlySupported(
static_cast<int32_t>(format), &result));
}
return result;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayAdvancedColorInfo<D>::
IsAdvancedColorKindAvailable(
winrt::Microsoft::Graphics::Display::DisplayAdvancedColorKind const&
kind) const {
bool result{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->IsAdvancedColorKindAvailable(
static_cast<int32_t>(kind), &result));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayAdvancedColorInfo>**)this;
check_hresult(_winrt_abi_type->IsAdvancedColorKindAvailable(
static_cast<int32_t>(kind), &result));
}
return result;
}
template <typename D>
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_DispatcherQueue(&value));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(_winrt_abi_type->get_DispatcherQueue(&value));
}
return winrt::Microsoft::UI::Dispatching::DispatcherQueue{
value, take_ownership_from_abi};
}
template <typename D>
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_IsStereoEnabled(&value));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(_winrt_abi_type->get_IsStereoEnabled(&value));
}
return value;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->add_IsStereoEnabledChanged(
*(void**)(&handler), put_abi(token)));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(_winrt_abi_type->add_IsStereoEnabledChanged(
*(void**)(&handler), put_abi(token)));
}
return token;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::
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<D, IsStereoEnabledChanged_revoker>(
this, IsStereoEnabledChanged(handler));
}
template <typename D>
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
_winrt_abi_type->remove_IsStereoEnabledChanged(impl::bind_in(token));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
_winrt_abi_type->remove_IsStereoEnabledChanged(impl::bind_in(token));
}
}
template <typename D>
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetColorProfileAsync(&operation));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(_winrt_abi_type->GetColorProfileAsync(&operation));
}
return winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Storage::Streams::IRandomAccessStream>{
operation, take_ownership_from_abi};
}
template <typename D>
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetColorProfile(&result));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(_winrt_abi_type->GetColorProfile(&result));
}
return winrt::Windows::Storage::Streams::IRandomAccessStream{
result, take_ownership_from_abi};
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->add_ColorProfileChanged(*(void**)(&handler),
put_abi(token)));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(_winrt_abi_type->add_ColorProfileChanged(*(void**)(&handler),
put_abi(token)));
}
return token;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::
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<D, ColorProfileChanged_revoker>(
this, ColorProfileChanged(handler));
}
template <typename D>
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
_winrt_abi_type->remove_ColorProfileChanged(impl::bind_in(token));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
_winrt_abi_type->remove_ColorProfileChanged(impl::bind_in(token));
}
}
template <typename D>
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetAdvancedColorInfo(&result));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(_winrt_abi_type->GetAdvancedColorInfo(&result));
}
return winrt::Microsoft::Graphics::Display::DisplayAdvancedColorInfo{
result, take_ownership_from_abi};
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->add_AdvancedColorInfoChanged(
*(void**)(&handler), put_abi(token)));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(_winrt_abi_type->add_AdvancedColorInfoChanged(
*(void**)(&handler), put_abi(token)));
}
return token;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::
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<D, AdvancedColorInfoChanged_revoker>(
this, AdvancedColorInfoChanged(handler));
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
_winrt_abi_type->remove_AdvancedColorInfoChanged(impl::bind_in(token));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
_winrt_abi_type->remove_AdvancedColorInfoChanged(impl::bind_in(token));
}
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
check_hresult(
_winrt_abi_type->add_Destroyed(*(void**)(&handler), put_abi(token)));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
check_hresult(
_winrt_abi_type->add_Destroyed(*(void**)(&handler), put_abi(token)));
}
return token;
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::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<D, Destroyed_revoker>(this,
Destroyed(handler));
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformation<D>::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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformation>**)&_winrt_casted_result;
_winrt_abi_type->remove_Destroyed(impl::bind_in(token));
} else {
auto const _winrt_abi_type = *(
abi_t<winrt::Microsoft::Graphics::Display::IDisplayInformation>**)this;
_winrt_abi_type->remove_Destroyed(impl::bind_in(token));
}
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformationStatics<D>::
CreateForWindowId(winrt::Microsoft::UI::WindowId const& windowId) const {
void* result{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayInformationStatics>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformationStatics>**)&_winrt_casted_result;
check_hresult(
_winrt_abi_type->CreateForWindowId(impl::bind_in(windowId), &result));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformationStatics>**)this;
check_hresult(
_winrt_abi_type->CreateForWindowId(impl::bind_in(windowId), &result));
}
return winrt::Microsoft::Graphics::Display::DisplayInformation{
result, take_ownership_from_abi};
}
template <typename D>
auto consume_Microsoft_Graphics_Display_IDisplayInformationStatics<D>::
CreateForDisplayId(winrt::Microsoft::UI::DisplayId const& displayId) const {
void* result{};
if constexpr (!std::is_same_v<D, winrt::Microsoft::Graphics::Display::
IDisplayInformationStatics>) {
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<D const*>(this), _winrt_cast_result_code);
check_hresult(_winrt_cast_result_code);
auto const _winrt_abi_type =
*(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformationStatics>**)&_winrt_casted_result;
check_hresult(
_winrt_abi_type->CreateForDisplayId(impl::bind_in(displayId), &result));
} else {
auto const _winrt_abi_type = *(abi_t<winrt::Microsoft::Graphics::Display::
IDisplayInformationStatics>**)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 <typename D>
struct produce<D,
winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo>
: 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<winrt::Windows::Foundation::Point>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::Point>(
this->shim().RedPrimary());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall get_GreenPrimary(
winrt::Windows::Foundation::Point* value) noexcept final try {
zero_abi<winrt::Windows::Foundation::Point>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::Point>(
this->shim().GreenPrimary());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall get_BluePrimary(
winrt::Windows::Foundation::Point* value) noexcept final try {
zero_abi<winrt::Windows::Foundation::Point>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::Point>(
this->shim().BluePrimary());
return 0;
} catch (...) {
return to_hresult();
}
int32_t __stdcall get_WhitePoint(
winrt::Windows::Foundation::Point* value) noexcept final try {
zero_abi<winrt::Windows::Foundation::Point>(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Windows::Foundation::Point>(
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<double>(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<double>(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<double>(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<double>(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<bool>(this->shim().IsHdrMetadataFormatCurrentlySupported(
*reinterpret_cast<winrt::Microsoft::Graphics::Display::
DisplayHdrMetadataFormat const*>(&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<bool>(this->shim().IsAdvancedColorKindAvailable(
*reinterpret_cast<winrt::Microsoft::Graphics::Display::
DisplayAdvancedColorKind const*>(&kind)));
return 0;
} catch (...) {
return to_hresult();
}
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D, winrt::Microsoft::Graphics::Display::IDisplayInformation>
: produce_base<D,
winrt::Microsoft::Graphics::Display::IDisplayInformation> {
int32_t __stdcall get_DispatcherQueue(void** value) noexcept final try {
clear_abi(value);
typename D::abi_guard guard(this->shim());
*value = detach_from<winrt::Microsoft::UI::Dispatching::DispatcherQueue>(
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<bool>(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<winrt::event_token>(token);
typename D::abi_guard guard(this->shim());
*token =
detach_from<winrt::event_token>(this->shim().IsStereoEnabledChanged(
*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<
winrt::Microsoft::Graphics::Display::DisplayInformation,
winrt::Windows::Foundation::IInspectable> 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<winrt::event_token const*>(&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<winrt::Windows::Foundation::IAsyncOperation<
winrt::Windows::Storage::Streams::IRandomAccessStream>>(
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<winrt::Windows::Storage::Streams::IRandomAccessStream>(
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<winrt::event_token>(token);
typename D::abi_guard guard(this->shim());
*token = detach_from<winrt::event_token>(this->shim().ColorProfileChanged(
*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<
winrt::Microsoft::Graphics::Display::DisplayInformation,
winrt::Windows::Foundation::IInspectable> 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<winrt::event_token const*>(&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<winrt::event_token>(token);
typename D::abi_guard guard(this->shim());
*token =
detach_from<winrt::event_token>(this->shim().AdvancedColorInfoChanged(
*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<
winrt::Microsoft::Graphics::Display::DisplayInformation,
winrt::Windows::Foundation::IInspectable> 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<winrt::event_token const*>(&token));
return 0;
}
int32_t __stdcall add_Destroyed(void* handler,
winrt::event_token* token) noexcept final
try {
zero_abi<winrt::event_token>(token);
typename D::abi_guard guard(this->shim());
*token = detach_from<winrt::event_token>(this->shim().Destroyed(
*reinterpret_cast<winrt::Windows::Foundation::TypedEventHandler<
winrt::Microsoft::Graphics::Display::DisplayInformation,
winrt::Windows::Foundation::IInspectable> 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<winrt::event_token const*>(&token));
return 0;
}
};
#endif
#ifndef WINRT_LEAN_AND_MEAN
template <typename D>
struct produce<D,
winrt::Microsoft::Graphics::Display::IDisplayInformationStatics>
: 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<winrt::Microsoft::Graphics::Display::DisplayInformation>(
this->shim().CreateForWindowId(
*reinterpret_cast<winrt::Microsoft::UI::WindowId const*>(
&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<winrt::Microsoft::Graphics::Display::DisplayInformation>(
this->shim().CreateForDisplayId(
*reinterpret_cast<winrt::Microsoft::UI::DisplayId const*>(
&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<DisplayInformation, IDisplayInformationStatics>(
[&](IDisplayInformationStatics const& f) {
return f.CreateForWindowId(windowId);
});
}
inline auto DisplayInformation::CreateForDisplayId(
winrt::Microsoft::UI::DisplayId const& displayId) {
return impl::call_factory<DisplayInformation, IDisplayInformationStatics>(
[&](IDisplayInformationStatics const& f) {
return f.CreateForDisplayId(displayId);
});
}
}
namespace std {
#ifndef WINRT_LEAN_AND_MEAN
template <>
struct hash<winrt::Microsoft::Graphics::Display::IDisplayAdvancedColorInfo>
: winrt::impl::hash_base {};
template <>
struct hash<winrt::Microsoft::Graphics::Display::IDisplayInformation>
: winrt::impl::hash_base {};
template <>
struct hash<winrt::Microsoft::Graphics::Display::IDisplayInformationStatics>
: winrt::impl::hash_base {};
template <>
struct hash<winrt::Microsoft::Graphics::Display::DisplayAdvancedColorInfo>
: winrt::impl::hash_base {};
template <>
struct hash<winrt::Microsoft::Graphics::Display::DisplayInformation>
: winrt::impl::hash_base {};
#endif
#ifdef __cpp_lib_format
#endif
} // namespace std
#endif