I think LVGL should have standard format for the UI resource files which is already discussed on this forum. In brief, may I propose the following:
-
Specification of the Binary, XML and (optionally?) JSON format for the UI resource file should be created.
-
Various converters, maybe written in C, Python or JavaScript:
- from Binary to C source code
- from Binary to XML
- from XML to Binary
- etc.
-
C API for loading Binary resource file and building LVGL objects from it (screens, widgets, styles, fonts, bitmaps, …)
-
C API to create Binary resource file from LVGL object(s). For example, given the
lv_obj_t*
this API will create Binary resource file which can produce exact the samelv_obj_t*
with the API from point no. 3. This presumes that all the reflection API calls are already in place or should be added in the future.
With the existence of all of this it would be much easier to share between existing and future UI editors, as long as UI editor supports import from and export to UI resource file. This way user will not be locked-in with particular UI editor.
The feature described in point no. 4 is especially interesting, because even if UI editor doesn’t support this format it would be possible to convert generated code into UI resource file.
Thank you!