Debian Codegraph @

xbmc/input/keyboard/interfaces/IKeyboardInputProvider.h

raw
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 KEYBOARD
14 {
15 class IKeyboardInputHandler;
16
17 /*!
18 * \ingroup keyboard
19 *
20 * \brief Interface for classes that can provide keyboard input
21 */
22 class IKeyboardInputProvider
23 {
24 public:
25 virtual ~IKeyboardInputProvider() = default;
26
27 /*!
28 * \brief Registers a handler to be called on keyboard input
29 *
30 * \param handler The handler to receive keyboard input provided by this class
31 * \param bPromiscuous True to observe all events without affecting the
32 * input's destination
33 * \param forceDefaultMap Always use the default keyboard buttonmap, avoiding
34 * buttonmaps provided by add-ons
35 */
36 virtual void RegisterKeyboardHandler(IKeyboardInputHandler* handler,
37 bool bPromiscuous,
38 bool forceDefaultMap) = 0;
39
40 /*!
41 * \brief Unregisters handler from keyboard input
42 *
43 * \param handler The handler that was receiving keyboard input
44 */
45 virtual void UnregisterKeyboardHandler(IKeyboardInputHandler* handler) = 0;
46 };
47 } // namespace KEYBOARD
48 } // namespace KODI