From 39f7545cd5ef7a30bbd482f3579df7744c6b688d Mon Sep 17 00:00:00 2001 From: jacqueline Date: Fri, 7 Jul 2023 15:29:47 +1000 Subject: wire up the playing screen with some real data Includes implementing song duration calculation for CBR MP3 files --- src/ui/include/screen.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ui/include/screen.hpp') diff --git a/src/ui/include/screen.hpp b/src/ui/include/screen.hpp index 7ff06fbd..13b92a09 100644 --- a/src/ui/include/screen.hpp +++ b/src/ui/include/screen.hpp @@ -15,14 +15,24 @@ namespace ui { +/* + * Base class for ever discrete screen in the app. Provides a consistent + * interface that can be used for transitioning between screens, adding them to + * back stacks, etc. + */ class Screen { public: Screen() : root_(lv_obj_create(NULL)), group_(lv_group_create()) {} + virtual ~Screen() { lv_obj_del(root_); lv_group_del(group_); } + /* + * Called periodically to allow the screen to update itself, e.g. to handle + * std::futures that are still loading in. + */ virtual auto Tick() -> void {} auto root() -> lv_obj_t* { return root_; } -- cgit v1.2.3