Embedded SDK
Embedded SDK
Functions
nbgl_page.c File Reference

Implementation of predefined pages management for Applications. More...

#include <string.h>
#include "nbgl_debug.h"
#include "nbgl_page.h"
#include "glyphs.h"
#include "os_pic.h"
Include dependency graph for nbgl_page.c:

Go to the source code of this file.

Functions

nbgl_page_tnbgl_pageDrawLedgerInfo (nbgl_layoutTouchCallback_t onActionCallback, const nbgl_screenTickerConfiguration_t *ticker, const char *text, int tapActionToken)
 draw a page with a centered text in large case, with a round check icon More...
 
nbgl_page_tnbgl_pageDrawSpinner (nbgl_layoutTouchCallback_t onActionCallback, const char *text)
 draw a spinner page with the given parameters. The spinner will "rotate" automatically every 800 ms More...
 
nbgl_page_tnbgl_pageDrawInfo (nbgl_layoutTouchCallback_t onActionCallback, const nbgl_screenTickerConfiguration_t *ticker, const nbgl_pageInfoDescription_t *info)
 draw a page with a centered info (icon and/or texts) with a touchable footer, in a potential "tapable" area, with an optional top-right button, with an optional bottom button More...
 
nbgl_page_tnbgl_pageDrawConfirmation (nbgl_layoutTouchCallback_t onActionCallback, const nbgl_pageConfirmationDescription_t *info)
 draw a confirmation page, with a centered info (icon and/or text), a button to confirm and a footer to cancel More...
 
nbgl_page_tnbgl_pageDrawGenericContentExt (nbgl_layoutTouchCallback_t onActionCallback, const nbgl_pageNavigationInfo_t *nav, nbgl_pageContent_t *content, bool modal)
 draw a generic content page, with the given content, and if nav parameter is not NULL, with the given navigation controls (either with navigation bar or with "tap" and "back") More...
 
nbgl_page_tnbgl_pageDrawGenericContent (nbgl_layoutTouchCallback_t onActionCallback, const nbgl_pageNavigationInfo_t *nav, nbgl_pageContent_t *content)
 draw a generic content page, with the given content, and if nav parameter is not NULL, with the given navigation controls (either with navigation bar or with "tap" and "back") More...
 
int nbgl_pageRelease (nbgl_page_t *page)
 Release the page obtained with any of the nbgl_pageDrawXXX() functions. More...
 

Detailed Description

Implementation of predefined pages management for Applications.

Definition in file nbgl_page.c.

Function Documentation

◆ nbgl_pageDrawConfirmation()

nbgl_page_t* nbgl_pageDrawConfirmation ( nbgl_layoutTouchCallback_t  onActionCallback,
const nbgl_pageConfirmationDescription_t info 
)

draw a confirmation page, with a centered info (icon and/or text), a button to confirm and a footer to cancel

Parameters
onActionCallbackcommon callback for all actions on this page
infostructure describing the centered info and other controls of this page
Returns
the page context (or NULL if error)

Definition at line 441 of file nbgl_page.c.

◆ nbgl_pageDrawGenericContent()

nbgl_page_t* nbgl_pageDrawGenericContent ( nbgl_layoutTouchCallback_t  onActionCallback,
const nbgl_pageNavigationInfo_t nav,
nbgl_pageContent_t content 
)

draw a generic content page, with the given content, and if nav parameter is not NULL, with the given navigation controls (either with navigation bar or with "tap" and "back")

Parameters
onActionCallbackcommon callback for all actions on this page
navstructure describing the navigation controls of this page (no navigation if NULL)
contentstructure describing the main content of this page
Returns
the page context (or NULL if error)

Definition at line 611 of file nbgl_page.c.

◆ nbgl_pageDrawGenericContentExt()

nbgl_page_t* nbgl_pageDrawGenericContentExt ( nbgl_layoutTouchCallback_t  onActionCallback,
const nbgl_pageNavigationInfo_t nav,
nbgl_pageContent_t content,
bool  modal 
)

draw a generic content page, with the given content, and if nav parameter is not NULL, with the given navigation controls (either with navigation bar or with "tap" and "back")

Parameters
onActionCallbackcommon callback for all actions on this page
navstructure describing the navigation controls of this page (no navigation if NULL)
contentstructure describing the main content of this page
modalset to true to draw as a modal
Returns
the page context (or NULL if error)

Definition at line 482 of file nbgl_page.c.

◆ nbgl_pageDrawInfo()

nbgl_page_t* nbgl_pageDrawInfo ( nbgl_layoutTouchCallback_t  onActionCallback,
const nbgl_screenTickerConfiguration_t ticker,
const nbgl_pageInfoDescription_t info 
)

draw a page with a centered info (icon and/or texts) with a touchable footer, in a potential "tapable" area, with an optional top-right button, with an optional bottom button

Parameters
onActionCallbackcommon callback for all actions on this page
tickerticker configuration, set to NULL to disable it
infostructure describing the centered info and other controls of this page
Returns
the page context (or NULL if error)

Definition at line 323 of file nbgl_page.c.

◆ nbgl_pageDrawLedgerInfo()

nbgl_page_t* nbgl_pageDrawLedgerInfo ( nbgl_layoutTouchCallback_t  onActionCallback,
const nbgl_screenTickerConfiguration_t ticker,
const char *  text,
int  tapActionToken 
)

draw a page with a centered text in large case, with a round check icon

Parameters
onActionCallbackcommon callback for all actions on this page
tickerticker configuration, set to NULL to disable it
texttext in LEDGER style (UPPER CASE only)
tapActionTokentoken passed to onActionCallback, on a tap event
Returns
the page context (or NULL if error)

Definition at line 250 of file nbgl_page.c.

◆ nbgl_pageDrawSpinner()

nbgl_page_t* nbgl_pageDrawSpinner ( nbgl_layoutTouchCallback_t  onActionCallback,
const char *  text 
)

draw a spinner page with the given parameters. The spinner will "rotate" automatically every 800 ms

Parameters
onActionCallbackcommon callback for all actions on this page (unused, so set to NULL)
texttext to use under spinner
Returns
the page context (or NULL if error)

Definition at line 293 of file nbgl_page.c.

◆ nbgl_pageRelease()

int nbgl_pageRelease ( nbgl_page_t page)

Release the page obtained with any of the nbgl_pageDrawXXX() functions.

Parameters
pagepage to release
Returns
>= 0 if OK

Definition at line 624 of file nbgl_page.c.