summaryrefslogtreecommitdiff
path: root/src/DisplayApp/Screens/Screen.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-03-03 19:59:01 +0100
committerJF <jf@codingfield.com>2020-03-03 19:59:01 +0100
commit545636940f68108a361dda85e0e48a240909cf29 (patch)
treef471cf8f60976ab1fffce747db021e5706bf60c2 /src/DisplayApp/Screens/Screen.h
parent79b4f006be8732663706f1177e17e52829eb661f (diff)
parentd2f725ec9bc6d848906b83ca539d873223d74648 (diff)
Merge branch 'littlevgl'
# Conflicts: # src/DisplayApp/Screens/Clock.cpp # src/DisplayApp/Screens/Clock.h
Diffstat (limited to 'src/DisplayApp/Screens/Screen.h')
-rw-r--r--src/DisplayApp/Screens/Screen.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/DisplayApp/Screens/Screen.h b/src/DisplayApp/Screens/Screen.h
index 5e2fa43e..6cbd41ad 100644
--- a/src/DisplayApp/Screens/Screen.h
+++ b/src/DisplayApp/Screens/Screen.h
@@ -1,17 +1,22 @@
#pragma once
-#include <Components/Gfx/Gfx.h>
-
namespace Pinetime {
namespace Applications {
+ class DisplayApp;
namespace Screens {
class Screen {
public:
- Screen(Components::Gfx& gfx) : gfx{gfx} {}
- virtual void Refresh(bool fullRefresh) = 0;
+ Screen(DisplayApp* app) : app{app} {}
+ virtual ~Screen() = default;
+
+ // Return false if the app can be closed, true if it must continue to run
+ virtual bool Refresh() = 0;
+
+ // Return false if the button hasn't been handled by the app, true if it has been handled
+ virtual bool OnButtonPushed() { return false; }
protected:
- Components::Gfx& gfx;
+ DisplayApp* app;
};
}
}