|
Embedded SDK
Embedded SDK
|
Step construction API of NBGL. More...


Go to the source code of this file.
Macros | |
| #define | GET_POS_OF_STEP(_step, _nb_steps) |
| #define | FORWARD_DIRECTION 0x00 |
| When the flow is navigated from last to first step. | |
| #define | BACKWARD_DIRECTION 0x08 |
| When action callback applies on any button press. | |
| #define | ACTION_ON_ANY_BUTTON 0x40 |
| When action callback applies only on both button press. | |
| #define | ACTION_ON_BOTH_BUTTONS 0x00 |
| mask for the position of the step in nbgl_stepPosition_t | |
| #define | STEP_POSITION_MASK 0x03 |
Typedefs | |
| typedef void * | nbgl_step_t |
| type shared externally | |
| typedef void(* | nbgl_stepMenuListCallback_t) (uint8_t choiceIndex) |
| prototype of chosen menu list item callback | |
| typedef void(* | nbgl_stepButtonCallback_t) (nbgl_step_t stepCtx, nbgl_buttonEvent_t event) |
| prototype of function to be called when buttons are touched on a screen | |
| typedef uint8_t | nbgl_stepPosition_t |
| this type is a bitfield containing: | |
Enumerations | |
| enum | { SINGLE_STEP , FIRST_STEP , LAST_STEP , NEITHER_FIRST_NOR_LAST_STEP } |
| possible position for a step in a flow More... | |
Functions | |
| nbgl_step_t | nbgl_stepDrawText (nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, const char *text, const char *subText, nbgl_contentCenteredInfoStyle_t style, bool modal) |
| draws a text type step, that can be multi-pages, depending of the length of text and subText. The navigation arrows are displayed depending of the given position of this step in a flow, and depending of the page in case of multi-pages | |
| nbgl_step_t | nbgl_stepDrawCenteredInfo (nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutCenteredInfo_t *info, bool modal) |
| draw a step with a centered info (icon + text). This is always a single page step | |
| nbgl_step_t | nbgl_stepDrawMenuList (nbgl_stepMenuListCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutMenuList_t *list, bool modal) |
| draw a step page with a menu list and navigation arrows to parse it. This step must be alone | |
| uint8_t | nbgl_stepGetMenuListCurrent (nbgl_step_t step) |
| Get the index of the currently selected item in the menulist. | |
| nbgl_step_t | nbgl_stepDrawSwitch (nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutSwitch_t *switchInfo, bool modal) |
| draw a step page with a switch and navigation arrows to navigate to other pages. | |
| int | nbgl_stepRelease (nbgl_step_t step) |
| Release the step obtained with any of the nbgl_stepDrawXXX() functions. | |
Step construction API of NBGL.
Definition in file nbgl_step.h.
| #define ACTION_ON_ANY_BUTTON 0x40 |
When action callback applies only on both button press.
Definition at line 76 of file nbgl_step.h.
| #define ACTION_ON_BOTH_BUTTONS 0x00 |
mask for the position of the step in nbgl_stepPosition_t
Definition at line 78 of file nbgl_step.h.
| #define BACKWARD_DIRECTION 0x08 |
When action callback applies on any button press.
Definition at line 74 of file nbgl_step.h.
| #define FORWARD_DIRECTION 0x00 |
When the flow is navigated from last to first step.
Definition at line 72 of file nbgl_step.h.
| #define GET_POS_OF_STEP | ( | _step, | |
| _nb_steps | |||
| ) |
get the "position" of a step within a flow of several steps
| _step | step index from which to get the position |
| _nb_steps | number of steps in the flow |
Definition at line 30 of file nbgl_step.h.
| #define STEP_POSITION_MASK 0x03 |
Definition at line 79 of file nbgl_step.h.
| typedef void* nbgl_step_t |
type shared externally
Definition at line 44 of file nbgl_step.h.
| typedef void(* nbgl_stepButtonCallback_t) (nbgl_step_t stepCtx, nbgl_buttonEvent_t event) |
prototype of function to be called when buttons are touched on a screen
| stepCtx | context returned by the nbgl_stepDrawXXX function |
| event | type of button event |
Definition at line 57 of file nbgl_step.h.
| typedef void(* nbgl_stepMenuListCallback_t) (uint8_t choiceIndex) |
prototype of chosen menu list item callback
| choiceIndex | index of the menu list item |
Definition at line 50 of file nbgl_step.h.
| typedef uint8_t nbgl_stepPosition_t |
this type is a bitfield containing:
Definition at line 88 of file nbgl_step.h.
| anonymous enum |
possible position for a step in a flow
| Enumerator | |
|---|---|
| SINGLE_STEP | single step flow |
| FIRST_STEP | first in a multiple steps flow |
| LAST_STEP | last in a multiple steps flow |
| NEITHER_FIRST_NOR_LAST_STEP | neither first nor last in a multiple steps flow |
Definition at line 63 of file nbgl_step.h.
| nbgl_step_t nbgl_stepDrawCenteredInfo | ( | nbgl_stepPosition_t | pos, |
| nbgl_stepButtonCallback_t | onActionCallback, | ||
| nbgl_screenTickerConfiguration_t * | ticker, | ||
| nbgl_layoutCenteredInfo_t * | info, | ||
| bool | modal | ||
| ) |
draw a step with a centered info (icon + text). This is always a single page step
| pos | position of this step in the flow (first, last, single, not_first_nor_last) |
| onActionCallback | common callback for all actions on this page |
| ticker | ticker configuration, set to NULL to disable it |
| info | all information about the centered info to be displayed |
| modal | if true, means this step shall be displayed on top of existing one |
Definition at line 564 of file nbgl_step.c.
| nbgl_step_t nbgl_stepDrawMenuList | ( | nbgl_stepMenuListCallback_t | onActionCallback, |
| nbgl_screenTickerConfiguration_t * | ticker, | ||
| nbgl_layoutMenuList_t * | list, | ||
| bool | modal | ||
| ) |
draw a step page with a menu list and navigation arrows to parse it. This step must be alone
| onActionCallback | common callback for all actions on this page |
| ticker | ticker configuration, set to NULL to disable it |
| list | configuration of the menu list |
| modal | if true, means this step shall be displayed on top of existing one |
Definition at line 619 of file nbgl_step.c.
| nbgl_step_t nbgl_stepDrawSwitch | ( | nbgl_stepPosition_t | pos, |
| nbgl_stepButtonCallback_t | onActionCallback, | ||
| nbgl_screenTickerConfiguration_t * | ticker, | ||
| nbgl_layoutSwitch_t * | switchInfo, | ||
| bool | modal | ||
| ) |
draw a step page with a switch and navigation arrows to navigate to other pages.
| pos | position of this step in the flow (first, last, single, not_first_nor_last) |
| onActionCallback | common callback for all actions on this page |
| ticker | ticker configuration, set to NULL to disable it |
| switchInfo | all information about the switch to be displayed |
| modal | if true, means this step shall be displayed on top of existing one |
Definition at line 675 of file nbgl_step.c.
| nbgl_step_t nbgl_stepDrawText | ( | nbgl_stepPosition_t | pos, |
| nbgl_stepButtonCallback_t | onActionCallback, | ||
| nbgl_screenTickerConfiguration_t * | ticker, | ||
| const char * | text, | ||
| const char * | subText, | ||
| nbgl_contentCenteredInfoStyle_t | style, | ||
| bool | modal | ||
| ) |
draws a text type step, that can be multi-pages, depending of the length of text and subText. The navigation arrows are displayed depending of the given position of this step in a flow, and depending of the page in case of multi-pages
| pos | position of this step in the flow (first, last, single, not_first_nor_last) |
| onActionCallback | common callback for all actions on this page |
| ticker | ticker configuration, set to NULL to disable it |
| text | text to display (depending of style) |
| subText | text to display under text (depending of style) |
| style | style to use for text and subText |
| modal | if true, means this step shall be displayed on top of existing one |
Definition at line 456 of file nbgl_step.c.
| uint8_t nbgl_stepGetMenuListCurrent | ( | nbgl_step_t | step | ) |
Get the index of the currently selected item in the menulist.
| step | step from which to get the current menulist choice |
Definition at line 654 of file nbgl_step.c.
| int nbgl_stepRelease | ( | nbgl_step_t | step | ) |
Release the step obtained with any of the nbgl_stepDrawXXX() functions.
| step | step to release |
Definition at line 726 of file nbgl_step.c.