Embedded SDK
Embedded SDK
Classes | Macros | Typedefs | Enumerations | Functions
nbgl_layout_internal.h File Reference

Internal functions/constants of NBGL layout layer. More...

#include "nbgl_layout.h"
Include dependency graph for nbgl_layout_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  layoutObj_t
 
struct  nbgl_layoutInternal_s
 Structure containing all information about the current layout. More...
 

Macros

#define INTERNAL_MARGIN   8
 
#define SMALL_BUTTON_HEIGHT   64
 
#define LAYOUT_OBJ_POOL_LEN   16
 Max number of complex objects with callback retrievable from pool. More...
 
#define KEYBOARD_FOOTER_TYPE   99
 
#define KEYPAD_FOOTER_TYPE   98
 

Typedefs

typedef struct nbgl_layoutInternal_s nbgl_layoutInternal_t
 Structure containing all information about the current layout. More...
 

Enumerations

enum  nbgl_swipe_usage_t { SWIPE_USAGE_NAVIGATION , SWIPE_USAGE_CUSTOM , SWIPE_USAGE_SUGGESTIONS , NB_SWIPE_USAGE }
 
enum  {
  HEADER_INDEX = 0 , TOP_RIGHT_BUTTON_INDEX , MAIN_CONTAINER_INDEX , FOOTER_INDEX ,
  UP_FOOTER_INDEX , LEFT_BORDER_INDEX , NB_MAX_SCREEN_CHILDREN
}
 

Functions

bool keyboardSwipeCallback (nbgl_obj_t *obj, nbgl_touchType_t eventType)
 
void layoutAddObject (nbgl_layoutInternal_t *layout, nbgl_obj_t *obj)
 adds the given obj to the main container More...
 
layoutObj_tlayoutAddCallbackObj (nbgl_layoutInternal_t *layout, nbgl_obj_t *obj, uint8_t token, tune_index_e tuneId)
 
void layoutNavigationPopulate (nbgl_container_t *navContainer, const nbgl_layoutNavigationBar_t *navConfig, uint8_t layer)
 This function creates a full navigation bar "object", with buttons and returns it as a container. More...
 
bool layoutNavigationCallback (nbgl_obj_t *obj, nbgl_touchType_t eventType, uint8_t nbPages, uint8_t *activePage)
 function to be called when any of the controls in navigation bar is touched More...
 

Detailed Description

Internal functions/constants of NBGL layout layer.

Definition in file nbgl_layout_internal.h.

Macro Definition Documentation

◆ INTERNAL_MARGIN

#define INTERNAL_MARGIN   8

Definition at line 24 of file nbgl_layout_internal.h.

◆ KEYBOARD_FOOTER_TYPE

#define KEYBOARD_FOOTER_TYPE   99

Definition at line 34 of file nbgl_layout_internal.h.

◆ KEYPAD_FOOTER_TYPE

#define KEYPAD_FOOTER_TYPE   98

Definition at line 35 of file nbgl_layout_internal.h.

◆ LAYOUT_OBJ_POOL_LEN

#define LAYOUT_OBJ_POOL_LEN   16

Max number of complex objects with callback retrievable from pool.

Definition at line 32 of file nbgl_layout_internal.h.

◆ SMALL_BUTTON_HEIGHT

#define SMALL_BUTTON_HEIGHT   64

Definition at line 26 of file nbgl_layout_internal.h.

Typedef Documentation

◆ nbgl_layoutInternal_t

Structure containing all information about the current layout.

Note
It shall not be used externally

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HEADER_INDEX 
TOP_RIGHT_BUTTON_INDEX 
MAIN_CONTAINER_INDEX 
FOOTER_INDEX 
UP_FOOTER_INDEX 
LEFT_BORDER_INDEX 
NB_MAX_SCREEN_CHILDREN 

Definition at line 55 of file nbgl_layout_internal.h.

◆ nbgl_swipe_usage_t

Enumerator
SWIPE_USAGE_NAVIGATION 
SWIPE_USAGE_CUSTOM 
SWIPE_USAGE_SUGGESTIONS 
NB_SWIPE_USAGE 

Definition at line 47 of file nbgl_layout_internal.h.

Function Documentation

◆ keyboardSwipeCallback()

bool keyboardSwipeCallback ( nbgl_obj_t obj,
nbgl_touchType_t  eventType 
)

Definition at line 196 of file nbgl_layout_keyboard.c.

◆ layoutAddCallbackObj()

layoutObj_t* layoutAddCallbackObj ( nbgl_layoutInternal_t layout,
nbgl_obj_t obj,
uint8_t  token,
tune_index_e  tuneId 
)

Definition at line 492 of file nbgl_layout.c.

◆ layoutAddObject()

void layoutAddObject ( nbgl_layoutInternal_t layout,
nbgl_obj_t obj 
)

adds the given obj to the main container

Parameters
layout
obj

Definition at line 519 of file nbgl_layout.c.

◆ layoutNavigationCallback()

bool layoutNavigationCallback ( nbgl_obj_t obj,
nbgl_touchType_t  eventType,
uint8_t  nbPages,
uint8_t activePage 
)

function to be called when any of the controls in navigation bar is touched

Parameters
objtouched object (button or container)
eventTypetype of touch (only TOUCHED or SWIPED is accepted)
nbPagesnumber of pages for navigation (if < 2, no navigation keys)
activePagecurrent active page
Returns
true if actually navigated (page change)

Definition at line 87 of file nbgl_layout_navigation.c.

◆ layoutNavigationPopulate()

void layoutNavigationPopulate ( nbgl_container_t navContainer,
const nbgl_layoutNavigationBar_t navConfig,
uint8_t  layer 
)

This function creates a full navigation bar "object", with buttons and returns it as a container.

Parameters
navContainercontainer used for the objects of the navigation
navConfigconfiguration to create the navigation bar, at the bottom of the screen
layerlayer (screen) to create the navigation bar in

Definition at line 144 of file nbgl_layout_navigation.c.