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" 49 void Run(
const std::string& strControllerId,
50 const std::vector<IFeatureButton*>& buttons)
override;
52 bool Abort(
bool bWait =
true)
override;
54 void UnregisterKeys()
override;
57 std::string
ControllerID()
const override {
return m_strControllerId; }
67 bool OnKeyPress(
const CKey& key)
override;
71 void Notify(
const Observable& obs,
const ObservableMessage msg)
override;
75 void Process()
override;
78 void InitializeState(
void);
80 bool IsMapping()
const;
81 bool IsMapping(
const std::string& location)
const;
83 void InstallHooks(
void);
84 void RemoveHooks(
void);
89 bool OnAction(
unsigned int actionId);
92 std::string m_strControllerId;
93 std::vector<IFeatureButton*> m_buttons;
97 INPUT::CARDINAL_DIRECTION m_cardinalDirection;
100 std::set<JOYSTICK::CDriverPrimitive> m_history;
101 bool m_lateAxisDetected;
102 std::string m_location;
103 bool m_bIsKeyboard =
false;
104 CCriticalSection m_stateMutex;
109 CCriticalSection m_motionMutex;
110 std::set<const JOYSTICK::IButtonMap*> m_bInMotion;
113 std::unique_ptr<KEYBOARD::IActionMap> m_actionMap;
114 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:221
Interface for mapping buttons to Kodi actions.
Definition: IKeymap.h:22
Definition: GUIConfigurationWizard.h:37
bool NeedsCooldown() const override
Return true if the button mapper wants a cooldown between button mapping commands.
Definition: GUIConfigurationWizard.h:58
PRIMITIVE_TYPE
Type of driver primitive.
Definition: JoystickTypes.h:150
WHEEL_DIRECTION
Directions on a wheel.
Definition: JoystickTypes.h:120
Controller configuration window.
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:57
Interface for handling keyboard events.
Definition: IKeyboardDriverHandler.h:21
Definition: PhysicalFeature.h:24
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:59
void OnKeyRelease(const CKey &key) override
A key has been released.
Definition: GUIConfigurationWizard.h:68