Debian Codegraph @

xbmc/input/joysticks/interfaces/IDriverReceiver.h

raw
1 /*
2 * Copyright (C) 2016-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 namespace KODI
12 {
13 namespace JOYSTICK
14 {
15 /*!
16 * \ingroup joystick
17 *
18 * \brief Interface for sending input events to joystick drivers
19 */
20 class IDriverReceiver
21 {
22 public:
23 virtual ~IDriverReceiver() = default;
24
25 /*!
26 * \brief Set the value of a rumble motor
27 *
28 * \param motorIndex The driver index of the motor to rumble
29 * \param magnitude The motor's new magnitude of vibration in the closed interval [0, 1]
30 *
31 * \return True if the event was handled otherwise false
32 */
33 virtual bool SetMotorState(unsigned int motorIndex, float magnitude) = 0;
34 };
35 } // namespace JOYSTICK
36 } // namespace KODI