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

lv_btnm, lv_kb: replace 'const char ** x' with const char * x[]

This commit is contained in:
Gabor Kiss-Vamosi 2019-04-03 15:47:36 +02:00
parent c55c36c366
commit 1d986e13df
3 changed files with 16 additions and 3 deletions

View File

@ -141,7 +141,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy)
* @param btnm pointer to a button matrix object
* @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break.
*/
void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map)
void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[])
{
if(map == NULL) return;

View File

@ -96,7 +96,7 @@ lv_obj_t * lv_btnm_create(lv_obj_t * par, const lv_obj_t * copy);
* @param btnm pointer to a button matrix object
* @param map pointer a string array. The last string has to be: "". Use "\n" to make a line break.
*/
void lv_btnm_set_map(const lv_obj_t * btnm, const char ** map);
void lv_btnm_set_map(const lv_obj_t * btnm, const char * map[]);
/**
* Set the button control map (hidden, disabled etc.) for a button matrix. The

View File

@ -110,11 +110,24 @@ void lv_kb_set_cursor_manage(lv_obj_t * kb, bool en);
* @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)
static inline void lv_kb_set_map(lv_obj_t *kb, const char * map[])
{
lv_btnm_set_map(kb, 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 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);
}
/**
* Set a style of a keyboard
* @param kb pointer to a keyboard object