Considering using LVGL for Citrine

Hi,

My name is Gabor de Mooij (from the Netherlands) and I am developing the Citrine programming language (https://citrine-lang.org/).
Citrine is a localized programming language, to make it simpler for people to write code in their native language. While the language is good to make simple games, its capabilities for GUIs are really limited. So, I was thinking of using LVGL and its upcoming GUI builder (maybe EEZ Studio as well) to add GUI support.

The idea is that users can use these GUI builders to export GUIs. They can import them into the language, through one simple command and then start interacting with the GUIs. They can also use template GUIs (predefined). The reason for this approach is the fact that Citrine is localized and it would be very complex and time consuming to translate all GUI operations in all 110+ languages. So, by importing the GUI file and just handling custom named events and set custom named properties, the language issue is circumvented.

Citrine allows users to export apps and games to Windows, Linux, MacOS, Android, iOS, Web and Steamdeck. Support for HaikuOS and QNX might also be included.

Any thoughts? Do you think this is a somewhat useful decision? Any tips or recommendations maybe? Maybe this is just a very bad idea, but it looks nice. LVGL really looks awesome, and I love the generated c-code. Also, I currently use SDL2 as a backbone, and LVGL seems to have SDL2 drivers as well, which is another match. Please give me some feedback.

cheers,
Gabor de Mooij

Hoi,

Citrine seems interesting. Care to explain how you enivision importing the GUIs into citrine? A GUI written with LVGL is just C code.

Groetjes,
Tinus

Hai,

Dankje! I added a small diagram to illustrate my current plan. Maybe I am approaching this from the wrong angle, but this is my initial idea. The user can just create a nice GUI with EEZ Studio or the upcoming LVGL editor. After that, the resulting folder passed to an adapter (I might also offer this as a web service like I do with the editor, for convenience). The adapter modifies the code (if needed) and compiles it a DLL, Dylib or SO. The resulting dynamic library is then imported through the ‘link:’ command (koppel: in Dutch). After that, the user obtains a GUI object. Events from the GUI are passed through as events while messages to the GUI are passed to the c-code. I probably miss a few steps (I always do), but we’ll see how far we can get. :wink:

Of course, one issue I can spot right away is that by creating an .so I tie the component to a single platform. So instead I might defer this stage till later and keep it in C. Or make a bundle with several dynamic libraries all-in-one. But this is the general idea, I still need to figure out the details. :grinning:

groetjes,
Gabor

Hi Gabor,

Do you maybe have Hungarian roots? I’m also Gabor but never heard this name in other countries. :slightly_smiling_face:

To answer your technical questions: if you are aiming for multiple human languages wouldn’t the English interface of the editor’s be an issue? In our new editor we are planning to add localisation support, but it’s a longer term plan. (Fyi, preview video is available here)

Anyway, I think integrating lvgl in the way you described is absolutely doable.

Hi Gabor,

Thanks for your reply. The name “Gabor” (it’s my first name) is not very common in the Netherlands and I have no Hungarian roots as far as I know. I think my mother just thought it was a pretty name. :grinning:

I already watched the preview video, it looks great. I don’t think it’s much of a problem that the interface of the GUI builders is in English. I probably make a basic GUI template for the beginners anyway. I will keep you updated on my progress.

cheers,
Gabor

I also think that it’s a pretty name :smile:

Thank you for keeping us updated! I’d be happy to help if you face any LVGL related issues.