| 1 |
/* |
| 2 |
* Copyright (C) 2017-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 |
class IInputHandler; |
| 16 |
|
| 17 |
/*! |
| 18 |
* \ingroup joystick |
| 19 |
* |
| 20 |
* \brief Interface for classes that can provide input |
| 21 |
*/ |
| 22 |
class IInputProvider |
| 23 |
{ |
| 24 |
public: |
| 25 |
virtual ~IInputProvider() = default; |
| 26 |
|
| 27 |
/*! |
| 28 |
* \brief Register a handler for the provided input |
| 29 |
* |
| 30 |
* \param handler The handler to receive input provided by this class |
| 31 |
* \param bPromiscuous If true, receives all input (including handled input) |
| 32 |
* in the background |
| 33 |
*/ |
| 34 |
virtual void RegisterInputHandler(IInputHandler* handler, bool bPromiscuous) = 0; |
| 35 |
|
| 36 |
/*! |
| 37 |
* \brief Unregister a handler |
| 38 |
* |
| 39 |
* \param handler The handler that was receiving input |
| 40 |
*/ |
| 41 |
virtual void UnregisterInputHandler(IInputHandler* handler) = 0; |
| 42 |
}; |
| 43 |
} // namespace JOYSTICK |
| 44 |
} // namespace KODI |