// WARNING: Please don't edit this file. It was generated by C++/WinRT // v2.0.250303.1 #pragma once #ifndef WINRT_Microsoft_Windows_Globalization_H #define WINRT_Microsoft_Windows_Globalization_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/impl/Microsoft.Windows.Globalization.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" namespace winrt::impl { template auto consume_Microsoft_Windows_Globalization_IApplicationLanguagesStatics< D>::Languages() 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::Globalization::IApplicationLanguagesStatics, 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_Languages(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Languages(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Globalization_IApplicationLanguagesStatics< D>::ManifestLanguages() 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::Globalization::IApplicationLanguagesStatics, 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_ManifestLanguages(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ManifestLanguages(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Globalization_IApplicationLanguagesStatics< D>::PrimaryLanguageOverride() 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::Globalization::IApplicationLanguagesStatics, 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_PrimaryLanguageOverride(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrimaryLanguageOverride(&value)); } return hstring{value, take_ownership_from_abi}; } template auto consume_Microsoft_Windows_Globalization_IApplicationLanguagesStatics< D>::PrimaryLanguageOverride(param::hstring const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason< winrt::Microsoft::Windows::Globalization::IApplicationLanguagesStatics, 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->put_PrimaryLanguageOverride(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult( _winrt_abi_type->put_PrimaryLanguageOverride(*(void**)(&value))); } } #ifndef WINRT_LEAN_AND_MEAN template struct produce< D, winrt::Microsoft::Windows::Globalization::IApplicationLanguagesStatics> : produce_base { int32_t __stdcall get_Languages(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::Collections::IVectorView>( this->shim().Languages()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ManifestLanguages(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from< winrt::Windows::Foundation::Collections::IVectorView>( this->shim().ManifestLanguages()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrimaryLanguageOverride(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrimaryLanguageOverride()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PrimaryLanguageOverride(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PrimaryLanguageOverride( *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif } // namespace winrt::impl WINRT_EXPORT namespace winrt::Microsoft::Windows::Globalization { inline auto ApplicationLanguages::Languages() { return impl::call_factory_cast< winrt::Windows::Foundation::Collections::IVectorView (*)( IApplicationLanguagesStatics const&), ApplicationLanguages, IApplicationLanguagesStatics>( [](IApplicationLanguagesStatics const& f) { return f.Languages(); }); } inline auto ApplicationLanguages::ManifestLanguages() { return impl::call_factory_cast< winrt::Windows::Foundation::Collections::IVectorView (*)( IApplicationLanguagesStatics const&), ApplicationLanguages, IApplicationLanguagesStatics>( [](IApplicationLanguagesStatics const& f) { return f.ManifestLanguages(); }); } inline auto ApplicationLanguages::PrimaryLanguageOverride() { return impl::call_factory_cast< hstring (*)(IApplicationLanguagesStatics const&), ApplicationLanguages, IApplicationLanguagesStatics>( [](IApplicationLanguagesStatics const& f) { return f.PrimaryLanguageOverride(); }); } inline auto ApplicationLanguages::PrimaryLanguageOverride( param::hstring const& value) { impl::call_factory( [&](IApplicationLanguagesStatics const& f) { return f.PrimaryLanguageOverride(value); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template <> struct hash< winrt::Microsoft::Windows::Globalization::IApplicationLanguagesStatics> : winrt::impl::hash_base {}; template <> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } // namespace std #endif