Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_screen.h
Go to the documentation of this file.
1
6
7#ifndef NBGL_SCREEN_H
8#define NBGL_SCREEN_H
9
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16/*********************
17 * INCLUDES
18 *********************/
19
20#include "nbgl_types.h"
21#include "nbgl_obj.h"
22
23/*********************
24 * DEFINES
25 *********************/
26
27/**********************
28 * TYPEDEFS
29 **********************/
30
34typedef void (*nbgl_tickerCallback_t)(void);
35
48
55typedef struct PACKED__ nbgl_screen_s {
58#ifdef HAVE_SE_TOUCH
60 touchCallback;
61#else // HAVE_SE_TOUCH
63#endif // HAVE_SE_TOUCH
64 struct nbgl_screen_s
68 uint8_t index;
71
72/**********************
73 * GLOBAL PROTOTYPES
74 **********************/
77
79nbgl_obj_t *nbgl_screenGetAt(uint8_t screenIndex);
85
86#ifdef HAVE_SE_TOUCH
87int nbgl_screenSet(nbgl_obj_t ***elements,
88 uint8_t nbElements,
90 nbgl_touchCallback_t touchCallback);
91#else // HAVE_SE_TOUCH
92int nbgl_screenSet(nbgl_obj_t ***elements,
93 uint8_t nbElements,
96#endif // HAVE_SE_TOUCH
97int nbgl_screenUpdateNbElements(uint8_t screenIndex, uint8_t nbElements);
98int nbgl_screenUpdateBackgroundColor(uint8_t screenIndex, color_t color);
100nbgl_obj_t **nbgl_screenGetElements(uint8_t screenIndex);
102#ifdef HAVE_SE_TOUCH
103int nbgl_screenPush(nbgl_obj_t ***elements,
104 uint8_t nbElements,
106 nbgl_touchCallback_t touchCallback);
107#else // HAVE_SE_TOUCH
109 uint8_t nbElements,
112#endif // HAVE_SE_TOUCH
113int nbgl_screenPop(uint8_t screenIndex);
115void nbgl_screenHandler(uint32_t intervaleMs);
116
117/**********************
118 * MACROS
119 **********************/
120
121#ifdef __cplusplus
122} /* extern "C" */
123#endif
124
125#endif /* NBGL_SCREEN_H */
static void buttonCallback(nbgl_screen_t *screen, nbgl_buttonEvent_t buttonEvent)
Included by every low-level NBGL header, to forbid them in apollo app code.
API to draw all basic graphic objects.
void(* nbgl_touchCallback_t)(void *obj, nbgl_touchType_t eventType)
prototype of function to be called when a touch event is received by an object
Definition nbgl_obj.h:235
void(* nbgl_buttonCallback_t)(void *obj, nbgl_buttonEvent_t buttonEvent)
prototype of function to be called when a button event is received by an object (TODO: change to scre...
Definition nbgl_obj.h:214
struct PACKED__ nbgl_container_s nbgl_container_t
struct to represent a container (CONTAINER type)
struct PACKED__ nbgl_obj_s nbgl_obj_t
Common structure for all graphical objects.
int nbgl_screenPush(nbgl_obj_t ***elements, uint8_t nbElements, const nbgl_screenTickerConfiguration_t *ticker, nbgl_buttonCallback_t buttonCallback)
int nbgl_screenSet(nbgl_obj_t ***elements, uint8_t nbElements, const nbgl_screenTickerConfiguration_t *ticker, nbgl_buttonCallback_t buttonCallback)
void nbgl_wait_pipeline(void)
int nbgl_screenUpdateNbElements(uint8_t screenIndex, uint8_t nbElements)
int nbgl_screenUpdateTicker(uint8_t screenIndex, const nbgl_screenTickerConfiguration_t *ticker)
bool nbgl_screenContainsObj(nbgl_obj_t *obj)
struct PACKED__ nbgl_screen_s nbgl_screen_t
struct to represent a screen (SCREEN type)
nbgl_obj_t * nbgl_screenGetAt(uint8_t screenIndex)
int nbgl_screenReset(void)
nbgl_obj_t ** nbgl_screenGetElements(uint8_t screenIndex)
void(* nbgl_tickerCallback_t)(void)
prototype of function to be called when a timer on screen is fired
Definition nbgl_screen.h:34
uint8_t nbgl_screenGetUxStackSize(void)
nbgl_obj_t * nbgl_screenGetTop(void)
int nbgl_screenPop(uint8_t screenIndex)
uint8_t nbgl_screenGetCurrentStackSize(void)
struct PACKED__ nbgl_screenTickerConfiguration_s nbgl_screenTickerConfiguration_t
struct to configure a screen layer
int nbgl_screenUpdateBackgroundColor(uint8_t screenIndex, color_t color)
int nbgl_screenRelease(void)
nbgl_obj_t * nbgl_screenContainsObjType(nbgl_screen_t *screen, nbgl_obj_type_t type)
void nbgl_screenRedraw(void)
void nbgl_screenHandler(uint32_t intervaleMs)
void nbgl_screen_reinit(void)
common types for Graphical Library
color_t
Definition nbgl_types.h:153
nbgl_obj_type_t
All types of graphical objects.
Definition nbgl_types.h:167
#define PACKED__
Definition nbgl_types.h:140
struct to configure a screen layer
Definition nbgl_screen.h:40
nbgl_tickerCallback_t tickerCallback
callback called when ticker timer is fired. Set to NULL for no ticker
Definition nbgl_screen.h:42
struct to represent a screen (SCREEN type)
Definition nbgl_screen.h:55
nbgl_buttonCallback_t buttonCallback
Definition nbgl_screen.h:62
uint8_t index
index in screenStack array
Definition nbgl_screen.h:68
nbgl_screenTickerConfiguration_t ticker
ticker configuration
Definition nbgl_screen.h:57
bool isUxScreen
set to TRUE if allocated by Bolos-UX
Definition nbgl_screen.h:69
nbgl_container_t container
common part
Definition nbgl_screen.h:56
struct nbgl_screen_s * previous
Definition nbgl_screen.h:66
struct nbgl_screen_s * next
pointer to screen on top of this one (or NULL is this screen is top of stack)
Definition nbgl_screen.h:64