2 @brief Edje Graphical Design Library
4 These routines are used for Edje.
6 @mainpage Edje Library Documentation
9 @author Carsten Haitzler <raster@@rasterman.com>
10 @author Tilman Sauerbeck (tilman at code-monkey de)
11 @author ZigsMcKenzie <zigsmckenzie@@gmail.com>
12 @author Cedric BAIL <cedric.bail@@free.fr>
13 @author Brian Mattern <rephorm@@rephorm.com>
14 @author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
15 @author Tristan <blunderer@@gmail.com>
16 @author Gustavo Lima Chaves <glima@@profusion.mobi>
17 @author Bruno Dilly <bdilly@@profusion.mobi>
18 @author Fabiano Fidêncio <fidencio@@profusion.mobi>
19 @author Jihoon Kim <jihoon48.kim@@samsung.com>
20 @author Tiago Falcão <tiago@@profusion.mobi>
21 @author Davide Andreoli <dave@@gurumeditation.it>
22 @author Sebastian Dransfeld <sd@@tango.flipp.net>
23 @author Tom Hacohen <tom@@stosb.com>
24 @author Aharon Hillel <a.hillel@@partner.samsung.com>
36 @section intro What is Edje?
38 Edje is a complex graphical design & layout library.
40 It doesn't pretend to do containing and regular layout like a widget
41 set, but it is the base for such components. Based on the requirements
42 of Enlightenment 0.17, Edje should serve all the purposes of creating
43 visual elements (borders of windows, buttons, scrollbars, etc.) and
44 allow the designer the ability to animate, layout and control the look
45 and feel of any program using Edje as its basic GUI constructor. This
46 library allows for multiple collections of Layouts in one file,
47 sharing the same image and font database and thus allowing a whole
48 theme to be conveniently packaged into 1 file and shipped around.
50 Edje separates the layout and behavior logic. Edje files ship with an
51 image and font database, used by all the parts in all the collections
52 to source graphical data. It has a directory of logical part names
53 pointing to the part collection entry ID in the file (thus allowing
54 for multiple logical names to point to the same part collection,
55 allowing for the sharing of data between display elements). Each part
56 collection consists of a list of visual parts, as well as a list of
57 programs. A program is a conditionally run program that if a
58 particular event occurs (a button is pressed, a mouse enters or leaves
59 a part) will trigger an action that may affect other parts. In this
60 way a part collection can be "programmed" via its file as to hilight
61 buttons when the mouse passes over them or show hidden parts when a
62 button is clicked somewhere etc. The actions performed in changing
63 from one state to another are also allowed to transition over a period
64 of time, allowing animation. Programs and animations can be run in
67 This separation and simplistic event driven style of programming can produce
68 almost any look and feel one could want for basic visual elements. Anything
69 more complex is likely the domain of an application or widget set that may
70 use Edje as a convenient way of being able to configure parts of the display.
72 For details of Edje's history, see the \ref history section.
81 @section requirements What does Edje require?
83 Edje requires fairly little on your system. to use the Edje runtime library
92 Evas needs to be build with the JPEG, PNG and EET image loaders enabled at a
93 minimum. Edje uses X for the test program, so you will need the SOFTWARE_X11
94 engine built into Evas as well. A suggested configure list is below in the
95 "cheat sheet" for Evas.
97 Ecore needs the ECORE, ECORE_EVAS and ECORE_X modules built at a minimum.
98 It's suggested to build all the Ecore modules, but the ECORE_FB modules is
101 Eina, Eet and Embryo have no interesting options so just build and
104 It is suggested right now that you get the latest SVN versions of the
105 required libraries. You also need to build them in the right order and make
106 sure the right options are enabled in the required libraries. Here is a
107 quick "cheat sheet" on how to get started.
110 1. You need Eina from the trunk svn branch.
112 svn co http://svn.enlightenment.org/svn/e/trunk/eina/
120 2. You need Eet from the trunk svn branch.
122 svn co http://svn.enlightenment.org/svn/e/trunk/eet/
130 3. You need Evas from the trunk svn branch built with eet, png and jpeg loader support.
132 svn co http://svn.enlightenment.org/svn/e/trunk/evas/
135 ./configure --enable-image-loader-eet --enable-font-loader-eet --enable-image-loader-jpeg --enable-image-loader-png --enable-buffer
140 4. You need Ecore from the trunk svn branch built with ecore-x and ecore-evas.
142 svn co http://svn.enlightenment.org/svn/e/trunk/ecore/
145 ./configure --enable-ecore-x --enable-ecore-evas --enable-ecore-evas-software-buffer --enable-ecore-evas-software-x11 --enable-ecore-evas-software-buffer
150 5. You need embryo from the trunk svn branch
152 svn co http://svn.enlightenment.org/svn/e/trunk/embryo/
170 @section compiling How to compile and test Edje
172 Now you need to compile and install Edje.
180 You now have it installed and ready to go, but you need input
181 data. There are lots of examples in SVN, the best one is
182 Enlightenment's own theme file.
184 You may use different tools to edit and view the generated ".edj"
187 - editje (http://trac.enlightenment.org/e/wiki/Editje)
188 - edje_viewer (http://trac.enlightenment.org/e/wiki/Edje_Viewer)
199 @section details So how does this all work?
201 Edje internally holds a geometry state machine and state graph of what is
202 visible, not, where, at what size, with what colors etc. This is described
203 to Edje from an Edje .edj file containing this information. These files can
204 be produced by using edje_cc to take a text file (a .edc file) and "compile"
205 an output .edj file that contains this information, images and any other
208 The application using Edje will then create an object in its Evas
209 canvas and set the bundle file to use, specifying the @b group name to
210 use. Edje will load such information and create all the required
211 children objects with the specified properties as defined in each @b
212 part of the given group. See the following annotated example:
219 #include <Ecore_Evas.h>
225 static Evas_Object *create_my_group(Evas *canvas, const char *text)
229 edje = edje_object_add(canvas);
232 EINA_LOG_CRIT("could not create edje object!");
236 if (!edje_object_file_set(edje, "edje_example.edj", "my_group"))
238 int err = edje_object_load_error_get(edje);
239 const char *errmsg = edje_load_error_str(err);
240 EINA_LOG_ERR("could not load 'my_group' from edje_example.edj: %s",
243 evas_object_del(edje);
249 if (!edje_object_part_text_set(edje, "text", text))
251 EINA_LOG_WARN("could not set the text. "
252 "Maybe part 'text' does not exist?");
256 evas_object_move(edje, 0, 0);
257 evas_object_resize(edje, WIDTH, HEIGHT);
258 evas_object_show(edje);
262 int main(int argc, char *argv[])
275 window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
278 EINA_LOG_CRIT("could not create window.");
281 canvas = ecore_evas_get(window);
283 text = (argc > 1) ? argv[1] : NULL;
285 edje = create_my_group(canvas, text);
289 ecore_evas_show(window);
290 ecore_main_loop_begin();
292 evas_object_del(edje);
293 ecore_evas_free(window);
299 It requires the following source Edje file:
301 // compile: edje_cc edje_example.edc
304 name: "my_group"; // must be the same as in edje_example.c
309 type: RECT; // plain boring rectangle
310 mouse_events: 0; // we don't need any mouse event on the background
312 // just one state "default"
314 state: "default" 0.0; // must always exist
315 color: 255 255 255 255; // white
317 // define part coordinates:
319 rel1 { // top-left point at (0, 0) [WIDTH * 0 + 0, HEIGHT * 0 + 0]
323 rel2 { // bottom-right point at (WIDTH * 1.0 - 1, HEIGHT * 1.0 - 1)
333 mouse_events: 1; // we want to change the color on mouse-over
335 // 2 states, one "default" and another "over" to be used
336 // on mouse over effect
339 state: "default" 0.0;
340 color: 255 0 0 255; // red
342 // define part coordinates:
344 rel1 { // top-left at (WIDTH * 0.1 + 5, HEIGHT * 0.2 + 10)
348 rel2 { // bottom-right at (WIDTH * 0.9 - 6, HEIGHT * 0.8 - 11)
353 // define text specific state details
355 font: "Sans"; // using fontconfig name!
363 inherit: "default" 0.0; // copy everything from "default" at this point
365 color: 0 255 0 255; // override color, now it is green
369 // do programs to change color on text mouse in/out (over)
372 // what triggers this program:
376 // what this program does:
377 action: STATE_SET "over" 0.0;
380 // do the state-set in a nice interpolation animation
381 // using linear time in 0.1 second
382 transition: LINEAR 0.1;
386 // what triggers this program:
390 // what this program does:
391 action: STATE_SET "default" 0.0;
394 // do the state-set in a nice interpolation animation
395 // using linear time in 0.1 second
396 transition: LINEAR 0.1;
405 One should save these files as edje_example.c and edje_example.edc then:
407 gcc -o edje_example edje_example.c `pkg-config --cflags --libs eina evas ecore ecore-evas edje`
408 edje_cc edje_example.edc
410 ./edje_example "some text"
413 Although simple, this example illustrates that animations and state
414 changes can be done from the Edje file itself without any requirement
415 in the C application.
417 Before digging into changing or creating your own Edje source (edc)
418 files, read the \ref edcref.
422 @section history Edje History
424 It's a sequel to "Ebits" which has serviced the needs of Enlightenment
425 development for early version 0.17. The original design parameters under
426 which Ebits came about were a lot more restricted than the resulting
427 use of them, thus Edje was born.
429 Edje is a more complex layout engine compared to Ebits. It doesn't
430 pretend to do containing and regular layout like a widget set. It
431 still inherits the more simplistic layout ideas behind Ebits, but it
432 now does them a lot more cleanly, allowing for easy expansion, and the
433 ability to cover much more ground than Ebits ever could. For the
434 purposes of Enlightenment 0.17, Edje was conceived to serve all the
435 purposes of creating visual elements (borders of windows, buttons,
436 scrollbars, etc.) and allow the designer the ability to animate,
437 layout and control the look and feel of any program using Edje as its
438 basic GUI constructor.
440 Unlike Ebits, Edje separates the layout and behavior logic.
450 @todo Complete documentation of API
451 @todo Bytecode language for extending programs... but what/how?
458 @example embryo_custom_state.edc
459 This example show how to create a custom state from embryo. Clicking on the
460 3 labels will rotate the object in the given direction.
462 @example embryo_pong.edc
463 Super-simple Pong implementation in pure embryo.
465 @example embryo_run_program.edc
466 This example show how to run an edje program from embryo code.
468 @example embryo_set_state.edc
469 This example show how to change the state of a part from embryo code.
471 @example embryo_set_text.edc
472 This example show how to set the text in TEXT part from embryo code.
474 @example embryo_timer.edc
475 This example show the usage of timers in embryo.
477 @example external_elm_anchorblock.edc
478 This example use an elementary anchorblock and a button to animate the text.
480 @example external_elm_button.edc
481 This example create some elementary buttons and do some actions on user click.
483 @example external_elm_check.edc
484 This example show EXTERNAL checkbox in action.
486 @example external_elm_panes.edc
487 This example show EXTERNAL elementary panes in action.
489 @example external_emotion_elm.edc
490 Super-concise video player example using Edje/Emotion/Elementary.
492 @example lua_script.edc
493 This example show the usage of lua scripting to create and animate some
494 objects in the canvas.
496 @example toggle_using_filter.edc
497 This example show how to toggle the state of a part using the 'filter'
498 param in edje programs
503 * @page luaref Edje Lua scripting
505 * @section intro Introduction
507 * Lua is intended for script-only objects at this point (with embryo left
508 * for augmenting standard programs). Since script-only objects effectively
509 * define objects entirely via Lua script (resize handling, event handling
510 * etc. etc.) this places many more demands on them, and thus a more powerful
511 * language is in order. Lua is that language.
513 * To get you started, here's an example:
514 * @include lua_script.edc
535 # ifdef EFL_EDJE_BUILD
537 # define EAPI __declspec(dllexport)
540 # endif /* ! DLL_EXPORT */
542 # define EAPI __declspec(dllimport)
543 # endif /* ! EFL_EDJE_BUILD */
547 # define EAPI __attribute__ ((visibility("default")))
560 #define EDJE_VERSION_MAJOR 1
561 #define EDJE_VERSION_MINOR 0
563 typedef struct _Edje_Version
571 EAPI extern Edje_Version *edje_version;
575 * @brief Edje Graphical Design Library
577 * These routines are used for Edje.
580 typedef enum _Edje_Message_Type
582 EDJE_MESSAGE_NONE = 0,
584 EDJE_MESSAGE_SIGNAL = 1, /* DONT USE THIS */
586 EDJE_MESSAGE_STRING = 2,
587 EDJE_MESSAGE_INT = 3,
588 EDJE_MESSAGE_FLOAT = 4,
590 EDJE_MESSAGE_STRING_SET = 5,
591 EDJE_MESSAGE_INT_SET = 6,
592 EDJE_MESSAGE_FLOAT_SET = 7,
594 EDJE_MESSAGE_STRING_INT = 8,
595 EDJE_MESSAGE_STRING_FLOAT = 9,
597 EDJE_MESSAGE_STRING_INT_SET = 10,
598 EDJE_MESSAGE_STRING_FLOAT_SET = 11
601 typedef enum _Edje_Aspect_Control
603 EDJE_ASPECT_CONTROL_NONE = 0,
604 EDJE_ASPECT_CONTROL_NEITHER = 1,
605 EDJE_ASPECT_CONTROL_HORIZONTAL = 2,
606 EDJE_ASPECT_CONTROL_VERTICAL = 3,
607 EDJE_ASPECT_CONTROL_BOTH = 4
608 } Edje_Aspect_Control;
610 typedef enum _Edje_Object_Table_Homogeneous_Mode
612 EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE = 0,
613 EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1,
614 EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2
615 } Edje_Object_Table_Homogeneous_Mode;
617 typedef enum _Edje_Part_Type
619 EDJE_PART_TYPE_NONE = 0,
620 EDJE_PART_TYPE_RECTANGLE = 1,
621 EDJE_PART_TYPE_TEXT = 2,
622 EDJE_PART_TYPE_IMAGE = 3,
623 EDJE_PART_TYPE_SWALLOW = 4,
624 EDJE_PART_TYPE_TEXTBLOCK = 5,
625 EDJE_PART_TYPE_GRADIENT = 6,
626 EDJE_PART_TYPE_GROUP = 7,
627 EDJE_PART_TYPE_BOX = 8,
628 EDJE_PART_TYPE_TABLE = 9,
629 EDJE_PART_TYPE_EXTERNAL = 10,
630 EDJE_PART_TYPE_PROXY = 11,
631 EDJE_PART_TYPE_LAST = 12
634 typedef enum _Edje_Text_Effect
636 #define EDJE_TEXT_EFFECT_MASK_BASIC 0xf
637 #define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \
638 do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0)
639 EDJE_TEXT_EFFECT_NONE = 0,
640 EDJE_TEXT_EFFECT_PLAIN = 1,
641 EDJE_TEXT_EFFECT_OUTLINE = 2,
642 EDJE_TEXT_EFFECT_SOFT_OUTLINE = 3,
643 EDJE_TEXT_EFFECT_SHADOW = 4,
644 EDJE_TEXT_EFFECT_SOFT_SHADOW = 5,
645 EDJE_TEXT_EFFECT_OUTLINE_SHADOW = 6,
646 EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7,
647 EDJE_TEXT_EFFECT_FAR_SHADOW = 8,
648 EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW = 9,
649 EDJE_TEXT_EFFECT_GLOW = 10,
651 EDJE_TEXT_EFFECT_LAST = 11,
653 #define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4)
654 #define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \
655 do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0)
656 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4),
657 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM = (0x1 << 4),
658 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4),
659 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT = (0x3 << 4),
660 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4),
661 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP = (0x5 << 4),
662 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4),
663 EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4)
666 typedef enum _Edje_Action_Type
668 EDJE_ACTION_TYPE_NONE = 0,
669 EDJE_ACTION_TYPE_STATE_SET = 1,
670 EDJE_ACTION_TYPE_ACTION_STOP = 2,
671 EDJE_ACTION_TYPE_SIGNAL_EMIT = 3,
672 EDJE_ACTION_TYPE_DRAG_VAL_SET = 4,
673 EDJE_ACTION_TYPE_DRAG_VAL_STEP = 5,
674 EDJE_ACTION_TYPE_DRAG_VAL_PAGE = 6,
675 EDJE_ACTION_TYPE_SCRIPT = 7,
676 EDJE_ACTION_TYPE_FOCUS_SET = 8,
677 EDJE_ACTION_TYPE_RESERVED00 = 9,
678 EDJE_ACTION_TYPE_FOCUS_OBJECT = 10,
679 EDJE_ACTION_TYPE_PARAM_COPY = 11,
680 EDJE_ACTION_TYPE_PARAM_SET = 12,
681 EDJE_ACTION_TYPE_LAST = 13
684 typedef enum _Edje_Tween_Mode
686 EDJE_TWEEN_MODE_NONE = 0,
687 EDJE_TWEEN_MODE_LINEAR = 1,
688 EDJE_TWEEN_MODE_SINUSOIDAL = 2,
689 EDJE_TWEEN_MODE_ACCELERATE = 3,
690 EDJE_TWEEN_MODE_DECELERATE = 4,
691 EDJE_TWEEN_MODE_LAST = 5
694 typedef enum _Edje_Cursor
697 EDJE_CURSOR_SELECTION_BEGIN,
698 EDJE_CURSOR_SELECTION_END,
699 EDJE_CURSOR_PREEDIT_START,
700 EDJE_CURSOR_PREEDIT_END,
702 EDJE_CURSOR_USER_EXTRA,
706 typedef struct _Edje_Message_String Edje_Message_String;
707 typedef struct _Edje_Message_Int Edje_Message_Int;
708 typedef struct _Edje_Message_Float Edje_Message_Float;
709 typedef struct _Edje_Message_String_Set Edje_Message_String_Set;
710 typedef struct _Edje_Message_Int_Set Edje_Message_Int_Set;
711 typedef struct _Edje_Message_Float_Set Edje_Message_Float_Set;
712 typedef struct _Edje_Message_String_Int Edje_Message_String_Int;
713 typedef struct _Edje_Message_String_Float Edje_Message_String_Float;
714 typedef struct _Edje_Message_String_Int_Set Edje_Message_String_Int_Set;
715 typedef struct _Edje_Message_String_Float_Set Edje_Message_String_Float_Set;
717 struct _Edje_Message_String
722 struct _Edje_Message_Int
727 struct _Edje_Message_Float
732 struct _Edje_Message_String_Set
738 struct _Edje_Message_Int_Set
744 struct _Edje_Message_Float_Set
750 struct _Edje_Message_String_Int
756 struct _Edje_Message_String_Float
762 struct _Edje_Message_String_Int_Set
769 struct _Edje_Message_String_Float_Set
776 typedef enum _Edje_Drag_Dir
778 EDJE_DRAG_DIR_NONE = 0,
784 typedef enum _Edje_Load_Error
786 EDJE_LOAD_ERROR_NONE = 0,
787 EDJE_LOAD_ERROR_GENERIC = 1,
788 EDJE_LOAD_ERROR_DOES_NOT_EXIST = 2,
789 EDJE_LOAD_ERROR_PERMISSION_DENIED = 3,
790 EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4,
791 EDJE_LOAD_ERROR_CORRUPT_FILE = 5,
792 EDJE_LOAD_ERROR_UNKNOWN_FORMAT = 6,
793 EDJE_LOAD_ERROR_INCOMPATIBLE_FILE = 7,
794 EDJE_LOAD_ERROR_UNKNOWN_COLLECTION = 8,
795 EDJE_LOAD_ERROR_RECURSIVE_REFERENCE = 9
798 typedef enum _Edje_Text_Filter_Type
800 EDJE_TEXT_FILTER_TEXT = 0,
801 EDJE_TEXT_FILTER_FORMAT = 1,
802 EDJE_TEXT_FILTER_MARKUP = 2
803 } Edje_Text_Filter_Type;
805 typedef enum _Edje_External_Param_Type
807 EDJE_EXTERNAL_PARAM_TYPE_INT,
808 EDJE_EXTERNAL_PARAM_TYPE_DOUBLE,
809 EDJE_EXTERNAL_PARAM_TYPE_STRING,
810 EDJE_EXTERNAL_PARAM_TYPE_BOOL,
811 EDJE_EXTERNAL_PARAM_TYPE_CHOICE,
812 EDJE_EXTERNAL_PARAM_TYPE_MAX
813 } Edje_External_Param_Type;
816 * @typedef Edje_External_Param_Flags flags that determines the
817 * behavior of a parameter.
819 * @var EDJE_EXTERNAL_PARAM_FLAGS_NONE property is incapable of
820 * operations, this is used to catch bogus flags.
821 * @var EDJE_EXTERNAL_PARAM_FLAGS_GET property can be read/get
822 * @var EDJE_EXTERNAL_PARAM_FLAGS_SET property can be written/set.
823 * This only enables edje_object_part_external_param_set() and
824 * Embryo scripts. To enable parameter being set from state
825 * description whenever it changes state, use
826 * #EDJE_EXTERNAL_PARAM_FLAGS_STATE.
827 * @var EDJE_EXTERNAL_PARAM_FLAGS_STATE property can be set from state
829 * @var EDJE_EXTERNAL_PARAM_FLAGS_CONSTRUCTOR this property is only
830 * set once when object is constructed using its value from
831 * "default" 0.0 state description. Setting this overrides
832 * #EDJE_EXTERNAL_PARAM_FLAGS_STATE.
833 * @var EDJE_EXTERNAL_PARAM_FLAGS_REGULAR convenience flag that sets
834 * property as GET, SET and STATE.
836 typedef enum _Edje_External_Param_Flags
838 EDJE_EXTERNAL_PARAM_FLAGS_NONE = 0,
839 EDJE_EXTERNAL_PARAM_FLAGS_GET = (1 << 0),
840 EDJE_EXTERNAL_PARAM_FLAGS_SET = (1 << 1),
841 EDJE_EXTERNAL_PARAM_FLAGS_STATE = (1 << 2),
842 EDJE_EXTERNAL_PARAM_FLAGS_CONSTRUCTOR = (1 << 3),
843 EDJE_EXTERNAL_PARAM_FLAGS_REGULAR = (EDJE_EXTERNAL_PARAM_FLAGS_GET |
844 EDJE_EXTERNAL_PARAM_FLAGS_SET |
845 EDJE_EXTERNAL_PARAM_FLAGS_STATE)
846 } Edje_External_Param_Flags;
850 * @brief Converts type identifier to string nicer representation.
852 * This may be used to debug or other informational purposes.
854 * @param type the identifier to convert.
855 * @return the string with the string representation, or @c "(unknown)".
857 EAPI const char *edje_external_param_type_str(Edje_External_Param_Type type) EINA_PURE;
859 struct _Edje_External_Param
862 Edje_External_Param_Type type;
863 // XXX these could be in a union, but eet doesn't support them (or does it?)
864 int i; /**< used by both integer and boolean */
866 const char *s; /**< used by both string and choice */
868 typedef struct _Edje_External_Param Edje_External_Param;
870 #define EDJE_EXTERNAL_INT_UNSET INT_MAX
871 #define EDJE_EXTERNAL_DOUBLE_UNSET DBL_MAX
873 typedef struct _Edje_External_Param_Info Edje_External_Param_Info;
874 struct _Edje_External_Param_Info
877 Edje_External_Param_Type type;
878 Edje_External_Param_Flags flags;
881 int def, min, max, step;
884 double def, min, max, step;
888 const char *accept_fmt;
889 const char *deny_fmt;
893 const char *false_str;
894 const char *true_str;
898 const char **choices; /* NULL terminated array */
899 char *(*def_get)(void *data, const Edje_External_Param_Info *info); /* return malloc() memory with the default choice, should be used if def is NULL. First parameter is Edje_External_Type::data */
900 char **(*query)(void *data, const Edje_External_Param_Info *info); /* NULL terminated array of strings, memory is dynamically allocated and should be freed with free() for array and each element. First parameter is Edje_External_Type::data */
905 #define EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, min, max, step, flags) \
906 {name, EDJE_EXTERNAL_PARAM_TYPE_INT, flags, {.i = {def, min, max, step}}}
907 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, min, max, step, flags) \
908 {name, EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, flags, {.d = {def, min, max, step}}}
909 #define EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, accept, deny, flags) \
910 {name, EDJE_EXTERNAL_PARAM_TYPE_STRING, flags, {.s = {def, accept, deny}}}
911 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, false_str, true_str, flags) \
912 {name, EDJE_EXTERNAL_PARAM_TYPE_BOOL, flags, {.b = {def, false_str, true_str}}}
913 #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL_FLAGS(name, def, choices, flags) \
914 {name, EDJE_EXTERNAL_PARAM_TYPE_CHOICE, flags, {.c = {def, choices, NULL, NULL}}}
915 #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL_FLAGS(name, def_get, query, flags) \
916 {name, EDJE_EXTERNAL_PARAM_TYPE_CHOICE, flags, {.c = {NULL, NULL, def_get, query}}}
918 #define EDJE_EXTERNAL_PARAM_INFO_INT_FULL(name, def, min, max, step) \
919 EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, min, max, step, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
920 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL(name, def, min, max, step) \
921 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, min, max, step, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
922 #define EDJE_EXTERNAL_PARAM_INFO_STRING_FULL(name, def, accept, deny) \
923 EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, accept, deny, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
924 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL(name, def, false_str, true_str) \
925 EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, false_str, true_str, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
926 #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL(name, def, choices) \
927 EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL_FLAGS(name, def, choices, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
928 #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL(name, def_get, query) \
929 EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL_FLAGS(name, def_get, query, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
931 #define EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT(name, def) \
932 EDJE_EXTERNAL_PARAM_INFO_INT_FULL(name, def, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET)
933 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT(name, def) \
934 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL(name, def, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET)
935 #define EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT(name, def) \
936 EDJE_EXTERNAL_PARAM_INFO_STRING_FULL(name, def, NULL, NULL)
937 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT(name, def) \
938 EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL(name, def, "false", "true")
940 #define EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT_FLAGS(name, def, flags) \
941 EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, flags)
942 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT_FLAGS(name, def, flags) \
943 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, flags)
944 #define EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT_FLAGS(name, def, flags) \
945 EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, NULL, NULL, flags)
946 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT_FLAGS(name, def, flags) \
947 EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, "false", "true", flags)
949 #define EDJE_EXTERNAL_PARAM_INFO_INT(name) \
950 EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT(name, 0)
951 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE(name) \
952 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT(name, 0.0)
953 #define EDJE_EXTERNAL_PARAM_INFO_STRING(name) \
954 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT(name, NULL)
955 #define EDJE_EXTERNAL_PARAM_INFO_BOOL(name) \
956 EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT(name, 0)
958 #define EDJE_EXTERNAL_PARAM_INFO_INT_FLAGS(name, flags) \
959 EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT_FLAGS(name, 0, flags)
960 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FLAGS(name, flags) \
961 EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT_FLAGS(name, 0.0, flags)
962 #define EDJE_EXTERNAL_PARAM_INFO_STRING_FLAGS(name, flags) \
963 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT_FLAGS(name, NULL, flags)
964 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FLAGS(name, flags) \
965 EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT_FLAGS(name, 0, flags)
967 #define EDJE_EXTERNAL_PARAM_INFO_SENTINEL {NULL, 0, 0, {.s = {NULL, NULL, NULL}}}
970 * @struct _Edje_External_Type
972 * @brief Information about an external type to be used.
974 * This structure provides information on how to display and modify a
975 * third party Evas_Object in Edje.
977 * Some function pointers are not really used by Edje, but provide
978 * means for Edje users to better interact with such objects. For
979 * instance, an editor may use label_get() and icon_get() to list all
980 * registered external types.
982 * @note The function pointers provided in this structure must check
983 * for errors and invalid or out-of-range values as for
984 * performance reasons Edje will not enforce hints provided as
985 * #Edje_External_Param_Info in the member parameters_info.
987 struct _Edje_External_Type
989 #define EDJE_EXTERNAL_TYPE_ABI_VERSION (3)
990 unsigned int abi_version; /**< always use:
991 * - #EDJE_EXTERNAL_TYPE_ABI_VERSION to declare.
992 * - edje_external_type_abi_version_get() to check.
995 const char *module_name;
996 Evas_Object *(*add) (void *data, Evas *evas, Evas_Object *parent, const Eina_List *params, const char *part_name); /**< creates the object to be used by Edje as the part */
997 void (*state_set) (void *data, Evas_Object *obj, const void *from_params, const void *to_params, float pos); /**< called upon state changes, including the initial "default" 0.0 state. Parameters are the value returned by params_parse() */
998 void (*signal_emit) (void *data, Evas_Object *obj, const char *emission, const char *source); /**< Feed a signal emitted with emission originally set as part_name:signal to this object (without the "part_name:" prefix) */
999 Eina_Bool (*param_set) (void *data, Evas_Object *obj, const Edje_External_Param *param); /**< dynamically change a parameter of this external, called by scripts and user code. Returns @c EINA_TRUE on success */
1000 Eina_Bool (*param_get) (void *data, const Evas_Object *obj, Edje_External_Param *param); /**< dynamically fetch a parameter of this external, called by scripts and user code. Returns @c EINA_TRUE on success. (Must check parameter name and type!) */
1001 Evas_Object *(*content_get) (void *data, const Evas_Object *obj, const char *content); /**< dynamically fetch a sub object of this external, called by scripts and user code. Returns @c Evas_Object * on success. (Must check parameter name and type!) */
1002 void *(*params_parse) (void *data, Evas_Object *obj, const Eina_List *params); /**< parses the list of parameters, converting into a friendly representation. Used with state_set() */
1003 void (*params_free) (void *params); /**< free parameters parsed with params_parse() */
1005 /* The following callbacks aren't used by Edje itself, but by UI design
1007 const char *(*label_get) (void *data);
1008 const char *(*description_get) (void *data);
1009 Evas_Object *(*icon_add) (void *data, Evas *e);
1010 Evas_Object *(*preview_add) (void *data, Evas *e);
1011 const char *(*translate) (void *data, const char *orig); /**< called to translate parameters_info name properties for use in user interfaces that support internationalization (i18n) */
1013 Edje_External_Param_Info *parameters_info;
1016 typedef struct _Edje_External_Type Edje_External_Type;
1018 struct _Edje_External_Type_Info
1021 const Edje_External_Type *info;
1023 typedef struct _Edje_External_Type_Info Edje_External_Type_Info;
1025 typedef void (*Edje_Signal_Cb) (void *data, Evas_Object *obj, const char *emission, const char *source);
1026 typedef void (*Edje_Text_Change_Cb) (void *data, Evas_Object *obj, const char *part);
1027 typedef void (*Edje_Message_Handler_Cb) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg);
1028 typedef void (*Edje_Text_Filter_Cb) (void *data, Evas_Object *obj, const char *part, Edje_Text_Filter_Type type, char **text);
1029 typedef Evas_Object *(*Edje_Item_Provider_Cb) (void *data, Evas_Object *obj, const char *part, const char *item);
1032 * @brief Initialize the edje library.
1034 * @return The new init count. The initial value is zero.
1036 * This function initializes the ejde library, making the propers
1037 * calls to initialization functions. It makes calls to functions
1038 * eina_init(), ecore_init(), embryo_init() and eet_init() so
1039 * there is no need to call those functions again in your code. To
1040 * shutdown edje there is a function edje_shutdown().
1042 * @see edje_shutdown()
1045 * @see embryo_init()
1049 EAPI int edje_init (void);
1052 * @brief Shutdown the edje library.
1054 * @return The number of times the library has been initialised without being
1057 * This function shuts down the edje library. It calls the functions
1058 * eina_shutdown(), ecore_shutdown(), embryo_shutdown() and
1059 * eet_shutdown(), so there is no need to call these functions again
1063 * @see eina_shutdown()
1064 * @see ecore_shutdown()
1065 * @see embryo_shutdown()
1066 * @see eet_shutdown()
1069 EAPI int edje_shutdown (void);
1072 * @brief Set edje trasitions' frame time.
1074 * @param t The frame time, in seconds. Default value is 1/30.
1076 * This function sets the edje built-in animations' frame time (thus,
1077 * affecting their resolution) by calling
1078 * ecore_animator_frametime_set(). This frame time can be retrieved
1079 * with edje_frametime_get().
1081 * @see edje_frametime_get()
1084 EAPI void edje_frametime_set (double t);
1087 * @brief Get edje trasitions' frame time.
1089 * @return The frame time, in seconds.
1091 * This function returns the edje frame time set by
1092 * edje_frametime_set().
1094 * @see edje_frametime_set()
1097 EAPI double edje_frametime_get (void);
1100 * @brief Freeze Edje objects.
1102 * This function freezes every edje objects in the current process.
1104 * See edje_object_freeze().
1107 EAPI void edje_freeze (void);
1110 * @brief Thaw edje objects.
1112 * This function thaw all edje object in the current process.
1114 * See edje_object_thaw().
1117 EAPI void edje_thaw (void);
1120 * @brief Set the edje append fontset.
1122 * @param fonts The fontset to append.
1124 * This function sets the edje append fontset.
1127 EAPI void edje_fontset_append_set (const char *fonts);
1130 * @brief Get the edje append fontset.
1132 * @return The edje append fontset.
1134 * This function returns the edje append fontset set by
1135 * edje_fontset_append_set() function.
1137 * @see edje_fontset_append_set().
1140 EAPI const char *edje_fontset_append_get (void);
1143 * @brief Set edje's global scaling factor.
1145 * @param scale The edje (global) scale factor. The defaul is 1.0.
1147 * Edje allows one to build scalable interfaces. Scale factors, which
1148 * are set to neutral values by default (no scaling, actual sizes),
1149 * are of two types: global and individual. Edje's global scaling
1150 * factor will affect all its objects which hadn't their individual
1151 * scaling factors altered from the default value. If they had it set
1152 * differently, that factor will override the global one.
1154 * Scaling affects the values of min/max object sizes, which are
1155 * multiplied by it. Font sizes are scaled, too.
1157 * This property can be retrieved with edje_scale_get().
1159 * @see edje_scale_get().
1162 EAPI void edje_scale_set (double scale);
1165 * @brief Get edje's global scaling factor.
1167 * @return The edje (global) scale factor. The defaul is 1.0.
1169 * This function returns edje's global scale factor, which can be set
1170 * by edje_scale_set().
1172 * @see edje_scale_set().
1175 EAPI double edje_scale_get (void);
1178 * @brief Set the edje object's scaling factor.
1180 * @param obj The edje object's reference.
1181 * @param scale The edje object scale factor. The defaul is 1.0.
1183 * This function sets the individual scale factor of the @a obj edje
1184 * object. This property (or edje's global scale factor, when
1185 * applicable), will affect this object's parts. However, only parts
1186 * which, at the EDC language level, were declared which the "scale"
1187 * attribute set to 1 (default is zero) will be affected.
1189 * This scale factor can be retrieved with edje_object_scale_get().
1190 * @see edje_object_scale_get().
1193 EAPI Eina_Bool edje_object_scale_set (Evas_Object *obj, double scale);
1196 * @brief Get the edje object's scaling factor.
1198 * @param obj The edje object's reference.
1200 * This function returns the individual scale factor of the @a obj
1201 * edje object, which can be set by edje_object_scale_set().
1203 * @see edje_object_scale_set().
1206 EAPI double edje_object_scale_get (const Evas_Object *obj);
1209 * Set the RTL orientation for this object.
1211 * @param obj the smart object
1212 * @rtl new value of flag EINA_TRUE/EINA_FALSE
1215 EAPI void edje_object_mirrored_set (Evas_Object *obj, Eina_Bool rtl);
1218 * Get the RTL orientation for this object.
1220 * You can RTL orientation explicitly with edje_object_mirrored_set.
1222 * @param obj the smart object
1223 * @return if flag is set or not.
1226 EAPI Eina_Bool edje_object_mirrored_get (const Evas_Object *obj);
1229 * Get a list of groups in an edje file
1230 * @param file The path to the edje file
1232 * @return The Eina_List of group names (char *)
1234 * Note: the list must be freed using edje_file_collection_list_free()
1235 * when you are done with it.
1237 EAPI Eina_List *edje_file_collection_list (const char *file);
1240 * Free file collection list
1241 * @param lst The Eina_List of groups
1243 * Frees the list returned by edje_file_collection_list().
1245 EAPI void edje_file_collection_list_free (Eina_List *lst);
1248 * Determine whether a group matching glob exists in an edje file.
1249 * @param file The file path
1250 * @param glob A glob to match on
1252 * @return 1 if a match is found, 0 otherwise
1254 EAPI Eina_Bool edje_file_group_exists (const char *file, const char *glob);
1257 * Get data from the file level data block of an edje file
1258 * @param file The path to the .edj file
1259 * @param key The data key
1260 * @return The string value of the data
1262 * If an edje file is built from the following edc:
1265 * item: "key1" "value1";
1266 * item: "key2" "value2";
1268 * collections { ... }
1270 * Then, edje_file_data_get("key1") will return "value1"
1272 EAPI char *edje_file_data_get (const char *file, const char *key);
1275 * @brief Set the file cache size.
1277 * @param count The file cache size in edje file units. Default is 16.
1279 * This function sets the file cache size. Edje keeps this cache in
1280 * order to prevent duplicates of edje file entries in memory. The
1281 * file cache size can be retrieved with edje_file_cache_get().
1283 * @see edje_file_cache_get()
1284 * @see edje_file_cache_flush()
1287 EAPI void edje_file_cache_set (int count);
1290 * @brief Return the file cache size.
1292 * @return The file cache size in edje file units. Default is 16.
1294 * This function returns the file cache size set by
1295 * edje_file_cache_set().
1297 * @see edje_file_cache_set()
1298 * @see edje_file_cache_flush()
1301 EAPI int edje_file_cache_get (void);
1304 * @brief Clean the file cache.
1306 * This function cleans the file cache entries, but keeps this cache's
1307 * size to the last value set.
1309 * @see edje_file_cache_set()
1310 * @see edje_file_cache_get()
1313 EAPI void edje_file_cache_flush (void);
1316 * @brief Set the collection cache size.
1318 * @param count The collection cache size, in edje object units. Default is 16.
1320 * This function sets the collection cache size. Edje keeps this cache
1321 * in order to prevent duplicates of edje {collection,group,part}
1322 * entries in memory. The collection cache size can be retrieved with
1323 * edje_collection_cache_get().
1325 * @see edje_collection_cache_get()
1326 * @see edje_collection_cache_flush()
1329 EAPI void edje_collection_cache_set (int count);
1332 * @brief Return the collection cache size.
1334 * @return The collection cache size, in edje object units. Default is 16.
1336 * This function returns the collection cache size set by
1337 * edje_collection_cache_set().
1339 * @see edje_collection_cache_set()
1340 * @see edje_collection_cache_flush()
1343 EAPI int edje_collection_cache_get (void);
1346 * @brief Clean the collection cache.
1348 * This function cleans the collection cache, but keeps this cache's
1349 * size to the last value set.
1351 * @see edje_collection_cache_set()
1352 * @see edje_collection_cache_get()
1355 EAPI void edje_collection_cache_flush (void);
1358 * @brief Set Edje color class.
1360 * @param color_class
1361 * @param r Object Red value
1362 * @param g Object Green value
1363 * @param b Object Blue value
1364 * @param a Object Alpha value
1365 * @param r2 Outline Red value
1366 * @param g2 Outline Green value
1367 * @param b2 Outline Blue value
1368 * @param a2 Outline Alpha value
1369 * @param r3 Shadow Red value
1370 * @param g3 Shadow Green value
1371 * @param b3 Shadow Blue value
1372 * @param a3 Shadow Alpha value
1374 * This function sets the color values for a process level color
1375 * class. This will cause all edje parts in the current process that
1376 * have the specified color class to have their colors multiplied by
1377 * these values. (Object level color classes set by
1378 * edje_object_color_class_set() will override the values set by this
1381 * The first color is the object, the second is the text outline, and
1382 * the third is the text shadow. (Note that the second two only apply
1385 * Setting color emits a signal "color_class,set" with source being
1386 * the given color class in all objects.
1388 * @see edje_color_class_set().
1390 * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1391 * half-transparent white is 255 255 255 128.
1393 EAPI Eina_Bool edje_color_class_set (const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
1396 * @brief Get Edje color class.
1398 * @param color_class
1399 * @param r Object Red value
1400 * @param g Object Green value
1401 * @param b Object Blue value
1402 * @param a Object Alpha value
1403 * @param r2 Outline Red value
1404 * @param g2 Outline Green value
1405 * @param b2 Outline Blue value
1406 * @param a2 Outline Alpha value
1407 * @param r3 Shadow Red value
1408 * @param g3 Shadow Green value
1409 * @param b3 Shadow Blue value
1410 * @param a3 Shadow Alpha value
1412 * @return EINA_TRUE if found or EINA_FALSE if not found and all
1413 * values are zeroed.
1415 * This function gets the color values for a process level color
1416 * class. This value is the globally set and not per-object, that is,
1417 * the value that would be used by objects if they did not override with
1418 * edje_object_color_class_set().
1420 * The first color is the object, the second is the text outline, and
1421 * the third is the text shadow. (Note that the second two only apply
1424 * @see edje_color_class_set().
1426 * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1427 * half-transparent white is 255 255 255 128.
1429 EAPI Eina_Bool edje_color_class_get (const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3);
1430 EAPI void edje_color_class_del (const char *color_class);
1431 EAPI Eina_List *edje_color_class_list (void);
1434 * @brief Set the Edje text class.
1436 * @param text_class The text class name
1437 * @param font The font name
1438 * @param size The font size
1440 * This function sets updates all edje members which belong to this
1441 * text class with the new font attributes.
1443 * @see edje_text_class_get().
1448 * @brief Delete the object color class.
1450 * @param obj The edje object's reference.
1451 * @param color_class The color class to be deleted.
1453 * This function deletes any values at the object level for the
1454 * specified object and color class.
1456 * Deleting color emits a signal "color_class,del" with source being
1459 EAPI Eina_Bool edje_text_class_set (const char *text_class, const char *font, Evas_Font_Size size);
1460 EAPI void edje_text_class_del (const char *text_class);
1461 EAPI Eina_List *edje_text_class_list (void);
1464 * @brief Set the object minimum size.
1466 * @param obj A valid Evas_Object handle
1467 * @param minw The minimum width
1468 * @param minh The minimum height
1470 * This sets the minimum size restriction for the object.
1472 EAPI void edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
1475 * @brief Set the object maximum size.
1477 * @param obj A valid Evas_Object handle
1478 * @param maxw The maximum width
1479 * @param maxh The maximum height
1481 * This sets the maximum size restriction for the object.
1483 EAPI void edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh);
1486 * @brief Set the object aspect size.
1488 * @param obj A valid Evas_Object handle
1489 * @param aspect The aspect control axes
1490 * @param aw The aspect radio width
1491 * @param ah The aspect ratio height
1493 * This sets the desired aspect ratio to keep an object that will be
1494 * swallowed by Edje. The width and height define a preferred size
1495 * ASPECT and the object may be scaled to be larger or smaller, but
1496 * retaining the relative scale of both aspect width and height.
1498 EAPI void edje_extern_object_aspect_set (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah);
1501 * @brief Registers a custom layout to be used in edje boxes.
1503 * @param name The name of the layout
1504 * @param func The function defining the layout
1505 * @param layout_data_get This function gets the custom data pointer
1507 * @param layout_data_free Passed to func to free its private data
1509 * @param free_data Frees data
1510 * @param data Private pointer passed to layout_data_get
1512 * This function registers custom layouts that can be referred from
1513 * themes by the registered name. The Evas_Object_Box_Layout
1514 * functions receive two pointers for internal use, one being private
1515 * data, and the other the function to free that data when it's not
1516 * longer needed. From Edje, this private data will be retrieved by
1517 * calling layout_data_get, and layout_data_free will be the free
1518 * function passed to func. layout_data_get will be called with data
1519 * as its parameter, and this one will be freed by free_data whenever
1520 * the layout is unregistered from Edje.
1522 EAPI void edje_box_layout_register (const char *name, Evas_Object_Box_Layout func, void *(*layout_data_get)(void *), void (*layout_data_free)(void *), void (*free_data)(void *), void *data);
1525 * Constructs the Edje object
1526 * @param evas A valid Evas handle
1527 * @return The Evas_Object pointer.
1529 * Creates the Edje smart object, returning the Evas_Object handle.
1531 EAPI Evas_Object *edje_object_add (Evas *evas);
1534 * @brief Get Edje object data.
1536 * @param obj A valid Evas_Object handle
1537 * @param key The data key
1538 * @return The data string
1540 * This function fetches data specified at the object level.
1542 * In EDC this comes from a data block within the group block that @a
1543 * obj was loaded from. E.g.
1550 * item: "key1" "value1";
1551 * item: "key2" "value2";
1557 EAPI const char *edje_object_data_get (const Evas_Object *obj, const char *key);
1560 * Sets the EET file and group to load @a obj from
1561 * @param obj A valid Evas_Object handle
1562 * @param file The path to the EET file
1563 * @param group The group name in the Edje
1564 * @return 0 on Error\n
1565 * 1 on Success and sets EDJE_LOAD_ERROR_NONE
1567 * Edje uses EET files, conventionally ending in .edj, to store object
1568 * descriptions. A single file contains multiple named groups. This function
1569 * specifies the file and group name to load @a obj from.
1571 EAPI Eina_Bool edje_object_file_set (Evas_Object *obj, const char *file, const char *group);
1574 * Get the file and group name that @a obj was loaded from
1575 * @param obj A valid Evas_Object handle
1576 * @param file A pointer to store a pointer to the filename in
1577 * @param group A pointer to store a pointer to the group name in
1579 * This gets the EET file location and group for the given Evas_Object.
1580 * If @a obj is either not an edje file, or has not had its file/group set
1581 * using edje_object_file_set(), then both @a file and @a group will be set
1584 * It is valid to pass in NULL for either @a file or @a group if you are not
1585 * interested in one of the values.
1587 EAPI void edje_object_file_get (const Evas_Object *obj, const char **file, const char **group);
1590 * Gets the Edje load error
1591 * @param obj A valid Evas_Object handle
1593 * @return The Edje load error:\n
1594 * EDJE_LOAD_ERROR_NONE: No Error\n
1595 * EDJE_LOAD_ERROR_GENERIC: Generic Error\n
1596 * EDJE_LOAD_ERROR_DOES_NOT_EXIST: Does not Exist\n
1597 * EDJE_LOAD_ERROR_PERMISSION_DENIED: Permission Denied\n
1598 * EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED: Resource Allocation Failed\n
1599 * EDJE_LOAD_ERROR_CORRUPT_FILE: Corrupt File\n
1600 * EDJE_LOAD_ERROR_UNKNOWN_FORMAT: Unknown Format\n
1601 * EDJE_LOAD_ERROR_INCOMPATIBLE_FILE: Incompatible File\n
1602 * EDJE_LOAD_ERROR_UNKNOWN_COLLECTION: Unknown Collection\n
1603 * EDJE_LOAD_ERROR_RECURSIVE_REFERENCE: Recursive Reference\n
1605 EAPI Edje_Load_Error edje_object_load_error_get (const Evas_Object *obj);
1607 EAPI const char *edje_load_error_str (Edje_Load_Error error);
1608 EAPI Eina_Bool edje_object_preload (Evas_Object *obj, Eina_Bool cancel);
1611 * @brief Add a callback for a signal emitted by @a obj.
1613 * @param obj A valid Evas_Object handle.
1614 * @param emission The signal's name.
1615 * @param source The signal's source.
1616 * @param func The callback function to be executed when the signal is
1618 * @param data A pointer to data to pass in to the callback function.
1620 * Connects a callback function to a signal emitted by @a obj.
1621 * In EDC, a program can emit a signal as follows:
1625 * name: "emit_example";
1626 * action: SIGNAL_EMIT "a_signal" "a_source";
1630 * Assuming a function with the following declaration is definded:
1633 * void cb_signal(void *data, Evas_Object *o, const char *emission, const char *source);
1636 * a callback is attached using:
1639 * edje_object_signal_callback_add(obj, "a_signal", "a_source", cb_signal, data);
1642 * Here, @a data is an arbitrary pointer to be used as desired. Note
1643 * that @a emission and @a source correspond respectively to the first
1644 * and the second parameters at the SIGNAL_EMIT action.
1646 * Internal edje signals can also be attached to, and globs can occur
1647 * in either the emission or source name, e.g.
1650 * edje_object_signal_callback_add(obj, "mouse,down,*", "button.*", NULL);
1653 * Here, any mouse down events on an edje part whose name begins with
1654 * "button." will trigger the callback. The actual signal and source
1655 * names will be passed in to the @a emission and @a source parameters
1656 * of the callback function (e.g. "mouse,down,2" and "button.close").
1658 EAPI void edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
1661 * @brief Remove a signal-triggered callback from an object.
1663 * @param obj A valid Evas_Object handle.
1664 * @param emission The emission string.
1665 * @param source The source string.
1666 * @param func The callback function.
1667 * @return The data pointer
1669 * This function removes a callback, previously attached to the
1670 * emittion of a signal, from the object @a obj. The parameters @a
1671 * emission, @a source and @a func must match exactly those passed to
1672 * a previous call to edje_object_signal_callback_add(). The data
1673 * pointer that was passed to this call will be returned.
1675 * @see edje_object_signal_callback_add().
1676 * @see edje_object_signal_callback_del_full().
1679 EAPI void *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func);
1682 * @brief Remove a signal-triggered callback from an object.
1684 * @param obj A valid Evas_Object handle.
1685 * @param emission The emission string.
1686 * @param source The source string.
1687 * @param func The callback function.
1688 * @param data The user data passed to the callback.
1689 * @return The data pointer
1691 * This function removes a callback, previously attached to the
1692 * emittion of a signal, from the object @a obj. The parameters @a
1693 * emission, @a sourcei, @a func and @a data must match exactly those
1694 * passed to a previous call to edje_object_signal_callback_add(). The data
1695 * pointer that was passed to this call will be returned.
1697 * @see edje_object_signal_callback_add().
1698 * @see edje_object_signal_callback_del().
1701 EAPI void *edje_object_signal_callback_del_full(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
1704 * @brief Send a signal to an edje object.
1706 * @param obj A valid Evas_Object handle.
1707 * @param emission The signal's name.
1708 * @param source The signal's source.
1710 * This function sends a signal to the object @a obj. An edje program
1711 * can respond to a signal by specifying matching 'signal' and
1715 * edje_object_signal_emit(obj, "a_signal", "");
1718 * will trigger a program whose EDC block is:
1722 * name: "a_program";
1723 * signal: "a_signal";
1729 * FIXME: should this signal be sent to children also?
1731 EAPI void edje_object_signal_emit (Evas_Object *obj, const char *emission, const char *source);
1734 * @brief Set the edje object to playing or paused states.
1736 * @param obj A valid Evas_Object handle.
1737 * @param play Object state (1 to playing, 0 to pauseed).
1739 * This function sets the edje object @a obj to playing or paused
1740 * states, depending on the parameter @a play. This has no effect if
1741 * the object was already at that state.
1743 * @see edje_object_play_get().
1746 EAPI void edje_object_play_set (Evas_Object *obj, Eina_Bool play);
1749 * @brief Get the edje object's play/pause state.
1751 * @param obj A valid Evas_Object handle.
1752 * @return @c EINA_FALSE if the object is not connected, its @c delete_me flag
1753 * is set, or it is at paused state; @c EINA_TRUE if the object is at playing
1756 * This function tells if an edje object is playing or not. This state
1757 * is set by edje_object_play_set().
1759 * @see edje_object_play_set().
1762 EAPI Eina_Bool edje_object_play_get (const Evas_Object *obj);
1765 * @brief Set the object's animation state.
1767 * @param obj A valid Evas_Object handle.
1768 * @param on Animation State.
1770 * This function starts or stops an edje object's animation. The
1771 * information if it's runnig can be retrieved by
1772 * edje_object_animation_get().
1774 * @see edje_object_animation_get()
1777 EAPI void edje_object_animation_set (Evas_Object *obj, Eina_Bool on);
1780 * @brief Get the edje object's animation state.
1782 * @param obj A valid Evas_Object handle.
1783 * @return @c EINA_FALSE on error or if object is not animated;
1784 * @c EINA_TRUE if animated.
1786 * This function returns if the animation is playing or not. The
1787 * animation state is set by edje_object_play_set().
1789 * @see edje_object_animation_set().
1792 EAPI Eina_Bool edje_object_animation_get (const Evas_Object *obj);
1795 * @brief Freeze object.
1797 * @param obj A valid Evas_Object handle
1798 * @return The frozen state or 0 on Error
1800 * This function puts all changes on hold. Successive freezes will
1801 * nest, requiring an equal number of thaws.
1804 EAPI int edje_object_freeze (Evas_Object *obj);
1807 * @brief Thaw object.
1809 * @param obj A valid Evas_Object handle
1810 * @return The frozen state or 0 on Error
1812 * This allows frozen changes to occur.
1815 EAPI int edje_object_thaw (Evas_Object *obj);
1818 * @brief Sets the object color class.
1820 * @param obj A valid Evas_Object handle
1821 * @param color_class
1822 * @param r Object Red value
1823 * @param g Object Green value
1824 * @param b Object Blue value
1825 * @param a Object Alpha value
1826 * @param r2 Outline Red value
1827 * @param g2 Outline Green value
1828 * @param b2 Outline Blue value
1829 * @param a2 Outline Alpha value
1830 * @param r3 Shadow Red value
1831 * @param g3 Shadow Green value
1832 * @param b3 Shadow Blue value
1833 * @param a3 Shadow Alpha value
1835 * This function sets the color values for an object level color
1836 * class. This will cause all edje parts in the specified object that
1837 * have the specified color class to have their colors multiplied by
1840 * The first color is the object, the second is the text outline, and
1841 * the third is the text shadow. (Note that the second two only apply
1844 * Setting color emits a signal "color_class,set" with source being
1847 * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1848 * half-transparent white is 255 255 255 128.
1852 * @brief Lists color classes.
1854 * @return A list of color class names (strings). These strings and
1855 * the list must be free()'d by the caller.
1857 * This function lists all color classes known about by the current
1863 * @brief Delete edje color class.
1865 * @param color_class
1867 * This function deletes any values at the process level for the
1868 * specified color class.
1870 * Deleting color emits a signal "color_class,del" with source being
1871 * the given color class in all objects.
1873 EAPI Eina_Bool edje_object_color_class_set (Evas_Object *obj, const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
1876 * @brief Gets the object color class.
1878 * @param obj A valid Evas_Object handle
1879 * @param color_class
1880 * @param r Object Red value
1881 * @param g Object Green value
1882 * @param b Object Blue value
1883 * @param a Object Alpha value
1884 * @param r2 Outline Red value
1885 * @param g2 Outline Green value
1886 * @param b2 Outline Blue value
1887 * @param a2 Outline Alpha value
1888 * @param r3 Shadow Red value
1889 * @param g3 Shadow Green value
1890 * @param b3 Shadow Blue value
1891 * @param a3 Shadow Alpha value
1893 * @return EINA_TRUE if found or EINA_FALSE if not found and all
1894 * values are zeroed.
1896 * This function gets the color values for an object level color
1897 * class. If no explicit object color is set, then global values will
1900 * The first color is the object, the second is the text outline, and
1901 * the third is the text shadow. (Note that the second two only apply
1904 * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1905 * half-transparent white is 255 255 255 128.
1907 EAPI Eina_Bool edje_object_color_class_get (const Evas_Object *o, const char *color_class, int *r, int *g, int *b, int *a, int *r2, int *g2, int *b2, int *a2, int *r3, int *g3, int *b3, int *a3);
1908 EAPI void edje_object_color_class_del (Evas_Object *obj, const char *color_class);
1911 * @brief Sets Edje text class.
1913 * @param obj A valid Evas_Object handle
1914 * @param text_class The text class name
1915 * @param font Font name
1916 * @param size Font Size
1918 * This function sets the text class for the Edje.
1923 * @brief List text classes.
1925 * @return A list of text class names (strings). These strings are
1926 * stringshares and the list must be free()'d by the caller.
1928 * This function lists all text classes known about by the current
1934 * @brief Delete the text class.
1936 * @param text_class The text class name string
1938 * This function deletes any values at the process level for the
1939 * specified text class.
1942 EAPI Eina_Bool edje_object_text_class_set (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size);
1945 * @brief Get the minimum size for an object.
1947 * @param obj A valid Evas_Object handle
1948 * @param minw Minimum width pointer
1949 * @param minh Minimum height pointer
1951 * Gets the object's minimum size values from the Edje. These are set
1952 * to zero if no Edje is connected to the Evas Object.
1954 EAPI void edje_object_size_min_get (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
1957 * @brief Get the maximum size for an object.
1959 * @param obj A valid Evas_Object handle
1960 * @param maxw Maximum width pointer
1961 * @param maxh Maximum height pointer
1963 * Gets the object's maximum size values from the Edje. These are set
1964 * to zero if no Edje is connected to the Evas Object.
1966 EAPI void edje_object_size_max_get (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
1969 * @brief Force a Size/Geometry calculation.
1971 * @param obj A valid Evas_Object handle
1973 * Forces the object @p obj to recalculation layout regardless of
1976 EAPI void edje_object_calc_force (Evas_Object *obj);
1979 * @brief Calculate minimum size.
1981 * @param obj A valid Evas_Object handle
1982 * @param minw Minimum width pointer
1983 * @param minh Minimum height pointer
1985 * Calculates the object's minimum size ?!
1987 EAPI void edje_object_size_min_calc (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
1988 EAPI Eina_Bool edje_object_parts_extends_calc (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
1989 EAPI void edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh);
1992 * @brief Check if Edje part exists.
1994 * @param obj A valid Evas_Object handle
1995 * @param part The part name to check
1997 * @return 0 on Error, 1 if Edje part exists.
1999 * This function returns if a part exists in the edje.
2002 EAPI Eina_Bool edje_object_part_exists (const Evas_Object *obj, const char *part);
2005 * @brief Gets the evas object from a part.
2007 * @param obj A valid Evas_Object handle
2008 * @param part The Edje part
2009 * @return Returns the Evas_Object corresponding to the given part, or
2010 * NULL on failure (if the part doesn't exist)
2012 * This functio gets the Evas_Object corresponding to a given part.
2014 * You should never modify the state of the returned object (with
2015 * evas_object_move() or evas_object_hide() for example), but you can
2016 * safely query info about its current state (with
2017 * evas_object_visible_get() or evas_object_color_get() for example)
2020 EAPI const Evas_Object *edje_object_part_object_get (const Evas_Object *obj, const char *part);
2023 * @brief Get the geometry of an Edje part.
2025 * @param obj A valid Evas_Object handle
2026 * @param part The Edje part
2027 * @param x The x coordinate pointer
2028 * @param y The y coordinate pointer
2029 * @param w The width pointer
2030 * @param h The height pointer
2032 * This function gets the geometry of an Edje part.
2034 * It is valid to pass NULL as any of @a x, @a y, @a w or @a h, whose
2035 * values you are uninterested in.
2037 EAPI Eina_Bool edje_object_part_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
2041 * @brief Set the function that provides item objects for named items in an edje entry text
2043 * @param obj A valid Evas Object handle
2044 * @param func The function to call (or NULL to disable) to get item objects
2045 * @param data The data pointer to pass to the @p func callback
2047 * Item objects may be deleted any time by Edje, and will be deleted when the
2048 * Edje object is deleted (or file is set to a new file).
2050 EAPI void edje_object_item_provider_set (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data);
2054 * @brief Set the object text callback.
2056 * @param obj A valid Evas_Object handle
2057 * @param func The callback function to handle the text change
2058 * @param data The data associated to the callback function.
2060 * This function gets the geometry of an Edje part
2062 * It is valid to pass NULL as any of @a x, @a y, @a w or @a h, whose
2063 * values you are uninterested in.
2066 EAPI void edje_object_text_change_cb_set (Evas_Object *obj, Edje_Text_Change_Cb func, void *data);
2069 * Sets the text for an object part
2070 * @param obj A valid Evas Object handle
2071 * @param part The part name
2072 * @param text The text string
2074 EAPI Eina_Bool edje_object_part_text_set (Evas_Object *obj, const char *part, const char *text);
2077 * @brief Return the text of the object part.
2079 * @param obj A valid Evas_Object handle
2080 * @param part The part name
2082 * @return The text string
2084 * This function returns the text associated to the object part.
2087 EAPI const char *edje_object_part_text_get (const Evas_Object *obj, const char *part);
2090 * @brief Sets the raw (non escaped) text for an object part.
2092 * @param obj A valid Evas Object handle
2093 * @param part The part name
2094 * @param text_to_escape The text string
2096 * This funciton will do escape for you if it is a TEXTBLOCK part,
2097 * that is, if text contain tags, these tags will not be
2098 * interpreted/parsed by TEXTBLOCK.
2100 * @see edje_object_part_text_unescaped_get().
2103 EAPI Eina_Bool edje_object_part_text_unescaped_set (Evas_Object *obj, const char *part, const char *text_to_escape);
2106 * @brief Returns the text of the object part, without escaping.
2108 * @param obj A valid Evas_Object handle
2109 * @param part The part name
2110 * @return The @b allocated text string without escaping, or NULL on
2113 * This function is the counterpart of
2114 * edje_object_part_text_unescaped_set(). Please notice that the
2115 * result is newly allocated memory and should be released with free()
2118 * @see edje_object_part_text_unescaped_set().
2121 EAPI char *edje_object_part_text_unescaped_get (const Evas_Object *obj, const char *part);
2124 * @brief Return the selection text of the object part.
2126 * @param obj A valid Evas_Object handle
2127 * @param part The part name
2128 * @return The text string
2130 * This function returns selection text of the object part.
2133 EAPI const char *edje_object_part_text_selection_get (const Evas_Object *obj, const char *part);
2136 * @brief Set the selection to be none.
2138 * @param obj A valid Evas_Object handle
2139 * @param part The part name
2141 * This function sets the selection text to be none.
2144 EAPI void edje_object_part_text_select_none (const Evas_Object *obj, const char *part);
2147 * @brief Set the selection to be everything.
2149 * @param obj A valid Evas_Object handle
2150 * @param part The part name
2152 * This function selects all text of the object of the part.
2155 EAPI void edje_object_part_text_select_all (const Evas_Object *obj, const char *part);
2158 * @brief Insert text for an object part.
2160 * @param obj A valid Evas Object handle
2161 * @param part The part name
2162 * @param text The text string
2164 * This function inserts the text for an object part just before the
2168 EAPI void edje_object_part_text_insert (Evas_Object *obj, const char *part, const char *text);
2171 * @brief Insert text for an object part.
2173 * @param obj A valid Evas Object handle
2174 * @param part The part name
2175 * @param text The text string
2177 * This function inserts the text for an object part at the end; It does not
2182 EAPI void edje_object_part_text_append(Evas_Object *obj, const char *part, const char *text);
2185 * @brief Return a list of char anchor names.
2187 * @param obj A valid Evas_Object handle
2188 * @param part The part name
2190 * @return The list of anchors (const char *), do not modify!
2192 * This function returns a list of char anchor names.
2195 EAPI const Eina_List *edje_object_part_text_anchor_list_get (const Evas_Object *obj, const char *part);
2198 * @brief Return a list of Evas_Textblock_Rectangle anchor rectangles.
2200 * @param obj A valid Evas_Object handle
2201 * @param part The part name
2202 * @param anchor The anchor name
2204 * @return The list of anchor rects (const Evas_Textblock_Rectangle
2205 * *), do not modify! Geometry is relative to entry part.
2207 * This function return a list of Evas_Textblock_Rectangle anchor
2211 EAPI const Eina_List *edje_object_part_text_anchor_geometry_get (const Evas_Object *obj, const char *part, const char *anchor);
2214 * @brief Return a list of char item names.
2216 * @param obj A valid Evas_Object handle
2217 * @param part The part name
2219 * @return The list of items (const char *), do not modify!
2221 * This function returns a list of char item names.
2224 EAPI const Eina_List *edje_object_part_text_item_list_get (const Evas_Object *obj, const char *part);
2227 * @brief Return item geometry.
2229 * @param obj A valid Evas_Object handle
2230 * @param part The part name
2231 * @param item The item name
2232 * @param cx Item x return (relative to entry part)
2233 * @param cy Item y return (relative to entry part)
2234 * @param cw Item width return
2235 * @param ch Item height return
2237 * @return 1 if item exists, 0 if not
2239 * This function return a list of Evas_Textblock_Rectangle item
2243 EAPI Eina_Bool edje_object_part_text_item_geometry_get (const Evas_Object *obj, const char *part, const char *item, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
2246 * @brief Returns the cursor geometry of the part relative to the edje
2249 * @param obj A valid Evas_Object handle
2250 * @param part The part name
2251 * @param x Cursor X position
2252 * @param y Cursor Y position
2253 * @param w Cursor width
2254 * @param h Cursor height
2257 EAPI void edje_object_part_text_cursor_geometry_get (const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
2260 * @brief Enables selection if the entry is an EXPLICIT selection mode
2263 * @param obj A valid Evas_Object handle
2264 * @param part The part name
2265 * @param allow EINA_TRUE to enable, EINA_FALSE otherwise
2267 EAPI void edje_object_part_text_select_allow_set (const Evas_Object *obj, const char *part, Eina_Bool allow);
2270 * @brief Aborts any selection action on a part.
2272 * @param obj A valid Evas_Object handle
2273 * @param part The part name
2275 EAPI void edje_object_part_text_select_abort (const Evas_Object *obj, const char *part);
2278 * @brief Starts selecting at current cursor position
2280 * @param obj A valid Evas_Object handle
2281 * @param part The part name
2283 EAPI void edje_object_part_text_select_begin (const Evas_Object *obj, const char *part);
2286 * @brief Extends the current selection to the current cursor position
2288 * @param obj A valid Evas_Object handle
2289 * @param part The part name
2291 EAPI void edje_object_part_text_select_extend (const Evas_Object *obj, const char *part);
2295 * @brief Advances the cursor to the next cursor position.
2296 * @see evas_textblock_cursor_char_next
2298 * @param obj A valid Evas_Object handle
2299 * @param part The part name
2300 * @param cur The edje cursor to advance
2302 EAPI Eina_Bool edje_object_part_text_cursor_next (Evas_Object *obj, const char *part, Edje_Cursor cur);
2305 * @brief Moves the cursor to the previous char
2306 * @see evas_textblock_cursor_char_prev
2308 * @param obj A valid Evas_Object handle
2309 * @param part The part name
2310 * @param cur the edje cursor to work on
2312 EAPI Eina_Bool edje_object_part_text_cursor_prev (Evas_Object *obj, const char *part, Edje_Cursor cur);
2315 * @brief Move the cursor to the char above the current cursor position.
2317 * @param obj A valid Evas_Object handle
2318 * @param part The part name
2319 * @param cur the edje cursor to work on
2321 EAPI Eina_Bool edje_object_part_text_cursor_up (Evas_Object *obj, const char *part, Edje_Cursor cur);
2324 * @brief Moves the cursor to the char below the current cursor position.
2326 * @param obj A valid Evas_Object handle
2327 * @param part The part name
2328 * @param cur the edje cursor to work on
2330 EAPI Eina_Bool edje_object_part_text_cursor_down (Evas_Object *obj, const char *part, Edje_Cursor cur);
2333 * @brief Moves the cursor to the beginning of the text part
2334 * @see evas_textblock_cursor_paragraph_first
2336 * @param obj A valid Evas_Object handle
2337 * @param part The part name
2338 * @param cur the edje cursor to work on
2340 EAPI void edje_object_part_text_cursor_begin_set (Evas_Object *obj, const char *part, Edje_Cursor cur);
2343 * @brief Moves the cursor to the end of the text part.
2344 * @see evas_textblock_cursor_paragraph_last
2346 * @param obj A valid Evas_Object handle
2347 * @param part The part name
2348 * @param cur the edje cursor to work on
2350 EAPI void edje_object_part_text_cursor_end_set (Evas_Object *obj, const char *part, Edje_Cursor cur);
2353 * @brief Copy the cursor to another cursor.
2355 * @param obj A valid Evas_Object handle
2356 * @param part The part name
2357 * @param sry the cursor to copy from
2358 * @param dst the cursor to copy to
2360 EAPI void edje_object_part_text_cursor_copy (Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst);
2363 * @brief Move the cursor to the beginning of the line.
2364 * @see evas_textblock_cursor_line_char_first
2366 * @param obj A valid Evas_Object handle
2367 * @param part The part name
2368 * @param cur the edje cursor to work on
2370 EAPI void edje_object_part_text_cursor_line_begin_set (Evas_Object *obj, const char *part, Edje_Cursor cur);
2373 * @brief Move the cursor to the end of the line.
2374 * @see evas_textblock_cursor_line_char_last
2376 * @param obj A valid Evas_Object handle
2377 * @param part The part name
2378 * @param cur the edje cursor to work on
2380 EAPI void edje_object_part_text_cursor_line_end_set (Evas_Object *obj, const char *part, Edje_Cursor cur);
2383 * Position the given cursor to a X,Y position.
2385 * This is frequently used with the user cursor.
2387 * @param obj An Edje object.
2388 * @param part The part containing the object.
2389 * @param cur The cursor to adjust.
2390 * @param x X Coordinate.
2391 * @param y Y Coordinate.
2392 * @return True on success, false on error.
2394 EAPI Eina_Bool edje_object_part_text_cursor_coord_set (Evas_Object *obj, const char *part, Edje_Cursor cur, Evas_Coord x, Evas_Coord y);
2397 * @brief Returns whether the cursor points to a format.
2398 * @see evas_textblock_cursor_is_format
2400 * @param obj A valid Evas_Object handle
2401 * @param part The part name
2402 * @param cur The cursor to adjust.
2403 * @return EINA_TRUE if it's true, EINA_FALSE otherwise.
2405 EAPI Eina_Bool edje_object_part_text_cursor_is_format_get (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2408 * @brief Return true if the cursor points to a visible format
2409 * For example \t, \n, item and etc.
2410 * @see evas_textblock_cursor_format_is_visible_get
2412 * @param obj A valid Evas_Object handle
2413 * @param part The part name
2414 * @param cur The cursor to adjust.
2416 EAPI Eina_Bool edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur);
2419 * @brief Returns the content (char) at the cursor position.
2420 * @see evas_textblock_cursor_content_get
2422 * @param obj A valid Evas_Object handle
2423 * @param part The part name
2424 * @param cur The cursor to use
2426 EAPI const char *edje_object_part_text_cursor_content_get (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2429 * @brief Sets the cursor position to the given value
2431 * @param obj A valid Evas_Object handle
2432 * @param part The part name
2433 * @param cur The cursor to move
2434 * @param pos the position of the cursor
2437 EAPI void edje_object_part_text_cursor_pos_set (Evas_Object *obj, const char *part, Edje_Cursor cur, int pos);
2440 * @brief Retrieves the current position of the cursor
2442 * @param obj A valid Evas_Object handle
2443 * @param part The part name
2444 * @param cur The cursor to get the position
2445 * @return The cursor position
2448 EAPI int edje_object_part_text_cursor_pos_get (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2451 * Add a filter function for newly inserted text.
2453 * Whenever text is inserted (not the same as set) into the given @p part,
2454 * the list of filter functions will be called to decide if and how the new
2455 * text will be accepted.
2456 * There are three types of filters, EDJE_TEXT_FILTER_TEXT,
2457 * EDJE_TEXT_FILTER_FORMAT and EDJE_TEXT_FILTER_MARKUP.
2458 * The text parameter in the @p func filter can be modified by the user and
2459 * it's up to him to free the one passed if he's to change the pointer. If
2460 * doing so, the newly set text should be malloc'ed, as once all the filters
2461 * are called Edje will free it.
2462 * If the text is to be rejected, freeing it and setting the pointer to NULL
2463 * will make Edje break out of the filter cycle and reject the inserted
2466 * @see edje_object_text_insert_filter_callback_del
2467 * @see edje_object_text_insert_filter_callback_del_full
2469 * @param obj A valid Evas_Object handle
2470 * @param part The part name
2471 * @param func The callback function that will act as filter
2472 * @param data User provided data to pass to the filter function
2474 EAPI void edje_object_text_insert_filter_callback_add (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data);
2477 * Delete a function from the filter list.
2479 * Delete the given @p func filter from the list in @p part. Returns
2480 * the user data pointer given when added.
2482 * @see edje_object_text_insert_filter_callback_add
2483 * @see edje_object_text_insert_filter_callback_del_full
2485 * @param obj A valid Evas_Object handle
2486 * @param part The part name
2487 * @param func The function callback to remove
2489 * @return The user data pointer if succesful, or NULL otherwise
2491 EAPI void *edje_object_text_insert_filter_callback_del (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func);
2494 * Delete a function and matching user data from the filter list.
2496 * Delete the given @p func filter and @p data user data from the list
2498 * Returns the user data pointer given when added.
2500 * @see edje_object_text_insert_filter_callback_add
2501 * @see edje_object_text_insert_filter_callback_del
2503 * @param obj A valid Evas_Object handle
2504 * @param part The part name
2505 * @param func The function callback to remove
2506 * @param data The data passed to the callback function
2508 * @return The same data pointer if succesful, or NULL otherwise
2510 EAPI void *edje_object_text_insert_filter_callback_del_full (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data);
2514 * @brief Swallows an object into the edje.
2516 * @param obj A valid Evas_Object handle
2517 * @param part The part name
2518 * @param obj_swallow The object to swallow
2520 * Swallows the object into the edje part so that all geometry changes
2521 * for the part affect the swallowed object. (e.g. resize, move, show,
2522 * raise/lower, etc.).
2524 * If an object has already been swallowed into this part, then it
2525 * will first be unswallowed before the new object is swallowed.
2527 EAPI Eina_Bool edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
2530 * @brief Unswallow an object.
2532 * @param obj A valid Evas_Object handle
2533 * @param obj_swallow The swallowed object
2535 * Causes the edje to regurgitate a previously swallowed object. :)
2537 EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow);
2540 * @brief Get the object currently swallowed by a part.
2542 * @param obj A valid Evas_Object handle
2543 * @param part The part name
2544 * @return The swallowed object, or NULL if there is none.
2546 EAPI Evas_Object *edje_object_part_swallow_get (const Evas_Object *obj, const char *part);
2549 * @brief Returns the state of the Edje part.
2551 * @param obj A valid Evas_Object handle
2552 * @param part The part name
2555 * @return The part state:\n
2556 * "default" for the default state\n
2557 * "" for other states
2559 EAPI const char *edje_object_part_state_get (const Evas_Object *obj, const char *part, double *val_ret);
2562 * @brief Determine dragable directions.
2564 * @param obj A valid Evas_Object handle
2565 * @param part The part name
2567 * @return 0: Not dragable\n
2568 * 1: Dragable in X direction\n
2569 * 2: Dragable in Y direction\n
2570 * 3: Dragable in X & Y directions
2572 EAPI Edje_Drag_Dir edje_object_part_drag_dir_get (const Evas_Object *obj, const char *part);
2575 * @brief Set the dragable object location.
2577 * @param obj A valid Evas_Object handle
2578 * @param part The part name
2579 * @param dx The x value
2580 * @param dy The y value
2582 * Places the dragable object at the given location.
2584 EAPI Eina_Bool edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy);
2587 * @brief Get the dragable object location.
2589 * @param obj A valid Evas_Object handle
2590 * @param part The part name
2591 * @param dx The X value pointer
2592 * @param dy The Y value pointer
2594 * Gets the drag location values.
2596 EAPI Eina_Bool edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
2599 * @brief Set the dragable object size.
2601 * @param obj A valid Evas_Object handle
2602 * @param part The part name
2603 * @param dw The drag width
2604 * @param dh The drag height
2606 * Sets the size of the dragable object.
2608 EAPI Eina_Bool edje_object_part_drag_size_set (Evas_Object *obj, const char *part, double dw, double dh);
2611 * @brief Get the dragable object size.
2613 * @param obj A valid Evas_Object handle
2614 * @param part The part name
2615 * @param dw The drag width pointer
2616 * @param dh The drag height pointer
2618 * Gets the dragable object size.
2620 EAPI Eina_Bool edje_object_part_drag_size_get (const Evas_Object *obj, const char *part, double *dw, double *dh);
2623 * @brief Sets the drag step increment.
2625 * @param obj A valid Evas_Object handle
2626 * @param part The part name
2627 * @param dx The x step amount
2628 * @param dy The y step amount
2630 * Sets the x,y step increments for a dragable object.
2632 EAPI Eina_Bool edje_object_part_drag_step_set (Evas_Object *obj, const char *part, double dx, double dy);
2635 * @brief Gets the drag step increment values.
2637 * @param obj A valid Evas_Object handle
2638 * @param part The part
2639 * @param dx The x step increment pointer
2640 * @param dy The y step increment pointer
2642 * Gets the x and y step increments for the dragable object.
2644 EAPI Eina_Bool edje_object_part_drag_step_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
2647 * @brief Sets the page step increments.
2649 * @param obj A valid Evas_Object handle
2650 * @param part The part name
2651 * @param dx The x page step increment
2652 * @param dy The y page step increment
2654 * Sets the x,y page step increment values.
2656 EAPI Eina_Bool edje_object_part_drag_page_set (Evas_Object *obj, const char *part, double dx, double dy);
2659 * @brief Gets the page step increments.
2661 * @param obj A valid Evas_Object handle
2662 * @param part The part name
2663 * @param dx The dx page increment pointer
2664 * @param dy The dy page increment pointer
2666 * Gets the x,y page step increments for the dragable object.
2668 EAPI Eina_Bool edje_object_part_drag_page_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
2671 * @brief Steps the dragable x,y steps.
2673 * @param obj A valid Evas_Object handle
2674 * @param part The part name
2675 * @param dx The x step
2676 * @param dy The y step
2678 * Steps x,y where the step increment is the amount set by
2679 * edje_object_part_drag_step_set.
2681 EAPI Eina_Bool edje_object_part_drag_step (Evas_Object *obj, const char *part, double dx, double dy);
2684 * @brief Pages x,y steps.
2686 * @param obj A valid Evas_Object handle
2687 * @param part The part name
2688 * @param dx The x step
2689 * @param dy The y step
2691 * Pages x,y where the increment is defined by
2692 * edje_object_part_drag_page_set.\n WARNING: Paging is bugged!
2694 EAPI Eina_Bool edje_object_part_drag_page (Evas_Object *obj, const char *part, double dx, double dy);
2698 * @brief Get the object created by this external part.
2700 * Parts of type external creates the part object using information
2701 * provided by external plugins. It's somehow like "swallow"
2702 * (edje_object_part_swallow()), but it's all set automatically.
2704 * This function returns the part created by such external plugins and
2705 * being currently managed by this Edje.
2707 * @note Almost all swallow rules apply: you should not move, resize,
2708 * hide, show, set the color or clipper of such part. It's a bit
2709 * more restrictive as one must @b never delete this object!
2711 * @param obj A valid Evas_Object handle
2712 * @param part The part name
2713 * @return The externally created object, or NULL if there is none or
2714 * part is not an external.
2716 EAPI Evas_Object *edje_object_part_external_object_get (const Evas_Object *obj, const char *part);
2719 * @brief Set the parameter for the external part.
2721 * Parts of type external may carry extra properties that have
2722 * meanings defined by the external plugin. For instance, it may be a
2723 * string that defines a button label and setting this property will
2724 * change that label on the fly.
2726 * @note external parts have parameters set when they change
2727 * states. Those parameters will never be changed by this
2728 * function. The interpretation of how state_set parameters and
2729 * param_set will interact is up to the external plugin.
2731 * @note this function will not check if parameter value is valid
2732 * using #Edje_External_Param_Info minimum, maximum, valid
2733 * choices and others. However these should be checked by the
2734 * underlying implementation provided by the external
2735 * plugin. This is done for performance reasons.
2737 * @param obj A valid Evas_Object handle
2738 * @param part The part name
2739 * @param param the parameter details, including its name, type and
2740 * actual value. This pointer should be valid, and the
2741 * parameter must exist in
2742 * #Edje_External_Type::parameters_info, with the exact type,
2743 * otherwise the operation will fail and @c EINA_FALSE will be
2746 * @return @c EINA_TRUE if everything went fine, @c EINA_FALSE on errors.
2748 EAPI Eina_Bool edje_object_part_external_param_set (Evas_Object *obj, const char *part, const Edje_External_Param *param);
2751 * @brief Get the parameter for the external part.
2753 * Parts of type external may carry extra properties that have
2754 * meanings defined by the external plugin. For instance, it may be a
2755 * string that defines a button label. This property can be modifed by
2756 * state parameters, by explicit calls to
2757 * edje_object_part_external_param_set() or getting the actual object
2758 * with edje_object_part_external_object_get() and calling native
2761 * This function asks the external plugin what is the current value,
2762 * independent on how it was set.
2764 * @param obj A valid Evas_Object handle
2765 * @param part The part name
2767 * @param param the parameter details. It is used as both input and
2768 * output variable. This pointer should be valid, and the
2769 * parameter must exist in
2770 * #Edje_External_Type::parameters_info, with the exact type,
2771 * otherwise the operation will fail and @c EINA_FALSE will be
2774 * @return @c EINA_TRUE if everything went fine and @p param members
2775 * are filled with information, @c EINA_FALSE on errors and @p
2776 * param member values are not set or valid.
2778 EAPI Eina_Bool edje_object_part_external_param_get (const Evas_Object *obj, const char *part, Edje_External_Param *param);
2780 EAPI Evas_Object *edje_object_part_external_content_get (const Evas_Object *obj, const char *part, const char *content);
2783 * Facility to query the type of the given parameter of the given part.
2785 * @param obj A valid Evas_Object handle
2786 * @param part The part name
2787 * @param param the parameter name to use.
2789 * @return @c EDJE_EXTERNAL_PARAM_TYPE_MAX on errors, or another value
2790 * from #Edje_External_Param_Type on success.
2792 EAPI Edje_External_Param_Type edje_object_part_external_param_type_get (const Evas_Object *obj, const char *part, const char *param);
2796 * @brief Appends an object to the box.
2798 * @param obj A valid Evas_Object handle
2799 * @param part The part name
2800 * @param child The object to append
2802 * @return 1: Successfully added.\n
2803 * 0: An error occurred.
2805 * Appends child to the box indicated by part.
2807 EAPI Eina_Bool edje_object_part_box_append (Evas_Object *obj, const char *part, Evas_Object *child);
2810 * @brief Prepends an object to the box.
2812 * @param obj A valid Evas_Object handle
2813 * @param part The part name
2814 * @param child The object to prepend
2816 * @return 1: Successfully added.\n
2817 * 0: An error occurred.
2819 * Prepends child to the box indicated by part.
2821 EAPI Eina_Bool edje_object_part_box_prepend (Evas_Object *obj, const char *part, Evas_Object *child);
2824 * @brief Adds an object to the box.
2826 * @param obj A valid Evas_Object handle
2827 * @param part The part name
2828 * @param child The object to insert
2829 * @param reference The object to be used as reference
2831 * @return 1: Successfully added.\n
2832 * 0: An error occurred.
2834 * Inserts child in the box given by part, in the position marked by
2837 EAPI Eina_Bool edje_object_part_box_insert_before (Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference);
2840 * @brief Inserts an object to the box.
2842 * @param obj A valid Evas_Object handle
2843 * @param part The part name
2844 * @param child The object to insert
2845 * @param pos The position where to insert child
2847 * @return 1: Successfully added.\n
2848 * 0: An error occurred.
2850 * Adds child to the box indicated by part, in the position given by
2853 EAPI Eina_Bool edje_object_part_box_insert_at (Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos);
2856 * @brief Removes an object from the box.
2858 * @param obj A valid Evas_Object handle
2859 * @param part The part name
2860 * @param child The object to remove
2862 * @return Pointer to the object removed, or NULL.
2864 * Removes child from the box indicated by part.
2866 EAPI Evas_Object *edje_object_part_box_remove (Evas_Object *obj, const char *part, Evas_Object *child);
2869 * @brief Removes an object from the box.
2871 * @param obj A valid Evas_Object handle
2872 * @param part The part name
2875 * @return Pointer to the object removed, or NULL.
2877 * Removes from the box indicated by part, the object in the position
2880 EAPI Evas_Object *edje_object_part_box_remove_at (Evas_Object *obj, const char *part, unsigned int pos);
2883 * @brief Removes all elements from the box.
2885 * @param obj A valid Evas_Object handle
2886 * @param part The part name
2887 * @param clear Delete objects on removal
2889 * @return 1: Successfully cleared.\n
2890 * 0: An error occurred.
2892 * Removes all the external objects from the box indicated by part.
2893 * Elements created from the theme will not be removed.
2895 EAPI Eina_Bool edje_object_part_box_remove_all (Evas_Object *obj, const char *part, Eina_Bool clear);
2898 * @brief Retrieve a child from a table
2900 * @param obj A valid Evas_Object handle
2901 * @param part The part name
2902 * @param col The column of the child to get
2903 * @param row The row of the child to get
2904 * @return The child Evas_Object
2906 EAPI Evas_Object *edje_object_part_table_child_get (Evas_Object *obj, const char *part, unsigned int col, unsigned int row);
2909 * @brief Packs an object into the table.
2911 * @param obj A valid Evas_Object handle
2912 * @param part The part name
2913 * @param child_obj The object to pack in
2914 * @param col The column to place it in
2915 * @param row The row to place it in
2916 * @param colspan Columns the child will take
2917 * @param rowspan Rows the child will take
2919 * @return 1: Successfully added.\n
2920 * 0: An error occurred.
2922 * Packs an object into the table indicated by part.
2924 EAPI Eina_Bool edje_object_part_table_pack (Evas_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
2927 * @brief Removes an object from the table.
2929 * @param obj A valid Evas_Object handle
2930 * @param part The part name
2931 * @param child_obj The object to pack in
2933 * @return 1: Successfully removed.\n
2934 * 0: An error occurred.
2936 * Removes an object from the table indicated by part.
2938 EAPI Eina_Bool edje_object_part_table_unpack (Evas_Object *obj, const char *part, Evas_Object *child_obj);
2941 * @brief Gets the number of columns and rows the table has.
2943 * @param obj A valid Evas_Object handle
2944 * @param part The part name
2945 * @param cols Pointer where to store number of columns (can be NULL)
2946 * @param rows Pointer where to store number of rows (can be NULL)
2948 * @return 1: Successfully get some data.\n
2949 * 0: An error occurred.
2951 * Retrieves the size of the table in number of columns and rows.
2953 EAPI Eina_Bool edje_object_part_table_col_row_size_get (const Evas_Object *obj, const char *part, int *cols, int *rows);
2956 * @brief Removes all object from the table.
2958 * @param obj A valid Evas_Object handle
2959 * @param part The part name
2960 * @param clear If set, will delete subobjs on remove
2962 * @return 1: Successfully clear table.\n
2963 * 0: An error occurred.
2965 * Removes all object from the table indicated by part, except the
2966 * internal ones set from the theme.
2968 EAPI Eina_Bool edje_object_part_table_clear (Evas_Object *obj, const char *part, Eina_Bool clear);
2971 * @brief Send message to object.
2973 * @param obj The edje object reference.
2974 * @param type The type of message to send.
2975 * @param id A identification number for the message.
2976 * @param msg The message to be send.
2979 * This function sends messages to this object and to all of its child
2980 * objects, if applicable. The function that handles messages arriving
2981 * at this edje object is is set with
2982 * edje_object_message_handler_set().
2984 * @see edje_object_message_handler_set()
2987 EAPI void edje_object_message_send (Evas_Object *obj, Edje_Message_Type type, int id, void *msg);
2990 * @brief Set the message handler function for this an object.
2992 * @param obj The edje object reference.
2993 * @param func The function to handle messages.
2994 * @param data The data to be associated to the message handler.
2997 * This function associates a message handler function and data to the
3001 EAPI void edje_object_message_handler_set (Evas_Object *obj, Edje_Message_Handler_Cb func, void *data);
3004 * @brief Process an object's message queue.
3006 * @param obj The edje object reference.
3008 * This function goes through the object message queue processing the
3009 * pending messages for *this* specific edje object. Normally they'd
3010 * be processed only at idle time.
3013 EAPI void edje_object_message_signal_process (Evas_Object *obj);
3017 * @brief Process all queued up edje messages.
3019 * This function triggers the processing of messages addressed to any
3020 * (alive) edje objects.
3023 EAPI void edje_message_signal_process (void);
3026 * Register given type name to return the given information.
3028 * @param type_name name to register and be known by edje's "source:"
3029 * parameter of "type: EXTERNAL" parts.
3030 * @param type_info meta-information describing how to interact with it.
3032 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3033 * type already registered).
3035 * @see edje_external_type_array_register()
3037 EAPI Eina_Bool edje_external_type_register (const char *type_name, const Edje_External_Type *type_info);
3040 * Unregister given type name previously registered.
3042 * @param type_name name to unregister. It should be registered with
3043 * edje_external_type_register() before.
3045 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3046 * type_name did not exist).
3048 * @see edje_external_type_array_unregister()
3050 EAPI Eina_Bool edje_external_type_unregister (const char *type_name);
3053 * Register a batch of types and their information.
3055 * This is the recommended function to add information as it's faster
3056 * than the single version edje_external_type_register().
3058 * @note the given array is not modified, but the type name strings
3059 * are @b not duplicated! That is, all type names must be @b
3060 * live until they are unregistered! This was chosen to save
3061 * some memory and most people will just define the array as a
3062 * global static const type anyway.
3064 * @param array @c NULL terminated array with type name and
3065 * information. Note that type name or information are not
3066 * modified by are @b referenced, so they must keep alive after
3067 * this function returns!
3069 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3070 * type already registered).
3072 * @see edje_external_type_register()
3074 EAPI void edje_external_type_array_register (const Edje_External_Type_Info *array);
3077 * Unregister a batch of given external type previously registered.
3079 * @param array @c NULL terminated array, should be the same as the
3080 * one used to register with edje_external_type_array_register()
3082 * @see edje_external_type_unregister()
3084 EAPI void edje_external_type_array_unregister (const Edje_External_Type_Info *array);
3088 * Return the current ABI version for Edje_External_Type structure.
3090 * Always check this number before accessing Edje_External_Type in
3091 * your own software. If the number is not the same, your software may
3092 * access invalid memory and crash, or just get garbage values.
3094 * @warning @b NEVER, EVER define your own Edje_External_Type using the
3095 * return of this function as it will change as Edje library
3096 * (libedje.so) changes, but your type definition will
3097 * not. Instead, use #EDJE_EXTERNAL_TYPE_ABI_VERSION.
3100 * - use edje_external_type_abi_version_get() to check.
3101 * - use #EDJE_EXTERNAL_TYPE_ABI_VERSION to define/declare.
3103 * @return version this edje library was compiled.
3105 EAPI unsigned int edje_external_type_abi_version_get (void) EINA_CONST;
3110 * Returns an iterator that emits Eina_Hash_Tuple pointers with key
3111 * being the name and data being the Edje_External_Type pointer.
3114 * const Eina_Hash_Tuple *tuple;
3115 * Eina_Iterator *itr;
3116 * const Eina_List *l, *modules;
3119 * modules = edje_available_modules_get();
3120 * EINA_LIST_FOREACH(modules, l, s)
3122 * if (!edje_module_load(s))
3123 * printf("Error loading edje module: %s\n", s);
3126 * itr = edje_external_iterator_get();
3127 * EINA_ITERATOR_FOREACH(itr, tuple)
3129 * const char *name = tuple->key;
3130 * const Edje_External_Type *type = tuple->data;
3133 * (type->abi_version != edje_external_type_abi_version_get()))
3135 * printf("Error: invalid type %p (abi: %d, expected: %d)\n",
3136 * type, type ? type->abi_version : 0,
3137 * edje_external_type_abi_version_get());
3141 * printf("%s: %s (%s) label='%s' desc='%s'\n",
3142 * name, type->module, type->module_name,
3143 * type->label_get ? type->label_get(type->data) : "",
3144 * type->description_get ? type->description_get(type->data) : "");
3149 EAPI Eina_Iterator *edje_external_iterator_get (void);
3151 EAPI Edje_External_Param *edje_external_param_find (const Eina_List *params, const char *key);
3152 EAPI Eina_Bool edje_external_param_int_get (const Eina_List *params, const char *key, int *ret);
3153 EAPI Eina_Bool edje_external_param_double_get (const Eina_List *params, const char *key, double *ret);
3154 EAPI Eina_Bool edje_external_param_string_get (const Eina_List *params, const char *key, const char **ret);
3155 EAPI Eina_Bool edje_external_param_bool_get (const Eina_List *params, const char *key, Eina_Bool *ret);
3156 EAPI Eina_Bool edje_external_param_choice_get (const Eina_List *params, const char *key, const char **ret);
3159 * Get the array of parameters information about a type given its name.
3161 * @note the type names and other strings are static, that means they
3162 * @b NOT translated. One must use
3163 * Edje_External_Type::translate() to translate those.
3165 * @return the NULL terminated array, or @c NULL if type is unknown or
3166 * it does not have any parameter information.
3168 * @see edje_external_type_get()
3170 EAPI const Edje_External_Param_Info *edje_external_param_info_get (const char *type_name);
3172 EAPI const Edje_External_Type *edje_external_type_get (const char *type_name);
3174 EAPI Eina_Bool edje_module_load (const char *module);
3175 EAPI const Eina_List *edje_available_modules_get (void);
3177 /* perspective info for maps inside edje objects */
3178 typedef struct _Edje_Perspective Edje_Perspective;
3180 EAPI Edje_Perspective *edje_perspective_new (Evas *e);
3181 EAPI void edje_perspective_free (Edje_Perspective *ps);
3182 EAPI void edje_perspective_set (Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
3183 EAPI void edje_perspective_global_set (Edje_Perspective *ps, Eina_Bool global);
3184 EAPI Eina_Bool edje_perspective_global_get (const Edje_Perspective *ps);
3185 EAPI const Edje_Perspective *edje_evas_global_perspective_get(const Evas *e);
3186 EAPI void edje_object_perspective_set (Evas_Object *obj, Edje_Perspective *ps);
3187 EAPI const Edje_Perspective *edje_object_perspective_get (const Evas_Object *obj);