// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #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.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IArcadeStick)->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); return value; } template auto consume_Windows_Gaming_Input_IArcadeStick::GetCurrentReading() const { winrt::Windows::Gaming::Input::ArcadeStickReading value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IArcadeStick)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IArcadeStickStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IArcadeStickStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IArcadeStickStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IArcadeStickStatics)->remove_ArcadeStickRemoved(impl::bind_in(token)); } template auto consume_Windows_Gaming_Input_IArcadeStickStatics::ArcadeSticks() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IArcadeStickStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IArcadeStickStatics2)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStick)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStick)->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); return value; } template auto consume_Windows_Gaming_Input_IFlightStick::GetCurrentReading() const { winrt::Windows::Gaming::Input::FlightStickReading value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStick)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStickStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStickStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStickStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStickStatics)->remove_FlightStickRemoved(impl::bind_in(token)); } template auto consume_Windows_Gaming_Input_IFlightStickStatics::FlightSticks() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStickStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IFlightStickStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->remove_UserChanged(impl::bind_in(token)); } template auto consume_Windows_Gaming_Input_IGameController::Headset() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->get_IsWireless(&value)); return value; } template auto consume_Windows_Gaming_Input_IGameController::User() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameController)->get_User(&value)); return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IGameControllerBatteryInfo::TryGetBatteryReport() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGameControllerBatteryInfo)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepad)->get_Vibration(put_abi(value))); return value; } template auto consume_Windows_Gaming_Input_IGamepad::Vibration(winrt::Windows::Gaming::Input::GamepadVibration const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepad)->put_Vibration(impl::bind_in(value))); } template auto consume_Windows_Gaming_Input_IGamepad::GetCurrentReading() const { winrt::Windows::Gaming::Input::GamepadReading value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepad)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepad2)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepadStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepadStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepadStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepadStatics)->remove_GamepadRemoved(impl::bind_in(token)); } template auto consume_Windows_Gaming_Input_IGamepadStatics::Gamepads() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepadStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IGamepadStatics2)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IHeadset)->get_CaptureDeviceId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IHeadset::RenderDeviceId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IHeadset)->get_RenderDeviceId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRacingWheel::HasClutch() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheel)->get_HasClutch(&value)); return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::HasHandbrake() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheel)->get_HasHandbrake(&value)); return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::HasPatternShifter() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheel)->get_HasPatternShifter(&value)); return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::MaxPatternShifterGear() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheel)->get_MaxPatternShifterGear(&value)); return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::MaxWheelAngle() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheel)->get_MaxWheelAngle(&value)); return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::WheelMotor() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheel)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheel)->GetButtonLabel(static_cast(button), reinterpret_cast(&value))); return value; } template auto consume_Windows_Gaming_Input_IRacingWheel::GetCurrentReading() const { winrt::Windows::Gaming::Input::RacingWheelReading value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheel)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheelStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheelStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheelStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheelStatics)->remove_RacingWheelRemoved(impl::bind_in(token)); } template auto consume_Windows_Gaming_Input_IRacingWheelStatics::RacingWheels() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheelStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRacingWheelStatics2)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->get_AxisCount(&value)); return value; } template auto consume_Windows_Gaming_Input_IRawGameController::ButtonCount() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->get_ButtonCount(&value)); return value; } template auto consume_Windows_Gaming_Input_IRawGameController::ForceFeedbackMotors() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->get_HardwareProductId(&value)); return value; } template auto consume_Windows_Gaming_Input_IRawGameController::HardwareVendorId() const { uint16_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->get_HardwareVendorId(&value)); return value; } template auto consume_Windows_Gaming_Input_IRawGameController::SwitchCount() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->get_SwitchCount(&value)); return value; } template auto consume_Windows_Gaming_Input_IRawGameController::GetButtonLabel(int32_t buttonIndex) const { winrt::Windows::Gaming::Input::GameControllerButtonLabel value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController)->GetSwitchKind(switchIndex, reinterpret_cast(&value))); return value; } template auto consume_Windows_Gaming_Input_IRawGameController2::SimpleHapticsControllers() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController2)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController2)->get_NonRoamableId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Gaming_Input_IRawGameController2::DisplayName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameController2)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameControllerStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameControllerStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameControllerStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameControllerStatics)->remove_RawGameControllerRemoved(impl::bind_in(token)); } template auto consume_Windows_Gaming_Input_IRawGameControllerStatics::RawGameControllers() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameControllerStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IRawGameControllerStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationController)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationControllerStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationControllerStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationControllerStatics)->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 { WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationControllerStatics)->remove_UINavigationControllerRemoved(impl::bind_in(token)); } template auto consume_Windows_Gaming_Input_IUINavigationControllerStatics::UINavigationControllers() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationControllerStatics)->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{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Gaming::Input::IUINavigationControllerStatics2)->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