// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Microsoft_Windows_Media_Capture_H #define WINRT_Microsoft_Windows_Media_Capture_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/impl/Microsoft.UI.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Microsoft.Windows.Media.Capture.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUI::PhotoSettings() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUI)->get_PhotoSettings(&value)); return winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIPhotoCaptureSettings{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUI::VideoSettings() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUI)->get_VideoSettings(&value)); return winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIVideoCaptureSettings{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUI::CaptureFileAsync(winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIMode const& mode) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUI)->CaptureFileAsync(static_cast(mode), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIFactory::CreateInstance(winrt::Microsoft::UI::WindowId const& windowId) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIFactory)->CreateInstance(impl::bind_in(windowId), &value)); return winrt::Microsoft::Windows::Media::Capture::CameraCaptureUI{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::AllowCropping() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->get_AllowCropping(&value)); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::AllowCropping(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->put_AllowCropping(value)); } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::CroppedAspectRatio() const { winrt::Windows::Foundation::Size value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->get_CroppedAspectRatio(put_abi(value))); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::CroppedAspectRatio(winrt::Windows::Foundation::Size const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->put_CroppedAspectRatio(impl::bind_in(value))); } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::CroppedSizeInPixels() const { winrt::Windows::Foundation::Size value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->get_CroppedSizeInPixels(put_abi(value))); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::CroppedSizeInPixels(winrt::Windows::Foundation::Size const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->put_CroppedSizeInPixels(impl::bind_in(value))); } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::Format() const { winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIPhotoFormat value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->get_Format(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::Format(winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIPhotoFormat const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->put_Format(static_cast(value))); } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::MaxResolution() const { winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIMaxPhotoResolution value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->get_MaxResolution(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIPhotoCaptureSettings::MaxResolution(winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIMaxPhotoResolution const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIPhotoCaptureSettings)->put_MaxResolution(static_cast(value))); } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIVideoCaptureSettings::AllowTrimming() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings)->get_AllowTrimming(&value)); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIVideoCaptureSettings::AllowTrimming(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings)->put_AllowTrimming(value)); } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIVideoCaptureSettings::Format() const { winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIVideoFormat value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings)->get_Format(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIVideoCaptureSettings::Format(winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIVideoFormat const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings)->put_Format(static_cast(value))); } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIVideoCaptureSettings::MaxDurationInSeconds() const { float value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings)->get_MaxDurationInSeconds(&value)); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIVideoCaptureSettings::MaxDurationInSeconds(float value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings)->put_MaxDurationInSeconds(value)); } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIVideoCaptureSettings::MaxResolution() const { winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIMaxVideoResolution value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings)->get_MaxResolution(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Windows_Media_Capture_ICameraCaptureUIVideoCaptureSettings::MaxResolution(winrt::Microsoft::Windows::Media::Capture::CameraCaptureUIMaxVideoResolution const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Windows::Media::Capture::ICameraCaptureUIVideoCaptureSettings)->put_MaxResolution(static_cast(value))); } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PhotoSettings(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhotoSettings()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoSettings(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoSettings()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CaptureFileAsync(int32_t mode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CaptureFileAsync(*reinterpret_cast(&mode))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(struct struct_Microsoft_UI_WindowId windowId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&windowId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AllowCropping(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowCropping()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowCropping(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowCropping(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CroppedAspectRatio(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CroppedAspectRatio()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CroppedAspectRatio(winrt::Windows::Foundation::Size value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CroppedAspectRatio(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CroppedSizeInPixels(winrt::Windows::Foundation::Size* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CroppedSizeInPixels()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CroppedSizeInPixels(winrt::Windows::Foundation::Size value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CroppedSizeInPixels(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Format(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Format()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Format(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Format(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxResolution(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxResolution()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxResolution(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxResolution(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AllowTrimming(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AllowTrimming()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AllowTrimming(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AllowTrimming(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Format(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Format()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Format(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Format(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxDurationInSeconds(float* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxDurationInSeconds()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxDurationInSeconds(float value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxDurationInSeconds(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxResolution(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxResolution()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxResolution(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxResolution(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Microsoft::Windows::Media::Capture { inline CameraCaptureUI::CameraCaptureUI(winrt::Microsoft::UI::WindowId const& windowId) : CameraCaptureUI(impl::call_factory([&](ICameraCaptureUIFactory const& f) { return f.CreateInstance(windowId); })) { } inline CameraCaptureUIPhotoCaptureSettings::CameraCaptureUIPhotoCaptureSettings() : CameraCaptureUIPhotoCaptureSettings(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline CameraCaptureUIVideoCaptureSettings::CameraCaptureUIVideoCaptureSettings() : CameraCaptureUIVideoCaptureSettings(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif