2020-01-18 18:17:52 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Components/Gfx/Gfx.h>
|
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
2020-02-16 18:32:36 +01:00
|
|
|
class DisplayApp;
|
2020-01-18 18:17:52 +01:00
|
|
|
namespace Screens {
|
|
|
|
class Screen {
|
|
|
|
public:
|
2020-02-16 18:32:36 +01:00
|
|
|
enum class NextScreen {None, Clock, Menu, App};
|
2020-02-23 13:44:39 +01:00
|
|
|
|
|
|
|
Screen(DisplayApp* app) : app{app} {}
|
2020-02-16 18:32:36 +01:00
|
|
|
virtual ~Screen() = default;
|
2020-02-23 13:44:39 +01:00
|
|
|
|
|
|
|
// Return false if the app can be closed, true if it must continue to run
|
|
|
|
virtual bool Refresh(bool fullRefresh) = 0;
|
|
|
|
|
|
|
|
// Return false if the button hasn't been handled by the app, true if it has been handled
|
|
|
|
virtual bool OnButtonPushed() { return false; }
|
2020-01-18 18:17:52 +01:00
|
|
|
|
|
|
|
protected:
|
2020-02-16 18:32:36 +01:00
|
|
|
DisplayApp* app;
|
2020-01-18 18:17:52 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|