// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Gaming_Preview_GamesEnumeration_H #define WINRT_Windows_Gaming_Preview_GamesEnumeration_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/Windows.ApplicationModel.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Gaming.Preview.GamesEnumeration.2.h" namespace winrt::impl { template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry::DisplayInfo() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DisplayInfo(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayInfo(&value)); } return winrt::Windows::ApplicationModel::AppDisplayInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry::LaunchAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->LaunchAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->LaunchAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry::Category() const { winrt::Windows::Gaming::Preview::GamesEnumeration::GameListCategory value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Category(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Category(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry::Properties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Properties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Properties(&value)); } return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry::SetCategoryAsync(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListCategory const& value) const { void* action{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetCategoryAsync(static_cast(value), &action)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetCategoryAsync(static_cast(value), &action)); } return winrt::Windows::Foundation::IAsyncAction{ action, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry2::LaunchableState() const { winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntryLaunchableState value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_LaunchableState(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LaunchableState(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry2::LauncherExecutable() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_LauncherExecutable(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LauncherExecutable(&value)); } return winrt::Windows::Storage::IStorageFile{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry2::LaunchParameters() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_LaunchParameters(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LaunchParameters(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry2::SetLauncherExecutableFileAsync(winrt::Windows::Storage::IStorageFile const& executableFile) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetLauncherExecutableFileAsync(*(void**)(&executableFile), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetLauncherExecutableFileAsync(*(void**)(&executableFile), &operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry2::SetLauncherExecutableFileAsync(winrt::Windows::Storage::IStorageFile const& executableFile, param::hstring const& launchParams) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetLauncherExecutableFileWithParamsAsync(*(void**)(&executableFile), *(void**)(&launchParams), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetLauncherExecutableFileWithParamsAsync(*(void**)(&executableFile), *(void**)(&launchParams), &operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry2::TitleId() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TitleId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TitleId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry2::SetTitleIdAsync(param::hstring const& id) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetTitleIdAsync(*(void**)(&id), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetTitleIdAsync(*(void**)(&id), &operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListEntry2::GameModeConfiguration() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_GameModeConfiguration(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GameModeConfiguration(&value)); } return winrt::Windows::Gaming::Preview::GamesEnumeration::GameModeConfiguration{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::FindAllAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::FindAllAsync(param::hstring const& packageFamilyName) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAllAsyncPackageFamilyName(*(void**)(&packageFamilyName), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindAllAsyncPackageFamilyName(*(void**)(&packageFamilyName), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameAdded(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_GameAdded(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_GameAdded(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameAdded(auto_revoke_t, winrt::Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler const& handler) const { return impl::make_event_revoker(this, GameAdded(handler)); } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameAdded(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_GameAdded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_GameAdded(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameRemoved(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListRemovedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_GameRemoved(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_GameRemoved(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameRemoved(auto_revoke_t, winrt::Windows::Gaming::Preview::GamesEnumeration::GameListRemovedEventHandler const& handler) const { return impl::make_event_revoker(this, GameRemoved(handler)); } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameRemoved(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_GameRemoved(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_GameRemoved(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameUpdated(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_GameUpdated(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_GameUpdated(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameUpdated(auto_revoke_t, winrt::Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler const& handler) const { return impl::make_event_revoker(this, GameUpdated(handler)); } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics::GameUpdated(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_GameUpdated(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_GameUpdated(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics2::MergeEntriesAsync(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntry const& left, winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntry const& right) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MergeEntriesAsync(*(void**)(&left), *(void**)(&right), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MergeEntriesAsync(*(void**)(&left), *(void**)(&right), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameListStatics2::UnmergeEntryAsync(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntry const& mergedEntry) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->UnmergeEntryAsync(*(void**)(&mergedEntry), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UnmergeEntryAsync(*(void**)(&mergedEntry), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::IsEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } return value; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::IsEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::RelatedProcessNames() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RelatedProcessNames(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RelatedProcessNames(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::PercentGpuTimeAllocatedToGame() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PercentGpuTimeAllocatedToGame(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PercentGpuTimeAllocatedToGame(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::PercentGpuTimeAllocatedToGame(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PercentGpuTimeAllocatedToGame(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PercentGpuTimeAllocatedToGame(*(void**)(&value))); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::PercentGpuMemoryAllocatedToGame() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PercentGpuMemoryAllocatedToGame(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PercentGpuMemoryAllocatedToGame(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::PercentGpuMemoryAllocatedToGame(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PercentGpuMemoryAllocatedToGame(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PercentGpuMemoryAllocatedToGame(*(void**)(&value))); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::PercentGpuMemoryAllocatedToSystemCompositor() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PercentGpuMemoryAllocatedToSystemCompositor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PercentGpuMemoryAllocatedToSystemCompositor(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::PercentGpuMemoryAllocatedToSystemCompositor(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PercentGpuMemoryAllocatedToSystemCompositor(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PercentGpuMemoryAllocatedToSystemCompositor(*(void**)(&value))); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::MaxCpuCount() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MaxCpuCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxCpuCount(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::MaxCpuCount(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_MaxCpuCount(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MaxCpuCount(*(void**)(&value))); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::CpuExclusivityMaskLow() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CpuExclusivityMaskLow(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CpuExclusivityMaskLow(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::CpuExclusivityMaskLow(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CpuExclusivityMaskLow(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CpuExclusivityMaskLow(*(void**)(&value))); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::CpuExclusivityMaskHigh() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CpuExclusivityMaskHigh(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CpuExclusivityMaskHigh(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::CpuExclusivityMaskHigh(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CpuExclusivityMaskHigh(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CpuExclusivityMaskHigh(*(void**)(&value))); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::AffinitizeToExclusiveCpus() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AffinitizeToExclusiveCpus(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AffinitizeToExclusiveCpus(&value)); } return value; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::AffinitizeToExclusiveCpus(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AffinitizeToExclusiveCpus(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AffinitizeToExclusiveCpus(value)); } } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeConfiguration::SaveAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SaveAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SaveAsync(&operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeUserConfiguration::GamingRelatedProcessNames() const { void* processNames{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_GamingRelatedProcessNames(&processNames)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GamingRelatedProcessNames(&processNames)); } return winrt::Windows::Foundation::Collections::IVector{ processNames, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeUserConfiguration::SaveAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SaveAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SaveAsync(&operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Preview_GamesEnumeration_IGameModeUserConfigurationStatics::GetDefault() const { void* userConfiguration{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDefault(&userConfiguration)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDefault(&userConfiguration)); } return winrt::Windows::Gaming::Preview::GamesEnumeration::GameModeUserConfiguration{ userConfiguration, take_ownership_from_abi }; } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* game) noexcept final try { (*this)(*reinterpret_cast(&game)); return 0; } catch (...) { return to_hresult(); } }; template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* identifier) noexcept final try { (*this)(*reinterpret_cast(&identifier)); return 0; } catch (...) { return to_hresult(); } }; template struct produce : produce_base { int32_t __stdcall get_DisplayInfo(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayInfo()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall LaunchAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().LaunchAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Category(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Category()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Properties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Properties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetCategoryAsync(int32_t value, void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().SetCategoryAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_LaunchableState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LaunchableState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LauncherExecutable(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LauncherExecutable()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LaunchParameters(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LaunchParameters()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetLauncherExecutableFileAsync(void* executableFile, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetLauncherExecutableFileAsync(*reinterpret_cast(&executableFile))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetLauncherExecutableFileWithParamsAsync(void* executableFile, void* launchParams, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetLauncherExecutableFileAsync(*reinterpret_cast(&executableFile), *reinterpret_cast(&launchParams))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TitleId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TitleId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetTitleIdAsync(void* id, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetTitleIdAsync(*reinterpret_cast(&id))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GameModeConfiguration(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GameModeConfiguration()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FindAllAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindAllAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FindAllAsyncPackageFamilyName(void* packageFamilyName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindAllAsync(*reinterpret_cast(&packageFamilyName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_GameAdded(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GameAdded(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GameAdded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GameAdded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_GameRemoved(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GameRemoved(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GameRemoved(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GameRemoved(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_GameUpdated(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GameUpdated(*reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GameUpdated(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GameUpdated(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall MergeEntriesAsync(void* left, void* right, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().MergeEntriesAsync(*reinterpret_cast(&left), *reinterpret_cast(&right))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UnmergeEntryAsync(void* mergedEntry, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().UnmergeEntryAsync(*reinterpret_cast(&mergedEntry))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RelatedProcessNames(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RelatedProcessNames()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PercentGpuTimeAllocatedToGame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PercentGpuTimeAllocatedToGame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PercentGpuTimeAllocatedToGame(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PercentGpuTimeAllocatedToGame(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PercentGpuMemoryAllocatedToGame(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PercentGpuMemoryAllocatedToGame()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PercentGpuMemoryAllocatedToGame(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PercentGpuMemoryAllocatedToGame(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PercentGpuMemoryAllocatedToSystemCompositor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PercentGpuMemoryAllocatedToSystemCompositor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PercentGpuMemoryAllocatedToSystemCompositor(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PercentGpuMemoryAllocatedToSystemCompositor(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxCpuCount(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().MaxCpuCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxCpuCount(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxCpuCount(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CpuExclusivityMaskLow(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().CpuExclusivityMaskLow()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CpuExclusivityMaskLow(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CpuExclusivityMaskLow(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CpuExclusivityMaskHigh(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().CpuExclusivityMaskHigh()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CpuExclusivityMaskHigh(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CpuExclusivityMaskHigh(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AffinitizeToExclusiveCpus(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AffinitizeToExclusiveCpus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AffinitizeToExclusiveCpus(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AffinitizeToExclusiveCpus(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SaveAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SaveAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_GamingRelatedProcessNames(void** processNames) noexcept final try { clear_abi(processNames); typename D::abi_guard guard(this->shim()); *processNames = detach_from>(this->shim().GamingRelatedProcessNames()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SaveAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SaveAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** userConfiguration) noexcept final try { clear_abi(userConfiguration); typename D::abi_guard guard(this->shim()); *userConfiguration = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Gaming::Preview::GamesEnumeration { inline auto GameList::FindAllAsync() { return impl::call_factory_cast>(*)(IGameListStatics const&), GameList, IGameListStatics>([](IGameListStatics const& f) { return f.FindAllAsync(); }); } inline auto GameList::FindAllAsync(param::hstring const& packageFamilyName) { return impl::call_factory([&](IGameListStatics const& f) { return f.FindAllAsync(packageFamilyName); }); } inline auto GameList::GameAdded(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler const& handler) { return impl::call_factory([&](IGameListStatics const& f) { return f.GameAdded(handler); }); } inline auto GameList::GameAdded(auto_revoke_t, winrt::Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler const& handler) { auto f = get_activation_factory(); return GameList::GameAdded_revoker{ f, f.GameAdded(handler) }; } inline auto GameList::GameAdded(winrt::event_token const& token) { impl::call_factory([&](IGameListStatics const& f) { return f.GameAdded(token); }); } inline auto GameList::GameRemoved(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListRemovedEventHandler const& handler) { return impl::call_factory([&](IGameListStatics const& f) { return f.GameRemoved(handler); }); } inline auto GameList::GameRemoved(auto_revoke_t, winrt::Windows::Gaming::Preview::GamesEnumeration::GameListRemovedEventHandler const& handler) { auto f = get_activation_factory(); return GameList::GameRemoved_revoker{ f, f.GameRemoved(handler) }; } inline auto GameList::GameRemoved(winrt::event_token const& token) { impl::call_factory([&](IGameListStatics const& f) { return f.GameRemoved(token); }); } inline auto GameList::GameUpdated(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler const& handler) { return impl::call_factory([&](IGameListStatics const& f) { return f.GameUpdated(handler); }); } inline auto GameList::GameUpdated(auto_revoke_t, winrt::Windows::Gaming::Preview::GamesEnumeration::GameListChangedEventHandler const& handler) { auto f = get_activation_factory(); return GameList::GameUpdated_revoker{ f, f.GameUpdated(handler) }; } inline auto GameList::GameUpdated(winrt::event_token const& token) { impl::call_factory([&](IGameListStatics const& f) { return f.GameUpdated(token); }); } inline auto GameList::MergeEntriesAsync(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntry const& left, winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntry const& right) { return impl::call_factory([&](IGameListStatics2 const& f) { return f.MergeEntriesAsync(left, right); }); } inline auto GameList::UnmergeEntryAsync(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntry const& mergedEntry) { return impl::call_factory([&](IGameListStatics2 const& f) { return f.UnmergeEntryAsync(mergedEntry); }); } inline auto GameModeUserConfiguration::GetDefault() { return impl::call_factory_cast([](IGameModeUserConfigurationStatics const& f) { return f.GetDefault(); }); } template GameListChangedEventHandler::GameListChangedEventHandler(L handler) : GameListChangedEventHandler(impl::make_delegate(std::forward(handler))) { } template GameListChangedEventHandler::GameListChangedEventHandler(F* handler) : GameListChangedEventHandler([=](auto&&... args) { return handler(args...); }) { } template GameListChangedEventHandler::GameListChangedEventHandler(O* object, M method) : GameListChangedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template GameListChangedEventHandler::GameListChangedEventHandler(com_ptr&& object, M method) : GameListChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template GameListChangedEventHandler::GameListChangedEventHandler(weak_ref&& object, LM&& lambda_or_method) : GameListChangedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template GameListChangedEventHandler::GameListChangedEventHandler(std::shared_ptr&& object, M method) : GameListChangedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template GameListChangedEventHandler::GameListChangedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : GameListChangedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto GameListChangedEventHandler::operator()(winrt::Windows::Gaming::Preview::GamesEnumeration::GameListEntry const& game) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&game))); } template GameListRemovedEventHandler::GameListRemovedEventHandler(L handler) : GameListRemovedEventHandler(impl::make_delegate(std::forward(handler))) { } template GameListRemovedEventHandler::GameListRemovedEventHandler(F* handler) : GameListRemovedEventHandler([=](auto&&... args) { return handler(args...); }) { } template GameListRemovedEventHandler::GameListRemovedEventHandler(O* object, M method) : GameListRemovedEventHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template GameListRemovedEventHandler::GameListRemovedEventHandler(com_ptr&& object, M method) : GameListRemovedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template GameListRemovedEventHandler::GameListRemovedEventHandler(weak_ref&& object, LM&& lambda_or_method) : GameListRemovedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.get()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } template GameListRemovedEventHandler::GameListRemovedEventHandler(std::shared_ptr&& object, M method) : GameListRemovedEventHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template GameListRemovedEventHandler::GameListRemovedEventHandler(std::weak_ptr&& object, LM&& lambda_or_method) : GameListRemovedEventHandler([o = std::move(object), lm = std::forward(lambda_or_method)](auto&&... args) { if (auto s = o.lock()) { if constexpr (std::is_member_function_pointer_v) ((*s).*(lm))(args...); else lm(args...); } }) { } inline auto GameListRemovedEventHandler::operator()(param::hstring const& identifier) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&identifier))); } } 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 {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif