// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_UI_Xaml_Resources_H #define WINRT_Windows_UI_Xaml_Resources_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.UI.Xaml.h" #include "winrt/impl/Windows.UI.Xaml.Resources.2.h" namespace winrt::impl { template auto consume_Windows_UI_Xaml_Resources_ICustomXamlResourceLoaderFactory::CreateInstance(winrt::Windows::Foundation::IInspectable const& baseInterface, winrt::Windows::Foundation::IInspectable& innerInterface) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Resources::ICustomXamlResourceLoaderFactory)->CreateInstance(*(void**)(&baseInterface), impl::bind_out(innerInterface), &value)); return winrt::Windows::UI::Xaml::Resources::CustomXamlResourceLoader{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Resources_ICustomXamlResourceLoaderOverrides::GetResource(param::hstring const& resourceId, param::hstring const& objectType, param::hstring const& propertyName, param::hstring const& propertyType) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Resources::ICustomXamlResourceLoaderOverrides)->GetResource(*(void**)(&resourceId), *(void**)(&objectType), *(void**)(&propertyName), *(void**)(&propertyType), &result)); return winrt::Windows::Foundation::IInspectable{ result, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Resources_ICustomXamlResourceLoaderStatics::Current() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Resources::ICustomXamlResourceLoaderStatics)->get_Current(&value)); return winrt::Windows::UI::Xaml::Resources::CustomXamlResourceLoader{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_Xaml_Resources_ICustomXamlResourceLoaderStatics::Current(winrt::Windows::UI::Xaml::Resources::CustomXamlResourceLoader const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Xaml::Resources::ICustomXamlResourceLoaderStatics)->put_Current(*(void**)(&value))); } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* baseInterface, void** innerInterface, void** value) noexcept final try { if (innerInterface) *innerInterface = nullptr; winrt::Windows::Foundation::IInspectable winrt_impl_innerInterface; clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&baseInterface), winrt_impl_innerInterface)); if (innerInterface) *innerInterface = detach_abi(winrt_impl_innerInterface); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall GetResource(void* resourceId, void* objectType, void* propertyName, void* propertyType, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetResource(*reinterpret_cast(&resourceId), *reinterpret_cast(&objectType), *reinterpret_cast(&propertyName), *reinterpret_cast(&propertyType))); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Current(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Current()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Current(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Current(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif template struct WINRT_IMPL_EMPTY_BASES produce_dispatch_to_overridable : produce_dispatch_to_overridable_base { auto GetResource(hstring const& resourceId, hstring const& objectType, hstring const& propertyName, hstring const& propertyType) { if (auto overridable = this->shim_overridable()) { return overridable.GetResource(resourceId, objectType, propertyName, propertyType); } return this->shim().GetResource(resourceId, objectType, propertyName, propertyType); } }; } WINRT_EXPORT namespace winrt::Windows::UI::Xaml::Resources { inline CustomXamlResourceLoader::CustomXamlResourceLoader() { winrt::Windows::Foundation::IInspectable baseInterface, innerInterface; *this = impl::call_factory([&](ICustomXamlResourceLoaderFactory const& f) { return f.CreateInstance(baseInterface, innerInterface); }); } inline auto CustomXamlResourceLoader::Current() { return impl::call_factory_cast([](ICustomXamlResourceLoaderStatics const& f) { return f.Current(); }); } inline auto CustomXamlResourceLoader::Current(winrt::Windows::UI::Xaml::Resources::CustomXamlResourceLoader const& value) { impl::call_factory([&](ICustomXamlResourceLoaderStatics const& f) { return f.Current(value); }); } template auto ICustomXamlResourceLoaderOverridesT::GetResource(param::hstring const& resourceId, param::hstring const& objectType, param::hstring const& propertyName, param::hstring const& propertyType) const { return shim().template try_as().GetResource(resourceId, objectType, propertyName, propertyType); } template struct CustomXamlResourceLoaderT : implements, impl::require, impl::base, winrt::Windows::UI::Xaml::Resources::ICustomXamlResourceLoaderOverridesT { using composable = CustomXamlResourceLoader; protected: CustomXamlResourceLoaderT() { impl::call_factory([&](ICustomXamlResourceLoaderFactory const& f) { [[maybe_unused]] auto winrt_impl_discarded = f.CreateInstance(*this, this->m_inner); }); } }; } 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