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
120#ifndef BUTTON_FAST_THRESHOLD_CS
121#define BUTTON_FAST_THRESHOLD_CS 8 // x100MS
122#endif // BUTTON_FAST_THRESHOLD_CS
123#ifndef BUTTON_FAST_ACTION_CS
124#define BUTTON_FAST_ACTION_CS 3 // x100MS
125#endif // BUTTON_FAST_ACTION_CS
126
127typedef unsigned int (*button_push_callback_t)(unsigned int button_mask,
128 unsigned int button_mask_counter);
129#define BUTTON_LEFT 1
130#define BUTTON_RIGHT 2
131// flag set when fast threshold is reached and above
132#define BUTTON_EVT_FAST 0x40000000UL
133#define BUTTON_EVT_RELEASED 0x80000000UL
135 unsigned int new_button_mask);
136
137// hal point (if application has to reprocess elements)
139
140// Helper function that give a realistic timing of scrolling for label with text larger than screen
142 unsigned int average_char_width);
144 const char *str,
145 unsigned int average_char_width);
146
147// default version to be called by ::io_seproxyhal_display if nothing to be done by the application
149
150#ifndef UX_STACK_SLOT_COUNT
151#define UX_STACK_SLOT_COUNT 1
152#endif // UX_STACK_SLOT_COUNT
153
154#ifndef UX_STACK_SLOT_ARRAY_COUNT
155#define UX_STACK_SLOT_ARRAY_COUNT 1
156#endif // UX_STACK_SLOT_ARRAY_COUNT
157
158typedef unsigned int (*callback_int_t)(unsigned int);
159
161
165typedef struct ux_state_s ux_state_t;
166
167// returns 0 if the element_array is not found, else stack_index + 1 if the element_array is found
168unsigned int ux_stack_is_element_array_present(const bagl_element_t *element_array);
169
170// push if a slot exists and returns the new slot, otherwise returns the top spot
171unsigned int ux_stack_push(void);
172
173// pops the top slot exists and returns the new slot, then returns the new top slot
174unsigned int ux_stack_pop(void);
175
176// inserts a new slot at the stack_slot
177void ux_stack_insert(unsigned int stack_slot); // insert slot space as given index
178
179// removes the slot at the stack_slot
180void ux_stack_remove(unsigned int stack_slot);
181
182void ux_stack_init(unsigned int stack_slot);
183
184// display the slot at index stack_slot
185void ux_stack_display(unsigned int stack_slot);
186
190void ux_stack_al_display_next_element(unsigned int stack_slot);
191
192// redisplay the top stacked slot.
193void ux_stack_redisplay(void);
194
197
198#ifdef HAVE_UX_LEGACY
199// a menu callback is called with a given userid provided within the menu entry to allow for fast
200// switch of the action to be taken
201typedef void (*ux_menu_callback_t)(unsigned int userid);
202
204
209 // other menu shown when validated
211 // callback called when entered (not executed when a menu entry is present)
213 // user identifier to allow for indirection in a separated table and mutualise even more menu
214 // handling, passed to the given callback is any
215 unsigned int userid;
216 const bagl_icon_details_t *icon;
217 const char *line1;
218 const char *line2;
219 char text_x;
220 char icon_x;
221};
222
223typedef const bagl_element_t *(*ux_menu_preprocessor_t)(const ux_menu_entry_t *,
224 bagl_element_t *element);
225typedef const ux_menu_entry_t *(*ux_menu_iterator_t)(unsigned int entry_idx);
233
234// a menu callback is called with a given userid provided within the menu entry to allow for fast
235// switch of the action to be taken
236typedef void (*ux_turner_callback_t)(void);
237
238typedef struct ux_turner_step_s {
239 const bagl_icon_details_t *icon;
240 unsigned short fontid1;
241 const char *line1;
242 unsigned short fontid2;
243 const char *line2;
244 char text_x;
245 char icon_x;
246 unsigned int next_step_ms;
248
256#endif // HAVE_UX_LEGACY
257
259 // arrays of element to be displayed (to automate when dealing with static and dynamic elements)
261 unsigned char element_arrays_count;
262 unsigned short element_index;
263 // unsigned char displayed;
264 struct {
266 unsigned char element_array_count;
268
269#if defined(HAVE_UX_FLOW)
270 callback_int_t displayed_callback;
271#endif // defined(HAVE_UX_FLOW)
272 // callback called before the screen callback to change the keyboard face
275
277 unsigned int ticker_value;
278 unsigned int ticker_interval;
279};
280
282 unsigned char stack_count; // initialized @0 by the bolos ux initialize
283 bolos_task_status_t exit_code;
284
285#ifdef HAVE_UX_FLOW
286 // global context, therefore, don't allow for multiple paging overlaid in a graphic stack
287 ux_layout_paging_state_t layout_paging;
288
289 // the flow for each stack slot
291
292#endif // HAVE_UX_FLOW
293
294#if defined(HAVE_UX_FLOW)
295 // after an int to make sure it's aligned
296 char string_buffer[MAX(128, sizeof(bagl_icon_details_t) - 1)];
297#endif // defined(HAVE_UX_FLOW)
298
300
301 // unified arrays
302 // maxstack: [onboarding/dashboard/settings] | pairing | pin | batterylow | batterycrit |
303 // screensaver
305
306#ifdef HAVE_UX_FLOW
307 // for menulist display
308 unsigned int menulist_current;
309 ux_layout_strings_params_t menulist_params;
310 list_item_value_t menulist_getter;
311 list_item_select_t menulist_selector;
312#endif // HAVE_UX_FLOW
313
314#ifdef COMPLIANCE_UX_160
315 bolos_ux_params_t params;
316#endif // COMPLIANCE_UX_160
317
319};
320
321#ifdef COMPLIANCE_UX_160
322
323#define G_ux ux
324#define G_ux_params ux.params
325#define callback_interval_ms stack[0].ticker_interval
326#define UX_INIT() \
327 memset(&G_ux, 0, sizeof(G_ux)); \
328 ux_stack_push();
329extern ux_state_t G_ux;
330
331#else // COMPLIANCE_UX_160
332
333extern ux_state_t G_ux;
334extern bolos_ux_params_t G_ux_params;
335
339#define UX_INIT() memset(&G_ux, 0, sizeof(G_ux));
340
341#endif // COMPLIANCE_UX_160
342
349#define UX_DISPLAY_NEXT_ELEMENT() \
350 if (G_ux.stack[0].element_arrays[0].element_array \
351 && G_ux.stack[0].element_index < G_ux.stack[0].element_arrays[0].element_array_count \
352 && (os_perso_isonboarded() != BOLOS_UX_OK \
353 || os_global_pin_is_validated() == BOLOS_UX_OK)) { \
354 while (G_ux.stack[0].element_index \
355 < G_ux.stack[0].element_arrays[0].element_array_count) { \
356 const bagl_element_t *element \
357 = &G_ux.stack[0].element_arrays[0].element_array[G_ux.stack[0].element_index]; \
358 if (!G_ux.stack[0].screen_before_element_display_callback \
359 || (element = G_ux.stack[0].screen_before_element_display_callback(element))) { \
360 if ((unsigned int) element \
361 == 1) { /*backward compat with coding to avoid smashing everything*/ \
362 element = &G_ux.stack[0] \
363 .element_arrays[0] \
364 .element_array[G_ux.stack[0].element_index]; \
365 } \
366 io_seph_ux_display_bagl_element(element); \
367 } \
368 G_ux.stack[0].element_index++; \
369 } \
370 if (G_ux.stack[0].element_index == G_ux.stack[0].element_arrays[0].element_array_count) { \
371 screen_update(); \
372 } \
373 }
374
380#define UX_WAKE_UP() \
381 G_ux_params.ux_id = BOLOS_UX_WAKE_UP; \
382 G_ux_params.len = 0; \
383 os_ux(&G_ux_params); \
384 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX);
385
389#define UX_REDISPLAY_REQUEST() \
390 io_seph_ux_init_button(); \
391 G_ux.stack[0].element_index = 0;
392
396#define UX_REDISPLAY_IDX(index) \
397 io_seph_ux_init_button(); /*ensure to avoid release of a button from a nother screen to \
398 mess up with the redisplayed screen */ \
399 G_ux.stack[0].element_index = index; \
400 /* REDRAW is redisplay already, use os_ux return value to check */ \
401 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX); \
402 if (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE) { \
403 UX_DISPLAY_NEXT_ELEMENT(); \
404 }
405
409#define UX_REDISPLAY() UX_REDISPLAY_IDX(0)
411#define UX_DISPLAY(elements_array, preprocessor) \
412 G_ux.stack[0].element_arrays[0].element_array = elements_array; \
413 G_ux.stack[0].element_arrays[0].element_array_count \
414 = sizeof(elements_array) / sizeof(elements_array[0]); \
415 G_ux.stack[0].button_push_callback = elements_array##_button; \
416 G_ux.stack[0].screen_before_element_display_callback = preprocessor; \
417 UX_WAKE_UP(); \
418 UX_REDISPLAY();
419
424#define UX_DISPLAY_REQUEST(elements_array, preprocessor) \
425 G_ux.stack[0].element_arrays[0].element_array = elements_array; \
426 G_ux.stack[0].element_arrays[0].element_array_count \
427 = sizeof(elements_array) / sizeof(elements_array[0]); \
428 G_ux.stack[0].button_push_callback = elements_array##_button; \
429 G_ux.stack[0].screen_before_element_display_callback = preprocessor; \
430 UX_WAKE_UP();
431
436#define UX_CALLBACK_SET_INTERVAL(ms) G_ux.stack[0].ticker_value = ms;
437
442#define UX_FORWARD_EVENT(callback, ignoring_app_if_ux_busy) \
443 G_ux_params.ux_id = BOLOS_UX_EVENT; \
444 G_ux_params.len = 0; \
445 os_ux(&G_ux_params); \
446 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX); \
447 if (G_ux_params.len == BOLOS_UX_REDRAW) { \
448 UX_REDISPLAY(); \
449 } \
450 else if (!ignoring_app_if_ux_busy \
451 || (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE)) { \
452 callback; \
453 }
455#define UX_CONTINUE_DISPLAY_APP(displayed_callback) \
456 UX_DISPLAY_NEXT_ELEMENT(); \
457 /* all items have been displayed */ \
458 if (G_ux.stack[0].element_index >= G_ux.stack[0].element_arrays[0].element_array_count) { \
459 displayed_callback \
460 }
461
465#define UX_DISPLAYED_EVENT(displayed_callback) \
466 UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP(displayed_callback); }, 1)
467
471#define UX_DISPLAYED() \
472 (G_ux.stack[0].element_index >= G_ux.stack[0].element_arrays[0].element_array_count)
473
478#define UX_WAIT_DISPLAYED() \
479 while (!UX_DISPLAYED()) { \
480 UX_DISPLAY_NEXT_ELEMENT(); \
481 }
482
487#define UX_BUTTON_PUSH_EVENT(seph_packet) \
488 UX_FORWARD_EVENT( \
489 { \
490 if (G_ux.stack[0].button_push_callback) { \
491 io_seproxyhal_button_push(G_ux.stack[0].button_push_callback, \
492 seph_packet[3] >> 1); \
493 } \
494 UX_CONTINUE_DISPLAY_APP({}); \
495 }, \
496 1);
498#define UX_FINGER_EVENT(seph_packet)
503#define UX_TICKER_EVENT(seph_packet, callback) \
504 UX_FORWARD_EVENT( \
505 { \
506 unsigned int UX_ALLOWED \
507 = (G_ux_params.len != BOLOS_UX_IGNORE && G_ux_params.len != BOLOS_UX_CONTINUE); \
508 if (G_ux.stack[0].ticker_value) { \
509 G_ux.stack[0].ticker_value -= MIN(G_ux.stack[0].ticker_value, 100); \
510 if (!G_ux.stack[0].ticker_value) { \
511 if (!G_ux.stack[0].ticker_callback) { \
512 callback \
513 } \
514 else { \
515 G_ux.stack[0].ticker_value = G_ux.stack[0].ticker_interval; \
516 G_ux.stack[0].ticker_callback(0); \
517 } \
518 } \
519 } \
520 if (UX_ALLOWED) { \
521 UX_CONTINUE_DISPLAY_APP({}); \
522 } \
523 }, \
524 0);
525
530#define UX_DEFAULT_EVENT() UX_FORWARD_EVENT({ UX_CONTINUE_DISPLAY_APP({}); }, 0);
531
536#define UX_DISPLAY_KEYBOARD(callback) \
537 G_ux_params.ux_id = BOLOS_UX_KEYBOARD; \
538 G_ux_params.len = 0; \
539 os_ux(&G_ux_params); \
540 G_ux_params.len = os_sched_last_status(TASK_BOLOS_UX);
541
542// discriminated from io to allow for different memory placement
543typedef struct ux_seph_s {
544 unsigned int button_mask;
545 unsigned int button_same_mask_counter;
546#ifdef HAVE_BOLOS
547 unsigned int ux_id;
548 unsigned int ux_status;
549#endif // HAVE_BOLOS
551
553
554#ifdef HAVE_UX_LEGACY
555#define UX_MENU_END \
556 { \
557 NULL, NULL, 0, NULL, NULL, NULL, 0, 0 \
558 }
560#define UX_MENU_INIT() memset(&ux_menu, 0, sizeof(ux_menu));
562#define UX_MENU_DISPLAY(current_entry, menu_entries, menu_entry_preprocessor) \
563 ux_menu_display(current_entry, menu_entries, menu_entry_preprocessor);
564
565// if current_entry == -1UL, then don't change the current entry
566#define UX_MENU_UNCHANGED_ENTRY (-1UL)
567void ux_menu_display(unsigned int current_entry,
568 const ux_menu_entry_t *menu_entries,
569 ux_menu_preprocessor_t menu_entry_preprocessor);
571unsigned int ux_menu_elements_button(unsigned int button_mask, unsigned int button_mask_counter);
574#define UX_TURNER_INIT() memset(&ux_turner, 0, sizeof(ux_turner));
576#define UX_TURNER_DISPLAY(current_step, steps, steps_count, button_push_callback) \
577 ux_turner_display(current_step, steps, steps_count, button_push_callback);
578
579// if current_entry == -1UL, then don't change the current entry
580#define UX_TURNER_UNCHANGED_ENTRY (-1UL)
581void ux_turner_display(unsigned int current_step,
582 const ux_turner_step_t *steps,
583 unsigned int steps_count,
584 button_push_callback_t button_callback);
585// function to be called to advance to the next turner step when the programmed delay is expired
586void ux_turner_ticker(unsigned int elpased_ms);
587
589#endif // HAVE_UX_LEGACY
590
591#ifdef HAVE_UX_LEGACY
592// current ux_menu context (could be pluralised if multiple nested levels of menu are required
593// within bolos_ux for example)
594#ifdef BOLOS_RELEASE
595#ifdef TARGET_NANOX
596#error HAVE_UX_LEGACY must be removed in the release
597#else
598#warning Refactor UX plz
599#endif // TARGET_NANOX
600#endif // BOLOS_RELEASE
601#endif // HAVE_UX_LEGACY
602
603#include "glyphs.h"
Key pair generation based on elliptic curves.
#define MAX(x, y)
Definition nbgl_types.h:121
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:208
unsigned int userid
Definition ux_bagl.h:215
char icon_x
Definition ux_bagl.h:220
char text_x
Definition ux_bagl.h:219
const char * line1
Definition ux_bagl.h:217
const char * line2
Definition ux_bagl.h:218
const bagl_icon_details_t * icon
Definition ux_bagl.h:216
ux_menu_callback_t callback
Definition ux_bagl.h:212
const ux_menu_entry_t * menu
Definition ux_bagl.h:210
ux_menu_preprocessor_t menu_entry_preprocessor
Definition ux_bagl.h:230
const ux_menu_entry_t * menu_entries
Definition ux_bagl.h:227
ux_menu_iterator_t menu_iterator
Definition ux_bagl.h:231
unsigned int current_entry
Definition ux_bagl.h:229
unsigned int menu_entries_count
Definition ux_bagl.h:228
unsigned int button_mask
Definition ux_bagl.h:543
unsigned int button_same_mask_counter
Definition ux_bagl.h:544
unsigned char element_arrays_count
Definition ux_bagl.h:261
button_push_callback_t button_push_callback
Definition ux_bagl.h:274
unsigned int ticker_interval
Definition ux_bagl.h:278
bolos_task_status_t exit_code_after_elements_displayed
Definition ux_bagl.h:260
unsigned short element_index
Definition ux_bagl.h:262
callback_int_t ticker_callback
Definition ux_bagl.h:276
struct ux_stack_slot_s::@51 element_arrays[UX_STACK_SLOT_ARRAY_COUNT]
bagl_element_callback_t screen_before_element_display_callback
Definition ux_bagl.h:273
unsigned int ticker_value
Definition ux_bagl.h:277
const bagl_element_t * element_array
Definition ux_bagl.h:265
unsigned char element_array_count
Definition ux_bagl.h:266
unsigned char stack_count
Definition ux_bagl.h:282
bolos_ux_params_t params
Definition ux_bagl.h:315
ux_stack_slot_t stack[UX_STACK_SLOT_COUNT]
Definition ux_bagl.h:304
bagl_element_t tmp_element
Definition ux_bagl.h:299
char * externalText
Definition ux_bagl.h:318
bolos_task_status_t exit_code
Definition ux_bagl.h:283
char string_buffer[128]
Definition ux_nbgl.h:43
unsigned int current_step
Definition ux_bagl.h:252
const ux_turner_step_t * steps
Definition ux_bagl.h:250
button_push_callback_t button_callback
Definition ux_bagl.h:253
unsigned int elapsed_ms
Definition ux_bagl.h:254
unsigned int steps_count
Definition ux_bagl.h:251
unsigned short fontid2
Definition ux_bagl.h:242
unsigned short fontid1
Definition ux_bagl.h:240
const bagl_icon_details_t * icon
Definition ux_bagl.h:239
const char * line1
Definition ux_bagl.h:241
const char * line2
Definition ux_bagl.h:243
unsigned int next_step_ms
Definition ux_bagl.h:246
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:201
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:151
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:225
#define G_ux
Definition ux_bagl.h:323
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:236
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:324
unsigned int(* button_push_callback_t)(unsigned int button_mask, unsigned int button_mask_counter)
Definition ux_bagl.h:127
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:155
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:223
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:158
unsigned int ux_stack_pop(void)
Definition ux_stack.c:59
BOLOS_UX_LOC_STRINGS UX_LOC_STRINGS_INDEX