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
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
44typedef void *nbgl_step_t;
45
50typedef void (*nbgl_stepMenuListCallback_t)(uint8_t choiceIndex);
51
58
63enum {
68};
69
71#define FORWARD_DIRECTION 0x00
73#define BACKWARD_DIRECTION 0x08
74
81
82/**********************
83 * GLOBAL PROTOTYPES
84 **********************/
85
87 nbgl_stepButtonCallback_t onActionCallback,
89 const char *text,
90 const char *subText,
92 bool modal);
94 nbgl_stepButtonCallback_t onActionCallback,
97 bool modal);
101 bool modal);
104
105/**********************
106 * MACROS
107 **********************/
108
109#ifdef __cplusplus
110} /* extern "C" */
111#endif
112
113#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:203
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:57
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:80
@ NEITHER_FIRST_NOR_LAST_STEP
neither first nor last in a multiple steps flow
Definition nbgl_step.h:67
@ SINGLE_STEP
single step flow
Definition nbgl_step.h:64
@ LAST_STEP
last in a multiple steps flow
Definition nbgl_step.h:66
@ FIRST_STEP
first in a multiple steps flow
Definition nbgl_step.h:65
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,...
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