19#include "bolos_ux_loc_strings.h"
20#include "localization.h"
27#define NB_MAX_LAYERS 3
67 if (contexts[i].stepCtx == NULL) {
90 if (contexts[i].stepCtx == stepCtx) {
164#ifdef HAVE_LANGUAGE_PACK
165 const char *txt = (step->
text != NULL)
167 : ((step->textId != INVALID_ID) ? get_ux_loc_string(step->textId) : NULL);
169 const char *txt = step->
text;
173 if (step->
init != NULL) {
201#ifdef HAVE_LANGUAGE_PACK
202 const char *txt = (step->
text != NULL)
204 : ((step->textId != INVALID_ID) ? get_ux_loc_string(step->textId) : NULL);
206 const char *txt = step->
text;
219 if (step->
init != NULL) {
@ REGULAR_INFO
both texts regular (but '\b' can switch to bold)
#define LOG_WARN(__logger,...)
#define LOG_DEBUG(__logger,...)
#define LOG_FATAL(__logger,...)
#define NB_MAX_LAYERS
< Maximum number of layers for flow, cannot be greater than max number of step layers
struct FlowContext_s FlowContext_t
void nbgl_flowRelease(nbgl_flow_t flow)
release the given flow
nbgl_flow_t nbgl_flowDraw(const nbgl_stepDesc_t *steps, uint8_t nbSteps, uint8_t initStep, bool loop, bool modal)
draw the given flow, starting at the given step
Flow construction API of NBGL.
void * nbgl_flow_t
type shared externally
@ BUTTON_BOTH_PRESSED
Sent when both buttons are released.
@ BUTTON_LEFT_PRESSED
Sent when Left button is released.
@ BUTTON_RIGHT_PRESSED
Send when Right button is released.
#define GET_POS_OF_STEP(_step, _nb_steps)
void * nbgl_step_t
type shared externally
uint8_t nbgl_stepPosition_t
this type is a bitfield containing:
@ NEITHER_FIRST_NOR_LAST_STEP
neither first nor last in a multiple steps flow
int nbgl_stepRelease(nbgl_step_t step)
Release the step obtained with any of the nbgl_stepDrawXXX() functions.
#define FORWARD_DIRECTION
When the flow is navigated from last to first step.
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)
draws a text type step, that can be multi-pages, depending of the length of text and subText....
nbgl_step_t nbgl_stepDrawCenteredInfo(nbgl_stepPosition_t pos, nbgl_stepButtonCallback_t onActionCallback, nbgl_screenTickerConfiguration_t *ticker, nbgl_layoutCenteredInfo_t *info, bool modal)
draw a step with a centered info (icon + text). This is always a single page step
#define BACKWARD_DIRECTION
When action callback applies on any button press.
struct PACKED__ nbgl_icon_details_s nbgl_icon_details_t
Represents all information about an icon.
const nbgl_stepDesc_t * steps
This structure contains info to build a centered (vertically and horizontally) area,...
const char * text2
second text (can be null)
const char * text1
first text (can be null)
bool onTop
if set to true, align only horizontally
nbgl_contentCenteredInfoStyle_t style
style to apply to this info
const nbgl_icon_details_t * icon
a buffer containing the 1BPP icon
Structure containing all specific information when creating a NBGL step.
const char * subText
sub-text to display in step (NULL most of the time)
nbgl_stepCallback_t callback
if not NULL, function to be called on "double-key" action
const nbgl_icon_details_t * icon
icon to display in step (text must be single-page)
nbgl_stepCallback_t init
if not NULL, function to be called when the step is entered
const char * text
text to display in step (can be multi-pages if icon == NULL)