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 #ifdef HAVE_LANGUAGE_PACK
22 #include "bolos_ux_loc_strings.h"
23 #endif // HAVE_LANGUAGE_PACK
24 
25 /*********************
26  * DEFINES
27  *********************/
33 #define GET_POS_OF_STEP(_step, _nb_steps) \
34  (_nb_steps < 2) \
35  ? SINGLE_STEP \
36  : ((_step == 0) ? FIRST_STEP \
37  : ((_step == (_nb_steps - 1)) ? LAST_STEP : NEITHER_FIRST_NOR_LAST_STEP))
38 
39 /**********************
40  * TYPEDEFS
41  **********************/
42 
47 typedef void *nbgl_step_t;
48 
53 typedef void (*nbgl_stepMenuListCallback_t)(uint8_t choiceIndex);
54 
60 
65 enum {
70 };
71 
73 #define FORWARD_DIRECTION 0x00
75 #define BACKWARD_DIRECTION 0x08
76 
83 
84 /**********************
85  * GLOBAL PROTOTYPES
86  **********************/
87 
89  nbgl_stepButtonCallback_t onActionCallback,
91  const char *text,
92  const char *subText,
94  bool modal);
96  nbgl_stepButtonCallback_t onActionCallback,
99  bool modal);
102  nbgl_layoutMenuList_t *list,
103  bool modal);
106 
107 /**********************
108  * MACROS
109  **********************/
110 
111 #ifdef __cplusplus
112 } /* extern "C" */
113 #endif
114 
115 #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:59
@ 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
uint8_t nbgl_stepGetMenuListCurrent(nbgl_step_t step)
void * nbgl_step_t
type shared externally
Definition: nbgl_step.h:47
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:82
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:53
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