Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
app_watchface.h
Go to the documentation of this file.
1#pragma once
2
4#include <stdint.h>
5
6namespace ersa {
7namespace watchface {
8
16public:
19 ~AppWatchface() override = default;
20
22 const char* getId() const override { return "watchface_clock"; }
24 const char* getTitle() const override { return "Watchface"; }
25
27 void onEnter() override;
29 void onExit() override;
31 void onEvent(const events::Event& event) override;
33 void render(hal::IDisplay& display, bool fullRefresh) override;
34
35 // Clock/media/call content changes above the fixed weekday/date footer.
36 // Midnight already forces a full refresh in WatchUi.
37 Rect getPartialBounds() const override { return Rect{0, 0, 200, 160}; }
38
40 static AppWatchface& instance();
41
42private:
43 uint32_t shownMinute_{UINT32_MAX};
44 uint8_t shownDay_{0};
45 bool shownRtcHealthy_{false};
46};
47
48} // namespace watchface
49} // namespace ersa
Definition application.h:22
Definition display.h:40
Definition app_watchface.h:15
static AppWatchface & instance()
Definition app_watchface.cpp:14
void onExit() override
Definition app_watchface.cpp:26
void onEvent(const events::Event &event) override
Definition app_watchface.cpp:30
const char * getTitle() const override
Definition app_watchface.h:24
void onEnter() override
Definition app_watchface.cpp:21
uint32_t shownMinute_
Definition app_watchface.h:43
~AppWatchface() override=default
uint8_t shownDay_
Definition app_watchface.h:44
bool shownRtcHealthy_
Definition app_watchface.h:45
Rect getPartialBounds() const override
Definition app_watchface.h:37
const char * getId() const override
Definition app_watchface.h:22
void render(hal::IDisplay &display, bool fullRefresh) override
Definition app_watchface.cpp:58
Definition application.h:10
Definition types.h:121
Definition event.h:134