Embedded SDK
Embedded SDK
Classes | Macros | Typedefs | Enumerations | Functions
nbgl_layout.h File Reference

API of the Advanced BOLOS Graphical Library, for predefined layouts. More...

#include "nbgl_obj.h"
#include "nbgl_screen.h"
#include "nbgl_types.h"
#include "nbgl_content.h"
Include dependency graph for nbgl_layout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nbgl_layoutNavigationBar_t
 This structure contains info to build a navigation bar at the bottom of the screen. More...
 
struct  nbgl_layoutNavigation_t
 This structure contains info to build a navigation bar at the bottom of the screen. More...
 
struct  nbgl_layoutDescription_s
 Structure containing all information when creating a layout. This structure must be passed as argument to nbgl_layoutGet. More...
 
struct  nbgl_layoutBar_t
 This structure contains info to build a clickable "bar" with a text and an icon. More...
 
struct  nbgl_layoutMenuList_t
 This structure contains a list of names to build a menu list on Nanos, with for each item a description (names array) More...
 
struct  nbgl_layoutQRCode_t
 This structure contains info to build a centered (vertically and horizontally) area, with a QR Code, a possible text (black, bold) under it, and a possible sub-text (black, regular) under it. More...
 
struct  nbgl_layoutChoiceButtons_t
 This structure contains info to build a pair of buttons, one on top of the other. More...
 
struct  nbgl_layoutHorizontalButtons_t
 This structure contains info to build a pair of buttons, the small one, with icon, on the left of the other. More...
 
struct  nbgl_layoutButton_t
 This structure contains info to build a single button. More...
 
struct  nbgl_layoutSuggestionButtons_t
 This structure contains info to build suggestion buttons. More...
 
struct  nbgl_layoutConfirmationButton_t
 This structure contains info to build a confirmation button. More...
 
struct  nbgl_layoutKeyboardContent_t
 This structure contains info to build a keyboard content (controls that are linked to keyboard) More...
 
struct  nbgl_layoutHeader_t
 This structure contains info to build a header. More...
 
struct  nbgl_layoutFooter_t
 This structure contains info to build an extended footer. More...
 
struct  nbgl_layoutUpFooter_t
 This structure contains info to build an up-footer (area on top of footer). More...
 
struct  nbgl_layoutProgressBar_t
 This structure contains info to build a progress bar with info. The progress bar itself is 120px width * 12px height. More...
 
struct  nbgl_layoutKbd_t
 This structure contains info to build a keyboard with nbgl_layoutAddKeyboard() More...
 

Macros

#define NBGL_NO_TUNE   NB_TUNES
 
#define NBGL_NO_PROGRESS_INDICATOR   0xFF
 To be used when a control token shall not be used. More...
 
#define NBGL_INVALID_TOKEN   0xFF
 
#define EXIT_PAGE   0xFF
 
#define NB_MAX_SUGGESTION_BUTTONS   8
 
#define NB_MAX_VISIBLE_SUGGESTION_BUTTONS   2
 
#define TOUCHABLE_HEADER_BAR_HEIGHT   96
 
#define TOUCHABLE_MAIN_BAR_HEIGHT   100
 
#define TOUCHABLE_BAR_HEIGHT   92
 
#define SMALL_FOOTER_HEIGHT   96
 
#define SIMPLE_FOOTER_HEIGHT   96
 
#define SMALL_CENTERING_HEADER   40
 
#define MEDIUM_CENTERING_HEADER   64
 
#define LONG_PRESS_BUTTON_HEIGHT   152
 
#define AVAILABLE_WIDTH   (SCREEN_WIDTH - 2 * BORDER_MARGIN)
 
#define NB_MAX_LINES   NB_MAX_LINES_IN_DETAILS
 
#define PRE_TEXT_MARGIN   28
 
#define TEXT_SUBTEXT_MARGIN   14
 
#define POST_SUBTEXT_MARGIN   26
 
#define BOTH_ROUNDED_STYLE   SOFT_ACTION_AND_FOOTER_STYLE
 

Typedefs

typedef void * nbgl_layout_t
 type shared externally More...
 
typedef void(* nbgl_layoutTouchCallback_t) (int token, uint8_t index)
 prototype of function to be called when an object is touched More...
 
typedef void(* nbgl_layoutButtonCallback_t) (nbgl_layout_t *layout, nbgl_buttonEvent_t event)
 prototype of function to be called when buttons are touched on a screen More...
 
typedef struct nbgl_layoutDescription_s nbgl_layoutDescription_t
 Structure containing all information when creating a layout. This structure must be passed as argument to nbgl_layoutGet. More...
 
typedef nbgl_contentSwitch_t nbgl_layoutSwitch_t
 Deprecated, kept for retro compatibility. More...
 
typedef nbgl_contentRadioChoice_t nbgl_layoutRadioChoice_t
 Deprecated, kept for retro compatibility. More...
 
typedef const char *(* nbgl_menuListCallback_t) (uint8_t choiceIndex)
 prototype of menu list item retrieval callback More...
 
typedef nbgl_contentTagValue_t nbgl_layoutTagValue_t
 Deprecated, kept for retro compatibility. More...
 
typedef nbgl_contentTagValueList_t nbgl_layoutTagValueList_t
 Deprecated, kept for retro compatibility. More...
 
typedef nbgl_contentCenteredInfo_t nbgl_layoutCenteredInfo_t
 Deprecated, kept for retro compatibility. More...
 

Enumerations

enum  nbgl_layoutNavDirection_t { HORIZONTAL_NAV , VERTICAL_NAV }
 possible directions for Navigation arrows More...
 
enum  nbgl_layoutNavIndication_t { NO_ARROWS = 0 , LEFT_ARROW , RIGHT_ARROW }
 possible styles for Navigation arrows (it's a bit field) More...
 
enum  nbgl_layoutChoiceButtonsStyle_t { ROUNDED_AND_FOOTER_STYLE = 0 , STRONG_ACTION_AND_FOOTER_STYLE , SOFT_ACTION_AND_FOOTER_STYLE }
 The different styles for a pair of buttons. More...
 
enum  nbgl_layoutButtonStyle_t { BLACK_BACKGROUND = 0 , WHITE_BACKGROUND , NO_BORDER , LONG_PRESS }
 The different styles for a button. More...
 
enum  nbgl_layoutKeyboardContentType_t { KEYBOARD_WITH_SUGGESTIONS , KEYBOARD_WITH_BUTTON , NB_KEYBOARD_CONTENT_TYPES }
 The different types of keyboard contents. More...
 
enum  nbgl_layoutHeaderType_t {
  HEADER_EMPTY = 0 , HEADER_BACK_AND_TEXT , HEADER_BACK_AND_PROGRESS , HEADER_TITLE ,
  HEADER_EXTENDED_BACK , HEADER_RIGHT_TEXT , NB_HEADER_TYPES
}
 The different types of extended header. More...
 
enum  nbgl_layoutFooterType_t {
  FOOTER_EMPTY = 0 , FOOTER_SIMPLE_TEXT , FOOTER_DOUBLE_TEXT , FOOTER_TEXT_AND_NAV ,
  FOOTER_NAV , FOOTER_SIMPLE_BUTTON , FOOTER_CHOICE_BUTTONS , NB_FOOTER_TYPES
}
 The different types of extended footer. More...
 
enum  nbgl_layoutUpFooterType_t {
  UP_FOOTER_LONG_PRESS = 0 , UP_FOOTER_BUTTON , UP_FOOTER_HORIZONTAL_BUTTONS , UP_FOOTER_TIP_BOX ,
  UP_FOOTER_TEXT , NB_UP_FOOTER_TYPES
}
 The different types of area on top of footer. More...
 

Functions

nbgl_layout_tnbgl_layoutGet (const nbgl_layoutDescription_t *description)
 returns a layout of the given type. The layout is reset More...
 
int nbgl_layoutAddCenteredInfo (nbgl_layout_t *layout, const nbgl_layoutCenteredInfo_t *info)
 Creates an area on the center of the main panel, with a possible icon/image, a possible text in black under it, and a possible text in gray under it. More...
 
int nbgl_layoutAddContentCenter (nbgl_layout_t *layout, const nbgl_contentCenter_t *info)
 Creates an area on the center of the main panel, with a possible icon, and possible texts under it. More...
 
int nbgl_layoutAddProgressBar (nbgl_layout_t *layout, const nbgl_layoutProgressBar_t *barLayout)
 Creates an area in main panel to display a progress bar, with a title text and a description under the progress. More...
 
int nbgl_layoutAddTopRightButton (nbgl_layout_t *layout, const nbgl_icon_details_t *icon, uint8_t token, tune_index_e tuneId)
 Creates a Top-right button in the top right corner of the top panel. More...
 
int nbgl_layoutAddTouchableBar (nbgl_layout_t *layout, const nbgl_layoutBar_t *barLayout)
 Creates a touchable bar in main panel. More...
 
int nbgl_layoutAddSwitch (nbgl_layout_t *layout, const nbgl_layoutSwitch_t *switchLayout)
 Creates a switch with the given text and its state. More...
 
int nbgl_layoutAddText (nbgl_layout_t *layout, const char *text, const char *subText)
 Creates an area with given text and sub text (in gray) More...
 
int nbgl_layoutAddSubHeaderText (nbgl_layout_t *layout, const char *text)
 Creates an area with given text in small regular font, under the header. More...
 
int nbgl_layoutAddRadioChoice (nbgl_layout_t *layout, const nbgl_layoutRadioChoice_t *choices)
 Creates a list of radio buttons (on the right) More...
 
int nbgl_layoutAddQRCode (nbgl_layout_t *layout, const nbgl_layoutQRCode_t *info)
 Creates an area on the center of the main panel, with a QRCode, a possible text in black (bold) under it, and a possible text in black under it. More...
 
int nbgl_layoutAddChoiceButtons (nbgl_layout_t *layout, const nbgl_layoutChoiceButtons_t *info)
 Creates two buttons to make a choice. Both buttons are mandatory. Both buttons are full width, one under the other. More...
 
int nbgl_layoutAddHorizontalButtons (nbgl_layout_t *layout, const nbgl_layoutHorizontalButtons_t *info)
 Creates two buttons to make a choice. Both buttons are mandatory The left one contains only an icon and is round, the other contains only a text. More...
 
int nbgl_layoutAddTagValueList (nbgl_layout_t *layout, const nbgl_layoutTagValueList_t *list)
 Creates a list of [tag,value] pairs. More...
 
int nbgl_layoutAddLargeCaseText (nbgl_layout_t *layout, const char *text)
 Creates an area with given text in 32px font (in Black) More...
 
int nbgl_layoutAddTextContent (nbgl_layout_t *layout, const char *title, const char *description, const char *info)
 Creates in the main container three text areas: More...
 
int nbgl_layoutAddSeparationLine (nbgl_layout_t *layout)
 adds a separation line on bottom of the last added item More...
 
int nbgl_layoutAddButton (nbgl_layout_t *layout, const nbgl_layoutButton_t *buttonInfo)
 Creates a rounded button in the main container. More...
 
int nbgl_layoutAddLongPressButton (nbgl_layout_t *layout, const char *text, uint8_t token, tune_index_e tuneId)
 Creates a long press button in the main container. More...
 
int nbgl_layoutAddFooter (nbgl_layout_t *layout, const char *text, uint8_t token, tune_index_e tuneId)
 Creates a touchable text at the footer of the screen, separated with a thin line from the rest of the screen. More...
 
int nbgl_layoutAddSplitFooter (nbgl_layout_t *layout, const char *leftText, uint8_t leftToken, const char *rightText, uint8_t rightToken, tune_index_e tuneId)
 Creates 2 touchable texts at the footer of the screen, separated with a thin line from the rest of the screen, and from each other. More...
 
int nbgl_layoutAddHeader (nbgl_layout_t *layout, const nbgl_layoutHeader_t *headerDesc)
 Creates a touchable (or not) area at the header of the screen, containing various controls, described in the given structure. This header is not part of the main container. More...
 
int nbgl_layoutAddExtendedFooter (nbgl_layout_t *layout, const nbgl_layoutFooter_t *footerDesc)
 Creates a touchable area at the footer of the screen, containing various controls, described in the given structure. This footer is not part of the main container. More...
 
int nbgl_layoutAddUpFooter (nbgl_layout_t *layout, const nbgl_layoutUpFooter_t *upFooterDesc)
 Creates a touchable area on top of the footer of the screen, containing various controls, described in the given structure. This up-footer is not part of the main container. More...
 
int nbgl_layoutAddNavigationBar (nbgl_layout_t *layout, const nbgl_layoutNavigationBar_t *info)
 Creates a navigation bar on bottom of main container. More...
 
int nbgl_layoutAddBottomButton (nbgl_layout_t *layout, const nbgl_icon_details_t *icon, uint8_t token, bool separationLine, tune_index_e tuneId)
 Creates a centered button at bottom of main container. More...
 
int nbgl_layoutAddProgressIndicator (nbgl_layout_t *layout, uint8_t activePage, uint8_t nbPages, bool withBack, uint8_t backToken, tune_index_e tuneId)
 Creates a kind of navigation bar with an optional <- arrow on the left. This widget is placed on top of the main container. More...
 
int nbgl_layoutAddSpinner (nbgl_layout_t *layout, const char *text, bool fixed)
 Creates a centered (vertically & horizontally) spinner with a text under it. More...
 
int nbgl_layoutAddSwipe (nbgl_layout_t *layout, uint16_t swipesMask, const char *text, uint8_t token, tune_index_e tuneId)
 Creates a swipe interaction on the main container. More...
 
int nbgl_layoutAddKeyboard (nbgl_layout_t *layout, const nbgl_layoutKbd_t *kbdInfo)
 Creates a keyboard on bottom of the screen, with the given configuration. More...
 
int nbgl_layoutUpdateKeyboard (nbgl_layout_t *layout, uint8_t index, uint32_t keyMask, bool updateCasing, keyboardCase_t casing)
 Updates an existing keyboard on bottom of the screen, with the given configuration. More...
 
bool nbgl_layoutKeyboardNeedsRefresh (nbgl_layout_t *layout, uint8_t index)
 function called to know whether the keyboard has been redrawn and needs a refresh More...
 
DEPRECATED int nbgl_layoutAddSuggestionButtons (nbgl_layout_t *layout, uint8_t nbUsedButtons, const char *buttonTexts[NB_MAX_SUGGESTION_BUTTONS], int firstButtonToken, tune_index_e tuneId)
 Adds up to 4 black suggestion buttons under the previously added object. More...
 
DEPRECATED int nbgl_layoutUpdateSuggestionButtons (nbgl_layout_t *layout, uint8_t index, uint8_t nbUsedButtons, const char *buttonTexts[NB_MAX_SUGGESTION_BUTTONS])
 Updates the number and/or the text suggestion buttons created with nbgl_layoutAddSuggestionButtons() More...
 
DEPRECATED int nbgl_layoutAddEnteredText (nbgl_layout_t *layout, bool numbered, uint8_t number, const char *text, bool grayedOut, int offsetY, int token)
 Adds a "text entry" area under the previously entered object. This area can be preceded (beginning of line) by an index, indicating for example the entered world. A vertical gray line is placed under the text. This text must be vertical placed in the screen with offsetY. More...
 
DEPRECATED int nbgl_layoutUpdateEnteredText (nbgl_layout_t *layout, uint8_t index, bool numbered, uint8_t number, const char *text, bool grayedOut)
 Updates an existing "text entry" area, created with nbgl_layoutAddEnteredText() More...
 
DEPRECATED int nbgl_layoutAddConfirmationButton (nbgl_layout_t *layout, bool active, const char *text, int token, tune_index_e tuneId)
 Adds a black full width confirmation button on top of the previously added keyboard. More...
 
DEPRECATED int nbgl_layoutUpdateConfirmationButton (nbgl_layout_t *layout, uint8_t index, bool active, const char *text)
 Updates an existing black full width confirmation button on top of the previously added keyboard. More...
 
int nbgl_layoutAddKeyboardContent (nbgl_layout_t *layout, nbgl_layoutKeyboardContent_t *content)
 Adds an area containing a potential title, a text entry and either confirmation or suggestion buttons, on top of the keyboard. More...
 
int nbgl_layoutUpdateKeyboardContent (nbgl_layout_t *layout, nbgl_layoutKeyboardContent_t *content)
 Updates an area containing a potential title, a text entry and either confirmation or suggestion buttons, on top of the keyboard This area must have been built with nbgl_layoutAddKeyboardContent, and the type must not change. More...
 
int nbgl_layoutAddKeypad (nbgl_layout_t *layout, keyboardCallback_t callback, bool shuffled)
 Adds a keypad on bottom of the screen, with the associated callback. More...
 
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. More...
 
DEPRECATED 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, as full circles The placeholder is "underligned" with a thin horizontal line of the expected full length. More...
 
DEPRECATED int nbgl_layoutUpdateHiddenDigits (nbgl_layout_t *layout, uint8_t index, uint8_t nbActive)
 Updates an existing set of hidden digits, with the given configuration. More...
 
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 entered digits as small discs. On Stax, the placeholder is "underligned" with a thin horizontal line of the expected full length. More...
 
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. More...
 
int nbgl_layoutDraw (nbgl_layout_t *layout)
 Applies given layout. The screen will be redrawn. More...
 
int nbgl_layoutRelease (nbgl_layout_t *layout)
 Release the layout obtained with nbgl_layoutGet() More...
 

Detailed Description

API of the Advanced BOLOS Graphical Library, for predefined layouts.

Definition in file nbgl_layout.h.

Macro Definition Documentation

◆ AVAILABLE_WIDTH

#define AVAILABLE_WIDTH   (SCREEN_WIDTH - 2 * BORDER_MARGIN)

Definition at line 66 of file nbgl_layout.h.

◆ BOTH_ROUNDED_STYLE

#define BOTH_ROUNDED_STYLE   SOFT_ACTION_AND_FOOTER_STYLE

Definition at line 286 of file nbgl_layout.h.

◆ EXIT_PAGE

#define EXIT_PAGE   0xFF

Definition at line 38 of file nbgl_layout.h.

◆ LONG_PRESS_BUTTON_HEIGHT

#define LONG_PRESS_BUTTON_HEIGHT   152

Definition at line 63 of file nbgl_layout.h.

◆ MEDIUM_CENTERING_HEADER

#define MEDIUM_CENTERING_HEADER   64

Definition at line 62 of file nbgl_layout.h.

◆ NB_MAX_LINES

#define NB_MAX_LINES   NB_MAX_LINES_IN_DETAILS

Definition at line 68 of file nbgl_layout.h.

◆ NB_MAX_SUGGESTION_BUTTONS

#define NB_MAX_SUGGESTION_BUTTONS   8

Definition at line 53 of file nbgl_layout.h.

◆ NB_MAX_VISIBLE_SUGGESTION_BUTTONS

#define NB_MAX_VISIBLE_SUGGESTION_BUTTONS   2

Definition at line 55 of file nbgl_layout.h.

◆ NBGL_INVALID_TOKEN

#define NBGL_INVALID_TOKEN   0xFF

special code used as index of action callback to inform when Exit key (X) is pressed in the navigation bar

Definition at line 37 of file nbgl_layout.h.

◆ NBGL_NO_PROGRESS_INDICATOR

#define NBGL_NO_PROGRESS_INDICATOR   0xFF

To be used when a control token shall not be used.

Definition at line 32 of file nbgl_layout.h.

◆ NBGL_NO_TUNE

#define NBGL_NO_TUNE   NB_TUNES

Definition at line 29 of file nbgl_layout.h.

◆ POST_SUBTEXT_MARGIN

#define POST_SUBTEXT_MARGIN   26

Definition at line 77 of file nbgl_layout.h.

◆ PRE_TEXT_MARGIN

#define PRE_TEXT_MARGIN   28

Definition at line 75 of file nbgl_layout.h.

◆ SIMPLE_FOOTER_HEIGHT

#define SIMPLE_FOOTER_HEIGHT   96

Definition at line 60 of file nbgl_layout.h.

◆ SMALL_CENTERING_HEADER

#define SMALL_CENTERING_HEADER   40

Definition at line 61 of file nbgl_layout.h.

◆ SMALL_FOOTER_HEIGHT

#define SMALL_FOOTER_HEIGHT   96

Definition at line 59 of file nbgl_layout.h.

◆ TEXT_SUBTEXT_MARGIN

#define TEXT_SUBTEXT_MARGIN   14

Definition at line 76 of file nbgl_layout.h.

◆ TOUCHABLE_BAR_HEIGHT

#define TOUCHABLE_BAR_HEIGHT   92

Definition at line 58 of file nbgl_layout.h.

◆ TOUCHABLE_HEADER_BAR_HEIGHT

#define TOUCHABLE_HEADER_BAR_HEIGHT   96

Definition at line 56 of file nbgl_layout.h.

◆ TOUCHABLE_MAIN_BAR_HEIGHT

#define TOUCHABLE_MAIN_BAR_HEIGHT   100

Definition at line 57 of file nbgl_layout.h.

Typedef Documentation

◆ nbgl_layout_t

typedef void* nbgl_layout_t

type shared externally

Definition at line 96 of file nbgl_layout.h.

◆ nbgl_layoutButtonCallback_t

typedef void(* nbgl_layoutButtonCallback_t) (nbgl_layout_t *layout, nbgl_buttonEvent_t event)

prototype of function to be called when buttons are touched on a screen

Parameters
layoutlayout concerned by the event
eventtype of button event

Definition at line 111 of file nbgl_layout.h.

◆ nbgl_layoutCenteredInfo_t

Deprecated, kept for retro compatibility.

Definition at line 256 of file nbgl_layout.h.

◆ nbgl_layoutDescription_t

Structure containing all information when creating a layout. This structure must be passed as argument to nbgl_layoutGet.

Note
It shall not be used

◆ nbgl_layoutRadioChoice_t

Deprecated, kept for retro compatibility.

Definition at line 222 of file nbgl_layout.h.

◆ nbgl_layoutSwitch_t

Deprecated, kept for retro compatibility.

Definition at line 217 of file nbgl_layout.h.

◆ nbgl_layoutTagValue_t

Deprecated, kept for retro compatibility.

Definition at line 245 of file nbgl_layout.h.

◆ nbgl_layoutTagValueList_t

Deprecated, kept for retro compatibility.

Definition at line 250 of file nbgl_layout.h.

◆ nbgl_layoutTouchCallback_t

typedef void(* nbgl_layoutTouchCallback_t) (int token, uint8_t index)

prototype of function to be called when an object is touched

Parameters
tokeninteger passed when registering callback
indexwhen the object touched is a list of radio buttons, gives the index of the activated button

Definition at line 104 of file nbgl_layout.h.

◆ nbgl_menuListCallback_t

typedef const char*(* nbgl_menuListCallback_t) (uint8_t choiceIndex)

prototype of menu list item retrieval callback

Parameters
choiceIndexindex of the menu list item to retrieve (from 0 (to nbChoices-1))
Returns
a pointer on a string

Definition at line 229 of file nbgl_layout.h.

Enumeration Type Documentation

◆ nbgl_layoutButtonStyle_t

The different styles for a button.

Enumerator
BLACK_BACKGROUND 

rounded bordered button, with text/icon in white, on black background

WHITE_BACKGROUND 

rounded bordered button, with text/icon in black, on white background

NO_BORDER 

simple clickable text, in black

LONG_PRESS 

long press button, with progress indicator

Definition at line 324 of file nbgl_layout.h.

◆ nbgl_layoutChoiceButtonsStyle_t

The different styles for a pair of buttons.

Enumerator
ROUNDED_AND_FOOTER_STYLE 

A black background button on top of a footer.

STRONG_ACTION_AND_FOOTER_STYLE 

A black button on top of a footer, with a separation line.

SOFT_ACTION_AND_FOOTER_STYLE 

A white button on top of a footer, with a separation line.

Definition at line 279 of file nbgl_layout.h.

◆ nbgl_layoutFooterType_t

The different types of extended footer.

Enumerator
FOOTER_EMPTY 

empty space, to have a better vertical centering of centered info

FOOTER_SIMPLE_TEXT 

simple touchable text in bold

FOOTER_DOUBLE_TEXT 

2 touchable texts in bold, separated by a vertical line (only on Stax)

FOOTER_TEXT_AND_NAV 

touchable text in bold on the left, navigation on the right (only on Flex)

FOOTER_NAV 

navigation bar

FOOTER_SIMPLE_BUTTON 

simple black or white button (see nbgl_layoutButtonStyle_t)

FOOTER_CHOICE_BUTTONS 

double buttons (see nbgl_layoutChoiceButtonsStyle_t)

NB_FOOTER_TYPES 

Definition at line 463 of file nbgl_layout.h.

◆ nbgl_layoutHeaderType_t

The different types of extended header.

Enumerator
HEADER_EMPTY 

empty space, to have a better vertical centering of centered info

HEADER_BACK_AND_TEXT 

back key and optional text

HEADER_BACK_AND_PROGRESS 

optional back key and progress indicator (only on Stax)

HEADER_TITLE 

simple centered text

HEADER_EXTENDED_BACK 

back key, centered text and touchable key on the right

HEADER_RIGHT_TEXT 

touchable text on the right, with a vertical separation line

NB_HEADER_TYPES 

Definition at line 405 of file nbgl_layout.h.

◆ nbgl_layoutKeyboardContentType_t

The different types of keyboard contents.

Enumerator
KEYBOARD_WITH_SUGGESTIONS 

text entry area + suggestion buttons

KEYBOARD_WITH_BUTTON 

text entry area + confirmation button

NB_KEYBOARD_CONTENT_TYPES 

Definition at line 352 of file nbgl_layout.h.

◆ nbgl_layoutNavDirection_t

possible directions for Navigation arrows

Enumerator
HORIZONTAL_NAV 

'<' and '>' are displayed, to navigate between pages and steps

VERTICAL_NAV 

'\/' and '/\' are displayed, to navigate in a list (vertical scrolling)

Definition at line 140 of file nbgl_layout.h.

◆ nbgl_layoutNavIndication_t

possible styles for Navigation arrows (it's a bit field)

Enumerator
NO_ARROWS 
LEFT_ARROW 

left arrow is used

RIGHT_ARROW 

right arrow is used

Definition at line 149 of file nbgl_layout.h.

◆ nbgl_layoutUpFooterType_t

The different types of area on top of footer.

Enumerator
UP_FOOTER_LONG_PRESS 

long-press button

UP_FOOTER_BUTTON 

simple button

UP_FOOTER_HORIZONTAL_BUTTONS 

2 buttons, on the same line

UP_FOOTER_TIP_BOX 

Tip-box.

UP_FOOTER_TEXT 

grayed-out text, for example "Tap to continue"

NB_UP_FOOTER_TYPES 

Definition at line 515 of file nbgl_layout.h.

Function Documentation

◆ nbgl_layoutAddBottomButton()

int nbgl_layoutAddBottomButton ( nbgl_layout_t layout,
const nbgl_icon_details_t icon,
uint8_t  token,
bool  separationLine,
tune_index_e  tuneId 
)

Creates a centered button at bottom of main container.

incompatible with navigation bar

Parameters
layoutthe current layout
iconicon inside the round button
tokenused as parameter of userCallback when button is touched
separationLineif set to true, adds a light gray separation line on top of the container
tuneIdif not NBGL_NO_TUNE, a tune will be played when button is pressed
Returns
>= 0 if OK

Definition at line 1092 of file nbgl_layout.c.

◆ nbgl_layoutAddButton()

int nbgl_layoutAddButton ( nbgl_layout_t layout,
const nbgl_layoutButton_t buttonInfo 
)

Creates a rounded button in the main container.

Parameters
layoutthe current layout
buttonInfostructure giving the description of button (text, icon, layout)
Returns
>= 0 if OK

Definition at line 2052 of file nbgl_layout.c.

◆ nbgl_layoutAddCenteredInfo()

int nbgl_layoutAddCenteredInfo ( nbgl_layout_t layout,
const nbgl_layoutCenteredInfo_t info 
)

Creates an area on the center of the main panel, with a possible icon/image, a possible text in black under it, and a possible text in gray under it.

Parameters
layoutthe current layout
infostructure giving the description of buttons (texts, icons, layout)
Returns
>= 0 if OK

Definition at line 1551 of file nbgl_layout.c.

◆ nbgl_layoutAddChoiceButtons()

int nbgl_layoutAddChoiceButtons ( nbgl_layout_t layout,
const nbgl_layoutChoiceButtons_t info 
)

Creates two buttons to make a choice. Both buttons are mandatory. Both buttons are full width, one under the other.

Parameters
layoutthe current layout
infostructure giving the description of buttons (texts, icons, layout)
Returns
>= 0 if OK

Definition at line 1765 of file nbgl_layout.c.

◆ nbgl_layoutAddConfirmationButton()

DEPRECATED int nbgl_layoutAddConfirmationButton ( nbgl_layout_t layout,
bool  active,
const char *  text,
int  token,
tune_index_e  tuneId 
)

Adds a black full width confirmation button on top of the previously added keyboard.

Deprecated:
Use nbgl_layoutAddKeyboardContent instead
Parameters
layoutthe current layout
activeif true, button is active, otherwise inactive (grayed-out)
texttext of the button
tokentoken of the button, used in onActionCallback
tuneIdtune to play when button is pressed
Returns
>= 0 if OK

Definition at line 879 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutAddContentCenter()

int nbgl_layoutAddContentCenter ( nbgl_layout_t layout,
const nbgl_contentCenter_t info 
)

Creates an area on the center of the main panel, with a possible icon, and possible texts under it.

Parameters
layoutthe current layout
infostructure giving the description of the Content Center
Returns
the size of the area if OK

Definition at line 1614 of file nbgl_layout.c.

◆ nbgl_layoutAddEnteredText()

DEPRECATED int nbgl_layoutAddEnteredText ( nbgl_layout_t layout,
bool  numbered,
uint8_t  number,
const char *  text,
bool  grayedOut,
int  offsetY,
int  token 
)

Adds a "text entry" area under the previously entered object. This area can be preceded (beginning of line) by an index, indicating for example the entered world. A vertical gray line is placed under the text. This text must be vertical placed in the screen with offsetY.

Deprecated:
Use nbgl_layoutAddKeyboardContent instead
Note
This area is touchable
Parameters
layoutthe current layout
numberedif true, the "number" param is used as index
numberindex of the text
textstring to display in the area
grayedOutif true, the text is grayed out (but not the potential number)
offsetYvertical offset from the top of the page
tokentoken provided in onActionCallback when this area is touched
Returns
>= 0 if OK

Definition at line 753 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutAddExtendedFooter()

int nbgl_layoutAddExtendedFooter ( nbgl_layout_t layout,
const nbgl_layoutFooter_t footerDesc 
)

Creates a touchable area at the footer of the screen, containing various controls, described in the given structure. This footer is not part of the main container.

Parameters
layoutthe current layout
footerDescif not NBGL_NO_TUNE, a tune will be played when button is long pressed
Returns
height of the control if OK

Definition at line 2498 of file nbgl_layout.c.

◆ nbgl_layoutAddFooter()

int nbgl_layoutAddFooter ( nbgl_layout_t layout,
const char *  text,
uint8_t  token,
tune_index_e  tuneId 
)

Creates a touchable text at the footer of the screen, separated with a thin line from the rest of the screen.

Parameters
layoutthe current layout
texttext to used in the footer
tokentoken to use when the footer is touched
tuneIdif not NBGL_NO_TUNE, a tune will be played when button is long pressed
Returns
height of the control if OK

Definition at line 2182 of file nbgl_layout.c.

◆ nbgl_layoutAddHeader()

int nbgl_layoutAddHeader ( nbgl_layout_t layout,
const nbgl_layoutHeader_t headerDesc 
)

Creates a touchable (or not) area at the header of the screen, containing various controls, described in the given structure. This header is not part of the main container.

Parameters
layoutthe current layout
headerDescdescription of the header to add
Returns
height of the control if OK

Definition at line 2235 of file nbgl_layout.c.

◆ nbgl_layoutAddHiddenDigits()

DEPRECATED 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, as full circles The placeholder is "underligned" with a thin horizontal line of the expected full length.

Deprecated:
Use nbgl_layoutAddKeypadContent instead
Note
It must be the last added object, after potential back key, title, and keypad. Vertical positions of title and hidden digits will be computed here
Parameters
layoutthe current layout
nbDigitsnumber of digits to be displayed
Returns
the index of digits set, to use in nbgl_layoutUpdateHiddenDigits()

Definition at line 179 of file nbgl_layout_keypad.c.

◆ nbgl_layoutAddHorizontalButtons()

int nbgl_layoutAddHorizontalButtons ( nbgl_layout_t layout,
const nbgl_layoutHorizontalButtons_t info 
)

Creates two buttons to make a choice. Both buttons are mandatory The left one contains only an icon and is round, the other contains only a text.

Parameters
layoutthe current layout
infostructure giving the description of buttons (text, icon, tokens)
Returns
>= 0 if OK

Definition at line 1788 of file nbgl_layout.c.

◆ nbgl_layoutAddKeyboard()

int nbgl_layoutAddKeyboard ( nbgl_layout_t layout,
const nbgl_layoutKbd_t kbdInfo 
)

Creates a keyboard on bottom of the screen, with the given configuration.

Parameters
layoutthe current layout
kbdInfoconfiguration of the keyboard to draw (including the callback when touched)
Returns
the index of keyboard, to use in nbgl_layoutUpdateKeyboard()

Definition at line 474 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutAddKeyboardContent()

int nbgl_layoutAddKeyboardContent ( nbgl_layout_t layout,
nbgl_layoutKeyboardContent_t content 
)

Adds an area containing a potential title, a text entry and either confirmation or suggestion buttons, on top of the keyboard.

Parameters
layoutthe current layout
contentstructure containing the info
Returns
the height of the area if OK

Definition at line 965 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutAddKeypad()

int nbgl_layoutAddKeypad ( nbgl_layout_t layout,
keyboardCallback_t  callback,
bool  shuffled 
)

Adds a keypad on bottom of the screen, with the associated callback.

Note
Validate and Backspace keys are not enabled at start-up
Parameters
layoutthe current layout
callbackfunction called when any of the key is touched
shuffledif set to true, digits are shuffled in keypad
Returns
the index of keypad, to use in nbgl_layoutUpdateKeypad()

Definition at line 71 of file nbgl_layout_keypad.c.

◆ nbgl_layoutAddKeypadContent()

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 entered digits as small discs. On Stax, the placeholder is "underligned" with a thin horizontal line of the expected full length.

Note
It shall be the only object added in the layout, beside a potential header and the keypad itself
Parameters
layoutthe current layout
titlethe text to use on top of the digits
hiddenif set to true, digits appear as discs, otherwise as visible digits (given in text param)
nbDigitsnumber of digits to be displayed (only used if hidden is true)
textonly used if hidden is false
Returns
the height of this area, if no error, < 0 otherwise

Definition at line 337 of file nbgl_layout_keypad.c.

◆ nbgl_layoutAddLargeCaseText()

int nbgl_layoutAddLargeCaseText ( nbgl_layout_t layout,
const char *  text 
)

Creates an area with given text in 32px font (in Black)

Parameters
layoutthe current layout
texttext to be displayed (auto-wrap)
Returns
>= 0 if OK

Definition at line 1325 of file nbgl_layout.c.

◆ nbgl_layoutAddLongPressButton()

int nbgl_layoutAddLongPressButton ( nbgl_layout_t layout,
const char *  text,
uint8_t  token,
tune_index_e  tuneId 
)

Creates a long press button in the main container.

Parameters
layoutthe current layout
texttext of the button button
tokentoken attached to actionCallback when long time of press is elapsed
tuneIdif not NBGL_NO_TUNE, a tune will be played when button is long pressed
Returns
>= 0 if OK

Definition at line 2154 of file nbgl_layout.c.

◆ nbgl_layoutAddNavigationBar()

int nbgl_layoutAddNavigationBar ( nbgl_layout_t layout,
const nbgl_layoutNavigationBar_t info 
)

Creates a navigation bar on bottom of main container.

Parameters
layoutthe current layout
infostructure giving the description of the navigation bar
Returns
the height of the control if OK

Definition at line 1066 of file nbgl_layout.c.

◆ nbgl_layoutAddProgressBar()

int nbgl_layoutAddProgressBar ( nbgl_layout_t layout,
const nbgl_layoutProgressBar_t barLayout 
)

Creates an area in main panel to display a progress bar, with a title text and a description under the progress.

Parameters
layoutthe current layout
barLayoutstructure giving the description of progress bar
Returns
>= 0 if OK

Definition at line 1961 of file nbgl_layout.c.

◆ nbgl_layoutAddProgressIndicator()

int nbgl_layoutAddProgressIndicator ( nbgl_layout_t layout,
uint8_t  activePage,
uint8_t  nbPages,
bool  withBack,
uint8_t  backToken,
tune_index_e  tuneId 
)

Creates a kind of navigation bar with an optional <- arrow on the left. This widget is placed on top of the main container.

Deprecated:
Parameters
layoutthe current layout
activePagecurrent page [O,(nbPages-1)]
nbPagesnumber of pages
withBackif true, the back arrow is drawn
backTokentoken used with actionCallback is withBack is true
tuneIdif not NBGL_NO_TUNE, a tune will be played when back button is pressed
Returns
the height of the control if OK

Definition at line 3192 of file nbgl_layout.c.

◆ nbgl_layoutAddQRCode()

int nbgl_layoutAddQRCode ( nbgl_layout_t layout,
const nbgl_layoutQRCode_t info 
)

Creates an area on the center of the main panel, with a QRCode, a possible text in black (bold) under it, and a possible text in black under it.

Parameters
layoutthe current layout
infostructure giving the description of buttons (texts, icons, layout)
Returns
height of the control if OK

Definition at line 1638 of file nbgl_layout.c.

◆ nbgl_layoutAddRadioChoice()

int nbgl_layoutAddRadioChoice ( nbgl_layout_t layout,
const nbgl_layoutRadioChoice_t choices 
)

Creates a list of radio buttons (on the right)

Parameters
layoutthe current layout
choicesstructure giving the list of choices and the current selected one
Returns
>= 0 if OK

Definition at line 1454 of file nbgl_layout.c.

◆ nbgl_layoutAddSeparationLine()

int nbgl_layoutAddSeparationLine ( nbgl_layout_t layout)

adds a separation line on bottom of the last added item

Parameters
layoutthe current layout
Returns
>= 0 if OK

Definition at line 2032 of file nbgl_layout.c.

◆ nbgl_layoutAddSpinner()

int nbgl_layoutAddSpinner ( nbgl_layout_t layout,
const char *  text,
bool  fixed 
)

Creates a centered (vertically & horizontally) spinner with a text under it.

Parameters
layoutthe current layout
texttext to draw under the spinner
fixedif set to true, the spinner won't spin and be entirely black
Returns
>= 0 if OK

Definition at line 3221 of file nbgl_layout.c.

◆ nbgl_layoutAddSplitFooter()

int nbgl_layoutAddSplitFooter ( nbgl_layout_t layout,
const char *  leftText,
uint8_t  leftToken,
const char *  rightText,
uint8_t  rightToken,
tune_index_e  tuneId 
)

Creates 2 touchable texts at the footer of the screen, separated with a thin line from the rest of the screen, and from each other.

Parameters
layoutthe current layout
leftTexttext to used in the left part of footer
leftTokentoken to use when the left part of footer is touched
rightTexttext to used in the right part of footer
rightTokentoken to use when the right part of footer is touched
tuneIdif not NBGL_NO_TUNE, a tune will be played when button is long pressed
Returns
height of the control if OK

Definition at line 2209 of file nbgl_layout.c.

◆ nbgl_layoutAddSubHeaderText()

int nbgl_layoutAddSubHeaderText ( nbgl_layout_t layout,
const char *  text 
)

Creates an area with given text in small regular font, under the header.

Parameters
layoutthe current layout
textmain text in small regular font
Returns
height of the control if OK

Definition at line 1284 of file nbgl_layout.c.

◆ nbgl_layoutAddSuggestionButtons()

DEPRECATED int nbgl_layoutAddSuggestionButtons ( nbgl_layout_t layout,
uint8_t  nbUsedButtons,
const char *  buttonTexts[NB_MAX_SUGGESTION_BUTTONS],
int  firstButtonToken,
tune_index_e  tuneId 
)

Adds up to 4 black suggestion buttons under the previously added object.

Deprecated:
Use nbgl_layoutAddKeyboardContent instead
Parameters
layoutthe current layout
nbUsedButtonsthe number of actually used buttons
buttonTextsarray of 4 strings for buttons (last ones can be NULL)
firstButtonTokenfirst token used for buttons, provided in onActionCallback (the next 3 values will be used for other buttons)
tuneIdtune to play when any button is pressed
Returns
>= 0 if OK

Definition at line 616 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutAddSwipe()

int nbgl_layoutAddSwipe ( nbgl_layout_t layout,
uint16_t  swipesMask,
const char *  text,
uint8_t  token,
tune_index_e  tuneId 
)

Creates a swipe interaction on the main container.

Parameters
layoutthe current layout
swipesMaskthe type of swipes to be handled by the container
textthe text in gray to display at bottom of the main container (can be NULL)
tokenthe token that will be used as argument of the callback
tuneIdif not NBGL_NO_TUNE, a tune will be played when button is pressed
Returns
>= 0 if OK

Definition at line 980 of file nbgl_layout.c.

◆ nbgl_layoutAddSwitch()

int nbgl_layoutAddSwitch ( nbgl_layout_t layout,
const nbgl_layoutSwitch_t switchLayout 
)

Creates a switch with the given text and its state.

Parameters
layoutthe current layout
switchLayoutdescription of the parameters of the switch
Returns
height of the control if OK

Definition at line 1157 of file nbgl_layout.c.

◆ nbgl_layoutAddTagValueList()

int nbgl_layoutAddTagValueList ( nbgl_layout_t layout,
const nbgl_layoutTagValueList_t list 
)

Creates a list of [tag,value] pairs.

Parameters
layoutthe current layout
liststructure giving the list of [tag,value] pairs
Returns
>= 0 if OK

Definition at line 1809 of file nbgl_layout.c.

◆ nbgl_layoutAddText()

int nbgl_layoutAddText ( nbgl_layout_t layout,
const char *  text,
const char *  subText 
)

Creates an area with given text and sub text (in gray)

Parameters
layoutthe current layout
textmain text (in small bold font), optional
subTextdescription under main text (in small regular font), optional
Returns
height of the control if OK

Definition at line 1197 of file nbgl_layout.c.

◆ nbgl_layoutAddTextContent()

int nbgl_layoutAddTextContent ( nbgl_layout_t layout,
const char *  title,
const char *  description,
const char *  info 
)

Creates in the main container three text areas:

  • a first one in black large case, with title param
  • a second one under it, in black small case, with description param
  • a last one at the bottom of the container, in gray, with info param
Parameters
layoutthe current layout
titlemain text (in large bold font)
descriptiondescription under main text (in small regular font)
infodescription at bottom (in small gray)
Returns
height of the control if OK

Definition at line 1372 of file nbgl_layout.c.

◆ nbgl_layoutAddTopRightButton()

int nbgl_layoutAddTopRightButton ( nbgl_layout_t layout,
const nbgl_icon_details_t icon,
uint8_t  token,
tune_index_e  tuneId 
)

Creates a Top-right button in the top right corner of the top panel.

Parameters
layoutthe current layout
iconicon configuration
tokenthe token that will be used as argument of the callback
tuneIdif not NBGL_NO_TUNE, a tune will be played when button is pressed
Returns
>= 0 if OK

Definition at line 1021 of file nbgl_layout.c.

◆ nbgl_layoutAddTouchableBar()

int nbgl_layoutAddTouchableBar ( nbgl_layout_t layout,
const nbgl_layoutBar_t barLayout 
)

Creates a touchable bar in main panel.

Parameters
layoutthe current layout
barLayoutthe properties of the bar
Returns
the height of the bar if OK

Definition at line 1118 of file nbgl_layout.c.

◆ nbgl_layoutAddUpFooter()

int nbgl_layoutAddUpFooter ( nbgl_layout_t layout,
const nbgl_layoutUpFooter_t upFooterDesc 
)

Creates a touchable area on top of the footer of the screen, containing various controls, described in the given structure. This up-footer is not part of the main container.

Parameters
layoutthe current layout
upFooterDescdescription of the up-footer
Returns
height of the control if OK

Definition at line 2892 of file nbgl_layout.c.

◆ nbgl_layoutDraw()

int nbgl_layoutDraw ( nbgl_layout_t layoutParam)

Applies given layout. The screen will be redrawn.

Parameters
layoutParamlayout to redraw
Returns
a pointer to the corresponding layout

Definition at line 3286 of file nbgl_layout.c.

◆ nbgl_layoutGet()

nbgl_layout_t* nbgl_layoutGet ( const nbgl_layoutDescription_t description)

returns a layout of the given type. The layout is reset

Parameters
descriptiondescription of layout
Returns
a pointer to the corresponding layout

Definition at line 891 of file nbgl_layout.c.

◆ nbgl_layoutKeyboardNeedsRefresh()

bool nbgl_layoutKeyboardNeedsRefresh ( nbgl_layout_t layout,
uint8_t  index 
)

function called to know whether the keyboard has been redrawn and needs a refresh

Parameters
layoutthe current layout
indexindex returned by nbgl_layoutAddKeyboard() (unused)
Returns
true if keyboard needs a refresh

Definition at line 580 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutRelease()

int nbgl_layoutRelease ( nbgl_layout_t layoutParam)

Release the layout obtained with nbgl_layoutGet()

Parameters
layoutParamlayout to release
Returns
>= 0 if OK

Definition at line 3317 of file nbgl_layout.c.

◆ nbgl_layoutUpdateConfirmationButton()

DEPRECATED int nbgl_layoutUpdateConfirmationButton ( nbgl_layout_t layout,
uint8_t  index,
bool  active,
const char *  text 
)

Updates an existing black full width confirmation button on top of the previously added keyboard.

Deprecated:
Use nbgl_layoutUpdateKeyboardContent instead
Parameters
layoutthe current layout
indexreturned value of nbgl_layoutAddConfirmationButton()
activeif true, button is active
texttext of the button = *
Returns
>= 0 if OK

Definition at line 920 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutUpdateEnteredText()

DEPRECATED int nbgl_layoutUpdateEnteredText ( nbgl_layout_t layout,
uint8_t  index,
bool  numbered,
uint8_t  number,
const char *  text,
bool  grayedOut 
)

Updates an existing "text entry" area, created with nbgl_layoutAddEnteredText()

Deprecated:
Use nbgl_layoutUpdateKeyboardContent instead
Parameters
layoutthe current layout
indexindex of the text (return value of nbgl_layoutAddEnteredText())
numberedif set to true, the text is preceded on the left by 'number.'
numberif numbered is true, number used to build 'number.' text
textstring to display in the area
grayedOutif true, the text is grayed out (but not the potential number)
Returns
<0 if error, 0 if OK with text fitting the area, 1 of 0K with text not fitting the area

Definition at line 821 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutUpdateHiddenDigits()

DEPRECATED int nbgl_layoutUpdateHiddenDigits ( nbgl_layout_t layout,
uint8_t  index,
uint8_t  nbActive 
)

Updates an existing set of hidden digits, with the given configuration.

Deprecated:
Use nbgl_layoutUpdateKeypadContent instead
Parameters
layoutthe current layout
indexindex returned by nbgl_layoutAddHiddenDigits()
nbActivenumber of "active" digits (represented by discs instead of circles)
Returns
>=0 if OK

Definition at line 266 of file nbgl_layout_keypad.c.

◆ nbgl_layoutUpdateKeyboard()

int nbgl_layoutUpdateKeyboard ( nbgl_layout_t layout,
uint8_t  index,
uint32_t  keyMask,
bool  updateCasing,
keyboardCase_t  casing 
)

Updates an existing keyboard on bottom of the screen, with the given configuration.

Parameters
layoutthe current layout
indexindex returned by nbgl_layoutAddKeyboard() (unused)
keyMaskmask of keys to activate/deactivate on keyboard
updateCasingif true, update keyboard casing with given value
casingcasing to use
Returns
>=0 if OK

Definition at line 543 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutUpdateKeyboardContent()

int nbgl_layoutUpdateKeyboardContent ( nbgl_layout_t layout,
nbgl_layoutKeyboardContent_t content 
)

Updates an area containing a potential title, a text entry and either confirmation or suggestion buttons, on top of the keyboard This area must have been built with nbgl_layoutAddKeyboardContent, and the type must not change.

Parameters
layoutthe current layout
contentstructure containing the updated info
Returns
the height of the area if OK

Definition at line 1039 of file nbgl_layout_keyboard.c.

◆ nbgl_layoutUpdateKeypad()

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.

Parameters
layoutthe current layout
indexindex returned by nbgl_layoutAddKeypad() (unused, for compatibility)
enableValidateif true, enable Validate key
enableBackspaceif true, enable Backspace key
enableDigitsif true, enable all digit keys
Returns
>=0 if OK

Definition at line 132 of file nbgl_layout_keypad.c.

◆ nbgl_layoutUpdateKeypadContent()

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.

Parameters
layoutthe current layout
hiddenif set to true, digits appear as discs, otherwise as visible digits (given in text param)
nbActiveDigitsnumber of "active" digits (represented by discs instead of circles) (only used if hidden is true)
textonly used if hidden is false
Returns
>=0 if OK

Definition at line 484 of file nbgl_layout_keypad.c.

◆ nbgl_layoutUpdateSuggestionButtons()

DEPRECATED int nbgl_layoutUpdateSuggestionButtons ( nbgl_layout_t layout,
uint8_t  index,
uint8_t  nbUsedButtons,
const char *  buttonTexts[NB_MAX_SUGGESTION_BUTTONS] 
)

Updates the number and/or the text suggestion buttons created with nbgl_layoutAddSuggestionButtons()

Deprecated:
Use nbgl_layoutUpdateKeyboardContent instead
Parameters
layoutthe current layout
indexindex returned by nbgl_layoutAddSuggestionButtons() (unused)
nbUsedButtonsthe number of actually used buttons
buttonTextsarray of 4 strings for buttons (last ones can be NULL)
Returns
>= 0 if OK

Definition at line 669 of file nbgl_layout_keyboard.c.