Basic Application Structure Program Guide

See the EFL Concept Overview here.

Structure of EFL Applications

The Enlightenment Foundation Libraries (EFL) provide all the libraries you need to create powerful applications. This section presents an overview of the libraries and when to use them in developing applications.

Enlightenment is a window manager, which in the X Window System means that it handles the borders, iconification, expansion, and movement of windows on screens. Enlightenment can also provide multiple virtual desktops. The initial version was developed in the 1990s by Rasterman (Carsten Haitzler).

EFL initially represented the libraries on which the window manager was based. Since then it has become more powerful, more memory efficient, and more useful for embedded devices and touchscreen interfaces.

EFL is a set of layered libraries:

EFL Libraries

When you create a basic EFL application, you use the following main libraries:

  • Elementary is the top-most library with which you create your EFL application. It provides all the functions you need to create a window, generate simple and complex layouts, manage the life cycle of a view, and add widgets. For more information see the Widgets Program Guide.

  • Edje is the library used by Elementary to provide powerful themes. You can also use Edje to create your own objects and use them in your application and/or add features to the default theme. You can find more information about Edje and the EDC format in Edje and Customizing Widgets.

  • Ecore is the library which manages the main loop of your application. The main loop is one of the most important concepts you need to understand in order to develop an application. This is where events are handled and where you interact with the user through the callback mechanism. For more information see the Main Loop guide.

  • Evas is the canvas engine. It's responsible for drawing your content. All graphical objects you create are Evas objects. Evas handles the window state by filling the canvas with objects and manipulating their values. In contrast to other canvas libraries, such as Cairo, OpenGL, and XRender, Evas is not a drawing library but a scene graph library which retains the state of all objects. The Evas concept is explained in Rendering Concept and Method in Evas.
    Evas objects are created and then manipulated until they are no longer needed, at which point they are deleted. This allows you, as the developer, to work on the same level as a designer. You can use direct mapping, as opposed to having to convert the concepts into drawing commands in a certain sequence then calculate minimum drawing calls needed and so on.

  • Eina forms the basis of all EFL libraries. It's a toolbox that implements an efficient API for data types. Eina contains all the functions needed to create lists and hashes, manage shared strings, open shared libraries and manage errors and memory pools. You can explore more Eina concepts by visiting Using Data Types.

EFL contains far more libraries than those listed above. You can find the complete list in the Efl Overview but the ones cited are the most important ones for getting started. You will learn about other libraries, such as Eet, Embryo, and Emotion in further programming guides and the API References.

Elementary Concepts

An application is any process launched by a user. Every application has at least one window for displaying content. Users can interact with the content through events. Different events can modify the life cycle of an application. For instance, the application may receive data from a network connection and it may also receive keyboard events. From the computer's point of view, an application is a collection of code that reacts to events and displays content on the screen. Elementary bridges this divide between the user and the code.

Elementary provides a variety of pre-built User Interface (UI) components, such as layout objects and widgets, which allow you to build rich graphical user interfaces for your applications. Every Elementary application has at least one window for presenting its content. The window provides the area in which to display the content and is where the Evas canvas is placed.

There are three main categories of objects provided by Elementary. The first are Widgets, which are used to build your application UI. Widgets exist within the second category of objects known as Containers. The final category is Infrastructure. These are the modules that deal with Elementary as a whole.

Visit The EFL Hello World Tutorial to get started with developing your first application with Elementary and EFL.