Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_use_case.h
Go to the documentation of this file.
1
7#ifndef NBGL_USE_CASE_H
8#define NBGL_USE_CASE_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/*********************
15 * INCLUDES
16 *********************/
17
18#include "nbgl_content.h"
19#ifdef NBGL_PAGE
20#include "nbgl_page.h"
21#else // NBGL_PAGE
22#include "nbgl_flow.h"
23#endif // NBGL_PAGE
24
25/*********************
26 * DEFINES
27 *********************/
32#define FIRST_USER_TOKEN 20
33
38#define LAST_PAGE_FOR_REVIEW 0xFF
39
43#if defined(TARGET_STAX)
44#define NB_MAX_LINES_IN_DETAILS 12
45#elif defined(TARGET_FLEX)
46#define NB_MAX_LINES_IN_DETAILS 11
47#elif defined(TARGET_APEX)
48#define NB_MAX_LINES_IN_DETAILS 11
49#else
50// Nano
51#define NB_MAX_LINES_IN_DETAILS 3
52#endif // TARGETS
53
57#if defined(TARGET_STAX)
58#define NB_MAX_LINES_IN_REVIEW 10
59#elif defined(TARGET_FLEX)
60#define NB_MAX_LINES_IN_REVIEW 9
61#elif defined(TARGET_APEX)
62#define NB_MAX_LINES_IN_REVIEW 9
63#else
64// Nano
65#define NB_MAX_LINES_IN_REVIEW 3
66#endif // TARGETS
67
73#define NB_MAX_DISPLAYED_PAIRS_IN_REVIEW 4
74
78#define TAG_VALUE_AREA_HEIGHT (SCREEN_HEIGHT - SMALL_CENTERING_HEADER - SIMPLE_FOOTER_HEIGHT)
79
83#define INFOS_AREA_HEIGHT (SCREEN_HEIGHT - TOUCHABLE_HEADER_BAR_HEIGHT)
84
88#define TAGLINE_PART1 "This app enables signing\ntransactions on the"
89#define TAGLINE_PART2 "network."
90
94#define APP_DESCRIPTION_MAX_LEN 74
95
99#define MAX_APP_NAME_FOR_SDK_TAGLINE \
100 (APP_DESCRIPTION_MAX_LEN - 1 - (sizeof(TAGLINE_PART1) + sizeof(TAGLINE_PART2)))
101
107#define INIT_HOME_PAGE 0xff
108
110#define STATUS_SCREEN_DURATION 3000
111
117#define REAL_TYPE_MASK 0x7
118
119// returns true if the given warning structure requires display of an initial page (internal usage)
120#define HAS_INITIAL_WARNING(_warning) \
121 ((_warning->predefinedSet \
122 & ((1 << W3C_THREAT_DETECTED_WARN) | (1 << W3C_RISK_DETECTED_WARN) \
123 | (1 << BLIND_SIGNING_WARN))) \
124 || (_warning->introDetails != NULL))
125
126/**********************
127 * MACROS
128 **********************/
129
130/**********************
131 * TYPEDEFS
132 **********************/
136typedef void (*nbgl_callback_t)(void);
137
144typedef bool (*nbgl_navCallback_t)(uint8_t page, nbgl_pageContent_t *content);
145
150typedef void (*nbgl_choiceCallback_t)(bool confirm);
151
156typedef void (*nbgl_actionCallback_t)(uint8_t page);
157
163typedef void (*nbgl_pinValidCallback_t)(const uint8_t *pin, uint8_t pinLen);
164
170typedef void (*nbgl_contentCallback_t)(uint8_t contentIndex, nbgl_content_t *content);
171
182
191
202
208typedef struct {
209 const char *text;
211 const char *modalTitle;
213 union {
216 };
218
229
231
236typedef struct {
237 uint8_t nbBars;
238 const char *const *texts;
239 const char *const *subTexts;
241 const struct nbgl_genericDetails_s
244
246
265
267
280
293
325
337
343#define SKIPPABLE_OPERATION (1 << 4)
344
350#define BLIND_OPERATION (1 << 5)
351
357typedef uint32_t nbgl_operationType_t;
358
373
374/**********************
375 * GLOBAL PROTOTYPES
376 **********************/
377
378void nbgl_useCaseHomeAndSettings(const char *appName,
379 const nbgl_icon_details_t *appIcon,
380 const char *tagline,
381 const uint8_t initSettingPage,
382 const nbgl_genericContents_t *settingContents,
383 const nbgl_contentInfoList_t *infosList,
384 const nbgl_homeAction_t *action,
385 nbgl_callback_t quitCallback);
386
388 const nbgl_contentTagValueList_t *tagValueList,
389 const nbgl_icon_details_t *icon,
390 const char *reviewTitle,
391 const char *reviewSubTitle,
392 const char *finishTitle,
393 nbgl_choiceCallback_t choiceCallback);
394
396 const nbgl_contentTagValueList_t *tagValueList,
397 const nbgl_icon_details_t *icon,
398 const char *reviewTitle,
399 const char *reviewSubTitle,
400 const char *finishTitle,
401 const nbgl_tipBox_t *tipBox,
402 nbgl_choiceCallback_t choiceCallback);
404 const nbgl_contentTagValueList_t *tagValueList,
405 const nbgl_icon_details_t *icon,
406 const char *reviewTitle,
407 const char *reviewSubTitle,
408 const char *finishTitle,
409 const nbgl_tipBox_t *tipBox,
410 const nbgl_warning_t *warning,
411 nbgl_choiceCallback_t choiceCallback);
412
414 const nbgl_contentTagValueList_t *tagValueList,
415 const nbgl_icon_details_t *icon,
416 const char *reviewTitle,
417 const char *reviewSubTitle,
418 const char *finishTitle,
419 nbgl_choiceCallback_t choiceCallback);
420
421void nbgl_useCaseAddressReview(const char *address,
422 const nbgl_contentTagValueList_t *additionalTagValueList,
423 const nbgl_icon_details_t *icon,
424 const char *reviewTitle,
425 const char *reviewSubTitle,
426 nbgl_choiceCallback_t choiceCallback);
427
429 nbgl_callback_t quitCallback);
430
432 const nbgl_icon_details_t *icon,
433 const char *reviewTitle,
434 const char *reviewSubTitle,
435 nbgl_choiceCallback_t choiceCallback);
436
438 const nbgl_icon_details_t *icon,
439 const char *reviewTitle,
440 const char *reviewSubTitle,
441 nbgl_choiceCallback_t choiceCallback);
442
444 const nbgl_icon_details_t *icon,
445 const char *reviewTitle,
446 const char *reviewSubTitle,
447 const nbgl_warning_t *warning,
448 nbgl_choiceCallback_t choiceCallback);
449
451 nbgl_choiceCallback_t choiceCallback,
452 nbgl_callback_t skipCallback);
453
455 nbgl_choiceCallback_t choiceCallback);
456
457void nbgl_useCaseReviewStreamingFinish(const char *finishTitle,
458 nbgl_choiceCallback_t choiceCallback);
459
461 const char *rejectText,
462 nbgl_callback_t rejectCallback);
463
464void nbgl_useCaseGenericConfiguration(const char *title,
465 uint8_t initPage,
466 const nbgl_genericContents_t *contents,
467 nbgl_callback_t quitCallback);
468
469void nbgl_useCaseGenericSettings(const char *appName,
470 uint8_t initPage,
471 const nbgl_genericContents_t *settingContents,
472 const nbgl_contentInfoList_t *infosList,
473 nbgl_callback_t quitCallback);
474
476 const char *message,
477 const char *subMessage,
478 const char *confirmText,
479 const char *rejectString,
480 nbgl_choiceCallback_t callback);
482 const char *message,
483 const char *subMessage,
484 const char *confirmText,
485 const char *cancelText,
486 nbgl_warningDetails_t *details,
487 nbgl_choiceCallback_t callback);
488void nbgl_useCaseStatus(const char *message, bool isSuccess, nbgl_callback_t quitCallback);
489
490void nbgl_useCaseConfirm(const char *message,
491 const char *subMessage,
492 const char *confirmText,
493 const char *rejectText,
494 nbgl_callback_t callback);
495
497 const char *message,
498 const char *actionText,
499 nbgl_callback_t callback);
500
501void nbgl_useCaseSpinner(const char *text);
502
503void nbgl_useCaseNavigableContent(const char *title,
504 uint8_t initPage,
505 uint8_t nbPages,
506 nbgl_callback_t quitCallback,
507 nbgl_navCallback_t navCallback,
508 nbgl_layoutTouchCallback_t controlsCallback);
509
510// utils
511uint8_t nbgl_useCaseGetNbTagValuesInPage(uint8_t nbPairs,
512 const nbgl_contentTagValueList_t *tagValueList,
513 uint8_t startIndex,
514 bool *requireSpecificDisplay);
516 const nbgl_contentTagValueList_t *tagValueList,
517 uint8_t startIndex,
518 bool isSkippable,
519 bool *requireSpecificDisplay);
520uint8_t nbgl_useCaseGetNbInfosInPage(uint8_t nbInfos,
521 const nbgl_contentInfoList_t *infosList,
522 uint8_t startIndex,
523 bool withNav);
524uint8_t nbgl_useCaseGetNbSwitchesInPage(uint8_t nbSwitches,
525 const nbgl_contentSwitchesList_t *switchesList,
526 uint8_t startIndex,
527 bool withNav);
528uint8_t nbgl_useCaseGetNbBarsInPage(uint8_t nbBars,
529 const nbgl_contentBarsList_t *barsList,
530 uint8_t startIndex,
531 bool withNav);
532uint8_t nbgl_useCaseGetNbChoicesInPage(uint8_t nbChoices,
533 const nbgl_contentRadioChoice_t *choicesList,
534 uint8_t startIndex,
535 bool withNav);
537
538#ifdef NBGL_KEYPAD
539void nbgl_useCaseKeypad(const char *title,
540 uint8_t minDigits,
541 uint8_t maxDigits,
542 bool shuffled,
543 bool hidden,
544 nbgl_pinValidCallback_t validatePinCallback,
545 nbgl_callback_t backCallback);
546#endif // NBGL_KEYPAD
547
548#ifdef HAVE_SE_TOUCH
549// use case drawing
550DEPRECATED void nbgl_useCaseHome(const char *appName,
551 const nbgl_icon_details_t *appIcon,
552 const char *tagline,
553 bool withSettings,
554 nbgl_callback_t topRightCallback,
555 nbgl_callback_t quitCallback);
556DEPRECATED void nbgl_useCaseHomeExt(const char *appName,
557 const nbgl_icon_details_t *appIcon,
558 const char *tagline,
559 bool withSettings,
560 const char *actionButtonText,
561 nbgl_callback_t actionCallback,
562 nbgl_callback_t topRightCallback,
563 nbgl_callback_t quitCallback);
564DEPRECATED void nbgl_useCaseSettings(const char *settingsTitle,
565 uint8_t initPage,
566 uint8_t nbPages,
567 bool touchableTitle,
568 nbgl_callback_t quitCallback,
569 nbgl_navCallback_t navCallback,
570 nbgl_layoutTouchCallback_t controlsCallback);
572 const char *reviewTitle,
573 const char *reviewSubTitle,
574 const char *rejectText,
575 nbgl_callback_t continueCallback,
576 nbgl_callback_t rejectCallback);
577DEPRECATED void nbgl_useCaseRegularReview(uint8_t initPage,
578 uint8_t nbPages,
579 const char *rejectText,
580 nbgl_layoutTouchCallback_t buttonCallback,
581 nbgl_navCallback_t navCallback,
582 nbgl_choiceCallback_t choiceCallback);
584 const nbgl_pageInfoLongPress_t *infoLongPress,
585 const char *rejectText,
586 nbgl_choiceCallback_t callback);
588 const nbgl_pageInfoLongPress_t *infoLongPress,
589 const char *rejectText,
590 nbgl_choiceCallback_t callback);
591
592DEPRECATED void nbgl_useCaseAddressConfirmationExt(const char *address,
593 nbgl_choiceCallback_t callback,
594 const nbgl_contentTagValueList_t *tagValueList);
595#define nbgl_useCaseAddressConfirmation(__address, __callback) \
596 nbgl_useCaseAddressConfirmationExt(__address, __callback, NULL)
597#endif // HAVE_SE_TOUCH
598
599#ifdef __cplusplus
600} /* extern "C" */
601#endif
602
603#endif /* NBGL_USE_CASE_H */
common content for Graphical Library
nbgl_contentType_t
The different types of predefined contents.
Flow construction API of NBGL.
void(* nbgl_layoutTouchCallback_t)(int token, uint8_t index)
prototype of function to be called when an object is touched
API of the Advanced BOLOS Graphical Library, for predefined pages.
struct PACKED__ nbgl_icon_details_s nbgl_icon_details_t
Represents all information about an icon.
DEPRECATED void nbgl_useCaseHome(const char *appName, const nbgl_icon_details_t *appIcon, const char *tagline, bool withSettings, nbgl_callback_t topRightCallback, nbgl_callback_t quitCallback)
nbgl_genericDetailsType_t
The different types of generic detailed page contents.
@ NO_TYPE_WARNING
Invalid type (to use for bars leading to nothing)
@ CENTERED_INFO_WARNING
Centered info.
@ QRCODE_WARNING
QR Code.
@ BAR_LIST_WARNING
list of touchable bars, to display sub-pages
DEPRECATED void nbgl_useCaseSettings(const char *settingsTitle, uint8_t initPage, uint8_t nbPages, bool touchableTitle, nbgl_callback_t quitCallback, nbgl_navCallback_t navCallback, nbgl_layoutTouchCallback_t controlsCallback)
uint8_t nbgl_useCaseGetNbTagValuesInPageExt(uint8_t nbPairs, const nbgl_contentTagValueList_t *tagValueList, uint8_t startIndex, bool isSkippable, bool *requireSpecificDisplay)
nbgl_genericDetailsType_t nbgl_warningDetailsType_t
void(* nbgl_callback_t)(void)
prototype of generic callback function
struct nbgl_preludeDetails_s nbgl_preludeDetails_t
The necessary parameters to build the prelude of a review use-case.
void nbgl_useCaseGenericSettings(const char *appName, uint8_t initPage, const nbgl_genericContents_t *settingContents, const nbgl_contentInfoList_t *infosList, nbgl_callback_t quitCallback)
uint32_t nbgl_operationType_t
This mask is used to describe the type of operation to review with additional options It is a mask of...
void nbgl_useCaseReview(nbgl_operationType_t operationType, const nbgl_contentTagValueList_t *tagValueList, const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, const char *finishTitle, nbgl_choiceCallback_t choiceCallback)
struct nbgl_genericDetails_s nbgl_genericDetails_t
The necessary parameters to build the page(s) displayed when the top-right button is touched in intro...
void nbgl_useCaseAction(const nbgl_icon_details_t *icon, const char *message, const char *actionText, nbgl_callback_t callback)
uint8_t nbgl_useCaseGetNbTagValuesInPage(uint8_t nbPairs, const nbgl_contentTagValueList_t *tagValueList, uint8_t startIndex, bool *requireSpecificDisplay)
uint8_t nbgl_useCaseGetNbPagesForTagValueList(const nbgl_contentTagValueList_t *tagValueList)
DEPRECATED void nbgl_useCaseRegularReview(uint8_t initPage, uint8_t nbPages, const char *rejectText, nbgl_layoutTouchCallback_t buttonCallback, nbgl_navCallback_t navCallback, nbgl_choiceCallback_t choiceCallback)
void(* nbgl_pinValidCallback_t)(const uint8_t *pin, uint8_t pinLen)
prototype of pin validation callback function
void nbgl_useCaseReviewStreamingStart(nbgl_operationType_t operationType, const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, nbgl_choiceCallback_t choiceCallback)
void nbgl_useCaseHomeAndSettings(const char *appName, const nbgl_icon_details_t *appIcon, const char *tagline, const uint8_t initSettingPage, const nbgl_genericContents_t *settingContents, const nbgl_contentInfoList_t *infosList, const nbgl_homeAction_t *action, nbgl_callback_t quitCallback)
nbgl_genericDetails_t nbgl_warningDetails_t
void nbgl_useCaseStaticReviewLight(const nbgl_contentTagValueList_t *tagValueList, const nbgl_pageInfoLongPress_t *infoLongPress, const char *rejectText, nbgl_choiceCallback_t callback)
uint8_t nbgl_useCaseGetNbInfosInPage(uint8_t nbInfos, const nbgl_contentInfoList_t *infosList, uint8_t startIndex, bool withNav)
void(* nbgl_choiceCallback_t)(bool confirm)
prototype of choice callback function
uint8_t nbgl_useCaseGetNbBarsInPage(uint8_t nbBars, const nbgl_contentBarsList_t *barsList, uint8_t startIndex, bool withNav)
void nbgl_useCaseNavigableContent(const char *title, uint8_t initPage, uint8_t nbPages, nbgl_callback_t quitCallback, nbgl_navCallback_t navCallback, nbgl_layoutTouchCallback_t controlsCallback)
nbgl_homeActionStyle_t
The different types of action button in Home Screen.
@ SOFT_HOME_ACTION
White button, more for extended features.
@ STRONG_HOME_ACTION
Black button, implicating the main action of the App.
void nbgl_useCaseReviewStreamingFinish(const char *finishTitle, nbgl_choiceCallback_t choiceCallback)
void nbgl_useCaseChoiceWithDetails(const nbgl_icon_details_t *icon, const char *message, const char *subMessage, const char *confirmText, const char *cancelText, nbgl_warningDetails_t *details, nbgl_choiceCallback_t callback)
void nbgl_useCaseSpinner(const char *text)
void nbgl_useCaseConfirm(const char *message, const char *subMessage, const char *confirmText, const char *rejectText, nbgl_callback_t callback)
void nbgl_useCaseReviewStart(const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, const char *rejectText, nbgl_callback_t continueCallback, nbgl_callback_t rejectCallback)
DEPRECATED void nbgl_useCaseHomeExt(const char *appName, const nbgl_icon_details_t *appIcon, const char *tagline, bool withSettings, const char *actionButtonText, nbgl_callback_t actionCallback, nbgl_callback_t topRightCallback, nbgl_callback_t quitCallback)
void nbgl_useCaseStatus(const char *message, bool isSuccess, nbgl_callback_t quitCallback)
nbgl_warningType_t
The different types of pre-defined warnings.
@ W3C_THREAT_DETECTED_WARN
Web3 Checks: Threat detected (see reportRisk field)
@ W3C_ISSUE_WARN
Web3 Checks issue (not available)
@ BLIND_SIGNING_WARN
Blind signing.
@ W3C_NO_THREAT_WARN
Web3 Checks: No Threat detected.
@ W3C_RISK_DETECTED_WARN
Web3 Checks: Risk detected (see reportRisk field)
@ NB_WARNING_TYPES
DEPRECATED void nbgl_useCaseAddressConfirmationExt(const char *address, nbgl_choiceCallback_t callback, const nbgl_contentTagValueList_t *tagValueList)
void nbgl_useCaseGenericConfiguration(const char *title, uint8_t initPage, const nbgl_genericContents_t *contents, nbgl_callback_t quitCallback)
void(* nbgl_actionCallback_t)(uint8_t page)
prototype of function to be called when an page of settings is double-pressed
void nbgl_useCaseKeypad(const char *title, uint8_t minDigits, uint8_t maxDigits, bool shuffled, bool hidden, nbgl_pinValidCallback_t validatePinCallback, nbgl_callback_t backCallback)
void nbgl_useCaseReviewStreamingContinueExt(const nbgl_contentTagValueList_t *tagValueList, nbgl_choiceCallback_t choiceCallback, nbgl_callback_t skipCallback)
void nbgl_useCaseReviewBlindSigning(nbgl_operationType_t operationType, const nbgl_contentTagValueList_t *tagValueList, const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, const char *finishTitle, const nbgl_tipBox_t *tipBox, nbgl_choiceCallback_t choiceCallback)
void nbgl_useCaseChoice(const nbgl_icon_details_t *icon, const char *message, const char *subMessage, const char *confirmText, const char *rejectString, nbgl_choiceCallback_t callback)
void nbgl_useCaseGenericReview(const nbgl_genericContents_t *contents, const char *rejectText, nbgl_callback_t rejectCallback)
void nbgl_useCaseStaticReview(const nbgl_contentTagValueList_t *tagValueList, const nbgl_pageInfoLongPress_t *infoLongPress, const char *rejectText, nbgl_choiceCallback_t callback)
void nbgl_useCaseReviewStreamingBlindSigningStart(nbgl_operationType_t operationType, const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, nbgl_choiceCallback_t choiceCallback)
void nbgl_useCaseReviewStreamingContinue(const nbgl_contentTagValueList_t *tagValueList, nbgl_choiceCallback_t choiceCallback)
void nbgl_useCaseReviewLight(nbgl_operationType_t operationType, const nbgl_contentTagValueList_t *tagValueList, const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, const char *finishTitle, nbgl_choiceCallback_t choiceCallback)
uint8_t nbgl_useCaseGetNbChoicesInPage(uint8_t nbChoices, const nbgl_contentRadioChoice_t *choicesList, uint8_t startIndex, bool withNav)
nbgl_genericBarList_t nbgl_warningBarList_t
void nbgl_useCaseReviewStatus(nbgl_reviewStatusType_t reviewStatusType, nbgl_callback_t quitCallback)
void(* nbgl_contentCallback_t)(uint8_t contentIndex, nbgl_content_t *content)
prototype of content navigation callback function
nbgl_reviewStatusType_t
The different types of review status.
@ STATUS_TYPE_TRANSACTION_REJECTED
@ STATUS_TYPE_ADDRESS_REJECTED
@ STATUS_TYPE_TRANSACTION_SIGNED
@ STATUS_TYPE_OPERATION_REJECTED
@ STATUS_TYPE_OPERATION_SIGNED
@ STATUS_TYPE_ADDRESS_VERIFIED
@ STATUS_TYPE_MESSAGE_SIGNED
@ STATUS_TYPE_MESSAGE_REJECTED
bool(* nbgl_navCallback_t)(uint8_t page, nbgl_pageContent_t *content)
prototype of navigation callback function
void nbgl_useCaseAddressReview(const char *address, const nbgl_contentTagValueList_t *additionalTagValueList, const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, nbgl_choiceCallback_t choiceCallback)
nbgl_opType_t
The different types of operation to review.
@ TYPE_MESSAGE
@ TYPE_TRANSACTION
For operations transferring a coin or taken from an account to another.
@ TYPE_OPERATION
For other types of operation (generic type)
void nbgl_useCaseAdvancedReviewStreamingStart(nbgl_operationType_t operationType, const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, const nbgl_warning_t *warning, nbgl_choiceCallback_t choiceCallback)
void nbgl_useCaseAdvancedReview(nbgl_operationType_t operationType, const nbgl_contentTagValueList_t *tagValueList, const nbgl_icon_details_t *icon, const char *reviewTitle, const char *reviewSubTitle, const char *finishTitle, const nbgl_tipBox_t *tipBox, const nbgl_warning_t *warning, nbgl_choiceCallback_t choiceCallback)
uint8_t nbgl_useCaseGetNbSwitchesInPage(uint8_t nbSwitches, const nbgl_contentSwitchesList_t *switchesList, uint8_t startIndex, bool withNav)
This structure contains data to build a BARS_LIST content.
This structure contains info to build a centered (vertically and horizontally) area,...
This structure contains data to build a INFOS_LIST content.
This structure contains data to build a centered info + long press button content.
This structure contains a list of names to build a list of radio buttons (on the right part of screen...
This structure contains a list of [tag,value] pairs.
This structure contains data to build a content.
The necessary parameters to build a list of touchable bars, to display sub-pages.
const struct nbgl_genericDetails_s * details
array of nbBars structures giving what to display when each bar is touched.
uint8_t nbBars
number of touchable bars
const nbgl_icon_details_t ** icons
array of icons for each bar (nbBars items)
const char *const * subTexts
array of texts for each bar (nbBars items, in black)
const char *const * texts
array of texts for each bar (nbBars items, in black/bold)
uint8_t nbContents
number of contents
const nbgl_content_t * contentsList
array of nbgl_content_t (nbContents items).
nbgl_contentCallback_t contentGetterCallback
function to call to retrieve a given content
The necessary parameters to build the page(s) displayed when the top-right button is touched in intro...
const char * title
text of the page (used to go back)
nbgl_genericBarList_t barList
touchable bars list, if type == BAR_LIST_WARNING
nbgl_layoutQRCode_t qrCode
QR code, if type == QRCODE_WARNING.
nbgl_genericDetailsType_t type
type of content in the page, determining what to use in the following union
nbgl_contentCenter_t centeredInfo
centered info, if type == CENTERED_INFO_WARNING
Structure describing the action button in Home Screen.
const nbgl_icon_details_t * icon
icon to use in action button in Home page
nbgl_callback_t callback
function to call when action button is touched in Home page
const char * text
text to use in action button in Home page
nbgl_homeActionStyle_t style
style of action button
This structure contains info to build a centered (vertically and horizontally) area,...
This structure contains data to build a page in multi-pages mode (nbgl_pageDrawGenericContent)
Definition nbgl_flow.h:58
This structure contains data to build a SWITCHES_LIST content.
The necessary parameters to build the prelude of a review use-case.
const nbgl_genericDetails_t * details
pointer to structure containing some details
const char * buttonText
text of the black button, used to open details
const char * footerText
text of the footer, used to continue to the review
const nbgl_icon_details_t * icon
icon of the centered info
const char * description
sub-text of the centered info
const char * title
title of the centered info
The necessary parameters to build a tip-box in first review page and the modal if this tip box is tou...
const char * modalTitle
title given to modal window displayed when tip-box is touched
nbgl_contentInfoList_t infos
infos pairs displayed in modal, if type is INFOS_LIST.
const char * text
text of the tip-box
nbgl_contentType_t type
type of page content in the following union
const nbgl_icon_details_t * icon
icon of the tip-box
The necessary parameters to build a warning page preceding a review. One can either use predefinedSet...
const nbgl_preludeDetails_t * prelude
if not null, means that the review can start by a prelude
const nbgl_icon_details_t * reviewTopRightIcon
const nbgl_warningDetails_t * introDetails
const char * dAppProvider
name of the dApp provider, used in some strings
const nbgl_warningDetails_t * reviewDetails
uint32_t predefinedSet
const char * providerMessage
Dedicated provider message. Default one will be used if NULL.
const nbgl_icon_details_t * introTopRightIcon
icon to use in the intro warning page, if not using pre-defined
const char * reportProvider
name of the security report provider, used in some strings
const char * reportUrl
URL of the report, used in some strings.
const nbgl_contentCenter_t * info
parameters to build the intro warning page, if not using pre-defined