65#define UI_TEXTKEY_MAX 23
67#define UI_TEXTKEY_PASS_MAX 63
69#define UI_TEXTKEY_PASS_MIN 8
71#define UI_TEXTKEY_SSID_MAX 32
75#define UI_TEXTKEY_CHARS 40
86#define UI_TK_SHOW UI_TK_KEYS
92#define UI_TK_DEL (UI_TEXTKEY_CHARS - 1)
94#define UI_TK_MARK (UI_TEXTKEY_CHARS - 3)
96#define UI_TK_DOT (UI_TEXTKEY_CHARS - 2)
146 const char *text,
int max_len);
157 const char *title,
const char *text,
169 const char *title,
const char *text);
182 const char *title,
const char *text,
bool secret);
194 const char *title,
const char *text);
224 char *out,
size_t n);
gfx: an RGB565 (16-bit red, green, blue) rasteriser with no dependencies.
#define k
Short name for kst_panel_k inside the overlay's seven files.
Definition kst_panel_int.h:238
A DOWN, MOVE or UP of one contact.
Definition touch_types.h:69
A keyboard: what it was opened for, what is typed, and the press it holds.
Definition ui_textkey.h:114
int len
Definition ui_textkey.h:119
char title[48]
Definition ui_textkey.h:117
gfx_rect_t area
Definition ui_textkey.h:116
int max_len
Definition ui_textkey.h:120
ui_textkey_layer_t layer
Definition ui_textkey.h:130
bool folder
Definition ui_textkey.h:123
uint8_t why
Definition ui_textkey.h:125
char text[UI_TEXTKEY_PASS_MAX+1]
Definition ui_textkey.h:118
bool file
Definition ui_textkey.h:124
uint32_t revision
Definition ui_textkey.h:133
uint8_t press_id
Definition ui_textkey.h:132
bool refused
Definition ui_textkey.h:121
bool search
Definition ui_textkey.h:122
bool wifi
Definition ui_textkey.h:127
int pressed
Definition ui_textkey.h:131
bool secret
Definition ui_textkey.h:128
bool show
Definition ui_textkey.h:129
bool open
Definition ui_textkey.h:115
Plain data types shared by the touch controller driver, the coordinate mapper and the event tracker....
void ui_textkey_open_folder(ui_textkey_t *k, gfx_rect_t area, const char *title, const char *text)
Open for a folder of the card; see the top of this file. Up to UI_TEXTKEY_MAX characters.
Definition ui_textkey.c:99
gfx_rect_t ui_textkey_key_rect(const ui_textkey_t *k, int key)
Where a key is drawn and hit: the grid ends 8px inside the area, or at UI_KEYS_FOOT (4px above the al...
Definition ui_textkey.c:233
const gfx_font_t * ui_textkey_char_font(const ui_textkey_t *k)
The face of the character keys: the largest of 20 x 36, 16 x 28, 12 x 24 and 10 x 20 whose cell fits ...
Definition ui_textkey.c:542
#define UI_TEXTKEY_PASS_MAX
The longest Wi-Fi password, in characters.
Definition ui_textkey.h:67
ui_textkey_result_t
What an event on the keyboard came to.
Definition ui_textkey.h:99
@ UI_TEXTKEY_OK
Definition ui_textkey.h:101
@ UI_TEXTKEY_CANCELLED
Definition ui_textkey.h:102
@ UI_TEXTKEY_NONE
Definition ui_textkey.h:100
void ui_textkey_render(const ui_textkey_t *k, gfx_canvas_t *c)
The whole keyboard over its area: the title and the count in 10 x 20 (8 x 16 where they do not fit si...
Definition ui_textkey.c:577
void ui_textkey_cancel_press(ui_textkey_t *k)
A press under way is dropped: the touch stream lost an event. What was typed stays typed.
Definition ui_textkey.c:162
const gfx_font_t * ui_textkey_word_font(const ui_textkey_t *k)
The face of the word keys (the bottom row, DEL, and the Wi-Fi layer keys) in the language shown: the ...
Definition ui_textkey.c:547
const char * ui_textkey_key_label(const ui_textkey_t *k, int key)
A key's label as k shows it.
Definition ui_textkey.c:188
ui_textkey_result_t ui_textkey_event(ui_textkey_t *k, const touch_event_t *evt, char *out, size_t n)
One touch event.
Definition ui_textkey.c:408
void ui_textkey_close(ui_textkey_t *k)
Close, dropping a press under way.
Definition ui_textkey.c:152
@ UI_TK_CLR
Definition ui_textkey.h:79
@ UI_TK_OK
Definition ui_textkey.h:81
@ UI_TK_SPACE
Definition ui_textkey.h:78
@ UI_TK_KEYS
Definition ui_textkey.h:82
@ UI_TK_CANCEL
Definition ui_textkey.h:80
void ui_textkey_open_wifi(ui_textkey_t *k, gfx_rect_t area, const char *title, const char *text, bool secret)
Open for a Wi-Fi password or network name; see the top of this file. Lower case first.
Definition ui_textkey.c:108
void ui_textkey_open_file(ui_textkey_t *k, gfx_rect_t area, const char *title, const char *text)
Open for a file name; see the top of this file. Lower case first.
Definition ui_textkey.c:123
#define UI_TEXTKEY_CHARS
The keys: forty characters in four rows of ten, then SPACE, CLR, CANCEL and OK along the bottom.
Definition ui_textkey.h:75
void ui_textkey_open(ui_textkey_t *k, gfx_rect_t area, const char *title, const char *text, int max_len)
Open over area on text.
Definition ui_textkey.c:69
void ui_textkey_open_search(ui_textkey_t *k, gfx_rect_t area, const char *title, const char *text, int max_len)
Open for a search pattern; see the top of this file.
Definition ui_textkey.c:89
ui_textkey_layer_t
The Wi-Fi keyboard's layers.
Definition ui_textkey.h:106
@ UI_TK_MARKS
Definition ui_textkey.h:109
@ UI_TK_LOWER
Definition ui_textkey.h:107
@ UI_TK_UPPER
Definition ui_textkey.h:108
const char * ui_textkey_label(int key)
A key's label as a name keyboard shows it.
Definition ui_textkey.c:170