mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-27 11:57:48 +08:00
fix(xml): minor fixes of typos and cleanups
Arduino Lint / lint (push) Waiting to run
MicroPython CI / Build esp32 port (push) Waiting to run
MicroPython CI / Build rp2 port (push) Waiting to run
MicroPython CI / Build stm32 port (push) Waiting to run
MicroPython CI / Build unix port (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_NORMAL_8BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_SDL - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_VG_LITE - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_VG_LITE - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_VG_LITE - gcc - Windows (push) Waiting to run
C/C++ CI / Build ESP IDF ESP32S3 (push) Waiting to run
C/C++ CI / Run tests with 32bit build (push) Waiting to run
C/C++ CI / Run tests with 64bit build (push) Waiting to run
BOM Check / bom-check (push) Waiting to run
Verify that lv_conf_internal.h matches repository state / verify-conf-internal (push) Waiting to run
Verify the widget property name / verify-property-name (push) Waiting to run
Verify code formatting / verify-formatting (push) Waiting to run
Build docs / build-and-deploy (push) Waiting to run
Test API JSON generator / Test API JSON (push) Waiting to run
Check Makefile / Build using Makefile (push) Waiting to run
Check Makefile for UEFI / Build using Makefile for UEFI (push) Waiting to run
Port repo release update / run-release-branch-updater (push) Waiting to run
Verify Kconfig / verify-kconfig (push) Waiting to run
Arduino Lint / lint (push) Waiting to run
MicroPython CI / Build esp32 port (push) Waiting to run
MicroPython CI / Build rp2 port (push) Waiting to run
MicroPython CI / Build stm32 port (push) Waiting to run
MicroPython CI / Build unix port (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_NORMAL_8BIT - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_SDL - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_VG_LITE - Ubuntu (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_16BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_24BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_FULL_32BIT - gcc - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_VG_LITE - cl - Windows (push) Waiting to run
C/C++ CI / Build OPTIONS_VG_LITE - gcc - Windows (push) Waiting to run
C/C++ CI / Build ESP IDF ESP32S3 (push) Waiting to run
C/C++ CI / Run tests with 32bit build (push) Waiting to run
C/C++ CI / Run tests with 64bit build (push) Waiting to run
BOM Check / bom-check (push) Waiting to run
Verify that lv_conf_internal.h matches repository state / verify-conf-internal (push) Waiting to run
Verify the widget property name / verify-property-name (push) Waiting to run
Verify code formatting / verify-formatting (push) Waiting to run
Build docs / build-and-deploy (push) Waiting to run
Test API JSON generator / Test API JSON (push) Waiting to run
Check Makefile / Build using Makefile (push) Waiting to run
Check Makefile for UEFI / Build using Makefile for UEFI (push) Waiting to run
Port repo release update / run-release-branch-updater (push) Waiting to run
Verify Kconfig / verify-kconfig (push) Waiting to run
This commit is contained in:
@@ -4,8 +4,6 @@
|
|||||||
Subjects
|
Subjects
|
||||||
========
|
========
|
||||||
|
|
||||||
T
|
|
||||||
Subjects
|
|
||||||
To connect values of the widget internally or to external data, subjects can be used. For example, an internally connected value could be a slider's value mapped to a label. Externally connected data could be the current number of users shown on a label.
|
To connect values of the widget internally or to external data, subjects can be used. For example, an internally connected value could be a slider's value mapped to a label. Externally connected data could be the current number of users shown on a label.
|
||||||
|
|
||||||
To handle internal connections, local subjects can be created like this:
|
To handle internal connections, local subjects can be created like this:
|
||||||
|
|||||||
@@ -127,9 +127,9 @@ lv_result_t lv_xml_component_register_from_data(const char * name, const char *
|
|||||||
XML_SetElementHandler(parser, start_metadata_handler, end_metadata_handler);
|
XML_SetElementHandler(parser, start_metadata_handler, end_metadata_handler);
|
||||||
|
|
||||||
if(XML_Parse(parser, xml_def, lv_strlen(xml_def), XML_TRUE) == XML_STATUS_ERROR) {
|
if(XML_Parse(parser, xml_def, lv_strlen(xml_def), XML_TRUE) == XML_STATUS_ERROR) {
|
||||||
LV_LOG_WARN("XML parsing error: %s on line %lu",
|
LV_LOG_ERROR("XML parsing error: %s on line %lu",
|
||||||
XML_ErrorString(XML_GetErrorCode(parser)),
|
XML_ErrorString(XML_GetErrorCode(parser)),
|
||||||
(unsigned long)XML_GetCurrentLineNumber(parser));
|
(unsigned long)XML_GetCurrentLineNumber(parser));
|
||||||
XML_ParserFree(parser);
|
XML_ParserFree(parser);
|
||||||
return LV_RESULT_INVALID;
|
return LV_RESULT_INVALID;
|
||||||
}
|
}
|
||||||
@@ -249,7 +249,7 @@ lv_result_t lv_xml_component_unregister(const char * name)
|
|||||||
LV_LL_READ(&ctx->font_ll, font) {
|
LV_LL_READ(&ctx->font_ll, font) {
|
||||||
lv_free((char *)font->name);
|
lv_free((char *)font->name);
|
||||||
}
|
}
|
||||||
lv_ll_clear(&ctx->image_ll);
|
lv_ll_clear(&ctx->font_ll);
|
||||||
|
|
||||||
lv_xml_image_t * image;
|
lv_xml_image_t * image;
|
||||||
LV_LL_READ(&ctx->image_ll, image) {
|
LV_LL_READ(&ctx->image_ll, image) {
|
||||||
@@ -325,7 +325,7 @@ static void process_font_element(lv_xml_parser_state_t * state, const char * typ
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char * as_file = lv_xml_get_value_of(attrs, "as_file");
|
const char * as_file = lv_xml_get_value_of(attrs, "as_file");
|
||||||
if(as_file == NULL || as_file == false) {
|
if(as_file == NULL || lv_streq(as_file, "false")) {
|
||||||
LV_LOG_INFO("Ignore non-file based font `%s`", name);
|
LV_LOG_INFO("Ignore non-file based font `%s`", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -346,9 +346,11 @@ static void process_font_element(lv_xml_parser_state_t * state, const char * typ
|
|||||||
lv_result_t res = lv_xml_register_font(&state->ctx, name, font);
|
lv_result_t res = lv_xml_register_font(&state->ctx, name, font);
|
||||||
if(res == LV_RESULT_INVALID) {
|
if(res == LV_RESULT_INVALID) {
|
||||||
LV_LOG_WARN("Failed to register `%s` tiny_ttf font", name);
|
LV_LOG_WARN("Failed to register `%s` tiny_ttf font", name);
|
||||||
|
lv_tiny_ttf_destroy(font);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Get the font which was just created and add a destroy_cb*/
|
||||||
lv_xml_font_t * f = lv_ll_get_head(&state->ctx.font_ll);
|
lv_xml_font_t * f = lv_ll_get_head(&state->ctx.font_ll);
|
||||||
f->font_destroy_cb = lv_tiny_ttf_destroy;
|
f->font_destroy_cb = lv_tiny_ttf_destroy;
|
||||||
|
|
||||||
@@ -367,9 +369,11 @@ static void process_font_element(lv_xml_parser_state_t * state, const char * typ
|
|||||||
lv_result_t res = lv_xml_register_font(&state->ctx, name, font);
|
lv_result_t res = lv_xml_register_font(&state->ctx, name, font);
|
||||||
if(res == LV_RESULT_INVALID) {
|
if(res == LV_RESULT_INVALID) {
|
||||||
LV_LOG_WARN("Failed to register `%s` bin font", name);
|
LV_LOG_WARN("Failed to register `%s` bin font", name);
|
||||||
|
lv_binfont_destroy(font);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*Get the font which was just created and add a destroy_cb*/
|
||||||
lv_xml_font_t * f = lv_ll_get_head(&state->ctx.font_ll);
|
lv_xml_font_t * f = lv_ll_get_head(&state->ctx.font_ll);
|
||||||
f->font_destroy_cb = lv_binfont_destroy;
|
f->font_destroy_cb = lv_binfont_destroy;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LV_KEYBOARD_XML_PARSER_H
|
#ifndef LV_XML_KEYBOARD_PARSER_H
|
||||||
#define LV_KEYBOARD_XML_PARSER_H
|
#define LV_XML_KEYBOARD_PARSER_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -38,4 +38,4 @@ void lv_xml_keyboard_apply(lv_xml_parser_state_t * state, const char ** attrs);
|
|||||||
} /*extern "C"*/
|
} /*extern "C"*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*LV_KEYBOARD_XML_PARSE_H*/
|
#endif /*LV_XML_KEYBOARD_PARSER_H*/
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LV_TEXTAREA_XML_PARSER_H
|
#ifndef LV_XML_TEXTAREA_PARSER_H
|
||||||
#define LV_TEXTAREA_XML_PARSER_H
|
#define LV_XML_TEXTAREA_PARSER_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -38,4 +38,4 @@ void lv_xml_textarea_apply(lv_xml_parser_state_t * state, const char ** attrs);
|
|||||||
} /*extern "C"*/
|
} /*extern "C"*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*LV_TEXTAREA_XML_PARSE_H*/
|
#endif /*LV_XML_TEXTAREA_PARSER_H*/
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!--
|
<!--
|
||||||
Example
|
Example
|
||||||
<lv_textarea text="Hello"/>
|
<lv_keyboard mode="text_upper"/>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
@@ -16,6 +16,6 @@ Example
|
|||||||
<enum name="user_4"/>
|
<enum name="user_4"/>
|
||||||
</enumdef>
|
</enumdef>
|
||||||
|
|
||||||
<prop name="mode" type="enum:" help="The max range"/>
|
<prop name="mode" type="enum:lv_keyboard_mode" help=""/>
|
||||||
</api>
|
</api>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -5,12 +5,12 @@ Example
|
|||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<api>
|
<api>
|
||||||
<prop name="text" type="string" help="The max range"/>
|
<prop name="text" type="string" help=""/>
|
||||||
<prop name="placeholder" type="string" help="The max range"/>
|
<prop name="placeholder" type="string" help=""/>
|
||||||
<prop name="one_line" type="bool" help="The max range"/>
|
<prop name="one_line" type="bool" help=""/>
|
||||||
<prop name="password_mode" type="bool" help="The max range"/>
|
<prop name="password_mode" type="bool" help=""/>
|
||||||
<prop name="password_show_time" type="int" help="The max range"/>
|
<prop name="password_show_time" type="int" help=""/>
|
||||||
<prop name="text_selection" type="bool" help="The max range"/>
|
<prop name="text_selection" type="bool" help=""/>
|
||||||
<prop name="cursor_pos" type="int" help="The max range"/>
|
<prop name="cursor_pos" type="int" help=""/>
|
||||||
</api>
|
</api>
|
||||||
</widget>
|
</widget>
|
||||||
Reference in New Issue
Block a user