|
Embedded SDK
Embedded SDK
|
The construction and touch management of a keyboard object. More...
#include "nbgl_debug.h"#include "nbgl_front.h"#include "nbgl_draw.h"#include "nbgl_obj.h"#include "nbgl_fonts.h"#include "nbgl_touch.h"#include "glyphs.h"#include "os_io_seph_cmd.h"#include "os_io_seph_ux.h"
Go to the source code of this file.
Macros | |
| #define | FIRST_LINE_CHAR_COUNT 10 |
| #define | SECOND_LINE_CHAR_COUNT 9 |
| #define | SHIFT_KEY_WIDTH (NORMAL_KEY_WIDTH + SECOND_LINE_OFFSET) |
| #define | SECOND_LINE_OFFSET ((SCREEN_WIDTH - (SECOND_LINE_CHAR_COUNT * NORMAL_KEY_WIDTH)) / 2) |
| #define | SWITCH_KEY_WIDTH (SCREEN_WIDTH - SPACE_KEY_WIDTH) |
| #define | SPECIAL_CHARS_KEY_WIDTH (NORMAL_KEY_WIDTH * 2 + SECOND_LINE_OFFSET) |
| #define | BACKSPACE_KEY_WIDTH_FULL SHIFT_KEY_WIDTH |
| #define | BACKSPACE_KEY_WIDTH_DIGITS SPECIAL_CHARS_KEY_WIDTH |
| #define | BACKSPACE_KEY_WIDTH_LETTERS_ONLY (SCREEN_WIDTH - 7 * NORMAL_KEY_WIDTH) |
| #define | IS_KEY_MASKED(_index) (keyboard->keyMask & (1 << _index)) |
Functions | |
| void | nbgl_keyboardTouchCallback (nbgl_obj_t *obj, nbgl_touchType_t eventType) |
| function to be called when the keyboard 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) | |
| void | nbgl_objDrawKeyboard (nbgl_keyboard_t *kbd) |
| This function draws a keyboard object. | |
Variables | |
| const char | kbd_digits [] = "1234567890-/:;()&@\".,?!\'" |
The construction and touch management of a keyboard object.
Definition in file nbgl_obj_keyboard.c.
| #define BACKSPACE_KEY_WIDTH_DIGITS SPECIAL_CHARS_KEY_WIDTH |
Definition at line 53 of file nbgl_obj_keyboard.c.
| #define BACKSPACE_KEY_WIDTH_FULL SHIFT_KEY_WIDTH |
Definition at line 52 of file nbgl_obj_keyboard.c.
| #define BACKSPACE_KEY_WIDTH_LETTERS_ONLY (SCREEN_WIDTH - 7 * NORMAL_KEY_WIDTH) |
Definition at line 54 of file nbgl_obj_keyboard.c.
| #define FIRST_LINE_CHAR_COUNT 10 |
Definition at line 28 of file nbgl_obj_keyboard.c.
| #define IS_KEY_MASKED | ( | _index | ) | (keyboard->keyMask & (1 << _index)) |
Definition at line 56 of file nbgl_obj_keyboard.c.
| #define SECOND_LINE_CHAR_COUNT 9 |
Definition at line 29 of file nbgl_obj_keyboard.c.
| #define SECOND_LINE_OFFSET ((SCREEN_WIDTH - (SECOND_LINE_CHAR_COUNT * NORMAL_KEY_WIDTH)) / 2) |
Definition at line 42 of file nbgl_obj_keyboard.c.
| #define SHIFT_KEY_WIDTH (NORMAL_KEY_WIDTH + SECOND_LINE_OFFSET) |
Definition at line 41 of file nbgl_obj_keyboard.c.
| #define SPECIAL_CHARS_KEY_WIDTH (NORMAL_KEY_WIDTH * 2 + SECOND_LINE_OFFSET) |
Definition at line 51 of file nbgl_obj_keyboard.c.
| #define SWITCH_KEY_WIDTH (SCREEN_WIDTH - SPACE_KEY_WIDTH) |
Definition at line 50 of file nbgl_obj_keyboard.c.
| 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)
| kbd | the object to be drawned |
| index | ascii character (in lower-case) |
| x | [out] the top-left position |
| y | [out] the top-left position |
Definition at line 644 of file nbgl_obj_keyboard.c.
| void nbgl_keyboardTouchCallback | ( | nbgl_obj_t * | obj, |
| nbgl_touchType_t | eventType | ||
| ) |
function to be called when the keyboard object is touched
| obj | touched object (keyboard) |
| eventType | type of touch (only TOUCHED is accepted) |
Definition at line 526 of file nbgl_obj_keyboard.c.
| void nbgl_objDrawKeyboard | ( | nbgl_keyboard_t * | kbd | ) |
This function draws a keyboard object.
| kbd | the object to be drawned |
Definition at line 692 of file nbgl_obj_keyboard.c.
| const char kbd_digits[] = "1234567890-/:;()&@\".,?!\'" |
Definition at line 71 of file nbgl_obj_keyboard.c.