diff options
author | JF <jf@codingfield.com> | 2020-03-15 21:01:24 +0100 |
---|---|---|
committer | JF <jf@codingfield.com> | 2020-03-15 21:01:24 +0100 |
commit | 8ed6ffaaf8d0ad681c4f84b89e4a72792edb5a8f (patch) | |
tree | 594ce4ca20956b61bd796d8aabb64a1ae78c425e /src/DisplayApp/Screens/Screen.h | |
parent | 2c55ab20b4f52d21a04e1d0ee049f7c4ca0196de (diff) |
Add the possibility to the screen to handle a touch gesture.
A default action is taken if the current screen doesn't handle it.
Diffstat (limited to 'src/DisplayApp/Screens/Screen.h')
-rw-r--r-- | src/DisplayApp/Screens/Screen.h | 4 |
1 files changed, 4 insertions, 0 deletions
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; }; |