Skip to content

Commit

Permalink
Add missing API or feature for Nano on NBGL
Browse files Browse the repository at this point in the history
  • Loading branch information
cedelavergne-ledger committed Jan 9, 2025
1 parent 5860eab commit feb1594
Show file tree
Hide file tree
Showing 4 changed files with 764 additions and 125 deletions.
15 changes: 14 additions & 1 deletion lib_nbgl/include/nbgl_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,20 @@ typedef struct nbgl_stepDesc_s {
#endif // HAVE_LANGUAGE_PACK
} nbgl_stepDesc_t;

typedef nbgl_stepDesc_t nbgl_pageContent_t;
/**
* @brief This structure contains data to build a page in multi-pages mode (@ref
* nbgl_pageDrawGenericContent)
*/
typedef struct nbgl_pageContent_s {
nbgl_contentType_t type; ///< type of page content in the following union
union {
nbgl_contentCenteredInfo_t centeredInfo; ///< @ref CENTERED_INFO type
nbgl_contentTagValueList_t tagValueList; ///< @ref TAG_VALUE_LIST type
nbgl_contentSwitchesList_t switchesList; ///< @ref SWITCHES_LIST type
nbgl_contentInfoList_t infosList; ///< @ref INFOS_LIST type
nbgl_contentBarsList_t barsList; ///< @ref BARS_LIST type
};
} nbgl_pageContent_t;

/**********************
* GLOBAL PROTOTYPES
Expand Down
15 changes: 8 additions & 7 deletions lib_nbgl/include/nbgl_use_case.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,13 @@ void nbgl_useCaseStatus(const char *message, bool isSuccess, nbgl_callback_t qui

void nbgl_useCaseSpinner(const char *text);

#ifdef HAVE_SE_TOUCH
void nbgl_useCaseNavigableContent(const char *title,
uint8_t initPage,
uint8_t nbPages,
nbgl_callback_t quitCallback,
nbgl_navCallback_t navCallback,
nbgl_layoutTouchCallback_t controlsCallback);

// utils
uint8_t nbgl_useCaseGetNbTagValuesInPage(uint8_t nbPairs,
const nbgl_contentTagValueList_t *tagValueList,
Expand Down Expand Up @@ -364,6 +370,7 @@ uint8_t nbgl_useCaseGetNbChoicesInPage(uint8_t nbChoice
bool withNav);
uint8_t nbgl_useCaseGetNbPagesForTagValueList(const nbgl_contentTagValueList_t *tagValueList);

#ifdef HAVE_SE_TOUCH
// use case drawing
DEPRECATED void nbgl_useCaseHome(const char *appName,
const nbgl_icon_details_t *appIcon,
Expand All @@ -379,12 +386,6 @@ DEPRECATED void nbgl_useCaseHomeExt(const char *appName,
nbgl_callback_t actionCallback,
nbgl_callback_t topRightCallback,
nbgl_callback_t quitCallback);
void nbgl_useCaseNavigableContent(const char *title,
uint8_t initPage,
uint8_t nbPages,
nbgl_callback_t quitCallback,
nbgl_navCallback_t navCallback,
nbgl_layoutTouchCallback_t controlsCallback);
DEPRECATED void nbgl_useCaseSettings(const char *settingsTitle,
uint8_t initPage,
uint8_t nbPages,
Expand Down
1 change: 1 addition & 0 deletions lib_nbgl/src/nbgl_use_case.c
Original file line number Diff line number Diff line change
Expand Up @@ -3056,6 +3056,7 @@ void nbgl_useCaseReviewBlindSigning(nbgl_operationType_t operationT

blindSigningWarning();
}

/**
* @brief Draws a flow of pages of a light review. Navigation operates with either swipe or
* navigation keys at bottom right. The last page contains a button/footer with the given
Expand Down
Loading

0 comments on commit feb1594

Please sign in to comment.