1
1
#include " touchhandler/TouchHandler.h"
2
- #ifdef PINETIME_IS_RECOVERY
3
- #include " displayapp/DummyLittleVgl.h"
4
- #else
5
- #include " displayapp/LittleVgl.h"
6
- #endif
7
2
8
3
using namespace Pinetime ::Controllers;
9
4
using namespace Pinetime ::Applications;
@@ -32,14 +27,7 @@ namespace {
32
27
}
33
28
}
34
29
35
- TouchHandler::TouchHandler (Drivers::Cst816S& touchPanel, Components::LittleVgl& lvgl) : touchPanel {touchPanel}, lvgl {lvgl} {
36
- }
37
-
38
- void TouchHandler::CancelTap () {
39
- if (info.touching ) {
40
- isCancelled = true ;
41
- lvgl.SetNewTouchPoint (-1 , -1 , true );
42
- }
30
+ TouchHandler::TouchHandler (Drivers::Cst816S& touchPanel) : touchPanel {touchPanel} {
43
31
}
44
32
45
33
Pinetime::Applications::TouchEvents TouchHandler::GestureGet () {
@@ -55,6 +43,7 @@ bool TouchHandler::GetNewTouchInfo() {
55
43
return false ;
56
44
}
57
45
46
+ // Only a single gesture per touch
58
47
if (info.gesture != Pinetime::Drivers::Cst816S::Gestures::None) {
59
48
if (gestureReleased) {
60
49
if (info.gesture == Pinetime::Drivers::Cst816S::Gestures::SlideDown ||
@@ -78,18 +67,3 @@ bool TouchHandler::GetNewTouchInfo() {
78
67
79
68
return true ;
80
69
}
81
-
82
- void TouchHandler::UpdateLvglTouchPoint () {
83
- if (info.touching ) {
84
- if (!isCancelled) {
85
- lvgl.SetNewTouchPoint (info.x , info.y , true );
86
- }
87
- } else {
88
- if (isCancelled) {
89
- lvgl.SetNewTouchPoint (-1 , -1 , false );
90
- isCancelled = false ;
91
- } else {
92
- lvgl.SetNewTouchPoint (info.x , info.y , false );
93
- }
94
- }
95
- }
0 commit comments