Edje Programming Guide

This programming guide shows you how to write an EDC file that can be used to theme a EFL application. It describes concepts about parts positioning and resizing. It also explains part animations that can be done through programs.

Table of Contents

Quick How-tos

Adding Element on Screen

Add a new part inside the parts block.

Using Image

List the image in the images block, make sure the part has type ā€œIMAGEā€ and set the normal property inside description.image of part.

Using Same Color Definitions Across Multiple Elements

Define a color class and set the description.color_class property.

Positioning or Resizing a Part (Relative and Absolute Positioning)

Fill in the rel1 and rel2 structures inside the description block.

Hiding Part

Set the visible property to 0.

Animating Part

Create several description blocks inside your part and give each of them a different value for state. Set one description for the initial state and one for the end state.

Create a program with an action that is STATE_SET ā€œend_stateā€ 0.0; and with a target that is the name of the part. You can also set a non-default transition.

When defining the second description , inherit from the first part in order to re-use the values which are already defined.

The after property of the program block is used to trigger another program after the animation is done. It can be used to trigger another animation or to emit a signal to the C part of the program.

Making Genlist Item Theme

Create a Group Block with one part element for each part that can be filed from the C code and set the items properties inside the group element:

items: "texts" "text_part_1 text_part_2";
items: "icons" "image_part_1 image_part_2";

On the C side, the text_get and content_get callback are called respectively with text_part_1 and text_part_2, and image_part_1 and image_part_2.