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"
Go to the source code of this file.
Macros | |
#define | DIGIT_ICON C_pin_24 |
Enumerations | |
enum | { TITLE_INDEX = 0 , INPUT_INDEX , LINE_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. More... | |
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. More... | |
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. More... | |
int | nbgl_layoutUpdateHiddenDigits (nbgl_layout_t *layout, uint8_t index, uint8_t nbActive) |
Updates an existing set of hidden digits, with the given configuration. More... | |
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. More... | |
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. More... | |
Implementation of keypad management of predefined layouts management for Applications.
Definition in file nbgl_layout_keypad.c.
#define DIGIT_ICON C_pin_24 |
Definition at line 31 of file nbgl_layout_keypad.c.
anonymous enum |
Enumerator | |
---|---|
TITLE_INDEX | |
INPUT_INDEX | |
LINE_INDEX | |
NB_CHILDREN |
Definition at line 34 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 179 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 71 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 337 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 266 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 132 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 484 of file nbgl_layout_keypad.c.