11 #include "input/joysticks/JoystickTypes.h"    12 #include "input/joysticks/interfaces/IButtonSequence.h"    13 #include "input/joysticks/interfaces/IInputHandler.h"    14 #include "input/keymaps/interfaces/IKeymapHandler.h"    24 class IActionListener;
    43   bool HotkeysPressed(
const std::set<std::string>& keyNames) 
const override;
    45   void OnPress(
const std::string& keyName)
 override { m_lastPressed = keyName; }
    48   std::string ControllerID() 
const override;
    49   bool HasFeature(
const JOYSTICK::FeatureName& feature)
 const override { 
return true; }
    50   bool AcceptsInput(
const JOYSTICK::FeatureName& feature) 
const override;
    51   bool OnButtonPress(
const JOYSTICK::FeatureName& feature, 
bool bPressed) 
override;
    52   void OnButtonHold(
const JOYSTICK::FeatureName& feature, 
unsigned int holdTimeMs) 
override;
    53   bool OnButtonMotion(
const JOYSTICK::FeatureName& feature,
    55                       unsigned int motionTimeMs) 
override;
    56   bool OnAnalogStickMotion(
const JOYSTICK::FeatureName& feature,
    59                            unsigned int motionTimeMs) 
override;
    60   bool OnAccelerometerMotion(
const JOYSTICK::FeatureName& feature,
    64   bool OnWheelMotion(
const JOYSTICK::FeatureName& feature,
    66                      unsigned int motionTimeMs) 
override;
    67   bool OnThrottleMotion(
const JOYSTICK::FeatureName& feature,
    69                         unsigned int motionTimeMs) 
override;
    74   std::unique_ptr<JOYSTICK::IButtonSequence> m_easterEgg;
    78   bool ActivateDirection(
const JOYSTICK::FeatureName& feature,
    80                          JOYSTICK::ANALOG_STICK_DIRECTION dir,
    81                          unsigned int motionTimeMs);
    82   void DeactivateDirection(
const JOYSTICK::FeatureName& feature,
    83                            JOYSTICK::ANALOG_STICK_DIRECTION dir);
    86   bool ActivateDirection(
const JOYSTICK::FeatureName& feature,
    88                          JOYSTICK::WHEEL_DIRECTION dir,
    89                          unsigned int motionTimeMs);
    90   void DeactivateDirection(
const JOYSTICK::FeatureName& feature, JOYSTICK::WHEEL_DIRECTION dir);
    93   bool ActivateDirection(
const JOYSTICK::FeatureName& feature,
    95                          JOYSTICK::THROTTLE_DIRECTION dir,
    96                          unsigned int motionTimeMs);
    97   void DeactivateDirection(
const JOYSTICK::FeatureName& feature, JOYSTICK::THROTTLE_DIRECTION dir);
   100   IKeyHandler* GetKeyHandler(
const std::string& keyName);
   101   bool HasAction(
const std::string& keyName) 
const;
   108   std::map<std::string, std::unique_ptr<IKeyHandler>> m_keyHandlers; 
   111   std::string m_lastPressed;
 
void OnInputFrame() override
Called at the end of the frame that provided input. 
Definition: KeymapHandler.h:70
Definition: KeymapHandler.h:35
Interface for handling keymap keys. 
Definition: IKeyHandler.h:23
Definition: AudioDecoder.h:18
Interface for a class working with a keymap. 
Definition: IKeymapHandler.h:23
Interface defining methods to handle GUI actions. 
Definition: IActionListener.h:22
std::string GetLastPressed() const override
Get the key name of the last button pressed. 
Definition: KeymapHandler.h:44
bool HasFeature(const JOYSTICK::FeatureName &feature) const override
Return true if the input handler accepts the given feature. 
Definition: KeymapHandler.h:49
void OnPress(const std::string &keyName) override
Called when a key has emitted an action after bring pressed. 
Definition: KeymapHandler.h:45
Interface for mapping buttons to Kodi actions. 
Definition: IKeymap.h:28