Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions
nbgl_obj.h File Reference

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

#include "nbgl_types.h"
#include "nbgl_fonts.h"
#include "ux_loc.h"
Include dependency graph for nbgl_obj.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nbgl_touchStatePosition_t
 The low level Touchscreen event, coming from driver. More...
 
struct  nbgl_obj_s
 Common structure for all graphical objects. More...
 
struct  nbgl_container_s
 struct to represent a container (CONTAINER type) More...
 
struct  nbgl_line_s
 struct to represent a vertical or horizontal line More...
 
struct  nbgl_image_s
 struct to represent an image (IMAGE type) More...
 
struct  nbgl_image_file_s
 struct to represent an image file object (IMAGE_FILE type) The source of the data is an image file with header. width and height are given in this header More...
 
struct  nbgl_qrcode_s
 struct to represent a QR code (QR_CODE type), whose size is fixed More...
 
struct  nbgl_radio_s
 struct to represent a radio button (RADIO_BUTTON type) More...
 
struct  nbgl_switch_s
 struct to represent a switch (size is fixed) (SWITCH type) More...
 
struct  nbgl_progress_bar_s
 struct to represent a progress bar (PROGRESS_BAR type) More...
 
struct  nbgl_navigation_bar_s
 struct to represent a navigation bar (PAGE_INDICATOR type) There can be up to 5 page indicators, whose shape is fixed. If there are more than 5 pages, the middle indicator will be "..." More...
 
struct  nbgl_button_s
 struct to represent a button (BUTTON type) that can contain a text and/or an icon More...
 
struct  nbgl_text_area_s
 struct to represent a text area (TEXT_AREA type) More...
 
struct  nbgl_text_entry_s
 struct to represent a text entry area (TEXT_ENTRY type) More...
 
struct  nbgl_mask_control_s
 
struct  nbgl_spinner_s
 struct to represent a "spinner", represented by the Ledger corners, in gray, with one of the corners in black (SPINNER type) More...
 
struct  nbgl_keyboard_s
 struct to represent a keyboard (KEYBOARD type) More...
 
struct  nbgl_keypad_s
 struct to represent a keypad (KEYPAD type) More...
 

Macros

#define BACKSPACE_KEY   8
 
#define VALIDATE_KEY   '\r'
 
#define SHIFT_KEY_INDEX   26
 
#define DIGITS_SWITCH_KEY_INDEX   27
 
#define BACKSPACE_KEY_INDEX   28
 
#define SPACE_KEY_INDEX   29
 
#define SPECIAL_KEYS_INDEX   30
 
#define KEYPAD_MAX_DIGITS   12
 
#define C_warning64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Warning_64px
 
#define C_round_warning_64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Important_Circle_64px
 
#define C_round_check_64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Check_Circle_64px
 
#define C_Message_64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Review_64px
 
#define C_leftArrow32px   _Pragma("GCC warning \"Deprecated constant!\"") C_Back_32px
 
#define C_Next32px   _Pragma("GCC warning \"Deprecated constant!\"") C_Next_32px
 
#define C_round_cross_64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Denied_Circle_64px
 
#define NB_MAX_PAGES_WITH_DASHES   6
 
#define NB_SPINNER_POSITIONS   4
 
#define SWIPE_MASK    ((1 << SWIPED_UP) | (1 << SWIPED_DOWN) | (1 << SWIPED_LEFT) | (1 << SWIPED_RIGHT))
 
#define LEFT_BUTTON   0x01
 The different pressed buttons.
 
#define RIGHT_BUTTON   0x02
 Right button event.
 
#define BOTH_BUTTONS   0x03
 Both buttons event.
 
#define RELEASED_MASK   0x80
 released (see LSB bits to know what buttons are released)
 
#define CONTINUOUS_MASK    0x40
 

Typedefs

typedef 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 screen?)
 
typedef 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
 
typedef struct PACKED__ nbgl_obj_s nbgl_obj_t
 Common structure for all graphical objects.
 
typedef struct PACKED__ nbgl_container_s nbgl_container_t
 struct to represent a container (CONTAINER type)
 
typedef struct PACKED__ nbgl_line_s nbgl_line_t
 struct to represent a vertical or horizontal line
 
typedef nbgl_icon_details_t *(* onImageDrawCallback_t) (uint8_t token)
 prototype of function to be called when a IMAGE object is drawned, and no buffer was provided
 
typedef struct PACKED__ nbgl_image_s nbgl_image_t
 struct to represent an image (IMAGE type)
 
typedef struct PACKED__ nbgl_image_file_s nbgl_image_file_t
 struct to represent an image file object (IMAGE_FILE type) The source of the data is an image file with header. width and height are given in this header
 
typedef struct PACKED__ nbgl_qrcode_s nbgl_qrcode_t
 struct to represent a QR code (QR_CODE type), whose size is fixed
 
typedef struct PACKED__ nbgl_radio_s nbgl_radio_t
 struct to represent a radio button (RADIO_BUTTON type)
 
typedef struct PACKED__ nbgl_switch_s nbgl_switch_t
 struct to represent a switch (size is fixed) (SWITCH type)
 
typedef struct PACKED__ nbgl_progress_bar_s nbgl_progress_bar_t
 struct to represent a progress bar (PROGRESS_BAR type)
 
typedef struct PACKED__ nbgl_navigation_bar_s nbgl_page_indicator_t
 struct to represent a navigation bar (PAGE_INDICATOR type) There can be up to 5 page indicators, whose shape is fixed. If there are more than 5 pages, the middle indicator will be "..."
 
typedef char *(* onTextDrawCallback_t) (uint8_t token)
 prototype of function to be called when a TEXT_AREA object is drawned, and no text was provided
 
typedef struct PACKED__ nbgl_button_s nbgl_button_t
 struct to represent a button (BUTTON type) that can contain a text and/or an icon
 
typedef struct PACKED__ nbgl_text_area_s nbgl_text_area_t
 struct to represent a text area (TEXT_AREA type)
 
typedef struct PACKED__ nbgl_text_entry_s nbgl_text_entry_t
 struct to represent a text entry area (TEXT_ENTRY type)
 
typedef struct PACKED__ nbgl_mask_control_s nbgl_mask_control_t
 
typedef struct PACKED__ nbgl_spinner_s nbgl_spinner_t
 struct to represent a "spinner", represented by the Ledger corners, in gray, with one of the corners in black (SPINNER type)
 
typedef void(* keyboardCallback_t) (char touchedKey)
 prototype of function to be called when a valid key is pressed on keyboard Backspace is equal to 0x8 (ASCII code), Validate (for Keypad) is equal to 15 ('\r')
 
typedef struct PACKED__ nbgl_keyboard_s nbgl_keyboard_t
 struct to represent a keyboard (KEYBOARD type)
 
typedef struct PACKED__ nbgl_keypad_s nbgl_keypad_t
 struct to represent a keypad (KEYPAD type)
 

Enumerations

enum  nbgl_buttonEvent_t {
  BUTTON_LEFT_PRESSED = 0 , BUTTON_RIGHT_PRESSED , BUTTON_LEFT_CONTINUOUS_PRESSED , BUTTON_RIGHT_CONTINUOUS_PRESSED ,
  BUTTON_BOTH_PRESSED , BUTTON_BOTH_TOUCHED , INVALID_BUTTON_EVENT
}
 
enum  nbgl_page_indicator_style_t { PROGRESSIVE_INDICATOR = 0 , CURRENT_INDICATOR }
 Style to apply to nbgl_page_indicator_t. More...
 
enum  keyboardMode_t { MODE_LETTERS = 0 , MODE_DIGITS , MODE_SPECIAL }
 Mode in which to open/set the keyboard. More...
 
enum  keyboardCase_t { LOWER_CASE = 0 , UPPER_CASE , LOCKED_UPPER_CASE }
 Letters casing in which to open/set the keyboard. More...
 
enum  {
  BOTTOM_BUTTON_ID = 1 , LEFT_BUTTON_ID , RIGHT_BUTTON_ID , WHOLE_SCREEN_ID ,
  TOP_RIGHT_BUTTON_ID , BACK_BUTTON_ID , SINGLE_BUTTON_ID , EXTRA_BUTTON_ID ,
  CHOICE_1_ID , CHOICE_2_ID , CHOICE_3_ID , KEYPAD_ID ,
  KEYBOARD_ID , ENTERED_TEXT_ID , VALUE_BUTTON_1_ID , VALUE_BUTTON_2_ID ,
  VALUE_BUTTON_3_ID , LONG_PRESS_BUTTON_ID , TIP_BOX_ID , CONTROLS_ID ,
  NB_CONTROL_IDS
}
 ids of touchable objects, for external stimulus (by Testing environment) More...
 

Functions

void nbgl_refresh (void)
 This functions refreshes the actual screen on display with what has changed since the last refresh.
 
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)
 
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.
 
void nbgl_refreshReset (void)
 This functions resets all changes since the last refresh.
 
void nbgl_objInit (void)
 This functions inits all internal of nbgl objects layer.
 
void nbgl_objDraw (nbgl_obj_t *obj)
 This function draws or redraws the given object and its children (recursive version)
 
void nbgl_objAllowDrawing (bool enable)
 This functions enables or disables drawing/refresh for all further calls.
 
uint8_tnbgl_objGetRAMBuffer (void)
 This function is used to get the all purpose RAM buffer.
 
bool nbgl_objIsUx (nbgl_obj_t *obj)
 This function returns true if the object belongs to a UxScreen.
 
void nbgl_objPoolRelease (uint8_t layer)
 Release the objects from the pool for the given layer.
 
nbgl_obj_tnbgl_objPoolGet (nbgl_obj_type_t type, uint8_t layer)
 Gets a new graphic object from the pool, with the given type. The type field of the object is set.
 
nbgl_obj_tnbgl_objPoolGetPrevious (nbgl_obj_t *obj, uint8_t layer)
 Gets a link to the previous object in the pool, for the given layer. (to be used with care)
 
uint8_t nbgl_objPoolGetId (nbgl_obj_t *obj)
 Gets a unique index for the given object, in the pool.
 
int nbgl_objPoolGetArray (nbgl_obj_type_t type, uint8_t nbObjs, uint8_t layer, nbgl_obj_t **objArray)
 Gets nbObjects new graphic object from the pool, with the given type, for the given layer (screen). The type field of the object is set.
 
uint8_t nbgl_objPoolGetNbUsed (uint8_t layer)
 returns the number of objects currently used in the pool
 
void nbgl_containerPoolRelease (uint8_t layer)
 Release the objects pointers from the pool for the given layer.
 
nbgl_obj_t ** nbgl_containerPoolGet (uint8_t nbObjs, uint8_t layer)
 Gets a new container from the pool, with the given number of obj pointers.
 
uint8_t nbgl_containerPoolGetNbUsed (uint8_t layer)
 returns the number of containers currently used in the pool
 
void nbgl_objDrawKeyboard (nbgl_keyboard_t *kbd)
 This function draws a keyboard object.
 
void nbgl_objDrawKeypad (nbgl_keypad_t *kbd)
 This function draws a keypad object.
 
void nbgl_keyboardTouchCallback (nbgl_obj_t *obj, nbgl_touchType_t eventType)
 function to be called when the keyboard object is touched
 
void nbgl_keypadTouchCallback (nbgl_obj_t *obj, nbgl_touchType_t eventType)
 function to be called when the keypad object is touched
 
bool nbgl_keyboardGetPosition (nbgl_keyboard_t *kbd, char index, uint16_t *x, uint16_t *y)
 This function gets the position (top-left corner) of the key at the given index. (to be used for Testing purpose)
 
bool nbgl_keypadGetPosition (nbgl_keypad_t *kbd, char index, uint16_t *x, uint16_t *y)
 This function gets the position (top-left corner) of the key at the given index. (to be used for Testing purpose). Only works without shuffling.
 

Detailed Description

API to draw all basic graphic objects.

Definition in file nbgl_obj.h.

Macro Definition Documentation

◆ BACKSPACE_KEY

#define BACKSPACE_KEY   8

Definition at line 26 of file nbgl_obj.h.

◆ BACKSPACE_KEY_INDEX

#define BACKSPACE_KEY_INDEX   28

Definition at line 41 of file nbgl_obj.h.

◆ BOTH_BUTTONS

#define BOTH_BUTTONS   0x03

Both buttons event.

Definition at line 197 of file nbgl_obj.h.

◆ C_leftArrow32px

#define C_leftArrow32px   _Pragma("GCC warning \"Deprecated constant!\"") C_Back_32px

Definition at line 173 of file nbgl_obj.h.

◆ C_Message_64px

#define C_Message_64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Review_64px

Definition at line 172 of file nbgl_obj.h.

◆ C_Next32px

#define C_Next32px   _Pragma("GCC warning \"Deprecated constant!\"") C_Next_32px

Definition at line 174 of file nbgl_obj.h.

◆ C_round_check_64px

#define C_round_check_64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Check_Circle_64px

Definition at line 171 of file nbgl_obj.h.

◆ C_round_cross_64px

#define C_round_cross_64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Denied_Circle_64px

Definition at line 175 of file nbgl_obj.h.

◆ C_round_warning_64px

#define C_round_warning_64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Important_Circle_64px

Definition at line 170 of file nbgl_obj.h.

◆ C_warning64px

#define C_warning64px   _Pragma("GCC warning \"Deprecated constant!\"") C_Warning_64px

Definition at line 169 of file nbgl_obj.h.

◆ CONTINUOUS_MASK

#define CONTINUOUS_MASK    0x40

if set, means that the button(s) is continuously pressed (this event is sent every/*#end#*‍/ 300ms after the first 800ms)

Definition at line 201 of file nbgl_obj.h.

◆ DIGITS_SWITCH_KEY_INDEX

#define DIGITS_SWITCH_KEY_INDEX   27

Definition at line 40 of file nbgl_obj.h.

◆ KEYPAD_MAX_DIGITS

#define KEYPAD_MAX_DIGITS   12

Definition at line 63 of file nbgl_obj.h.

◆ LEFT_BUTTON

#define LEFT_BUTTON   0x01

The different pressed buttons.

Left button event

Definition at line 195 of file nbgl_obj.h.

◆ NB_MAX_PAGES_WITH_DASHES

#define NB_MAX_PAGES_WITH_DASHES   6

Definition at line 178 of file nbgl_obj.h.

◆ NB_SPINNER_POSITIONS

#define NB_SPINNER_POSITIONS   4

Definition at line 181 of file nbgl_obj.h.

◆ RELEASED_MASK

#define RELEASED_MASK   0x80

released (see LSB bits to know what buttons are released)

Definition at line 198 of file nbgl_obj.h.

◆ RIGHT_BUTTON

#define RIGHT_BUTTON   0x02

Right button event.

Definition at line 196 of file nbgl_obj.h.

◆ SHIFT_KEY_INDEX

#define SHIFT_KEY_INDEX   26

Definition at line 39 of file nbgl_obj.h.

◆ SPACE_KEY_INDEX

#define SPACE_KEY_INDEX   29

Definition at line 42 of file nbgl_obj.h.

◆ SPECIAL_KEYS_INDEX

#define SPECIAL_KEYS_INDEX   30

Definition at line 43 of file nbgl_obj.h.

◆ SWIPE_MASK

#define SWIPE_MASK    ((1 << SWIPED_UP) | (1 << SWIPED_DOWN) | (1 << SWIPED_LEFT) | (1 << SWIPED_RIGHT))

Definition at line 188 of file nbgl_obj.h.

◆ VALIDATE_KEY

#define VALIDATE_KEY   '\r'

Definition at line 27 of file nbgl_obj.h.

Typedef Documentation

◆ keyboardCallback_t

typedef void(* keyboardCallback_t) (char touchedKey)

prototype of function to be called when a valid key is pressed on keyboard Backspace is equal to 0x8 (ASCII code), Validate (for Keypad) is equal to 15 ('\r')

Parameters
touchedKeychar typed on keyboard

Definition at line 487 of file nbgl_obj.h.

◆ nbgl_button_t

struct to represent a button (BUTTON type) that can contain a text and/or an icon

Note
border width is fixed (2 pixels)

◆ nbgl_buttonCallback_t

typedef 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 screen?)

Parameters
objthe concerned object
buttonEventevent on buttons

Definition at line 221 of file nbgl_obj.h.

◆ nbgl_container_t

struct to represent a container (CONTAINER type)

Note
the main screen is a kind of container

◆ nbgl_image_file_t

struct to represent an image file object (IMAGE_FILE type) The source of the data is an image file with header. width and height are given in this header

◆ nbgl_image_t

struct to represent an image (IMAGE type)

◆ nbgl_keyboard_t

struct to represent a keyboard (KEYBOARD type)

◆ nbgl_keypad_t

struct to represent a keypad (KEYPAD type)

◆ nbgl_line_t

struct to represent a vertical or horizontal line

◆ nbgl_mask_control_t

◆ nbgl_obj_t

typedef struct PACKED__ nbgl_obj_s nbgl_obj_t

Common structure for all graphical objects.

Note
this type must never be instantiated

◆ nbgl_page_indicator_t

struct to represent a navigation bar (PAGE_INDICATOR type) There can be up to 5 page indicators, whose shape is fixed. If there are more than 5 pages, the middle indicator will be "..."

Note
height is fixed

◆ nbgl_progress_bar_t

struct to represent a progress bar (PROGRESS_BAR type)

Note
if withBorder, the stroke of the border is fixed (3 pixels)

◆ nbgl_qrcode_t

struct to represent a QR code (QR_CODE type), whose size is fixed

◆ nbgl_radio_t

struct to represent a radio button (RADIO_BUTTON type)

Note
size is fixed

◆ nbgl_spinner_t

struct to represent a "spinner", represented by the Ledger corners, in gray, with one of the corners in black (SPINNER type)

◆ nbgl_switch_t

struct to represent a switch (size is fixed) (SWITCH type)

◆ nbgl_text_area_t

struct to represent a text area (TEXT_AREA type)

◆ nbgl_text_entry_t

struct to represent a text entry area (TEXT_ENTRY type)

◆ nbgl_touchCallback_t

typedef 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

Parameters
objthe concerned object
eventTypetype of touch event

Definition at line 242 of file nbgl_obj.h.

◆ onImageDrawCallback_t

typedef nbgl_icon_details_t *(* onImageDrawCallback_t) (uint8_t token)

prototype of function to be called when a IMAGE object is drawned, and no buffer was provided

Parameters
tokenprovided token in IMAGE object
Returns
the icn details to be drawned in image object

Definition at line 301 of file nbgl_obj.h.

◆ onTextDrawCallback_t

typedef char *(* onTextDrawCallback_t) (uint8_t token)

prototype of function to be called when a TEXT_AREA object is drawned, and no text was provided

Parameters
tokenprovided token in TEXT_AREA object
Returns
an ASCII string (null terminated) to be drawned in text area

Definition at line 408 of file nbgl_obj.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

ids of touchable objects, for external stimulus (by Testing environment)

Enumerator
BOTTOM_BUTTON_ID 
LEFT_BUTTON_ID 
RIGHT_BUTTON_ID 
WHOLE_SCREEN_ID 
TOP_RIGHT_BUTTON_ID 
BACK_BUTTON_ID 
SINGLE_BUTTON_ID 
EXTRA_BUTTON_ID 
CHOICE_1_ID 
CHOICE_2_ID 
CHOICE_3_ID 
KEYPAD_ID 
KEYBOARD_ID 
ENTERED_TEXT_ID 
VALUE_BUTTON_1_ID 
VALUE_BUTTON_2_ID 
VALUE_BUTTON_3_ID 
LONG_PRESS_BUTTON_ID 
TIP_BOX_ID 
CONTROLS_ID 
NB_CONTROL_IDS 

Definition at line 565 of file nbgl_obj.h.

◆ keyboardCase_t

Letters casing in which to open/set the keyboard.

Enumerator
LOWER_CASE 

lower case mode

UPPER_CASE 

upper case mode for one character

LOCKED_UPPER_CASE 

locked upper case mode

Definition at line 510 of file nbgl_obj.h.

◆ keyboardMode_t

Mode in which to open/set the keyboard.

Enumerator
MODE_LETTERS 

letters mode

MODE_DIGITS 

digits and some special characters mode

MODE_SPECIAL 

extended special characters mode

Definition at line 493 of file nbgl_obj.h.

◆ nbgl_buttonEvent_t

Enumerator
BUTTON_LEFT_PRESSED 

Sent when Left button is released.

BUTTON_RIGHT_PRESSED 

Send when Right button is released.

BUTTON_LEFT_CONTINUOUS_PRESSED 

Send when Left button is continuouly pressed (sent every 300ms after the first 800ms)

BUTTON_RIGHT_CONTINUOUS_PRESSED 

Send when Right button is continuouly pressed (sent every 300ms after the first 800ms)

BUTTON_BOTH_PRESSED 

Sent when both buttons are released.

BUTTON_BOTH_TOUCHED 

Sent when both buttons are touched.

INVALID_BUTTON_EVENT 

Definition at line 203 of file nbgl_obj.h.

◆ nbgl_page_indicator_style_t

Style to apply to nbgl_page_indicator_t.

Enumerator
PROGRESSIVE_INDICATOR 

all dashes before active page are black

CURRENT_INDICATOR 

only current page dash is black

Definition at line 383 of file nbgl_obj.h.

Function Documentation

◆ nbgl_containerPoolGet()

nbgl_obj_t ** nbgl_containerPoolGet ( uint8_t  nbObjs,
uint8_t  layer 
)

Gets a new container from the pool, with the given number of obj pointers.

Parameters
nbObjsnumber of objects pointers for the container
layerlayer (screen) to get the container to

Definition at line 290 of file nbgl_obj_pool.c.

◆ nbgl_containerPoolGetNbUsed()

uint8_t nbgl_containerPoolGetNbUsed ( uint8_t  layer)

returns the number of containers currently used in the pool

Definition at line 334 of file nbgl_obj_pool.c.

◆ nbgl_containerPoolRelease()

void nbgl_containerPoolRelease ( uint8_t  layer)

Release the objects pointers from the pool for the given layer.

Parameters
layerlayer to release objects pointers from

Definition at line 265 of file nbgl_obj_pool.c.

◆ nbgl_keyboardGetPosition()

bool nbgl_keyboardGetPosition ( nbgl_keyboard_t kbd,
char  index,
uint16_t x,
uint16_t y 
)

This function gets the position (top-left corner) of the key at the given index. (to be used for Testing purpose)

Parameters
kbdthe object to be drawned
indexascii character (in lower-case)
x[out] the top-left position
y[out] the top-left position
Returns
true if found, false otherwise

Definition at line 644 of file nbgl_obj_keyboard.c.

◆ nbgl_keyboardTouchCallback()

void nbgl_keyboardTouchCallback ( nbgl_obj_t obj,
nbgl_touchType_t  eventType 
)

function to be called when the keyboard object is touched

Parameters
objtouched object (keyboard)
eventTypetype of touch (only TOUCHED is accepted)
Returns
none

Definition at line 526 of file nbgl_obj_keyboard.c.

◆ nbgl_keypadGetPosition()

bool nbgl_keypadGetPosition ( nbgl_keypad_t kpd,
char  index,
uint16_t x,
uint16_t y 
)

This function gets the position (top-left corner) of the key at the given index. (to be used for Testing purpose). Only works without shuffling.

Parameters
kpdthe object to be drawned
indexthe char of the key
x[out] the top-left position
y[out] the top-left position
Returns
true if found, false otherwise

Definition at line 348 of file nbgl_obj_keypad.c.

◆ nbgl_keypadTouchCallback()

void nbgl_keypadTouchCallback ( nbgl_obj_t obj,
nbgl_touchType_t  eventType 
)

function to be called when the keypad object is touched

Parameters
objtouched object (keypad)
eventTypetype of touch (only TOUCHED is accepted)
Returns
none

Definition at line 281 of file nbgl_obj_keypad.c.

◆ 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 1649 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 1520 of file nbgl_obj.c.

◆ nbgl_objDrawKeyboard()

void nbgl_objDrawKeyboard ( nbgl_keyboard_t kbd)

This function draws a keyboard object.

Parameters
kbdthe object to be drawned

Definition at line 692 of file nbgl_obj_keyboard.c.

◆ nbgl_objDrawKeypad()

void nbgl_objDrawKeypad ( nbgl_keypad_t kpd)

This function draws a keypad object.

Parameters
kpdkeypad object to draw
Returns
the keypad keypad object

Definition at line 387 of file nbgl_obj_keypad.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 1659 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 1634 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 1669 of file nbgl_obj.c.

◆ nbgl_objPoolGet()

nbgl_obj_t * nbgl_objPoolGet ( nbgl_obj_type_t  type,
uint8_t  layer 
)

Gets a new graphic object from the pool, with the given type. The type field of the object is set.

Parameters
typetype of object to get from the pool
layerlayer to get object for

Definition at line 164 of file nbgl_obj_pool.c.

◆ nbgl_objPoolGetArray()

int nbgl_objPoolGetArray ( nbgl_obj_type_t  type,
uint8_t  nbObjs,
uint8_t  layer,
nbgl_obj_t **  objArray 
)

Gets nbObjects new graphic object from the pool, with the given type, for the given layer (screen). The type field of the object is set.

Parameters
typetype of objects to get from the pool
nbObjsnumber of objects to get from the pool
layerlayer (screen) to get the object to
objArrayarray of objs pointers
Returns
>= 0 if OK

Definition at line 242 of file nbgl_obj_pool.c.

◆ nbgl_objPoolGetId()

uint8_t nbgl_objPoolGetId ( nbgl_obj_t obj)

Gets a unique index for the given object, in the pool.

Parameters
objobject to get id from
Returns
an unique index of the object

Definition at line 223 of file nbgl_obj_pool.c.

◆ nbgl_objPoolGetNbUsed()

uint8_t nbgl_objPoolGetNbUsed ( uint8_t  layer)

returns the number of objects currently used in the pool

Definition at line 147 of file nbgl_obj_pool.c.

◆ nbgl_objPoolGetPrevious()

nbgl_obj_t * nbgl_objPoolGetPrevious ( nbgl_obj_t obj,
uint8_t  layer 
)

Gets a link to the previous object in the pool, for the given layer. (to be used with care)

Parameters
objobject to get previous from
layerlayer (screen) in which to retrieve the object
Returns
a pointer to the previous object in the pool

Definition at line 201 of file nbgl_obj_pool.c.

◆ nbgl_objPoolRelease()

void nbgl_objPoolRelease ( uint8_t  layer)

Release the objects from the pool for the given layer.

Parameters
layerlayer to release object from

Definition at line 126 of file nbgl_obj_pool.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 1559 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 1605 of file nbgl_obj.c.

◆ nbgl_refreshReset()

void nbgl_refreshReset ( void  )

This functions resets all changes since the last refresh.

Definition at line 1617 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 1569 of file nbgl_obj.c.

◆ nbgl_refreshSpecialWithPostRefresh()

void nbgl_refreshSpecialWithPostRefresh ( nbgl_refresh_mode_t  mode,
nbgl_post_refresh_t  post_refresh 
)

Definition at line 1585 of file nbgl_obj.c.