// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_UI_ApplicationSettings_H #define WINRT_Windows_UI_ApplicationSettings_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.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Security.Credentials.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.UI.Popups.2.h" #include "winrt/impl/Windows.UI.ApplicationSettings.2.h" namespace winrt::impl { template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPane::AccountCommandsRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPane)->add_AccountCommandsRequested(*(void**)(&handler), put_abi(cookie))); return cookie; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPane::AccountCommandsRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AccountCommandsRequested(handler)); } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPane::AccountCommandsRequested(winrt::event_token const& cookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPane)->remove_AccountCommandsRequested(impl::bind_in(cookie)); } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneCommandsRequestedEventArgs::WebAccountProviderCommands() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs)->get_WebAccountProviderCommands(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneCommandsRequestedEventArgs::WebAccountCommands() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs)->get_WebAccountCommands(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneCommandsRequestedEventArgs::CredentialCommands() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs)->get_CredentialCommands(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneCommandsRequestedEventArgs::Commands() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs)->get_Commands(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneCommandsRequestedEventArgs::HeaderText() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs)->get_HeaderText(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneCommandsRequestedEventArgs::HeaderText(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs)->put_HeaderText(*(void**)(&value))); } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneCommandsRequestedEventArgs::GetDeferral() const { void* deferral{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs)->GetDeferral(&deferral)); return winrt::Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral{ deferral, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneCommandsRequestedEventArgs2::User() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs2)->get_User(&value)); return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneEventDeferral::Complete() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneEventDeferral)->Complete()); } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneStatics::GetForCurrentView() const { void* current{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics)->GetForCurrentView(¤t)); return winrt::Windows::UI::ApplicationSettings::AccountsSettingsPane{ current, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneStatics::Show() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics)->Show()); } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneStatics2::ShowManageAccountsAsync() const { void* asyncInfo{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics2)->ShowManageAccountsAsync(&asyncInfo)); return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneStatics2::ShowAddAccountAsync() const { void* asyncInfo{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics2)->ShowAddAccountAsync(&asyncInfo)); return winrt::Windows::Foundation::IAsyncAction{ asyncInfo, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneStatics3::ShowManageAccountsForUserAsync(winrt::Windows::System::User const& user) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics3)->ShowManageAccountsForUserAsync(*(void**)(&user), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IAccountsSettingsPaneStatics3::ShowAddAccountForUserAsync(winrt::Windows::System::User const& user) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics3)->ShowAddAccountForUserAsync(*(void**)(&user), &operation)); return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ICredentialCommand::PasswordCredential() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ICredentialCommand)->get_PasswordCredential(&value)); return winrt::Windows::Security::Credentials::PasswordCredential{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ICredentialCommand::CredentialDeleted() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ICredentialCommand)->get_CredentialDeleted(&value)); return winrt::Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ICredentialCommandFactory::CreateCredentialCommand(winrt::Windows::Security::Credentials::PasswordCredential const& passwordCredential) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ICredentialCommandFactory)->CreateCredentialCommand(*(void**)(&passwordCredential), &instance)); return winrt::Windows::UI::ApplicationSettings::CredentialCommand{ instance, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ICredentialCommandFactory::CreateCredentialCommandWithHandler(winrt::Windows::Security::Credentials::PasswordCredential const& passwordCredential, winrt::Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler const& deleted) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ICredentialCommandFactory)->CreateCredentialCommandWithHandler(*(void**)(&passwordCredential), *(void**)(&deleted), &instance)); return winrt::Windows::UI::ApplicationSettings::CredentialCommand{ instance, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ISettingsCommandFactory::CreateSettingsCommand(winrt::Windows::Foundation::IInspectable const& settingsCommandId, param::hstring const& label, winrt::Windows::UI::Popups::UICommandInvokedHandler const& handler) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsCommandFactory)->CreateSettingsCommand(*(void**)(&settingsCommandId), *(void**)(&label), *(void**)(&handler), &instance)); return winrt::Windows::UI::ApplicationSettings::SettingsCommand{ instance, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ISettingsCommandStatics::AccountsCommand() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsCommandStatics)->get_AccountsCommand(&value)); return winrt::Windows::UI::ApplicationSettings::SettingsCommand{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ISettingsPane::CommandsRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token cookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsPane)->add_CommandsRequested(*(void**)(&handler), put_abi(cookie))); return cookie; } template auto consume_Windows_UI_ApplicationSettings_ISettingsPane::CommandsRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, CommandsRequested(handler)); } template auto consume_Windows_UI_ApplicationSettings_ISettingsPane::CommandsRequested(winrt::event_token const& cookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsPane)->remove_CommandsRequested(impl::bind_in(cookie)); } template auto consume_Windows_UI_ApplicationSettings_ISettingsPaneCommandsRequest::ApplicationCommands() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequest)->get_ApplicationCommands(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ISettingsPaneCommandsRequestedEventArgs::Request() const { void* request{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequestedEventArgs)->get_Request(&request)); return winrt::Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest{ request, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ISettingsPaneStatics::GetForCurrentView() const { void* current{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsPaneStatics)->GetForCurrentView(¤t)); return winrt::Windows::UI::ApplicationSettings::SettingsPane{ current, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_ISettingsPaneStatics::Show() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsPaneStatics)->Show()); } template auto consume_Windows_UI_ApplicationSettings_ISettingsPaneStatics::Edge() const { winrt::Windows::UI::ApplicationSettings::SettingsEdgeLocation value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::ISettingsPaneStatics)->get_Edge(reinterpret_cast(&value))); return value; } template auto consume_Windows_UI_ApplicationSettings_IWebAccountCommand::WebAccount() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IWebAccountCommand)->get_WebAccount(&value)); return winrt::Windows::Security::Credentials::WebAccount{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IWebAccountCommand::Invoked() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IWebAccountCommand)->get_Invoked(&value)); return winrt::Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IWebAccountCommand::Actions() const { winrt::Windows::UI::ApplicationSettings::SupportedWebAccountActions value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IWebAccountCommand)->get_Actions(reinterpret_cast(&value))); return value; } template auto consume_Windows_UI_ApplicationSettings_IWebAccountCommandFactory::CreateWebAccountCommand(winrt::Windows::Security::Credentials::WebAccount const& webAccount, winrt::Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler const& invoked, winrt::Windows::UI::ApplicationSettings::SupportedWebAccountActions const& actions) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IWebAccountCommandFactory)->CreateWebAccountCommand(*(void**)(&webAccount), *(void**)(&invoked), static_cast(actions), &instance)); return winrt::Windows::UI::ApplicationSettings::WebAccountCommand{ instance, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IWebAccountInvokedArgs::Action() const { winrt::Windows::UI::ApplicationSettings::WebAccountAction action{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IWebAccountInvokedArgs)->get_Action(reinterpret_cast(&action))); return action; } template auto consume_Windows_UI_ApplicationSettings_IWebAccountProviderCommand::WebAccountProvider() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IWebAccountProviderCommand)->get_WebAccountProvider(&value)); return winrt::Windows::Security::Credentials::WebAccountProvider{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IWebAccountProviderCommand::Invoked() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IWebAccountProviderCommand)->get_Invoked(&value)); return winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler{ value, take_ownership_from_abi }; } template auto consume_Windows_UI_ApplicationSettings_IWebAccountProviderCommandFactory::CreateWebAccountProviderCommand(winrt::Windows::Security::Credentials::WebAccountProvider const& webAccountProvider, winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler const& invoked) const { void* instance{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::UI::ApplicationSettings::IWebAccountProviderCommandFactory)->CreateWebAccountProviderCommand(*(void**)(&webAccountProvider), *(void**)(&invoked), &instance)); return winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommand{ instance, take_ownership_from_abi }; } template struct delegate final : implements_delegate { delegate(H&& handler) : implements_delegate(std::forward(handler)) {} int32_t __stdcall Invoke(void* command) noexcept final try { (*this)(*reinterpret_cast(&command)); 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* command, void* args) noexcept final try { (*this)(*reinterpret_cast(&command), *reinterpret_cast(&args)); 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* command) noexcept final try { (*this)(*reinterpret_cast(&command)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_AccountCommandsRequested(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().AccountCommandsRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AccountCommandsRequested(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AccountCommandsRequested(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WebAccountProviderCommands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().WebAccountProviderCommands()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WebAccountCommands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().WebAccountCommands()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CredentialCommands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().CredentialCommands()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Commands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Commands()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HeaderText(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HeaderText()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_HeaderText(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().HeaderText(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** deferral) noexcept final try { clear_abi(deferral); typename D::abi_guard guard(this->shim()); *deferral = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Complete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Complete(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** current) noexcept final try { clear_abi(current); typename D::abi_guard guard(this->shim()); *current = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Show() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ShowManageAccountsAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().ShowManageAccountsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowAddAccountAsync(void** asyncInfo) noexcept final try { clear_abi(asyncInfo); typename D::abi_guard guard(this->shim()); *asyncInfo = detach_from(this->shim().ShowAddAccountAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ShowManageAccountsForUserAsync(void* user, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ShowManageAccountsForUserAsync(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowAddAccountForUserAsync(void* user, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().ShowAddAccountForUserAsync(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PasswordCredential(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PasswordCredential()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CredentialDeleted(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CredentialDeleted()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateCredentialCommand(void* passwordCredential, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().CreateCredentialCommand(*reinterpret_cast(&passwordCredential))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateCredentialCommandWithHandler(void* passwordCredential, void* deleted, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().CreateCredentialCommandWithHandler(*reinterpret_cast(&passwordCredential), *reinterpret_cast(&deleted))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateSettingsCommand(void* settingsCommandId, void* label, void* handler, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().CreateSettingsCommand(*reinterpret_cast(&settingsCommandId), *reinterpret_cast(&label), *reinterpret_cast(&handler))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AccountsCommand(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AccountsCommand()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_CommandsRequested(void* handler, winrt::event_token* cookie) noexcept final try { zero_abi(cookie); typename D::abi_guard guard(this->shim()); *cookie = detach_from(this->shim().CommandsRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_CommandsRequested(winrt::event_token cookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().CommandsRequested(*reinterpret_cast(&cookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ApplicationCommands(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ApplicationCommands()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Request(void** request) noexcept final try { clear_abi(request); typename D::abi_guard guard(this->shim()); *request = detach_from(this->shim().Request()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForCurrentView(void** current) noexcept final try { clear_abi(current); typename D::abi_guard guard(this->shim()); *current = detach_from(this->shim().GetForCurrentView()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Show() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Edge(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Edge()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WebAccount(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WebAccount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Invoked(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Invoked()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Actions(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Actions()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWebAccountCommand(void* webAccount, void* invoked, uint32_t actions, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().CreateWebAccountCommand(*reinterpret_cast(&webAccount), *reinterpret_cast(&invoked), *reinterpret_cast(&actions))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Action(int32_t* action) noexcept final try { typename D::abi_guard guard(this->shim()); *action = detach_from(this->shim().Action()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_WebAccountProvider(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WebAccountProvider()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Invoked(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Invoked()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWebAccountProviderCommand(void* webAccountProvider, void* invoked, void** instance) noexcept final try { clear_abi(instance); typename D::abi_guard guard(this->shim()); *instance = detach_from(this->shim().CreateWebAccountProviderCommand(*reinterpret_cast(&webAccountProvider), *reinterpret_cast(&invoked))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::UI::ApplicationSettings { constexpr auto operator|(SupportedWebAccountActions const left, SupportedWebAccountActions const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(SupportedWebAccountActions& left, SupportedWebAccountActions const right) noexcept { left = left | right; return left; } constexpr auto operator&(SupportedWebAccountActions const left, SupportedWebAccountActions const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(SupportedWebAccountActions& left, SupportedWebAccountActions const right) noexcept { left = left & right; return left; } constexpr auto operator~(SupportedWebAccountActions const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(SupportedWebAccountActions const left, SupportedWebAccountActions const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(SupportedWebAccountActions& left, SupportedWebAccountActions const right) noexcept { left = left ^ right; return left; } inline auto AccountsSettingsPane::GetForCurrentView() { return impl::call_factory_cast([](IAccountsSettingsPaneStatics const& f) { return f.GetForCurrentView(); }); } inline auto AccountsSettingsPane::Show() { impl::call_factory_cast([](IAccountsSettingsPaneStatics const& f) { return f.Show(); }); } inline auto AccountsSettingsPane::ShowManageAccountsAsync() { return impl::call_factory_cast([](IAccountsSettingsPaneStatics2 const& f) { return f.ShowManageAccountsAsync(); }); } inline auto AccountsSettingsPane::ShowAddAccountAsync() { return impl::call_factory_cast([](IAccountsSettingsPaneStatics2 const& f) { return f.ShowAddAccountAsync(); }); } inline auto AccountsSettingsPane::ShowManageAccountsForUserAsync(winrt::Windows::System::User const& user) { return impl::call_factory([&](IAccountsSettingsPaneStatics3 const& f) { return f.ShowManageAccountsForUserAsync(user); }); } inline auto AccountsSettingsPane::ShowAddAccountForUserAsync(winrt::Windows::System::User const& user) { return impl::call_factory([&](IAccountsSettingsPaneStatics3 const& f) { return f.ShowAddAccountForUserAsync(user); }); } inline CredentialCommand::CredentialCommand(winrt::Windows::Security::Credentials::PasswordCredential const& passwordCredential) : CredentialCommand(impl::call_factory([&](ICredentialCommandFactory const& f) { return f.CreateCredentialCommand(passwordCredential); })) { } inline CredentialCommand::CredentialCommand(winrt::Windows::Security::Credentials::PasswordCredential const& passwordCredential, winrt::Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler const& deleted) : CredentialCommand(impl::call_factory([&](ICredentialCommandFactory const& f) { return f.CreateCredentialCommandWithHandler(passwordCredential, deleted); })) { } inline SettingsCommand::SettingsCommand(winrt::Windows::Foundation::IInspectable const& settingsCommandId, param::hstring const& label, winrt::Windows::UI::Popups::UICommandInvokedHandler const& handler) : SettingsCommand(impl::call_factory([&](ISettingsCommandFactory const& f) { return f.CreateSettingsCommand(settingsCommandId, label, handler); })) { } inline auto SettingsCommand::AccountsCommand() { return impl::call_factory_cast([](ISettingsCommandStatics const& f) { return f.AccountsCommand(); }); } inline auto SettingsPane::GetForCurrentView() { return impl::call_factory_cast([](ISettingsPaneStatics const& f) { return f.GetForCurrentView(); }); } inline auto SettingsPane::Show() { impl::call_factory_cast([](ISettingsPaneStatics const& f) { return f.Show(); }); } inline auto SettingsPane::Edge() { return impl::call_factory_cast([](ISettingsPaneStatics const& f) { return f.Edge(); }); } inline WebAccountCommand::WebAccountCommand(winrt::Windows::Security::Credentials::WebAccount const& webAccount, winrt::Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler const& invoked, winrt::Windows::UI::ApplicationSettings::SupportedWebAccountActions const& actions) : WebAccountCommand(impl::call_factory([&](IWebAccountCommandFactory const& f) { return f.CreateWebAccountCommand(webAccount, invoked, actions); })) { } inline WebAccountProviderCommand::WebAccountProviderCommand(winrt::Windows::Security::Credentials::WebAccountProvider const& webAccountProvider, winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler const& invoked) : WebAccountProviderCommand(impl::call_factory([&](IWebAccountProviderCommandFactory const& f) { return f.CreateWebAccountProviderCommand(webAccountProvider, invoked); })) { } template CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(L handler) : CredentialCommandCredentialDeletedHandler(impl::make_delegate(std::forward(handler))) { } template CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(F* handler) : CredentialCommandCredentialDeletedHandler([=](auto&&... args) { return handler(args...); }) { } template CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(O* object, M method) : CredentialCommandCredentialDeletedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(com_ptr&& object, M method) : CredentialCommandCredentialDeletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(weak_ref&& object, LM&& lambda_or_method) : CredentialCommandCredentialDeletedHandler([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 CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(std::shared_ptr&& object, M method) : CredentialCommandCredentialDeletedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(std::weak_ptr&& object, LM&& lambda_or_method) : CredentialCommandCredentialDeletedHandler([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 CredentialCommandCredentialDeletedHandler::operator()(winrt::Windows::UI::ApplicationSettings::CredentialCommand const& command) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&command))); } template WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(L handler) : WebAccountCommandInvokedHandler(impl::make_delegate(std::forward(handler))) { } template WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(F* handler) : WebAccountCommandInvokedHandler([=](auto&&... args) { return handler(args...); }) { } template WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(O* object, M method) : WebAccountCommandInvokedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(com_ptr&& object, M method) : WebAccountCommandInvokedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(weak_ref&& object, LM&& lambda_or_method) : WebAccountCommandInvokedHandler([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 WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(std::shared_ptr&& object, M method) : WebAccountCommandInvokedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(std::weak_ptr&& object, LM&& lambda_or_method) : WebAccountCommandInvokedHandler([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 WebAccountCommandInvokedHandler::operator()(winrt::Windows::UI::ApplicationSettings::WebAccountCommand const& command, winrt::Windows::UI::ApplicationSettings::WebAccountInvokedArgs const& args) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&command), *(void**)(&args))); } template WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(L handler) : WebAccountProviderCommandInvokedHandler(impl::make_delegate(std::forward(handler))) { } template WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(F* handler) : WebAccountProviderCommandInvokedHandler([=](auto&&... args) { return handler(args...); }) { } template WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(O* object, M method) : WebAccountProviderCommandInvokedHandler([=](auto&&... args) { return ((*object).*(method))(args...); }) { } template WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(com_ptr&& object, M method) : WebAccountProviderCommandInvokedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(weak_ref&& object, LM&& lambda_or_method) : WebAccountProviderCommandInvokedHandler([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 WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(std::shared_ptr&& object, M method) : WebAccountProviderCommandInvokedHandler([o = std::move(object), method](auto&&... args) { return ((*o).*(method))(args...); }) { } template WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(std::weak_ptr&& object, LM&& lambda_or_method) : WebAccountProviderCommandInvokedHandler([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 WebAccountProviderCommandInvokedHandler::operator()(winrt::Windows::UI::ApplicationSettings::WebAccountProviderCommand const& command) const { check_hresult((*(impl::abi_t**)this)->Invoke(*(void**)(&command))); } } 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 {}; 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 {}; 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