11 #include "IConfigurationWindow.h" 12 #include "games/controllers/input/PhysicalFeature.h" 13 #include "input/XBMC_keysym.h" 14 #include "input/joysticks/DriverPrimitive.h" 15 #include "input/joysticks/interfaces/IButtonMapper.h" 16 #include "input/keyboard/interfaces/IKeyboardDriverHandler.h" 17 #include "threads/CriticalSection.h" 18 #include "threads/Event.h" 19 #include "threads/Thread.h" 20 #include "utils/Observer.h" 52 void Run(
const std::string& strControllerId,
53 const std::vector<IFeatureButton*>& buttons)
override;
55 bool Abort(
bool bWait =
true)
override;
57 void UnregisterKeys()
override;
60 std::string
ControllerID()
const override {
return m_strControllerId; }
70 bool OnKeyPress(
const CKey& key)
override;
74 void Notify(
const Observable& obs,
const ObservableMessage msg)
override;
78 void Process()
override;
81 void InitializeState(
void);
83 bool IsMapping()
const;
84 bool IsMapping(
const std::string& location)
const;
86 void InstallHooks(
void);
87 void RemoveHooks(
void);
92 bool OnAction(
unsigned int actionId);
95 std::string m_strControllerId;
96 std::vector<IFeatureButton*> m_buttons;
100 INPUT::CARDINAL_DIRECTION m_cardinalDirection;
103 std::set<JOYSTICK::CDriverPrimitive> m_history;
104 bool m_lateAxisDetected;
105 std::string m_location;
106 bool m_bIsKeyboard =
false;
107 CCriticalSection m_stateMutex;
112 CCriticalSection m_motionMutex;
113 std::set<const JOYSTICK::IButtonMap*> m_bInMotion;
116 std::unique_ptr<KEYBOARD::IActionMap> m_actionMap;
117 std::map<XBMCKey, CPhysicalFeature> m_keyMap;
This is an Event class built from a ConditionVariable.
Definition: Event.h:35
THROTTLE_DIRECTION
Directions on a throttle.
Definition: JoystickTypes.h:130
A wizard to direct user input.
Definition: IConfigurationWindow.h:240
Interface for mapping buttons to Kodi actions.
Definition: IKeymap.h:22
Definition: GUIConfigurationWizard.h:40
bool NeedsCooldown() const override
Return true if the button mapper wants a cooldown between button mapping commands.
Definition: GUIConfigurationWizard.h:61
PRIMITIVE_TYPE
Type of driver primitive.
Definition: JoystickTypes.h:150
WHEEL_DIRECTION
Directions on a wheel.
Definition: JoystickTypes.h:120
Definition: AudioDecoder.h:18
Definition: Observer.h:31
Basic driver element associated with input events.
Definition: DriverPrimitive.h:69
std::string ControllerID() const override
The add-on ID of the game controller associated with this button mapper.
Definition: GUIConfigurationWizard.h:60
Interface for handling keyboard events.
Definition: IKeyboardDriverHandler.h:21
Definition: PhysicalFeature.h:30
Definition: Observer.h:44
bool AcceptsPrimitive(JOYSTICK::PRIMITIVE_TYPE type) const override
Return true if the button mapper accepts primitives of the given type.
Definition: GUIConfigurationWizard.h:62
void OnKeyRelease(const CKey &key) override
A key has been released.
Definition: GUIConfigurationWizard.h:71