export system_info_set_app_root

This commit is contained in:
lixianjing 2020-10-01 18:42:34 +08:00
parent 7dce167417
commit 8f76a08645
4 changed files with 35 additions and 2 deletions

View File

@ -2013,6 +2013,7 @@ EXPORTS
system_info_init
system_info_deinit
system_info_set_font_scale
system_info_set_app_root
system_info_set_default_font
system_info_set_lcd_w
system_info_set_lcd_h

View File

@ -47,9 +47,9 @@ static bool_t app_root_is_valid(const char* app_root) {
return path_exist(res_root);
}
static ret_t system_info_set_app_root(system_info_t* info, const char* app_root) {
ret_t system_info_set_app_root(system_info_t* info, const char* app_root) {
if (app_root != NULL) {
info->app_root = tk_strdup(app_root);
info->app_root = tk_str_copy(info->app_root, app_root);
log_debug("app_root=%s\n", app_root);
}

View File

@ -171,6 +171,17 @@ ret_t system_info_deinit(void);
*/
ret_t system_info_set_font_scale(system_info_t* info, float_t font_scale);
/**
* @method system_info_set_app_root
* app root
*
* @param {system_info_t* info} info system_info对象
* @param {const char*} app_root app root
*
* @return {ret_t} RET_OK表示成功
*/
ret_t system_info_set_app_root(system_info_t* info, const char* app_root);
/**
* @method system_info_set_default_font
*

View File

@ -60641,6 +60641,27 @@
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{
"type": "system_info_t* info",
"name": "info",
"desc": "system_info对象。"
},
{
"type": "const char*",
"name": "app_root",
"desc": "app root。"
}
],
"annotation": {},
"desc": "设置app root。",
"name": "system_info_set_app_root",
"return": {
"type": "ret_t",
"desc": "返回RET_OK表示成功否则表示失败。"
}
},
{
"params": [
{