Embedded SDK
Embedded SDK
nbgl_step.h
Go to the documentation of this file.
1 
7 #ifndef NBGL_STEP_H
8 #define NBGL_STEP_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /*********************
15  * INCLUDES
16  *********************/
17 
18 #include "nbgl_layout.h"
19 #include "nbgl_obj.h"
20 #include "nbgl_types.h"
21 
22 /*********************
23  * DEFINES
24  *********************/
30 #define GET_POS_OF_STEP(_step, _nb_steps) \
31  (_nb_steps < 2) \
32  ? SINGLE_STEP \
33  : ((_step == 0) ? FIRST_STEP \
34  : ((_step == (_nb_steps - 1)) ? LAST_STEP : NEITHER_FIRST_NOR_LAST_STEP))
35 
36 /**********************
37  * TYPEDEFS
38  **********************/
39 
44 typedef void *nbgl_step_t;
45 
50 typedef void (*nbgl_stepMenuListCallback_t)(uint8_t choiceIndex);
51 
57 
62 enum {
67 };
68 
70 #define FORWARD_DIRECTION 0x00
72 #define BACKWARD_DIRECTION 0x08
73 
80 
81 /**********************
82  * GLOBAL PROTOTYPES
83  **********************/
84 
86  nbgl_stepButtonCallback_t onActionCallback,
88  const char *text,
89  const char *subText,
91  bool modal);
93  nbgl_stepButtonCallback_t onActionCallback,
96  bool modal);
100  bool modal);
103 
104 /**********************
105  * MACROS
106  **********************/
107 
108 #ifdef __cplusplus
109 } /* extern "C" */
110 #endif
111 
112 #endif /* NBGL_STEP_H */
nbgl_contentCenteredInfoStyle_t
possible styles for Centered Info Area
Definition: nbgl_content.h:34
API of the Advanced BOLOS Graphical Library, for predefined layouts.
API to draw all basic graphic objects.
nbgl_buttonEvent_t
Definition: nbgl_obj.h:182
struct PACKED__ nbgl_screenTickerConfiguration_s nbgl_screenTickerConfiguration_t
struct to configure a screen layer
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
Definition: nbgl_step.h:56
@ NEITHER_FIRST_NOR_LAST_STEP
neither first nor last in a multiple steps flow
Definition: nbgl_step.h:66
@ SINGLE_STEP
single step flow
Definition: nbgl_step.h:63
@ LAST_STEP
last in a multiple steps flow
Definition: nbgl_step.h:65
@ FIRST_STEP
first in a multiple steps flow
Definition: nbgl_step.h:64
uint8_t nbgl_stepGetMenuListCurrent(nbgl_step_t step)
void * nbgl_step_t
type shared externally
Definition: nbgl_step.h:44
uint8_t nbgl_stepPosition_t
this type contains nbgl_layoutNavIndication_t in its LSBs and direction in its MSB (using FORWARD_DIR...
Definition: nbgl_step.h:79
nbgl_step_t nbgl_stepDrawMenuList(nbgl_stepMenuListCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutMenuList_t *list, bool modal)
int nbgl_stepRelease(nbgl_step_t step)
void(* nbgl_stepMenuListCallback_t)(uint8_t choiceIndex)
prototype of chosen menu list item callback
Definition: nbgl_step.h:50
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)
common types for Graphical Library
This structure contains info to build a centered (vertically and horizontally) area,...
Definition: nbgl_content.h:57
This structure contains a list of names to build a menu list on Nanos, with for each item a descripti...
Definition: nbgl_layout.h:235
unsigned char uint8_t
Definition: usbd_conf.h:53