kodi
DefaultKeyboardHandling.h
1 /*
2  * Copyright (C) 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 #include <memory>
14 
15 namespace PERIPHERALS
16 {
17 class CPeripheral;
18 } // namespace PERIPHERALS
19 
20 namespace KODI
21 {
22 namespace JOYSTICK
23 {
24 class IButtonMap;
25 } // namespace JOYSTICK
26 
27 namespace KEYBOARD
28 {
29 class IKeyboardInputHandler;
30 
32 {
33 public:
35 
36  ~CDefaultKeyboardHandling() override;
37 
38  bool Load();
39 
40  // Implementation of IKeyboardDriverHandler
41  bool OnKeyPress(const CKey& key) override;
42  void OnKeyRelease(const CKey& key) override;
43 
44 private:
45  // Construction parameters
46  PERIPHERALS::CPeripheral* const m_peripheral;
47  IKeyboardInputHandler* const m_inputHandler;
48 
49  // Input parameters
50  std::unique_ptr<IKeyboardDriverHandler> m_driverHandler;
51  std::unique_ptr<JOYSTICK::IButtonMap> m_buttonMap;
52 };
53 } // namespace KEYBOARD
54 } // namespace KODI
Definition: RetroPlayerInput.h:15
Interface for handling input events for keyboards.
Definition: IKeyboardInputHandler.h:28
Definition: DefaultKeyboardHandling.h:31
Definition: AudioDecoder.h:18
Interface for handling keyboard events.
Definition: IKeyboardDriverHandler.h:22
Definition: Peripheral.h:71
Definition: Key.h:17