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/**********************
120 * MACROS
121 **********************/
122
123/**********************
124 * TYPEDEFS
125 **********************/
129typedef void (*nbgl_callback_t)(void);
130
137typedef bool (*nbgl_navCallback_t)(uint8_t page, nbgl_pageContent_t *content);
138
143typedef void (*nbgl_choiceCallback_t)(bool confirm);
144
149typedef void (*nbgl_actionCallback_t)(uint8_t page);
150
156typedef void (*nbgl_pinValidCallback_t)(const uint8_t *pin, uint8_t pinLen);
157
163typedef void (*nbgl_contentCallback_t)(uint8_t contentIndex, nbgl_content_t *content);
164
175
184
195
201typedef struct {
202 const char *text;
204 const char *modalTitle;
206 union {
209 };
211
221
226typedef struct {
227 uint8_t nbBars;
228 const char *const *texts;
229 const char *const *subTexts;
231 const struct nbgl_warningDetails_s
234
253
266
296
308
314#define SKIPPABLE_OPERATION (1 << 4)
315
321#define BLIND_OPERATION (1 << 5)
322
328typedef uint32_t nbgl_operationType_t;
329
344
345/**********************
346 * GLOBAL PROTOTYPES
347 **********************/
348
349void nbgl_useCaseHomeAndSettings(const char *appName,
350 const nbgl_icon_details_t *appIcon,
351 const char *tagline,
352 const uint8_t initSettingPage,
353 const nbgl_genericContents_t *settingContents,
354 const nbgl_contentInfoList_t *infosList,
355 const nbgl_homeAction_t *action,
356 nbgl_callback_t quitCallback);
357
359 const nbgl_contentTagValueList_t *tagValueList,
360 const nbgl_icon_details_t *icon,
361 const char *reviewTitle,
362 const char *reviewSubTitle,
363 const char *finishTitle,
364 nbgl_choiceCallback_t choiceCallback);
365
367 const nbgl_contentTagValueList_t *tagValueList,
368 const nbgl_icon_details_t *icon,
369 const char *reviewTitle,
370 const char *reviewSubTitle,
371 const char *finishTitle,
372 const nbgl_tipBox_t *tipBox,
373 nbgl_choiceCallback_t choiceCallback);
375 const nbgl_contentTagValueList_t *tagValueList,
376 const nbgl_icon_details_t *icon,
377 const char *reviewTitle,
378 const char *reviewSubTitle,
379 const char *finishTitle,
380 const nbgl_tipBox_t *tipBox,
381 const nbgl_warning_t *warning,
382 nbgl_choiceCallback_t choiceCallback);
383
385 const nbgl_contentTagValueList_t *tagValueList,
386 const nbgl_icon_details_t *icon,
387 const char *reviewTitle,
388 const char *reviewSubTitle,
389 const char *finishTitle,
390 nbgl_choiceCallback_t choiceCallback);
391
392void nbgl_useCaseAddressReview(const char *address,
393 const nbgl_contentTagValueList_t *additionalTagValueList,
394 const nbgl_icon_details_t *icon,
395 const char *reviewTitle,
396 const char *reviewSubTitle,
397 nbgl_choiceCallback_t choiceCallback);
398
400 nbgl_callback_t quitCallback);
401
403 const nbgl_icon_details_t *icon,
404 const char *reviewTitle,
405 const char *reviewSubTitle,
406 nbgl_choiceCallback_t choiceCallback);
407
409 const nbgl_icon_details_t *icon,
410 const char *reviewTitle,
411 const char *reviewSubTitle,
412 nbgl_choiceCallback_t choiceCallback);
413
415 const nbgl_icon_details_t *icon,
416 const char *reviewTitle,
417 const char *reviewSubTitle,
418 const nbgl_warning_t *warning,
419 nbgl_choiceCallback_t choiceCallback);
420
422 nbgl_choiceCallback_t choiceCallback,
423 nbgl_callback_t skipCallback);
424
426 nbgl_choiceCallback_t choiceCallback);
427
428void nbgl_useCaseReviewStreamingFinish(const char *finishTitle,
429 nbgl_choiceCallback_t choiceCallback);
430
432 const char *rejectText,
433 nbgl_callback_t rejectCallback);
434
435void nbgl_useCaseGenericConfiguration(const char *title,
436 uint8_t initPage,
437 const nbgl_genericContents_t *contents,
438 nbgl_callback_t quitCallback);
439
440void nbgl_useCaseGenericSettings(const char *appName,
441 uint8_t initPage,
442 const nbgl_genericContents_t *settingContents,
443 const nbgl_contentInfoList_t *infosList,
444 nbgl_callback_t quitCallback);
445
447 const char *message,
448 const char *subMessage,
449 const char *confirmText,
450 const char *rejectString,
451 nbgl_choiceCallback_t callback);
452
453void nbgl_useCaseStatus(const char *message, bool isSuccess, nbgl_callback_t quitCallback);
454
455void nbgl_useCaseConfirm(const char *message,
456 const char *subMessage,
457 const char *confirmText,
458 const char *rejectText,
459 nbgl_callback_t callback);
460
462 const char *message,
463 const char *actionText,
464 nbgl_callback_t callback);
465
466void nbgl_useCaseSpinner(const char *text);
467
468void nbgl_useCaseNavigableContent(const char *title,
469 uint8_t initPage,
470 uint8_t nbPages,
471 nbgl_callback_t quitCallback,
472 nbgl_navCallback_t navCallback,
473 nbgl_layoutTouchCallback_t controlsCallback);
474
475// utils
476uint8_t nbgl_useCaseGetNbTagValuesInPage(uint8_t nbPairs,
477 const nbgl_contentTagValueList_t *tagValueList,
478 uint8_t startIndex,
479 bool *requireSpecificDisplay);
481 const nbgl_contentTagValueList_t *tagValueList,
482 uint8_t startIndex,
483 bool isSkippable,
484 bool *requireSpecificDisplay);
485uint8_t nbgl_useCaseGetNbInfosInPage(uint8_t nbInfos,
486 const nbgl_contentInfoList_t *infosList,
487 uint8_t startIndex,
488 bool withNav);
489uint8_t nbgl_useCaseGetNbSwitchesInPage(uint8_t nbSwitches,
490 const nbgl_contentSwitchesList_t *switchesList,
491 uint8_t startIndex,
492 bool withNav);
493uint8_t nbgl_useCaseGetNbBarsInPage(uint8_t nbBars,
494 const nbgl_contentBarsList_t *barsList,
495 uint8_t startIndex,
496 bool withNav);
497uint8_t nbgl_useCaseGetNbChoicesInPage(uint8_t nbChoices,
498 const nbgl_contentRadioChoice_t *choicesList,
499 uint8_t startIndex,
500 bool withNav);
502
503#ifdef HAVE_SE_TOUCH
504// use case drawing
505DEPRECATED void nbgl_useCaseHome(const char *appName,
506 const nbgl_icon_details_t *appIcon,
507 const char *tagline,
508 bool withSettings,
509 nbgl_callback_t topRightCallback,
510 nbgl_callback_t quitCallback);
511DEPRECATED void nbgl_useCaseHomeExt(const char *appName,
512 const nbgl_icon_details_t *appIcon,
513 const char *tagline,
514 bool withSettings,
515 const char *actionButtonText,
516 nbgl_callback_t actionCallback,
517 nbgl_callback_t topRightCallback,
518 nbgl_callback_t quitCallback);
519DEPRECATED void nbgl_useCaseSettings(const char *settingsTitle,
520 uint8_t initPage,
521 uint8_t nbPages,
522 bool touchableTitle,
523 nbgl_callback_t quitCallback,
524 nbgl_navCallback_t navCallback,
525 nbgl_layoutTouchCallback_t controlsCallback);
527 const char *reviewTitle,
528 const char *reviewSubTitle,
529 const char *rejectText,
530 nbgl_callback_t continueCallback,
531 nbgl_callback_t rejectCallback);
532DEPRECATED void nbgl_useCaseRegularReview(uint8_t initPage,
533 uint8_t nbPages,
534 const char *rejectText,
535 nbgl_layoutTouchCallback_t buttonCallback,
536 nbgl_navCallback_t navCallback,
537 nbgl_choiceCallback_t choiceCallback);
539 const nbgl_pageInfoLongPress_t *infoLongPress,
540 const char *rejectText,
541 nbgl_choiceCallback_t callback);
543 const nbgl_pageInfoLongPress_t *infoLongPress,
544 const char *rejectText,
545 nbgl_choiceCallback_t callback);
546
547DEPRECATED void nbgl_useCaseAddressConfirmationExt(const char *address,
548 nbgl_choiceCallback_t callback,
549 const nbgl_contentTagValueList_t *tagValueList);
550#define nbgl_useCaseAddressConfirmation(__address, __callback) \
551 nbgl_useCaseAddressConfirmationExt(__address, __callback, NULL)
552
553#ifdef NBGL_KEYPAD
554void nbgl_useCaseKeypadDigits(const char *title,
555 uint8_t minDigits,
556 uint8_t maxDigits,
557 uint8_t backToken,
558 bool shuffled,
559 tune_index_e tuneId,
560 nbgl_pinValidCallback_t validatePinCallback,
561 nbgl_layoutTouchCallback_t actionCallback);
562void nbgl_useCaseKeypadPIN(const char *title,
563 uint8_t minDigits,
564 uint8_t maxDigits,
565 uint8_t backToken,
566 bool shuffled,
567 tune_index_e tuneId,
568 nbgl_pinValidCallback_t validatePinCallback,
569 nbgl_layoutTouchCallback_t actionCallback);
570#endif // NBGL_KEYPAD
571
572#else // HAVE_SE_TOUCH
573#ifdef NBGL_KEYPAD
574void nbgl_useCaseKeypadDigits(const char *title,
575 uint8_t minDigits,
576 uint8_t maxDigits,
577 bool shuffled,
578 nbgl_pinValidCallback_t validatePinCallback,
579 nbgl_callback_t backCallback);
580void nbgl_useCaseKeypadPIN(const char *title,
581 uint8_t minDigits,
582 uint8_t maxDigits,
583 bool shuffled,
584 nbgl_pinValidCallback_t validatePinCallback,
585 nbgl_callback_t backCallback);
586#endif // NBGL_KEYPAD
587#endif // HAVE_SE_TOUCH
588
589#ifdef __cplusplus
590} /* extern "C" */
591#endif
592
593#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)
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)
void(* nbgl_callback_t)(void)
prototype of generic callback function
void nbgl_useCaseGenericSettings(const char *appName, uint8_t initPage, const nbgl_genericContents_t *settingContents, const nbgl_contentInfoList_t *infosList, nbgl_callback_t quitCallback)
void nbgl_useCaseKeypadPIN(const char *title, uint8_t minDigits, uint8_t maxDigits, uint8_t backToken, bool shuffled, tune_index_e tuneId, nbgl_pinValidCallback_t validatePinCallback, nbgl_layoutTouchCallback_t actionCallback)
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)
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)
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_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)
struct nbgl_warningDetails_s nbgl_warningDetails_t
The necessary parameters to build the page(s) displayed when the top-right button is touched in intro...
void nbgl_useCaseKeypadDigits(const char *title, uint8_t minDigits, uint8_t maxDigits, uint8_t backToken, bool shuffled, tune_index_e tuneId, nbgl_pinValidCallback_t validatePinCallback, nbgl_layoutTouchCallback_t actionCallback)
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_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)
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_warningDetailsType_t
The different types of warning page contents.
@ CENTERED_INFO_WARNING
Centered info.
@ QRCODE_WARNING
QR Code.
@ BAR_LIST_WARNING
list of touchable bars, to display sub-pages
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.
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
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 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 list of touchable bars, to display sub-pages.
const char *const * texts
array of texts for each bar (nbBars items, in black/bold)
const struct nbgl_warningDetails_s * details
array of nbBars structures giving what to display when each bar is touched.
const char *const * subTexts
array of texts for each bar (nbBars items, in black)
uint8_t nbBars
number of touchable bars
const nbgl_icon_details_t ** icons
array of icons for each bar (nbBars items)
The necessary parameters to build the page(s) displayed when the top-right button is touched in intro...
nbgl_warningDetailsType_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
const char * title
text of the page (used to go back)
nbgl_layoutQRCode_t qrCode
QR code, if type == QRCODE_WARNING.
nbgl_warningBarList_t barList
touchable bars list, if type == BAR_LIST_WARNING
The necessary parameters to build a warning page preceding a review. One can either use predefinedSet...
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