Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
ux_bagl.h
Go to the documentation of this file.
1
2/*******************************************************************************
3 * Ledger Nano S - Secure firmware
4 * (c) 2022 Ledger
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 ********************************************************************************/
18
19#pragma once
20
21#if defined(HAVE_BOLOS)
22#include "bolos_privileged_ux.h"
23#endif // HAVE_BOLOS
24
25#include "bolos_target.h"
26#include "lcx_ecfp.h"
27#include "os_math.h"
28#include "os_ux.h"
29#include "os_task.h"
30#include "os_screen.h"
31
32#ifndef HAVE_BOLOS_UX
33#ifndef HAVE_UX_FLOW
34#define COMPLIANCE_UX_160
35#define HAVE_UX_LEGACY
36#endif // HAVE_UX_FLOW
37#endif // HAVE_BOLOS_UX
38
39#include "ux_layouts.h"
40#include "ux_flow_engine.h"
41#if defined(HAVE_INDEXED_STRINGS)
42#include "ux_loc.h"
43#include "bolos_ux_loc_strings.h"
44#include "ux_loc_layouts.h"
45#include "ux_loc_flow_engine.h"
46#endif // defined(HAVE_INDEXED_STRINGS)
47
48#include "bagl.h"
49#include <string.h>
50
52
53// callback returns NULL when element must not be redrawn (with a changing color or what so ever)
54typedef const bagl_element_t *(*bagl_element_callback_t)(const bagl_element_t *element);
55
56// a graphic element is an element with defined text and actions depending on user touches
58 bagl_component_t component;
59
60#if defined(HAVE_INDEXED_STRINGS)
61 // Nameless union, to be able to access one member of the union or the other.
62 // No space won when using index with bagl_element_e, but headaches are avoided :)
63 union {
64 const char *text;
66 };
67#else // defined(HAVE_INDEXED_STRINGS)
68 const char *text;
69#endif // defined(HAVE_INDEXED_STRINGS)
70};
71
72// When not using indexed strings, some functions can be inlined, to save space
73#if !defined(HAVE_INDEXED_STRINGS)
74#define STATIC_IF_NOT_INDEXED static
75#else
76#define STATIC_IF_NOT_INDEXED
77#endif
78
79// touch management helper function (callback the call with the element for the given position,
80// taking into account touch release)
82 unsigned short element_count,
83 unsigned short x,
84 unsigned short y,
85 unsigned char event_kind);
87 unsigned short element_count,
88 unsigned short x,
89 unsigned short y,
90 unsigned char event_kind,
91 bagl_element_callback_t before_display);
92// callback to be implemented by the se
93void io_seproxyhal_touch_callback(const bagl_element_t *element, unsigned char event);
94
99
100// meta type to share amongst all multiline layouts
104
105// meta type to share amongst all icon + multiline layouts
107 const bagl_icon_details_t *icon;
108 const char *lines[5];
110
111#if defined(HAVE_INDEXED_STRINGS)
112const bagl_element_t *ux_loc_layout_strings_prepro(const bagl_element_t *element);
113
114// Prototypes related to localization
115const bagl_icon_details_t *get_glyphs_icon(unsigned char id);
116const char *get_string_buffer(unsigned char id);
117const char *get_ux_loc_string(UX_LOC_STRINGS_INDEX index);
118#endif // defined(HAVE_INDEXED_STRINGS)
119#if defined(HAVE_LANGUAGE_PACK)
120void bolos_ux_select_language(uint16_t language);
121void bolos_ux_refresh_language(void);
122
123typedef struct ux_loc_language_pack_infos {
124 unsigned char available;
125
126} UX_LOC_LANGUAGE_PACK_INFO;
127
128// To populate infos about language packs
129SYSCALL PERMISSION(APPLICATION_FLAG_BOLOS_UX) void list_language_packs(
130 UX_LOC_LANGUAGE_PACK_INFO *packs PLENGTH(NB_LANG * sizeof(UX_LOC_LANGUAGE_PACK_INFO)));
131SYSCALL PERMISSION(APPLICATION_FLAG_BOLOS_UX) const LANGUAGE_PACK *get_language_pack(
132 unsigned int language);
133#endif // defined(HAVE_LANGUAGE_PACK)
134
135#ifndef BUTTON_FAST_THRESHOLD_CS
136#define BUTTON_FAST_THRESHOLD_CS 8 // x100MS
137#endif // BUTTON_FAST_THRESHOLD_CS
138#ifndef BUTTON_FAST_ACTION_CS
139#define BUTTON_FAST_ACTION_CS 3 // x100MS
140#endif // BUTTON_FAST_ACTION_CS
141
142typedef unsigned int (*button_push_callback_t)(unsigned int button_mask,
143 unsigned int button_mask_counter);
144#define BUTTON_LEFT 1
145#define BUTTON_RIGHT 2
146// flag set when fast threshold is reached and above
147#define BUTTON_EVT_FAST 0x40000000UL
148#define BUTTON_EVT_RELEASED 0x80000000UL
150 unsigned int new_button_mask);
151
152// hal point (if application has to reprocess elements)
154
155// Helper function that give a realistic timing of scrolling for label with text larger than screen
157 unsigned int average_char_width);
159 const char *str,
160 unsigned int average_char_width);
161
162// default version to be called by ::io_seproxyhal_display if nothing to be done by the application
164
165#ifndef UX_STACK_SLOT_COUNT
166#define UX_STACK_SLOT_COUNT 1
167#endif // UX_STACK_SLOT_COUNT
168
169#ifndef UX_STACK_SLOT_ARRAY_COUNT
170#define UX_STACK_SLOT_ARRAY_COUNT 1
171#endif // UX_STACK_SLOT_ARRAY_COUNT
172
173typedef unsigned int (*callback_int_t)(unsigned int);
174
176
180typedef struct ux_state_s ux_state_t;
181
182// returns 0 if the element_array is not found, else stack_index + 1 if the element_array is found
183unsigned int ux_stack_is_element_array_present(const bagl_element_t *element_array);
184
185// push if a slot exists and returns the new slot, otherwise returns the top spot
186unsigned int ux_stack_push(void);
187
188// pops the top slot exists and returns the new slot, then returns the new top slot
189unsigned int ux_stack_pop(void);
190
191// inserts a new slot at the stack_slot
192void ux_stack_insert(unsigned int stack_slot); // insert slot space as given index
193
194// removes the slot at the stack_slot
195void ux_stack_remove(unsigned int stack_slot);
196
197void ux_stack_init(unsigned int stack_slot);
198
199// display the slot at index stack_slot
200void ux_stack_display(unsigned int stack_slot);
201
205void ux_stack_al_display_next_element(unsigned int stack_slot);
206
207// redisplay the top stacked slot.
208void ux_stack_redisplay(void);
209
212
213#ifdef HAVE_UX_LEGACY
214// a menu callback is called with a given userid provided within the menu entry to allow for fast
215// switch of the action to be taken
216typedef void (*ux_menu_callback_t)(unsigned int userid);
217
219
224 // other menu shown when validated
226 // callback called when entered (not executed when a menu entry is present)
228 // user identifier to allow for indirection in a separated table and mutualise even more menu
229 // handling, passed to the given callback is any
230 unsigned int userid;
231 const bagl_icon_details_t *icon;
232 const char *line1;
233 const char *line2;
234 char text_x;
235 char icon_x;
236};
237
238typedef const bagl_element_t *(*ux_menu_preprocessor_t)(const ux_menu_entry_t *,
239 bagl_element_t *element);
240typedef const ux_menu_entry_t *(*ux_menu_iterator_t)(unsigned int entry_idx);
248
249// a menu callback is called with a given userid provided within the menu entry to allow for fast
250// switch of the action to be taken
251typedef void (*ux_turner_callback_t)(void);
252
253typedef struct ux_turner_step_s {
254 const bagl_icon_details_t *icon;
255 unsigned short fontid1;
256 const char *line1;
257 unsigned short fontid2;
258 const char *line2;
259 char text_x;
260 char icon_x;
261 unsigned int next_step_ms;
263
271#endif // HAVE_UX_LEGACY
272
274 // arrays of element to be displayed (to automate when dealing with static and dynamic elements)
276 unsigned char element_arrays_count;
277 unsigned short element_index;
278 // unsigned char displayed;
279 struct {
281 unsigned char element_array_count;
283
284#if defined(HAVE_UX_FLOW)
285 callback_int_t displayed_callback;
286#endif // defined(HAVE_UX_FLOW)
287 // callback called before the screen callback to change the keyboard face
290
292 unsigned int ticker_value;
293 unsigned int ticker_interval;
294};
295
297 unsigned char stack_count; // initialized @0 by the bolos ux initialize
298 bolos_task_status_t exit_code;
299
300#ifdef HAVE_UX_FLOW
301 // global context, therefore, don't allow for multiple paging overlaid in a graphic stack
302 ux_layout_paging_state_t layout_paging;
303
304 // the flow for each stack slot
306
307#endif // HAVE_UX_FLOW
308
309#if defined(HAVE_UX_FLOW)
310 // after an int to make sure it's aligned
311 char string_buffer[MAX(128, sizeof(bagl_icon_details_t) - 1)];
312#endif // defined(HAVE_UX_FLOW)
313
315
316 // unified arrays
317 // maxstack: [onboarding/dashboard/settings] | pairing | pin | batterylow | batterycrit |
318 // screensaver
320
321#ifdef HAVE_UX_FLOW
322 // for menulist display
323 unsigned int menulist_current;
324 ux_layout_strings_params_t menulist_params;
325 list_item_value_t menulist_getter;
326 list_item_select_t menulist_selector;
327#endif // HAVE_UX_FLOW
328
329#ifdef COMPLIANCE_UX_160
330 bolos_ux_params_t params;
331#endif // COMPLIANCE_UX_160
332
334};
335
336#ifdef COMPLIANCE_UX_160
337
338#define G_ux ux
339#define G_ux_params ux.params
340#define callback_interval_ms stack[0].ticker_interval
341#define UX_INIT() \
342 memset(&G_ux, 0, sizeof(G_ux)); \
343 ux_stack_push();
344extern ux_state_t G_ux;
345
346#else // COMPLIANCE_UX_160
347
348extern ux_state_t G_ux;
349extern bolos_ux_params_t G_ux_params;
350
354#define UX_INIT() memset(&G_ux, 0, sizeof(G_ux));
355
356#endif // COMPLIANCE_UX_160
357
364#define UX_DISPLAY_NEXT_ELEMENT() \
365 if (G_ux.stack[0].element_arrays[0].element_array \
366 && G_ux.stack[0].element_index < G_ux.stack[0].element_arrays[0].element_array_count \
367 && (os_perso_isonboarded() != BOLOS_UX_OK \
368 || os_global_pin_is_validated() == BOLOS_UX_OK)) { \
369 while (G_ux.stack[0].element_index \
370 < G_ux.stack[0].element_arrays[0].element_array_count) { \
371 const bagl_element_t *element \
372 = &G_ux.stack[0].element_arrays[0].element_array[G_ux.stack[0].element_index]; \
373 if (!G_ux.stack[0].screen_before_element_display_callback \
374 || (element = G_ux.stack[0].screen_before_element_display_callback(element))) { \
375 if ((unsigned int) element \
376 == 1) { /*backward compat with coding to avoid smashing everything*/ \
377 element = &G_ux.stack[0] \
378 .element_arrays[0] \
379 .element_array[G_ux.stack[0].element_index]; \
380 } \
381 io_seph_ux_display_bagl_element(element); \
382 } \
383 G_ux.stack[0].element_index++; \
384 } \
385 if (G_ux.stack[0].element_index == G_ux.stack[0].element_arrays[0].element_array_count) { \
386 screen_update(); \
387 } \
388 }
389
395#define UX_WAKE_UP() \
396 G_ux_params.ux_id = BOLOS_UX_WAKE_UP; \
397 G_ux_params.len = 0; \
398 os_ux(&G_ux_params); \
399 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX);
400
404#define UX_REDISPLAY_REQUEST() \
405 io_seph_ux_init_button(); \
406 G_ux.stack[0].element_index = 0;
407
411#define UX_REDISPLAY_IDX(index) \
412 io_seph_ux_init_button(); /*ensure to avoid release of a button from a nother screen to \
413 mess up with the redisplayed screen */ \
414 G_ux.stack[0].element_index = index; \
415 /* REDRAW is redisplay already, use os_ux return value to check */ \
416 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX); \
417 if (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE) { \
418 UX_DISPLAY_NEXT_ELEMENT(); \
419 }
420
424#define UX_REDISPLAY() UX_REDISPLAY_IDX(0)
426#define UX_DISPLAY(elements_array, preprocessor) \
427 G_ux.stack[0].element_arrays[0].element_array = elements_array; \
428 G_ux.stack[0].element_arrays[0].element_array_count \
429 = sizeof(elements_array) / sizeof(elements_array[0]); \
430 G_ux.stack[0].button_push_callback = elements_array##_button; \
431 G_ux.stack[0].screen_before_element_display_callback = preprocessor; \
432 UX_WAKE_UP(); \
433 UX_REDISPLAY();
434
439#define UX_DISPLAY_REQUEST(elements_array, preprocessor) \
440 G_ux.stack[0].element_arrays[0].element_array = elements_array; \
441 G_ux.stack[0].element_arrays[0].element_array_count \
442 = sizeof(elements_array) / sizeof(elements_array[0]); \
443 G_ux.stack[0].button_push_callback = elements_array##_button; \
444 G_ux.stack[0].screen_before_element_display_callback = preprocessor; \
445 UX_WAKE_UP();
446
451#define UX_CALLBACK_SET_INTERVAL(ms) G_ux.stack[0].ticker_value = ms;
452
457#define UX_FORWARD_EVENT(callback, ignoring_app_if_ux_busy) \
458 G_ux_params.ux_id = BOLOS_UX_EVENT; \
459 G_ux_params.len = 0; \
460 os_ux(&G_ux_params); \
461 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX); \
462 if (G_ux_params.len == BOLOS_UX_REDRAW) { \
463 UX_REDISPLAY(); \
464 } \
465 else if (!ignoring_app_if_ux_busy \
466 || (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE)) { \
467 callback; \
468 }
470#define UX_CONTINUE_DISPLAY_APP(displayed_callback) \
471 UX_DISPLAY_NEXT_ELEMENT(); \
472 /* all items have been displayed */ \
473 if (G_ux.stack[0].element_index >= G_ux.stack[0].element_arrays[0].element_array_count) { \
474 displayed_callback \
475 }
476
480#define UX_DISPLAYED_EVENT(displayed_callback) \
481 UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP(displayed_callback); }, 1)
482
486#define UX_DISPLAYED() \
487 (G_ux.stack[0].element_index >= G_ux.stack[0].element_arrays[0].element_array_count)
488
493#define UX_WAIT_DISPLAYED() \
494 while (!UX_DISPLAYED()) { \
495 UX_DISPLAY_NEXT_ELEMENT(); \
496 }
497
502#define UX_BUTTON_PUSH_EVENT(seph_packet) \
503 UX_FORWARD_EVENT( \
504 { \
505 if (G_ux.stack[0].button_push_callback) { \
506 io_seproxyhal_button_push(G_ux.stack[0].button_push_callback, \
507 seph_packet[3] >> 1); \
508 } \
509 UX_CONTINUE_DISPLAY_APP({}); \
510 }, \
511 1);
513#define UX_FINGER_EVENT(seph_packet)
518#define UX_TICKER_EVENT(seph_packet, callback) \
519 UX_FORWARD_EVENT( \
520 { \
521 unsigned int UX_ALLOWED \
522 = (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE); \
523 if (G_ux.stack[0].ticker_value) { \
524 G_ux.stack[0].ticker_value -= MIN(G_ux.stack[0].ticker_value, 100); \
525 if (!G_ux.stack[0].ticker_value) { \
526 if (!G_ux.stack[0].ticker_callback) { \
527 callback \
528 } \
529 else { \
530 G_ux.stack[0].ticker_value = G_ux.stack[0].ticker_interval; \
531 G_ux.stack[0].ticker_callback(0); \
532 } \
533 } \
534 } \
535 if (UX_ALLOWED) { \
536 UX_CONTINUE_DISPLAY_APP({}); \
537 } \
538 }, \
539 0);
540
545#define UX_DEFAULT_EVENT() UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP({}); }, 0);
546
551#define UX_DISPLAY_KEYBOARD(callback) \
552 G_ux_params.ux_id = BOLOS_UX_KEYBOARD; \
553 G_ux_params.len = 0; \
554 os_ux(&G_ux_params); \
555 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX);
556
557// discriminated from io to allow for different memory placement
558typedef struct ux_seph_s {
559 unsigned int button_mask;
560 unsigned int button_same_mask_counter;
561#ifdef HAVE_BOLOS
562 unsigned int ux_id;
563 unsigned int ux_status;
564#endif // HAVE_BOLOS
566
568
569#ifdef HAVE_UX_LEGACY
570#define UX_MENU_END \
571 { \
572 NULL, NULL, 0, NULL, NULL, NULL, 0, 0 \
573 }
575#define UX_MENU_INIT() memset(&ux_menu, 0, sizeof(ux_menu));
577#define UX_MENU_DISPLAY(current_entry, menu_entries, menu_entry_preprocessor) \
578 ux_menu_display(current_entry, menu_entries, menu_entry_preprocessor);
579
580// if current_entry == -1UL, then don't change the current entry
581#define UX_MENU_UNCHANGED_ENTRY (-1UL)
582void ux_menu_display(unsigned int current_entry,
583 const ux_menu_entry_t *menu_entries,
584 ux_menu_preprocessor_t menu_entry_preprocessor);
586unsigned int ux_menu_elements_button(unsigned int button_mask, unsigned int button_mask_counter);
589#define UX_TURNER_INIT() memset(&ux_turner, 0, sizeof(ux_turner));
591#define UX_TURNER_DISPLAY(current_step, steps, steps_count, button_push_callback) \
592 ux_turner_display(current_step, steps, steps_count, button_push_callback);
593
594// if current_entry == -1UL, then don't change the current entry
595#define UX_TURNER_UNCHANGED_ENTRY (-1UL)
596void ux_turner_display(unsigned int current_step,
597 const ux_turner_step_t *steps,
598 unsigned int steps_count,
599 button_push_callback_t button_callback);
600// function to be called to advance to the next turner step when the programmed delay is expired
601void ux_turner_ticker(unsigned int elpased_ms);
602
604#endif // HAVE_UX_LEGACY
605
606#ifdef HAVE_UX_LEGACY
607// current ux_menu context (could be pluralised if multiple nested levels of menu are required
608// within bolos_ux for example)
609#ifdef BOLOS_RELEASE
610#ifdef TARGET_NANOX
611#error HAVE_UX_LEGACY must be removed in the release
612#else
613#warning Refactor UX plz
614#endif // TARGET_NANOX
615#endif // BOLOS_RELEASE
616#endif // HAVE_UX_LEGACY
617
618#include "glyphs.h"
Key pair generation based on elliptic curves.
#define LANGUAGE_PACK
Definition nbgl_fonts.h:29
#define MAX(x, y)
Definition nbgl_types.h:103
const char * text
Definition ux_bagl.h:68
bagl_component_t component
Definition ux_bagl.h:58
const bagl_icon_details_t * icon
Definition ux_bagl.h:107
const char * lines[5]
Definition ux_bagl.h:102
Definition ux_bagl.h:223
unsigned int userid
Definition ux_bagl.h:230
char icon_x
Definition ux_bagl.h:235
char text_x
Definition ux_bagl.h:234
const char * line1
Definition ux_bagl.h:232
const char * line2
Definition ux_bagl.h:233
const bagl_icon_details_t * icon
Definition ux_bagl.h:231
ux_menu_callback_t callback
Definition ux_bagl.h:227
const ux_menu_entry_t * menu
Definition ux_bagl.h:225
ux_menu_preprocessor_t menu_entry_preprocessor
Definition ux_bagl.h:245
const ux_menu_entry_t * menu_entries
Definition ux_bagl.h:242
ux_menu_iterator_t menu_iterator
Definition ux_bagl.h:246
unsigned int current_entry
Definition ux_bagl.h:244
unsigned int menu_entries_count
Definition ux_bagl.h:243
unsigned int button_mask
Definition ux_bagl.h:558
unsigned int button_same_mask_counter
Definition ux_bagl.h:559
struct ux_stack_slot_s::@48 element_arrays[UX_STACK_SLOT_ARRAY_COUNT]
unsigned char element_arrays_count
Definition ux_bagl.h:276
button_push_callback_t button_push_callback
Definition ux_bagl.h:289
unsigned int ticker_interval
Definition ux_bagl.h:293
bolos_task_status_t exit_code_after_elements_displayed
Definition ux_bagl.h:275
unsigned short element_index
Definition ux_bagl.h:277
callback_int_t ticker_callback
Definition ux_bagl.h:291
bagl_element_callback_t screen_before_element_display_callback
Definition ux_bagl.h:288
unsigned int ticker_value
Definition ux_bagl.h:292
const bagl_element_t * element_array
Definition ux_bagl.h:280
unsigned char element_array_count
Definition ux_bagl.h:281
unsigned char stack_count
Definition ux_bagl.h:297
bolos_ux_params_t params
Definition ux_bagl.h:330
ux_stack_slot_t stack[UX_STACK_SLOT_COUNT]
Definition ux_bagl.h:319
bagl_element_t tmp_element
Definition ux_bagl.h:314
char * externalText
Definition ux_bagl.h:333
bolos_task_status_t exit_code
Definition ux_bagl.h:298
char string_buffer[128]
Definition ux_nbgl.h:47
unsigned int current_step
Definition ux_bagl.h:267
const ux_turner_step_t * steps
Definition ux_bagl.h:265
button_push_callback_t button_callback
Definition ux_bagl.h:268
unsigned int elapsed_ms
Definition ux_bagl.h:269
unsigned int steps_count
Definition ux_bagl.h:266
unsigned short fontid2
Definition ux_bagl.h:257
unsigned short fontid1
Definition ux_bagl.h:255
const bagl_icon_details_t * icon
Definition ux_bagl.h:254
const char * line1
Definition ux_bagl.h:256
const char * line2
Definition ux_bagl.h:258
unsigned int next_step_ms
Definition ux_bagl.h:261
void io_seproxyhal_button_push(button_push_callback_t button_push_callback, unsigned int new_button_mask)
void(* ux_menu_callback_t)(unsigned int userid)
Definition ux_bagl.h:216
unsigned int ux_stack_push(void)
Definition ux_stack.c:45
unsigned int ux_stack_is_element_array_present(const bagl_element_t *element_array)
Definition ux_stack.c:29
void io_seproxyhal_touch_callback(const bagl_element_t *element, unsigned char event)
const bagl_element_t * ux_menu_element_preprocessor(const bagl_element_t *element)
struct ux_turner_state_s ux_turner_state_t
const bagl_element_t * ux_stack_display_element_callback(const bagl_element_t *element)
Definition ux_stack.c:202
struct ux_seph_s ux_seph_os_and_app_t
struct ux_menu_state_s ux_menu_state_t
#define UX_STACK_SLOT_COUNT
Definition ux_bagl.h:166
void ux_turner_display(unsigned int current_step, const ux_turner_step_t *steps, unsigned int steps_count, button_push_callback_t button_callback)
ux_menu_state_t ux_menu
void ux_turner_ticker(unsigned int elpased_ms)
const ux_menu_entry_t *(* ux_menu_iterator_t)(unsigned int entry_idx)
Definition ux_bagl.h:240
#define G_ux
Definition ux_bagl.h:338
struct ux_layout_icon_strings_params_s ux_layout_icon_strings_params_t
void ux_stack_display(unsigned int stack_slot)
Definition ux_stack.c:288
void(* ux_turner_callback_t)(void)
Definition ux_bagl.h:251
void io_seproxyhal_display(const bagl_element_t *element)
void io_seproxyhal_touch_element_callback(const bagl_element_t *elements, unsigned short element_count, unsigned short x, unsigned short y, unsigned char event_kind, bagl_element_callback_t before_display)
void ux_stack_remove(unsigned int stack_slot)
Definition ux_stack.c:140
void io_seproxyhal_display_default(const bagl_element_t *element)
struct ux_turner_step_s ux_turner_step_t
void ux_stack_al_display_next_element(unsigned int stack_slot)
void ux_stack_insert(unsigned int stack_slot)
Definition ux_stack.c:111
void io_seproxyhal_touch(const bagl_element_t *elements, unsigned short element_count, unsigned short x, unsigned short y, unsigned char event_kind)
ux_turner_state_t ux_turner
const bagl_element_t * ux_layout_strings_prepro(const bagl_element_t *element)
ux_seph_os_and_app_t G_ux_os
void ux_stack_init(unsigned int stack_slot)
Definition ux_stack.c:171
#define G_ux_params
Definition ux_bagl.h:339
unsigned int(* button_push_callback_t)(unsigned int button_mask, unsigned int button_mask_counter)
Definition ux_bagl.h:142
const bagl_element_t *(* bagl_element_callback_t)(const bagl_element_t *element)
Definition ux_bagl.h:54
#define UX_STACK_SLOT_ARRAY_COUNT
Definition ux_bagl.h:170
void ux_menu_display(unsigned int current_entry, const ux_menu_entry_t *menu_entries, ux_menu_preprocessor_t menu_entry_preprocessor)
void ux_stack_display_elements(ux_stack_slot_t *slot)
Definition ux_stack.c:221
struct ux_layout_strings_params_s ux_layout_strings_params_t
void ux_stack_redisplay(void)
Definition ux_stack.c:89
unsigned int bagl_label_roundtrip_duration_ms(const bagl_element_t *e, unsigned int average_char_width)
unsigned int bagl_label_roundtrip_duration_ms_buf(const bagl_element_t *e, const char *str, unsigned int average_char_width)
const bagl_element_t *(* ux_menu_preprocessor_t)(const ux_menu_entry_t *, bagl_element_t *element)
Definition ux_bagl.h:238
unsigned int ux_menu_elements_button(unsigned int button_mask, unsigned int button_mask_counter)
unsigned int(* callback_int_t)(unsigned int)
Definition ux_bagl.h:173
unsigned int ux_stack_pop(void)
Definition ux_stack.c:59
BOLOS_UX_LOC_STRINGS UX_LOC_STRINGS_INDEX