docs(editor): add XML and C integration guides and minor refactoring (#8954)

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: liamHowatt <liamjmh0@gmail.com>
This commit is contained in:
Gabor Kiss-Vamosi
2025-10-01 20:45:13 +02:00
committed by GitHub
parent 0a9a145987
commit 0ba7cb5ea6
39 changed files with 608 additions and 328 deletions
+3 -3
View File
@@ -38,9 +38,9 @@ void lv_example_xml_1(void)
"</component>";
/*Register all the custom components*/
lv_xml_component_register_from_data("red_button", red_button_xml);
lv_xml_component_register_from_data("card", card_xml);
lv_xml_component_register_from_data("motor_card", motor_card_xml);
lv_xml_register_component_from_data("red_button", red_button_xml);
lv_xml_register_component_from_data("card", card_xml);
lv_xml_register_component_from_data("motor_card", motor_card_xml);
lv_obj_t * card;
/*Create a card with the default values*/
+5 -5
View File
@@ -4,17 +4,17 @@
void lv_example_xml_2(void)
{
lv_result_t res;
res = lv_xml_component_register_from_file("A:lvgl/examples/others/xml/my_h3.xml");
res = lv_xml_register_component_from_file("A:lvgl/examples/others/xml/my_h3.xml");
if(res != LV_RESULT_OK) {
lv_obj_t * label = lv_label_create(lv_screen_active());
lv_label_set_text(label, "Couldn't open the XML files.");
lv_obj_center(label);
return;
}
lv_xml_component_register_from_file("A:lvgl/examples/others/xml/my_card.xml");
lv_xml_component_register_from_file("A:lvgl/examples/others/xml/my_button.xml");
lv_xml_component_register_from_file("A:lvgl/examples/others/xml/view.xml");
lv_xml_translation_register_from_file("A:lvgl/examples/others/xml/translations.xml");
lv_xml_register_component_from_file("A:lvgl/examples/others/xml/my_card.xml");
lv_xml_register_component_from_file("A:lvgl/examples/others/xml/my_button.xml");
lv_xml_register_component_from_file("A:lvgl/examples/others/xml/view.xml");
lv_xml_register_translation_from_file("A:lvgl/examples/others/xml/translations.xml");
lv_xml_register_font(NULL, "lv_montserrat_18", &lv_font_montserrat_18);