Embedded SDK
Embedded SDK
Macros | Typedefs | Enumerations | Functions
nbgl_step.h File Reference

Step construction API of NBGL. More...

#include "nbgl_layout.h"
#include "nbgl_obj.h"
#include "nbgl_types.h"
Include dependency graph for nbgl_step.h:
This graph shows which files directly or indirectly include this file:

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. More...
 
#define BACKWARD_DIRECTION   0x08
 

Typedefs

typedef void * nbgl_step_t
 type shared externally More...
 
typedef void(* nbgl_stepMenuListCallback_t) (uint8_t choiceIndex)
 prototype of chosen menu list item callback More...
 
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 More...
 
typedef uint8_t nbgl_stepPosition_t
 this type contains nbgl_layoutNavIndication_t in its LSBs and direction in its MSB (using FORWARD_DIRECTION and BACKWARD_DIRECTION) More...
 

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)
 
nbgl_step_t nbgl_stepDrawCenteredInfo (nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutCenteredInfo_t *info, bool modal)
 
nbgl_step_t nbgl_stepDrawMenuList (nbgl_stepMenuListCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutMenuList_t *list, bool modal)
 
uint8_t nbgl_stepGetMenuListCurrent (nbgl_step_t step)
 
int nbgl_stepRelease (nbgl_step_t step)
 

Detailed Description

Step construction API of NBGL.

Definition in file nbgl_step.h.

Macro Definition Documentation

◆ BACKWARD_DIRECTION

#define BACKWARD_DIRECTION   0x08

Definition at line 75 of file nbgl_step.h.

◆ FORWARD_DIRECTION

#define FORWARD_DIRECTION   0x00

When the flow is navigated from last to first step.

Definition at line 74 of file nbgl_step.h.

◆ GET_POS_OF_STEP

#define GET_POS_OF_STEP (   _step,
  _nb_steps 
)
Value:
(_nb_steps < 2) \
: ((_step == 0) ? FIRST_STEP \
: ((_step == (_nb_steps - 1)) ? LAST_STEP : NEITHER_FIRST_NOR_LAST_STEP))
@ NEITHER_FIRST_NOR_LAST_STEP
neither first nor last in a multiple steps flow
Definition: nbgl_step.h:69
@ SINGLE_STEP
single step flow
Definition: nbgl_step.h:66
@ LAST_STEP
last in a multiple steps flow
Definition: nbgl_step.h:68
@ FIRST_STEP
first in a multiple steps flow
Definition: nbgl_step.h:67

get the "position" of a step within a flow of several steps

Parameters
_stepstep index from which to get the position
_nb_stepsnumber of steps in the flow

Definition at line 33 of file nbgl_step.h.

Typedef Documentation

◆ nbgl_step_t

typedef void* nbgl_step_t

type shared externally

Definition at line 47 of file nbgl_step.h.

◆ nbgl_stepButtonCallback_t

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

Parameters
eventtype of button event

Definition at line 59 of file nbgl_step.h.

◆ nbgl_stepMenuListCallback_t

typedef void(* nbgl_stepMenuListCallback_t) (uint8_t choiceIndex)

prototype of chosen menu list item callback

Parameters
choiceIndexindex of the menu list item

Definition at line 53 of file nbgl_step.h.

◆ nbgl_stepPosition_t

this type contains nbgl_layoutNavIndication_t in its LSBs and direction in its MSB (using FORWARD_DIRECTION and BACKWARD_DIRECTION)

Definition at line 82 of file nbgl_step.h.

Enumeration Type Documentation

◆ anonymous enum

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 65 of file nbgl_step.h.

Function Documentation

◆ nbgl_stepDrawCenteredInfo()

nbgl_step_t nbgl_stepDrawCenteredInfo ( nbgl_stepPosition_t  pos,
nbgl_stepButtonCallback_t  onActionCallback,
nbgl_screenTickerConfiguration_t ticker,
nbgl_layoutCenteredInfo_t info,
bool  modal 
)

◆ nbgl_stepDrawMenuList()

nbgl_step_t nbgl_stepDrawMenuList ( nbgl_stepMenuListCallback_t  onActionCallback,
nbgl_screenTickerConfiguration_t ticker,
nbgl_layoutMenuList_t list,
bool  modal 
)

◆ nbgl_stepDrawText()

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 
)

◆ nbgl_stepGetMenuListCurrent()

uint8_t nbgl_stepGetMenuListCurrent ( nbgl_step_t  step)

◆ nbgl_stepRelease()

int nbgl_stepRelease ( nbgl_step_t  step)