// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.210930.14 #pragma once #ifndef WINRT_Windows_UI_Shell_H #define WINRT_Windows_UI_Shell_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.210930.14"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.210930.14" #include "winrt/Windows.UI.h" #include "winrt/impl/Windows.ApplicationModel.Core.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.UI.StartScreen.2.h" #include "winrt/impl/Windows.UI.Shell.2.h" namespace winrt::impl { template WINRT_IMPL_AUTO(hstring) consume_Windows_UI_Shell_IAdaptiveCard::ToJson() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::IAdaptiveCard)->ToJson(&result)); return hstring{ result, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::UI::Shell::IAdaptiveCard) consume_Windows_UI_Shell_IAdaptiveCardBuilderStatics::CreateAdaptiveCardFromJson(param::hstring const& value) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::IAdaptiveCardBuilderStatics)->CreateAdaptiveCardFromJson(*(void**)(&value), &result)); return winrt::Windows::UI::Shell::IAdaptiveCard{ result, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::guid) consume_Windows_UI_Shell_ISecurityAppManager::Register(winrt::Windows::UI::Shell::SecurityAppKind const& kind, param::hstring const& displayName, winrt::Windows::Foundation::Uri const& detailsUri, bool registerPerUser) const { winrt::guid result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ISecurityAppManager)->Register(static_cast(kind), *(void**)(&displayName), *(void**)(&detailsUri), registerPerUser, put_abi(result))); return result; } template WINRT_IMPL_AUTO(void) consume_Windows_UI_Shell_ISecurityAppManager::Unregister(winrt::Windows::UI::Shell::SecurityAppKind const& kind, winrt::guid const& guidRegistration) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ISecurityAppManager)->Unregister(static_cast(kind), impl::bind_in(guidRegistration))); } template WINRT_IMPL_AUTO(void) consume_Windows_UI_Shell_ISecurityAppManager::UpdateState(winrt::Windows::UI::Shell::SecurityAppKind const& kind, winrt::guid const& guidRegistration, winrt::Windows::UI::Shell::SecurityAppState const& state, winrt::Windows::UI::Shell::SecurityAppSubstatus const& substatus, winrt::Windows::Foundation::Uri const& detailsUri) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ISecurityAppManager)->UpdateState(static_cast(kind), impl::bind_in(guidRegistration), static_cast(state), static_cast(substatus), *(void**)(&detailsUri))); } template WINRT_IMPL_AUTO(bool) consume_Windows_UI_Shell_ITaskbarManager::IsSupported() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager)->get_IsSupported(&value)); return value; } template WINRT_IMPL_AUTO(bool) consume_Windows_UI_Shell_ITaskbarManager::IsPinningAllowed() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager)->get_IsPinningAllowed(&value)); return value; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation) consume_Windows_UI_Shell_ITaskbarManager::IsCurrentAppPinnedAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager)->IsCurrentAppPinnedAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation) consume_Windows_UI_Shell_ITaskbarManager::IsAppListEntryPinnedAsync(winrt::Windows::ApplicationModel::Core::AppListEntry const& appListEntry) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager)->IsAppListEntryPinnedAsync(*(void**)(&appListEntry), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation) consume_Windows_UI_Shell_ITaskbarManager::RequestPinCurrentAppAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager)->RequestPinCurrentAppAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation) consume_Windows_UI_Shell_ITaskbarManager::RequestPinAppListEntryAsync(winrt::Windows::ApplicationModel::Core::AppListEntry const& appListEntry) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager)->RequestPinAppListEntryAsync(*(void**)(&appListEntry), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation) consume_Windows_UI_Shell_ITaskbarManager2::IsSecondaryTilePinnedAsync(param::hstring const& tileId) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager2)->IsSecondaryTilePinnedAsync(*(void**)(&tileId), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation) consume_Windows_UI_Shell_ITaskbarManager2::RequestPinSecondaryTileAsync(winrt::Windows::UI::StartScreen::SecondaryTile const& secondaryTile) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager2)->RequestPinSecondaryTileAsync(*(void**)(&secondaryTile), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::Foundation::IAsyncOperation) consume_Windows_UI_Shell_ITaskbarManager2::TryUnpinSecondaryTileAsync(param::hstring const& tileId) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManager2)->TryUnpinSecondaryTileAsync(*(void**)(&tileId), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template WINRT_IMPL_AUTO(winrt::Windows::UI::Shell::TaskbarManager) consume_Windows_UI_Shell_ITaskbarManagerStatics::GetDefault() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::Shell::ITaskbarManagerStatics)->GetDefault(&result)); return winrt::Windows::UI::Shell::TaskbarManager{ result, take_ownership_from_abi }; } template struct produce : produce_base { int32_t __stdcall ToJson(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().ToJson()); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall CreateAdaptiveCardFromJson(void* value, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateAdaptiveCardFromJson(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Register(int32_t kind, void* displayName, void* detailsUri, bool registerPerUser, winrt::guid* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Register(*reinterpret_cast(&kind), *reinterpret_cast(&displayName), *reinterpret_cast(&detailsUri), registerPerUser)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Unregister(int32_t kind, winrt::guid guidRegistration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Unregister(*reinterpret_cast(&kind), *reinterpret_cast(&guidRegistration)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateState(int32_t kind, winrt::guid guidRegistration, int32_t state, int32_t substatus, void* detailsUri) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateState(*reinterpret_cast(&kind), *reinterpret_cast(&guidRegistration), *reinterpret_cast(&state), *reinterpret_cast(&substatus), *reinterpret_cast(&detailsUri)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsSupported(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsPinningAllowed(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPinningAllowed()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsCurrentAppPinnedAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().IsCurrentAppPinnedAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsAppListEntryPinnedAsync(void* appListEntry, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().IsAppListEntryPinnedAsync(*reinterpret_cast(&appListEntry))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestPinCurrentAppAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestPinCurrentAppAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestPinAppListEntryAsync(void* appListEntry, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestPinAppListEntryAsync(*reinterpret_cast(&appListEntry))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsSecondaryTilePinnedAsync(void* tileId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().IsSecondaryTilePinnedAsync(*reinterpret_cast(&tileId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestPinSecondaryTileAsync(void* secondaryTile, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestPinSecondaryTileAsync(*reinterpret_cast(&secondaryTile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall TryUnpinSecondaryTileAsync(void* tileId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().TryUnpinSecondaryTileAsync(*reinterpret_cast(&tileId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::UI::Shell { inline auto AdaptiveCardBuilder::CreateAdaptiveCardFromJson(param::hstring const& value) { return impl::call_factory([&](IAdaptiveCardBuilderStatics const& f) { return f.CreateAdaptiveCardFromJson(value); }); } inline SecurityAppManager::SecurityAppManager() : SecurityAppManager(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto TaskbarManager::GetDefault() { return impl::call_factory_cast([](ITaskbarManagerStatics const& f) { return f.GetDefault(); }); } } 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 {}; 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