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:
parent
3aac71b16e
commit
d9f80ecf1a
@ -68,6 +68,14 @@ enum {
|
|||||||
};
|
};
|
||||||
typedef uint8_t lv_kb_style_t;
|
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
|
* 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
|
* Set a new map for the keyboard
|
||||||
* @param kb pointer to a Keyboard object
|
* @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.
|
* @param map pointer to a string array to describe the map.
|
||||||
* See 'lv_btnm_set_map()' for more info.
|
* See 'lv_btnm_set_map()' for more info.
|
||||||
*/
|
*/
|
||||||
static inline void lv_kb_set_map(lv_obj_t * kb, const char * map[])
|
void lv_kb_set_map(lv_obj_t * kb, lv_kb_shift_t shift, const char * map[]);
|
||||||
{
|
|
||||||
lv_btnm_set_map(kb, map);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the button control map (hidden, disabled etc.) for the keyboard. The
|
* 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
|
* control map array will be copied and so may be deallocated after this
|
||||||
* function returns.
|
* function returns.
|
||||||
* @param kb pointer to a keyboard object
|
* @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.
|
* @param ctrl_map pointer to an array of `lv_btn_ctrl_t` control bytes.
|
||||||
* See: `lv_btnm_set_ctrl_map` for more details.
|
* 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[])
|
void lv_kb_set_ctrl_map(lv_obj_t * kb, lv_kb_shift_t shift, const lv_btnm_ctrl_t ctrl_map[]);
|
||||||
{
|
|
||||||
lv_btnm_set_ctrl_map(kb, ctrl_map);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a style of a keyboard
|
* Set a style of a keyboard
|
||||||
|
Loading…
x
Reference in New Issue
Block a user