summaryrefslogtreecommitdiff
path: root/wasp/apps/template.py
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2021-06-20 09:21:25 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2021-06-20 09:21:25 (GMT)
commit2a1ac322799ce0ae549110ec96dbb2caa28cf6d0 (patch)
treed96609ec2e79aa57f180f9fccd620d4ae46ab046 /wasp/apps/template.py
parent3ea061508ff356c5df6fbad9b69e6e41fbe3eefa (diff)
all clocks: Add a preview() method ready for a watch face chooser
One benefit from wasp-os' dirt simple drawing model is that it is very easy for apps to provide full screen previews of themselves. Add this for all clocks ready for us to add a watch face chooser application. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/apps/template.py')
-rw-r--r--wasp/apps/template.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/wasp/apps/template.py b/wasp/apps/template.py
index e611545..3027599 100644
--- a/wasp/apps/template.py
+++ b/wasp/apps/template.py
@@ -63,6 +63,18 @@ class TemplateApp():
"""Notify the application the device is waking up."""
pass
+ def preview(self):
+ """Provide a preview for the watch face selection.
+
+ preview() must be implemented by watch face applications because it
+ is called by the watch face selector. When called the application should
+ redraw the screen as through it was the foreground() application. The
+ application will not be active after the preview.
+
+ Other applications should not implement this entry point.
+ """
+ pass
+
def press(self, button, state):
"""Notify the application of a button-press event."""
draw = wasp.watch.drawable