// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Globalization_Fonts_H #define WINRT_Windows_Globalization_Fonts_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/Windows.Globalization.h" #include "winrt/impl/Windows.UI.Text.2.h" #include "winrt/impl/Windows.Globalization.Fonts.2.h" namespace winrt::impl { template auto consume_Windows_Globalization_Fonts_ILanguageFont::FontFamily() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFont)->get_FontFamily(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFont::FontWeight() const { winrt::Windows::UI::Text::FontWeight weight{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFont)->get_FontWeight(put_abi(weight))); return weight; } template auto consume_Windows_Globalization_Fonts_ILanguageFont::FontStretch() const { winrt::Windows::UI::Text::FontStretch stretch{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFont)->get_FontStretch(reinterpret_cast(&stretch))); return stretch; } template auto consume_Windows_Globalization_Fonts_ILanguageFont::FontStyle() const { winrt::Windows::UI::Text::FontStyle style{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFont)->get_FontStyle(reinterpret_cast(&style))); return style; } template auto consume_Windows_Globalization_Fonts_ILanguageFont::ScaleFactor() const { double scale{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFont)->get_ScaleFactor(&scale)); return scale; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::UITextFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_UITextFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::UIHeadingFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_UIHeadingFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::UITitleFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_UITitleFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::UICaptionFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_UICaptionFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::UINotificationHeadingFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_UINotificationHeadingFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::TraditionalDocumentFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_TraditionalDocumentFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::ModernDocumentFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_ModernDocumentFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::DocumentHeadingFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_DocumentHeadingFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::FixedWidthTextFont() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_FixedWidthTextFont(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::DocumentAlternate1Font() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_DocumentAlternate1Font(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroup::DocumentAlternate2Font() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroup)->get_DocumentAlternate2Font(&value)); return winrt::Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi }; } template auto consume_Windows_Globalization_Fonts_ILanguageFontGroupFactory::CreateLanguageFontGroup(param::hstring const& languageTag) const { void* recommendedFonts{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Globalization::Fonts::ILanguageFontGroupFactory)->CreateLanguageFontGroup(*(void**)(&languageTag), &recommendedFonts)); return winrt::Windows::Globalization::Fonts::LanguageFontGroup{ recommendedFonts, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FontFamily(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FontFamily()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FontWeight(struct struct_Windows_UI_Text_FontWeight* weight) noexcept final try { zero_abi(weight); typename D::abi_guard guard(this->shim()); *weight = detach_from(this->shim().FontWeight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FontStretch(int32_t* stretch) noexcept final try { typename D::abi_guard guard(this->shim()); *stretch = detach_from(this->shim().FontStretch()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FontStyle(int32_t* style) noexcept final try { typename D::abi_guard guard(this->shim()); *style = detach_from(this->shim().FontStyle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ScaleFactor(double* scale) noexcept final try { typename D::abi_guard guard(this->shim()); *scale = detach_from(this->shim().ScaleFactor()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_UITextFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UITextFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UIHeadingFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UIHeadingFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UITitleFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UITitleFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UICaptionFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UICaptionFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UINotificationHeadingFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UINotificationHeadingFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TraditionalDocumentFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TraditionalDocumentFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ModernDocumentFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ModernDocumentFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DocumentHeadingFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DocumentHeadingFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FixedWidthTextFont(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FixedWidthTextFont()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DocumentAlternate1Font(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DocumentAlternate1Font()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DocumentAlternate2Font(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DocumentAlternate2Font()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateLanguageFontGroup(void* languageTag, void** recommendedFonts) noexcept final try { clear_abi(recommendedFonts); typename D::abi_guard guard(this->shim()); *recommendedFonts = detach_from(this->shim().CreateLanguageFontGroup(*reinterpret_cast(&languageTag))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Globalization::Fonts { inline LanguageFontGroup::LanguageFontGroup(param::hstring const& languageTag) : LanguageFontGroup(impl::call_factory([&](ILanguageFontGroupFactory const& f) { return f.CreateLanguageFontGroup(languageTag); })) { } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif