|
|
#define | W UI_PANEL_W |
| | The area below the band: 1024 x 540px.
|
|
#define | H UI_BODY_H |
| | The body's height under the band, UI_BODY_H px.
|
|
#define | WF_FONT_LABEL (&gfx_font_10x20) |
| | The faces of the 1024 x 600 type scale the screen draws in: WF_FONT_LABEL (10 x 20) for the buttons, the row labels, the card's lines and the signal column; WF_FONT_BODY (12 x 24) for the lines under the rows, the network names of the list and the question's sentences; WF_FONT_HEAD (20 x 36) for the row values, the scan's heading and the question's title and versions.
|
| #define | WF_FONT_BODY UI_FONT_BODY |
| #define | WF_FONT_HEAD (&gfx_font_20x36) |
|
#define | FOOT (UI_ALERT_Y - UI_BAND_H - 4) |
| | The lowest body row anything is drawn on, plus one: 4px above the alert band, body y 492.
|
| #define | BX 16 |
| #define | BY 16 |
| #define | BW 460 |
| #define | BH 60 |
| #define | BPITCH 68 |
| #define | RX (BX + BW + 16) |
| #define | RY 16 |
| #define | RW (W - UI_MARGIN - RX) |
| #define | RH (FOOT - RY) |
| #define | CARD_P 24 |
| #define | LBL_X 16 |
| #define | LBL_W 240 |
| #define | VAL_X (LBL_X + LBL_W + 8) |
| #define | VAL_W 740 |
| #define | ROW_Y 16 |
| #define | ROW_P 56 |
| #define | LINE_P 28 |
| #define | OFF_Y (FOOT - 8 - BH) |
| #define | SC_X0 (UI_MARGIN + 4) |
| #define | SC_X1 (W / 2 + 8) |
| #define | SC_Y (UI_MARGIN + 4) |
| #define | SC_W 492 |
| #define | SC_H 48 |
| #define | SC_P 52 |
| #define | SC_ROWS 8 |
| #define | SC_BW 328 |
| #define | SC_BH UI_BTN_H_TALL |
| #define | SC_BY (FOOT - SC_BH) |
| #define | SC_BX(i) |
| | Scan button i's left edge.
|
| #define | Q_X UI_MARGIN |
| #define | Q_Y UI_MARGIN |
| #define | Q_W (W - 2 * UI_MARGIN) |
| #define | Q_H (FOOT - Q_Y) |
| #define | Q_BW 460 |
| #define | Q_BH 72 |
| #define | Q_BY (Q_Y + Q_H - 16 - Q_BH) |
| #define | KEY_AREA |
| | The keyboard, over the whole body, UI_MARGIN in from its sides and top, and ending 4px above the alert band: 1008 x 484px, keys of 93 x 71px.
|
|
| enum | sub_t { SUB_MAIN = 0
, SUB_SCAN
, SUB_KEY_SSID
, SUB_KEY_PASS
} |
| enum | {
HIT_NONE = 0
, HIT_AP
, HIT_JOIN
, HIT_CHOOSE
,
HIT_FORGET
, HIT_CODE
, HIT_OFF
, HIT_Q_CANCEL
,
HIT_INSTALL
, HIT_RESCAN
, HIT_HIDDEN
, HIT_SCAN_CANCEL
,
HIT_ROW
} |
| enum | view_t { VIEW_MAIN
, VIEW_RUNNING
, VIEW_SCAN
, VIEW_QUESTION
} |
|
|
static void | touched (void) |
| gfx_rect_t | wifi_screen_key_area (void) |
| | Where the keyboard opens: the body less UI_MARGIN at its sides and top, ending 4px above the alert band, 1008 x 484px.
|
| const ui_textkey_t * | wifi_screen_textkey (void) |
| | The screen's keyboard, open or closed; for tests and the renderer, which check what a tap typed.
|
|
static void | reset (void) |
|
static bool | staged (void) |
|
static bool | install_allowed (void) |
|
static bool | radio_on (void) |
|
static void | drop_hold_if_gone (void) |
| void | wifi_screen_set (const wifi_view_t *v) |
| void | wifi_screen_set_unavailable (void) |
| void | wifi_screen_invalidate (void) |
| const wifi_view_t * | wifi_screen_view (void) |
| unsigned | wifi_screen_take (void) |
| void | wifi_screen_net (char ssid[WIFI_SSID_MAX+1], char pass[WIFI_PASS_MAX+1]) |
| static gfx_rect_t | btn (int row) |
| | Button row of the radio-off view.
|
| static gfx_rect_t | off_rect (void) |
| | WI-FI OFF.
|
| static gfx_rect_t | q_cancel_rect (void) |
| | The question's CANCEL.
|
| static gfx_rect_t | install_rect (void) |
| | HOLD 2s: INSTALL.
|
| static gfx_rect_t | row_rect (int i) |
| | Row i of the scan list: eight a column.
|
| static gfx_rect_t | rescan_rect (void) |
| | SCAN AGAIN.
|
| static gfx_rect_t | hidden_rect (void) |
| | HIDDEN NETWORK.
|
| static gfx_rect_t | scan_cancel_rect (void) |
| | The scan list's CANCEL.
|
|
static bool | in (gfx_rect_t r, int x, int y) |
|
static view_t | view_of (void) |
|
static int | hit_at (int x, int y) |
|
static gfx_rect_t | hit_rect (int hit) |
|
static void | act (int hit) |
|
static void | key_event (const touch_event_t *evt) |
|
static void | event (const touch_event_t *evt) |
|
static void | tick (float dt_s) |
|
static void | cancel (void) |
|
static void | enter (void) |
|
static bool | back (void) |
|
static void | leave (void) |
| static void | text_in (gfx_canvas_t *c, int x, int y, int w, int h, const char *t, const gfx_font_t *f, gfx_color_t col) |
| | t left aligned in face f, in a box of w x h px from (x, y), centred in its height.
|
| static int | para (gfx_canvas_t *c, int y, const char *t, gfx_color_t col) |
| | t in the card from y, broken into lines of its 49 cells CARD_P px apart.
|
| static void | jobs_text (char *out, size_t n) |
| | What the page is for: one sentence, given in two parts, wrapped once.
|
| int | wifi_screen_jobs_lines (void) |
|
static const char * | why_text (void) |
| static void | button (gfx_canvas_t *c, gfx_rect_t r, const char *label, gfx_color_t fill, int hit, bool enabled) |
| | A button in WF_FONT_LABEL.
|
| static void | draw_main (gfx_canvas_t *c) |
| | The radio-off view: the buttons and the card.
|
| static void | row (gfx_canvas_t *c, int i, const char *label, const char *value) |
| | Row i of the running view: its label and its value.
|
| static int | line_at (gfx_canvas_t *c, int y, const char *t, gfx_color_t col) |
| | A line under the rows of the running view, WF_FONT_BODY across the body.
|
| static void | draw_running (gfx_canvas_t *c) |
| | The radio-on view: the rows, the lines under them, WI-FI OFF.
|
| static void | draw_scan (gfx_canvas_t *c) |
| | The scan: the heading or the list, and its buttons.
|
|
static gfx_color_t | install_fill (void) |
| static int | q_para (gfx_canvas_t *c, int y, const char *t, gfx_color_t col) |
| | t in the question from y, broken into lines of its 80 cells LINE_P px apart.
|
| static void | draw_question (gfx_canvas_t *c) |
| | The question about a staged image.
|
|
static void | render (gfx_canvas_t *c, int buffer_index) |
| const ui_screen_t * | wifi_screen (void) |
| | The WI-FI screen, for the router.
|
WI-FI: wifi_screen.h says what the screen is for. PANEL UPDATE, the screen the same header declares, is update_screen.c.
SPDX-License-Identifier: MIT