// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Microsoft_Windows_AI_Imaging_H #define WINRT_Microsoft_Windows_AI_Imaging_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/Microsoft.Windows.AI.h" #include "winrt/impl/Microsoft.Graphics.Imaging.2.h" #include "winrt/impl/Microsoft.Windows.AI.2.h" #include "winrt/impl/Microsoft.Windows.AI.ContentSafety.2.h" #include "winrt/impl/Microsoft.Windows.AI.Imaging.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Graphics.2.h" #include "winrt/impl/Windows.Graphics.Imaging.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_AI_Imaging_IImageDescriptionGenerator:: DescribeAsync( winrt::Microsoft::Graphics::Imaging::ImageBuffer const& image, winrt::Microsoft::Windows::AI::Imaging::ImageDescriptionKind const& kind, winrt::Microsoft::Windows::AI::ContentSafety:: ContentFilterOptions const& contentFilterOptions) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageDescriptionGenerator, D const*>(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->DescribeAsync( *(void**)(&image), static_cast(kind), *(void**)(&contentFilterOptions), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->DescribeAsync( *(void**)(&image), static_cast(kind), *(void**)(&contentFilterOptions), &operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::Imaging::ImageDescriptionResult, hstring>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageDescriptionGeneratorStatics< D>::GetReadyState() const { winrt::Microsoft::Windows::AI::AIFeatureReadyState 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->GetReadyState(reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->GetReadyState(reinterpret_cast(&result))); } return result; } template auto consume_Microsoft_Windows_AI_Imaging_IImageDescriptionGeneratorStatics< D>::EnsureReadyAsync() const { void* operation{}; 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->EnsureReadyAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EnsureReadyAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageDescriptionGeneratorStatics< D>::CreateAsync() const { void* operation{}; 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->CreateAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::ImageDescriptionGenerator>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageDescriptionResult< D>::Description() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageDescriptionResult, D const*>(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->get_Description(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Description(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageDescriptionResult::Status() const { winrt::Microsoft::Windows::AI::Imaging::ImageDescriptionResultStatus value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageDescriptionResult, D const*>(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->get_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractor:: GetSoftwareBitmapObjectMask( winrt::Microsoft::Windows::AI::Imaging::ImageObjectExtractorHint const& hint) 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< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractor, D const*>(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->GetSoftwareBitmapObjectMask(*(void**)(&hint), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetSoftwareBitmapObjectMask(*(void**)(&hint), &result)); } return winrt::Windows::Graphics::Imaging::SoftwareBitmap{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractor:: GetImageBufferObjectMask( winrt::Microsoft::Windows::AI::Imaging::ImageObjectExtractorHint const& hint) 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< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractor, D const*>(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->GetImageBufferObjectMask(*(void**)(&hint), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->GetImageBufferObjectMask(*(void**)(&hint), &result)); } return winrt::Microsoft::Graphics::Imaging::ImageBuffer{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractorHint< D>::IncludeRects() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorHint, D const*>(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->get_IncludeRects(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IncludeRects(&value)); } return winrt::Windows::Foundation::Collections::IVectorView< winrt::Windows::Graphics::RectInt32>{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractorHint< D>::IncludePoints() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorHint, D const*>(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->get_IncludePoints(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IncludePoints(&value)); } return winrt::Windows::Foundation::Collections::IVectorView< winrt::Windows::Graphics::PointInt32>{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractorHint< D>::ExcludePoints() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorHint, D const*>(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->get_ExcludePoints(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExcludePoints(&value)); } return winrt::Windows::Foundation::Collections::IVectorView< winrt::Windows::Graphics::PointInt32>{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractorHintFactory:: CreateInstance( param::vector const& includeRects, param::vector const& includePoints, param::vector const& excludePoints) const { void* value{}; 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( *(void**)(&includeRects), *(void**)(&includePoints), *(void**)(&excludePoints), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateInstance( *(void**)(&includeRects), *(void**)(&includePoints), *(void**)(&excludePoints), &value)); } return winrt::Microsoft::Windows::AI::Imaging::ImageObjectExtractorHint{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractorStatics:: CreateWithSoftwareBitmapAsync( winrt::Windows::Graphics::Imaging::SoftwareBitmap const& softwareBitmap) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorStatics, D const*>(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->CreateWithSoftwareBitmapAsync( *(void**)(&softwareBitmap), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithSoftwareBitmapAsync( *(void**)(&softwareBitmap), &operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::ImageObjectExtractor>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractorStatics:: CreateWithImageBufferAsync( winrt::Microsoft::Graphics::Imaging::ImageBuffer const& imageBuffer) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorStatics, D const*>(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->CreateWithImageBufferAsync( *(void**)(&imageBuffer), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithImageBufferAsync( *(void**)(&imageBuffer), &operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::ImageObjectExtractor>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractorStatics< D>::GetReadyState() const { winrt::Microsoft::Windows::AI::AIFeatureReadyState result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorStatics, D const*>(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->GetReadyState(reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->GetReadyState(reinterpret_cast(&result))); } return result; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectExtractorStatics< D>::EnsureReadyAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorStatics, D const*>(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->EnsureReadyAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EnsureReadyAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectRemover:: RemoveFromSoftwareBitmap( winrt::Windows::Graphics::Imaging::SoftwareBitmap const& softwareBitmap, winrt::Windows::Graphics::Imaging::SoftwareBitmap const& softwareBitmapMask) 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< winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemover, D const*>( 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->RemoveFromSoftwareBitmap( *(void**)(&softwareBitmap), *(void**)(&softwareBitmapMask), &result)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemover>**)this; check_hresult(_winrt_abi_type->RemoveFromSoftwareBitmap( *(void**)(&softwareBitmap), *(void**)(&softwareBitmapMask), &result)); } return winrt::Windows::Graphics::Imaging::SoftwareBitmap{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectRemover:: RemoveFromImageBuffer( winrt::Microsoft::Graphics::Imaging::ImageBuffer const& imageBuffer, winrt::Microsoft::Graphics::Imaging::ImageBuffer const& imageBufferMask) 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< winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemover, D const*>( 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->RemoveFromImageBuffer( *(void**)(&imageBuffer), *(void**)(&imageBufferMask), &result)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemover>**)this; check_hresult(_winrt_abi_type->RemoveFromImageBuffer( *(void**)(&imageBuffer), *(void**)(&imageBufferMask), &result)); } return winrt::Microsoft::Graphics::Imaging::ImageBuffer{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectRemoverStatics< D>::GetReadyState() const { winrt::Microsoft::Windows::AI::AIFeatureReadyState result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemoverStatics, D const*>(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->GetReadyState(reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->GetReadyState(reinterpret_cast(&result))); } return result; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectRemoverStatics< D>::EnsureReadyAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemoverStatics, D const*>(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->EnsureReadyAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EnsureReadyAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageObjectRemoverStatics< D>::CreateAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemoverStatics, D const*>(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->CreateAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::ImageObjectRemover>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageScaler::ScaleSoftwareBitmap( winrt::Windows::Graphics::Imaging::SoftwareBitmap const& softwareBitmap, int32_t width, int32_t height) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IImageScaler>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageScaler, D const*>( 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->ScaleSoftwareBitmap( *(void**)(&softwareBitmap), width, height, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ScaleSoftwareBitmap( *(void**)(&softwareBitmap), width, height, &result)); } return winrt::Windows::Graphics::Imaging::SoftwareBitmap{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageScaler::ScaleImageBuffer( winrt::Microsoft::Graphics::Imaging::ImageBuffer const& imageBuffer, int32_t width, int32_t height) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IImageScaler>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageScaler, D const*>( 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->ScaleImageBuffer(*(void**)(&imageBuffer), width, height, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ScaleImageBuffer(*(void**)(&imageBuffer), width, height, &result)); } return winrt::Microsoft::Graphics::Imaging::ImageBuffer{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageScaler< D>::MaxSupportedScaleFactor() const { int32_t value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IImageScaler>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageScaler, D const*>( 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->get_MaxSupportedScaleFactor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxSupportedScaleFactor(&value)); } return value; } template auto consume_Microsoft_Windows_AI_Imaging_IImageScalerStatics< D>::GetReadyState() const { winrt::Microsoft::Windows::AI::AIFeatureReadyState result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageScalerStatics, D const*>( 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->GetReadyState(reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::AI::Imaging::IImageScalerStatics>**)this; check_hresult( _winrt_abi_type->GetReadyState(reinterpret_cast(&result))); } return result; } template auto consume_Microsoft_Windows_AI_Imaging_IImageScalerStatics< D>::EnsureReadyAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageScalerStatics, D const*>( 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->EnsureReadyAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::AI::Imaging::IImageScalerStatics>**)this; check_hresult(_winrt_abi_type->EnsureReadyAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IImageScalerStatics::CreateAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IImageScalerStatics, D const*>( 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->CreateAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t< winrt::Microsoft::Windows::AI::Imaging::IImageScalerStatics>**)this; check_hresult(_winrt_abi_type->CreateAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::ImageScaler>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedLine::Text() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine, D const*>( 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->get_Text(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Text(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedLine::BoundingBox() const { winrt::Microsoft::Windows::AI::Imaging::RecognizedTextBoundingBox value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine, D const*>( 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->get_BoundingBox(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BoundingBox(put_abi(value))); } return value; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedLine::Words() const { uint32_t value_impl_size{}; void** value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine, D const*>( 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->get_Words(&value_impl_size, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Words(&value_impl_size, &value)); } return com_array{ value, value_impl_size, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedLine::Style() const { winrt::Microsoft::Windows::AI::Imaging::RecognizedLineStyle value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine, D const*>( 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->get_Style(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->get_Style(reinterpret_cast(&value))); } return value; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedLine< D>::LineStyleConfidence() const { float value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedLine, D const*>( 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->get_LineStyleConfidence(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LineStyleConfidence(&value)); } return value; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedText::Lines() const { uint32_t value_impl_size{}; void** value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedText>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedText, D const*>( 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->get_Lines(&value_impl_size, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Lines(&value_impl_size, &value)); } return com_array{ value, value_impl_size, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedText::TextAngle() const { float value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedText>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedText, D const*>( 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->get_TextAngle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TextAngle(&value)); } return value; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedWord::Text() const { void* value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedWord>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedWord, D const*>( 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->get_Text(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Text(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedWord::BoundingBox() const { winrt::Microsoft::Windows::AI::Imaging::RecognizedTextBoundingBox value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedWord>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedWord, D const*>( 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->get_BoundingBox(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BoundingBox(put_abi(value))); } return value; } template auto consume_Microsoft_Windows_AI_Imaging_IRecognizedWord::MatchConfidence() const { float value{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::IRecognizedWord>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::IRecognizedWord, D const*>( 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->get_MatchConfidence(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MatchConfidence(&value)); } return value; } template auto consume_Microsoft_Windows_AI_Imaging_ITextRecognizer:: RecognizeTextFromImageAsync( winrt::Microsoft::Graphics::Imaging::ImageBuffer const& imageBuffer) const { void* operation{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::ITextRecognizer>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::ITextRecognizer, D const*>( 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->RecognizeTextFromImageAsync( *(void**)(&imageBuffer), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RecognizeTextFromImageAsync( *(void**)(&imageBuffer), &operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::RecognizedText>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_ITextRecognizer:: RecognizeTextFromImage( winrt::Microsoft::Graphics::Imaging::ImageBuffer const& imageBuffer) const { void* result{}; if constexpr (!std::is_same_v< D, winrt::Microsoft::Windows::AI::Imaging::ITextRecognizer>) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::ITextRecognizer, D const*>( 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->RecognizeTextFromImage( *(void**)(&imageBuffer), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RecognizeTextFromImage( *(void**)(&imageBuffer), &result)); } return winrt::Microsoft::Windows::AI::Imaging::RecognizedText{ result, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_ITextRecognizerStatics< D>::GetReadyState() const { winrt::Microsoft::Windows::AI::AIFeatureReadyState result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::ITextRecognizerStatics, D const*>(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->GetReadyState(reinterpret_cast(&result))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->GetReadyState(reinterpret_cast(&result))); } return result; } template auto consume_Microsoft_Windows_AI_Imaging_ITextRecognizerStatics< D>::EnsureReadyAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::ITextRecognizerStatics, D const*>(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->EnsureReadyAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->EnsureReadyAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double>{ operation, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_AI_Imaging_ITextRecognizerStatics< D>::CreateAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::AI::Imaging::ITextRecognizerStatics, D const*>(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->CreateAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::TextRecognizer>{ operation, take_ownership_from_abi}; } #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::Imaging::IImageDescriptionGenerator> : produce_base< D, winrt::Microsoft::Windows::AI::Imaging::IImageDescriptionGenerator> { int32_t __stdcall DescribeAsync(void* image, int32_t kind, void* contentFilterOptions, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().DescribeAsync( *reinterpret_cast< winrt::Microsoft::Graphics::Imaging::ImageBuffer const*>( &image), *reinterpret_cast(&kind), *reinterpret_cast( &contentFilterOptions))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::Imaging::IImageDescriptionGeneratorStatics> : produce_base { int32_t __stdcall GetReadyState(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetReadyState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnsureReadyAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().EnsureReadyAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().CreateAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::AI::Imaging::IImageDescriptionResult> { int32_t __stdcall get_Description(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Description()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::Imaging::ImageDescriptionResultStatus>( this->shim().Status()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractor> { int32_t __stdcall GetSoftwareBitmapObjectMask(void* hint, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetSoftwareBitmapObjectMask( *reinterpret_cast(&hint))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetImageBufferObjectMask(void* hint, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetImageBufferObjectMask( *reinterpret_cast(&hint))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorHint> : produce_base< D, winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorHint> { int32_t __stdcall get_IncludeRects(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().IncludeRects()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IncludePoints(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().IncludePoints()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExcludePoints(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ExcludePoints()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorHintFactory> : produce_base { int32_t __stdcall CreateInstance(void* includeRects, void* includePoints, void* excludePoints, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::Imaging::ImageObjectExtractorHint>( this->shim().CreateInstance( *reinterpret_cast const*>(&includeRects), *reinterpret_cast const*>(&includePoints), *reinterpret_cast const*>(&excludePoints))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorStatics> : produce_base { int32_t __stdcall CreateWithSoftwareBitmapAsync( void* softwareBitmap, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().CreateWithSoftwareBitmapAsync( *reinterpret_cast< winrt::Windows::Graphics::Imaging::SoftwareBitmap const*>( &softwareBitmap))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithImageBufferAsync(void* imageBuffer, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().CreateWithImageBufferAsync( *reinterpret_cast< winrt::Microsoft::Graphics::Imaging::ImageBuffer const*>( &imageBuffer))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetReadyState(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetReadyState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnsureReadyAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().EnsureReadyAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemover> { int32_t __stdcall RemoveFromSoftwareBitmap(void* softwareBitmap, void* softwareBitmapMask, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().RemoveFromSoftwareBitmap( *reinterpret_cast< winrt::Windows::Graphics::Imaging::SoftwareBitmap const*>( &softwareBitmap), *reinterpret_cast< winrt::Windows::Graphics::Imaging::SoftwareBitmap const*>( &softwareBitmapMask))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveFromImageBuffer(void* imageBuffer, void* imageBufferMask, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().RemoveFromImageBuffer( *reinterpret_cast< winrt::Microsoft::Graphics::Imaging::ImageBuffer const*>( &imageBuffer), *reinterpret_cast< winrt::Microsoft::Graphics::Imaging::ImageBuffer const*>( &imageBufferMask))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemoverStatics> : produce_base< D, winrt::Microsoft::Windows::AI::Imaging::IImageObjectRemoverStatics> { int32_t __stdcall GetReadyState(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetReadyState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnsureReadyAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().EnsureReadyAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().CreateAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ScaleSoftwareBitmap(void* softwareBitmap, int32_t width, int32_t height, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().ScaleSoftwareBitmap( *reinterpret_cast< winrt::Windows::Graphics::Imaging::SoftwareBitmap const*>( &softwareBitmap), width, height)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ScaleImageBuffer(void* imageBuffer, int32_t width, int32_t height, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().ScaleImageBuffer( *reinterpret_cast< winrt::Microsoft::Graphics::Imaging::ImageBuffer const*>( &imageBuffer), width, height)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxSupportedScaleFactor(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxSupportedScaleFactor()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::AI::Imaging::IImageScalerStatics> { int32_t __stdcall GetReadyState(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetReadyState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnsureReadyAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().EnsureReadyAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().CreateAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Text(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Text()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BoundingBox( struct struct_Microsoft_Windows_AI_Imaging_RecognizedTextBoundingBox* value) noexcept final try { zero_abi( value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::Imaging::RecognizedTextBoundingBox>( this->shim().BoundingBox()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Words(uint32_t* __valueSize, void*** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); std::tie(*__valueSize, *value) = detach_abi(this->shim().Words()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Style(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::Imaging::RecognizedLineStyle>( this->shim().Style()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LineStyleConfidence(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LineStyleConfidence()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Lines(uint32_t* __valueSize, void*** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); std::tie(*__valueSize, *value) = detach_abi(this->shim().Lines()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TextAngle(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TextAngle()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Text(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Text()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BoundingBox( struct struct_Microsoft_Windows_AI_Imaging_RecognizedTextBoundingBox* value) noexcept final try { zero_abi( value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Microsoft::Windows::AI::Imaging::RecognizedTextBoundingBox>( this->shim().BoundingBox()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MatchConfidence(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MatchConfidence()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RecognizeTextFromImageAsync(void* imageBuffer, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().RecognizeTextFromImageAsync( *reinterpret_cast< winrt::Microsoft::Graphics::Imaging::ImageBuffer const*>( &imageBuffer))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RecognizeTextFromImage(void* imageBuffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().RecognizeTextFromImage( *reinterpret_cast< winrt::Microsoft::Graphics::Imaging::ImageBuffer const*>( &imageBuffer))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base< D, winrt::Microsoft::Windows::AI::Imaging::ITextRecognizerStatics> { int32_t __stdcall GetReadyState(int32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from( this->shim().GetReadyState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall EnsureReadyAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().EnsureReadyAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>( this->shim().CreateAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif } // namespace winrt::impl WINRT_EXPORT namespace winrt::Microsoft::Windows::AI::Imaging { inline auto ImageDescriptionGenerator::GetReadyState() { return impl::call_factory_cast< winrt::Microsoft::Windows::AI::AIFeatureReadyState (*)( IImageDescriptionGeneratorStatics const&), ImageDescriptionGenerator, IImageDescriptionGeneratorStatics>( [](IImageDescriptionGeneratorStatics const& f) { return f.GetReadyState(); }); } inline auto ImageDescriptionGenerator::EnsureReadyAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double> (*)( IImageDescriptionGeneratorStatics const&), ImageDescriptionGenerator, IImageDescriptionGeneratorStatics>( [](IImageDescriptionGeneratorStatics const& f) { return f.EnsureReadyAsync(); }); } inline auto ImageDescriptionGenerator::CreateAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging:: ImageDescriptionGenerator> (*)( IImageDescriptionGeneratorStatics const&), ImageDescriptionGenerator, IImageDescriptionGeneratorStatics>( [](IImageDescriptionGeneratorStatics const& f) { return f.CreateAsync(); }); } inline auto ImageObjectExtractor::CreateWithSoftwareBitmapAsync( winrt::Windows::Graphics::Imaging::SoftwareBitmap const& softwareBitmap) { return impl::call_factory( [&](IImageObjectExtractorStatics const& f) { return f.CreateWithSoftwareBitmapAsync(softwareBitmap); }); } inline auto ImageObjectExtractor::CreateWithImageBufferAsync( winrt::Microsoft::Graphics::Imaging::ImageBuffer const& imageBuffer) { return impl::call_factory( [&](IImageObjectExtractorStatics const& f) { return f.CreateWithImageBufferAsync(imageBuffer); }); } inline auto ImageObjectExtractor::GetReadyState() { return impl::call_factory_cast< winrt::Microsoft::Windows::AI::AIFeatureReadyState (*)( IImageObjectExtractorStatics const&), ImageObjectExtractor, IImageObjectExtractorStatics>( [](IImageObjectExtractorStatics const& f) { return f.GetReadyState(); }); } inline auto ImageObjectExtractor::EnsureReadyAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double> (*)( IImageObjectExtractorStatics const&), ImageObjectExtractor, IImageObjectExtractorStatics>( [](IImageObjectExtractorStatics const& f) { return f.EnsureReadyAsync(); }); } inline ImageObjectExtractorHint::ImageObjectExtractorHint( param::vector const& includeRects, param::vector const& includePoints, param::vector const& excludePoints) : ImageObjectExtractorHint( impl::call_factory( [&](IImageObjectExtractorHintFactory const& f) { return f.CreateInstance(includeRects, includePoints, excludePoints); })) {} inline auto ImageObjectRemover::GetReadyState() { return impl::call_factory_cast< winrt::Microsoft::Windows::AI::AIFeatureReadyState (*)( IImageObjectRemoverStatics const&), ImageObjectRemover, IImageObjectRemoverStatics>( [](IImageObjectRemoverStatics const& f) { return f.GetReadyState(); }); } inline auto ImageObjectRemover::EnsureReadyAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double> (*)( IImageObjectRemoverStatics const&), ImageObjectRemover, IImageObjectRemoverStatics>( [](IImageObjectRemoverStatics const& f) { return f.EnsureReadyAsync(); }); } inline auto ImageObjectRemover::CreateAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::ImageObjectRemover> (*)( IImageObjectRemoverStatics const&), ImageObjectRemover, IImageObjectRemoverStatics>( [](IImageObjectRemoverStatics const& f) { return f.CreateAsync(); }); } inline auto ImageScaler::GetReadyState() { return impl::call_factory_cast< winrt::Microsoft::Windows::AI::AIFeatureReadyState (*)( IImageScalerStatics const&), ImageScaler, IImageScalerStatics>( [](IImageScalerStatics const& f) { return f.GetReadyState(); }); } inline auto ImageScaler::EnsureReadyAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double> (*)( IImageScalerStatics const&), ImageScaler, IImageScalerStatics>( [](IImageScalerStatics const& f) { return f.EnsureReadyAsync(); }); } inline auto ImageScaler::CreateAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::ImageScaler> (*)( IImageScalerStatics const&), ImageScaler, IImageScalerStatics>( [](IImageScalerStatics const& f) { return f.CreateAsync(); }); } inline auto TextRecognizer::GetReadyState() { return impl::call_factory_cast< winrt::Microsoft::Windows::AI::AIFeatureReadyState (*)( ITextRecognizerStatics const&), TextRecognizer, ITextRecognizerStatics>( [](ITextRecognizerStatics const& f) { return f.GetReadyState(); }); } inline auto TextRecognizer::EnsureReadyAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperationWithProgress< winrt::Microsoft::Windows::AI::AIFeatureReadyResult, double> (*)( ITextRecognizerStatics const&), TextRecognizer, ITextRecognizerStatics>( [](ITextRecognizerStatics const& f) { return f.EnsureReadyAsync(); }); } inline auto TextRecognizer::CreateAsync() { return impl::call_factory_cast< winrt::Windows::Foundation::IAsyncOperation< winrt::Microsoft::Windows::AI::Imaging::TextRecognizer> (*)( ITextRecognizerStatics const&), TextRecognizer, ITextRecognizerStatics>( [](ITextRecognizerStatics const& f) { return f.CreateAsync(); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AI::Imaging::IImageDescriptionGeneratorStatics> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorHintFactory> : winrt::impl::hash_base {}; template <> struct hash< winrt::Microsoft::Windows::AI::Imaging::IImageObjectExtractorStatics> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } // namespace std #endif