1edcref(3) Library Functions Manual edcref(3)
2
3
4
6 edcref - Edje Data Collection reference An Edje Data Collection, it's a
7 plain text file (normally identified with the .edc
8 extension),consisting of instructions for the Edje Compiler.
9
10 The syntax for the edje data collection files follows a simple
11 structure of 'blocks { .. }' that can contain 'properties: ..', more
12 blocks, or both.
13
14 Quick access to block descriptions:
15
16 · Top-Level
17 · Group
18 · State description
19
20 · Image
21 · Text
22 · Gradient
23 · Box
24 · Table
25 · Map (3d/transformations)
26 · Program block
27 Author:
28 Andres Blanc (dresb) andresblanc@gmail.com
29 Top-Level blocks
30 externals
31 externals {
32 external: 'name';
33 }
34
35 The 'externals' block is used to list each external module file that
36 will be used in others programs.
37 external [external filename] Used to add a file to the externals
38 list.
39 images
40 images {
41 image: 'filename1.ext' COMP;
42 image: 'filename2.ext' LOSSY 99;
43 set {
44 name: 'image_name_used';
45 image {
46 image: 'filename3.ext' LOSSY 90;
47 size: 201 201 500 500;
48 }
49 image {
50 image: 'filename4.ext' COMP;
51 size: 51 51 200 200;
52 }
53 image {
54 image: 'filename5.ext' COMP;
55 size: 11 11 50 50;
56 }
57 image {
58 image: 'filename6.ext' RAW;
59 size: 0 0 10 10;
60 }
61 }
62 ..
63 }
64 The 'images' block is used to list each image file that will be used
65 in the theme along with its compression method (if any). Besides the
66 document's root, additional 'images' blocks can be included inside
67 other blocks, normally 'collections', 'group' and 'part', easing
68 maintenance of the file list when the theme is split among multiple
69 files.
70 image [image file] [compression method] (compression level) Used to
71 include each image file. The full path to the directory holding the
72 images can be defined later with edje_cc's '-id' option. Compression
73 methods:
74
75 · RAW: Uncompressed.
76 · COMP: Lossless compression.
77 · LOSSY [0-100]: Lossy comression with quality from 0 to 100.
78 · USER: Do not embed the file, refer to the external file instead.
79 set
80 set {
81 name: 'image_name_used';
82 image {
83 image: 'filename3.ext' LOSSY 90;
84 size: 201 201 500 500;
85 }
86 image {
87 image: 'filename4.ext' COMP;
88 size: 51 51 200 200;
89 }
90 image {
91 image: 'filename5.ext' COMP;
92 size: 11 11 50 50;
93 }
94 image {
95 image: 'filename6.ext' RAW;
96 size: 0 0 10 10;
97 }
98 }
99 The 'set' block is used to define an image with different content
100 depending on their size. Besides the document's root, additional 'set'
101 blocks can be included inside other blocks, normally 'collections',
102 'group' and 'part', easing maintenance of the file list when the theme
103 is split among multiple files.
104 name [image name] Define the name that refer to this image
105 description.
106 size [minw minh maxw mawh] Define the minimal and maximal size that
107 will select the specified image.
108 fonts
109 fonts {
110 font: 'filename1.ext' 'fontname';
111 font: 'filename2.ext' 'otherfontname';
112 ..
113 }
114 The 'fonts' block is used to list each font file with an alias used
115 later in the theme. As with the 'images' block, additional 'fonts'
116 blocks can be included inside other blocks.
117 font [font filename] [font alias] Defines each font 'file' and
118 'alias', the full path to the directory holding the font files can be
119 defined with edje_cc's '-fd' option.
120 data
121 data {
122 item: 'key' 'value';
123 file: 'otherkey' 'filename.ext';
124 ..
125 }
126 The 'data' block is used to pass arbitrary parameters from the theme
127 to the application. Unlike the 'images' and 'fonts' blocks, additional
128 'data' blocks can only be included inside the 'group' block.
129 item [parameter name] [parameter value] Defines a new parameter,
130 the value will be the string specified next to it.
131 file [parameter name] [parameter filename] Defines a new parameter ,
132 the value will be the contents of the specified file formated as a
133 single string of text. This property only works with plain text files.
134 color_classes
135 color_classes {
136 color_class {
137 name: 'colorclassname';
138 color: [0-255] [0-255] [0-255] [0-255];
139 color2: [0-255] [0-255] [0-255] [0-255];
140 color3: [0-255] [0-255] [0-255] [0-255]
141 }
142 ..
143 }
144 The 'color_classes' block contains a list of one or more 'color_class'
145 blocks. Each 'color_class' allows the designer to name an arbitrary
146 group of colors to be used in the theme, the application can use that
147 name to alter the color values at runtime.
148 name [color class name] Sets the name for the color class, used as
149 reference by both the theme and the application.
150 color [red] [green] [blue] [alpha] The main color.
151 color2 [red] [green] [blue] [alpha] Used as shadow in text and
152 textblock parts.
153 color3 [red] [green] [blue] [alpha] Used as outline in text and
154 textblock parts.
155 spectra
156 spectra {
157 spectrum {
158 name: 'colorspectrumname';
159 color: [0-255] [0-255] [0-255] [0-255] [0-?]
160 color: [0-255] [0-255] [0-255] [0-255] [0-?]
161 ..
162 }
163 ..
164 }
165 The 'spectra' block contains a list of one or more 'spectrum' blocks.
166 Each 'spectrum' block defines a color range used to fill GRADIENT
167 parts. The colors are defined with the red, green, blue, alpha, delta
168 format.
169 name [spectrum name] The name of the spectrum used as reference
170 later in the theme.
171 color [red] [green] [blue] [alpha] [delta] Each color declaration
172 represents a stop point in the color range. The last parameter (delta)
173 is used to set the proportion of a given stop point higher or lower in
174 contrast with the other color's delta value.
175 styles
176 styles {
177 style {
178 name: 'stylename';
179 base: '..default style properties..';
180
181 tag: 'tagname' '..style properties..';
182 ..
183 }
184 ..
185 }
186 The 'styles' block contains a list of one or more 'style' blocks. A
187 'style' block is used to create style <tags> for advanced TEXTBLOCK
188 formatting.
189 name [style name] The name of the style to be used as reference
190 later in the theme.
191 base [style properties string] The default style properties that
192 will be applied to the complete text.
193 tag [tag name] [style properties string] Style to be applied only to
194 text between style <tags>..</tags>.
195 collections
196 collections {
197 ..
198 group { }
199 group { }
200 ..
201 }
202 The 'collections' block is used to list the groups that compose the
203 theme. Additional 'collections' blocks do not prevent overriding group
204 names.
205 Group sub blocks
206 group
207 collections {
208 ..
209 group {
210 name: 'nameusedbytheapplication';
211 alias: 'anothername';
212 min: width height;
213 max: width height;
214
215 data { }
216 script { }
217 parts { }
218 programs { }
219 }
220 ..
221 }
222
223 A 'group' block contains the list of parts and programs that compose a
224 given Edje Object.
225 name [group name] The name that will be used by the application to
226 load the resulting Edje object and to identify the group to swallow in
227 a GROUP part. If a group with the same name exists already it will be
228 completely overriden by the new group.
229 script_only [on/off] The flag (on/off) as to if this group is
230 defined ONLY by script callbacks such as init(), resize() and
231 shutdown()
232 alias [aditional group name] Additional name to serve as identifier.
233 Defining multiple aliases is supported.
234 min [width] [height] The minimum size for the container defined by
235 the composition of the parts.
236 max [width] [height] The maximum size for the container defined by
237 the totality of the parts.
238 script
239 ..
240 group {
241 script {
242 //embryo script
243 }
244 ..
245 program {
246 script {
247 //embryo script
248 }
249 }
250 ..
251 }
252 ..
253 This block is used to 'inject' embryo scripts to a given Edje theme
254 and it functions in two modalities. When it's included inside a
255 'program' block, the script will be executed every time the program is
256 run, on the other hand, when included directly into a 'group', 'part'
257 or 'description' block, it will be executed once at load time, in the
258 load order.
259 part
260 group {
261 parts {
262 ..
263 part {
264 name: 'partname';
265 type: IMAGE;
266 mouse_events: 1;
267 repeat_events: 0;
268 ignore_flags: NONE;
269 clip_to: 'anotherpart';
270 source: 'groupname';
271 pointer_mode: AUTOGRAB;
272 use_alternate_font_metrics: 0;
273
274 description { }
275 dragable { }
276 items { }
277 }
278 ..
279 }
280 }
281 Parts are used to represent the most basic design elements of the
282 theme, for example, a part can represent a line in a border or a label
283 on a button.
284 name [part name] The part's name will be used as reference in the
285 theme's relative positioning system, by programs and in some cases by
286 the application. It must be unique within the group.
287 type [TYPE] Set the type (all caps) from among the available types,
288 it's set to IMAGE by default. Valid types:
289
290 · RECT
291 · TEXT
292 · IMAGE
293 · SWALLOW
294 · TEXTBLOCK
295 · GRADIENT
296 · GROUP
297 · BOX
298 · TABLE
299 · EXTERNAL
300 mouse_events [1 or 0] Specifies whether the part will emit signals,
301 altought is named 'mouse_events', disabling it (0) will prevent the
302 part from emitting any type of signal at all. Its set to 1 by default.
303 repeat_events [1 or 0] Specifies whether a part echoes a mouse event
304 to other parts below the pointer (1), or not (0). Its set to 0 by
305 default.
306 ignore_flags [FLAG] ... Specifies whether events with the given
307 flags should be ignored, i.e., will not have the signals emitted to the
308 parts. Multiple flags must be separated by spaces, the effect will be
309 ignoring all events with one of the flags specified. Possible flags:
310
311 · NONE (default value, no event will be ignored)
312 · ON_HOLD
313 scale [1 or 0] Specifies whether the part will scale its size with
314 an edje scaling factor. By default scale is off (0) and the default
315 scale factor is 1.0 - that means no scaling. This would be used to
316 scale properties such as font size, min/max size of the part, and
317 possibly can be used to scale based on DPI of the target device. The
318 reason to be selective is that some things work well being scaled,
319 others do not, so the designer gets to choose what works best.
320 pointer_mode [MODE] Sets the mouse pointer behavior for a given
321 part. The default value is AUTOGRAB. Aviable modes:
322
323 · AUTOGRAB, when the part is clicked and the button remains pressed,
324 the part will be the source of all future mouse signals emitted, even
325 outside the object, until the button is released.
326 · NOGRAB, the effect will be limited to the part's container.
327 precise_is_inside [1 or 0] Enables precise point collision detection
328 for the part, which is more resource intensive. Disabled by default.
329 use_alternate_font_metrics [1 or 0] Only affects text and textblock
330 parts, when enabled Edje will use different size measurement functions.
331 Disabled by default. (note from the author: I don't know what this is
332 exactlu useful for?)
333 clip_to [another part's name] Only renders the area of part that
334 coincides with another part's container. Overflowing content will not
335 be displayed.
336 source [another group's name] Only available to GROUP or TEXTBLOCK
337 parts. Swallows the specified group into the part's container if a
338 GROUP. If TEXTBLOCK it is used for the group to be loaded and used for
339 selection display UNDER the selected text. source2 is used for on top
340 of the selected text, if source2 is specified.
341 source2 [another group's name] Only available to TEXTBLOCK parts. It
342 is used for the group to be loaded and used for selection display OVER
343 the selected text. source is used for under of the selected text, if
344 source is specified.
345 source3 [another group's name] Only available to TEXTBLOCK parts. It
346 is used for the group to be loaded and used for cursor display UNDER
347 the cursor position. source4 is used for over the cursor text, if
348 source4 is specified.
349 source4 [another group's name] Only available to TEXTBLOCK parts. It
350 is used for the group to be loaded and used for cursor display OVER the
351 cursor position. source3 is used for under the cursor text, if source4
352 is specified.
353 source5 [another group's name] Only available to TEXTBLOCK parts. It
354 is used for the group to be loaded and used for anchors display UNDER
355 the anchor position. source6 is used for over the anchors text, if
356 source6 is specified.
357 source6 [another group's name] Only available to TEXTBLOCK parts. It
358 is used for the group to be loaded and used for anchor display OVER the
359 anchor position. source5 is used for under the anchor text, if source6
360 is specified.
361 effect [EFFECT] Causes Edje to draw the selected effect among:
362
363 · PLAIN
364 · OUTLINE
365 · SOFT_OUTLINE
366 · SHADOW
367 · SOFT_SHADOW
368 · OUTLINE_SHADOW
369 · OUTLINE_SOFT_SHADOW
370 · FAR_SHADOW
371 · FAR_SOFT_SHADOW
372 · GLOW
373 entry_mode [MODE] Sets the edit mode for a textblock part to one of:
374
375 · NONE
376 · PLAIN
377 · EDITABLE
378 · PASSWORD It causes the part be editable if the edje object has the
379 keyboard focus AND the part has the edje focus (or selectable always
380 regardless of focus) and in the event of password mode, not
381 selectable and all text chars replaced with *'s but editable and
382 pastable.
383 select_mode [MODE] Sets the selection mode for a textblock part to
384 one of:
385
386 · DEFAULT
387 · EXPLICIT DEFAULT selection mode is what you would expect on any
388 desktop. Press mouse, drag and release to end. EXPLICIT mode requires
389 the application controlling the edje object has to explicitly begin
390 and end selection modes, and the selection itself is dragable at both
391 ends.
392 multiline [1 or 0] It causes a textblock that is editable to allow
393 multiple lines for editing.
394 dragable
395 part {
396 ..
397 dragable {
398 confine: 'another part';
399 events: 'another dragable part';
400 x: 0 0 0;
401 y: 0 0 0;
402 }
403 ..
404 }
405 When this block is used the resulting part can be dragged around the
406 interface, do not confuse with external drag & drop. By default Edje
407 (and most applications) will attempt to use the minimal size possible
408 for a dragable part. If the min property is not set in the description
409 the part will be (most likely) set to 0px width and 0px height, thus
410 invisible.
411 x [enable/disable] [step] [count] Used to setup dragging events for
412 the X axis. The first parameter is used to enable (1 or -1) and disable
413 (0) dragging along the axis. When enabled, 1 will set the starting
414 point at 0.0 and -1 at 1.0. The second parameter takes any integer and
415 will limit movement to values divisible by it, causing the part to jump
416 from position to position. The third parameter, (question from the
417 author: What is count for?).
418 y [enable/disable] [step] [count] Used to setup dragging events for
419 the Y axis. The first parameter is used to enable (1 or -1) and disable
420 (0) dragging along the axis. When enabled, 1 will set the starting
421 point at 0.0 and -1 at 1.0. The second parameter takes any integer and
422 will limit movement to values divisibles by it, causing the part to
423 jump from position to position. The third parameter, (question from the
424 author: What is count for?).
425 confine [another part's name] When set, limits the movement of the
426 dragged part to another part's container. When you use confine don't
427 forget to set a min size for the part, or the draggie will not show up.
428 events [another dragable part's name] It causes the part to forward
429 the drag events to another part, thus ignoring them for itself.
430 items
431 part {
432 ..
433 box {
434 items {
435 item {
436 type: TYPE;
437 source: 'some source';
438 min: 1 1;
439 max: 100 100;
440 padding: 1 1 2 2;
441 }
442 item {
443 type: TYPE;
444 source: 'some other source';
445 name: 'some name';
446 align: 1.0 0.5;
447 }
448 ..
449 }
450 }
451 ..
452 }
453 On a part of type BOX, this block can be used to set other groups as
454 elements of the box. These can be mixed with external objects set by
455 the application through the edje_object_part_box_* API.
456 type Only GROUP for now (defaults to it) Sets the type of the object
457 this item will hold.
458 name [name for the object] Sets the name of the object via
459 evas_object_name_set().
460 source [another group's name] Sets the group this object will be
461 made from.
462 min [width] [height] Sets the minimum size hints for this object.
463 prefer [width] [height] Sets the preferred size hints for this
464 object.
465 max [width] [height] Sets the maximum size hints for this object.
466 padding [left] [right] [top] [bottom] Sets the padding hints for
467 this object.
468 align [x] [y] Sets the alignment hints for this object.
469 weight [x] [y] Sets the weight hints for this object.
470 aspect [w] [h] Sets the aspect width and height hints for this
471 object.
472 aspect_mode NONE, NEITHER, HORIZONTAL, VERTICAL, BOTH Sets the
473 aspect control hints for this object.
474 options [extra options] Sets extra options for the object. Unused
475 for now.
476 position [col] [row] Sets the position this item will have in the
477 table. This is required for parts of type TABLE.
478 span [col] [row] Sets how many columns/rows this item will use.
479 Defaults to 1 1.
480 State description sub blocks
481 description
482 description {
483 inherit: 'another_description' INDEX;
484 state: 'description_name' INDEX;
485 visible: 1;
486 min: 0 0;
487 max: -1 -1;
488 align: 0.5 0.5;
489 fixed: 0 0;
490 step: 0 0;
491 aspect: 1 1;
492
493 rel1 {
494 ..
495 }
496
497 rel2 {
498 ..
499 }
500 }
501
502 Every part can have one or more description blocks. Each description
503 is used to define style and layout properties of a part in a given
504 'state'.
505 inherit [another description's name] [another description's index]
506 When set, the description will inherit all the properties from the
507 named description. The properties defined in this part will override
508 the inherited properties, reducing the amount of necessary code for
509 simple state changes. Note: inheritance in Edje is single level only.
510 state [a name for the description] [an index] Sets a name used to
511 identify a description inside a given part. Multiple descriptions are
512 used to declare different states of the same part, like 'clicked' or
513 'invisible'. All states declarations are also coupled with an index
514 number between 0.0 and 1.0. All parts must have at least one
515 description named 'default 0.0'.
516 visible [0 or 1] Takes a boolean value specifying whether part is
517 visible (1) or not (0). Non-visible parts do not emit signals. The
518 default value is 1.
519 align [X axis] [Y axis] When the displayed object's size is smaller
520 than its container, this property moves it relatively along both axis
521 inside its container. The default value is '0.5 0.5'.
522 fixed [width, 0 or 1] [height, 0 or 1] This affects the minimum size
523 calculation. See edje_object_size_min_calc() and
524 edje_object_size_min_restricted_calc(). This tells the min size
525 calculation routine that this part does not change size in width or
526 height (1 for it doesn't, 0 for it does), so the routine should not try
527 and expand or contract the part.
528 min [width] [height] The minimum size of the state.
529 max [width] [height] The maximum size of the state.
530 step [width] [height] Restricts resizing of each dimension to values
531 divisibles by its value. This causes the part to jump from value to
532 value while resizing. The default value is '0 0' disabling stepping.
533 aspect [min] [max] Normally width and height can be resized to any
534 values independently. The aspect property forces the width to height
535 ratio to be kept between the minimum and maximum set. For example, '1.0
536 1.0' will increase the width a pixel for every pixel added to heigh.
537 The default value is '0.0 0.0' disabling aspect.
538 aspect_preference [DIMENSION] Sets the scope of the 'aspect'
539 property to a given dimension. Available options are BOTH, VERTICAL,
540 HORIZONTAL and NONE
541 color_class [color class name] The part will use the color values of
542 the named color_class, these values can be overrided by the 'color',
543 'color2' and 'color3' properties set below.
544 color [red] [green] [blue] [alpha] Sets the main color to the
545 specified values (between 0 and 255).
546 color2 [red] [green] [blue] [alpha] Sets the text shadow color to
547 the specified values (0 to 255).
548 color3 [red] [green] [blue] [alpha] Sets the text outline color to
549 the specified values (0 to 255).
550 rel1/rel2
551 description {
552 ..
553 rel1 {
554 relative: 0.0 0.0;
555 offset: 0 0;
556 }
557 ..
558 rel2 {
559 relative: 1.0 1.0;
560 offset: -1 -1;
561 }
562 ..
563 }
564 The rel1 and rel2 blocks are used to define the position of each
565 corner of the part's container. With rel1 being the left-up corner and
566 rel2 being the right-down corner.
567 relative [X axis] [Y axis] Moves a corner to a relative position
568 inside the container of the relative 'to' part. Values from 0.0 (0%,
569 begining) to 1.0 (100%, end) of each axis.
570 offset [X axis] [Y axis] Affects the corner postion a fixed number
571 of pixels along each axis.
572 to [another part's name] Causes a corner to be positioned relatively
573 to another part's container.
574 to_x [another part's name] Causes a corner to be positioned
575 relatively to the X axis of another part's container. Simply put
576 affects the first parameter of 'relative'.
577 to_y [another part's name] Causes a corner to be positioned
578 relatively to the Y axis of another part's container. Simply put,
579 affects the second parameter of 'relative'.
580 Image state description sub blocks
581 image
582 description {
583 ..
584 image {
585 normal: 'filename.ext';
586 tween: 'filename2.ext';
587 ..
588 tween: 'filenameN.ext';
589 border: left right top bottom;
590 middle: 0/1/NONE/DEFAULT/SOLID;
591 }
592 ..
593 }
594
595 normal [image's filename] Name of image to be used as previously
596 declared in the images block. In an animation, this is the first and
597 last image displayed. It's required in any image part
598 tween [image's filename] Name of an image to be used in an animation
599 loop, an image block can have none, one or multiple tween declarations.
600 Images are displayed in the order they are listed.
601 border [left] [right] [top] [bottom] If set, the area (in pixels) of
602 each side of the image will be displayed as a fixed size border, from
603 the side -> inwards, preventing the corners from being changed on a
604 resize.
605 middle 0, 1, NONE, DEFAULT, SOLID If border is set, this value tells
606 Edje if the rest of the image (not covered by the defined border) will
607 be displayed or not or be assumed to be solid (without alpha). The
608 default is 1/DEFAULT.
609 border_scale 0, 1 If border is set, this value tells Edje if the
610 border should be scaled by the object/global edje scale factors
611 scale_hint 0, NONE, DYNAMIC, STATIC Sets the evas image scale hint
612 letting the engine more effectively save cached copies of the scaled
613 image if it makes sense
614 fill
615 description {
616 ..
617 fill {
618 smooth: 0-1;
619 origin {
620 relative: X-axis Y-axis;
621 offset: X-axis Y-axis;
622 }
623 size {
624 relative: width height;
625 offset: width height;
626 }
627 }
628 ..
629 }
630 The fill method is an optional block that defines the way an IMAGE or
631 GRADIENT part is going to be displayed inside its container.
632 smooth [0 or 1] The smooth property takes a boolean value to decide
633 if the image will be smoothed on scaling (1) or not (0). The default
634 value is 1.
635 spread TODO TODO
636 angle [angle] The angle of rotation of a GRADIENT part. It is
637 invalid in any other part type. The angle is expressed as an int, in
638 the range 0 - 360.
639 type TODO TODO
640 origin
641 description {
642 ..
643 fill {
644 ..
645 origin {
646 relative: 0.0 0.0;
647 offset: 0 0;
648 }
649 ..
650 }
651 ..
652 }
653 The origin block is used to place the starting point, inside the
654 displayed element, that will be used to render the tile. By default,
655 the origin is set at the element's left-up corner.
656 relative [X axis] [Y axis] Sets the starting point relatively to
657 displayed element's content.
658 offset [X axis] [Y axis] Affects the starting point a fixed number
659 of pixels along each axis.
660 size
661 description {
662 ..
663 fill {
664 ..
665 size {
666 relative: 1.0 1.0;
667 offset: -1 -1;
668 }
669 ..
670 }
671 ..
672 }
673 The size block defines the tile size of the content that will be
674 displayed.
675 relative [width] [height] Takes a pair of decimal values that
676 represent the a percentual value of the original size of the element.
677 For example, '0.5 0.5' represents half the size, while '2.0 2.0'
678 represents the double. The default value is '1.0 1.0'.
679 offset [X axis] [Y axis] Affects the size of the tile a fixed number
680 of pixels along each axis.
681 Text state description sub blocks
682 text
683 part {
684 description {
685 ..
686 text {
687 text: 'some string of text to display';
688 font: 'font_name';
689 size: SIZE;
690 text_class: 'class_name';
691 fit: horizontal vertical;
692 min: horizontal vertical;
693 max: horizontal vertical;
694 align: X-axis Y-axis;
695 source: 'part_name';
696 text_source: 'text_part_name';
697 elipsis: 0.0-1.0;
698 style: 'stylename';
699 }
700 ..
701 }
702 }
703
704 text [a string of text, or nothing] Sets the default content of a
705 text part, normally the application is the one changing its value.
706 text_class [text class name] Similar to color_class, this is the
707 name used by the application to alter the font family and size at
708 runtime.
709 font [font alias] This sets the font family to one of the aliases
710 set up in the 'fonts' block. Can be overrided by the application.
711 style [the style name] Causes the part to use the default style and
712 tags defined in the 'style' block with the specified name.
713 repch [the replacement character string] If this is a textblock and
714 is in PASSWORD mode this string is used to replace every character to
715 hide the details of the entry. Normally you would use a '*', but you
716 can use anything you like.
717 size [font size in points (pt)] Sets the default font size for the
718 text part. Can be overrided by the application.
719 fit [horizontal] [vertical] When any of the parameters is set to 1
720 edje will resize the text for it to fit in it's container. Both are
721 disabled by default.
722 min [horizontal] [vertical] When any of the parameters is enabled
723 (1) it forces the minimum size of the container to be equal to the
724 minimum size of the text. The default value is '0 0'.
725 max [horizontal] [vertical] When any of the parameters is enabled
726 (1) it forces the maximum size of the container to be equal to the
727 maximum size of the text. The default value is '0 0'.
728 align [horizontal] [vertical] Change the position of the point of
729 balance inside the container. The default value is 0.5 0.5.
730 source [another TEXT part's name] Causes the part to use the text
731 properties (like font and size) of another part and update them as they
732 change.
733 text_source [another TEXT part's name] Causes the part to display
734 the text content of another part and update them as they change.
735 elipsis [point of balance] Used to balance the text in a relative
736 point from 0.0 to 1.0, this point is the last section of the string to
737 be cut out in case of a resize that is smaller than the text itself.
738 The default value is 0.0.
739 Gradient state description sub blocks
740 gradient
741 part {
742 description {
743 ..
744 gradient {
745 type: 'linear';
746 spectrum 'spectrumName';
747 rel1 {
748 relative: 0.0 0.0;
749 offset: 0 0;
750 }
751 rel2
752 relative: 1.0 1.0;
753 offset: -1 -1;
754 }
755 }
756 ..
757 }
758 }
759
760 A gradient block is used to display a given 'spectrum' inside a
761 container. The container's shape is a rect but this not mean the
762 gradient is restricted to a rectangular shape. Gradients can use 'rel1'
763 and 'rel2' blocks to layout the initial and final point relatively
764 inside the container.
765 type [the name of the type] Alters the gradient's rendering
766 algorithm between:
767
768 · linear (default)
769 · radial
770 · rectangular
771 · angular
772 · sinusoidal
773 spectrum [an existing spectrum name] Causes the gradient to display
774 the colors as defined by a given 'spectrum' in the 'spectra' block.
775 relative [a relative X coordinate] [a relative Y coordinate] Inside
776 rel1 places the initial point, or first color, of the gradient
777 relatively to the gradient's container. Inside rel2 places the final
778 point, or last color.
779 offset [X axis] [Y axis] Inside rel1 moves the initial point, or
780 first color, of the gradient a fixed number of pixels along either
781 axis. Inside rel2 moves the final point, or last color.
782 Box state description sub blocks
783 box
784 part {
785 description {
786 ..
787 box {
788 layout: 'vertical';
789 padding: 0 2;
790 align: 0.5 0.5;
791 min: 0 0;
792 }
793 ..
794 }
795 }
796
797 A box block can contain other objects and display them in different
798 layouts, any of the predefined set, or a custom one, set by the
799 application.
800 layout [primary layout] [fallback layout] Sets the layout for the
801 box:
802
803 · horizontal (default)
804 · vertical
805 · horizontal_homogeneous
806 · vertical_homogeneous
807 · horizontal_max (homogeneous to the max sized child)
808 · vertical_max
809 · horizontal_flow
810 · vertical_flow
811 · stack
812 · some_other_custom_layout_set_by_the_application You could set a
813 custom layout as fallback, it makes very very little sense though,
814 and if that one fails, it will default to horizontal.
815 align [horizontal] [vertical] Change the position of the point of
816 balance inside the container. The default value is 0.5 0.5.
817 padding [horizontal] [vertical] Sets the space between cells in
818 pixels. Defaults to 0 0.
819 min [horizontal] [vertical] When any of the parameters is enabled
820 (1) it forces the minimum size of the box to be equal to the minimum
821 size of the items. The default value is '0 0'.
822 Table state description sub blocks
823 table
824 part {
825 description {
826 ..
827 table {
828 homogeneous: TABLE;
829 padding: 0 2;
830 align: 0.5 0.5;
831 }
832 ..
833 }
834 }
835
836 A table block can contain other objects packed in multiple columns and
837 rows, and each item can span across more than one column and/or row.
838 homogeneous [homogeneous mode] Sets the homogeneous mode for the
839 table:
840
841 · NONE (default)
842 · TABLE
843 · ITEM
844 align [horizontal] [vertical] Change the position of the point of
845 balance inside the container. The default value is 0.5 0.5.
846 padding [horizontal] [vertical] Sets the space between cells in
847 pixels. Defaults to 0 0.
848 Map state description sub blocks
849 map
850 description {
851 ..
852 map {
853 perspective: 'name';
854 light: 'name';
855 on: 1;
856 smooth: 1;
857 perspective_on: 1;
858 backface_cull: 1;
859 alpha: 1;
860
861 rotation {
862 ..
863 }
864 }
865 ..
866 }
867
868 perspective [another part's name] This sets the part that is used
869 as the 'perspective point' for giving a part a '3d look'. The
870 perspective point should have a perspective section that provides
871 zplane and focal properties. The center of this part will be used as
872 the focal point, so size, color and visibility etc. are not relevant
873 just center point, zplane and focal are used. This also implicitly
874 enables perspective transforms (see the on parameter for the map
875 section).
876 light [another part's name] This sets the part that is used as the
877 'light' for calculating the brightness (based on how directly the
878 part's surface is facing the light source point). Like the perspective
879 point part, the center point is used and zplane is used for the z
880 position (0 being the zero-plane where all 2D objects normally live)
881 and positive values being further away into the distance. The light
882 part color is used as the light color (alpha not used for light color).
883 The color2 color is used for the ambient lighting when calculating
884 brightness (alpha also not used).
885 on [1 or 0] This enables mapping for the part. Default is 0.
886 smooth [1 or 0] This enable smooth map rendering. This may be linear
887 interpolation, anisotropic filtering or anything the engine decides is
888 'smooth'. This is a best-effort hint and may not produce precisely the
889 same results in all engines and situations. Default is 1
890 alpha [1 or 0] This enable alpha channel when map rendering. Default
891 is 1.
892 backface_cull [1 or 0] This enables backface culling (when the
893 rotated part that normally faces the camera is facing away after being
894 rotated etc.). This means that the object will be hidden when 'backface
895 culled'.
896 perspective_on [1 or 0] Enable perspective when rotating even
897 without a perspective point object. This would use perspective set for
898 the object itself or for the canvas as a whole as the global
899 perspective with edje_perspective_set() and
900 edje_perspective_global_set().
901 rotation
902 map {
903 ..
904 rotation {
905 center: 'name';
906 x: 45.0;
907 y: 45.0;
908 z: 45.0;
909 }
910 ..
911 }
912 Rotates the part, optionally with the center on another part.
913 center [another part's name] This sets the part that is used as the
914 center of rotation when rotating the part with this description. The
915 part's center point is used as the rotation center when applying
916 rotation around the x, y and z axes. If no center is given, the parts
917 original center itself is used for the rotation center.
918 x [X degrees] This sets the rotation around the x axis of the part
919 considering the center set. In degrees.
920 y [Y degrees] This sets the rotation around the u axis of the part
921 considering the center set. In degrees.
922 z [Z degrees] This sets the rotation around the z axis of the part
923 considering the center set. In degrees.
924 perspective
925 description {
926 ..
927 perspective {
928 zplane: 0;
929 focal: 1000;
930 }
931 ..
932 }
933 Adds focal and plane perspective to the part. Active if perspective_on
934 is true. Must be provided if the part is being used by other part as
935 it's perspective target.
936 zplane [unscaled Z value] This sets the z value that will not be
937 scaled. Normally this is 0 as that is the z distance that all objects
938 are at normally.
939 focal [distance] This sets the distance from the focal z plane
940 (zplane) and the camera - i.e. very much equating to focal length of
941 the camera
942 Params state description sub blocks
943 params
944 description {
945 ..
946 params {
947 int: 'name' 0;
948 double: 'other_name' 0.0;
949 string: 'another_name' 'some text';
950 bool: 'name' 1;
951 choice: 'some_name' 'value';
952 }
953 ..
954 }
955
956 Set parameters for EXTERNAL parts. The value overwrites previous
957 definitions with the same name.
958 int [param_name] [int_value] Adds an integer parameter for an
959 external object
960 double [param_name] [double_value] Adds a double parameter for an
961 external object
962 string [param_name] [string_value] Adds a string parameter for an
963 external object
964 bool [param_name] [bool_value] Adds an boolean parameter for an
965 external object. Value must be 0 or 1.
966 choice [param_name] [choice_string] Adds a choice parameter for an
967 external object. The possible choice values are defined by external
968 type at their register time and will be validated at runtime.
969 Program block
970 program
971 group {
972 programs {
973 ..
974 program {
975 name: 'programname';
976 signal: 'signalname';
977 source: 'partname';
978 filter: 'partname' 'statename';
979 in: 0.3 0.0;
980 action: STATE_SET 'statename' state_value;
981 transition: LINEAR 0.5;
982 target: 'partname';
983 target: 'anotherpart';
984 after: 'programname';
985 after: 'anotherprogram';
986 }
987 ..
988 }
989 }
990
991 Programs define how your interface reacts to events. Programs can
992 change the state of parts, react to events or trigger other events.
993 name [program name] Symbolic name of program as a unique identifier.
994 signal [signal name] Specifies signal(s) that should cause the
995 program to run. The signal received must match the specified source to
996 run. Signals may be globbed, but only one signal keyword per program
997 may be used. ex: signal: 'mouse,clicked,*'; (clicking any mouse button
998 that matches source starts program).
999 source [source name] Source of accepted signal. Sources may be
1000 globbed, but only one source keyword per program may be used.
1001 ex:source: 'button-*'; (Signals from any part or program named
1002 'button-*' are accepted).
1003 filter [part] [state] Filter signals to be only accepted if the part
1004 [part] is in state named [state]. Only one filter per program can be
1005 used. If [state] is not given, the source of the event will be used
1006 instead.
1007 in [from] [range] Wait 'from' seconds before executing the program.
1008 And add a random number of seconds (from 0 to 'range') to the total
1009 waiting time.
1010 action [type] [param1] [param2] Action to be performed by the
1011 program. Valid actions are: STATE_SET, ACTION_STOP, SIGNAL_EMIT,
1012 DRAG_VAL_SET, DRAG_VAL_STEP, DRAG_VAL_PAGE, FOCUS_SET, PARAM_COPY,
1013 PARAM_SET Only one action can be specified per program. Examples:
1014 action: STATE_SET 'statename' 0.5;
1015 action: ACTION_STOP;
1016 action: SIGNAL_EMIT 'signalname' 'emitter';
1017 action: DRAG_VAL_SET 0.5 0.0;
1018 action: DRAG_VAL_STEP 1.0 0.0;
1019 action: DRAG_VAL_PAGE 0.0 0.0;
1020 action: FOCUS_SET;
1021 action: FOCUS_OBJECT;
1022 action: PARAM_COPY 'src_part' 'src_param' 'dst_part' 'dst_param';
1023 action: PARAM_SET 'part' 'param' 'value';
1024
1025 transition [type] [length] Defines how transitions occur using
1026 STATE_SET action.
1027 Where 'type' is the style of the transition and 'length' is a double
1028 specifying the number of seconds in which to preform the transition.
1029 Valid types are: LINEAR, SINUSOIDAL, ACCELERATE, and DECELERATE.
1030 target [target] Program or part on which the specified action acts.
1031 Multiple target keywords may be specified, one per target. SIGNAL_EMITs
1032 do not have targets.
1033 after [after] Specifies a program to run after the current program
1034 completes. The source and signal parameters of a program run as an
1035 'after' are ignored. Multiple 'after' statements can be specified per
1036 program.
1037 api [name] [description] Specifies a hint to let applications (or
1038 IDE's) know how to bind things. The parameter name should contain the
1039 name of the function that the application should use, and description
1040 describes how it should be used.
1041Edje 2 Jul 2010 edcref(3)