Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
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
11extern "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
47typedef void *nbgl_step_t;
48
53typedef void (*nbgl_stepMenuListCallback_t)(uint8_t choiceIndex);
54
61
66enum {
71};
72
74#define FORWARD_DIRECTION 0x00
76#define BACKWARD_DIRECTION 0x08
78#define ACTION_ON_ANY_BUTTON 0x40
80#define ACTION_ON_BOTH_BUTTONS 0x00
82#define STEP_POSITION_MASK 0x03
83
92
93/**********************
94 * GLOBAL PROTOTYPES
95 **********************/
96
98 nbgl_stepButtonCallback_t onActionCallback,
100 const char *text,
101 const char *subText,
103 bool modal);
105 nbgl_stepButtonCallback_t onActionCallback,
108 bool modal);
112 bool modal);
115 nbgl_stepButtonCallback_t onActionCallback,
117 nbgl_layoutSwitch_t *switchInfo,
118 bool modal);
120
121/**********************
122 * MACROS
123 **********************/
124
125#ifdef __cplusplus
126} /* extern "C" */
127#endif
128
129#endif /* NBGL_STEP_H */
nbgl_contentCenteredInfoStyle_t
possible styles for Centered Info Area
API of the Advanced BOLOS Graphical Library, for predefined layouts.
API to draw all basic graphic objects.
nbgl_buttonEvent_t
Definition nbgl_obj.h:195
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:60
uint8_t nbgl_stepGetMenuListCurrent(nbgl_step_t step)
nbgl_step_t nbgl_stepDrawSwitch(nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutSwitch_t *switchInfo, bool modal)
void * nbgl_step_t
type shared externally
Definition nbgl_step.h:47
uint8_t nbgl_stepPosition_t
this type is a bitfield containing:
Definition nbgl_step.h:91
nbgl_step_t nbgl_stepDrawMenuList(nbgl_stepMenuListCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutMenuList_t *list, bool modal)
@ NEITHER_FIRST_NOR_LAST_STEP
neither first nor last in a multiple steps flow
Definition nbgl_step.h:70
@ SINGLE_STEP
single step flow
Definition nbgl_step.h:67
@ LAST_STEP
last in a multiple steps flow
Definition nbgl_step.h:69
@ FIRST_STEP
first in a multiple steps flow
Definition nbgl_step.h:68
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,...
This structure contains info to build a switch (on the right) with a description (on the left),...
This structure contains a list of names to build a menu list on Nanos, with for each item a descripti...
unsigned char uint8_t
Definition usbd_conf.h:53