xbmc
GameClientKeyboard.h
1 /*
2  * Copyright (C) 2015-2018 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/IKeyboardInputHandler.h"
12 
13 namespace KODI
14 {
15 namespace KEYBOARD
16 {
17 class IKeyboardInputProvider;
18 }
19 
20 namespace GAME
21 {
22 class CGameClient;
23 
31 {
32 public:
40  CGameClientKeyboard(CGameClient& gameClient,
41  std::string controllerId,
42  KEYBOARD::IKeyboardInputProvider* inputProvider);
43 
47  ~CGameClientKeyboard() override;
48 
49  // implementation of IKeyboardInputHandler
50  std::string ControllerID() const override;
51  bool HasKey(const KEYBOARD::KeyName& key) const override;
52  bool OnKeyPress(const KEYBOARD::KeyName& key, KEYBOARD::Modifier mod, uint32_t unicode) override;
53  void OnKeyRelease(const KEYBOARD::KeyName& key,
54  KEYBOARD::Modifier mod,
55  uint32_t unicode) override;
56 
57 private:
58  // Construction parameters
59  CGameClient& m_gameClient;
60  const std::string m_controllerId;
61  KEYBOARD::IKeyboardInputProvider* const m_inputProvider;
62 };
63 } // namespace GAME
64 } // namespace KODI
Interface for handling input events for keyboards.
Definition: IKeyboardInputHandler.h:27
Handles keyboard events for games.
Definition: GameClientKeyboard.h:30
Interface between Kodi and Game add-ons.
Definition: GameClient.h:115
Controller configuration window.
Definition: AudioDecoder.h:18
Interface for classes that can provide keyboard input.
Definition: IKeyboardInputProvider.h:21