From 8ed6ffaaf8d0ad681c4f84b89e4a72792edb5a8f Mon Sep 17 00:00:00 2001 From: JF Date: Sun, 15 Mar 2020 21:01:24 +0100 Subject: Add the possibility to the screen to handle a touch gesture. A default action is taken if the current screen doesn't handle it. --- src/DisplayApp/Screens/Screen.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/DisplayApp/Screens/Screen.h') diff --git a/src/DisplayApp/Screens/Screen.h b/src/DisplayApp/Screens/Screen.h index 6cbd41ad..d8902317 100644 --- a/src/DisplayApp/Screens/Screen.h +++ b/src/DisplayApp/Screens/Screen.h @@ -1,4 +1,5 @@ #pragma once +#include "../TouchEvents.h" namespace Pinetime { namespace Applications { @@ -15,6 +16,9 @@ namespace Pinetime { // Return false if the button hasn't been handled by the app, true if it has been handled virtual bool OnButtonPushed() { return false; } + // Return false if the event hasn't been handled by the app, true if it has been handled + virtual bool OnTouchEvent(TouchEvents event) { return false; } + protected: DisplayApp* app; }; -- cgit v1.2.3