Which of day, night, and Quiet Time should be on screen right now. More...
#include <stdbool.h>Go to the source code of this file.
Enumerations | |
| enum | Role { ROLE_DAY = 0 , ROLE_NIGHT , ROLE_QUIET , ROLE_COUNT } |
| Which of the three is showing. The caller's own storage should line up with these. More... | |
Functions | |
| Role | role_pick (bool quiet_on, bool quiet_set, bool night_on, bool night_set) |
| Which role wins, given what is firing and what has something behind it. | |
Which of day, night, and Quiet Time should be on screen right now.
A face can swap what it draws between an everyday look, a night one, and a Quiet Time one. This answers which one wins when more than one wants to. Every reading comes in as a pair: whether that trigger is firing, and whether there is actually something assigned to it. Both halves matter, since a trigger with nothing behind it has to hand the screen to whatever would have had it otherwise rather than draw nothing.
The caller gathers the readings. Nothing here touches a watch, which is what keeps it host-testable. A layout editor reads it to pick a grid, and a themed face to pick a palette.