Edje Data Collection reference

 

An Edje Data Collection, it's a plain text file (normally identified with the .edc extension), consisting of instructions for the Edje Compiler.

The syntax for the edje data collection files follows a simple structure of "blocks { .. }" that can contain "properties: ..", more blocks, or both.

Quick access to block descriptions:

Author
Andres Blanc (dresb) andre.nosp@m.sbla.nosp@m.nc@gm.nosp@m.ail..nosp@m.com

Top-Level blocks

Externals

externals
externals {
external: "name";
}
 

The "externals" block is used to list each external module file that will be used in others programs.

 
external [external filename]
 Used to add a file to the externals list.

Images

images
images {
image: "filename1.ext" COMP;
image: "filename2.ext" LOSSY 99;
set {
name: "image_name_used";
image {
image: "filename3.ext" LOSSY 90;
size: 201 201 500 500;
}
image {
image: "filename4.ext" COMP;
size: 51 51 200 200;
}
image {
image: "filename5.ext" COMP;
size: 11 11 50 50;
}
image {
image: "filename6.ext" RAW;
size: 0 0 10 10;
}
}
..
}
 

The "images" block is used to list each image file that will be used in the theme along with its compression method (if any). Besides the document's root, additional "images" blocks can be included inside other blocks, normally "collections", "group" and "part", easing maintenance of the file list when the theme is split among multiple files.

 
image [image file] [compression method] (compression level)
 Used to include each image file. The full path to the directory holding the images can be defined later with edje_cc's "-id" option. Compression methods:
  • RAW: Uncompressed.
  • COMP: Lossless compression.
  • LOSSY [0-100]: Lossy compression with quality from 0 to 100.
  • USER: Do not embed the file, refer to the external file instead.

Set

set
set {
name: "image_name_used";
image {
image: "filename3.ext" LOSSY 90;
size: 201 201 500 500;
}
image {
image: "filename4.ext" COMP;
size: 51 51 200 200;
}
image {
image: "filename5.ext" COMP;
size: 11 11 50 50;
}
image {
image: "filename6.ext" RAW;
size: 0 0 10 10;
}
}
 

The "set" block is used to define an image with different content depending on their size. Besides the document's root, additional "set" blocks can be included inside other blocks, normally "collections", "group" and "part", easing maintenance of the file list when the theme is split among multiple files.

 

name [image name]
 Define the name that refer to this image description.

Image

image
 

The "image" block inside a "set" block define the characteristic of an image. Every block will describe one image and the size rule to use it.

 

image [image file] [compression method] (compression level)
 Used to include each image file. The full path to the directory holding the images can be defined later with edje_cc's "-id" option. Compression methods:
  • RAW: Uncompressed.
  • COMP: Lossless compression.
  • LOSSY [0-100]: Lossy compression with quality from 0 to 100.
  • USER: Do not embed the file, refer to the external file instead.

 

size [minw minh maxw mawh]
 Define the minimal and maximal size that will select the specified image.

 

border [left] [right] [top] [bottom]
Since
1.8
  If set, the area (in pixels) of each side of the image will be displayed as a fixed size border, from the side -> inwards, preventing the corners from being changed on a resize.

 

border_scale_by 0.0 or bigger (0.0 or 1.0 to turn it off)
Since
1.8
  If border scaling is enabled then normally the OUTPUT border sizes (e.g. if 3 pixels on the left edge are set as a border, then normally at scale 1.0, those 3 columns will always be the exact 3 columns of output, or at scale 2.0 they will be 6 columns, or 0.33 they will merge into a single column). This property multiplies the input scale factor by this multiplier, allowing the creation of "supersampled" borders to make much higher resolution outputs possible by always using the highest resolution artwork and then runtime scaling it down.

Fonts

fonts
fonts {
font: "filename1.ext" "fontname";
font: "filename2.ext" "otherfontname";
..
}
 

The "fonts" block is used to list each font file with an alias used later in the theme. As with the "images" block, additional "fonts" blocks can be included inside other blocks.

 

font [font filename] [font alias]
 Defines each font "file" and "alias", the full path to the directory holding the font files can be defined with edje_cc's "-fd" option.

Data

data
data {
item: "key" "value";
file: "otherkey" "filename.ext";
..
}
 

The "data" block is used to pass arbitrary parameters from the theme to the application. Unlike the "images" and "fonts" blocks, additional "data" blocks can only be included inside the "group" block.

 

item [parameter name] [parameter value]
 Defines a new parameter, the value will be the string specified next to it.

 

file [parameter name] [parameter filename]
 Defines a new parameter, the value will be the contents of the specified file formated as a single string of text. This property only works with plain text files.

Color Classes

color_classes
color_classes {
color_class {
name: "colorclassname";
color: [0-255] [0-255] [0-255] [0-255];
color2: [0-255] [0-255] [0-255] [0-255];
color3: [0-255] [0-255] [0-255] [0-255]
}
..
}
 

The "color_classes" block contains a list of one or more "color_class" blocks. Each "color_class" allows the designer to name an arbitrary group of colors to be used in the theme, the application can use that name to alter the color values at runtime.

 

name [color class name]
 Sets the name for the color class, used as reference by both the theme and the application.

 

color [red] [green] [blue] [alpha]
 The main color.

 

color2 [red] [green] [blue] [alpha]
 Used as outline in text and textblock parts.

 

color3 [red] [green] [blue] [alpha]
 Used as shadow in text and textblock parts.

Styles

styles
styles {
style {
name: "stylename";
base: "..default style properties..";
tag: "tagname" "..style properties..";
..
}
..
}
 

The "styles" block contains a list of one or more "style" blocks. A "style" block is used to create style <tags> for advanced TEXTBLOCK formatting.

 

name [style name]
 The name of the style to be used as reference later in the theme.

 

base [style properties string]
 The default style properties that will be applied to the complete text.

 

tag [tag name] [style properties string]
 Style to be applied only to text between style <tags>..</tags>. When creating "paired" tags, like <bold></bold>, A '+' should be added at the start of the style properties of the first part (<bold>). If the second part (</bold>) is also defined, a '-' should be prepended to it's style properties. This only applies to paired tags; Single tags, like <tab>, must not include a starting '+'.

Collections Blocks

collections
collections {
..
sounds { }
group { }
group { }
..
}
 

The "collections" block is used to list the groups that compose the theme. Additional "collections" blocks do not prevent overriding group names. The "sounds" block comprises of all sound definitions.

Sounds

sounds
sounds {
sample {
name: "sound_file1" COMP;
source: "sound_file1.wav";
}
sample {
name: "sound_file2" LOSSY 0.4;
source: "sound_file2.wav";
}
tone: "tone-1" 2300;
}
 

The "sounds" block contains a list of one or more sound sample and tones items.

Sample

sample
sample {
name: "sound_file1" RAW;
source: "sound_file1.wav";
}
sample {
name: "sound_file2" LOSSY 0.5;
source: "sound_file2.wav";
}
sample {
name: "sound_file3" COMP;
source: "sound_file3.wav";
}
sample {
name: "sound_file4" AS_IS;
source: "sound_file1.wav";
}
  The sample block defines the sound sample.
 
name [sample name] [compression type] [if lossy, then quality]
 Used to include each sound file. The full path to the directory holding the sounds can be defined later with edje_cc's "-sd" option.
  • RAW: Uncompressed.
  • COMP: Lossless compression.
  • LOSSY [-0.1 - 1.0]: Lossy compression with quality from 0 to 1.0.
  • AS_IS: Check for re-encoding, no compression/encoding, just write the file information as it is.
Since
1.1.0
 

source [sound file name]
 The Sound source file name (Source can be mono/stereo WAV file. Only files with 44.1 KHz sample rate supported now)
Since
1.1.0

 

tone [tone name] [frequency]
 sound of specific frequency
Since
1.1.0

Group

group
collections {
..
group {
name: "nameusedbytheapplication";
alias: "anothername";
min: width height;
max: width height;
script { }
limits { }
data { }
parts { }
programs { }
}
..
}
 

A "group" block contains the list of parts and programs that compose a given Edje Object.

 

name [group name]
 The name that will be used by the application to load the resulting Edje object and to identify the group to swallow in a GROUP part. If a group with the same name exists already it will be completely overriden by the new group.

 

inherit [parent group name]
 Parent group name for inheritance. Group "inherit" is used to inherit any predefined group and change some property which belongs to "part", "description", "items" or "program". The child group has the same property as parent group. If you specify the type again in an inherited part, it will cause an error (unless you plan to fix that).
Since
1.1.0

 

script_only [on/off]
 The flag (on/off) as to if this group is defined ONLY by script callbacks such as init(), resize() and shutdown()

 

alias [aditional group name]
 Additional name to serve as identifier. Defining multiple aliases is supported.

 

min [width] [height]
 The minimum size for the container defined by the composition of the parts. It is not enforced.

 

max [width] [height]
 The maximum size for the container defined by the totality of the parts. It is not enforced.

 

broadcast_signal [broadcast]
 Signal got automatically broadcasted to all sub group part. Default to true since 1.1.

Script

script
..
group {
script {
//embryo script
}
..
program {
script {
//embryo script
}
}
..
}
..
 

This block is used to "inject" embryo scripts to a given Edje theme and it functions in two modalities. When it's included inside a "program" block, the script will be executed every time the program is run, on the other hand, when included directly into a "group", "part" or "description" block, it will be executed once at load time, in the load order.

 

orientation enum AUTO, LTR, RTL
 This defines GROUP orientation. This is useful if you want match interface orientation with language. AUTO - Follow system defs. LTR - suitable for Left To Right Languages (latin) RTL - suitable for Right To Left Languages (Hebrew, Arabic interface)

 

mouse_events [1 or 0]
 Change the default value of mouse_events for every part in this group. Defaults to 1 if not set, to maintain compatibility.

Limits

limits
group {
limits {
vertical: "limit_name" height_barrier;
horizontal: "limit_name" width_barrier;
..
}
..
}
..
 

This block is used to trigger some signal when the Edje object is resized.

 

vertical [name] [height barrier]
 It will send a signal: "limit,name,over" when the object is resized and pass the limit by growing over it. And it will send: "limit,name,below" when it pass below that limit. This limit will be applied on the y absis and is expressed in pixels.

 

horizontal [name] [width barrier]
 It will send a signal: "limit,name,over" when the object is resized and pass the limit by growing over it. And it will send: "limit,name,below" when it pass below that limit. This limit will be applied on the x absis and is expressed in pixels.

Parts

parts
group {
parts {
alias: "theme_part_path" "real_part_path";
..
}
}
 

Alias of part give a chance to let the designer put the real one in a box or reuse one from a GROUP or inside a BOX.

Part

part
group {
parts {
..
part {
name: "partname";
type: IMAGE;
mouse_events: 1;
repeat_events: 0;
ignore_flags: NONE;
clip_to: "anotherpart";
source: "groupname";
pointer_mode: AUTOGRAB;
use_alternate_font_metrics: 0;
dragable { }
items { }
description { }
}
..
}
}
 

Parts are used to represent the most basic design elements of the theme, for example, a part can represent a line in a border or a label on a button.

 

name [part name]
 The part's name will be used as reference in the theme's relative positioning system, by programs and in some cases by the application. It must be unique within the group.

 

type [TYPE]
 Set the type (all caps) from among the available types, it's set to IMAGE by default. Valid types:
  • RECT
  • TEXT
  • IMAGE
  • SWALLOW
  • TEXTBLOCK
  • GROUP
  • BOX
  • TABLE
  • EXTERNAL
  • PROXY
  • SPACER

 

physics_body [TYPE]
 Set the type (all caps) from among the available types of physics body, it's set to NONE by default. If type is NONE no physics will be applied and physics block inside part will be discarded. Valid types:
  • NONE
  • RIGID_BOX
  • RIGID_SPHERE
  • RIGID_CYLINDER
  • SOFT_BOX
  • SOFT_SPHERE
  • SOFT_CYLINDER
  • CLOTH
  • BOUNDARY_TOP
  • BOUNDARY_BOTTOM
  • BOUNDARY_RIGHT
  • BOUNDARY_LEFT
  • BOUNDARY_FRONT
  • BOUNDARY_BACK
Since
1.8.0

 

part [part declaration]
 
group {
parts {
part {
name: "parent_rect";
type: RECT;
description { }
part {
name: "nested_rect";
type: RECT;
description { }
}
}
..
}
}
Nested parts adds hierarchy to edje. Nested part inherits it's location relatively to the parent part. To declare a nested part just start a new part within current part decl. You must define parent part name before adding nested parts.
Since
1.7.0

 

insert_before [another part's name]
 The part's name which this part is inserted before. One part cannot have both insert_before and insert_after. One part cannot refer more than one by insert_before.
Since
1.1.0

 

insert_after [another part's name]
 The part's name which this part is inserted after. One part cannot have both insert_before and insert_after. One part cannot refer more than one by insert_after.
Since
1.1.0

 

mouse_events [1 or 0]
 Specifies whether the part will emit signals, although it is named "mouse_events", disabling it (0) will prevent the part from emitting any type of signal at all. It's set to 1 by default, or to the value set to "mouse_events" at the group level, if any.

 

repeat_events [1 or 0]
 Specifies whether a part echoes a mouse event to other parts below the pointer (1), or not (0). It's set to 0 by default.

 

ignore_flags [FLAG] ...
 Specifies whether events with the given flags should be ignored, i.e., will not have the signals emitted to the parts. Multiple flags must be separated by spaces, the effect will be ignoring all events with one of the flags specified. Possible flags:
  • NONE (default value, no event will be ignored)
  • ON_HOLD

 

scale [1 or 0]
 Specifies whether the part will scale its size with an edje scaling factor. By default scale is off (0) and the default scale factor is 1.0 - that means no scaling. This would be used to scale properties such as font size, min/max size of the part, and possibly can be used to scale based on DPI of the target device. The reason to be selective is that some things work well being scaled, others do not, so the designer gets to choose what works best.

 

pointer_mode [MODE]
 Sets the mouse pointer behavior for a given part. The default value is AUTOGRAB. Aviable modes:
  • AUTOGRAB, when the part is clicked and the button remains pressed, the part will be the source of all future mouse signals emitted, even outside the object, until the button is released.
  • NOGRAB, the effect will be limited to the part's container.

 

precise_is_inside [1 or 0]
 Enables precise point collision detection for the part, which is more resource intensive. Disabled by default.

 

use_alternate_font_metrics [1 or 0]
 Only affects text and textblock parts, when enabled Edje will use different size measurement functions. Disabled by default. (note from the author: I don't know what this is exactly useful for?)

 

clip_to [another part's name]
 Only renders the area of part that coincides with another part's container. Overflowing content will not be displayed. Note that the part being clipped to can only be a rectangle part.

 

source [another group's name]
 Only available to GROUP or TEXTBLOCK parts. Swallows the specified group into the part's container if a GROUP. If TEXTBLOCK it is used for the group to be loaded and used for selection display UNDER the selected text. source2 is used for on top of the selected text, if source2 is specified.

 

source2 [another group's name]
 Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for selection display OVER the selected text. source is used for under of the selected text, if source is specified.

 

source3 [another group's name]
 Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for cursor display UNDER the cursor position. source4 is used for over the cursor text, if source4 is specified.

 

source4 [another group's name]
 Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for cursor display OVER the cursor position. source3 is used for under the cursor text, if source4 is specified.

 

source5 [another group's name]
 Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for anchors display UNDER the anchor position. source6 is used for over the anchors text, if source6 is specified.

 

source6 [another group's name]
 Only available to TEXTBLOCK parts. It is used for the group to be loaded and used for anchor display OVER the anchor position. source5 is used for under the anchor text, if source6 is specified.

 

effect [EFFECT] (optional) [SHADOW DIRECTION]
 Causes Edje to draw the selected effect among:
  • PLAIN
  • OUTLINE
  • SOFT_OUTLINE
  • SHADOW
  • SOFT_SHADOW
  • OUTLINE_SHADOW
  • OUTLINE_SOFT_SHADOW
  • FAR_SHADOW
  • FAR_SOFT_SHADOW
  • GLOW
Shadow directions (default if not given is BOTTOM_RIGHT):
  • BOTTOM_RIGHT
  • BOTTOM
  • BOTTOM_LEFT
  • LEFT
  • TOP_LEFT
  • TOP
  • TOP_RIGHT
  • RIGHT

 

entry_mode [MODE]
 Sets the edit mode for a textblock part to one of:
  • NONE
  • PLAIN
  • EDITABLE
  • PASSWORD It causes the part be editable if the edje object has the keyboard focus AND the part has the edje focus (or selectable always regardless of focus) and in the event of password mode, not selectable and all text chars replaced with *'s but editable and pastable.

 

select_mode [MODE]
 Sets the selection mode for a textblock part to one of:
  • DEFAULT selection mode is what you would expect on any desktop. Press mouse, drag and release to end.
  • EXPLICIT mode requires the application controlling the edje object has to explicitly begin and end selection modes, and the selection itself is dragable at both ends.

 

cursor_mode [MODE]
 Sets the cursor mode for a textblock part to one of:
  • UNDER cursor mode means the cursor will draw below the character pointed at. That's the default.
  • BEFORE cursor mode means the cursor is drawn as a vertical line before the current character, just like many other GUI toolkits handle it.

 

multiline [1 or 0]
 It causes a textblock that is editable to allow multiple lines for editing.

 

access [1 or 0]
 Specifies whether the part will use accessibility feature (1), or not (0). It's set to 0 by default.

Dragable

dragable
part {
..
dragable {
confine: "another part";
threshold: "another part";
events: "another dragable part";
x: 0 0 0;
y: 0 0 0;
}
..
}
 

When this block is used the resulting part can be dragged around the interface, do not confuse with external drag & drop. By default Edje (and most applications) will attempt to use the minimal size possible for a dragable part. If the min property is not set in the description the part will be (most likely) set to 0px width and 0px height, thus invisible.

 

x [enable/disable] [step] [count]
 Used to setup dragging events for the X axis. The first parameter is used to enable (1 or -1) and disable (0) dragging along the axis. When enabled, 1 will set the starting point at 0.0 and -1 at 1.0. The second parameter takes any integer and will limit movement to values divisible by it, causing the part to jump from position to position. If step is set to 0 it is calculated as width of confine part divided by count.

 

y [enable/disable] [step] [count]
 Used to setup dragging events for the Y axis. The first parameter is used to enable (1 or -1) and disable (0) dragging along the axis. When enabled, 1 will set the starting point at 0.0 and -1 at 1.0. The second parameter takes any integer and will limit movement to values divisibles by it, causing the part to jump from position to position. If step is set to 0 it is calculated as height of confine part divided by count.

 

confine [another part's name]
 When set, limits the movement of the dragged part to another part's container. When you use confine don't forget to set a min size for the part, or the draggie will not show up.

 

threshold [another part's name]
 When set, the movement of the dragged part can only start when it get moved enough to be outside of the threshold part.

 

events [another dragable part's name]
 It causes the part to forward the drag events to another part, thus ignoring them for itself.

Items

items
part {
..
box {
items {
item {
type: TYPE;
source: "some source";
min: 1 1;
max: 100 100;
padding: 1 1 2 2;
}
item {
type: TYPE;
source: "some other source";
name: "some name";
align: 1.0 0.5;
}
..
}
}
..
}
 

On a part of type BOX, this block can be used to set other groups as elements of the box. These can be mixed with external objects set by the application through the edje_object_part_box_* API.

 

type Only GROUP for now (defaults to it)
 Sets the type of the object this item will hold.

 

name [name for the object]
 Sets the name of the object via evas_object_name_set().

 

source [another group's name]
 Sets the group this object will be made from.

 

min [width] [height]
 Sets the minimum size hints for this object.

 

spread [width] [height]
 

Will replicate the item in a rectangle of size width x height box starting from the defined position of this item.

default value will be 1 1;

 

prefer [width] [height]
 Sets the preferred size hints for this object.

 

max [width] [height]
 Sets the maximum size hints for this object.

 

padding [left] [right] [top] [bottom]
 Sets the padding hints for this object.

 

align [x] [y]
 Sets the alignment hints for this object.

 

weight [x] [y]
 Sets the weight hints for this object.

 

aspect [w] [h]
 Sets the aspect width and height hints for this object.

 

aspect_mode NONE, NEITHER, HORIZONTAL, VERTICAL, BOTH
 Sets the aspect control hints for this object.

 

options [extra options]
 Sets extra options for the object. Unused for now.

 

position [col] [row]
 Sets the position this item will have in the table. This is required for parts of type TABLE.

 

span [col] [row]
 Sets how many columns/rows this item will use. Defaults to 1 1.

Description

description
description {
inherit: "another_description" INDEX;
state: "description_name" INDEX;
visible: 1;
min: 0 0;
max: -1 -1;
align: 0.5 0.5;
fixed: 0 0;
step: 0 0;
aspect: 1 1;
rel1 {
..
}
rel2 {
..
}
}
 

Every part can have one or more description blocks. Each description is used to define style and layout properties of a part in a given "state".

 

inherit [another description's name] [another description's index]
 When set, the description will inherit all the properties from the named description. The properties defined in this part will override the inherited properties, reducing the amount of necessary code for simple state changes. Note: inheritance in Edje is single level only.

 

source [another part's name]
 Causes the part to use another part content as the content of this part. Only work with PROXY part.

 

state [a name for the description] [an index]
 Sets a name used to identify a description inside a given part. Multiple descriptions are used to declare different states of the same part, like "clicked" or "invisible". All states declarations are also coupled with an index number between 0.0 and 1.0. All parts must have at least one description named "default 0.0".

 

visible [0 or 1]
 Takes a boolean value specifying whether part is visible (1) or not (0). Non-visible parts do not emit signals. The default value is 1.

 

limit [NONE, WIDTH, HEIGHT or BOTH]
 Emit a signal when the part size change from zero or to a zero size ('limit,width,over', 'limit,width,zero'). By default no signal are emitted.
Since
1.7.0

 

align [X axis] [Y axis]
 When the displayed object's size is smaller (or bigger) than its container, this property moves it relatively along both axis inside its container. "0.0" means left/top edges of the object touching container's respective ones, while "1.0" stands for right/bottom edges of the object (on horizonal/vertical axis, respectively). The default value is "0.5 0.5".

 

fixed [width, 0 or 1] [height, 0 or 1]
 This affects the minimum size calculation. See edje_object_size_min_calc() and edje_object_size_min_restricted_calc(). This tells the min size calculation routine that this part does not change size in width or height (1 for it doesn't, 0 for it does), so the routine should not try and expand or contract the part.

 

min [width] [height] or SOURCE
 

The minimum size of the state.

When min is defined to SOURCE, it will look at the original image size and enforce it minimal size to match at least the original one. The part must be an IMAGE or a GROUP part.

 

minmul [width multipler] [height multiplier]
 A multiplier FORCIBLY applied to whatever minimum size is only during minimum size calculation.
Since
1.2

 

max [width] [height] or SOURCE
 

The maximum size of the state. A size of -1.0 means that it will be ignored in one direction.

When max is set to SOURCE, edje will enforce the part to be not more than the original image size. The part must be an IMAGE part.

 

step [width] [height]
 Restricts resizing of each dimension to values divisibles by its value. This causes the part to jump from value to value while resizing. The default value is "0 0" disabling stepping.

 

aspect [min] [max]
 Normally width and height can be resized to any values independently. The aspect property forces the width to height ratio to be kept between the minimum and maximum set. For example, "1.0 1.0" will increase the width a pixel for every pixel added to height. The default value is "0.0 0.0" disabling aspect.

 

aspect_preference [DIMENSION]
 Sets the scope of the "aspect" property to a given dimension. Available options are BOTH, VERTICAL, HORIZONTAL, SOURCE and NONE

 

color_class [color class name]
 The part will use the color values of the named color_class, these values can be overrided by the "color", "color2" and "color3" properties set below.

 

color [red] [green] [blue] [alpha]
 Sets the main color to the specified values (between 0 and 255).

 

color2 [red] [green] [blue] [alpha]
 Sets the text shadow color to the specified values (0 to 255).

 

color3 [red] [green] [blue] [alpha]
 Sets the text outline color to the specified values (0 to 255).

Relatives (rel1/rel2)

rel1/rel2
description {
..
rel1 {
relative: 0.0 0.0;
offset: 0 0;
}
..
rel2 {
relative: 1.0 1.0;
offset: -1 -1;
}
..
}
 

The rel1 and rel2 blocks are used to define the position of each corner of the part's container. With rel1 being the left-up corner and rel2 being the right-down corner.

 

relative [X axis] [Y axis]
 Moves a corner to a relative position inside the container of the relative "to" part. Values from 0.0 (0%, beginning) to 1.0 (100%, end) of each axis.

 

offset [X axis] [Y axis]
 Affects the corner position a fixed number of pixels along each axis.

 

to [another part's name]
 Causes a corner to be positioned relatively to another part's container. Setting to "" will un-set this value for inherited parts.

 

to_x [another part's name]
 Causes a corner to be positioned relatively to the X axis of another part's container. Simply put affects the first parameter of "relative". Setting to "" will un-set this value for inherited parts.

 

to_y [another part's name]
 Causes a corner to be positioned relatively to the Y axis of another part's container. Simply put, affects the second parameter of "relative". Setting to "" will un-set this value for inherited parts.

Image

image
description {
..
image {
normal: "filename.ext";
tween: "filename2.ext";
..
tween: "filenameN.ext";
border: left right top bottom;
middle: 0/1/NONE/DEFAULT/SOLID;
fill { }
}
..
}
 

 

normal [image's filename]
 Name of image to be used as previously declared in the images block. In an animation, this is the first and last image displayed. It's required in any image part

 

tween [image's filename]
 Name of an image to be used in an animation loop, an image block can have none, one or multiple tween declarations. Images are displayed in the order they are listed, during the transition to the state they are declared in; the "normal" image is the final state.

 

border [left] [right] [top] [bottom]
 If set, the area (in pixels) of each side of the image will be displayed as a fixed size border, from the side -> inwards, preventing the corners from being changed on a resize.

 

middle 0, 1, NONE, DEFAULT, SOLID
 If border is set, this value tells Edje if the rest of the image (not covered by the defined border) will be displayed or not or be assumed to be solid (without alpha). The default is 1/DEFAULT.

 

border_scale_by 0.0 or bigger (0.0 or 1.0 to turn it off)
 If border scaling is enabled then normally the OUTPUT border sizes (e.g. if 3 pixels on the left edge are set as a border, then normally at scale 1.0, those 3 columns will always be the exact 3 columns of output, or at scale 2.0 they will be 6 columns, or 0.33 they will merge into a single column). This property multiplies the input scale factor by this multiplier, allowing the creation of "supersampled" borders to make much higher resolution outputs possible by always using the highest resolution artwork and then runtime scaling it down.

 

border_scale 0, 1
 If border is set, this value tells Edje if the border should be scaled by the object/global edje scale factors

 

scale_hint 0, NONE, DYNAMIC, STATIC
 Sets the evas image scale hint letting the engine more effectively save cached copies of the scaled image if it makes sense

Fill

fill
description {
..
fill {
type: SCALE;
smooth: 0-1;
origin {
relative: X-axis Y-axis;
offset: X-axis Y-axis;
}
size {
relative: width height;
offset: width height;
}
}
..
}
 

The fill method is an optional block that defines the way an IMAGE part is going to be displayed inside its container. It can be used for tiling (repeating the image) or displaying only part of an image. See evas_object_image_fill_set() documentation for more details.

 

type SCALE, TILE.
 Sets the image fill type. SCALE - image will be scaled accordingly params value 'relative' and 'offset' from 'origin' and 'size' blocks. TILE - image will be tiled accordingly params value 'relative' and 'offset' from 'origin' and 'size' blocks. Important: the part parameter 'min' must be setted, it's size of tiled image. If parameter 'max' setted tiled area will has the size accordingly 'max' values. SCALE is default type.

 

smooth [0 or 1]
 The smooth property takes a boolean value to decide if the image will be smoothed on scaling (1) or not (0). The default value is 1.

 

spread TODO
 TODO

Origin

origin
description {
..
fill {
..
origin {
relative: 0.0 0.0;
offset: 0 0;
}
..
}
..
}
 

The origin block is used to place the starting point, inside the displayed element, that will be used to render the tile. By default, the origin is set at the element's left-up corner.

 

relative [X axis] [Y axis]
 Sets the starting point relatively to displayed element's content.

 

offset [X axis] [Y axis]
 Affects the starting point a fixed number of pixels along each axis.

Size

size
description {
..
fill {
..
size {
relative: 1.0 1.0;
offset: -1 -1;
}
..
}
..
}
 

The size block defines the tile size of the content that will be displayed.

 

relative [width] [height]
 Takes a pair of decimal values that represent the percentual value of the original size of the element. For example, "0.5 0.5" represents half the size, while "2.0 2.0" represents the double. The default value is "1.0 1.0".

 

offset [X axis] [Y axis]
 Affects the size of the tile a fixed number of pixels along each axis.

Text

text
part {
description {
..
text {
text: "some string of text to display";
font: "font_name";
size: SIZE;
text_class: "class_name";
fit: horizontal vertical;
min: horizontal vertical;
max: horizontal vertical;
align: X-axis Y-axis;
source: "part_name";
text_source: "text_part_name";
ellipsis: -1.0 (since 1.8), 0.0-1.0;
style: "stylename";
}
..
}
}
 

 

text [a string of text, or nothing]
 Sets the default content of a text part, normally the application is the one changing its value.

 

text_class [text class name]
 Similar to color_class, this is the name used by the application to alter the font family and size at runtime.

 

font [font alias]
 This sets the font family to one of the aliases set up in the "fonts" block. Can be overrided by the application.

 

style [the style name]
 Causes the part to use the default style and tags defined in the "style" block with the specified name.

 

repch [the replacement character string]
 If this is a textblock and is in PASSWORD mode this string is used to replace every character to hide the details of the entry. Normally you would use a "*", but you can use anything you like.

 

size [font size in points (pt)]
 Sets the default font size for the text part. Can be overrided by the application.

 

size_range [font min size in points (pt)] [font max size in points (pt)]
 Sets the allowed font size for the text part. Setting min and max to 0 means we won't restrict the sizing (default).
Since
1.1.0

 

fit [horizontal] [vertical]
 When any of the parameters is set to 1 edje will resize the text for it to fit in it's container. Both are disabled by default.

 

min [horizontal] [vertical]
 When any of the parameters is enabled (1) it forces the minimum size of the container to be equal to the minimum size of the text. The default value is "0 0".

 

max [horizontal] [vertical]
 When any of the parameters is enabled (1) it forces the maximum size of the container to be equal to the maximum size of the text. The default value is "0 0".

 

align [horizontal] [vertical]
 Change the position of the point of balance inside the container. The default value is 0.5 0.5.

 

source [another TEXT part's name]
 Causes the part to use the text properties (like font and size) of another part and update them as they change.

 

text_source [another TEXT part's name]
 Causes the part to display the text content of another part and update them as they change.

 

ellipsis [point of balance]
 Used to balance the text in a relative point from 0.0 to 1.0, this point is the last section of the string to be cut out in case of a resize that is smaller than the text itself. The default value is 0.0.

 

filter [filter program as a string]
 Applies a series of filtering operations to the text. EXPERIMENTAL FEATURE. TO BE DOCUMENTED.

Box

box
part {
description {
..
box {
layout: "vertical";
padding: 0 2;
align: 0.5 0.5;
min: 0 0;
}
..
}
}
 

A box block can contain other objects and display them in different layouts, any of the predefined set, or a custom one, set by the application.

 

layout [primary layout] [fallback layout]
 Sets the layout for the box:
  • horizontal (default)
  • vertical
  • horizontal_homogeneous
  • vertical_homogeneous
  • horizontal_max (homogeneous to the max sized child)
  • vertical_max
  • horizontal_flow
  • vertical_flow
  • stack
  • some_other_custom_layout_set_by_the_application You could set a custom layout as fallback, it makes very very little sense though, and if that one fails, it will default to horizontal.

 

align [horizontal] [vertical]
 Change the position of the point of balance inside the container. The default value is 0.5 0.5.

 

padding [horizontal] [vertical]
 Sets the space between cells in pixels. Defaults to 0 0.

 

min [horizontal] [vertical]
 When any of the parameters is enabled (1) it forces the minimum size of the box to be equal to the minimum size of the items. The default value is "0 0".

Table

table
part {
description {
..
table {
homogeneous: TABLE;
padding: 0 2;
align: 0.5 0.5;
min: 0 0;
}
..
}
}
 

A table block can contain other objects packed in multiple columns and rows, and each item can span across more than one column and/or row.

 

homogeneous [homogeneous mode]
 Sets the homogeneous mode for the table:
  • NONE (default)
  • TABLE
  • ITEM

 

align [horizontal] [vertical]
 Change the position of the point of balance inside the container. The default value is 0.5 0.5.

 

padding [horizontal] [vertical]
 Sets the space between cells in pixels. Defaults to 0 0.

 

min [horizontal] [vertical]
 When any of the parameters is enabled (1) it forces the minimum size of the table to be equal to the minimum size of the items. The default value is "0 0".

Physics

physics
description {
..
physics {
ignore_part_pos: 1;
mass: 5.31;
friction: 0.5;
restitution: 0.82;
damping: 0.4 0.24;
sleep: 32 18.9;
material: IRON;
density: 3.2;
hardness: 0.42;
light_on: 1;
z: -15;
depth: 30;
movement_freedom {
..
}
faces {
..
}
}
..
}
 

Physics block should be used to configure the body associated to the part. The part's property physics_body needs to be set to something different from NONE, otherwise the properties inside physics block won't have any effect. It's possible to set body's material, mass, restitution, friction, allow / disallow movement in specific axes, etc.

 
mass [body's mass in kilograms]
 Double value used to set inertial mass of the body. It is a quantitative measure of an object's resistance to the change of its speed. If mass is set to 0 the body will have infinite mass, so it will be immovable, static.
Since
1.8.0
 

restitution [body's restitution]
 

The coefficient of restitution is proporcion between speed after and before a collision. It's 0 by default.

COR = relative speed after collision / relative speed before collision

  • elastically collide for COR == 1;
  • inelastically collide for 0 < COR < 1;
  • completelly stop (no bouncing at all) for COR == 0.
Since
1.8.0

 

friction [body's friction]
 

Friction is used to make objects slide along each ot

The friction parameter is usually set between 0 and 1, but can be any non-negative value. A friction value of 0 turns off friction and a value of 1 makes the friction strong.

By default friction value is 0.5 and simulation resulsts will be better when friction in non-zero.

Since
1.8.0

 

ignore_part_pos [1 or 0]
 If enabled, the body won't be positioned following rel1/rel2. It will keep its position updated only by physics calculations. If disabled, when the state is set, the body will be moved to the position described by the blocks rel1/rel2. Default is 1 (enabled).
Since
1.8.0

 

damping [linear damping] [angular damping]
 Damping(linear and angular) values are applied to body's linear and angular velocity. By applying a bodies damping factor the user will face a velocity reduction, with a force applied to it - "like" air resistance. The force is applied to slow it down. Values should be between 0.0 and 1.0, and are set to 0 by default.
Since
1.8.0

 

sleep [linear sleeping threshold] [angular sleeping threshold]
 Sleeping threshold factors are used to determine whenever a rigid body is supposed to increment the sleeping time. Linear threshold is measured in Evas coordinates per second and angular threshold is measured in degrees per second. After every tick the sleeping time is incremented, if the body's linear and angular speed is less than the respective thresholds the sleeping time is incremented by the current time step (delta time). Reaching the max sleeping time the body is marked to sleep, that means the rigid body is to be deactivated. By default linear threshold is 24 pixels / second and angular is 57.29 degrees / sec (1 rad/sec).
Since
1.8.0

 

material [body's material]
 Set the type (all caps) from among the available material types, it's set to CUSTOM by default. Each material has specific properties to be applied on the body, as density, friction and restitution. So if a material different of CUSTOM is set, the properties cited above won't be considered. Valid types: CUSTOM CONCRETE IRON PLASTIC POLYSTYRENE RUBBER WOOD
Since
1.8.0

 

density [body's material density]
 It will set the body mass considering its volume. While a density is set, resizing a body will always recalculate its mass. When a mass is explicitely set the density will be unset.
Since
1.8.0

 

hardness [soft bodie or cloth hardness]
 The hardness is set with a double value (0.0 - 1.0), defining how the soft body is supposed to deform. Its default is set to 1.0. The soft body mass will also interfere on soft body deformation, so bare in mind that the bodies mass must also be changed to have different deformation results. Valid values vary from 0.0 to 1.0. Only works on soft bodies and cloths.
Since
1.8.0

 

light_on [1 or 0]
 Set body to be affected by world's light or not. It won't be respected if world's property "all_bodies" is enabled. Disabled by default (0).
Since
1.8.0

 

z [body position in z axis]
 Defines body position in z axis. It's set to -15 by default.
Since
1.8.0

 

depth [body's depth]
 Defines body's depth (z axis). It's set to 30 by default.
Since
1.8.0

 

backface_cull [1 or 0]
 This enables backface culling (when the rotated part that normally faces the camera is facing away after being rotated etc.). This means that the object will be hidden when "backface culled".
Since
1.8.0

Movement Freedom

movement_freedom
description {
..
physics {
...
movement_freedom {
linear: 1 1 0;
angular: 0 0 1;
}
}
..
}
 

The "movement_freedom" block consists of two blocks to describe all the allowed movements for a body. It's set by default to allow just 2D movement (linear moves on x and y axis and rotations on x-y plane).

 
linear [x-axis (1 or 0)] [y-axis (1 or 0)] [z-axis (1 or 0)]
 Block "linear" can be used to allow linear movements in the three axes. Allowed values are 0 or 1. Axes x and y are enabled by default.
Since
1.8.0
 

angular [x-axis (1 or 0)] [y-axis (1 or 0)] [z-axis (1 or 0)]
 Block "angular" can be used to allow angular movements around the three axes. Allowed values are 0 or 1. Z axis is enabled by default.
Since
1.8.0

Faces

faces
faces {
face {
type: BOX_FRONT;
source: "groupname";
}
..
}
 

The "faces" block contains a list of one or more "face" blocks. The "faces" block is used to list the faces that compose the body. Each face is described by a "face" block, that associates a part to a specific face of the body's shape. Only the "faces" block declared in the "default" description will be considered.

 

type [FACE]
 Set the face (all caps) from among the available body's shape faces. Valid faces: BOX_MIDDLE_FRONT BOX_MIDDLE_BACK BOX_FRONT BOX_BACK BOX_LEFT BOX_RIGHT BOX_TOP BOX_BOTTOM CLOTH_FRONT CLOTH_BACK CYLINDER_MIDDLE_FRONT CYLINDER_MIDDLE_BACK CYLINDER_FRONT CYLINDER_BACK CYLINDER_CURVED SPHERE_FRONT SPHERE_BACK

 

source [another group's name]
 This sets the group that is used as the object representing the physics body face.

Map

map
description {
..
map {
perspective: "name";
light: "name";
on: 1;
smooth: 1;
perspective_on: 1;
backface_cull: 1;
alpha: 1;
rotation {
..
}
}
..
}
 

 

perspective [another part's name]
 This sets the part that is used as the "perspective point" for giving a part a "3d look". The perspective point should have a perspective section that provides zplane and focal properties. The center of this part will be used as the focal point, so size, color and visibility etc. are not relevant just center point, zplane and focal are used. This also implicitly enables perspective transforms (see the on parameter for the map section).

 

light [another part's name]
 This sets the part that is used as the "light" for calculating the brightness (based on how directly the part's surface is facing the light source point). Like the perspective point part, the center point is used and zplane is used for the z position (0 being the zero-plane where all 2D objects normally live) and positive values being further away into the distance. The light part color is used as the light color (alpha not used for light color). The color2 color is used for the ambient lighting when calculating brightness (alpha also not used).

 

on [1 or 0]
 This enables mapping for the part. Default is 0.

 

smooth [1 or 0]
 This enable smooth map rendering. This may be linear interpolation, anisotropic filtering or anything the engine decides is "smooth". This is a best-effort hint and may not produce precisely the same results in all engines and situations. Default is 1

 

alpha [1 or 0]
 This enable alpha channel when map rendering. Default is 1.

 

backface_cull [1 or 0]
 This enables backface culling (when the rotated part that normally faces the camera is facing away after being rotated etc.). This means that the object will be hidden when "backface culled".

 

perspective_on [1 or 0]
 Enable perspective when rotating even without a perspective point object. This would use perspective set for the object itself or for the canvas as a whole as the global perspective with edje_perspective_set() and edje_perspective_global_set().

Rotation

rotation
map {
..
rotation {
center: "name";
x: 45.0;
y: 45.0;
z: 45.0;
}
..
}
 

Rotates the part, optionally with the center on another part.

 

center [another part's name]
 This sets the part that is used as the center of rotation when rotating the part with this description. The part's center point is used as the rotation center when applying rotation around the x, y and z axes. If no center is given, the parts original center itself is used for the rotation center.

 

x [X degrees]
 This sets the rotation around the x axis of the part considering the center set. In degrees.

 

y [Y degrees]
 This sets the rotation around the y axis of the part considering the center set. In degrees.

 

z [Z degrees]
 This sets the rotation around the z axis of the part considering the center set. In degrees.

Perspective

perspective
description {
..
perspective {
zplane: 0;
focal: 1000;
}
..
}
 

Adds focal and plane perspective to the part. Active if perspective_on is true. Must be provided if the part is being used by other part as it's perspective target.

 

zplane [unscaled Z value]
 This sets the z value that will not be scaled. Normally this is 0 as that is the z distance that all objects are at normally.

 

focal [distance]
 This sets the distance from the focal z plane (zplane) and the camera - i.e. very much equating to focal length of the camera

Params

params
description {
..
params {
int: "name" 0;
double: "other_name" 0.0;
string: "another_name" "some text";
bool: "name" 1;
choice: "some_name" "value";
}
..
}
 

Set parameters for EXTERNAL parts. The value overwrites previous definitions with the same name.

 

int [param_name] [int_value]
 Adds an integer parameter for an external object

 

double [param_name] [double_value]
 Adds a double parameter for an external object

 

string [param_name] [string_value]
 Adds a string parameter for an external object

 

bool [param_name] [bool_value]
 Adds an boolean parameter for an external object. Value must be 0 or 1.

 

choice [param_name] [choice_string]
 Adds a choice parameter for an external object. The possible choice values are defined by external type at their register time and will be validated at runtime.

Programs

programs
group {
programs {
..
program {
name: "programname";
signal: "signalname";
source: "partname";
filter: "partname" "statename";
in: 0.3 0.0;
action: STATE_SET "statename" state_value;
transition: LINEAR 0.5;
target: "partname";
target: "anotherpart";
after: "programname";
after: "anotherprogram";
}
..
}
}
 

Programs define how your interface reacts to events. Programs can change the state of parts, react to events or trigger other events.

 

name [program name]
 Symbolic name of program as a unique identifier.

 

signal [signal name]
 Specifies signal(s) that should cause the program to run. The signal received must match the specified source to run. Signals may be globbed, but only one signal keyword per program may be used. ex: signal: "mouse,clicked,*"; (clicking any mouse button that matches source starts program).

 

source [source name]
 Source of accepted signal. Sources may be globbed, but only one source keyword per program may be used. ex:source: "button-*"; (Signals from any part or program named "button-*" are accepted).

 

filter [part] [state]
 Filter signals to be only accepted if the part [part] is in state named [state]. Only one filter per program can be used. If [state] is not given, the source of the event will be used instead.

 

in [from] [range]
 Wait 'from' seconds before executing the program. And add a random number of seconds (from 0 to 'range') to the total waiting time.

 

action [type] [param1] [param2]
 Action to be performed by the program. Valid actions are: STATE_SET, ACTION_STOP, SIGNAL_EMIT, DRAG_VAL_SET, DRAG_VAL_STEP, DRAG_VAL_PAGE, FOCUS_SET, PARAM_COPY, PARAM_SET, PLAY_SAMPLE, PLAY_TONE, PHYSICS_IMPULSE, PHYSICS_TORQUE_IMPULSE, PHYSICS_FORCE, PHYSICS_TORQUE, PHYSICS_FORCES_CLEAR, PHYSICS_VEL_SET, PHYSICS_ANG_VEL_SET, PHYSICS_STOP, PHYSICS_ROT_SET Only one action can be specified per program. Examples:
action: STATE_SET "statename" 0.5;
action: ACTION_STOP;
action: SIGNAL_EMIT "signalname" "emitter";
action: DRAG_VAL_SET 0.5 0.0;
action: DRAG_VAL_STEP 1.0 0.0;
action: DRAG_VAL_PAGE 0.0 0.0;
action: FOCUS_SET;
action: FOCUS_OBJECT;
action: PARAM_COPY "src_part" "src_param" "dst_part" "dst_param";
action: PARAM_SET "part" "param" "value";
action: PLAY_SAMPLE "sample name" speed (speed of sample - 1.0 is original speed - faster is higher pitch) [channel optional EFFECT/FX | BACKGROUND/BG | MUSIC/MUS | FOREGROUND/FG | INTERFACE/UI | INPUT | ALERT;
action: PLAY_TONE "tone name" duration in seconds ( Range 0.1 to 10.0 );
action: PHYSICS_IMPULSE 10 -23.4 0;
action: PHYSICS_TORQUE_IMPULSE 0 2.1 0.95;
action: PHYSICS_FORCE -20.8 0 30.85;
action: PHYSICS_TORQUE 0 0 4.8;
action: PHYSICS_FORCES_CLEAR;
action: PHYSICS_VEL_SET 40.9 0 0;
action: PHYSICS_ANG_VEL_SET 12.4 0 0.66;
action: PHYSICS_STOP;
action: PHYSICS_ROT_SET 0.707 0 0 0.707;

 

transition [type] [length] [[interp val 1]] [[interp val 2]] [[option]]
 

Defines how transitions occur using STATE_SET action.
Where 'type' is the style of the transition and 'length' is a double specifying the number of seconds in which to preform the transition.
Valid types are: LIN or LINEAR, SIN or SINUSOIDAL, ACCEL or ACCELERATE, DECEL or DECELERATE, ACCEL_FAC or ACCELERATE_FACTOR, DECEL_FAC or DECELERATE_FACTOR, SIN_FAC or SINUSOIDAL_FACTOR, DIVIS or DIVISOR_INTERP, BOUNCE, SPRING.

ACCEL_FAC, DECEL_FAC and SIN_FAC need the extra optional "interp val 1" to determine the "factor" of curviness. 1.0 is the same as their non-factor counterparts, where 0.0 is equal to linear. Numbers higher than one make the curve angles steeper with a more pronounced curve point.

DIVIS, BOUNCE and SPRING also require "interp val 2" in addition to "interp val 1".

DIVIS uses val 1 as the initial gradient start (0.0 is horizontal, 1.0 is diagonal (linear), 2.0 is twice the gradient of linear etc.). val 2 is interpreted as an integer factor defining how much the value swings "outside" the gradient only to come back to the final resting spot at the end. 0.0 for val 2 is equivalent to linear interpolation. Note that DIVIS can exceed 1.0

BOUNCE uses val 2 as the number of bounces (so its rounded down to the nearest integer value), with val 1 determining how much the bounce decays, with 0.0 giving linear decay per bounce, and higher values giving much more decay.

SPRING is similar to bounce, where val 2 specifies the number of spring "swings" and val 1 specifies the decay, but it can exceed 1.0 on the outer swings.

Valid option is CURRENT.

CURRENT is the option which causes the edje object to move from its current position. It can be used as the last parameter of any transition type. (

Since
1.1.0)

 

target [target]
 Program or part on which the specified action acts. Multiple target keywords may be specified, one per target. SIGNAL_EMITs do not have targets.

 

after [after]
 Specifies a program to run after the current program completes. The source and signal parameters of a program run as an "after" are ignored. Multiple "after" statements can be specified per program.

 

api [name] [description]
 Specifies a hint to let applications (or IDE's) know how to bind things. The parameter name should contain the name of the function that the application should use, and description describes how it should be used.

Physics

physics
group {
..
physics {
world {
..
}
}
..
}
 

The "physics" block consists of blocks related to physics but not to configure a body. By now, it only has a "world" block.

World

world
physics {
world {
gravity: 0 294 0;
rate: 30;
z: -50;
depth: 100;
}
}
 

The "world" block configures the physics world. It's the environment where the part's bodies will be simulated. It can be used to customize gravity, rate, depth and others.

 
gravity [x-axis] [y-axis] [z-axis]
 Three double values defining the gravity vector. Each one is the component of this same vector over each axis. Its unit is Evas Coordinates per second ^ 2. The default value is 0, 294, 0, since we've a default rate of 30 pixels.
Since
1.8.0
 

rate [rate pixels / meter]
 Set rate between pixels on evas canvas and meters on physics world. It will be used by automatic updates of evas objects associated to physics bodies. By default rate is 30 pixels per meter.
Since
1.8.0

 

depth [depth in pixels]
 World's depth, in pixels. It's only relevant if boundaries are used, since their size depends on this. By default world's depth is 100 pixels.
Since
1.8.0

 

z [world's front border position]
 Position in z axis, in pixels. It's only relevant if boundaries are used, since their position depends on this. By default world's z is -50 pixels.
Since
1.8.0