The skin-neutral slot engine: builds one layer per slot from a face's slot list and repaints them all when a store changes. A slot is either a text-slot (a TextLayer built from a Zone, so the font-fit tiers still apply) or a draw-slot (a custom layer whose update_proc paints a gauge, icon, or panel). A face supplies a build callback. A dynamic face (the grid) re-runs it on a layout change. This is the shared core a face's own engine sits on.
More...
#include <pebble.h>
#include "ui/zone.h"
Go to the source code of this file.
|
| typedef uint8_t(*) | EngineBuild(EngineSlot *out, uint8_t max, GRect bounds) |
| | Fills the caller's slots and returns the count. A static face returns a fixed list. A dynamic face works it out from settings.
|
|
| void | engine_init (Window *window, EngineBuild build) |
| | Build the slot layers for a face and paint them once.
|
|
void | engine_deinit (void) |
| | Tear down the slot layers.
|
|
void | engine_rebuild (void) |
| | Rebuild the slot layers (after a layout or theme change).
|
|
void | engine_mark_dirty (void) |
| | Repaint every slot: text-slots re-pull + fit, draw-slots mark dirty.
|
| void | engine_mark_dirty_tags (uint32_t changed) |
| | Repaint only the slots whose tags intersect changed (plus any slot with no tags). Lets a face route a store change to just the slots that read from it.
|
The skin-neutral slot engine: builds one layer per slot from a face's slot list and repaints them all when a store changes. A slot is either a text-slot (a TextLayer built from a Zone, so the font-fit tiers still apply) or a draw-slot (a custom layer whose update_proc paints a gauge, icon, or panel). A face supplies a build callback. A dynamic face (the grid) re-runs it on a layout change. This is the shared core a face's own engine sits on.