Update WinRT to new version 2.0.250303.1

PiperOrigin-RevId: 781075193
This commit is contained in:
Guogang Li
2025-07-09 08:58:00 -07:00
committed by Copybara-Service
parent 5e558cffc4
commit 8f14bd10fc
1395 changed files with 498490 additions and 61973 deletions
@@ -1,11 +1,11 @@
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.220531.1
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1
#pragma once
#ifndef WINRT_Windows_UI_Xaml_Interop_H
#define WINRT_Windows_UI_Xaml_Interop_H
#include "winrt/base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.220531.1"), "Mismatched C++/WinRT headers.");
#define CPPWINRT_VERSION "2.0.220531.1"
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.Xaml.Interop.2.h"
@@ -14,31 +14,91 @@ namespace winrt::impl
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableIterable<D>::First() const
{
void* result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableIterable)->First(&result));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableIterable>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableIterable, 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::Windows::UI::Xaml::Interop::IBindableIterable>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->First(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableIterable>**)this;
check_hresult(_winrt_abi_type->First(&result));
}
return winrt::Windows::UI::Xaml::Interop::IBindableIterator{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableIterator<D>::Current() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableIterator)->get_Current(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableIterator>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableIterator, 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::Windows::UI::Xaml::Interop::IBindableIterator>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Current(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableIterator>**)this;
check_hresult(_winrt_abi_type->get_Current(&value));
}
return winrt::Windows::Foundation::IInspectable{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableIterator<D>::HasCurrent() const
{
bool value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableIterator)->get_HasCurrent(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableIterator>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableIterator, 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::Windows::UI::Xaml::Interop::IBindableIterator>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_HasCurrent(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableIterator>**)this;
check_hresult(_winrt_abi_type->get_HasCurrent(&value));
}
return value;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableIterator<D>::MoveNext() const
{
bool result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableIterator)->MoveNext(&result));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableIterator>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableIterator, 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::Windows::UI::Xaml::Interop::IBindableIterator>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->MoveNext(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableIterator>**)this;
check_hresult(_winrt_abi_type->MoveNext(&result));
}
return result;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableObservableVector<D>::VectorChanged(winrt::Windows::UI::Xaml::Interop::BindableVectorChangedEventHandler const& handler) const
{
winrt::event_token token{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableObservableVector)->add_VectorChanged(*(void**)(&handler), put_abi(token)));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableObservableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableObservableVector, 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::Windows::UI::Xaml::Interop::IBindableObservableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->add_VectorChanged(*(void**)(&handler), put_abi(token)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableObservableVector>**)this;
check_hresult(_winrt_abi_type->add_VectorChanged(*(void**)(&handler), put_abi(token)));
}
return token;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableObservableVector<D>::VectorChanged(auto_revoke_t, winrt::Windows::UI::Xaml::Interop::BindableVectorChangedEventHandler const& handler) const
@@ -47,78 +107,258 @@ namespace winrt::impl
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableObservableVector<D>::VectorChanged(winrt::event_token const& token) const noexcept
{
WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableObservableVector)->remove_VectorChanged(impl::bind_in(token));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableObservableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableObservableVector, 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::Windows::UI::Xaml::Interop::IBindableObservableVector>**)&_winrt_casted_result;
_winrt_abi_type->remove_VectorChanged(impl::bind_in(token));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableObservableVector>**)this;
_winrt_abi_type->remove_VectorChanged(impl::bind_in(token));
}
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::GetAt(uint32_t index) const
{
void* result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->GetAt(index, &result));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetAt(index, &result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->GetAt(index, &result));
}
return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::Size() const
{
uint32_t value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->get_Size(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Size(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->get_Size(&value));
}
return value;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::GetView() const
{
void* result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->GetView(&result));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetView(&result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->GetView(&result));
}
return winrt::Windows::UI::Xaml::Interop::IBindableVectorView{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::IndexOf(winrt::Windows::Foundation::IInspectable const& value, uint32_t& index) const
{
bool returnValue{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->IndexOf(*(void**)(&value), &index, &returnValue));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->IndexOf(*(void**)(&value), &index, &returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->IndexOf(*(void**)(&value), &index, &returnValue));
}
return returnValue;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::SetAt(uint32_t index, winrt::Windows::Foundation::IInspectable const& value) const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->SetAt(index, *(void**)(&value)));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->SetAt(index, *(void**)(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->SetAt(index, *(void**)(&value)));
}
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::InsertAt(uint32_t index, winrt::Windows::Foundation::IInspectable const& value) const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->InsertAt(index, *(void**)(&value)));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->InsertAt(index, *(void**)(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->InsertAt(index, *(void**)(&value)));
}
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::RemoveAt(uint32_t index) const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->RemoveAt(index));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RemoveAt(index));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->RemoveAt(index));
}
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::Append(winrt::Windows::Foundation::IInspectable const& value) const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->Append(*(void**)(&value)));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->Append(*(void**)(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->Append(*(void**)(&value)));
}
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::RemoveAtEnd() const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->RemoveAtEnd());
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->RemoveAtEnd());
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->RemoveAtEnd());
}
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVector<D>::Clear() const
{
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVector)->Clear());
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVector>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVector, 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::Windows::UI::Xaml::Interop::IBindableVector>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->Clear());
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVector>**)this;
check_hresult(_winrt_abi_type->Clear());
}
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVectorView<D>::GetAt(uint32_t index) const
{
void* result{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVectorView)->GetAt(index, &result));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVectorView>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVectorView, 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::Windows::UI::Xaml::Interop::IBindableVectorView>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->GetAt(index, &result));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVectorView>**)this;
check_hresult(_winrt_abi_type->GetAt(index, &result));
}
return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVectorView<D>::Size() const
{
uint32_t value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVectorView)->get_Size(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVectorView>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVectorView, 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::Windows::UI::Xaml::Interop::IBindableVectorView>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Size(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVectorView>**)this;
check_hresult(_winrt_abi_type->get_Size(&value));
}
return value;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_IBindableVectorView<D>::IndexOf(winrt::Windows::Foundation::IInspectable const& value, uint32_t& index) const
{
bool returnValue{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::IBindableVectorView)->IndexOf(*(void**)(&value), &index, &returnValue));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::IBindableVectorView>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::IBindableVectorView, 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::Windows::UI::Xaml::Interop::IBindableVectorView>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->IndexOf(*(void**)(&value), &index, &returnValue));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::IBindableVectorView>**)this;
check_hresult(_winrt_abi_type->IndexOf(*(void**)(&value), &index, &returnValue));
}
return returnValue;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChanged<D>::CollectionChanged(winrt::Windows::UI::Xaml::Interop::NotifyCollectionChangedEventHandler const& handler) const
{
winrt::event_token token{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::INotifyCollectionChanged)->add_CollectionChanged(*(void**)(&handler), put_abi(token)));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::INotifyCollectionChanged>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChanged, 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::Windows::UI::Xaml::Interop::INotifyCollectionChanged>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->add_CollectionChanged(*(void**)(&handler), put_abi(token)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChanged>**)this;
check_hresult(_winrt_abi_type->add_CollectionChanged(*(void**)(&handler), put_abi(token)));
}
return token;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChanged<D>::CollectionChanged(auto_revoke_t, winrt::Windows::UI::Xaml::Interop::NotifyCollectionChangedEventHandler const& handler) const
@@ -127,42 +367,126 @@ namespace winrt::impl
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChanged<D>::CollectionChanged(winrt::event_token const& token) const noexcept
{
WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::INotifyCollectionChanged)->remove_CollectionChanged(impl::bind_in(token));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::INotifyCollectionChanged>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChanged, 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::Windows::UI::Xaml::Interop::INotifyCollectionChanged>**)&_winrt_casted_result;
_winrt_abi_type->remove_CollectionChanged(impl::bind_in(token));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChanged>**)this;
_winrt_abi_type->remove_CollectionChanged(impl::bind_in(token));
}
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChangedEventArgs<D>::Action() const
{
winrt::Windows::UI::Xaml::Interop::NotifyCollectionChangedAction value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs)->get_Action(reinterpret_cast<int32_t*>(&value)));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs, 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::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_Action(reinterpret_cast<int32_t*>(&value)));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_Action(reinterpret_cast<int32_t*>(&value)));
}
return value;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChangedEventArgs<D>::NewItems() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs)->get_NewItems(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs, 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::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_NewItems(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_NewItems(&value));
}
return winrt::Windows::UI::Xaml::Interop::IBindableVector{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChangedEventArgs<D>::OldItems() const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs)->get_OldItems(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs, 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::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_OldItems(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_OldItems(&value));
}
return winrt::Windows::UI::Xaml::Interop::IBindableVector{ value, take_ownership_from_abi };
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChangedEventArgs<D>::NewStartingIndex() const
{
int32_t value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs)->get_NewStartingIndex(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs, 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::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_NewStartingIndex(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_NewStartingIndex(&value));
}
return value;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChangedEventArgs<D>::OldStartingIndex() const
{
int32_t value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs)->get_OldStartingIndex(&value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs, 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::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->get_OldStartingIndex(&value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgs>**)this;
check_hresult(_winrt_abi_type->get_OldStartingIndex(&value));
}
return value;
}
template <typename D> auto consume_Windows_UI_Xaml_Interop_INotifyCollectionChangedEventArgsFactory<D>::CreateInstanceWithAllParameters(winrt::Windows::UI::Xaml::Interop::NotifyCollectionChangedAction const& action, winrt::Windows::UI::Xaml::Interop::IBindableVector const& newItems, winrt::Windows::UI::Xaml::Interop::IBindableVector const& oldItems, int32_t newIndex, int32_t oldIndex, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const
{
void* value{};
check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgsFactory)->CreateInstanceWithAllParameters(static_cast<int32_t>(action), *(void**)(&newItems), *(void**)(&oldItems), newIndex, oldIndex, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
if constexpr (!std::is_same_v<D, winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgsFactory>)
{
winrt::hresult _winrt_cast_result_code;
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgsFactory, 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::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgsFactory>**)&_winrt_casted_result;
check_hresult(_winrt_abi_type->CreateInstanceWithAllParameters(static_cast<int32_t>(action), *(void**)(&newItems), *(void**)(&oldItems), newIndex, oldIndex, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
}
else
{
auto const _winrt_abi_type = *(abi_t<winrt::Windows::UI::Xaml::Interop::INotifyCollectionChangedEventArgsFactory>**)this;
check_hresult(_winrt_abi_type->CreateInstanceWithAllParameters(static_cast<int32_t>(action), *(void**)(&newItems), *(void**)(&oldItems), newIndex, oldIndex, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value));
}
return winrt::Windows::UI::Xaml::Interop::NotifyCollectionChangedEventArgs{ value, take_ownership_from_abi };
}
template <typename H> struct delegate<winrt::Windows::UI::Xaml::Interop::BindableVectorChangedEventHandler, H> final : implements_delegate<winrt::Windows::UI::Xaml::Interop::BindableVectorChangedEventHandler, H>
@@ -447,8 +771,22 @@ WINRT_EXPORT namespace winrt::Windows::UI::Xaml::Interop
BindableVectorChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
{
}
template <typename O, typename M> BindableVectorChangedEventHandler::BindableVectorChangedEventHandler(weak_ref<O>&& object, M method) :
BindableVectorChangedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } })
template <typename O, typename LM> BindableVectorChangedEventHandler::BindableVectorChangedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
BindableVectorChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
else lm(args...);
} })
{
}
template <typename O, typename M> BindableVectorChangedEventHandler::BindableVectorChangedEventHandler(std::shared_ptr<O>&& object, M method) :
BindableVectorChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
{
}
template <typename O, typename LM> BindableVectorChangedEventHandler::BindableVectorChangedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
BindableVectorChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
else lm(args...);
} })
{
}
inline auto BindableVectorChangedEventHandler::operator()(winrt::Windows::UI::Xaml::Interop::IBindableObservableVector const& vector, winrt::Windows::Foundation::IInspectable const& e) const
@@ -471,8 +809,22 @@ WINRT_EXPORT namespace winrt::Windows::UI::Xaml::Interop
NotifyCollectionChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
{
}
template <typename O, typename M> NotifyCollectionChangedEventHandler::NotifyCollectionChangedEventHandler(weak_ref<O>&& object, M method) :
NotifyCollectionChangedEventHandler([o = std::move(object), method](auto&&... args) { if (auto s = o.get()) { ((*s).*(method))(args...); } })
template <typename O, typename LM> NotifyCollectionChangedEventHandler::NotifyCollectionChangedEventHandler(weak_ref<O>&& object, LM&& lambda_or_method) :
NotifyCollectionChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.get()) {
if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
else lm(args...);
} })
{
}
template <typename O, typename M> NotifyCollectionChangedEventHandler::NotifyCollectionChangedEventHandler(std::shared_ptr<O>&& object, M method) :
NotifyCollectionChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); })
{
}
template <typename O, typename LM> NotifyCollectionChangedEventHandler::NotifyCollectionChangedEventHandler(std::weak_ptr<O>&& object, LM&& lambda_or_method) :
NotifyCollectionChangedEventHandler([o = std::move(object), lm = std::forward<LM>(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) {
if constexpr (std::is_member_function_pointer_v<LM>) ((*s).*(lm))(args...);
else lm(args...);
} })
{
}
inline auto NotifyCollectionChangedEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Windows::UI::Xaml::Interop::NotifyCollectionChangedEventArgs const& e) const