Published on 25th of October 2017
Main Modules of EFL Tizen

Since in Tizen the native frameworks is mainly built using EFL libraries, during development, you need to figure out in which of the modules to look for the necessary functions, so as not try to find timers in the module containing the graphic components.

lesson_009_00

In this lesson, we will consider the basic elements of the native EFL applications in Tizen.

Elementary

Elementary – is a very simple library for creating widgets and containers, using which you can manage or view various contents of your application. Elementary contains such standard widgets as: buttons, check boxes, lists, and elements for entering text into text fields, calendar, progress bars, and much more. This module uses Edje, Evas, Ecore and Eina to create and render widgets.

Edje

Edje – is a library for managing, creating and editing graphic themes and widget styles in Elementary library. All these themes are written in EDC scripting language, about which we will talk more closely in the following lessons. This is a very flexible language for creating layouts and separate widget elements animation. If you want to change the appearance of your application, then EDC is exactly what you need.

The entire process of creating an application appearance can be performed with Edje tools. In addition, this tool is very flexible in making graphic elements animations. In Edje is very convenient that in the application you can completely separate appearance and logic, and in case you want to change the layout of your application's widgets, it can be done in a separate place with just a few operations. To edit EDC files, in Tizen Studio there is a built-in tool - Enventor.

Evas

Evas – is a library for displaying elements on canvas. It stores all graphic components in the form of geometric parameters, using which Evas visualize the contents of the screen on each drawing cycle. In the Tizen application, all graphic elements are Evas objects. Evas contains a large number of functions for changing the state of these objects, receiving response from elements, for example signal for clicking on an object or deleting it. All widgets of the Elementary library are Evas objects, and they are called smart objects (Evas Smart Object).

Ecore

Ecore – is a library that is mainly used to launch events with a time delay, applying timers, and also for parallelizing tasks by using threads.

Eina

Eina – is a library that contains a container for data, such as lists, arrays, or hashes. Also in this library there are functions for converting formats, for example strings to numbers or vice versa. Using this library, you can make log file to your program.

Naming Functions and Code Style

If you go to the repository with EFL source code, its style may seems unusual to you. For more information on the requirements for the EFL code style, go here. Why is it important?! If you use the EFL framework in your application, you will have to navigate in its functions. In order to find a required function, at least you should understand how it is called. Otherwise each time you will have to search for an answer in the Internet or in header files. Name of the function supposed to look like this:

<module>_<object>_<specializations>_<action>

The first word is the name of the module in which function is located, for example: evas, edje or elm (for Elementary). The second - is the name of the object for which this function is called. Further there are specializations: there can be name of the parameter or specialization can be absent at all. The last one is always name of the action (set, get, hide, etc.). From the above, select a function to set the text into one of the widgets from Elementary library.

elm – module name

object – object from elementary

text – what will be changed

set – set a new text

elm_object_text_set()

In the next lesson we will show you where to start in UI applications creations, we'll look at the main elements of the screen, and will analyze the user interface of the template, created in the lesson 7.

Leave a Reply

Your email address will not be published. Required fields are marked *