Ersa Wearable Platform
Embedded smartwatch firmware and application framework
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ersa::watchface::AppWatchface Class Reference

#include <app_watchface.h>

Inheritance diagram for ersa::watchface::AppWatchface:
Inheritance graph
[legend]
Collaboration diagram for ersa::watchface::AppWatchface:
Collaboration graph
[legend]

Public Member Functions

 AppWatchface ()
 
 ~AppWatchface () override=default
 
const char * getId () const override
 
const char * getTitle () const override
 
void onEnter () override
 
void onExit () override
 
void onEvent (const events::Event &event) override
 
void render (hal::IDisplay &display, bool fullRefresh) override
 
Rect getPartialBounds () const override
 
- Public Member Functions inherited from ersa::app::Application
virtual ~Application ()=default
 
virtual void onCreate ()
 
virtual void onStart ()
 
virtual void onResume ()
 
virtual void onPause ()
 
virtual void onStop ()
 
virtual void onDestroy ()
 
virtual void render (ui::Canvas &canvas)
 
virtual void tick ()
 
- Public Member Functions inherited from ersa::events::IEventListener
virtual ~IEventListener ()=default
 

Static Public Member Functions

static AppWatchface & instance ()
 

Private Attributes

uint32_t shownMinute_ {UINT32_MAX}
 
uint8_t shownDay_ {0}
 
bool shownRtcHealthy_ {false}
 

Detailed Description

Default clock face showing local time, date, and companion status. It observes normalized app events and requests only the dynamic region for ordinary minute/media/call changes; the fixed footer is preserved to avoid unnecessary e-paper refresh and ghosting.

Constructor & Destructor Documentation

◆ AppWatchface()

ersa::watchface::AppWatchface::AppWatchface ( )
default

Initialize cached render keys so first paint includes every field.

◆ ~AppWatchface()

ersa::watchface::AppWatchface::~AppWatchface ( )
overridedefault

Member Function Documentation

◆ getId()

const char * ersa::watchface::AppWatchface::getId ( ) const
inlineoverridevirtual

Return the stable registry ID used for watchface navigation.

Implements ersa::app::Application.

◆ getPartialBounds()

Rect ersa::watchface::AppWatchface::getPartialBounds ( ) const
inlineoverridevirtual

Return the smallest display rectangle that may have changed. The UI uses this to limit partial e-paper refreshes and reduce visible flashing; return the whole panel when the changed region cannot be bounded. The default describes the 200 by 200 reference canvas and is conservative for the current product; other geometries should provide their own.

Reimplemented from ersa::app::Application.

◆ getTitle()

const char * ersa::watchface::AppWatchface::getTitle ( ) const
inlineoverridevirtual

Return the product-facing watchface label.

Implements ersa::app::Application.

◆ instance()

AppWatchface & ersa::watchface::AppWatchface::instance ( )
static

Return the single static instance registered by the app registry.

◆ onEnter()

void ersa::watchface::AppWatchface::onEnter ( )
overridevirtual

Mark the clock face active and request its initial render.

Reimplemented from ersa::app::Application.

◆ onEvent()

void ersa::watchface::AppWatchface::onEvent ( const events::Event &  event)
overridevirtual

Update cached display state for time, media, call, or notification events.

Reimplemented from ersa::app::Application.

◆ onExit()

void ersa::watchface::AppWatchface::onExit ( )
overridevirtual

Stop face-specific observation when navigating to another app.

Reimplemented from ersa::app::Application.

◆ render()

void ersa::watchface::AppWatchface::render ( hal::IDisplay &  display,
bool  fullRefresh 
)
overridevirtual

Draw the clock and dynamic companion information using display HAL calls.

Reimplemented from ersa::app::Application.

Member Data Documentation

◆ shownDay_

uint8_t ersa::watchface::AppWatchface::shownDay_ {0}
private

◆ shownMinute_

uint32_t ersa::watchface::AppWatchface::shownMinute_ {UINT32_MAX}
private

◆ shownRtcHealthy_

bool ersa::watchface::AppWatchface::shownRtcHealthy_ {false}
private

The documentation for this class was generated from the following files: