rename multi-lang functions
This commit is contained in:
@@ -207,20 +207,20 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set an ID which means a the same source but on different languages
|
* Set an ID which means a the same source but in different languages
|
||||||
* @param img pointer to an image object
|
* @param img pointer to an image object
|
||||||
* @param src_id ID of the source
|
* @param src_id ID of the source
|
||||||
*/
|
*/
|
||||||
void lv_img_set_src_multi(lv_obj_t * img, uint32_t txt_id)
|
void lv_img_set_src_id(lv_obj_t * img, uint32_t src_id)
|
||||||
{
|
{
|
||||||
#if USE_LV_MULTI_LANG
|
#if USE_LV_MULTI_LANG
|
||||||
lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
|
lv_img_ext_t * ext = lv_obj_get_ext_attr(img);
|
||||||
ext->lang_txt_id = txt_id;
|
ext->lang_txt_id = lv_img_set_src_id;
|
||||||
|
|
||||||
/*Apply the new language*/
|
/*Apply the new language*/
|
||||||
img->signal_func(img, LV_SIGNAL_LANG_CHG, NULL);
|
img->signal_func(img, LV_SIGNAL_LANG_CHG, NULL);
|
||||||
#else
|
#else
|
||||||
LV_LOG_WARN("lv_img_set_src_multi: multiple languages are not enabled. See lv_conf.h USE_LV_MULTI_LANG ")
|
LV_LOG_WARN("lv_img_set_src_id: multiple languages are not enabled. See lv_conf.h USE_LV_MULTI_LANG ")
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ void lv_img_set_src(lv_obj_t * img, const void * src_img);
|
|||||||
* @param img pointer to an image object
|
* @param img pointer to an image object
|
||||||
* @param src_id ID of the source
|
* @param src_id ID of the source
|
||||||
*/
|
*/
|
||||||
void lv_img_set_src_multi(lv_obj_t * img, uint32_t txt_id);
|
void lv_img_set_src_id(lv_obj_t * img, uint32_t txt_id);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,11 +95,11 @@ static inline void lv_img_set_file(lv_obj_t * img, const char * fn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set an ID which means a the same source but on different languages
|
* Set an ID which means a the same source but in different languages
|
||||||
* @param img pointer to an image object
|
* @param img pointer to an image object
|
||||||
* @param src_id ID of the source
|
* @param src_id ID of the source
|
||||||
*/
|
*/
|
||||||
void lv_img_set_src_multi(lv_obj_t * img, uint32_t txt_id);
|
void lv_img_set_src_id(lv_obj_t * img, uint32_t src_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable the auto size feature.
|
* Enable the auto size feature.
|
||||||
|
|||||||
@@ -238,11 +238,11 @@ void lv_label_set_static_text(lv_obj_t * label, const char * text)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*Set a text ID which means a the same text but on different languages
|
*Set a text ID which refers a the same text but in a different languages
|
||||||
* @param label pointer to a label object
|
* @param label pointer to a label object
|
||||||
* @param txt_id ID of the text
|
* @param txt_id ID of the text
|
||||||
*/
|
*/
|
||||||
void lv_label_set_text_lang(lv_obj_t * label, uint32_t txt_id)
|
void lv_label_set_text_id(lv_obj_t * label, uint32_t txt_id)
|
||||||
{
|
{
|
||||||
#if USE_LV_MULTI_LANG
|
#if USE_LV_MULTI_LANG
|
||||||
lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
|
lv_label_ext_t * ext = lv_obj_get_ext_attr(label);
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ void lv_label_set_static_text(lv_obj_t * label, const char * text);
|
|||||||
* @param label pointer to a label object
|
* @param label pointer to a label object
|
||||||
* @param txt_id ID of the text
|
* @param txt_id ID of the text
|
||||||
*/
|
*/
|
||||||
void lv_label_set_text_lang(lv_obj_t * label, uint32_t txt_id);
|
void lv_label_set_text_id(lv_obj_t * label, uint32_t txt_id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the behavior of the label with longer text then the object size
|
* Set the behavior of the label with longer text then the object size
|
||||||
|
|||||||
Reference in New Issue
Block a user