diff options
| author | jacqueline <me@jacqueline.id.au> | 2025-01-15 15:37:35 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2025-01-15 15:37:35 +1100 |
| commit | a69b95187be4afce4eefa8f7b08ceca7b88b7724 (patch) | |
| tree | 42b39630c4fac348c87b2e2d4db3cb115f1d83cd /src/tangara/input/input_touch_dpad.hpp | |
| parent | dfb4ea54581de68a042746e9f7291ac2f833d47d (diff) | |
| download | tangara-fw-a69b95187be4afce4eefa8f7b08ceca7b88b7724.tar.gz | |
Handle lock state in each input device, instead of in the lvgl driver
Diffstat (limited to 'src/tangara/input/input_touch_dpad.hpp')
| -rw-r--r-- | src/tangara/input/input_touch_dpad.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tangara/input/input_touch_dpad.hpp b/src/tangara/input/input_touch_dpad.hpp index 4e50819a..d787bace 100644 --- a/src/tangara/input/input_touch_dpad.hpp +++ b/src/tangara/input/input_touch_dpad.hpp @@ -11,10 +11,10 @@ #include "indev/lv_indev.h" #include "drivers/haptics.hpp" +#include "drivers/touchwheel.hpp" #include "input/input_device.hpp" #include "input/input_hook.hpp" #include "input/input_trigger.hpp" -#include "drivers/touchwheel.hpp" namespace input { @@ -27,6 +27,9 @@ class TouchDPad : public IInputDevice { auto name() -> std::string override; auto triggers() -> std::vector<std::reference_wrapper<TriggerHooks>> override; + auto onLock() -> void override; + auto onUnlock() -> void override; + private: drivers::TouchWheel& wheel_; @@ -35,6 +38,8 @@ class TouchDPad : public IInputDevice { TriggerHooks right_; TriggerHooks down_; TriggerHooks left_; + + bool locked_; }; } // namespace input |
