From 35e221078bf8e7b1548f5b75c391404d098442a0 Mon Sep 17 00:00:00 2001 From: JF Date: Mon, 9 Mar 2020 21:29:12 +0100 Subject: Add support for gestures and integrate it with the vertical scrolling transition. --- src/DisplayApp/DisplayApp.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/DisplayApp/DisplayApp.h') diff --git a/src/DisplayApp/DisplayApp.h b/src/DisplayApp/DisplayApp.h index 2505423a..eaad1baa 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 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. }; } } -- cgit v1.2.3-70-g09d2