xbmc
JoystickEasterEgg.h
1 /*
2  * Copyright (C) 2016-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/joysticks/interfaces/IButtonSequence.h"
12 
13 #include <map>
14 #include <string>
15 #include <vector>
16 
17 namespace KODI
18 {
19 namespace JOYSTICK
20 {
25 {
26 public:
27  explicit CJoystickEasterEgg(const std::string& controllerId);
28  ~CJoystickEasterEgg() override = default;
29 
30  // implementation of IButtonSequence
31  bool OnButtonPress(const FeatureName& feature) override;
32  bool IsCapturing() override;
33 
34  static void OnFinish(void);
35 
36 private:
37  // Construction parameters
38  const std::string m_controllerId;
39 
40  static const std::map<std::string, std::vector<FeatureName>> m_sequence;
41 
42  unsigned int m_state;
43 };
44 } // namespace JOYSTICK
45 } // namespace KODI
Hush!!!
Definition: JoystickEasterEgg.h:24
bool IsCapturing() override
Returns true if a sequence is being captured to prevent input from falling through to the application...
Definition: JoystickEasterEgg.cpp:89
Definition: IButtonSequence.h:17
Controller configuration window.
Definition: AudioDecoder.h:18
std::string FeatureName
Name of a physical feature belonging to the joystick.
Definition: JoystickTypes.h:28
static void OnFinish(void)
Definition: JoystickEasterEgg.cpp:95