diff options
| author | JF <jf@codingfield.com> | 2020-03-09 20:29:12 (GMT) |
|---|---|---|
| committer | JF <jf@codingfield.com> | 2020-03-09 20:29:12 (GMT) |
| commit | 35e221078bf8e7b1548f5b75c391404d098442a0 (patch) | |
| tree | 283687c96c5b8a33716229cc77c0fd23cc2ae5dd /src/DisplayApp/DisplayApp.h | |
| parent | 968f18f4727d865242fc67d55f298b196f75b0f8 (diff) | |
Add support for gestures and integrate it with the vertical scrolling transition.
Diffstat (limited to 'src/DisplayApp/DisplayApp.h')
| -rw-r--r-- | src/DisplayApp/DisplayApp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h index 2505423..eaad1ba 100644 --- a/src/DisplayApp/DisplayApp.h +++ b/src/DisplayApp/DisplayApp.h @@ -25,6 +25,8 @@ namespace Pinetime { public: enum class States {Idle, Running}; enum class Messages : uint8_t {GoToSleep, GoToRunning, UpdateDateTime, UpdateBleConnection, UpdateBatteryLevel, TouchEvent, SwitchScreen,ButtonPushed} ; + enum class TouchEvents { None, Tap, SwipeLeft, SwipeRight, SwipeUp, SwipeDown, LongTap, DoubleTap + }; DisplayApp(Pinetime::Drivers::St7789& lcd, Pinetime::Components::LittleVgl& lvgl, Pinetime::Drivers::Cst816S&, @@ -59,7 +61,7 @@ namespace Pinetime { Pinetime::Controllers::DateTime& dateTimeController; Pinetime::Drivers::Cst816S& touchPanel; - void OnTouchEvent(); + TouchEvents OnTouchEvent(); std::unique_ptr<Screens::Screen> currentScreen; static constexpr uint8_t pinLcdBacklight1 = 14; @@ -70,6 +72,7 @@ namespace Pinetime { Pinetime::System::SystemTask& systemTask; Apps nextApp = Apps::None; + bool onClockApp = false; // TODO find a better way to know that we should handle gestures and button differently for the Clock app. }; } } |
