Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_layout_keypad.c
Go to the documentation of this file.
1
7#ifdef HAVE_SE_TOUCH
8#ifdef NBGL_KEYPAD
9/*********************
10 * INCLUDES
11 *********************/
12#include <string.h>
13#include <stdlib.h>
14#include "nbgl_debug.h"
15#include "nbgl_front.h"
17#include "nbgl_obj.h"
18#include "nbgl_draw.h"
19#include "nbgl_screen.h"
20#include "nbgl_touch.h"
21#include "glyphs.h"
22#include "os_pic.h"
23#include "os_helpers.h"
24#include "os.h"
25
26/*********************
27 * DEFINES
28 *********************/
29
30enum {
35};
36
37#if defined(TARGET_STAX)
38#define ENTRY_DIGITS_HEIGHT 50
39#define ENTRY_DIGITS_CONTAINER_HEIGHT 44
40#define INTER_ENTRY_DIGITS 10
41#define TITLE_MARGIN_Y 8
42#define TITLE_MARGIN_Y_SMALL 8
43#elif defined(TARGET_FLEX)
44#define ENTRY_DIGITS_HEIGHT 64
45#define ENTRY_DIGITS_CONTAINER_HEIGHT 64
46#define INTER_ENTRY_DIGITS 12
47#define TITLE_MARGIN_Y 8
48#define TITLE_MARGIN_Y_SMALL 8
49#elif defined(TARGET_APEX)
50#define ENTRY_DIGITS_HEIGHT 40
51#define ENTRY_DIGITS_CONTAINER_HEIGHT 40
52#define INTER_ENTRY_DIGITS 8
53#define TITLE_MARGIN_Y 13
54#define TITLE_MARGIN_Y_SMALL 2
55#endif // TARGETS
56
57/**********************
58 * MACROS
59 **********************/
60
61/**********************
62 * TYPEDEFS
63 **********************/
64
65/**********************
66 * VARIABLES
67 **********************/
68
69/**********************
70 * STATIC PROTOTYPES
71 **********************/
72
73/**********************
74 * GLOBAL API FUNCTIONS
75 **********************/
76
87int nbgl_layoutAddKeypad(nbgl_layout_t *layout, keyboardCallback_t callback, bool shuffled)
88{
89 nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
90 nbgl_keypad_t *keypad;
91
92 LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutAddKeypad():\n");
93 if (layout == NULL) {
94 return -1;
95 }
96 // footer must be empty
97 if (layoutInt->footerContainer != NULL) {
98 return -1;
99 }
100
101 // create keypad
102 keypad = (nbgl_keypad_t *) nbgl_objPoolGet(KEYPAD, layoutInt->layer);
103 keypad->obj.alignmentMarginY = 0;
104 keypad->obj.alignment = BOTTOM_MIDDLE;
105 keypad->obj.alignTo = NULL;
106 keypad->obj.area.width = SCREEN_WIDTH;
107 keypad->obj.area.height = 4 * KEYPAD_KEY_HEIGHT;
108 keypad->callback = PIC(callback);
109 keypad->enableDigits = true;
110 keypad->enableBackspace = false;
111 keypad->enableValidate = false;
112 keypad->shuffled = shuffled;
113 keypad->digitsChanged = true;
114 keypad->validateChanged = true;
115
116 // the keypad occupies the footer
117 layoutInt->footerContainer = (nbgl_container_t *) nbgl_objPoolGet(CONTAINER, layoutInt->layer);
118 layoutInt->footerContainer->obj.area.width = SCREEN_WIDTH;
119 layoutInt->footerContainer->layout = VERTICAL;
120 layoutInt->footerContainer->children
121 = (nbgl_obj_t **) nbgl_containerPoolGet(1, layoutInt->layer);
122 layoutInt->footerContainer->obj.alignment = BOTTOM_MIDDLE;
123 layoutInt->footerContainer->obj.area.height = keypad->obj.area.height;
124 layoutInt->footerContainer->children[layoutInt->footerContainer->nbChildren]
125 = (nbgl_obj_t *) keypad;
126 layoutInt->footerContainer->nbChildren++;
127
128 // add to layout children
129 layoutInt->children[FOOTER_INDEX] = (nbgl_obj_t *) layoutInt->footerContainer;
130
131 // subtract footer height from main container height
132 layoutInt->container->obj.area.height -= layoutInt->footerContainer->obj.area.height;
133
134 layoutInt->footerType = KEYPAD_FOOTER_TYPE;
135
136 return layoutInt->footerContainer->obj.area.height;
137}
138
150 uint8_t index,
151 bool enableValidate,
152 bool enableBackspace,
153 bool enableDigits)
154{
155 nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
156 nbgl_keypad_t *keypad;
157
159 "nbgl_layoutUpdateKeypad(): enableValidate = %d, enableBackspace = %d\n",
160 enableValidate,
161 enableBackspace);
162 if (layout == NULL) {
163 return -1;
164 }
165 UNUSED(index);
166
167 // get existing keypad (in the footer container)
168 keypad = (nbgl_keypad_t *) layoutInt->footerContainer->children[0];
169 if ((keypad == NULL) || (keypad->obj.type != KEYPAD)) {
170 return -1;
171 }
172 // partial redraw only if only validate and backspace have changed
173 keypad->digitsChanged = (keypad->enableDigits != enableDigits);
174 keypad->validateChanged = (keypad->enableValidate != enableValidate);
175 keypad->enableValidate = enableValidate;
176 keypad->enableBackspace = enableBackspace;
177 keypad->enableDigits = enableDigits;
178
179 nbgl_objDraw((nbgl_obj_t *) keypad);
180
181 return 0;
182}
183
192int nbgl_layoutUpdateKeypadValidation(nbgl_layout_t *layout, bool softValidation)
193{
194 nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
195 nbgl_keypad_t *keypad;
196
197 LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutUpdateKeypad(): softValidation = %d,\n", softValidation);
198 if (layout == NULL) {
199 return -1;
200 }
201 UNUSED(index);
202
203 // get existing keypad (in the footer container)
204 keypad = (nbgl_keypad_t *) layoutInt->footerContainer->children[0];
205 if ((keypad == NULL) || (keypad->obj.type != KEYPAD)) {
206 return -1;
207 }
208 keypad->softValidation = softValidation;
209
210 return 0;
211}
212
226int nbgl_layoutAddHiddenDigits(nbgl_layout_t *layout, uint8_t nbDigits)
227{
228 nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
229 nbgl_container_t *container;
230 uint8_t space;
231
232 LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutAddHiddenDigits():\n");
233 if (layout == NULL) {
234 return -1;
235 }
236 if (nbDigits > KEYPAD_MAX_DIGITS) {
237 return -1;
238 }
239 if (nbDigits > 8) {
240 space = 4;
241 }
242 else {
243 space = 12;
244 }
245
246 // create a container, invisible or bordered
247 container = (nbgl_container_t *) nbgl_objPoolGet(CONTAINER, layoutInt->layer);
248 container->nbChildren = nbDigits;
249#ifdef TARGET_STAX
250 container->nbChildren++; // +1 for the line
251#endif // TARGET_STAX
252 container->children = nbgl_containerPoolGet(container->nbChildren, layoutInt->layer);
253 // <space> pixels between each icon (knowing that the effective round are 18px large and the
254 // icon 24px)
255 container->obj.area.width = nbDigits * DIGIT_ICON.width + (nbDigits - 1) * space;
256 container->obj.area.height = ENTRY_DIGITS_HEIGHT;
257
258 // item N-2 is the title
259 container->obj.alignTo = layoutInt->container->children[layoutInt->container->nbChildren - 2];
260 container->obj.alignment = BOTTOM_MIDDLE;
261
262 // set this new container as child of the main container
263 layoutAddObject(layoutInt, (nbgl_obj_t *) container);
264
265 // create children of the container, as images (empty circles)
266 nbgl_objPoolGetArray(IMAGE, nbDigits, layoutInt->layer, (nbgl_obj_t **) container->children);
267 for (int i = 0; i < nbDigits; i++) {
268 nbgl_image_t *image = (nbgl_image_t *) container->children[i];
269 image->buffer = &DIGIT_ICON;
270 image->foregroundColor = WHITE;
271 if (i > 0) {
272 image->obj.alignment = MID_RIGHT;
273 image->obj.alignTo = (nbgl_obj_t *) container->children[i - 1];
274 image->obj.alignmentMarginX = space;
275 }
276 else {
277 image->obj.alignment = MID_LEFT;
278 }
279 }
280#ifdef TARGET_STAX
281 nbgl_line_t *line;
282 // create gray line
283 line = (nbgl_line_t *) nbgl_objPoolGet(LINE, layoutInt->layer);
284 line->lineColor = LIGHT_GRAY;
285 line->obj.alignmentMarginY = 0;
286 line->obj.alignTo = NULL;
287 line->obj.alignment = BOTTOM_MIDDLE;
288 line->obj.area.width = container->obj.area.width;
289 line->obj.area.height = 4;
290 line->direction = HORIZONTAL;
291 line->thickness = 2;
292 line->offset = 2;
293 container->children[nbDigits] = (nbgl_obj_t *) line;
294#endif // TARGET_STAX
295
296 // return index of keypad to be modified later on
297 return (layoutInt->container->nbChildren - 1);
298}
299
309int nbgl_layoutUpdateHiddenDigits(nbgl_layout_t *layout, uint8_t index, uint8_t nbActive)
310{
311 nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
312 nbgl_container_t *container;
313 nbgl_image_t *image;
314
315 LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutUpdateHiddenDigits(): nbActive = %d\n", nbActive);
316 if (layout == NULL) {
317 return -1;
318 }
319
320 // get container
321 container = (nbgl_container_t *) layoutInt->container->children[index];
322 // sanity check
323 if ((container == NULL) || (container->obj.type != CONTAINER)) {
324 return -1;
325 }
326 if (nbActive > container->nbChildren) {
327 return -1;
328 }
329 if (nbActive == 0) {
330 // deactivate the first digit
331 image = (nbgl_image_t *) container->children[0];
332 if ((image == NULL) || (image->obj.type != IMAGE)) {
333 return -1;
334 }
335 image->foregroundColor = WHITE;
336 }
337 else {
338 image = (nbgl_image_t *) container->children[nbActive - 1];
339 if ((image == NULL) || (image->obj.type != IMAGE)) {
340 return -1;
341 }
342 // if the last "active" is already active, it means that we are decreasing the number of
343 // active otherwise we are increasing it
344 if (image->foregroundColor == BLACK) {
345 // all digits are already active
346 if (nbActive == container->nbChildren) {
347 return 0;
348 }
349 // deactivate the next digit
350 image = (nbgl_image_t *) container->children[nbActive];
351 image->foregroundColor = WHITE;
352 }
353 else {
354 image->buffer = &DIGIT_ICON;
355 image->foregroundColor = BLACK;
356 }
357 }
358
359 nbgl_objDraw((nbgl_obj_t *) image);
360
361 return 0;
362}
363
381 const char *title,
382 bool hidden,
383 uint8_t nbDigits,
384 const char *text)
385{
386 nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
387 nbgl_container_t *container;
388 nbgl_text_area_t *textArea;
389
390 LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutAddKeypadContent():\n");
391 if (layout == NULL) {
392 return -1;
393 }
394 // create a container, to store both title and "digits" (and line on Stax)
395 container = (nbgl_container_t *) nbgl_objPoolGet(CONTAINER, layoutInt->layer);
396 container->nbChildren = NB_CHILDREN;
397 container->children = nbgl_containerPoolGet(container->nbChildren, layoutInt->layer);
398 container->obj.area.width = AVAILABLE_WIDTH;
399 container->obj.alignment = TOP_MIDDLE;
400
401 // create text area for title
402 textArea = (nbgl_text_area_t *) nbgl_objPoolGet(TEXT_AREA, layoutInt->layer);
403 textArea->textColor = BLACK;
404 textArea->text = title;
405 textArea->textAlignment = CENTER;
406 textArea->fontId = SMALL_REGULAR_FONT;
407 textArea->wrapping = true;
408 textArea->obj.alignment = TOP_MIDDLE;
409 textArea->obj.area.width = AVAILABLE_WIDTH;
410 textArea->obj.area.height = nbgl_getTextHeightInWidth(
411 textArea->fontId, textArea->text, textArea->obj.area.width, textArea->wrapping);
412 if (textArea->obj.area.height > nbgl_getFontHeight(textArea->fontId)) {
413 container->obj.alignmentMarginY = TITLE_MARGIN_Y_SMALL;
414 }
415 else {
416 container->obj.alignmentMarginY = TITLE_MARGIN_Y;
417 }
418 container->children[TITLE_INDEX] = (nbgl_obj_t *) textArea;
419 container->obj.area.height += textArea->obj.area.height;
420
421 if (hidden) {
422 nbgl_container_t *digitsContainer;
423 uint8_t space;
424
425 if (nbDigits > KEYPAD_MAX_DIGITS) {
426 return -1;
427 }
428 // space between "digits"
429 if (nbDigits > 8) {
430 space = 4;
431 }
432 else {
433 space = INTER_ENTRY_DIGITS;
434 }
435
436 // create digits container, to store "discs"
437 digitsContainer = (nbgl_container_t *) nbgl_objPoolGet(CONTAINER, layoutInt->layer);
438 digitsContainer->nbChildren = nbDigits;
439 digitsContainer->children
440 = nbgl_containerPoolGet(digitsContainer->nbChildren, layoutInt->layer);
441 // <space> pixels between each icon (knowing that the effective round are 18px large and the
442 // icon 24px)
443 digitsContainer->obj.area.width = nbDigits * DIGIT_ICON.width + (nbDigits - 1) * space;
444 digitsContainer->obj.area.height = ENTRY_DIGITS_CONTAINER_HEIGHT;
445 // align at the bottom of title
446 digitsContainer->obj.alignTo = container->children[0];
447 digitsContainer->obj.alignment = BOTTOM_MIDDLE;
448#ifdef TARGET_STAX
449 digitsContainer->obj.alignmentMarginY = 28;
450#endif // TARGET_STAX
451 container->children[INPUT_INDEX] = (nbgl_obj_t *) digitsContainer;
452 container->obj.area.height += digitsContainer->obj.area.height;
453
454 // create children of the container, as images (empty circles)
456 IMAGE, nbDigits, layoutInt->layer, (nbgl_obj_t **) digitsContainer->children);
457 for (int i = 0; i < nbDigits; i++) {
458 nbgl_image_t *image = (nbgl_image_t *) digitsContainer->children[i];
459 image->buffer = &DIGIT_ICON;
460 image->foregroundColor = WHITE;
461 if (i > 0) {
462 image->obj.alignment = MID_RIGHT;
463 image->obj.alignTo = (nbgl_obj_t *) digitsContainer->children[i - 1];
464 image->obj.alignmentMarginX = space;
465 }
466 else {
467 image->obj.alignment = MID_LEFT;
468 }
469 }
470 }
471 else {
472 // create text area
473 textArea = (nbgl_text_area_t *) nbgl_objPoolGet(TEXT_AREA, layoutInt->layer);
474 textArea->textColor = BLACK;
475 textArea->text = text;
476 textArea->textAlignment = MID_LEFT;
477 textArea->fontId = LARGE_MEDIUM_1BPP_FONT;
478 textArea->obj.area.width = container->obj.area.width;
479 textArea->obj.area.height = nbgl_getFontLineHeight(textArea->fontId);
480 textArea->autoHideLongLine = true;
481 // align at the bottom of title
482 textArea->obj.alignTo = container->children[TITLE_INDEX];
483 textArea->obj.alignment = BOTTOM_MIDDLE;
484#ifdef TARGET_STAX
485 textArea->obj.alignmentMarginY = 24;
486#endif // TARGET_STAX
487 container->children[INPUT_INDEX] = (nbgl_obj_t *) textArea;
488 container->obj.area.height += textArea->obj.area.height;
489 }
490
491 // set this new container as child of the main container
492 layoutAddObject(layoutInt, (nbgl_obj_t *) container);
493#ifdef TARGET_STAX
494 nbgl_line_t *line;
495 // create gray line
496 line = (nbgl_line_t *) nbgl_objPoolGet(LINE, layoutInt->layer);
497 line->lineColor = LIGHT_GRAY;
498 line->obj.alignTo = container->children[INPUT_INDEX];
499 line->obj.alignment = BOTTOM_MIDDLE;
500 line->obj.area.width = 288;
501 line->obj.area.height = 4;
502 line->direction = HORIZONTAL;
503 line->thickness = 2;
504 line->offset = 2;
505 container->children[LINE_INDEX] = (nbgl_obj_t *) line;
506#endif // TARGET_STAX
507
508 // return height of the area
509 return container->obj.area.height;
510}
511
525 bool hidden,
526 uint8_t nbActiveDigits,
527 const char *text)
528{
529 nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
530 nbgl_container_t *container;
531 nbgl_image_t *image;
532
533 LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutUpdateHiddenDigits(): nbActive = %d\n", nbActiveDigits);
534 if (layout == NULL) {
535 return -1;
536 }
537
538 UNUSED(index);
539
540 if (hidden) {
541 // get digits container (second child of the main container)
542 container = (nbgl_container_t *) ((nbgl_container_t *) layoutInt->container->children[0])
543 ->children[1];
544 // sanity check
545 if ((container == NULL) || (container->obj.type != CONTAINER)) {
546 return -1;
547 }
548 if (nbActiveDigits > container->nbChildren) {
549 return -1;
550 }
551 if (nbActiveDigits == 0) {
552 // deactivate the first digit
553 image = (nbgl_image_t *) container->children[0];
554 if ((image == NULL) || (image->obj.type != IMAGE)) {
555 return -1;
556 }
557 image->foregroundColor = WHITE;
558 }
559 else {
560 image = (nbgl_image_t *) container->children[nbActiveDigits - 1];
561 if ((image == NULL) || (image->obj.type != IMAGE)) {
562 return -1;
563 }
564 // if the last "active" is already active, it means that we are decreasing the number of
565 // active otherwise we are increasing it
566 if (image->foregroundColor == BLACK) {
567 // all digits are already active
568 if (nbActiveDigits == container->nbChildren) {
569 return 0;
570 }
571 // deactivate the next digit by turning it to white
572 image = (nbgl_image_t *) container->children[nbActiveDigits];
573 image->foregroundColor = WHITE;
574 }
575 else {
576 // activate it the last digit by turning it to black
577 image->foregroundColor = BLACK;
578 }
579 }
580
581 nbgl_objDraw((nbgl_obj_t *) image);
582 }
583 else {
584 // update main text area (second child of the main container)
585 nbgl_text_area_t *textArea
586 = (nbgl_text_area_t *) ((nbgl_container_t *) layoutInt->container->children[0])
587 ->children[1];
588 if ((textArea == NULL) || (textArea->obj.type != TEXT_AREA)) {
589 return -1;
590 }
591 textArea->text = text;
592 textArea->textColor = BLACK;
593 textArea->textAlignment = MID_LEFT;
594 nbgl_objDraw((nbgl_obj_t *) textArea);
595
596 // if the text doesn't fit, indicate it by returning 1 instead of 0, for different refresh
597 if (nbgl_getSingleLineTextWidth(textArea->fontId, text) > textArea->obj.area.width) {
598 return 1;
599 }
600 }
601
602 return 0;
603}
604#endif // NBGL_KEYPAD
605#endif // HAVE_SE_TOUCH
debug traces management
#define LOG_DEBUG(__logger,...)
Definition nbgl_debug.h:86
@ LAYOUT_LOGGER
Definition nbgl_debug.h:33
Middle Level API of the new BOLOS Graphical Library.
uint16_t nbgl_getSingleLineTextWidth(nbgl_font_id_e fontId, const char *text)
return the max width in pixels of the given text until the first or \0 is encountered
Definition nbgl_fonts.c:328
uint8_t nbgl_getFontHeight(nbgl_font_id_e fontId)
return the height in pixels of the font with the given font ID
Definition nbgl_fonts.c:392
uint16_t nbgl_getTextHeightInWidth(nbgl_font_id_e fontId, const char *text, uint16_t maxWidth, bool wrapping)
return the height of the given multiline text, with the given font.
uint8_t nbgl_getFontLineHeight(nbgl_font_id_e fontId)
return the height in pixels of the line of font with the given font ID
Definition nbgl_fonts.c:404
Font screen low-Level driver API, to draw elementary forms.
void layoutAddObject(nbgl_layoutInternal_t *layout, nbgl_obj_t *obj)
adds the given obj to the main container
#define AVAILABLE_WIDTH
void * nbgl_layout_t
type shared externally
Internal functions/constants of NBGL layout layer.
#define KEYPAD_FOOTER_TYPE
@ FOOTER_INDEX
@ LINE_INDEX
@ INPUT_INDEX
@ NB_CHILDREN
@ TITLE_INDEX
int nbgl_layoutAddHiddenDigits(nbgl_layout_t *layout, uint8_t nbDigits)
Adds a placeholder for hidden digits on top of a keypad, to represent the entered digits,...
int nbgl_layoutUpdateHiddenDigits(nbgl_layout_t *layout, uint8_t index, uint8_t nbActive)
Updates an existing set of hidden digits, with the given configuration.
int nbgl_layoutUpdateKeypad(nbgl_layout_t *layout, uint8_t index, bool enableValidate, bool enableBackspace, bool enableDigits)
Updates an existing keypad on bottom of the screen, with the given configuration.
int nbgl_layoutUpdateKeypadValidation(nbgl_layout_t *layout, bool softValidation)
Updates an existing keypad on bottom of the screen, with the given configuration, without redraw.
int nbgl_layoutAddKeypadContent(nbgl_layout_t *layout, const char *title, bool hidden, uint8_t nbDigits, const char *text)
Adds an area with a title and a placeholder for hidden digits on top of a keypad, to represent the en...
int nbgl_layoutUpdateKeypadContent(nbgl_layout_t *layout, bool hidden, uint8_t nbActiveDigits, const char *text)
Updates an existing set of hidden digits, with the given configuration.
int nbgl_layoutAddKeypad(nbgl_layout_t *layout, keyboardCallback_t callback, bool shuffled)
Adds a keypad on bottom of the screen, with the associated callback.
API to draw all basic graphic objects.
struct PACKED__ nbgl_line_s nbgl_line_t
struct to represent a vertical or horizontal line
struct PACKED__ nbgl_text_area_s nbgl_text_area_t
struct to represent a text area (TEXT_AREA type)
void nbgl_objDraw(nbgl_obj_t *obj)
This function draws or redraws the given object and its children (recursive version)
Definition nbgl_obj.c:1626
nbgl_obj_t ** nbgl_containerPoolGet(uint8_t nbObjs, uint8_t layer)
Gets a new container from the pool, with the given number of obj pointers.
struct PACKED__ nbgl_keypad_s nbgl_keypad_t
struct to represent a keypad (KEYPAD type)
nbgl_obj_t * nbgl_objPoolGet(nbgl_obj_type_t type, uint8_t layer)
Gets a new graphic object from the pool, with the given type. The type field of the object is set.
#define KEYPAD_MAX_DIGITS
Definition nbgl_obj.h:67
struct PACKED__ nbgl_image_s nbgl_image_t
struct to represent an image (IMAGE type)
int nbgl_objPoolGetArray(nbgl_obj_type_t type, uint8_t nbObjs, uint8_t layer, nbgl_obj_t **objArray)
Gets nbObjects new graphic object from the pool, with the given type, for the given layer (screen)....
void(* keyboardCallback_t)(char touchedKey)
prototype of function to be called when a valid key is pressed on keyboard Backspace is equal to 0x8 ...
Definition nbgl_obj.h:593
struct PACKED__ nbgl_container_s nbgl_container_t
struct to represent a container (CONTAINER type)
struct PACKED__ nbgl_obj_s nbgl_obj_t
Common structure for all graphical objects.
API to manage screens.
@ WHITE
Definition nbgl_types.h:144
@ LIGHT_GRAY
Definition nbgl_types.h:143
@ BLACK
Definition nbgl_types.h:141
@ VERTICAL
from top to bottom
Definition nbgl_types.h:209
@ HORIZONTAL
from left to right
Definition nbgl_types.h:210
@ TOP_MIDDLE
Definition nbgl_types.h:182
@ CENTER
Definition nbgl_types.h:185
@ MID_RIGHT
Definition nbgl_types.h:186
@ MID_LEFT
Definition nbgl_types.h:184
@ BOTTOM_MIDDLE
Definition nbgl_types.h:188
@ KEYPAD
Keypad.
Definition nbgl_types.h:167
@ IMAGE
Bitmap (y and height must be multiple of 4 on Stax)
Definition nbgl_types.h:157
@ LINE
Vertical or Horizontal line.
Definition nbgl_types.h:158
@ CONTAINER
Empty container.
Definition nbgl_types.h:156
@ TEXT_AREA
Area to contain text line(s)
Definition nbgl_types.h:159
Structure containing all information about the current layout.
nbgl_container_t * footerContainer
container used to store footer (buttons, nav....)
uint8_t layer
layer in screen stack
nbgl_container_t * container
nbgl_layoutFooterType_t footerType
type of footer
nbgl_obj_t ** children
children for main screen