Debian Codegraph @

xbmc/input/keyboard/generic/KeyboardInputHandling.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 #include "input/keyboard/interfaces/IKeyboardDriverHandler.h"
12
13 namespace KODI
14 {
15 namespace JOYSTICK
16 {
17 class IButtonMap;
18 }
19
20 namespace KEYBOARD
21 {
22 class IKeyboardInputHandler;
23
24 /*!
25 * \ingroup keyboard
26 *
27 * \brief Class to translate input from Kodi keycodes to key names defined
28 * by the keyboard's controller profile
29 */
30 class CKeyboardInputHandling : public IKeyboardDriverHandler
31 {
32 public:
33 CKeyboardInputHandling(IKeyboardInputHandler* handler, JOYSTICK::IButtonMap* buttonMap);
34
35 ~CKeyboardInputHandling(void) override = default;
36
37 // implementation of IKeyboardDriverHandler
38 bool OnKeyPress(const CKey& key) override;
39 void OnKeyRelease(const CKey& key) override;
40
41 private:
42 // Construction parameters
43 IKeyboardInputHandler* const m_handler;
44 JOYSTICK::IButtonMap* const m_buttonMap;
45 };
46 } // namespace KEYBOARD
47 } // namespace KODI