|
Embedded SDK
Embedded SDK
|
API to draw all basic graphic objects. More...


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 | BUTTON_DIAMETER (COMMON_RADIUS * 2) |
| #define | BUTTON_WIDTH BUTTON_DIAMETER |
| #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 | INACTIVE_COLOR LIGHT_GRAY |
| #define | INACTIVE_TEXT_COLOR LIGHT_GRAY |
| #define | INACTIVE_SMALL_FONT SMALL_BOLD_FONT |
| #define | LIGHT_TEXT_COLOR DARK_GRAY |
| #define | BUTTON_STROKE 2 |
| #define | KEYPAD_REINIT_KEYS 0x1F |
| #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) | |
API to draw all basic graphic objects.
Definition in file nbgl_obj.h.
| #define BACKSPACE_KEY 8 |
Definition at line 26 of file nbgl_obj.h.
| #define BACKSPACE_KEY_INDEX 28 |
Definition at line 43 of file nbgl_obj.h.
| #define BOTH_BUTTONS 0x03 |
Both buttons event.
Definition at line 301 of file nbgl_obj.h.
| #define BUTTON_DIAMETER (COMMON_RADIUS * 2) |
Definition at line 99 of file nbgl_obj.h.
| #define BUTTON_STROKE 2 |
Definition at line 283 of file nbgl_obj.h.
| #define BUTTON_WIDTH BUTTON_DIAMETER |
Definition at line 104 of file nbgl_obj.h.
| #define C_leftArrow32px _Pragma("GCC warning \"Deprecated constant!\"") C_Back_32px |
Definition at line 256 of file nbgl_obj.h.
| #define C_Message_64px _Pragma("GCC warning \"Deprecated constant!\"") C_Review_64px |
Definition at line 255 of file nbgl_obj.h.
| #define C_Next32px _Pragma("GCC warning \"Deprecated constant!\"") C_Next_32px |
Definition at line 257 of file nbgl_obj.h.
| #define C_round_check_64px _Pragma("GCC warning \"Deprecated constant!\"") C_Check_Circle_64px |
Definition at line 254 of file nbgl_obj.h.
| #define C_round_cross_64px _Pragma("GCC warning \"Deprecated constant!\"") C_Denied_Circle_64px |
Definition at line 258 of file nbgl_obj.h.
| #define C_round_warning_64px _Pragma("GCC warning \"Deprecated constant!\"") C_Important_Circle_64px |
Definition at line 253 of file nbgl_obj.h.
| #define C_warning64px _Pragma("GCC warning \"Deprecated constant!\"") C_Warning_64px |
Definition at line 252 of file nbgl_obj.h.
| #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 305 of file nbgl_obj.h.
| #define DIGITS_SWITCH_KEY_INDEX 27 |
Definition at line 42 of file nbgl_obj.h.
| #define INACTIVE_COLOR LIGHT_GRAY |
Definition at line 279 of file nbgl_obj.h.
| #define INACTIVE_SMALL_FONT SMALL_BOLD_FONT |
Definition at line 281 of file nbgl_obj.h.
| #define INACTIVE_TEXT_COLOR LIGHT_GRAY |
Definition at line 280 of file nbgl_obj.h.
| #define KEYPAD_MAX_DIGITS 12 |
Definition at line 67 of file nbgl_obj.h.
| #define KEYPAD_REINIT_KEYS 0x1F |
Definition at line 286 of file nbgl_obj.h.
| #define LEFT_BUTTON 0x01 |
| #define LIGHT_TEXT_COLOR DARK_GRAY |
Definition at line 282 of file nbgl_obj.h.
| #define NB_MAX_PAGES_WITH_DASHES 6 |
Definition at line 261 of file nbgl_obj.h.
| #define NB_SPINNER_POSITIONS 4 |
Definition at line 264 of file nbgl_obj.h.
| #define RELEASED_MASK 0x80 |
released (see LSB bits to know what buttons are released)
Definition at line 302 of file nbgl_obj.h.
| #define RIGHT_BUTTON 0x02 |
Right button event.
Definition at line 300 of file nbgl_obj.h.
| #define SHIFT_KEY_INDEX 26 |
Definition at line 41 of file nbgl_obj.h.
| #define SPACE_KEY_INDEX 29 |
Definition at line 44 of file nbgl_obj.h.
| #define SPECIAL_KEYS_INDEX 30 |
Definition at line 45 of file nbgl_obj.h.
| #define SWIPE_MASK ((1 << SWIPED_UP) | (1 << SWIPED_DOWN) | (1 << SWIPED_LEFT) | (1 << SWIPED_RIGHT)) |
Definition at line 292 of file nbgl_obj.h.
| #define VALIDATE_KEY '\r' |
Definition at line 27 of file nbgl_obj.h.
| 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')
| touchedKey | char typed on keyboard |
Definition at line 593 of file nbgl_obj.h.
| 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 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?)
| obj | the concerned object |
| buttonEvent | event on buttons |
Definition at line 325 of file nbgl_obj.h.
| typedef struct PACKED__ nbgl_container_s nbgl_container_t |
struct to represent a container (CONTAINER 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_image_s nbgl_image_t |
struct to represent an image (IMAGE type)
| 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)
| typedef struct PACKED__ nbgl_line_s nbgl_line_t |
struct to represent a vertical or horizontal line
| typedef struct PACKED__ nbgl_mask_control_s nbgl_mask_control_t |
| typedef struct PACKED__ nbgl_obj_s nbgl_obj_t |
Common structure for all graphical objects.
| 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 struct PACKED__ nbgl_progress_bar_s nbgl_progress_bar_t |
struct to represent a progress bar (PROGRESS_BAR type)
| 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_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 struct PACKED__ nbgl_switch_s nbgl_switch_t |
struct to represent a switch (size is fixed) (SWITCH type)
| 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 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
| obj | the concerned object |
| eventType | type of touch event |
Definition at line 346 of file nbgl_obj.h.
| 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
| token | provided token in IMAGE object |
Definition at line 405 of file nbgl_obj.h.
| 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
| token | provided token in TEXT_AREA object |
Definition at line 514 of file nbgl_obj.h.
| anonymous enum |
ids of touchable objects, for external stimulus (by Testing environment)
Definition at line 674 of file nbgl_obj.h.
| enum 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 616 of file nbgl_obj.h.
| enum 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 599 of file nbgl_obj.h.
| enum nbgl_buttonEvent_t |
Definition at line 307 of file nbgl_obj.h.
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 489 of file nbgl_obj.h.
| nbgl_obj_t ** nbgl_containerPoolGet | ( | uint8_t | nbObjs, |
| uint8_t | layer | ||
| ) |
| uint8_t nbgl_containerPoolGetNbUsed | ( | uint8_t | layer | ) |
| void nbgl_containerPoolRelease | ( | uint8_t | layer | ) |
| bool nbgl_keyboardGetPosition | ( | nbgl_keyboard_t * | kbd, |
| char | index, | ||
| uint16_t * | x, | ||
| uint16_t * | y | ||
| ) |
| void nbgl_keyboardTouchCallback | ( | nbgl_obj_t * | obj, |
| nbgl_touchType_t | eventType | ||
| ) |
| bool nbgl_keypadGetPosition | ( | nbgl_keypad_t * | kbd, |
| char | index, | ||
| uint16_t * | x, | ||
| uint16_t * | y | ||
| ) |
| void nbgl_keypadTouchCallback | ( | nbgl_obj_t * | obj, |
| nbgl_touchType_t | eventType | ||
| ) |
| void nbgl_objAllowDrawing | ( | bool | enable | ) |
| void nbgl_objDraw | ( | nbgl_obj_t * | obj | ) |
| void nbgl_objDrawKeyboard | ( | nbgl_keyboard_t * | kbd | ) |
| void nbgl_objDrawKeypad | ( | nbgl_keypad_t * | kbd | ) |
| uint8_t * nbgl_objGetRAMBuffer | ( | void | ) |
| void nbgl_objInit | ( | void | ) |
| bool nbgl_objIsUx | ( | nbgl_obj_t * | obj | ) |
| nbgl_obj_t * nbgl_objPoolGet | ( | nbgl_obj_type_t | type, |
| uint8_t | layer | ||
| ) |
| int nbgl_objPoolGetArray | ( | nbgl_obj_type_t | type, |
| uint8_t | nbObjs, | ||
| uint8_t | layer, | ||
| nbgl_obj_t ** | objArray | ||
| ) |
| uint8_t nbgl_objPoolGetId | ( | nbgl_obj_t * | obj | ) |
| uint8_t nbgl_objPoolGetNbUsed | ( | uint8_t | layer | ) |
| nbgl_obj_t * nbgl_objPoolGetPrevious | ( | nbgl_obj_t * | obj, |
| uint8_t | layer | ||
| ) |
| void nbgl_objPoolRelease | ( | uint8_t | layer | ) |
| void nbgl_refresh | ( | void | ) |
| bool nbgl_refreshIsNeeded | ( | void | ) |
| void nbgl_refreshReset | ( | void | ) |
| void nbgl_refreshSpecial | ( | nbgl_refresh_mode_t | mode | ) |
| void nbgl_refreshSpecialWithPostRefresh | ( | nbgl_refresh_mode_t | mode, |
| nbgl_post_refresh_t | post_refresh | ||
| ) |