// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Gaming_Input_H #define WINRT_Windows_Gaming_Input_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.Devices.Haptics.2.h" #include "winrt/impl/Windows.Devices.Power.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Gaming.Input.ForceFeedback.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.Gaming.Input.2.h" namespace winrt::impl { template auto consume_Windows_Gaming_Input_IArcadeStick::GetButtonLabel(winrt::Windows::Gaming::Input::ArcadeStickButtons const& button) const { winrt::Windows::Gaming::Input::GameControllerButtonLabel 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->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IArcadeStick::GetCurrentReading() const { winrt::Windows::Gaming::Input::ArcadeStickReading 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->GetCurrentReading(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentReading(put_abi(value))); } return value; } template auto consume_Windows_Gaming_Input_IArcadeStickStatics::ArcadeStickAdded(winrt::Windows::Foundation::EventHandler const& value) 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_ArcadeStickAdded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ArcadeStickAdded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IArcadeStickStatics::ArcadeStickAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, ArcadeStickAdded(value)); } template auto consume_Windows_Gaming_Input_IArcadeStickStatics::ArcadeStickAdded(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_ArcadeStickAdded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ArcadeStickAdded(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IArcadeStickStatics::ArcadeStickRemoved(winrt::Windows::Foundation::EventHandler const& value) 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_ArcadeStickRemoved(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ArcadeStickRemoved(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IArcadeStickStatics::ArcadeStickRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, ArcadeStickRemoved(value)); } template auto consume_Windows_Gaming_Input_IArcadeStickStatics::ArcadeStickRemoved(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_ArcadeStickRemoved(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ArcadeStickRemoved(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IArcadeStickStatics::ArcadeSticks() 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_ArcadeSticks(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ArcadeSticks(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IArcadeStickStatics2::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) 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->FromGameController(*(void**)(&gameController), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromGameController(*(void**)(&gameController), &value)); } return winrt::Windows::Gaming::Input::ArcadeStick{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IFlightStick::HatSwitchKind() const { winrt::Windows::Gaming::Input::GameControllerSwitchKind 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_HatSwitchKind(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HatSwitchKind(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IFlightStick::GetButtonLabel(winrt::Windows::Gaming::Input::FlightStickButtons const& button) const { winrt::Windows::Gaming::Input::GameControllerButtonLabel 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->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IFlightStick::GetCurrentReading() const { winrt::Windows::Gaming::Input::FlightStickReading 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->GetCurrentReading(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentReading(put_abi(value))); } return value; } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FlightStickAdded(winrt::Windows::Foundation::EventHandler const& value) 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_FlightStickAdded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_FlightStickAdded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FlightStickAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, FlightStickAdded(value)); } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FlightStickAdded(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_FlightStickAdded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_FlightStickAdded(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FlightStickRemoved(winrt::Windows::Foundation::EventHandler const& value) 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_FlightStickRemoved(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_FlightStickRemoved(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FlightStickRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, FlightStickRemoved(value)); } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FlightStickRemoved(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_FlightStickRemoved(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_FlightStickRemoved(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FlightSticks() 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_FlightSticks(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FlightSticks(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) 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->FromGameController(*(void**)(&gameController), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromGameController(*(void**)(&gameController), &value)); } return winrt::Windows::Gaming::Input::FlightStick{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IGameController::HeadsetConnected(winrt::Windows::Foundation::TypedEventHandler const& value) 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_HeadsetConnected(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_HeadsetConnected(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IGameController::HeadsetConnected(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, HeadsetConnected(value)); } template auto consume_Windows_Gaming_Input_IGameController::HeadsetConnected(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_HeadsetConnected(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_HeadsetConnected(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IGameController::HeadsetDisconnected(winrt::Windows::Foundation::TypedEventHandler const& value) 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_HeadsetDisconnected(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_HeadsetDisconnected(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IGameController::HeadsetDisconnected(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, HeadsetDisconnected(value)); } template auto consume_Windows_Gaming_Input_IGameController::HeadsetDisconnected(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_HeadsetDisconnected(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_HeadsetDisconnected(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IGameController::UserChanged(winrt::Windows::Foundation::TypedEventHandler const& value) 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_UserChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_UserChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IGameController::UserChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, UserChanged(value)); } template auto consume_Windows_Gaming_Input_IGameController::UserChanged(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_UserChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_UserChanged(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IGameController::Headset() 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_Headset(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Headset(&value)); } return winrt::Windows::Gaming::Input::Headset{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IGameController::IsWireless() 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_IsWireless(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsWireless(&value)); } return value; } template auto consume_Windows_Gaming_Input_IGameController::User() 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_User(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_User(&value)); } return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IGameControllerBatteryInfo::TryGetBatteryReport() 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->TryGetBatteryReport(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->TryGetBatteryReport(&value)); } return winrt::Windows::Devices::Power::BatteryReport{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IGamepad::Vibration() const { winrt::Windows::Gaming::Input::GamepadVibration 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_Vibration(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Vibration(put_abi(value))); } return value; } template auto consume_Windows_Gaming_Input_IGamepad::Vibration(winrt::Windows::Gaming::Input::GamepadVibration 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_Vibration(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Vibration(impl::bind_in(value))); } } template auto consume_Windows_Gaming_Input_IGamepad::GetCurrentReading() const { winrt::Windows::Gaming::Input::GamepadReading 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->GetCurrentReading(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentReading(put_abi(value))); } return value; } template auto consume_Windows_Gaming_Input_IGamepad2::GetButtonLabel(winrt::Windows::Gaming::Input::GamepadButtons const& button) const { winrt::Windows::Gaming::Input::GameControllerButtonLabel 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->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IGamepadStatics::GamepadAdded(winrt::Windows::Foundation::EventHandler const& value) 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_GamepadAdded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_GamepadAdded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IGamepadStatics::GamepadAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, GamepadAdded(value)); } template auto consume_Windows_Gaming_Input_IGamepadStatics::GamepadAdded(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_GamepadAdded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_GamepadAdded(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IGamepadStatics::GamepadRemoved(winrt::Windows::Foundation::EventHandler const& value) 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_GamepadRemoved(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_GamepadRemoved(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IGamepadStatics::GamepadRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, GamepadRemoved(value)); } template auto consume_Windows_Gaming_Input_IGamepadStatics::GamepadRemoved(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_GamepadRemoved(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_GamepadRemoved(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IGamepadStatics::Gamepads() 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_Gamepads(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Gamepads(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IGamepadStatics2::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) 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->FromGameController(*(void**)(&gameController), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromGameController(*(void**)(&gameController), &value)); } return winrt::Windows::Gaming::Input::Gamepad{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IHeadset::CaptureDeviceId() 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_CaptureDeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CaptureDeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IHeadset::RenderDeviceId() 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_RenderDeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RenderDeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRacingWheel::HasClutch() 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_HasClutch(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasClutch(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::HasHandbrake() 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_HasHandbrake(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasHandbrake(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::HasPatternShifter() 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_HasPatternShifter(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HasPatternShifter(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::MaxPatternShifterGear() const { int32_t 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_MaxPatternShifterGear(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxPatternShifterGear(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::MaxWheelAngle() const { double 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_MaxWheelAngle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxWheelAngle(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::WheelMotor() 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_WheelMotor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WheelMotor(&value)); } return winrt::Windows::Gaming::Input::ForceFeedback::ForceFeedbackMotor{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRacingWheel::GetButtonLabel(winrt::Windows::Gaming::Input::RacingWheelButtons const& button) const { winrt::Windows::Gaming::Input::GameControllerButtonLabel 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->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::GetCurrentReading() const { winrt::Windows::Gaming::Input::RacingWheelReading 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->GetCurrentReading(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentReading(put_abi(value))); } return value; } template auto consume_Windows_Gaming_Input_IRacingWheelStatics::RacingWheelAdded(winrt::Windows::Foundation::EventHandler const& value) 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_RacingWheelAdded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RacingWheelAdded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IRacingWheelStatics::RacingWheelAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, RacingWheelAdded(value)); } template auto consume_Windows_Gaming_Input_IRacingWheelStatics::RacingWheelAdded(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_RacingWheelAdded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RacingWheelAdded(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IRacingWheelStatics::RacingWheelRemoved(winrt::Windows::Foundation::EventHandler const& value) 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_RacingWheelRemoved(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RacingWheelRemoved(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IRacingWheelStatics::RacingWheelRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, RacingWheelRemoved(value)); } template auto consume_Windows_Gaming_Input_IRacingWheelStatics::RacingWheelRemoved(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_RacingWheelRemoved(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RacingWheelRemoved(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IRacingWheelStatics::RacingWheels() 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_RacingWheels(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RacingWheels(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRacingWheelStatics2::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) 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->FromGameController(*(void**)(&gameController), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromGameController(*(void**)(&gameController), &value)); } return winrt::Windows::Gaming::Input::RacingWheel{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRawGameController::AxisCount() const { int32_t 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_AxisCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AxisCount(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRawGameController::ButtonCount() const { int32_t 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_ButtonCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ButtonCount(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRawGameController::ForceFeedbackMotors() 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_ForceFeedbackMotors(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ForceFeedbackMotors(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRawGameController::HardwareProductId() const { uint16_t 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_HardwareProductId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HardwareProductId(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRawGameController::HardwareVendorId() const { uint16_t 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_HardwareVendorId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HardwareVendorId(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRawGameController::SwitchCount() const { int32_t 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_SwitchCount(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SwitchCount(&value)); } return value; } template auto consume_Windows_Gaming_Input_IRawGameController::GetButtonLabel(int32_t buttonIndex) const { winrt::Windows::Gaming::Input::GameControllerButtonLabel 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->GetButtonLabel(buttonIndex, reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetButtonLabel(buttonIndex, reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IRawGameController::GetCurrentReading(array_view buttonArray, array_view switchArray, array_view axisArray) const { uint64_t timestamp{}; 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->GetCurrentReading(buttonArray.size(), put_abi(buttonArray), switchArray.size(), put_abi(switchArray), axisArray.size(), put_abi(axisArray), ×tamp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentReading(buttonArray.size(), put_abi(buttonArray), switchArray.size(), put_abi(switchArray), axisArray.size(), put_abi(axisArray), ×tamp)); } return timestamp; } template auto consume_Windows_Gaming_Input_IRawGameController::GetSwitchKind(int32_t switchIndex) const { winrt::Windows::Gaming::Input::GameControllerSwitchKind 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->GetSwitchKind(switchIndex, reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetSwitchKind(switchIndex, reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IRawGameController2::SimpleHapticsControllers() 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_SimpleHapticsControllers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SimpleHapticsControllers(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRawGameController2::NonRoamableId() 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_NonRoamableId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NonRoamableId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRawGameController2::DisplayName() 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_DisplayName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DisplayName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::RawGameControllerAdded(winrt::Windows::Foundation::EventHandler const& value) 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_RawGameControllerAdded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RawGameControllerAdded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::RawGameControllerAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, RawGameControllerAdded(value)); } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::RawGameControllerAdded(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_RawGameControllerAdded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RawGameControllerAdded(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::RawGameControllerRemoved(winrt::Windows::Foundation::EventHandler const& value) 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_RawGameControllerRemoved(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RawGameControllerRemoved(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::RawGameControllerRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, RawGameControllerRemoved(value)); } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::RawGameControllerRemoved(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_RawGameControllerRemoved(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RawGameControllerRemoved(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::RawGameControllers() 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_RawGameControllers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RawGameControllers(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) 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->FromGameController(*(void**)(&gameController), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromGameController(*(void**)(&gameController), &value)); } return winrt::Windows::Gaming::Input::RawGameController{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IUINavigationController::GetCurrentReading() const { winrt::Windows::Gaming::Input::UINavigationReading 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->GetCurrentReading(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCurrentReading(put_abi(value))); } return value; } template auto consume_Windows_Gaming_Input_IUINavigationController::GetOptionalButtonLabel(winrt::Windows::Gaming::Input::OptionalUINavigationButtons const& button) const { winrt::Windows::Gaming::Input::GameControllerButtonLabel 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->GetOptionalButtonLabel(static_cast(button), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetOptionalButtonLabel(static_cast(button), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IUINavigationController::GetRequiredButtonLabel(winrt::Windows::Gaming::Input::RequiredUINavigationButtons const& button) const { winrt::Windows::Gaming::Input::GameControllerButtonLabel 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->GetRequiredButtonLabel(static_cast(button), reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetRequiredButtonLabel(static_cast(button), reinterpret_cast(&value))); } return value; } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics::UINavigationControllerAdded(winrt::Windows::Foundation::EventHandler const& value) 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_UINavigationControllerAdded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_UINavigationControllerAdded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics::UINavigationControllerAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, UINavigationControllerAdded(value)); } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics::UINavigationControllerAdded(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_UINavigationControllerAdded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_UINavigationControllerAdded(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics::UINavigationControllerRemoved(winrt::Windows::Foundation::EventHandler const& value) 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_UINavigationControllerRemoved(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_UINavigationControllerRemoved(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics::UINavigationControllerRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, UINavigationControllerRemoved(value)); } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics::UINavigationControllerRemoved(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_UINavigationControllerRemoved(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_UINavigationControllerRemoved(impl::bind_in(token)); } } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics::UINavigationControllers() 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_UINavigationControllers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UINavigationControllers(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics2::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) 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->FromGameController(*(void**)(&gameController), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromGameController(*(void**)(&gameController), &value)); } return winrt::Windows::Gaming::Input::UINavigationController{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetButtonLabel(uint32_t button, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetButtonLabel(*reinterpret_cast(&button))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentReading(struct struct_Windows_Gaming_Input_ArcadeStickReading* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentReading()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ArcadeStickAdded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ArcadeStickAdded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ArcadeStickAdded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ArcadeStickAdded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ArcadeStickRemoved(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ArcadeStickRemoved(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ArcadeStickRemoved(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ArcadeStickRemoved(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_ArcadeSticks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ArcadeSticks()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromGameController(void* gameController, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromGameController(*reinterpret_cast(&gameController))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_HatSwitchKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HatSwitchKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetButtonLabel(uint32_t button, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetButtonLabel(*reinterpret_cast(&button))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentReading(struct struct_Windows_Gaming_Input_FlightStickReading* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentReading()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_FlightStickAdded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().FlightStickAdded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_FlightStickAdded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().FlightStickAdded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_FlightStickRemoved(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().FlightStickRemoved(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_FlightStickRemoved(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().FlightStickRemoved(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_FlightSticks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().FlightSticks()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromGameController(void* gameController, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromGameController(*reinterpret_cast(&gameController))); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall add_HeadsetConnected(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().HeadsetConnected(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_HeadsetConnected(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().HeadsetConnected(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_HeadsetDisconnected(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().HeadsetDisconnected(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_HeadsetDisconnected(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().HeadsetDisconnected(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_UserChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().UserChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_UserChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().UserChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_Headset(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Headset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsWireless(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsWireless()); return 0; } catch (...) { return to_hresult(); } 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(); } }; template struct produce : produce_base { int32_t __stdcall TryGetBatteryReport(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TryGetBatteryReport()); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Vibration(struct struct_Windows_Gaming_Input_GamepadVibration* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Vibration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Vibration(struct struct_Windows_Gaming_Input_GamepadVibration value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Vibration(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentReading(struct struct_Windows_Gaming_Input_GamepadReading* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentReading()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetButtonLabel(uint32_t button, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetButtonLabel(*reinterpret_cast(&button))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_GamepadAdded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GamepadAdded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GamepadAdded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GamepadAdded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_GamepadRemoved(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().GamepadRemoved(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_GamepadRemoved(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().GamepadRemoved(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_Gamepads(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Gamepads()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromGameController(void* gameController, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromGameController(*reinterpret_cast(&gameController))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CaptureDeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CaptureDeviceId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RenderDeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RenderDeviceId()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_HasClutch(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasClutch()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasHandbrake(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasHandbrake()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HasPatternShifter(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HasPatternShifter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxPatternShifterGear(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxPatternShifterGear()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxWheelAngle(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxWheelAngle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WheelMotor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WheelMotor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetButtonLabel(uint32_t button, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetButtonLabel(*reinterpret_cast(&button))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentReading(struct struct_Windows_Gaming_Input_RacingWheelReading* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentReading()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_RacingWheelAdded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().RacingWheelAdded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RacingWheelAdded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RacingWheelAdded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_RacingWheelRemoved(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().RacingWheelRemoved(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RacingWheelRemoved(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RacingWheelRemoved(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_RacingWheels(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RacingWheels()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromGameController(void* gameController, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromGameController(*reinterpret_cast(&gameController))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AxisCount(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AxisCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ButtonCount(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ButtonCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ForceFeedbackMotors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ForceFeedbackMotors()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HardwareProductId(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HardwareProductId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HardwareVendorId(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HardwareVendorId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SwitchCount(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SwitchCount()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetButtonLabel(int32_t buttonIndex, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetButtonLabel(buttonIndex)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCurrentReading(uint32_t __buttonArraySize, bool* buttonArray, uint32_t __switchArraySize, int32_t* switchArray, uint32_t __axisArraySize, double* axisArray, uint64_t* timestamp) noexcept final try { typename D::abi_guard guard(this->shim()); *timestamp = detach_from(this->shim().GetCurrentReading(array_view(reinterpret_cast(buttonArray), reinterpret_cast(buttonArray) + __buttonArraySize), array_view(reinterpret_cast(switchArray), reinterpret_cast(switchArray) + __switchArraySize), array_view(reinterpret_cast(axisArray), reinterpret_cast(axisArray) + __axisArraySize))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetSwitchKind(int32_t switchIndex, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetSwitchKind(switchIndex)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SimpleHapticsControllers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SimpleHapticsControllers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NonRoamableId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NonRoamableId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayName()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_RawGameControllerAdded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().RawGameControllerAdded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RawGameControllerAdded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RawGameControllerAdded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_RawGameControllerRemoved(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().RawGameControllerRemoved(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RawGameControllerRemoved(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RawGameControllerRemoved(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_RawGameControllers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RawGameControllers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromGameController(void* gameController, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromGameController(*reinterpret_cast(&gameController))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCurrentReading(struct struct_Windows_Gaming_Input_UINavigationReading* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetCurrentReading()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetOptionalButtonLabel(uint32_t button, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetOptionalButtonLabel(*reinterpret_cast(&button))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetRequiredButtonLabel(uint32_t button, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetRequiredButtonLabel(*reinterpret_cast(&button))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_UINavigationControllerAdded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().UINavigationControllerAdded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_UINavigationControllerAdded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().UINavigationControllerAdded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_UINavigationControllerRemoved(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().UINavigationControllerRemoved(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_UINavigationControllerRemoved(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().UINavigationControllerRemoved(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_UINavigationControllers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().UINavigationControllers()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromGameController(void* gameController, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FromGameController(*reinterpret_cast(&gameController))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Gaming::Input { constexpr auto operator|(ArcadeStickButtons const left, ArcadeStickButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(ArcadeStickButtons& left, ArcadeStickButtons const right) noexcept { left = left | right; return left; } constexpr auto operator&(ArcadeStickButtons const left, ArcadeStickButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(ArcadeStickButtons& left, ArcadeStickButtons const right) noexcept { left = left & right; return left; } constexpr auto operator~(ArcadeStickButtons const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(ArcadeStickButtons const left, ArcadeStickButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(ArcadeStickButtons& left, ArcadeStickButtons const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(FlightStickButtons const left, FlightStickButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(FlightStickButtons& left, FlightStickButtons const right) noexcept { left = left | right; return left; } constexpr auto operator&(FlightStickButtons const left, FlightStickButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(FlightStickButtons& left, FlightStickButtons const right) noexcept { left = left & right; return left; } constexpr auto operator~(FlightStickButtons const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(FlightStickButtons const left, FlightStickButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(FlightStickButtons& left, FlightStickButtons const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(GamepadButtons const left, GamepadButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(GamepadButtons& left, GamepadButtons const right) noexcept { left = left | right; return left; } constexpr auto operator&(GamepadButtons const left, GamepadButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(GamepadButtons& left, GamepadButtons const right) noexcept { left = left & right; return left; } constexpr auto operator~(GamepadButtons const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(GamepadButtons const left, GamepadButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(GamepadButtons& left, GamepadButtons const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(OptionalUINavigationButtons const left, OptionalUINavigationButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(OptionalUINavigationButtons& left, OptionalUINavigationButtons const right) noexcept { left = left | right; return left; } constexpr auto operator&(OptionalUINavigationButtons const left, OptionalUINavigationButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(OptionalUINavigationButtons& left, OptionalUINavigationButtons const right) noexcept { left = left & right; return left; } constexpr auto operator~(OptionalUINavigationButtons const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(OptionalUINavigationButtons const left, OptionalUINavigationButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(OptionalUINavigationButtons& left, OptionalUINavigationButtons const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(RacingWheelButtons const left, RacingWheelButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(RacingWheelButtons& left, RacingWheelButtons const right) noexcept { left = left | right; return left; } constexpr auto operator&(RacingWheelButtons const left, RacingWheelButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(RacingWheelButtons& left, RacingWheelButtons const right) noexcept { left = left & right; return left; } constexpr auto operator~(RacingWheelButtons const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(RacingWheelButtons const left, RacingWheelButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(RacingWheelButtons& left, RacingWheelButtons const right) noexcept { left = left ^ right; return left; } constexpr auto operator|(RequiredUINavigationButtons const left, RequiredUINavigationButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(RequiredUINavigationButtons& left, RequiredUINavigationButtons const right) noexcept { left = left | right; return left; } constexpr auto operator&(RequiredUINavigationButtons const left, RequiredUINavigationButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(RequiredUINavigationButtons& left, RequiredUINavigationButtons const right) noexcept { left = left & right; return left; } constexpr auto operator~(RequiredUINavigationButtons const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(RequiredUINavigationButtons const left, RequiredUINavigationButtons const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(RequiredUINavigationButtons& left, RequiredUINavigationButtons const right) noexcept { left = left ^ right; return left; } inline auto ArcadeStick::ArcadeStickAdded(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IArcadeStickStatics const& f) { return f.ArcadeStickAdded(value); }); } inline auto ArcadeStick::ArcadeStickAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return ArcadeStick::ArcadeStickAdded_revoker{ f, f.ArcadeStickAdded(value) }; } inline auto ArcadeStick::ArcadeStickAdded(winrt::event_token const& token) { impl::call_factory([&](IArcadeStickStatics const& f) { return f.ArcadeStickAdded(token); }); } inline auto ArcadeStick::ArcadeStickRemoved(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IArcadeStickStatics const& f) { return f.ArcadeStickRemoved(value); }); } inline auto ArcadeStick::ArcadeStickRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return ArcadeStick::ArcadeStickRemoved_revoker{ f, f.ArcadeStickRemoved(value) }; } inline auto ArcadeStick::ArcadeStickRemoved(winrt::event_token const& token) { impl::call_factory([&](IArcadeStickStatics const& f) { return f.ArcadeStickRemoved(token); }); } inline auto ArcadeStick::ArcadeSticks() { return impl::call_factory_cast(*)(IArcadeStickStatics const&), ArcadeStick, IArcadeStickStatics>([](IArcadeStickStatics const& f) { return f.ArcadeSticks(); }); } inline auto ArcadeStick::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) { return impl::call_factory([&](IArcadeStickStatics2 const& f) { return f.FromGameController(gameController); }); } inline auto FlightStick::FlightStickAdded(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IFlightStickStatics const& f) { return f.FlightStickAdded(value); }); } inline auto FlightStick::FlightStickAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return FlightStick::FlightStickAdded_revoker{ f, f.FlightStickAdded(value) }; } inline auto FlightStick::FlightStickAdded(winrt::event_token const& token) { impl::call_factory([&](IFlightStickStatics const& f) { return f.FlightStickAdded(token); }); } inline auto FlightStick::FlightStickRemoved(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IFlightStickStatics const& f) { return f.FlightStickRemoved(value); }); } inline auto FlightStick::FlightStickRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return FlightStick::FlightStickRemoved_revoker{ f, f.FlightStickRemoved(value) }; } inline auto FlightStick::FlightStickRemoved(winrt::event_token const& token) { impl::call_factory([&](IFlightStickStatics const& f) { return f.FlightStickRemoved(token); }); } inline auto FlightStick::FlightSticks() { return impl::call_factory_cast(*)(IFlightStickStatics const&), FlightStick, IFlightStickStatics>([](IFlightStickStatics const& f) { return f.FlightSticks(); }); } inline auto FlightStick::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) { return impl::call_factory([&](IFlightStickStatics const& f) { return f.FromGameController(gameController); }); } inline auto Gamepad::GamepadAdded(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IGamepadStatics const& f) { return f.GamepadAdded(value); }); } inline auto Gamepad::GamepadAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return Gamepad::GamepadAdded_revoker{ f, f.GamepadAdded(value) }; } inline auto Gamepad::GamepadAdded(winrt::event_token const& token) { impl::call_factory([&](IGamepadStatics const& f) { return f.GamepadAdded(token); }); } inline auto Gamepad::GamepadRemoved(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IGamepadStatics const& f) { return f.GamepadRemoved(value); }); } inline auto Gamepad::GamepadRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return Gamepad::GamepadRemoved_revoker{ f, f.GamepadRemoved(value) }; } inline auto Gamepad::GamepadRemoved(winrt::event_token const& token) { impl::call_factory([&](IGamepadStatics const& f) { return f.GamepadRemoved(token); }); } inline auto Gamepad::Gamepads() { return impl::call_factory_cast(*)(IGamepadStatics const&), Gamepad, IGamepadStatics>([](IGamepadStatics const& f) { return f.Gamepads(); }); } inline auto Gamepad::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) { return impl::call_factory([&](IGamepadStatics2 const& f) { return f.FromGameController(gameController); }); } inline auto RacingWheel::RacingWheelAdded(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IRacingWheelStatics const& f) { return f.RacingWheelAdded(value); }); } inline auto RacingWheel::RacingWheelAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return RacingWheel::RacingWheelAdded_revoker{ f, f.RacingWheelAdded(value) }; } inline auto RacingWheel::RacingWheelAdded(winrt::event_token const& token) { impl::call_factory([&](IRacingWheelStatics const& f) { return f.RacingWheelAdded(token); }); } inline auto RacingWheel::RacingWheelRemoved(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IRacingWheelStatics const& f) { return f.RacingWheelRemoved(value); }); } inline auto RacingWheel::RacingWheelRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return RacingWheel::RacingWheelRemoved_revoker{ f, f.RacingWheelRemoved(value) }; } inline auto RacingWheel::RacingWheelRemoved(winrt::event_token const& token) { impl::call_factory([&](IRacingWheelStatics const& f) { return f.RacingWheelRemoved(token); }); } inline auto RacingWheel::RacingWheels() { return impl::call_factory_cast(*)(IRacingWheelStatics const&), RacingWheel, IRacingWheelStatics>([](IRacingWheelStatics const& f) { return f.RacingWheels(); }); } inline auto RacingWheel::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) { return impl::call_factory([&](IRacingWheelStatics2 const& f) { return f.FromGameController(gameController); }); } inline auto RawGameController::RawGameControllerAdded(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IRawGameControllerStatics const& f) { return f.RawGameControllerAdded(value); }); } inline auto RawGameController::RawGameControllerAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return RawGameController::RawGameControllerAdded_revoker{ f, f.RawGameControllerAdded(value) }; } inline auto RawGameController::RawGameControllerAdded(winrt::event_token const& token) { impl::call_factory([&](IRawGameControllerStatics const& f) { return f.RawGameControllerAdded(token); }); } inline auto RawGameController::RawGameControllerRemoved(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IRawGameControllerStatics const& f) { return f.RawGameControllerRemoved(value); }); } inline auto RawGameController::RawGameControllerRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return RawGameController::RawGameControllerRemoved_revoker{ f, f.RawGameControllerRemoved(value) }; } inline auto RawGameController::RawGameControllerRemoved(winrt::event_token const& token) { impl::call_factory([&](IRawGameControllerStatics const& f) { return f.RawGameControllerRemoved(token); }); } inline auto RawGameController::RawGameControllers() { return impl::call_factory_cast(*)(IRawGameControllerStatics const&), RawGameController, IRawGameControllerStatics>([](IRawGameControllerStatics const& f) { return f.RawGameControllers(); }); } inline auto RawGameController::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) { return impl::call_factory([&](IRawGameControllerStatics const& f) { return f.FromGameController(gameController); }); } inline auto UINavigationController::UINavigationControllerAdded(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IUINavigationControllerStatics const& f) { return f.UINavigationControllerAdded(value); }); } inline auto UINavigationController::UINavigationControllerAdded(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return UINavigationController::UINavigationControllerAdded_revoker{ f, f.UINavigationControllerAdded(value) }; } inline auto UINavigationController::UINavigationControllerAdded(winrt::event_token const& token) { impl::call_factory([&](IUINavigationControllerStatics const& f) { return f.UINavigationControllerAdded(token); }); } inline auto UINavigationController::UINavigationControllerRemoved(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IUINavigationControllerStatics const& f) { return f.UINavigationControllerRemoved(value); }); } inline auto UINavigationController::UINavigationControllerRemoved(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return UINavigationController::UINavigationControllerRemoved_revoker{ f, f.UINavigationControllerRemoved(value) }; } inline auto UINavigationController::UINavigationControllerRemoved(winrt::event_token const& token) { impl::call_factory([&](IUINavigationControllerStatics const& f) { return f.UINavigationControllerRemoved(token); }); } inline auto UINavigationController::UINavigationControllers() { return impl::call_factory_cast(*)(IUINavigationControllerStatics const&), UINavigationController, IUINavigationControllerStatics>([](IUINavigationControllerStatics const& f) { return f.UINavigationControllers(); }); } inline auto UINavigationController::FromGameController(winrt::Windows::Gaming::Input::IGameController const& gameController) { return impl::call_factory([&](IUINavigationControllerStatics2 const& f) { return f.FromGameController(gameController); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif