edcref (3) - Linux Manuals
edcref: Edje Data Collection reference
NAME
edcref - 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.
Author:
- Andres Blanc (dresb) andresblanc [at] gmail.com
images
images { image: 'filename1.ext' COMP; image: 'filename2.ext' LOSSY 99; .. }
fonts
data
data
color_classes
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 shadow in text and textblock parts.
color3 [red] [green] [blue] [alpha] Used as outline in text and textblock parts.
spectra
name [spectrum name] The name of the spectrum used as reference later in the theme.
color [red] [green] [blue] [alpha] [delta] Each color declaration represents a stop point in the color range. The last parameter (delta) is used to set the proportion of a given stop point higher or lower in contrast with the other color's delta value.
styles
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>.
collections
group
name [group name] The name that will be used by the application to load the resulting Edje object, must be unique within the theme.
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.
max [width] [height] The maximum size for the container defined by the totality of the parts.
script
part
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:
mouse_events [1 or 0] Specifies whether the part will emit signals, altought is named 'mouse_events', disabling it (0) will prevent the part from emitting any type of signal at all. Its set to 1 by default.
repeat_events [1 or 0] Specifies whether a part echoes a mouse event to other parts below the pointer (1), or not (0). Its 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:
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:
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 exactlu 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.
source [another group's name] Only available to GROUP parts. Swallows the specified group into the part's container.
effect [EFFECT] Causes Edje to draw the selected effect among:
dragable
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. The third parameter, (question from the author: What is count for?).
confine [another part's name] When set, limits the movement of the dragged part to another part's container.
events [another dragable part's name] It causes the part to forward the drag events to another part, thus ignoring them for itself.
description
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.
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.
align [X axis] [Y axis] When the displayed object's size is smaller than its container, this property moves it relatively along both axis inside its container. The default value is '0.5 0.5'.
fixed [width, 0 or 1] [height, 0 or 1] When the 'min' or 'max' properties are set, fixed enables or disables resizing for each dimension. The default value is '0 0'
min [width] [height] The minimum size of the state.
max [width] [height] The maximum size of the state.
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 heigh. The default value is '0.0 0.0' disabling aspect.
fonts {
font: 'filename1.ext' 'fontname';
font: 'filename2.ext' 'otherfontname';
..
}
data {
item: 'arbitraryname' 'arbitraryvalue';
item: 'othername' 'othervalue';
..
}
data {
file: 'arbitraryname' 'filename';
file: 'othername' 'otherfilename';
..
}
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]
}
..
}
spectra {
spectrum {
name: 'colorspectrumname';
color: [0-255] [0-255] [0-255] [0-255] [0-?]
color: [0-255] [0-255] [0-255] [0-255] [0-?]
..
}
..
}
styles {
style {
name: 'stylename';
base: '..default style properties..';
tag: 'tagname' '..style properties..';
..
}
..
}
collections {
..
group { }
group { }
..
}
collections {
..
group {
name: 'nameusedbytheapplication';
alias: 'anothername';
min: width height;
max: width height;
data { }
script { }
parts { }
programs { }
}
..
}
..
group {
script {
//embryo script
}
..
program {
script {
//embryo script
}
}
..
}
..
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;
description { }
dragable { }
}
..
}
}
part {
..
dragable {
confine: 'another part';
events: 'another dragable part';
x: 0 0 0;
y: 0 0 0;
}
..
}
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 {
..
}
}