// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_UI_Xaml_Core_Direct_H #define WINRT_Windows_UI_Xaml_Core_Direct_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.UI.Xaml.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.UI.2.h" #include "winrt/impl/Windows.UI.Xaml.2.h" #include "winrt/impl/Windows.UI.Xaml.Media.2.h" #include "winrt/impl/Windows.UI.Xaml.Media.Media3D.2.h" #include "winrt/impl/Windows.UI.Xaml.Core.Direct.2.h" namespace winrt::impl { template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetObject(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetObject(*(void**)(&xamlDirectObject), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetObject(*(void**)(&xamlDirectObject), &result)); } return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetXamlDirectObject(winrt::Windows::Foundation::IInspectable const& object) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetXamlDirectObject(*(void**)(&object), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetXamlDirectObject(*(void**)(&object), &result)); } return winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::CreateInstance(winrt::Windows::UI::Xaml::Core::Direct::XamlTypeIndex const& typeIndex) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateInstance(static_cast(typeIndex), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance(static_cast(typeIndex), &result)); } return winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetObjectProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::Foundation::IInspectable const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetObjectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), *(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetObjectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), *(void**)(&value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetXamlDirectObjectProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetXamlDirectObjectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), *(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetXamlDirectObjectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), *(void**)(&value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetBooleanProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetBooleanProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetBooleanProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), value)); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetDoubleProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, double value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetDoubleProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDoubleProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), value)); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetInt32Property(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, int32_t value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetInt32Property(*(void**)(&xamlDirectObject), static_cast(propertyIndex), value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetInt32Property(*(void**)(&xamlDirectObject), static_cast(propertyIndex), value)); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetStringProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetStringProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), *(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetStringProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), *(void**)(&value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetDateTimeProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::Foundation::DateTime const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetDateTimeProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDateTimeProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetPointProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::Foundation::Point const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPointProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPointProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetRectProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::Foundation::Rect const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetRectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetRectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetSizeProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::Foundation::Size const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetSizeProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetSizeProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetTimeSpanProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetTimeSpanProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetTimeSpanProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetColorProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::UI::Color const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetColorProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetColorProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetCornerRadiusProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::UI::Xaml::CornerRadius const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetCornerRadiusProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetCornerRadiusProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetDurationProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::UI::Xaml::Duration const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetDurationProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDurationProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetGridLengthProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::UI::Xaml::GridLength const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetGridLengthProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetGridLengthProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetThicknessProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::UI::Xaml::Thickness const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetThicknessProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetThicknessProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetMatrixProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::UI::Xaml::Media::Matrix const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetMatrixProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetMatrixProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetMatrix3DProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, winrt::Windows::UI::Xaml::Media::Media3D::Matrix3D const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetMatrix3DProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetMatrix3DProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), impl::bind_in(value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::SetEnumProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex, uint32_t value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetEnumProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetEnumProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), value)); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetObjectProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetObjectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetObjectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetXamlDirectObjectProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetXamlDirectObjectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetXamlDirectObjectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } return winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetBooleanProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetBooleanProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetBooleanProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetDoubleProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { double result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDoubleProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDoubleProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetInt32Property(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { int32_t result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetInt32Property(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetInt32Property(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetStringProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetStringProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetStringProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetDateTimeProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::Foundation::DateTime result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDateTimeProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDateTimeProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetPointProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::Foundation::Point result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetPointProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPointProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetRectProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::Foundation::Rect result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetRectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetRectProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetSizeProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::Foundation::Size result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetSizeProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetSizeProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetTimeSpanProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::Foundation::TimeSpan result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetTimeSpanProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetTimeSpanProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetColorProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::UI::Color result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetColorProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetColorProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetCornerRadiusProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::UI::Xaml::CornerRadius result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetCornerRadiusProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCornerRadiusProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetDurationProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::UI::Xaml::Duration result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDurationProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDurationProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetGridLengthProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::UI::Xaml::GridLength result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetGridLengthProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetGridLengthProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetThicknessProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::UI::Xaml::Thickness result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetThicknessProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetThicknessProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetMatrixProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::UI::Xaml::Media::Matrix result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetMatrixProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetMatrixProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetMatrix3DProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { winrt::Windows::UI::Xaml::Media::Media3D::Matrix3D result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetMatrix3DProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetMatrix3DProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), put_abi(result))); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetEnumProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { uint32_t result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetEnumProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetEnumProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex), &result)); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::ClearProperty(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlPropertyIndex const& propertyIndex) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ClearProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ClearProperty(*(void**)(&xamlDirectObject), static_cast(propertyIndex))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetCollectionCount(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject) const { uint32_t result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetCollectionCount(*(void**)(&xamlDirectObject), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCollectionCount(*(void**)(&xamlDirectObject), &result)); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::GetXamlDirectObjectFromCollectionAt(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, uint32_t index) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetXamlDirectObjectFromCollectionAt(*(void**)(&xamlDirectObject), index, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetXamlDirectObjectFromCollectionAt(*(void**)(&xamlDirectObject), index, &result)); } return winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::AddToCollection(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->AddToCollection(*(void**)(&xamlDirectObject), *(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AddToCollection(*(void**)(&xamlDirectObject), *(void**)(&value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::InsertIntoCollectionAt(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, uint32_t index, winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->InsertIntoCollectionAt(*(void**)(&xamlDirectObject), index, *(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->InsertIntoCollectionAt(*(void**)(&xamlDirectObject), index, *(void**)(&value))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::RemoveFromCollection(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& value) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RemoveFromCollection(*(void**)(&xamlDirectObject), *(void**)(&value), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveFromCollection(*(void**)(&xamlDirectObject), *(void**)(&value), &result)); } return result; } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::RemoveFromCollectionAt(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, uint32_t index) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RemoveFromCollectionAt(*(void**)(&xamlDirectObject), index)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveFromCollectionAt(*(void**)(&xamlDirectObject), index)); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::ClearCollection(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ClearCollection(*(void**)(&xamlDirectObject))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ClearCollection(*(void**)(&xamlDirectObject))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::AddEventHandler(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlEventIndex const& eventIndex, winrt::Windows::Foundation::IInspectable const& handler) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->AddEventHandler(*(void**)(&xamlDirectObject), static_cast(eventIndex), *(void**)(&handler))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AddEventHandler(*(void**)(&xamlDirectObject), static_cast(eventIndex), *(void**)(&handler))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::AddEventHandler(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlEventIndex const& eventIndex, winrt::Windows::Foundation::IInspectable const& handler, bool handledEventsToo) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->AddEventHandler_HandledEventsToo(*(void**)(&xamlDirectObject), static_cast(eventIndex), *(void**)(&handler), handledEventsToo)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AddEventHandler_HandledEventsToo(*(void**)(&xamlDirectObject), static_cast(eventIndex), *(void**)(&handler), handledEventsToo)); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirect::RemoveEventHandler(winrt::Windows::UI::Xaml::Core::Direct::IXamlDirectObject const& xamlDirectObject, winrt::Windows::UI::Xaml::Core::Direct::XamlEventIndex const& eventIndex, winrt::Windows::Foundation::IInspectable const& handler) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RemoveEventHandler(*(void**)(&xamlDirectObject), static_cast(eventIndex), *(void**)(&handler))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveEventHandler(*(void**)(&xamlDirectObject), static_cast(eventIndex), *(void**)(&handler))); } } template auto consume_Windows_UI_Xaml_Core_Direct_IXamlDirectStatics::GetDefault() const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDefault(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefault(&result)); } return winrt::Windows::UI::Xaml::Core::Direct::XamlDirect{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetObject(void* xamlDirectObject, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetObject(*reinterpret_cast(&xamlDirectObject))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetXamlDirectObject(void* object, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetXamlDirectObject(*reinterpret_cast(&object))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateInstance(int32_t typeIndex, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateInstance(*reinterpret_cast(&typeIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetObjectProperty(void* xamlDirectObject, int32_t propertyIndex, void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetObjectProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetXamlDirectObjectProperty(void* xamlDirectObject, int32_t propertyIndex, void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetXamlDirectObjectProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetBooleanProperty(void* xamlDirectObject, int32_t propertyIndex, bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetBooleanProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDoubleProperty(void* xamlDirectObject, int32_t propertyIndex, double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetDoubleProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetInt32Property(void* xamlDirectObject, int32_t propertyIndex, int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetInt32Property(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetStringProperty(void* xamlDirectObject, int32_t propertyIndex, void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetStringProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDateTimeProperty(void* xamlDirectObject, int32_t propertyIndex, int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetDateTimeProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPointProperty(void* xamlDirectObject, int32_t propertyIndex, winrt::Windows::Foundation::Point value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPointProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetRectProperty(void* xamlDirectObject, int32_t propertyIndex, winrt::Windows::Foundation::Rect value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetRectProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetSizeProperty(void* xamlDirectObject, int32_t propertyIndex, winrt::Windows::Foundation::Size value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetSizeProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetTimeSpanProperty(void* xamlDirectObject, int32_t propertyIndex, int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetTimeSpanProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetColorProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Color value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetColorProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetCornerRadiusProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_CornerRadius value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetCornerRadiusProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDurationProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_Duration value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetDurationProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetGridLengthProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_GridLength value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetGridLengthProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetThicknessProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_Thickness value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetThicknessProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetMatrixProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_Media_Matrix value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetMatrixProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetMatrix3DProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_Media_Media3D_Matrix3D value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetMatrix3DProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetEnumProperty(void* xamlDirectObject, int32_t propertyIndex, uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetEnumProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex), value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetObjectProperty(void* xamlDirectObject, int32_t propertyIndex, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetObjectProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetXamlDirectObjectProperty(void* xamlDirectObject, int32_t propertyIndex, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetXamlDirectObjectProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetBooleanProperty(void* xamlDirectObject, int32_t propertyIndex, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetBooleanProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDoubleProperty(void* xamlDirectObject, int32_t propertyIndex, double* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDoubleProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetInt32Property(void* xamlDirectObject, int32_t propertyIndex, int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetInt32Property(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetStringProperty(void* xamlDirectObject, int32_t propertyIndex, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetStringProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDateTimeProperty(void* xamlDirectObject, int32_t propertyIndex, int64_t* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDateTimeProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPointProperty(void* xamlDirectObject, int32_t propertyIndex, winrt::Windows::Foundation::Point* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetPointProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetRectProperty(void* xamlDirectObject, int32_t propertyIndex, winrt::Windows::Foundation::Rect* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetRectProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetSizeProperty(void* xamlDirectObject, int32_t propertyIndex, winrt::Windows::Foundation::Size* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetSizeProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetTimeSpanProperty(void* xamlDirectObject, int32_t propertyIndex, int64_t* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetTimeSpanProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetColorProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Color* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetColorProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCornerRadiusProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_CornerRadius* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetCornerRadiusProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDurationProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_Duration* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDurationProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetGridLengthProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_GridLength* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetGridLengthProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetThicknessProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_Thickness* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetThicknessProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetMatrixProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_Media_Matrix* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetMatrixProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetMatrix3DProperty(void* xamlDirectObject, int32_t propertyIndex, struct struct_Windows_UI_Xaml_Media_Media3D_Matrix3D* result) noexcept final try { zero_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetMatrix3DProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetEnumProperty(void* xamlDirectObject, int32_t propertyIndex, uint32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetEnumProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ClearProperty(void* xamlDirectObject, int32_t propertyIndex) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClearProperty(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&propertyIndex)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCollectionCount(void* xamlDirectObject, uint32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetCollectionCount(*reinterpret_cast(&xamlDirectObject))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetXamlDirectObjectFromCollectionAt(void* xamlDirectObject, uint32_t index, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetXamlDirectObjectFromCollectionAt(*reinterpret_cast(&xamlDirectObject), index)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AddToCollection(void* xamlDirectObject, void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AddToCollection(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall InsertIntoCollectionAt(void* xamlDirectObject, uint32_t index, void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InsertIntoCollectionAt(*reinterpret_cast(&xamlDirectObject), index, *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveFromCollection(void* xamlDirectObject, void* value, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().RemoveFromCollection(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveFromCollectionAt(void* xamlDirectObject, uint32_t index) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RemoveFromCollectionAt(*reinterpret_cast(&xamlDirectObject), index); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ClearCollection(void* xamlDirectObject) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClearCollection(*reinterpret_cast(&xamlDirectObject)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AddEventHandler(void* xamlDirectObject, int32_t eventIndex, void* handler) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AddEventHandler(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&eventIndex), *reinterpret_cast(&handler)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall AddEventHandler_HandledEventsToo(void* xamlDirectObject, int32_t eventIndex, void* handler, bool handledEventsToo) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AddEventHandler(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&eventIndex), *reinterpret_cast(&handler), handledEventsToo); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveEventHandler(void* xamlDirectObject, int32_t eventIndex, void* handler) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RemoveEventHandler(*reinterpret_cast(&xamlDirectObject), *reinterpret_cast(&eventIndex), *reinterpret_cast(&handler)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::UI::Xaml::Core::Direct { inline auto XamlDirect::GetDefault() { return impl::call_factory_cast([](IXamlDirectStatics const& f) { return f.GetDefault(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif