| 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 |
| progress.c | The progress sums: seconds gone over seconds in the period, as a whole percent |
| progress.h | How far through the hour, day, week, and year the wall clock is, as a whole percent |
| 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 |
| time_config.c | What a time store reconfigure runs, and the check for whether two sets of its rules run the same tickers |
| time_config.h | The rules a face hands the time store, what a reconfigure runs of them, and the check for whether two sets of rules run the same tickers |
| 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 | |
| goal_latch.c | The goal-met latch, host-testable off-device |
| goal_latch.h | Decides when a daily movement goal has just been met, so the watch cheers once per goal per day |
| goal_vibe_pattern.c | The Goal Met Vibration pick and pattern reader, host-testable off-device |
| goal_vibe_pattern.h | Reads the Goal Met Vibration pick, and turns a comma list of milliseconds into a rhythm the watch can buzz |
| goals.c | The daily goal tables, host-testable off-device |
| goals.h | The daily goals a wearer picks on the settings page, turned from a menu choice into the real target |
| hr_day.c | Today's heart rate by the hour. See hr_day.h |
| hr_day.h | Today's heart rate by the hour, for a panel that charts the day with its low, average, and high |
| hrv_log.c | The heart rate variability readings kept for a face's panels |
| hrv_log.h | The heart rate variability readings kept for a face's panels: the last few with what the wearer was doing, today by the hour, last night's average, and the latest of each kind |
| hrv_motion.c | Tells whether the wearer kept still while a burst of beat gaps was measured |
| hrv_motion.h | Tells how much the wearer's wrist moved while a burst of beat gaps was measured |
| hrv_run.c | Turns the beat gaps the watch reports into heart rate variability, as RMSSD in ms |
| hrv_run.h | Turns the beat gaps the watch reports into heart rate variability, as RMSSD in ms |
| 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 |
| link_change.h | Tells a real change of the phone link from a reading that changes nothing |
| store_live.h | Whether a store runs live after a reconfigure, the one rule every store with a reconfigure follows |
| layout | |
| 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.c | Copying text into a fixed buffer, and checking what a buffer holds before it is used |
| cstring_fit.h | Copying text into a fixed buffer, and checking what a buffer holds before it is used |
| number_format.c | Pure number formatting, no SDK behind it |
| number_format.h | Pure number 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 |
| ui | |
| font_slots.c | The decisions behind the font registry: who owns each slot's font, when a swap has nothing to do, and when a font can be freed |
| font_slots.h | The decisions behind the font registry: who owns each slot's font, when a swap has nothing to do, and when a font can be freed |
| 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 |
| uv_band.c | The risk band a UV index falls in, with a long and a short name for each |
| uv_band.h | The risk band a UV index falls in, with a long and a short name for each |
| 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_cond.c | Turns the condition token the phone sends into its WxCond |
| wx_cond.g.h | The weather conditions as numbers, in the order of the shared list |
| wx_cond.h | The condition token the phone sends, as a number a face can index its own art by |
| 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 |
| music_art.c | Checking the now playing art the phone sent, and laying its rows into a bitmap |
| music_art.h | Now playing art as the phone packs it, and the reader that checks it |
| music_track.c | Taking in the track the phone sent |
| music_track.h | What the phone is playing, as the watch holds it, and taking a new one in |
| phone_level.h | Reads the phone's battery level as the phone sends it |
| 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, calendar, phone battery, and now playing 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_hr_day.c | The health store's heart rate day: today's heart rate by the hour, filled from the watch's minute log at launch and from each reading after. A face turns it on with HEALTH_HR_DAY, and one that never names it carries none of this |
| health_hr_history.c | The health store's heart rate graph: the last hour of heart rate, a reading a minute, saved to flash so a relaunch shows it straight away. A face turns it on with HEALTH_HR_HISTORY, and one that never names it carries none of this |
| health_hrv.c | The heart rate variability half of the health store |
| health_hrv.h | The heart rate variability half of the health store. It asks the watch for beat gaps now and then, holds the sensor on while a burst is measured, and keeps the latest reading |
| health_step_history.c | The health store's hourly steps: today's steps by the hour for a bar chart. A face turns it on with HEALTH_STEP_HISTORY, and one that never names it carries none of this |
| 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 |
| health_store_parts.h | What the health store shares with its optional parts, the heart rate graph, the hourly steps, and the heart rate day. A face never includes this. It names a part in its HealthConfig |
| 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 |
| music_store.c | The active music store: holds what the phone is playing, owns the appmessage now playing channel, and asks the phone again at launch and whenever the link comes back |
| music_store.h | Active music store: what the phone is playing, as a Pebble app music plugin reports it |
| phone_store.c | The active phone store: holds the phone's battery level, owns the appmessage phone battery channel, and asks the phone again at launch and whenever the link comes back |
| phone_store.h | Active phone store: the phone's own battery, as a Pebble app plugin on the phone reports it |
| 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, the ask when the phone comes back, 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 |
| long_text.c | The deciding behind the face's long text setting: when it can be set, whether it fits, what the reply carries, and whether an arrival changed it |
| long_text.h | One text setting too long for the settings blob, which rides its own message key and the face's own storage |
| 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 | |
| plugin_source.h | The struct the framework keeps the weather, calendar, and stock source choices in, for a face built with a plugin define, and the checks that decide which of them it keeps |
| 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 |
| settings_chain.h | The walk over a face's settings schemas, and the checks a launch makes over them |
| 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, with the decisions about owning and freeing them in core's font_slots.c |
| 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_config.c | The part of the dev harness the unit's paf.dev.config.json lays out: the settings applied at launch, the clock, date, and readings each screen shows in place of the fixture, and the walks the config lists. It reads them out of the header paf build –dev writes, so with dev mode off it compiles to nothing |
| dev_config.h | What a dev build takes from the unit's paf.dev.config.json beyond the walk: the clock and date each screen pins, the settings it applies at launch, the readings it seeds in place of the fixture, and the steps of a walk the file lays out as a list |
| dev_hooks.h | The calls a face makes to run the dev harness, and the switches they read. The build sets the switches from paf build <face> --dev and the unit's paf.dev.config.json, beside its paf.config.json, so a face writes none of them and main.c calls the hooks without any #if of its own |
| dev_walk.c | The shared dev harness. It seeds the stores from a fixed fixture, or from the unit's paf.dev.config.json for a store the config seeds, and drives the theme walk or a walk the config lays out. 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, and the stock and calendar stores empty, using the store seed mechanism so no live source overwrites it. A store the unit's paf.dev.config.json gives readings for takes those instead |