Embedded SDK
Embedded SDK
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"
16 #include "nbgl_layout_internal.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 #ifdef TARGET_STAX
29 #define DIGIT_ICON C_round_24px
30 #else // TARGET_STAX
31 #define DIGIT_ICON C_pin_24
32 #endif // TARGET_STAX
33 
34 enum {
39 };
40 
41 /**********************
42  * MACROS
43  **********************/
44 
45 /**********************
46  * TYPEDEFS
47  **********************/
48 
49 /**********************
50  * VARIABLES
51  **********************/
52 
53 /**********************
54  * STATIC PROTOTYPES
55  **********************/
56 
57 /**********************
58  * GLOBAL API FUNCTIONS
59  **********************/
60 
71 int nbgl_layoutAddKeypad(nbgl_layout_t *layout, keyboardCallback_t callback, bool shuffled)
72 {
73  nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
74  nbgl_keypad_t *keypad;
75 
76  LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutAddKeypad():\n");
77  if (layout == NULL) {
78  return -1;
79  }
80  // footer must be empty
81  if (layoutInt->footerContainer != NULL) {
82  return -1;
83  }
84 
85  // create keypad
86  keypad = (nbgl_keypad_t *) nbgl_objPoolGet(KEYPAD, layoutInt->layer);
87  keypad->obj.alignmentMarginY = 0;
88  keypad->obj.alignment = BOTTOM_MIDDLE;
89  keypad->obj.alignTo = NULL;
90  keypad->obj.area.width = SCREEN_WIDTH;
91  keypad->obj.area.height = 4 * KEYPAD_KEY_HEIGHT;
92  keypad->borderColor = LIGHT_GRAY;
93  keypad->callback = PIC(callback);
94  keypad->enableDigits = true;
95  keypad->enableBackspace = false;
96  keypad->enableValidate = false;
97  keypad->shuffled = shuffled;
98 
99  // the keypad occupies the footer
100  layoutInt->footerContainer = (nbgl_container_t *) nbgl_objPoolGet(CONTAINER, layoutInt->layer);
101  layoutInt->footerContainer->obj.area.width = SCREEN_WIDTH;
102  layoutInt->footerContainer->layout = VERTICAL;
103  layoutInt->footerContainer->children
104  = (nbgl_obj_t **) nbgl_containerPoolGet(1, layoutInt->layer);
105  layoutInt->footerContainer->obj.alignment = BOTTOM_MIDDLE;
106  layoutInt->footerContainer->obj.area.height = keypad->obj.area.height;
107  layoutInt->footerContainer->children[layoutInt->footerContainer->nbChildren]
108  = (nbgl_obj_t *) keypad;
109  layoutInt->footerContainer->nbChildren++;
110 
111  // add to layout children
112  layoutInt->children[FOOTER_INDEX] = (nbgl_obj_t *) layoutInt->footerContainer;
113 
114  // subtract footer height from main container height
115  layoutInt->container->obj.area.height -= layoutInt->footerContainer->obj.area.height;
116 
117  layoutInt->footerType = KEYPAD_FOOTER_TYPE;
118 
119  return layoutInt->footerContainer->obj.area.height;
120 }
121 
133  uint8_t index,
134  bool enableValidate,
135  bool enableBackspace,
136  bool enableDigits)
137 {
138  nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
139  nbgl_keypad_t *keypad;
140 
142  "nbgl_layoutUpdateKeypad(): enableValidate = %d, enableBackspace = %d\n",
143  enableValidate,
144  enableBackspace);
145  if (layout == NULL) {
146  return -1;
147  }
148  UNUSED(index);
149 
150  // get existing keypad (in the footer container)
151  keypad = (nbgl_keypad_t *) layoutInt->footerContainer->children[0];
152  if ((keypad == NULL) || (keypad->obj.type != KEYPAD)) {
153  return -1;
154  }
155  // partial redraw only if only validate and backspace have changed
156  keypad->partial = (keypad->enableDigits == enableDigits);
157  keypad->enableValidate = enableValidate;
158  keypad->enableBackspace = enableBackspace;
159  keypad->enableDigits = enableDigits;
160 
161  nbgl_objDraw((nbgl_obj_t *) keypad);
162 
163  return 0;
164 }
165 
174 int nbgl_layoutUpdateKeypadValidation(nbgl_layout_t *layout, bool softValidation)
175 {
176  nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
177  nbgl_keypad_t *keypad;
178 
179  LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutUpdateKeypad(): softValidation = %d,\n", softValidation);
180  if (layout == NULL) {
181  return -1;
182  }
183  UNUSED(index);
184 
185  // get existing keypad (in the footer container)
186  keypad = (nbgl_keypad_t *) layoutInt->footerContainer->children[0];
187  if ((keypad == NULL) || (keypad->obj.type != KEYPAD)) {
188  return -1;
189  }
190  keypad->softValidation = softValidation;
191 
192  return 0;
193 }
194 
209 {
210  nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
211  nbgl_container_t *container;
212  uint8_t space;
213 
214  LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutAddHiddenDigits():\n");
215  if (layout == NULL) {
216  return -1;
217  }
218  if (nbDigits > KEYPAD_MAX_DIGITS) {
219  return -1;
220  }
221  if (nbDigits > 8) {
222  space = 4;
223  }
224  else {
225  space = 12;
226  }
227 
228  // create a container, invisible or bordered
229  container = (nbgl_container_t *) nbgl_objPoolGet(CONTAINER, layoutInt->layer);
230  container->nbChildren = nbDigits;
231 #ifdef TARGET_STAX
232  container->nbChildren++; // +1 for the line
233 #endif // TARGET_STAX
234  container->children = nbgl_containerPoolGet(container->nbChildren, layoutInt->layer);
235  // <space> pixels between each icon (knowing that the effective round are 18px large and the
236  // icon 24px)
237  container->obj.area.width = nbDigits * DIGIT_ICON.width + (nbDigits - 1) * space;
238 #ifdef TARGET_STAX
239  container->obj.area.height = 50;
240 #else // TARGET_STAX
241  container->obj.area.height = 64;
242 #endif // TARGET_STAX
243 
244  // item N-2 is the title
245  container->obj.alignTo = layoutInt->container->children[layoutInt->container->nbChildren - 2];
246  container->obj.alignment = BOTTOM_MIDDLE;
247 
248  // set this new container as child of the main container
249  layoutAddObject(layoutInt, (nbgl_obj_t *) container);
250 
251  // create children of the container, as images (empty circles)
252  nbgl_objPoolGetArray(IMAGE, nbDigits, layoutInt->layer, (nbgl_obj_t **) container->children);
253  for (int i = 0; i < nbDigits; i++) {
254  nbgl_image_t *image = (nbgl_image_t *) container->children[i];
255  image->buffer = &DIGIT_ICON;
256  image->foregroundColor = WHITE;
257  if (i > 0) {
258  image->obj.alignment = MID_RIGHT;
259  image->obj.alignTo = (nbgl_obj_t *) container->children[i - 1];
260  image->obj.alignmentMarginX = space;
261  }
262  else {
263  image->obj.alignment = MID_LEFT;
264  }
265  }
266 #ifdef TARGET_STAX
267  nbgl_line_t *line;
268  // create gray line
269  line = (nbgl_line_t *) nbgl_objPoolGet(LINE, layoutInt->layer);
270  line->lineColor = LIGHT_GRAY;
271  line->obj.alignmentMarginY = 0;
272  line->obj.alignTo = NULL;
273  line->obj.alignment = BOTTOM_MIDDLE;
274  line->obj.area.width = container->obj.area.width;
275  line->obj.area.height = 4;
276  line->direction = HORIZONTAL;
277  line->thickness = 2;
278  line->offset = 2;
279  container->children[nbDigits] = (nbgl_obj_t *) line;
280 #endif // TARGET_STAX
281 
282  // return index of keypad to be modified later on
283  return (layoutInt->container->nbChildren - 1);
284 }
285 
296 {
297  nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
298  nbgl_container_t *container;
299  nbgl_image_t *image;
300 
301  LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutUpdateHiddenDigits(): nbActive = %d\n", nbActive);
302  if (layout == NULL) {
303  return -1;
304  }
305 
306  // get container
307  container = (nbgl_container_t *) layoutInt->container->children[index];
308  // sanity check
309  if ((container == NULL) || (container->obj.type != CONTAINER)) {
310  return -1;
311  }
312  if (nbActive > container->nbChildren) {
313  return -1;
314  }
315  if (nbActive == 0) {
316  // deactivate the first digit
317  image = (nbgl_image_t *) container->children[0];
318  if ((image == NULL) || (image->obj.type != IMAGE)) {
319  return -1;
320  }
321  image->foregroundColor = WHITE;
322  }
323  else {
324  image = (nbgl_image_t *) container->children[nbActive - 1];
325  if ((image == NULL) || (image->obj.type != IMAGE)) {
326  return -1;
327  }
328  // if the last "active" is already active, it means that we are decreasing the number of
329  // active otherwise we are increasing it
330  if (image->foregroundColor == BLACK) {
331  // all digits are already active
332  if (nbActive == container->nbChildren) {
333  return 0;
334  }
335  // deactivate the next digit
336  image = (nbgl_image_t *) container->children[nbActive];
337  image->foregroundColor = WHITE;
338  }
339  else {
340  image->buffer = &DIGIT_ICON;
341  image->foregroundColor = BLACK;
342  }
343  }
344 
345  nbgl_objDraw((nbgl_obj_t *) image);
346 
347  return 0;
348 }
349 
367  const char *title,
368  bool hidden,
369  uint8_t nbDigits,
370  const char *text)
371 {
372  nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
373  nbgl_container_t *container;
374  nbgl_text_area_t *textArea;
375 
376  LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutAddKeypadContent():\n");
377  if (layout == NULL) {
378  return -1;
379  }
380  // create a container, to store both title and "digits" (and line on Stax)
381  container = (nbgl_container_t *) nbgl_objPoolGet(CONTAINER, layoutInt->layer);
382  container->nbChildren = NB_CHILDREN;
383  container->children = nbgl_containerPoolGet(container->nbChildren, layoutInt->layer);
384  container->obj.area.width = AVAILABLE_WIDTH;
385  container->obj.alignment = TOP_MIDDLE;
386  container->obj.alignmentMarginY = 8;
387 
388  // create text area for title
389  textArea = (nbgl_text_area_t *) nbgl_objPoolGet(TEXT_AREA, layoutInt->layer);
390  textArea->textColor = BLACK;
391  textArea->text = title;
392  textArea->textAlignment = CENTER;
393  textArea->fontId = SMALL_REGULAR_FONT;
394  textArea->wrapping = true;
395  textArea->obj.alignment = TOP_MIDDLE;
396  textArea->obj.area.width = AVAILABLE_WIDTH;
397  textArea->obj.area.height = nbgl_getTextHeightInWidth(
398  textArea->fontId, textArea->text, textArea->obj.area.width, textArea->wrapping);
399  container->children[TITLE_INDEX] = (nbgl_obj_t *) textArea;
400  container->obj.area.height += textArea->obj.area.height;
401 
402  if (hidden) {
403  nbgl_container_t *digitsContainer;
404  uint8_t space;
405 
406  if (nbDigits > KEYPAD_MAX_DIGITS) {
407  return -1;
408  }
409  // space between "digits"
410  if (nbDigits > 8) {
411  space = 4;
412  }
413  else {
414 #ifdef TARGET_STAX
415  space = 10;
416 #else // TARGET_STAX
417  space = 12;
418 #endif // TARGET_STAX
419  }
420 
421  // create digits container, to store "discs"
422  digitsContainer = (nbgl_container_t *) nbgl_objPoolGet(CONTAINER, layoutInt->layer);
423  digitsContainer->nbChildren = nbDigits;
424  digitsContainer->children
425  = nbgl_containerPoolGet(digitsContainer->nbChildren, layoutInt->layer);
426  // <space> pixels between each icon (knowing that the effective round are 18px large and the
427  // icon 24px)
428  digitsContainer->obj.area.width = nbDigits * DIGIT_ICON.width + (nbDigits - 1) * space;
429 #ifdef TARGET_STAX
430  digitsContainer->obj.area.height = 44;
431 #else // TARGET_STAX
432  digitsContainer->obj.area.height = 64;
433 #endif // TARGET_STAX
434  // align at the bottom of title
435  digitsContainer->obj.alignTo = container->children[0];
436  digitsContainer->obj.alignment = BOTTOM_MIDDLE;
437 #ifdef TARGET_STAX
438  digitsContainer->obj.alignmentMarginY = 28;
439 #endif // TARGET_STAX
440  container->children[INPUT_INDEX] = (nbgl_obj_t *) digitsContainer;
441  container->obj.area.height += digitsContainer->obj.area.height;
442 
443  // create children of the container, as images (empty circles)
445  IMAGE, nbDigits, layoutInt->layer, (nbgl_obj_t **) digitsContainer->children);
446  for (int i = 0; i < nbDigits; i++) {
447  nbgl_image_t *image = (nbgl_image_t *) digitsContainer->children[i];
448  image->buffer = &DIGIT_ICON;
449  image->foregroundColor = WHITE;
450  if (i > 0) {
451  image->obj.alignment = MID_RIGHT;
452  image->obj.alignTo = (nbgl_obj_t *) digitsContainer->children[i - 1];
453  image->obj.alignmentMarginX = space;
454  }
455  else {
456  image->obj.alignment = MID_LEFT;
457  }
458  }
459  }
460  else {
461  // create text area
462  textArea = (nbgl_text_area_t *) nbgl_objPoolGet(TEXT_AREA, layoutInt->layer);
463  textArea->textColor = BLACK;
464  textArea->text = text;
465  textArea->textAlignment = MID_LEFT;
466  textArea->fontId = LARGE_MEDIUM_1BPP_FONT;
467  textArea->obj.area.width = container->obj.area.width;
468  textArea->obj.area.height = nbgl_getFontLineHeight(textArea->fontId);
469  textArea->autoHideLongLine = true;
470  // align at the bottom of title
471  textArea->obj.alignTo = container->children[TITLE_INDEX];
472  textArea->obj.alignment = BOTTOM_MIDDLE;
473 #ifdef TARGET_STAX
474  textArea->obj.alignmentMarginY = 24;
475 #endif // TARGET_STAX
476  container->children[INPUT_INDEX] = (nbgl_obj_t *) textArea;
477  container->obj.area.height += textArea->obj.area.height;
478  }
479 
480  // set this new container as child of the main container
481  layoutAddObject(layoutInt, (nbgl_obj_t *) container);
482 #ifdef TARGET_STAX
483  nbgl_line_t *line;
484  // create gray line
485  line = (nbgl_line_t *) nbgl_objPoolGet(LINE, layoutInt->layer);
486  line->lineColor = LIGHT_GRAY;
487  line->obj.alignTo = container->children[INPUT_INDEX];
488  line->obj.alignment = BOTTOM_MIDDLE;
489  line->obj.area.width = 288;
490  line->obj.area.height = 4;
491  line->direction = HORIZONTAL;
492  line->thickness = 2;
493  line->offset = 2;
494  container->children[LINE_INDEX] = (nbgl_obj_t *) line;
495 #endif // TARGET_STAX
496 
497  // return height of the area
498  return container->obj.area.height;
499 }
500 
514  bool hidden,
515  uint8_t nbActiveDigits,
516  const char *text)
517 {
518  nbgl_layoutInternal_t *layoutInt = (nbgl_layoutInternal_t *) layout;
519  nbgl_container_t *container;
520  nbgl_image_t *image;
521 
522  LOG_DEBUG(LAYOUT_LOGGER, "nbgl_layoutUpdateHiddenDigits(): nbActive = %d\n", nbActiveDigits);
523  if (layout == NULL) {
524  return -1;
525  }
526 
527  UNUSED(index);
528 
529  if (hidden) {
530  // get digits container (second child of the main container)
531  container = (nbgl_container_t *) ((nbgl_container_t *) layoutInt->container->children[0])
532  ->children[1];
533  // sanity check
534  if ((container == NULL) || (container->obj.type != CONTAINER)) {
535  return -1;
536  }
537  if (nbActiveDigits > container->nbChildren) {
538  return -1;
539  }
540  if (nbActiveDigits == 0) {
541  // deactivate the first digit
542  image = (nbgl_image_t *) container->children[0];
543  if ((image == NULL) || (image->obj.type != IMAGE)) {
544  return -1;
545  }
546  image->foregroundColor = WHITE;
547  }
548  else {
549  image = (nbgl_image_t *) container->children[nbActiveDigits - 1];
550  if ((image == NULL) || (image->obj.type != IMAGE)) {
551  return -1;
552  }
553  // if the last "active" is already active, it means that we are decreasing the number of
554  // active otherwise we are increasing it
555  if (image->foregroundColor == BLACK) {
556  // all digits are already active
557  if (nbActiveDigits == container->nbChildren) {
558  return 0;
559  }
560  // deactivate the next digit by turning it to white
561  image = (nbgl_image_t *) container->children[nbActiveDigits];
562  image->foregroundColor = WHITE;
563  }
564  else {
565  // activate it the last digit by turning it to black
566  image->foregroundColor = BLACK;
567  }
568  }
569 
570  nbgl_objDraw((nbgl_obj_t *) image);
571  }
572  else {
573  // update main text area (second child of the main container)
574  nbgl_text_area_t *textArea
575  = (nbgl_text_area_t *) ((nbgl_container_t *) layoutInt->container->children[0])
576  ->children[1];
577  if ((textArea == NULL) || (textArea->obj.type != TEXT_AREA)) {
578  return -1;
579  }
580  textArea->text = text;
581  textArea->textColor = BLACK;
582  textArea->textAlignment = MID_LEFT;
583  nbgl_objDraw((nbgl_obj_t *) textArea);
584 
585  // if the text doesn't fit, indicate it by returning 1 instead of 0, for different refresh
586  if (nbgl_getSingleLineTextWidth(textArea->fontId, text) > textArea->obj.area.width) {
587  return 1;
588  }
589  }
590 
591  return 0;
592 }
593 #endif // NBGL_KEYPAD
594 #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:326
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.
Definition: nbgl_fonts.c:1040
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:402
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
Definition: nbgl_layout.c:584
#define AVAILABLE_WIDTH
Definition: nbgl_layout.h:66
void * nbgl_layout_t
type shared externally
Definition: nbgl_layout.h:96
Internal functions/constants of NBGL layout layer.
@ FOOTER_INDEX
#define KEYPAD_FOOTER_TYPE
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.
#define DIGIT_ICON
@ LINE_INDEX
@ INPUT_INDEX
@ NB_CHILDREN
@ TITLE_INDEX
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:1522
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)
#define KEYPAD_MAX_DIGITS
Definition: nbgl_obj.h:59
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)....
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.
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:466
struct PACKED__ nbgl_container_s nbgl_container_t
struct to represent a container (CONTAINER type)
#define KEYPAD_KEY_HEIGHT
Definition: nbgl_obj.h:55
struct PACKED__ nbgl_obj_s nbgl_obj_t
Common structure for all graphical objects.
API to manage screens.
@ WHITE
Definition: nbgl_types.h:105
@ LIGHT_GRAY
Definition: nbgl_types.h:104
@ BLACK
Definition: nbgl_types.h:102
#define SCREEN_WIDTH
Definition: nbgl_types.h:32
@ VERTICAL
from top to bottom
Definition: nbgl_types.h:170
@ HORIZONTAL
from left to right
Definition: nbgl_types.h:171
@ TOP_MIDDLE
Definition: nbgl_types.h:143
@ CENTER
Definition: nbgl_types.h:146
@ MID_RIGHT
Definition: nbgl_types.h:147
@ MID_LEFT
Definition: nbgl_types.h:145
@ BOTTOM_MIDDLE
Definition: nbgl_types.h:149
@ KEYPAD
Keypad.
Definition: nbgl_types.h:128
@ IMAGE
Bitmap (y and height must be multiple of 4 on Stax)
Definition: nbgl_types.h:118
@ LINE
Vertical or Horizontal line.
Definition: nbgl_types.h:119
@ CONTAINER
Empty container.
Definition: nbgl_types.h:117
@ TEXT_AREA
Area to contain text line(s)
Definition: nbgl_types.h:120
Structure containing all information about the current layout.
nbgl_container_t * footerContainer
container used to store footer (buttons, nav....)
nbgl_container_t * container
nbgl_layoutFooterType_t footerType
type of footer
nbgl_obj_t ** children
children for main screen
unsigned char uint8_t
Definition: usbd_conf.h:53