Debian Codegraph @

xbmc/input/joysticks/interfaces/IInputReceiver.h

raw
1 /*
2 * Copyright (C) 2014-2024 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #pragma once
10
11 #include "input/joysticks/JoystickTypes.h"
12
13 namespace KODI
14 {
15 namespace JOYSTICK
16 {
17 /*!
18 * \ingroup joystick
19 *
20 * \brief Interface for sending input events to game controllers
21 */
22 class IInputReceiver
23 {
24 public:
25 virtual ~IInputReceiver() = default;
26
27 /*!
28 * \brief Set the value of a rumble motor
29 *
30 * \param feature The name of the motor to rumble
31 * \param magnitude The motor's new magnitude of vibration in the closed interval [0, 1]
32 *
33 * \return True if the event was handled otherwise false
34 */
35 virtual bool SetRumbleState(const FeatureName& feature, float magnitude) = 0;
36 };
37 } // namespace JOYSTICK
38 } // namespace KODI