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