1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-21 06:53:01 +08:00

Update lv_kb.h

Changed keyboard map set functions to take 'lv_kb_shift_t' keyboard shift parameter
This commit is contained in:
xennex22 2019-09-28 09:15:22 -07:00 committed by GitHub
parent 3aac71b16e
commit d9f80ecf1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,14 @@ enum {
};
typedef uint8_t lv_kb_style_t;
enum {
LC_KB_SHIFT_LOWER = 0,
LC_KB_SHIFT_UPPER,
LC_KB_SHIFT_SYMBOL,
};
typedef uint8_t lv_kb_shift_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
@ -108,26 +116,22 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en);
/**
* Set a new map for the keyboard
* @param kb pointer to a Keyboard object
* @param shift keyboard map to alter 'lv_kb_shift_t'
* @param map pointer to a string array to describe the map.
* See 'lv_btnm_set_map()' for more info.
*/
static inline void lv_kb_set_map(lv_obj_t * kb, const char * map[])
{
lv_btnm_set_map(kb, map);
}
void lv_kb_set_map(lv_obj_t * kb, lv_kb_shift_t shift, const char * map[]);
/**
* Set the button control map (hidden, disabled etc.) for the keyboard. The
* control map array will be copied and so may be deallocated after this
* function returns.
* @param kb pointer to a keyboard object
* @param shift keyboard ctrl map to alter 'lv_kb_shift_t'
* @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes.
* See: `lv_btnm_set_ctrl_map` for more details.
*/
static inline void lv_kb_set_ctrl_map(lv_obj_t * kb, const lv_btnm_ctrl_t ctrl_map[])
{
lv_btnm_set_ctrl_map(kb, ctrl_map);
}
void lv_kb_set_ctrl_map(lv_obj_t * kb, lv_kb_shift_t shift, const lv_btnm_ctrl_t ctrl_map[]);
/**
* Set a style of a keyboard