Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_step.h
Go to the documentation of this file.
1
6
7#ifndef NBGL_STEP_H
8#define NBGL_STEP_H
9
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16/*********************
17 * INCLUDES
18 *********************/
19
20#include "nbgl_layout.h"
21#include "nbgl_obj.h"
22#include "nbgl_types.h"
23
24/*********************
25 * DEFINES
26 *********************/
32#define GET_POS_OF_STEP(_step, _nb_steps) \
33 (_nb_steps < 2) \
34 ? SINGLE_STEP \
35 : ((_step == 0) ? FIRST_STEP \
36 : ((_step == (_nb_steps - 1)) ? LAST_STEP : NEITHER_FIRST_NOR_LAST_STEP))
37
38/**********************
39 * TYPEDEFS
40 **********************/
41
46typedef void *nbgl_step_t;
47
52typedef void (*nbgl_stepMenuListCallback_t)(uint8_t choiceIndex);
53
60
65enum {
70};
71
73#define FORWARD_DIRECTION 0x00
75#define BACKWARD_DIRECTION 0x08
77#define ACTION_ON_ANY_BUTTON 0x40
79#define ACTION_ON_BOTH_BUTTONS 0x00
81#define STEP_POSITION_MASK 0x03
82
90typedef uint8_t nbgl_stepPosition_t;
91
92/**********************
93 * GLOBAL PROTOTYPES
94 **********************/
95
97 nbgl_stepButtonCallback_t onActionCallback,
99 const char *text,
100 const char *subText,
102 bool modal);
104 nbgl_stepButtonCallback_t onActionCallback,
107 bool modal);
111 bool modal);
114 nbgl_stepButtonCallback_t onActionCallback,
116 nbgl_layoutSwitch_t *switchInfo,
117 bool modal);
119
120/**********************
121 * MACROS
122 **********************/
123
124#ifdef __cplusplus
125} /* extern "C" */
126#endif
127
128#endif /* NBGL_STEP_H */
nbgl_contentCenteredInfoStyle_t
possible styles for Centered Info Area
API of the Advanced BOLOS Graphical Library, for predefined layouts.
nbgl_contentSwitch_t nbgl_layoutSwitch_t
Deprecated, kept for retro compatibility.
nbgl_contentCenteredInfo_t nbgl_layoutCenteredInfo_t
Deprecated, kept for retro compatibility.
Included by every low-level NBGL header, to forbid them in apollo app code.
API to draw all basic graphic objects.
nbgl_buttonEvent_t
Definition nbgl_obj.h:196
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
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:46
uint8_t nbgl_stepPosition_t
this type is a bitfield containing:
Definition nbgl_step.h:90
@ 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
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:52
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 a list of names to build a menu list on Nanos, with for each item a descripti...
static nbgl_touchStatePosition_t pos
Definition ux.c:56