In development. It changes without notice.
Topic
Popups & Modals
Toasts, spinners, confirmations and alerts, drawn over any screen.
Up to three toasts wait in line, and a fourth takes the place of the oldest. A confirmation or an alert runs its own loop until it is answered; the others are drawn by the tick of the screen below. What is shown and when is kept apart from how it is drawn, and tested on a computer.
- See also
- Notifications
Files | |
| file | src/ |
| Lock requests seen by the loops that park the main loop. | |
| file | src/ |
| Pure popup-state logic: toast FIFO, modal shell, spinner, transition. | |
| file | src/ |
| What the sources of the popup system share: its state and the helpers more than one kind of popup draws with. | |
| file | src/ |
| The popup kinds: decisions, choices, acknowledgements, progress and notices, drawn over whatever screen is up. | |
| file | src/ |
| The modal card of the popup system: the confirmation card, the fullscreen hold layout, the two- and three-cell pickers, the notices drawn at once, and alert() (part of popup_ | |
| file | src/ |
| The choice list of the popup system: the card of N selectable rows and choiceList() (part of popup_ | |
| file | src/ |
| The compositor pass of the popup system: tick(), clearAll(), markDirty() and the keys a dialog reads (part of popup_ | |
| file | src/ |
| Hold to confirm: the fill a held key charges, the gesture, and the blocking confirm() that offers it (part of popup_ | |
| file | src/ |
| Pointer input of the popup modals: tap qualification and the hit tests of the cells, the list rows and the non-blocking layer (part of popup_ | |
| file | src/ |
| The progress card of the popup system, and the spinner it stands in for (part of popup_ | |
| file | src/ |
| The dim scrim every popup card frame opens with (part of popup_ | |
| file | src/ |
| The status overlays of the popup system: the transition notice and the banner strip (part of popup_ | |
| file | src/ |
| The toast of the popup system: the bottom notice and the footprint it hands back (part of popup_ | |
| file | src/ |
| What an on-device vault write tells the owner it did. | |
Typedefs | |
| using | kleidos:: |
| Reads the app's lock keys; true when one was pressed since the last read. | |
Functions | |
| void | kleidos:: |
| Install the probe popup:: | |
| void | kleidos:: |
| Latch a lock request without a key press. | |
| bool | kleidos:: |
| Whether a blocking loop must stop because the device is locking. | |
| void | kleidos:: |
| Drop the latch; the main loop calls it at the start of every tick. | |
| constexpr uint8_t | kleidos:: |
| Number of visible actions rendered for a modal kind. | |
| void | kleidos:: |
Copy src into a popup's fixed text buffer. | |
| InputScheme | kleidos:: |
| The input grammar this board's modals speak. | |
| ModalHints | kleidos:: |
Caption name table for s. | |
| constexpr bool | kleidos:: |
| Whether the modals answer from the dial's own keys. | |
| constexpr bool | kleidos:: |
| True when the (btnConfirm, btnCancel) pair the caller passed must swap roles for this scheme + resolution style. | |
| bool | kleidos:: |
| Whether this board's modals swap the caller's pair (see swapConfirmCancel), resolved from the active scheme and profile. | |
| constexpr ListNavAction | kleidos:: |
| Reduce one frame of input edges to a list-navigation action. | |
| constexpr ConfirmResult | kleidos:: |
| Reduce one frame of keyboard edges to a confirm-modal answer. | |
| constexpr uint8_t | kleidos:: |
| Apply a movement action to the selection index. | |
| constexpr int8_t | kleidos:: |
The row a typed letter jumps to: the next row after from whose label starts with letter (either case), wrapping round. | |
| constexpr int16_t | kleidos:: |
| Row height for the choice list on the active profile. | |
| void | kleidos:: |
| Push a toast on top of whatever is currently rendered. | |
| void | kleidos:: |
| Show a notice between actions or screens: drawn as a toast, at the bottom above the key bar, and kept on top of the screen that follows. | |
| void | kleidos:: |
| Draw a notice at once over the dimmed screen and leave it on the glass: the last word before a restart or a sleep, when no loop will turn again to composite one ("Restarting · to start the Wi-Fi setup"). | |
| void | kleidos:: |
| Draw a card at once over the dimmed screen — the title bar, a wrapped message and an optional line in the tone's color — and leave it on the glass. | |
| void | kleidos:: |
| Show a full-width status banner pinned to the top or bottom edge. | |
| void | kleidos:: |
| Hide the status banner. Repaints its footprint so the next redraw is clean. | |
| void | kleidos:: |
Show a progress card with label as its title and no measure of how far the work is (progressShow at kProgressUnknown). | |
| void | kleidos:: |
| Take the card down (progressHide). | |
| void | kleidos:: |
| Show a progress card over the dimmed screen. | |
| void | kleidos:: |
| Move the progress card on: a new percentage and, when given, a new detail line. Call it from inside the work as often as it can say how far it is; an unknown-progress card advances its segment each call. | |
| void | kleidos:: |
| Take the progress card down and repaint its footprint. | |
| bool | kleidos:: |
| Whether a progress card is up. | |
| kleidos:: | kleidos:: |
| Move a blocking progress card's unknown-progress segment from inside a wait. | |
| bool | kleidos:: |
Whether a popup lies over r on the glass. | |
| constexpr LockHold | kleidos:: |
| The lock-key rule for one read (the pure model behind progressLockHold). | |
| LockHold | kleidos:: |
| How the app must treat a lock key it reads now. | |
| void | kleidos:: |
| Non-blocking notice shell with no actions. | |
| constexpr uint32_t | kleidos:: |
| The time limit a blocking dialog waits. | |
| ConfirmResult | kleidos:: |
| Blocking confirm dialog. | |
| void | kleidos:: |
| Blocking alert — one button acknowledges. | |
| void | kleidos:: |
| Install the board's dedicated back key for every blocking dialog. | |
| void | kleidos:: |
| Install the dial's keys. Read only where dialAnswersModals. | |
| int8_t | kleidos:: |
| Blocking modal presenting up to kChoiceListMaxRows actions as a selectable list of rows inside one card. | |
| bool | kleidos:: |
| Advance timeouts and redraw dirty popup layers. | |
| bool | kleidos:: |
| True once after a toast or a transition notice was dismissed and its footprint was erased. | |
| bool | kleidos:: |
| True once after a dismissed full-screen overlay needs the owner to repaint. | |
| void | kleidos:: |
| Remove every popup without animation. | |
| void | kleidos:: |
| Re-flag the active overlays for redraw after a repaint beneath them. | |
| void | kleidos:: |
| Lay a toast on the glass back on top after the screen repainted under it. | |
| ui::Rect | kleidos:: |
| Screen-space footprint of the active bottom overlay (a floating toast). | |
| const PopupQueue & | kleidos:: |
| Read-only access to the shared popup queue. | |
| constexpr bool | kleidos:: |
| Whether the record reached flash. | |
| constexpr bool | kleidos:: |
| Whether the record left the device. | |
| constexpr bool | kleidos:: |
| Whether the surface may clear a secret it is showing. | |
| constexpr bool | kleidos:: |
| Whether a cached credential list must be re-read. | |
| constexpr bool | kleidos:: |
| Whether a cached credential list must be re-read. | |
| constexpr Report | kleidos:: |
| The report for a finished save of an ordinary record. | |
| constexpr Report | kleidos:: |
| The report for a finished save of a secret the owner is about to use. | |
| constexpr Report | kleidos:: |
| What the owner is told once a delete has run, by its outcome. | |
Variables | |
| constexpr std::size_t | kleidos:: |
| constexpr std::size_t | kleidos:: |
| constexpr std::size_t | kleidos:: |
| constexpr uint8_t | kleidos:: |
| Maximum simultaneous toasts. | |
| constexpr std::size_t | kleidos:: |
| constexpr std::size_t | kleidos:: |
| constexpr std::size_t | kleidos:: |
| Max modal title length (excl. NUL). | |
| constexpr std::size_t | kleidos:: |
| Max modal message length (excl. NUL). | |
| constexpr std::size_t | kleidos:: |
| Max modal action label length (excl. NUL). | |
| constexpr std::size_t | kleidos:: |
| Max spinner label length (excl. NUL). | |
| constexpr std::size_t | kleidos:: |
| constexpr std::size_t | kleidos:: |
| Max transition detail length (excl. NUL); a transition draws as a toast card. | |
| constexpr std::size_t | kleidos:: |
| Max banner message length (excl. NUL). | |
| constexpr uint8_t | kleidos:: |
| Maximum rows a choice-list modal presents (statically allocated). | |
| constexpr uint8_t | kleidos:: |
| constexpr uint32_t | kleidos:: |
| constexpr uint32_t | kleidos:: |
| How long a successful report stays on the glass. | |
| constexpr uint32_t | kleidos:: |
| How long a failure report stays on the glass (longer: it needs reading). | |
| constexpr uint32_t | kleidos:: |
| How long a failure report about a secret still on screen is held. | |
Enumeration Type Documentation
BannerEdge #
ConfirmResult #
Resolution of a blocking modal.
DeleteOutcome #
InputScheme #
Physical input scheme steering the modal binding + hint policy.
Resolved on-device from the DeviceProfile (see popup_
ListNavAction #
ListScheme #
Physical input grammar a choice-list modal is driven by.
Mirrors the device classes the popup renderer resolves at runtime; kept public and pure so native tests pin the per-profile mapping: the two-key Sticks navigate with A-down / B-up and act on holds, the CoreInk dial moves with its ends and runs on the center press, the fixed-zone touch boards keep their three band cells as move / select / cancel, free-touch glass taps rows directly, and keyboard boards use arrows + ENTER / ESC.
LockHold #
ModalKind #
SaveOutcome #
What a finished attempt to store a record established.
Four outcomes rather than a bool because the surface answers each one differently: only Saved may clear a secret and refresh a list, and VaultFull is the one failure the owner can act on immediately.
Severity #
Severity tone — drives accent color in the renderer.
| Enumerator | |
|---|---|
| INFO | Informational / neutral accent (primary cyan). |
| SUCCESS | Positive outcome accent (green). |
| CAUTION | Soft warning accent (lockout yellow). |
| WARNING | Destructive / error accent (red). |
| ADMIN | Admin-mode banner accent (status.info, |
Function Documentation
activeInputScheme() #
The input grammar this board's modals speak.
Resolved from the device profile (dial / free touch / keyboard / touch zones / buttons). Callers use it to avoid offering a control the chassis lacks.
- Returns
- The active scheme.
alert() #
Blocking alert — one button acknowledges.
- Parameters
-
Name Direction Meaning title in Alert title. message in Alert message body. sev in Severity tone. btnAck in Button input for acknowledgment. timeoutMs in Auto-timeout in milliseconds (0 = kBlockingModalTimeoutMs).
- Note
- On free-touch glass any tap acknowledges: the single action's caption is drawn inside the dialog card, so the whole glass is the target. Qualified taps only — a contact must begin after the alert is drawn (the pointer is first observed idle under it) to acknowledge it.
banner() #
Show a full-width status banner pinned to the top or bottom edge.
Non-blocking. Auto-dismissed by tick() after timeoutMs (0 = sticky until bannerHide() / clearAll()). Caller string is copied. Used for ambient status (admin-mode active, connectivity) that should persist across screen redraws.
- Parameters
-
Name Direction Meaning message in Banner text. sev in Severity tone. bottom in True to pin the banner to the bottom edge (default top). timeoutMs in Auto-dismiss timeout in milliseconds (0 = sticky).
blockingModalTimeout() #
The time limit a blocking dialog waits.
- Parameters
-
Name Direction Meaning requested in The caller's limit in ms; 0 asks for the default.
- Returns
requested, or kBlockingModalTimeoutMs when it is 0.
cardNow() #
Draw a card at once over the dimmed screen — the title bar, a wrapped message and an optional line in the tone's color — and leave it on the glass.
For a question asked before the keys the dialogs read exist (the update from the card at boot): the caller reads its own answer and draws what follows. Nothing is queued.
- Parameters
-
Name Direction Meaning title in Card title. message in Wrapped body; may be null. line in Small line under the body (what the keys do); may be null. sev in Severity tone.
choiceList() #
Blocking modal presenting up to kChoiceListMaxRows actions as a selectable list of rows inside one card.
Replaces the 3-cell band anatomy where a flow offers more actions than the band holds. Rows respect the touch tap floor (LayoutContext::); on the fixed-zone boards the bottom band keeps three live cells ([move] [select] [cancel]) as the no-reach path while the drawn rows are ALSO direct tap targets, and on free-touch glass rows resolve by qualified tap with a scrim tap as light dismiss. Cancel is never a row: it lives on the per-scheme cancel control (hold-B / ESC / back key / C cell / scrim).
- Parameters
-
Name Direction Meaning title in Card title (typically the credential name; drawn fitted). labels in Row labels; countentries, each non-null.count in Number of rows (clamped to kChoiceListMaxRows). sev in Severity tone for the card accent. opts in Input / timeout options.
- Returns
- The selected row index, or -1 on cancel / timeout.
- Note
- Runs on the calling task; blocks until resolution and drains the resolving input edge so it does not leak into the caller's screen.
choiceListJump() #
The row a typed letter jumps to: the next row after from whose label starts with letter (either case), wrapping round.
- Parameters
-
Name Direction Meaning labels in Row labels, countentries (a null entry never matches).count in Row count. from in The focused row; the search starts after it. letter in The typed letter.
- Returns
- The row to focus, or -1 when no label starts with the letter.
choiceListNav() #
Reduce one frame of input edges to a list-navigation action.
The per-scheme mapping: 2-button sticks A-short = down, B-short = up, hold-A = run, hold-B = cancel (the canonical two-button grammar); the dial moves with its ends and runs on OK (tap or hold), the back key cancels; fixed zones move on A, run on B, cancel on C (row taps are resolved by the pointer path, not here); free-touch resolves rows by tap and keeps the passed pair as silent run / cancel aliases; keyboards use arrows + ENTER + ESC. Decisive edges outrank movement so a hold release can never both run and scroll.
- Parameters
-
Name Direction Meaning scheme in Active input grammar. edges in Input edges observed this frame.
- Returns
- The reduced action (
Nonewhen nothing decisive happened).
choiceListRowH() #
Row height for the choice list on the active profile.
Touch-primary profiles floor every row at the tap-target minimum (LayoutContext::: 5 mm at the panel's PPI, 40 px on the Core2 v1.3 and the CoreS3 SE, 32 px on the LILYGO T-Deck); button / dial / keyboard boards keep density-native heights.
- Parameters
-
Name Direction Meaning minTapPx in Tap floor from LayoutContext::(0 = none).minTapPx() compact in True on compact-density panels.
- Returns
- Row height in pixels.
choiceListStep() #
Apply a movement action to the selection index.
Wrapping on the two-key convention (every list of the Sticks is cyclic, so the far end is one press away), on the fixed-zone band (one MOVE cell must reach every row) and on the dial (its menus wrap); clamped at the list ends on keyboards and free touch.
- Parameters
-
Name Direction Meaning scheme in Active input grammar (selects clamp vs wrap). action in Movement action ( Up/Down; others returnsel).sel in Current selection index. count in Row count (0 returns 0).
- Returns
- The new selection index.
clearAll() #
Remove every popup without animation.
Use on state transitions into deep sleep so no stale overlay leaks across sessions.
confirm() #
Blocking confirm dialog.
Returns only when the user resolves or the timeout expires.
- Parameters
-
Name Direction Meaning title in Dialog title. message in Dialog message body. confirmLabel in Confirm button label. cancelLabel in Cancel button label. sev in Severity tone. opts in Input/ timeout/ hold interaction options.
- Return values
-
Value Meaning ConfirmResult:: CONFIRM User confirmed (or held long enough when opts.holdToConfirmis true).ConfirmResult:: CANCEL User dismissed with cancel button. ConfirmResult:: TIMEOUT Auto-timeout fired before either button. ConfirmResult:: WITHDRAWN opts.stillAskedread false: what the dialog asked about ended without it.ConfirmResult:: EXTRA Resolved as third action (CHOICE modal only).
- Note
- Runs on the calling task; blocks until resolution. Drains the input edge so a release after return does not leak to the caller state.
confirmKeyAnswer() #
Reduce one frame of keyboard edges to a confirm-modal answer.
The keyboard grammar draws ESC under the cancel cell and ENTER under the confirm cell (see hintsFor), so those are the keys that answer. The caller folds Backspace into keyEscape: it is the key the board binds to its B slot, the cancel control on every other surface. ENTER is a tap — a character stream carries no key-up — so a hold-to-confirm modal leaves it unanswered and the held control confirms there.
- Parameters
-
Name Direction Meaning edges in Keyboard edges observed this frame; only keyEnterandkeyEscapeare read.holdToConfirm in Whether the modal requires a sustained hold.
- Return values
-
Value Meaning ConfirmResult:: CANCEL ESC (or the folded Backspace) was pressed. ConfirmResult:: CONFIRM ENTER was pressed on a tap-to-confirm modal. ConfirmResult:: PENDING Nothing this frame answers the modal.
consumeBackgroundRepaint() #
True once after a dismissed full-screen overlay needs the owner to repaint.
Edge-triggered: clears itself after a single read. Set when a covering overlay (a dismissed modal) is torn down. The FSM dispatcher reads this after the compositor pass and drives one bracketed full repaint of the active state, so the modal footprint is replaced by real content in a single frame instead of a background fill flashing as a blank frame.
While the panel sleeps (display::) the request is kept and not handed out (ui/
- Return values
-
Value Meaning true A full-screen overlay was dismissed and the screen needs a repaint. false No pending repaint, or the panel sleeps.
consumeToastDismissed() #
True once after a toast or a transition notice was dismissed and its footprint was erased.
Edge-triggered: clears itself after a single read.
- Return values
-
Value Meaning true A notice was dismissed on the most recent frame. false No dismissal edge.
copyText() #
Copy src into a popup's fixed text buffer.
The one copy every queued popup text takes. A text that fits is copied whole. One that does not is cut on a whole UTF-8 code point — never inside one, so a translated label is never left ending in a stray lead byte — and ends in "…", so a text cut before its wrapper or fitter sees it still reads as cut. A buffer too small for the mark gets the bare cut.
- Parameters
-
Name Direction Meaning dst out Destination buffer, always NUL-terminated (when cap> 0).cap in Size of dstin bytes, NUL included.src in NUL-terminated UTF-8 source (nullptr copies "").
coversRect() #
Whether a popup lies over r on the glass.
What a screen that paints from inside a wait asks before it draws there: a modal, a progress card or a transition notice owns the whole glass, and a banner or a toast covers its own footprint while it is on the glass. One flagged dirty (painted over by the screen under it, or not composed yet) covers nothing until the next tick lays it back.
The dirty flag cannot tell those cases from a toast still on the glass: a newer toast pushed over a shown one, or markDirty after a repaint that did not reach the toast's footprint, flags it too. Such a toast does not count either, so a wait ring under it may paint across it until the next tick lays the toast back; a wait never stalls under a toast it cannot see. Telling them apart would need markDirty to know what was painted.
- Parameters
-
Name Direction Meaning r in Screen rectangle about to be painted.
- Returns
- True when painting
rwould draw over a popup.
dialAnswersModals() #
Whether the modals answer from the dial's own keys.
On the dial, OK confirms or acknowledges, the side key cancels, and ▲ / ▼ answer nothing: the caller's (btnConfirm, btnCancel) pair is not read.
- Parameters
-
Name Direction Meaning s in Active input scheme.
- Returns
- True for
InputScheme::.Dial
finalNotice() #
Draw a notice at once over the dimmed screen and leave it on the glass: the last word before a restart or a sleep, when no loop will turn again to composite one ("Restarting · to start the Wi-Fi setup").
Nothing is queued: the card is not erased or redrawn by tick.
- Parameters
-
Name Direction Meaning title in Notice title. detail in Optional line under it; may be null. sev in Severity tone.
hintsFor() #
Caption name table for s.
Dial names are the spoken ones the action bar already trains ("OK" = the dial-center press). On the dial OK confirms or acknowledges and the side key cancels (drawn as its ‹ mark); ▲ and ▼ answer nothing. Free-touch names the GESTURE ("Tap" / "Hold"), because each drawn cell is its own target and a key-cap caption would promise a hit test that does not exist.
- Parameters
-
Name Direction Meaning s in Active input scheme.
- Returns
- The scheme's caption names (static storage).
listChanged() [1/2] #
Whether a cached credential list must be re-read.
- Parameters
-
Name Direction Meaning outcome in Outcome of a finished delete.
- Return values
-
Value Meaning true The vault changed, so the cached list is stale.
listChanged() [2/2] #
Whether a cached credential list must be re-read.
- Parameters
-
Name Direction Meaning outcome in Outcome of a finished save.
- Return values
-
Value Meaning true The vault changed, so the cached list is stale.
lockHoldFor() #
The lock-key rule for one read (the pure model behind progressLockHold).
- Parameters
-
Name Direction Meaning blockingUp in A blocking progress card is up. lockWhenDone in That card lets a lock wait for the work's end. droppingJustDown in A dropping card came down and no read followed.
- Returns
- The rule for this read.
lockRequested() #
Whether a blocking loop must stop because the device is locking.
- Returns
- True once the probe reported a lock key or popup::
requestLock ran, until popup:: clearLockRequest.
markDirty() #
Re-flag the active overlays for redraw after a repaint beneath them.
Call after a screen repaints content under a live overlay (the repaint fills the overlay footprint with background): the next tick re-composites the overlay on top in the same frame, so a list-only redraw that clips its selection rule does not leave the toast, banner or transition notice erased. A live non-blocking card modal is re-flagged too — its compose re-applies the backdrop dim scrim over the fresh content and re-draws the card, so the modal anatomy survives every redraw path. No-op when nothing is active.
modalActionCount() #
Number of visible actions rendered for a modal kind.
- Parameters
-
Name Direction Meaning kind in Modal kind to query.
- Returns
- 0 for NONE/NOTICE, 1 for ALERT, 2 for CONFIRM, 3 for CHOICE.
modalSwapsConfirmCancel() #
Whether this board's modals swap the caller's pair (see swapConfirmCancel), resolved from the active scheme and profile.
- Parameters
-
Name Direction Meaning holdToConfirm in True for the destructive hold-to-confirm layout.
- Returns
- True when confirm/
cancel pointers (and captions) swap.
notice() #
Non-blocking notice shell with no actions.
Stays visible until clearAll() unless timeoutMs is non-zero.
- Parameters
-
Name Direction Meaning title in Notice title. message in Notice message body. sev in Severity tone. timeoutMs in Auto-dismiss timeout (0 = no timeout).
overlayReserve() #
Screen-space footprint of the active bottom overlay (a floating toast).
A list compositor passes this as MenuListProps:: so the cyan selection rule is clipped away from under the overlay; otherwise the focused row's left rail and the toast card's accent bar stack into one element that reads as a single broken bar. Reflects the footprint composited on the previous frame; returns an empty rect when no bottom overlay is on screen.
- Returns
- Toast card rectangle in panel pixels, or an empty rect when idle.
progressActive() #
Whether a progress card is up.
- Returns
- True between progressShow and progressHide.
progressLockHold() #
How the app must treat a lock key it reads now.
Blocking work answers no key, the lock key included: a press is dropped, or kept for the end of the work where the use sets ProgressOptions::
- Returns
- The rule for this read.
progressShow() #
Show a progress card over the dimmed screen.
The card has the action family's title bar (the title), the bar (percent filled, or a moving segment at kProgressUnknown) and a detail line with the percentage at its right when there is one. Replaces a card already up.
- Parameters
-
Name Direction Meaning title in What is running ("Re-encrypting"). percent in 0..100, or kProgressUnknown. detail in Optional line under the bar ("142 of 338"); may be null. opts in Blocking, lock-when-done and the cancel key.
progressUpdate() #
Move the progress card on: a new percentage and, when given, a new detail line. Call it from inside the work as often as it can say how far it is; an unknown-progress card advances its segment each call.
- Parameters
-
Name Direction Meaning percent in 0..100, or kProgressUnknown. detail in New detail line, or null to keep the current one.
pumpBlockedProgress() #
Move a blocking progress card's unknown-progress segment from inside a wait.
A pump (kleidos::kleidos::), and the segment then moves while the work runs on the vault worker, as it does on loop ticks. A determinate card (a percentage) and a 1-bit panel keep their card still.
- Parameters
-
Name Direction Meaning ctx in Unused.
- Returns
- Whether the segment moved, and when it is next due.
queue() #
Read-only access to the shared popup queue.
- Returns
- Const reference to the global PopupQueue.
recompositeLiveToast() #
Lay a toast on the glass back on top after the screen repainted under it.
For a screen that repaints its whole body (a full redraw, an animation frame) and so fills the footprint of a toast composited on an earlier frame with background: re-flags the overlays through markDirty, so this frame's tick draws the toast back instead of leaving it erased after one frame. A no-op while no toast is on the glass (overlayReserve is empty), so a screen calls it after every such repaint.
recordCommitted() #
Whether the record reached flash.
- Parameters
-
Name Direction Meaning outcome in Outcome of a finished save.
- Return values
-
Value Meaning true Only for SaveOutcome:: Saved.
recordRemoved() #
Whether the record left the device.
- Parameters
-
Name Direction Meaning outcome in Outcome of a finished delete.
- Return values
-
Value Meaning true Only for DeleteOutcome:: Deleted.
reportFor() [1/2] #
What the owner is told once a delete has run, by its outcome.
- Parameters
-
Name Direction Meaning outcome in Outcome of the delete.
- Returns
- What the surface tells the owner.
reportFor() [2/2] #
The report for a finished save of an ordinary record.
- Parameters
-
Name Direction Meaning outcome in Outcome of the save.
- Returns
- What the surface tells the owner.
requestLock() #
Latch a lock request without a key press.
For a caller that has already relocked the session and needs any open blocking dialog to close.
secretMayLeaveScreen() #
Whether the surface may clear a secret it is showing.
A generated password is recoverable only while it is on the glass: the buffer is zeroized and the screen leaves one line later. Until the record is proven on flash the secret is the only copy in existence, so the surface must keep showing it and must not navigate away.
Where this applies on the keyboard boards: the credential detail carries the outcome forward as its unsaved flag, and BACK asks before wiping rather than leaving. The standalone generator screen consults this directly, on the arm that has a credential bound.
- Parameters
-
Name Direction Meaning outcome in Outcome of the save that was supposed to store the secret.
- Return values
-
Value Meaning true The record is stored; the secret may be wiped and the screen may leave. false The secret is the only copy; keep it on screen.
secretReportFor() #
The report for a finished save of a secret the owner is about to use.
Same outcomes, louder and longer on failure, and the second line tells the owner what to do while the secret is still readable: copy it, or retry the save. Used wherever the device generated the password it is storing.
- Parameters
-
Name Direction Meaning outcome in Outcome of the save.
- Returns
- What the surface tells the owner.
setBackKey() #
Install the board's dedicated back key for every blocking dialog.
A click of it cancels a confirm, acknowledges an alert and cancels a choiceList whose options name no back key of their own. The dialogs read the release, so the press that closed one never reaches the screen under it.
- Parameters
-
Name Direction Meaning key in The back key (CoreInk side key), or nullptr on boards without one.
setDialKeys() #
Install the dial's keys. Read only where dialAnswersModals.
- Parameters
-
Name Direction Meaning keys in The dial's keys (null members where a key is absent).
setLockProbe() #
Install the probe popup::
- Parameters
-
Name Direction Meaning probe in The app's lock-key reader, or nullptr for none.
spinnerShow() #
Show a progress card with label as its title and no measure of how far the work is (progressShow at kProgressUnknown).
Must be paired with spinnerHide().
- Parameters
-
Name Direction Meaning label in What is running.
swapConfirmCancel() #
True when the (btnConfirm, btnCancel) pair the caller passed must swap roles for this scheme + resolution style.
Callers wire btnConfirm=inputA and btnCancel=inputB on every board; the physically correct binding differs per device class: Buttons never swap (A acts, B cancels, in every dialog: a hold of A confirms, and a destructive one holds longer); the dial and the touch zones always swap (OK / the center zone confirms); Keyboard never swaps. Free touch swaps where the glass keeps its zone shelf (Core2 v1.3, CoreS3 SE): the card draws Cancel on the left, so the left zone A must cancel and the center zone B confirm, or the zone under "Cancel" would run the action (ui-patterns §2).
- Parameters
-
Name Direction Meaning s in Active input scheme. holdToConfirm in True for the destructive hold-to-confirm layout. zoneShelf in True when the board reads A/B/C from a zone shelf along the glass's bottom edge.
- Returns
- True when confirm/
cancel pointers (and captions) swap.
tick() #
Advance timeouts and redraw dirty popup layers.
Must be called from the FSM dispatcher (or directly from each state's update()) once per frame so the toast deadlines, spinner animation, and transition overlay get their per-frame bookkeeping tick.
While the panel sleeps (display::) the deadlines still run but nothing is drawn or erased (ui/
A screen that cleared the whole glass since the last pass (display:: moved) covered every overlay on it: the pass lays them back on top (markDirty), whatever path repainted, so no full repaint can leave a live toast erased until it lapses.
- Return values
-
Value Meaning true Any popup is currently on top. false Popup layer is idle.
- Note
- Call from the UI task on Core 1 (APP_CPU); the call belongs to the FSM dispatcher's frame loop.
- On free-touch glass this also answers taps against the non-blocking modal layer (notice / debug previews), so those cards dismiss by touch exactly like their blocking counterparts.
toast() #
Push a toast on top of whatever is currently rendered.
Auto-dismissed after timeoutMs. Caller strings are copied.
- Parameters
-
Name Direction Meaning title in Toast title. detail in Optional detail text. sev in Severity tone. timeoutMs in Auto-dismiss timeout in milliseconds.
transition() #
Show a notice between actions or screens: drawn as a toast, at the bottom above the key bar, and kept on top of the screen that follows.
Auto-dismissed by tick().
- Parameters
-
Name Direction Meaning title in Overlay title. detail in Optional detail text. sev in Severity tone. timeoutMs in Auto-dismiss timeout in milliseconds.
Variable Documentation
kBlockingModalTimeoutMs #
Time limit of a blocking dialog that sets none (ms). A blocking dialog parks the loop, so auto-lock and idle sleep cannot run until it is answered.
kProgressUnknown #
Percent for work that cannot tell how far it is: the bar shows a segment moving along the track instead of a fill.
kTitleCap #
Bytes every popup title a card draws is stored in, NUL included: the rows a title wraps to on the widest card, more than the four rows a toast title fills on the narrowest frame. A longer title is cut by the copy with "…" (copyText), so a cut always shows.
kTitleRowBytes #
Bytes one row of a popup title holds in practice: a title row of the widest card takes about 25 characters, and an accented letter takes two bytes in UTF-8.
kTitleRowsMax #
Rows a popup title takes at most: the card's title bar, the choice card's and the fullscreen confirm's title.
kToastDetailMax #
Max toast detail length (excl. NUL). The toast card wraps its detail like its title, onto up to ui::
kToastTitleMax #
Max toast title length (excl. NUL).
kTransitionTitleMax #
Max transition title (excl. NUL).