Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_layout_types.h
Go to the documentation of this file.
1
6
7#ifndef NBGL_LAYOUT_TYPES_H
8#define NBGL_LAYOUT_TYPES_H
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/*********************
15 * INCLUDES
16 *********************/
17#include <stdint.h>
18#include <stdbool.h>
19
20#include "os_io_seph_cmd.h"
21
22#include "nbgl_types.h"
23
24/*********************
25 * DEFINES
26 *********************/
27#define NBGL_NO_TUNE NB_TUNES
28
29/**********************
30 * TYPEDEFS
31 **********************/
32
39typedef void (*nbgl_layoutTouchCallback_t)(int token, uint8_t index);
40
50
54typedef struct {
55 const char **buttons;
58 uint8_t nbUsedButtons;
59 uint16_t nbCandidates;
65
69typedef struct {
70 const char *text;
71 int token;
72 bool active;
74
99
104typedef struct {
105 uint8_t nbRows;
106 const char *title;
107 const char **rowTexts;
110
111#ifdef HAVE_SE_TOUCH
112
119typedef struct {
120 const char *url;
121 const char *text1;
122 const char *text2;
123 int16_t offsetY;
124 bool centered;
127
128#endif // HAVE_SE_TOUCH
129
130#ifdef __cplusplus
131} /* extern "C" */
132#endif
133
134#endif /* NBGL_LAYOUT_TYPES_H */
void(* nbgl_layoutTouchCallback_t)(int token, uint8_t index)
prototype of function to be called when an object is touched
nbgl_layoutKeyboardContentType_t
The different types of keyboard contents.
@ KEYBOARD_WITH_BUTTON
text entry area + confirmation button
@ KEYBOARD_WITH_SUGGESTIONS
text entry area + suggestion buttons
@ NB_KEYBOARD_CONTENT_TYPES
common types for Graphical Library
struct PACKED__ nbgl_icon_details_s nbgl_icon_details_t
Represents all information about an icon.
This structure contains info to build a confirmation button.
const char * text
text of the button
bool active
if true, button is active, otherwise inactive (grayed-out)
This structure contains info to build a keyboard content (controls that are linked to keyboard).
uint8_t number
if numbered is true, number used to build 'number.' text
const char * text
already entered text
tune_index_e tuneId
if not NBGL_NO_TUNE, a tune will be played
nbgl_layoutKeyboardContentType_t type
type of content
nbgl_layoutSuggestionButtons_t suggestionButtons
nbgl_layoutConfirmationButton_t confirmationButton
used if type is KEYBOARD_WITH_SUGGESTIONS
const char * title
centered title explaining the screen
bool numbered
if set to true, the text is preceded on the left by 'number.'
bool grayedOut
(unused, kept for compatibility)
This structure contains info to build a left content area.
uint8_t nbRows
number of rows in the area
const char * title
title of area in bold
const nbgl_icon_details_t ** rowIcons
array of nbRows icon
const char ** rowTexts
array of nbRows texts (displayed in regular)
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)
const char * url
URL for QR code.
bool largeText1
if set to true, use 32px font for text1
int16_t offsetY
vertical shift to apply to this info (if > 0, shift to bottom)
bool centered
if set to true, center vertically
This structure contains info to build suggestion buttons.
uint8_t nbUsedButtons
the number of actually used (displayed) buttons
const char ** buttons
array of 4 strings for buttons (last ones can be NULL)