EFL – A UI Toolkit Designed for the Embedded World – Tom Hacohen (Samsung)

Enlightenment started in 1996 as a window manager, got split up into libraries, and was always targeted at low-end devices. Improving all the time on speed, memory and power consumption. Guiding principles: choice/configurability, efficiency but keep eye candy, portability, and a sense of humour. EFL is used in constrained embedded products like regrigerators.

EFL has a general purpose library that provides services that help for efficiency: shared string constants; in-line lists and arrays; copy-on-write C structures and unions; magic checks on structures and an object model to use it. EET is a serialization library (cross-platform), compressed and signed; the serialized file can be mmap-ed and accessed directly. Thread library has a mainloop with file I/O and integration with glib mainloop. Everything is async and deferred as much as possible, so rendering is only done if needed.

Animations use timers that tick at most on every frame (according to screen refresh rate), but drop frames if you’re not fast enough.

Edje is the theming library and language (based on lua, in the future it will be even more lua), uses EET to store the themes. Developers don’t track UI elements, they track state and edje provides the UI for it: designers do design, developers do code. This also makes it scalable to different resolutions. Layouting is also part of the theming. Designer can design a theme with no functionality, which actually displays on screen. Developer can then implement the callbacks. In the future, the signals of the callbacks will be replaced by state variables.

Elementary is the widget library. There are too many widgets. Widgets get themes applied to them. Scaling factor selects the appropriate subtheme depending on screen size or other resizing. Similar for finger size, which updates the input areas but also the rendering. For i18n, it also supports automatic mirroring for RL text..

Wayland is great for EFL, and EFL were the first ones to have implement a client.

Why EFL is good for embedded:

  • Write once, run everywhere – develop on the host, then deploy it.
  • Obsessed with optimizations (which is also why things sometimes breaks).
  • Many developers work in embedded.

[Then there were a lot of demos of the crazy and useless things you can do with EFL and its applications.]

To make development easier, the UI inspector can show which components exist and how they are structured, also remotely and it can be saved and loaded. Exactness does pixel perfect regression testing (but you can’t test animations like that, and the theme has to stay the same). Edje has a visual editor, which does a real-time preview of the Edje file.

For gestures, EFL uses a separate surface that captures the gestures, analyses them, and passes them on to the underlying widgets.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s