11 #include "input/KeyboardStat.h" 12 #include "input/actions/Action.h" 13 #include "input/button/ButtonStat.h" 14 #include "input/mouse/MouseStat.h" 15 #include "input/mouse/interfaces/IMouseInputProvider.h" 16 #include "interfaces/IActionListener.h" 17 #include "settings/lib/ISettingCallback.h" 18 #include "threads/CriticalSection.h" 19 #include "utils/Observer.h" 20 #include "windowing/XBMC_events.h" 41 class IKeyboardDriverHandler;
46 class IMouseDriverHandler;
76 bool ProcessMouse(
int windowId);
85 bool ProcessEventServer(
int windowId,
float frameTime);
92 bool ProcessPeripherals(
float frameTime);
100 bool Process(
int windowId,
float frameTime);
105 void InitializeInputs();
124 void SetMouseActive(
bool active =
true);
130 void SetMouseEnabled(
bool mouseEnabled =
true);
137 void SetMouseState(MOUSE_STATE mouseState);
143 bool IsMouseActive();
150 MOUSE_STATE GetMouseState();
167 void SetMouseResolution(
int maxX,
int maxY,
float speedX,
float speedY);
172 bool IsControllerEnabled()
const;
177 bool HasBuiltin(
const std::string& command);
186 int ExecuteBuiltin(
const std::string& execute,
const std::vector<std::string>& params);
190 bool ReloadKeymaps();
192 void AddKeymap(
const std::string& keymap);
193 void RemoveKeymap(
const std::string& keymap);
195 const IKeymapEnvironment* KeymapEnvironment()
const {
return m_keymapEnvironment.get(); }
206 CAction GetAction(
int window,
const CKey& key,
bool fallback =
true);
208 bool TranslateCustomControllerString(
int windowId,
209 const std::string& controllerName,
212 std::string& strAction);
214 bool TranslateTouchAction(
215 int windowId,
int touchAction,
int touchPointers,
int& action, std::string& actionString);
217 std::vector<std::shared_ptr<const IWindowKeymap>> GetJoystickKeymaps()
const;
222 void QueueAction(
const CAction& action);
225 void OnSettingChanged(
const std::shared_ptr<const CSetting>& setting)
override;
228 bool OnAction(
const CAction& action)
override;
243 bool OnKey(
const CKey& key);
250 void OnKeyUp(
const CKey& key);
257 bool HandleKey(
const CKey& key);
266 bool AlwaysProcess(
const CAction& action);
275 bool ExecuteInputAction(
const CAction& action);
279 void ProcessQueuedActions();
286 std::map<std::string, std::map<int, float>> m_lastAxisMap;
288 std::vector<CAction> m_queuedActions;
289 CCriticalSection m_actionMutex;
292 std::unique_ptr<IKeymapEnvironment> m_keymapEnvironment;
293 std::unique_ptr<CButtonTranslator> m_buttonTranslator;
294 std::unique_ptr<CCustomControllerTranslator> m_customControllerTranslator;
295 std::unique_ptr<CTouchTranslator> m_touchTranslator;
296 std::unique_ptr<CJoystickMapper> m_joystickTranslator;
298 std::vector<KODI::KEYBOARD::IKeyboardDriverHandler*> m_keyboardHandlers;
299 std::vector<KODI::MOUSE::IMouseDriverHandler*> m_mouseHandlers;
301 std::unique_ptr<KODI::KEYBOARD::IKeyboardDriverHandler> m_keyboardEasterEgg;
304 bool m_enableController =
true;
307 static const std::string SETTING_INPUT_ENABLE_CONTROLLER;
Definition: ISettingCallback.h:16
Definition: MouseStat.h:91
Definition: KeyboardStat.h:33
Definition: TouchTranslator.h:18
Definition: JoystickMapper.h:24
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Controller configuration window.
Definition: AudioDecoder.h:18
Definition: CustomControllerTranslator.h:18
Definition: IActionListener.h:13
Definition: ProfileManager.h:25
Interface for handling mouse driver events.
Definition: IMouseDriverHandler.h:21
Definition: XBMC_events.h:109
Definition: MouseStat.h:99
Interface for handling keyboard events.
Definition: IKeyboardDriverHandler.h:21
Interface for mapping buttons to Kodi actions for specific windows.
Definition: IKeymap.h:54
Definition: Observer.h:44
Customizes the environment in which keymapping is performed.
Definition: IKeymapEnvironment.h:21