mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 07:06:11 -04:00
202 lines
8.3 KiB
C++
202 lines
8.3 KiB
C++
// 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 <typename D>
|
|
auto consume_Microsoft_Windows_Globalization_IApplicationLanguagesStatics<
|
|
D>::Languages() const {
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>) {
|
|
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<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Languages(&value));
|
|
} else {
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>**)this;
|
|
check_hresult(_winrt_abi_type->get_Languages(&value));
|
|
}
|
|
return winrt::Windows::Foundation::Collections::IVectorView<hstring>{
|
|
value, take_ownership_from_abi};
|
|
}
|
|
template <typename D>
|
|
auto consume_Microsoft_Windows_Globalization_IApplicationLanguagesStatics<
|
|
D>::ManifestLanguages() const {
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>) {
|
|
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<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_ManifestLanguages(&value));
|
|
} else {
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>**)this;
|
|
check_hresult(_winrt_abi_type->get_ManifestLanguages(&value));
|
|
}
|
|
return winrt::Windows::Foundation::Collections::IVectorView<hstring>{
|
|
value, take_ownership_from_abi};
|
|
}
|
|
template <typename D>
|
|
auto consume_Microsoft_Windows_Globalization_IApplicationLanguagesStatics<
|
|
D>::PrimaryLanguageOverride() const {
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>) {
|
|
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<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_PrimaryLanguageOverride(&value));
|
|
} else {
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>**)this;
|
|
check_hresult(_winrt_abi_type->get_PrimaryLanguageOverride(&value));
|
|
}
|
|
return hstring{value, take_ownership_from_abi};
|
|
}
|
|
template <typename D>
|
|
auto consume_Microsoft_Windows_Globalization_IApplicationLanguagesStatics<
|
|
D>::PrimaryLanguageOverride(param::hstring const& value) const {
|
|
if constexpr (!std::is_same_v<D, winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>) {
|
|
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<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>**)&_winrt_casted_result;
|
|
check_hresult(
|
|
_winrt_abi_type->put_PrimaryLanguageOverride(*(void**)(&value)));
|
|
} else {
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics>**)this;
|
|
check_hresult(
|
|
_winrt_abi_type->put_PrimaryLanguageOverride(*(void**)(&value)));
|
|
}
|
|
}
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<
|
|
D, winrt::Microsoft::Windows::Globalization::IApplicationLanguagesStatics>
|
|
: produce_base<D, winrt::Microsoft::Windows::Globalization::
|
|
IApplicationLanguagesStatics> {
|
|
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<hstring>>(
|
|
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<hstring>>(
|
|
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<hstring>(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<hstring const*>(&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<hstring> (*)(
|
|
IApplicationLanguagesStatics const&),
|
|
ApplicationLanguages, IApplicationLanguagesStatics>(
|
|
[](IApplicationLanguagesStatics const& f) { return f.Languages(); });
|
|
}
|
|
inline auto ApplicationLanguages::ManifestLanguages() {
|
|
return impl::call_factory_cast<
|
|
winrt::Windows::Foundation::Collections::IVectorView<hstring> (*)(
|
|
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<ApplicationLanguages, IApplicationLanguagesStatics>(
|
|
[&](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::Microsoft::Windows::Globalization::ApplicationLanguages>
|
|
: winrt::impl::hash_base {};
|
|
#endif
|
|
#ifdef __cpp_lib_format
|
|
#endif
|
|
} // namespace std
|
|
#endif
|