| src | |
| c | |
| core | |
| clock | |
| astro.c | Pure astronomy math, host-testable off-device |
| astro.h | Pure astronomy math you can test off the watch. Right now just the Julian Date, worked out from a UTC timestamp with plain integer math, so it needs no Pebble services and no floats |
| beats.c | Pure swatch .beats math, host-testable off-device |
| beats.h | Pure swatch .beats math, operates on ms since Biel Mean Time (UTC+1) midnight. Also holds the token a date format uses to ask for a .beats reading |
| date.c | Pure calendar math, host-testable off-device |
| date.h | Pure calendar math you can test off the watch. Week numbers, day counts, and month shapes worked out from plain numbers, so it needs no Pebble services and no struct tm |
| duration.c | A minute count turned into a short human duration |
| duration.h | A minute count turned into a short human duration, no SDK |
| hour_latch.c | The hourly buzz latch, host-testable off-device |
| hour_latch.h | Decides when an hourly buzz fires, so it fires once for each real hour |
| moon.c | Pure moon-phase math, host-testable off-device |
| moon.h | Pure moon-phase math you can test off the watch. It counts from a known new moon using the average length of a moon cycle, so it needs nothing but a UTC timestamp |
| nightsched.c | The night window, by containment rather than by edge |
| nightsched.h | Whether a night-time window is open right now, from plain clock readings |
| rotate.c | Working out which one is up from the clock |
| rotate.h | Which one of a set to show right now, on a timed rotation |
| solar.c | How the day's light is going, worked out from three plain clock readings |
| solar.h | How the day's light is going, worked out from three plain clock readings |
| tide.c | The rise and fall of a semidiurnal tide, from a plain running minute count |
| tide.h | The rise and fall of a semidiurnal tide, from a plain running minute count |
| timeband.c | The window sums: build one, place a moment on it, and clip a span to it |
| timeband.h | A stretch of the day as an axis, and the sums that put a moment somewhere along it |
| weekday.c | Weekday names, host-testable off-device |
| weekday.h | Short weekday names shared by the panels that label a day |
| zone_setting.c | Reads a time zone setting the way the phone sends it |
| zone_setting.h | Reads a time zone setting the way the phone sends it, the minutes ahead of UTC then a comma and the place's name, as in "60,London". An empty setting means no zone is picked, which is what the phone sends once the wearer clears the picker |
| health | |
| minute_window.c | Where a run of minute records lands in a window that ends at a given minute |
| minute_window.h | Where a run of minute records lands in a window that ends at a given minute |
| step_hours.c | The hour arithmetic behind the step chart's buckets |
| step_hours.h | The hour arithmetic behind the step chart's buckets |
| io | |
| bytes_le.h | Little-endian byte readers shared by the wire-decoding stores |
| callback_list.c | Adding to and running a callback list |
| callback_list.h | A short fixed list of callbacks, run in the order they were added |
| layout | |
| layout_role.c | The deprecated layout_role_pick, forwarding to role_pick |
| layout_role.h | Deprecated names for the day/night/Quiet Time picker that role.h provides |
| layout_string.c | Walking a layout wire string far enough to answer whether it holds anything |
| layout_string.h | Reading a layout wire string without parsing the whole thing |
| math | |
| pct.c | Progress towards a goal, as a percent |
| pct.h | Progress towards a goal, as a percent |
| scale.c | The clamp and segment maths a bar or gauge is built from |
| scale.h | The clamp and segment maths a bar or gauge is built from, no SDK |
| series.c | Reducing a run of samples to the few numbers a chart draws from |
| series.h | Reducing a run of samples to the few numbers a chart draws from, no SDK |
| role | |
| role.c | The order the day, night, and Quiet Time triggers are asked in |
| role.h | Which of day, night, and Quiet Time should be on screen right now |
| text | |
| cstring_fit.h | Comparing a string against a fixed buffer it is about to be copied into |
| number_format.c | Pure number and string formatting, no SDK behind it |
| number_format.h | Pure number and string formatting, no SDK behind it |
| text_case.c | Pure ascii case helpers, no SDK behind them |
| text_case.h | Pure ascii case helpers, no SDK behind them |
| units | |
| distance.c | Pure distance conversions and formatting, no SDK behind them |
| distance.h | Pure distance conversions and formatting, no SDK behind them |
| wind.c | Pure wind-speed conversions and unit labels, no SDK behind them |
| wind.h | Pure wind-speed conversions and unit labels, no SDK behind them |
| weather | |
| forecast_age.c | How much of a forecast strip has already gone by |
| forecast_age.h | How much of a forecast strip has already gone by, so a strip that stays on the watch after a missed fetch shows what is still to come rather than hours and days already over |
| weather_reading.c | Turns one weather message into the reading a store keeps |
| weather_reading.h | One weather message off the phone, and the reading it leaves behind |
| wind_dir.c | The compass direction a wind is blowing from, as a bearing and as a sideways component |
| wind_dir.h | The compass direction a wind is blowing from, as a bearing and as a sideways component |
| wx_label.c | The short word a small slot shows for the sky |
| wx_label.h | The short word a small slot shows for the sky, from the condition token the phone sends |
| wire | |
| calendar_wire.c | The agenda as the phone packs it, and the reader that unpacks it |
| calendar_wire.h | The agenda as the phone packs it, and the reader that unpacks it |
| coords.c | Telling a real fix from the phone's way of saying it has none |
| coords.h | Telling a real fix from the phone's way of saying it has none |
| stock_wire.c | The watchlist as the phone packs it, and the reader that unpacks it |
| stock_wire.h | The watchlist as the phone packs it, and the reader that unpacks it |
| weather_wire.c | The forecast strips as the phone packs them, and the readers that unpack them |
| weather_wire.h | The forecast strips as the phone packs them, and the readers that unpack them |
| wire_caps.g.h | Strip caps and marker values shared by the phone and the watch |
| wire_read.h | Reads the values the phone packs into a message |
| pebble | |
| io | |
| appmessage | |
| appmessage.c | AppMessage transport: weather requests out, settings + readings in. Decodes the wire format and hands results to the app through handlers, so it never reaches into the UI itself |
| appmessage.h | AppMessage transport. Decodes the inbox and notifies the app through per-channel handlers, and queues the outbound weather, stock, and calendar requests through one outbox |
| appmessage_features.h | Which of the phone's optional features a face has, worked out from the message keys it declares. The waf build defines a HAS_MESSAGE_KEY_* for every key in the face's messageKeys, and this turns those into one switch per feature, so every file asking the same question gets the same answer |
| stores | |
| calendar_store.c | The active calendar store: holds the agenda, owns the appmessage calendar channel, and asks the phone for more whenever its turn on the face's cadence finds a poll due |
| calendar_store.h | Active calendar store. It owns the appmessage calendar channel and its place on the shared cadence, so a face just hands it the rules (live / poll interval), optionally seeds it, then reads the events and subscribes for repaints. The phone data flows straight in and nobody wires it |
| health_store.c | The active health store: reads the watch's health service and holds the numbers. It owns the service accessors too so it is the single point of truth for health |
| health_store.h | Active health store. It subscribes to the watch's health service itself and holds the readings, so a face just hands it the rules, optionally seeds it, then reads the numbers back |
| location_store.c | The active location store: holds the phone's coordinates and owns the appmessage coords channel |
| location_store.h | Active location store. It owns the appmessage coords channel (the same phone geolocation the weather rides on), so a face hands it the rules, optionally seeds it, then reads lat/lon back. There's no poll timer. Coords arrive alongside weather |
| stock_store.c | The active stock store: holds the quotes, owns the appmessage stock channel, and asks the phone for more whenever its turn on the face's cadence finds a poll due |
| stock_store.h | Active stock store. It owns the appmessage stock channel and its place on the shared cadence, so a face just hands it the rules (live / poll interval), optionally seeds it, then reads the slots and subscribes for repaints. The phone data flows straight in and nobody wires it |
| store_cadence.c | Holds the list of work the stores want run on the face's cadence |
| store_cadence.h | The shared cadence the stores hang their periodic work on |
| store_fetch.c | The fetch timing the polling stores share, in one copy every store links against |
| store_fetch.h | The fetch timing the polling stores share: the one-shot catch-up, the cadence turn, and what an init or a reconfigure does to them |
| store_persist.c | The save that skips an unchanged reading and the restore that feeds it, in one copy every store links against |
| store_persist.h | Shared persist save and restore helpers for the stores |
| store_poll.c | The polling decisions the weather, stock, and calendar stores share |
| store_poll.h | Wall-clock deadlines for the stores that poll the phone |
| store_sum.c | The checksum the stores compare before saving, in one copy every store links against |
| store_sum.h | A checksum of a store's reading, so a reply that brings nothing new costs no flash write |
| system_store.c | The active system store: holds the battery + bluetooth state and subscribes to the battery and connection services itself. The alarm is read through on demand |
| system_store.h | Active system store: the watch's own battery, bluetooth and next-alarm state. It subscribes to the battery and connection services itself and buzzes on a bluetooth change through a policy the face installs (so the store never has to know about settings or buzzing) |
| time_store.c | The active time store: holds the current time and owns the tickers that update it |
| time_store.h | Active time store. It owns the tickers (the minute tick, the swatch .beats AppTimer, and the hour tick) and swaps between them for the current cadence, so a face just hands it the rules and reads the time back |
| weather_store.c | The active weather store: holds the readings, owns the appmessage weather channels, and asks the phone for more whenever its turn on the face's cadence finds a poll due |
| weather_store.h | Active weather store. It owns the appmessage weather channels and its place on the shared cadence, so a face just hands it the rules (live / poll interval), optionally seeds it, then reads the values and subscribes for repaints. The phone data flows straight in and nobody wires it |
| outbox_queue.h | The outbox's work queue, its failed set, and the slot holding whatever is in flight |
| tuple_read.c | Reads a value out of an inbound message tuple |
| tuple_read.h | Reads a value out of an inbound message tuple |
| system | |
| settings | |
| setting_values.h | Named values for the multi-choice settings |
| settings.c | The persist API implementation |
| settings.h | The persist API. A per-face SettingField table drives versioned load and save, sanitizing, the typed reads, and the AppMessage round trip, so the shared code never names or hardcodes a single field |
| settings_catalog.h | The shared catalog of known settings. A KNOWN_* macro per setting bakes in its neutral wire key, encoding, bounds, default, and side effects |
| units | |
| units.c | The SDK-facing units facade. Reads the clock for .beats and forwards the rest to the pure lib cores, clock/beats and units/distance |
| units.h | Swatch internet time in .beats, and distance formatting in miles or kilometres |
| vibe | |
| vibe.c | The haptic feedback wrapper implementation |
| vibe.h | The haptic feedback wrapper |
| ui | |
| engine | |
| engine.c | The skin-neutral slot engine. Builds one layer per slot and repaints them all on a store change |
| engine.h | 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 |
| weather | |
| icons.c | Weather-icon resource lookup implementation |
| icons.h | Condition-string to weather-icon resource lookup |
| icons_table.g.h | Condition token to weather icon resource lookup |
| fonts.c | Font registry implementation. A flat id-indexed table of loaded handles |
| fonts.h | Font registry. A face loads its custom fonts once, each under a small integer slot id, and the rest of the ui looks them up by id so layout tables can stay static, carrying an id rather than a live GFont handle. The registry does not care which fonts they are. The face owns the slots and what they mean. See the face's own draw/fonts.h. This just maps an id to its handle |
| icon_cache.c | Icon store. A small cache that maps a resource id to its picture and is shared across a face, so each icon loads once and is freed in one place. Also carries the palette tint and the auto-trim margin scan |
| icon_cache.h | A small load-once icon store keyed by resource id, shared across a face so each icon picture loads a single time and frees in one place. Alongside it sits the palette tint and an optional auto-trim that measures each icon's transparent border so a caller can pin the visible art instead of the padded bitmap box |
| readouts.c | Text formatters shared by the faces, bound to the engine's text-slots |
| readouts.h | Text formatters shared by the faces: pull a value from a store, honour the relevant setting, and format it into a buffer. Each matches the engine's text-slot signature, so a slot binds straight to one (e.g. { .zone = &s_zones[ZONE_TIME],
.text = readout_time }) |
| zone.c | Layout primitives implementation |
| zone.h | Layout primitives. Defines paintable areas and their text alignments |
| plugins | |
| dev | |
| c | |
| dev | |
| dev_walk.c | The shared dev harness. It seeds the stores from a fixed fixture and drives the theme walk. Compiled for any face that lists the dev plugin, and the linker drops it from any face that never calls it, which is every release build |
| dev_walk.h | Shared dev harness for screenshots. It seeds the clock, weather, health, system, and location stores with a fixed fixture, using the store seed mechanism so no live source overwrites it, and drives an accelerometer-tap theme "walk". Each tap steps to the next theme and the next fixed set of readings, on the same fixed clock |