Embedded SDK
Embedded SDK
Macros | Typedefs | Functions | Variables
nbgl_obj.c File Reference

Implementation of API to draw all basic graphic objects. More...

#include <string.h>
#include "app_config.h"
#include "nbgl_obj.h"
#include "nbgl_draw.h"
#include "nbgl_front.h"
#include "nbgl_debug.h"
#include "nbgl_screen.h"
#include "nbgl_touch.h"
#include "os_print.h"
#include "os_helpers.h"
#include "os_pic.h"
#include "glyphs.h"
Include dependency graph for nbgl_obj.c:

Go to the source code of this file.

Macros

#define NB_MAX_LETTERS   9
 
#define ICON_TEXT_SPACE   12
 
#define INTER_DASHES   8
 

Typedefs

typedef void(* draw_function_t) (nbgl_obj_t *obj, nbgl_obj_t *prevObj, bool computePosition)
 

Functions

const char * get_ux_loc_string (uint32_t index)
 
void nbgl_objDraw (nbgl_obj_t *obj)
 This function draws or redraws the given object and its children (recursive version) More...
 
void nbgl_refresh (void)
 This functions refreshes the actual screen on display with what has changed since the last refresh. More...
 
void nbgl_refreshSpecial (nbgl_refresh_mode_t mode)
 This functions refreshes the actual screen on display with what has changed since the last refresh, according to the given mode (Black&White and other) More...
 
void nbgl_refreshSpecialWithPostRefresh (nbgl_refresh_mode_t mode, nbgl_post_refresh_t post_refresh)
 
bool nbgl_refreshIsNeeded (void)
 This functions returns true if there is something to refresh. More...
 
void nbgl_refreshReset (void)
 This functions resets all changes since the last refresh. More...
 
void nbgl_objInit (void)
 This functions inits all internal of nbgl objects layer. More...
 
void nbgl_objAllowDrawing (bool enable)
 This functions enables or disables drawing/refresh for all further calls. More...
 
uint8_tnbgl_objGetRAMBuffer (void)
 This function is used to get the all purpose RAM buffer. More...
 
bool nbgl_objIsUx (nbgl_obj_t *obj)
 This function returns true if the object belongs to a UxScreen. More...
 

Variables

uint8_t ramBuffer [GZLIB_UNCOMPRESSED_CHUNK]
 

Detailed Description

Implementation of API to draw all basic graphic objects.

Definition in file nbgl_obj.c.

Macro Definition Documentation

◆ ICON_TEXT_SPACE

#define ICON_TEXT_SPACE   12

◆ INTER_DASHES

#define INTER_DASHES   8

◆ NB_MAX_LETTERS

#define NB_MAX_LETTERS   9

Definition at line 34 of file nbgl_obj.c.

Typedef Documentation

◆ draw_function_t

typedef void(* draw_function_t) (nbgl_obj_t *obj, nbgl_obj_t *prevObj, bool computePosition)

Definition at line 39 of file nbgl_obj.c.

Function Documentation

◆ get_ux_loc_string()

const char* get_ux_loc_string ( uint32_t  index)

◆ nbgl_objAllowDrawing()

void nbgl_objAllowDrawing ( bool  enable)

This functions enables or disables drawing/refresh for all further calls.

Parameters
enableif true, enables drawing/refresh, otherwise disables

Definition at line 1651 of file nbgl_obj.c.

◆ nbgl_objDraw()

void nbgl_objDraw ( nbgl_obj_t obj)

This function draws or redraws the given object and its children (recursive version)

Parameters
objthe object to redraw

Definition at line 1522 of file nbgl_obj.c.

◆ nbgl_objGetRAMBuffer()

uint8_t* nbgl_objGetRAMBuffer ( void  )

This function is used to get the all purpose RAM buffer.

Returns
a pointer to the all purpose RAM buffer

Definition at line 1661 of file nbgl_obj.c.

◆ nbgl_objInit()

void nbgl_objInit ( void  )

This functions inits all internal of nbgl objects layer.

Note
it is supposed to be called only from App

Definition at line 1636 of file nbgl_obj.c.

◆ nbgl_objIsUx()

bool nbgl_objIsUx ( nbgl_obj_t obj)

This function returns true if the object belongs to a UxScreen.

Returns
true if the object belongs to a UxScreen

Definition at line 1671 of file nbgl_obj.c.

◆ nbgl_refresh()

void nbgl_refresh ( void  )

This functions refreshes the actual screen on display with what has changed since the last refresh.

Definition at line 1561 of file nbgl_obj.c.

◆ nbgl_refreshIsNeeded()

bool nbgl_refreshIsNeeded ( void  )

This functions returns true if there is something to refresh.

Returns
true if there is something to refresh

Definition at line 1607 of file nbgl_obj.c.

◆ nbgl_refreshReset()

void nbgl_refreshReset ( void  )

This functions resets all changes since the last refresh.

Definition at line 1619 of file nbgl_obj.c.

◆ nbgl_refreshSpecial()

void nbgl_refreshSpecial ( nbgl_refresh_mode_t  mode)

This functions refreshes the actual screen on display with what has changed since the last refresh, according to the given mode (Black&White and other)

Parameters
modemode of refresh

Definition at line 1571 of file nbgl_obj.c.

◆ nbgl_refreshSpecialWithPostRefresh()

void nbgl_refreshSpecialWithPostRefresh ( nbgl_refresh_mode_t  mode,
nbgl_post_refresh_t  post_refresh 
)

Definition at line 1587 of file nbgl_obj.c.

Variable Documentation

◆ ramBuffer

Definition at line 125 of file nbgl_obj.c.