EFL C Porting Guide

This document highlights the main differences between the original EFL API (known from now on as Legacy API) and the new EFL API based on Eo objects (dubbed Unified API). The Unified API was introduced in EFL 1.21, early in 2018.

Both APIs can be used simultaneously, but support for the Legacy one will be dropped in the future, and therefore usage of the Unified API is strongly recommended in new code.

NOTE: Meanwhile the Legacy API is still the default, enabling the Unified API requires defining two compilation symbols, EFL_EO_API_SUPPORT and EFL_BETA_API_SUPPORT, as can be seen in the tutorials and examples.

Main Loop

In the Unified EFL you no longer access the main loop directly. Each application may run in a different loop and therefor there be no single main loop. To access the main loop for your application retain a reference to the loop that was passed in to your main function as event->object. To retain a reference, add the following code to your application:

Efl_Loop *main_loop = event->object

Timers

Programming guides: Unified EFL, Legacy EFL

File Descriptors

Programming guides: Unified EFL, Legacy EFL

Idlers

Programming guides: Unified EFL, Legacy EFL

User Interface

Widgets

In the Unified Efl.Ui widgets are visible and set to expand by default whilst in Legacy EFL they had to be shown after the correct weight and alignment were set. This should not cause any need for code changes but should mean that UI setup code is much shorter.

Sizing

Programming guides: Unified EFL, Legacy EFL