|
Embedded SDK
Embedded SDK
|
Implementation of keypad management of predefined layouts management for Applications. More...
#include <string.h>#include <stdlib.h>#include "nbgl_debug.h"#include "nbgl_front.h"#include "nbgl_layout_internal.h"#include "nbgl_obj.h"#include "nbgl_draw.h"#include "nbgl_screen.h"#include "nbgl_touch.h"#include "glyphs.h"#include "os_pic.h"#include "os_helpers.h"#include "os.h"
Go to the source code of this file.
Enumerations | |
| enum | { TITLE_INDEX = 0 , INPUT_INDEX , NB_CHILDREN } |
Functions | |
| int | nbgl_layoutAddKeypad (nbgl_layout_t *layout, keyboardCallback_t callback, bool shuffled) |
| Adds a keypad on bottom of the screen, with the associated callback. | |
| int | nbgl_layoutUpdateKeypad (nbgl_layout_t *layout, uint8_t index, bool enableValidate, bool enableBackspace, bool enableDigits) |
| Updates an existing keypad on bottom of the screen, with the given configuration. | |
| int | nbgl_layoutUpdateKeypadValidation (nbgl_layout_t *layout, bool softValidation) |
| Updates an existing keypad on bottom of the screen, with the given configuration, without redraw. | |
| int | nbgl_layoutAddHiddenDigits (nbgl_layout_t *layout, uint8_t nbDigits) |
| Adds a placeholder for hidden digits on top of a keypad, to represent the entered digits, as full circles The placeholder is "underligned" with a thin horizontal line of the expected full length. | |
| int | nbgl_layoutUpdateHiddenDigits (nbgl_layout_t *layout, uint8_t index, uint8_t nbActive) |
| Updates an existing set of hidden digits, with the given configuration. | |
| int | nbgl_layoutAddKeypadContent (nbgl_layout_t *layout, const char *title, bool hidden, uint8_t nbDigits, const char *text) |
| Adds an area with a title and a placeholder for hidden digits on top of a keypad, to represent the entered digits as small discs. On Stax, the placeholder is "underligned" with a thin horizontal line of the expected full length. | |
| int | nbgl_layoutUpdateKeypadContent (nbgl_layout_t *layout, bool hidden, uint8_t nbActiveDigits, const char *text) |
| Updates an existing set of hidden digits, with the given configuration. | |
Implementation of keypad management of predefined layouts management for Applications.
Definition in file nbgl_layout_keypad.c.
| anonymous enum |
| Enumerator | |
|---|---|
| TITLE_INDEX | |
| INPUT_INDEX | |
| NB_CHILDREN | |
Definition at line 30 of file nbgl_layout_keypad.c.
| int nbgl_layoutAddHiddenDigits | ( | nbgl_layout_t * | layout, |
| uint8_t | nbDigits | ||
| ) |
Adds a placeholder for hidden digits on top of a keypad, to represent the entered digits, as full circles The placeholder is "underligned" with a thin horizontal line of the expected full length.
| layout | the current layout |
| nbDigits | number of digits to be displayed |
Definition at line 226 of file nbgl_layout_keypad.c.
| int nbgl_layoutAddKeypad | ( | nbgl_layout_t * | layout, |
| keyboardCallback_t | callback, | ||
| bool | shuffled | ||
| ) |
Adds a keypad on bottom of the screen, with the associated callback.
| layout | the current layout |
| callback | function called when any of the key is touched |
| shuffled | if set to true, digits are shuffled in keypad |
Definition at line 87 of file nbgl_layout_keypad.c.
| int nbgl_layoutAddKeypadContent | ( | nbgl_layout_t * | layout, |
| const char * | title, | ||
| bool | hidden, | ||
| uint8_t | nbDigits, | ||
| const char * | text | ||
| ) |
Adds an area with a title and a placeholder for hidden digits on top of a keypad, to represent the entered digits as small discs. On Stax, the placeholder is "underligned" with a thin horizontal line of the expected full length.
| layout | the current layout |
| title | the text to use on top of the digits |
| hidden | if set to true, digits appear as discs, otherwise as visible digits (given in text param) |
| nbDigits | number of digits to be displayed (only used if hidden is true) |
| text | only used if hidden is false |
Definition at line 380 of file nbgl_layout_keypad.c.
| int nbgl_layoutUpdateHiddenDigits | ( | nbgl_layout_t * | layout, |
| uint8_t | index, | ||
| uint8_t | nbActive | ||
| ) |
Updates an existing set of hidden digits, with the given configuration.
| layout | the current layout |
| index | index returned by nbgl_layoutAddHiddenDigits() |
| nbActive | number of "active" digits (represented by discs instead of circles) |
Definition at line 309 of file nbgl_layout_keypad.c.
| int nbgl_layoutUpdateKeypad | ( | nbgl_layout_t * | layout, |
| uint8_t | index, | ||
| bool | enableValidate, | ||
| bool | enableBackspace, | ||
| bool | enableDigits | ||
| ) |
Updates an existing keypad on bottom of the screen, with the given configuration.
| layout | the current layout |
| index | index returned by nbgl_layoutAddKeypad() (unused, for compatibility) |
| enableValidate | if true, enable Validate key |
| enableBackspace | if true, enable Backspace key |
| enableDigits | if true, enable all digit keys |
Definition at line 149 of file nbgl_layout_keypad.c.
| int nbgl_layoutUpdateKeypadContent | ( | nbgl_layout_t * | layout, |
| bool | hidden, | ||
| uint8_t | nbActiveDigits, | ||
| const char * | text | ||
| ) |
Updates an existing set of hidden digits, with the given configuration.
| layout | the current layout |
| hidden | if set to true, digits appear as discs, otherwise as visible digits (given in text param) |
| nbActiveDigits | number of "active" digits (represented by discs instead of circles) (only used if hidden is true) |
| text | only used if hidden is false |
Definition at line 531 of file nbgl_layout_keypad.c.
| int nbgl_layoutUpdateKeypadValidation | ( | nbgl_layout_t * | layout, |
| bool | softValidation | ||
| ) |
Updates an existing keypad on bottom of the screen, with the given configuration, without redraw.
| layout | the current layout |
| softValidation | if true, the "check icon" is replaced by an arrow |
Definition at line 192 of file nbgl_layout_keypad.c.