// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Microsoft_UI_Xaml_Media_Imaging_H #define WINRT_Microsoft_UI_Xaml_Media_Imaging_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Microsoft.UI.Xaml.Media.h" #include "winrt/impl/Microsoft.UI.Xaml.2.h" #include "winrt/impl/Microsoft.UI.Xaml.Media.2.h" #include "winrt/impl/Windows.ApplicationModel.Background.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Graphics.Imaging.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Microsoft.UI.Xaml.Media.Imaging.2.h" namespace winrt::impl { template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::CreateOptions() const { winrt::Microsoft::UI::Xaml::Media::Imaging::BitmapCreateOptions value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->get_CreateOptions(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::CreateOptions(winrt::Microsoft::UI::Xaml::Media::Imaging::BitmapCreateOptions const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->put_CreateOptions(static_cast(value))); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::UriSource() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->get_UriSource(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::UriSource(winrt::Windows::Foundation::Uri const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->put_UriSource(*(void**)(&value))); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DecodePixelWidth() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->get_DecodePixelWidth(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DecodePixelWidth(int32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->put_DecodePixelWidth(value)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DecodePixelHeight() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->get_DecodePixelHeight(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DecodePixelHeight(int32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->put_DecodePixelHeight(value)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DecodePixelType() const { winrt::Microsoft::UI::Xaml::Media::Imaging::DecodePixelType value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->get_DecodePixelType(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DecodePixelType(winrt::Microsoft::UI::Xaml::Media::Imaging::DecodePixelType const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->put_DecodePixelType(static_cast(value))); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::IsAnimatedBitmap() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->get_IsAnimatedBitmap(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::IsPlaying() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->get_IsPlaying(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::AutoPlay() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->get_AutoPlay(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::AutoPlay(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->put_AutoPlay(value)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DownloadProgress(winrt::Microsoft::UI::Xaml::Media::Imaging::DownloadProgressEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->add_DownloadProgress(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DownloadProgress(auto_revoke_t, winrt::Microsoft::UI::Xaml::Media::Imaging::DownloadProgressEventHandler const& handler) const { return impl::make_event_revoker(this, DownloadProgress(handler)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::DownloadProgress(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->remove_DownloadProgress(impl::bind_in(token)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::ImageOpened(winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->add_ImageOpened(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::ImageOpened(auto_revoke_t, winrt::Microsoft::UI::Xaml::RoutedEventHandler const& handler) const { return impl::make_event_revoker(this, ImageOpened(handler)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::ImageOpened(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->remove_ImageOpened(impl::bind_in(token)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::ImageFailed(winrt::Microsoft::UI::Xaml::ExceptionRoutedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->add_ImageFailed(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::ImageFailed(auto_revoke_t, winrt::Microsoft::UI::Xaml::ExceptionRoutedEventHandler const& handler) const { return impl::make_event_revoker(this, ImageFailed(handler)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::ImageFailed(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->remove_ImageFailed(impl::bind_in(token)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::Play() const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->Play()); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImage::Stop() const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImage)->Stop()); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageFactory::CreateInstanceWithUriSource(winrt::Windows::Foundation::Uri const& uriSource) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageFactory)->CreateInstanceWithUriSource(*(void**)(&uriSource), &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::BitmapImage{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageStatics::CreateOptionsProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageStatics)->get_CreateOptionsProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageStatics::UriSourceProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageStatics)->get_UriSourceProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageStatics::DecodePixelWidthProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageStatics)->get_DecodePixelWidthProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageStatics::DecodePixelHeightProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageStatics)->get_DecodePixelHeightProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageStatics::DecodePixelTypeProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageStatics)->get_DecodePixelTypeProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageStatics::IsAnimatedBitmapProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageStatics)->get_IsAnimatedBitmapProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageStatics::IsPlayingProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageStatics)->get_IsPlayingProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapImageStatics::AutoPlayProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapImageStatics)->get_AutoPlayProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapSource::PixelWidth() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapSource)->get_PixelWidth(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapSource::PixelHeight() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapSource)->get_PixelHeight(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapSource::SetSource(winrt::Windows::Storage::Streams::IRandomAccessStream const& streamSource) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapSource)->SetSource(*(void**)(&streamSource))); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapSource::SetSourceAsync(winrt::Windows::Storage::Streams::IRandomAccessStream const& streamSource) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapSource)->SetSourceAsync(*(void**)(&streamSource), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapSourceFactory::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapSourceFactory)->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::BitmapSource{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapSourceStatics::PixelWidthProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapSourceStatics)->get_PixelWidthProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IBitmapSourceStatics::PixelHeightProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IBitmapSourceStatics)->get_PixelHeightProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IDownloadProgressEventArgs::Progress() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IDownloadProgressEventArgs)->get_Progress(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IDownloadProgressEventArgs::Progress(int32_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IDownloadProgressEventArgs)->put_Progress(value)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IRenderTargetBitmap::PixelWidth() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IRenderTargetBitmap)->get_PixelWidth(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IRenderTargetBitmap::PixelHeight() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IRenderTargetBitmap)->get_PixelHeight(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IRenderTargetBitmap::RenderAsync(winrt::Microsoft::UI::Xaml::UIElement const& element) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IRenderTargetBitmap)->RenderAsync(*(void**)(&element), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IRenderTargetBitmap::RenderAsync(winrt::Microsoft::UI::Xaml::UIElement const& element, int32_t scaledWidth, int32_t scaledHeight) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IRenderTargetBitmap)->RenderToSizeAsync(*(void**)(&element), scaledWidth, scaledHeight, &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IRenderTargetBitmap::GetPixelsAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IRenderTargetBitmap)->GetPixelsAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IRenderTargetBitmapStatics::PixelWidthProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IRenderTargetBitmapStatics)->get_PixelWidthProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IRenderTargetBitmapStatics::PixelHeightProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IRenderTargetBitmapStatics)->get_PixelHeightProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISoftwareBitmapSource::SetBitmapAsync(winrt::Windows::Graphics::Imaging::SoftwareBitmap const& softwareBitmap) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISoftwareBitmapSource)->SetBitmapAsync(*(void**)(&softwareBitmap), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISurfaceImageSourceFactory::CreateInstanceWithDimensions(int32_t pixelWidth, int32_t pixelHeight, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISurfaceImageSourceFactory)->CreateInstanceWithDimensions(pixelWidth, pixelHeight, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::SurfaceImageSource{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISurfaceImageSourceFactory::CreateInstanceWithDimensionsAndOpacity(int32_t pixelWidth, int32_t pixelHeight, bool isOpaque, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISurfaceImageSourceFactory)->CreateInstanceWithDimensionsAndOpacity(pixelWidth, pixelHeight, isOpaque, *(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::SurfaceImageSource{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::UriSource() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->get_UriSource(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::UriSource(winrt::Windows::Foundation::Uri const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->put_UriSource(*(void**)(&value))); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::RasterizePixelWidth() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->get_RasterizePixelWidth(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::RasterizePixelWidth(double value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->put_RasterizePixelWidth(value)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::RasterizePixelHeight() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->get_RasterizePixelHeight(&value)); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::RasterizePixelHeight(double value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->put_RasterizePixelHeight(value)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::Opened(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->add_Opened(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::Opened(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, Opened(handler)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::Opened(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->remove_Opened(impl::bind_in(token)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::OpenFailed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->add_OpenFailed(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::OpenFailed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, OpenFailed(handler)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::OpenFailed(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->remove_OpenFailed(impl::bind_in(token)); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSource::SetSourceAsync(winrt::Windows::Storage::Streams::IRandomAccessStream const& streamSource) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSource)->SetSourceAsync(*(void**)(&streamSource), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSourceFactory::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSourceFactory)->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::SvgImageSource{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSourceFactory::CreateInstanceWithUriSource(winrt::Windows::Foundation::Uri const& uriSource, winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSourceFactory)->CreateInstanceWithUriSource(*(void**)(&uriSource), *(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::SvgImageSource{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSourceFailedEventArgs::Status() const { winrt::Microsoft::UI::Xaml::Media::Imaging::SvgImageSourceLoadStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSourceFailedEventArgs)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSourceStatics::UriSourceProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSourceStatics)->get_UriSourceProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSourceStatics::RasterizePixelWidthProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSourceStatics)->get_RasterizePixelWidthProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_ISvgImageSourceStatics::RasterizePixelHeightProperty() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::ISvgImageSourceStatics)->get_RasterizePixelHeightProperty(&value)); return winrt::Microsoft::UI::Xaml::DependencyProperty{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IVirtualSurfaceImageSourceFactory::CreateInstanceWithDimensions(int32_t pixelWidth, int32_t pixelHeight) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IVirtualSurfaceImageSourceFactory)->CreateInstanceWithDimensions(pixelWidth, pixelHeight, &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::VirtualSurfaceImageSource{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IVirtualSurfaceImageSourceFactory::CreateInstanceWithDimensionsAndOpacity(int32_t pixelWidth, int32_t pixelHeight, bool isOpaque) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IVirtualSurfaceImageSourceFactory)->CreateInstanceWithDimensionsAndOpacity(pixelWidth, pixelHeight, isOpaque, &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::VirtualSurfaceImageSource{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IWriteableBitmap::PixelBuffer() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IWriteableBitmap)->get_PixelBuffer(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IWriteableBitmap::Invalidate() const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IWriteableBitmap)->Invalidate()); } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IWriteableBitmapFactory::CreateInstanceWithDimensions(int32_t pixelWidth, int32_t pixelHeight) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IWriteableBitmapFactory)->CreateInstanceWithDimensions(pixelWidth, pixelHeight, &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::WriteableBitmap{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IXamlRenderingBackgroundTaskFactory::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IXamlRenderingBackgroundTaskFactory)->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); return winrt::Microsoft::UI::Xaml::Media::Imaging::XamlRenderingBackgroundTask{ value, take_ownership_from_abi }; } template auto consume_Microsoft_UI_Xaml_Media_Imaging_IXamlRenderingBackgroundTaskOverrides::OnRun(winrt::Windows::ApplicationModel::Background::IBackgroundTaskInstance const& taskInstance) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Xaml::Media::Imaging::IXamlRenderingBackgroundTaskOverrides)->OnRun(*(void**)(&taskInstance))); } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* sender, void* e) noexcept final try { (*this)(*reinterpret_cast(&sender), *reinterpret_cast(&e)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CreateOptions(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateOptions()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CreateOptions(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CreateOptions(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UriSource(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UriSource()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_UriSource(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UriSource(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DecodePixelWidth(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DecodePixelWidth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DecodePixelWidth(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DecodePixelWidth(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DecodePixelHeight(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DecodePixelHeight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DecodePixelHeight(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DecodePixelHeight(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DecodePixelType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DecodePixelType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_DecodePixelType(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DecodePixelType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsAnimatedBitmap(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsAnimatedBitmap()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPlaying(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPlaying()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoPlay(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoPlay()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoPlay(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoPlay(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_DownloadProgress(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DownloadProgress(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DownloadProgress(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DownloadProgress(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ImageOpened(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ImageOpened(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ImageOpened(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ImageOpened(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ImageFailed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ImageFailed(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ImageFailed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ImageFailed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall Play() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Play(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstanceWithUriSource(void* uriSource, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstanceWithUriSource(*reinterpret_cast(&uriSource))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CreateOptionsProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateOptionsProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UriSourceProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UriSourceProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DecodePixelWidthProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DecodePixelWidthProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DecodePixelHeightProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DecodePixelHeightProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DecodePixelTypeProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DecodePixelTypeProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsAnimatedBitmapProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsAnimatedBitmapProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPlayingProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPlayingProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoPlayProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoPlayProperty()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PixelWidth(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelWidth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PixelHeight(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelHeight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetSource(void* streamSource) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetSource(*reinterpret_cast(&streamSource)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetSourceAsync(void* streamSource, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetSourceAsync(*reinterpret_cast(&streamSource))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try { if (innerInterface) *innerInterface = nullptr; winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface; clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&baseInterface), winrt_impl_innerInterface)); if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PixelWidthProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelWidthProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PixelHeightProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelHeightProperty()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Progress(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Progress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Progress(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Progress(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PixelWidth(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelWidth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PixelHeight(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelHeight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RenderAsync(void* element, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().RenderAsync(*reinterpret_cast(&element))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RenderToSizeAsync(void* element, int32_t scaledWidth, int32_t scaledHeight, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().RenderAsync(*reinterpret_cast(&element), scaledWidth, scaledHeight)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPixelsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetPixelsAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PixelWidthProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelWidthProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PixelHeightProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelHeightProperty()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetBitmapAsync(void* softwareBitmap, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetBitmapAsync(*reinterpret_cast(&softwareBitmap))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstanceWithDimensions(int32_t pixelWidth, int32_t pixelHeight, void* baseInterface, void** innerInterface, void** value) noexcept final try { if (innerInterface) *innerInterface = nullptr; winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface; clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstanceWithDimensions(pixelWidth, pixelHeight, *reinterpret_cast(&baseInterface), winrt_impl_innerInterface)); if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateInstanceWithDimensionsAndOpacity(int32_t pixelWidth, int32_t pixelHeight, bool isOpaque, void* baseInterface, void** innerInterface, void** value) noexcept final try { if (innerInterface) *innerInterface = nullptr; winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface; clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstanceWithDimensionsAndOpacity(pixelWidth, pixelHeight, isOpaque, *reinterpret_cast(&baseInterface), winrt_impl_innerInterface)); if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_UriSource(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UriSource()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_UriSource(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UriSource(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RasterizePixelWidth(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RasterizePixelWidth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RasterizePixelWidth(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RasterizePixelWidth(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RasterizePixelHeight(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RasterizePixelHeight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RasterizePixelHeight(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RasterizePixelHeight(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_Opened(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().Opened(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_Opened(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().Opened(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_OpenFailed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().OpenFailed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_OpenFailed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().OpenFailed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall SetSourceAsync(void* streamSource, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SetSourceAsync(*reinterpret_cast(&streamSource))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try { if (innerInterface) *innerInterface = nullptr; winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface; clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&baseInterface), winrt_impl_innerInterface)); if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateInstanceWithUriSource(void* uriSource, void* baseInterface, void** innerInterface, void** value) noexcept final try { if (innerInterface) *innerInterface = nullptr; winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface; clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstanceWithUriSource(*reinterpret_cast(&uriSource), *reinterpret_cast(&baseInterface), winrt_impl_innerInterface)); if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_UriSourceProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UriSourceProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RasterizePixelWidthProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RasterizePixelWidthProperty()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RasterizePixelHeightProperty(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RasterizePixelHeightProperty()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstanceWithDimensions(int32_t pixelWidth, int32_t pixelHeight, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstanceWithDimensions(pixelWidth, pixelHeight)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateInstanceWithDimensionsAndOpacity(int32_t pixelWidth, int32_t pixelHeight, bool isOpaque, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstanceWithDimensionsAndOpacity(pixelWidth, pixelHeight, isOpaque)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PixelBuffer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PixelBuffer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Invalidate() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Invalidate(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstanceWithDimensions(int32_t pixelWidth, int32_t pixelHeight, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstanceWithDimensions(pixelWidth, pixelHeight)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try { if (innerInterface) *innerInterface = nullptr; winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface; clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&baseInterface), winrt_impl_innerInterface)); if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall OnRun(void* taskInstance) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OnRun(*reinterpret_cast(&taskInstance)); return 0; } catch (...) { return to_hresult(); } }; template struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable : produce_dispatch_to_overridable_base { auto OnRun(winrt::Windows::ApplicationModel::Background::IBackgroundTaskInstance const& taskInstance) { if (auto overridable = this->shim_overridable()) { return overridable.OnRun(taskInstance); } return this->shim().OnRun(taskInstance); } }; } WINRT_EXPORT namespace winrt::Microsoft::UI::Xaml::Media::Imaging { constexpr auto operator|(BitmapCreateOptions const left, BitmapCreateOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(BitmapCreateOptions& left, BitmapCreateOptions const right) noexcept { left = left | right; return left; } constexpr auto operator&(BitmapCreateOptions const left, BitmapCreateOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(BitmapCreateOptions& left, BitmapCreateOptions const right) noexcept { left = left & right; return left; } constexpr auto operator~(BitmapCreateOptions const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(BitmapCreateOptions const left, BitmapCreateOptions const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(BitmapCreateOptions& left, BitmapCreateOptions const right) noexcept { left = left ^ right; return left; } inline BitmapImage::BitmapImage() : BitmapImage(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline BitmapImage::BitmapImage(winrt::Windows::Foundation::Uri const& uriSource) : BitmapImage(impl::call_factory([&](IBitmapImageFactory const& f) { return f.CreateInstanceWithUriSource(uriSource); })) { } inline auto BitmapImage::CreateOptionsProperty() { return impl::call_factory_cast([](IBitmapImageStatics const& f) { return f.CreateOptionsProperty(); }); } inline auto BitmapImage::UriSourceProperty() { return impl::call_factory_cast([](IBitmapImageStatics const& f) { return f.UriSourceProperty(); }); } inline auto BitmapImage::DecodePixelWidthProperty() { return impl::call_factory_cast([](IBitmapImageStatics const& f) { return f.DecodePixelWidthProperty(); }); } inline auto BitmapImage::DecodePixelHeightProperty() { return impl::call_factory_cast([](IBitmapImageStatics const& f) { return f.DecodePixelHeightProperty(); }); } inline auto BitmapImage::DecodePixelTypeProperty() { return impl::call_factory_cast([](IBitmapImageStatics const& f) { return f.DecodePixelTypeProperty(); }); } inline auto BitmapImage::IsAnimatedBitmapProperty() { return impl::call_factory_cast([](IBitmapImageStatics const& f) { return f.IsAnimatedBitmapProperty(); }); } inline auto BitmapImage::IsPlayingProperty() { return impl::call_factory_cast([](IBitmapImageStatics const& f) { return f.IsPlayingProperty(); }); } inline auto BitmapImage::AutoPlayProperty() { return impl::call_factory_cast([](IBitmapImageStatics const& f) { return f.AutoPlayProperty(); }); } inline auto BitmapSource::PixelWidthProperty() { return impl::call_factory_cast([](IBitmapSourceStatics const& f) { return f.PixelWidthProperty(); }); } inline auto BitmapSource::PixelHeightProperty() { return impl::call_factory_cast([](IBitmapSourceStatics const& f) { return f.PixelHeightProperty(); }); } inline RenderTargetBitmap::RenderTargetBitmap() : RenderTargetBitmap(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto RenderTargetBitmap::PixelWidthProperty() { return impl::call_factory_cast([](IRenderTargetBitmapStatics const& f) { return f.PixelWidthProperty(); }); } inline auto RenderTargetBitmap::PixelHeightProperty() { return impl::call_factory_cast([](IRenderTargetBitmapStatics const& f) { return f.PixelHeightProperty(); }); } inline SoftwareBitmapSource::SoftwareBitmapSource() : SoftwareBitmapSource(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline SurfaceImageSource::SurfaceImageSource(int32_t pixelWidth, int32_t pixelHeight) { winrt::Windows::Foundation::IInspectable baseInterface, innerInterface; *this = impl::call_factory([&](ISurfaceImageSourceFactory const& f) { return f.CreateInstanceWithDimensions(pixelWidth, pixelHeight, baseInterface, innerInterface); }); } inline SurfaceImageSource::SurfaceImageSource(int32_t pixelWidth, int32_t pixelHeight, bool isOpaque) { winrt::Windows::Foundation::IInspectable baseInterface, innerInterface; *this = impl::call_factory([&](ISurfaceImageSourceFactory const& f) { return f.CreateInstanceWithDimensionsAndOpacity(pixelWidth, pixelHeight, isOpaque, baseInterface, innerInterface); }); } inline SvgImageSource::SvgImageSource() { winrt::Windows::Foundation::IInspectable baseInterface, innerInterface; *this = impl::call_factory([&](ISvgImageSourceFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); }); } inline SvgImageSource::SvgImageSource(winrt::Windows::Foundation::Uri const& uriSource) { winrt::Windows::Foundation::IInspectable baseInterface, innerInterface; *this = impl::call_factory([&](ISvgImageSourceFactory const& f) { return f.CreateInstanceWithUriSource(uriSource, baseInterface, innerInterface); }); } inline auto SvgImageSource::UriSourceProperty() { return impl::call_factory_cast([](ISvgImageSourceStatics const& f) { return f.UriSourceProperty(); }); } inline auto SvgImageSource::RasterizePixelWidthProperty() { return impl::call_factory_cast([](ISvgImageSourceStatics const& f) { return f.RasterizePixelWidthProperty(); }); } inline auto SvgImageSource::RasterizePixelHeightProperty() { return impl::call_factory_cast([](ISvgImageSourceStatics const& f) { return f.RasterizePixelHeightProperty(); }); } inline VirtualSurfaceImageSource::VirtualSurfaceImageSource(int32_t pixelWidth, int32_t pixelHeight) : VirtualSurfaceImageSource(impl::call_factory([&](IVirtualSurfaceImageSourceFactory const& f) { return f.CreateInstanceWithDimensions(pixelWidth, pixelHeight); })) { } inline VirtualSurfaceImageSource::VirtualSurfaceImageSource(int32_t pixelWidth, int32_t pixelHeight, bool isOpaque) : VirtualSurfaceImageSource(impl::call_factory([&](IVirtualSurfaceImageSourceFactory const& f) { return f.CreateInstanceWithDimensionsAndOpacity(pixelWidth, pixelHeight, isOpaque); })) { } inline WriteableBitmap::WriteableBitmap(int32_t pixelWidth, int32_t pixelHeight) : WriteableBitmap(impl::call_factory([&](IWriteableBitmapFactory const& f) { return f.CreateInstanceWithDimensions(pixelWidth, pixelHeight); })) { } template DownloadProgressEventHandler::DownloadProgressEventHandler(L handler) : DownloadProgressEventHandler(impl::make_delegate(std::forward(handler))) { } template DownloadProgressEventHandler::DownloadProgressEventHandler(F* handler) : DownloadProgressEventHandler([=](auto&&... args) { return handler(args...); }) { } template DownloadProgressEventHandler::DownloadProgressEventHandler(O* object, M method) : DownloadProgressEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template DownloadProgressEventHandler::DownloadProgressEventHandler(com_ptr&& object, M method) : DownloadProgressEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template DownloadProgressEventHandler::DownloadProgressEventHandler(weak_ref&& object, LM&& lambda_or_method) : DownloadProgressEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template DownloadProgressEventHandler::DownloadProgressEventHandler(std::shared_ptr&& object, M method) : DownloadProgressEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template DownloadProgressEventHandler::DownloadProgressEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : DownloadProgressEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto DownloadProgressEventHandler::operator()(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::Media::Imaging::DownloadProgressEventArgs const& e) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&sender), *(void**)(&e))); } template auto IXamlRenderingBackgroundTaskOverridesT::OnRun(winrt::Windows::ApplicationModel::Background::IBackgroundTaskInstance const& taskInstance) const { return shim().template try_as().OnRun(taskInstance); } template struct BitmapSourceT : implements, impl::require, impl::base { using composable = BitmapSource; protected: BitmapSourceT() { impl::call_factory([&](IBitmapSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); }); } }; template struct SurfaceImageSourceT : implements, impl::require, impl::base { using composable = SurfaceImageSource; protected: SurfaceImageSourceT(int32_t pixelWidth, int32_t pixelHeight) { impl::call_factory([&](ISurfaceImageSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstanceWithDimensions(pixelWidth, pixelHeight, *this, this->m_inner); }); } SurfaceImageSourceT(int32_t pixelWidth, int32_t pixelHeight, bool isOpaque) { impl::call_factory([&](ISurfaceImageSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstanceWithDimensionsAndOpacity(pixelWidth, pixelHeight, isOpaque, *this, this->m_inner); }); } }; template struct SvgImageSourceT : implements, impl::require, impl::base { using composable = SvgImageSource; protected: SvgImageSourceT() { impl::call_factory([&](ISvgImageSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); }); } SvgImageSourceT(winrt::Windows::Foundation::Uri const& uriSource) { impl::call_factory([&](ISvgImageSourceFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstanceWithUriSource(uriSource, *this, this->m_inner); }); } }; template struct XamlRenderingBackgroundTaskT : implements, impl::require, impl::base, winrt::Microsoft::UI::Xaml::Media::Imaging::IXamlRenderingBackgroundTaskOverridesT { using composable = XamlRenderingBackgroundTask; protected: XamlRenderingBackgroundTaskT() { impl::call_factory([&](IXamlRenderingBackgroundTaskFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); }); } }; } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; 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 {}; 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 } #endif