// C++/WinRT v2.0.190620.2

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#ifndef WINRT_Windows_Globalization_Fonts_H
#define WINRT_Windows_Globalization_Fonts_H
#include "base.h"
static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.190620.2"), "Mismatched C++/WinRT headers.");
#include "Windows.Globalization.h"
#include "impl/Windows.UI.Text.2.h"
#include "impl/Windows.Globalization.Fonts.2.h"
namespace winrt::impl
{
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFont<D>::FontFamily() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFont)->get_FontFamily(&value));
        return hstring{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFont<D>::FontWeight() const
    {
        Windows::UI::Text::FontWeight weight;
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFont)->get_FontWeight(put_abi(weight)));
        return weight;
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFont<D>::FontStretch() const
    {
        Windows::UI::Text::FontStretch stretch;
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFont)->get_FontStretch(put_abi(stretch)));
        return stretch;
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFont<D>::FontStyle() const
    {
        Windows::UI::Text::FontStyle style;
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFont)->get_FontStyle(put_abi(style)));
        return style;
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFont<D>::ScaleFactor() const
    {
        double scale;
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFont)->get_ScaleFactor(&scale));
        return scale;
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::UITextFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_UITextFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::UIHeadingFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_UIHeadingFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::UITitleFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_UITitleFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::UICaptionFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_UICaptionFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::UINotificationHeadingFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_UINotificationHeadingFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::TraditionalDocumentFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_TraditionalDocumentFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::ModernDocumentFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_ModernDocumentFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::DocumentHeadingFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_DocumentHeadingFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::FixedWidthTextFont() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_FixedWidthTextFont(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::DocumentAlternate1Font() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_DocumentAlternate1Font(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroup<D>::DocumentAlternate2Font() const
    {
        void* value{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroup)->get_DocumentAlternate2Font(&value));
        return Windows::Globalization::Fonts::LanguageFont{ value, take_ownership_from_abi };
    }
    template <typename D> auto consume_Windows_Globalization_Fonts_ILanguageFontGroupFactory<D>::CreateLanguageFontGroup(param::hstring const& languageTag) const
    {
        void* recommendedFonts{};
        check_hresult(WINRT_IMPL_SHIM(Windows::Globalization::Fonts::ILanguageFontGroupFactory)->CreateLanguageFontGroup(*(void**)(&languageTag), &recommendedFonts));
        return Windows::Globalization::Fonts::LanguageFontGroup{ recommendedFonts, take_ownership_from_abi };
    }
    template <typename D>
    struct produce<D, Windows::Globalization::Fonts::ILanguageFont> : produce_base<D, Windows::Globalization::Fonts::ILanguageFont>
    {
        int32_t __stdcall get_FontFamily(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<hstring>(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<Windows::UI::Text::FontWeight>(weight);
            typename D::abi_guard guard(this->shim());
            *weight = detach_from<Windows::UI::Text::FontWeight>(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<Windows::UI::Text::FontStretch>(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<Windows::UI::Text::FontStyle>(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<double>(this->shim().ScaleFactor());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Globalization::Fonts::ILanguageFontGroup> : produce_base<D, Windows::Globalization::Fonts::ILanguageFontGroup>
    {
        int32_t __stdcall get_UITextFont(void** value) noexcept final try
        {
            clear_abi(value);
            typename D::abi_guard guard(this->shim());
            *value = detach_from<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(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<Windows::Globalization::Fonts::LanguageFont>(this->shim().DocumentAlternate2Font());
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
    template <typename D>
    struct produce<D, Windows::Globalization::Fonts::ILanguageFontGroupFactory> : produce_base<D, Windows::Globalization::Fonts::ILanguageFontGroupFactory>
    {
        int32_t __stdcall CreateLanguageFontGroup(void* languageTag, void** recommendedFonts) noexcept final try
        {
            clear_abi(recommendedFonts);
            typename D::abi_guard guard(this->shim());
            *recommendedFonts = detach_from<Windows::Globalization::Fonts::LanguageFontGroup>(this->shim().CreateLanguageFontGroup(*reinterpret_cast<hstring const*>(&languageTag)));
            return 0;
        }
        catch (...) { return to_hresult(); }
    };
}
namespace winrt::Windows::Globalization::Fonts
{
    inline LanguageFontGroup::LanguageFontGroup(param::hstring const& languageTag) :
        LanguageFontGroup(impl::call_factory<LanguageFontGroup, Windows::Globalization::Fonts::ILanguageFontGroupFactory>([&](auto&& f) { return f.CreateLanguageFontGroup(languageTag); }))
    {
    }
}
namespace std
{
    template<> struct hash<winrt::Windows::Globalization::Fonts::ILanguageFont> : winrt::impl::hash_base<winrt::Windows::Globalization::Fonts::ILanguageFont> {};
    template<> struct hash<winrt::Windows::Globalization::Fonts::ILanguageFontGroup> : winrt::impl::hash_base<winrt::Windows::Globalization::Fonts::ILanguageFontGroup> {};
    template<> struct hash<winrt::Windows::Globalization::Fonts::ILanguageFontGroupFactory> : winrt::impl::hash_base<winrt::Windows::Globalization::Fonts::ILanguageFontGroupFactory> {};
    template<> struct hash<winrt::Windows::Globalization::Fonts::LanguageFont> : winrt::impl::hash_base<winrt::Windows::Globalization::Fonts::LanguageFont> {};
    template<> struct hash<winrt::Windows::Globalization::Fonts::LanguageFontGroup> : winrt::impl::hash_base<winrt::Windows::Globalization::Fonts::LanguageFontGroup> {};
}
#endif
