Edje text: Added edje_object_part_text_append.
[framework/uifw/edje.git] / src / lib / Edje.h
1 /**
2 @brief Edje Graphical Design Library
3
4 These routines are used for Edje.
5
6 @mainpage Edje Library Documentation
7 @image html  e.png
8 @version 1.0.0
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>
25 @date 2003-2011
26
27
28
29
30
31
32
33
34
35
36 @section intro What is Edje?
37
38 Edje is a complex graphical design & layout library.
39
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.
49
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
65 "parallel".
66
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.
71
72 For details of Edje's history, see the \ref history section.
73
74
75
76
77
78
79
80
81 @section requirements What does Edje require?
82
83 Edje requires fairly little on your system. to use the Edje runtime library
84 you need:
85
86   - Evas (library)
87   - Ecore (library)
88   - Eet (library)
89   - Embryo (library)
90   - Eina (library)
91
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.
96
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
99 definitely optional.
100
101 Eina, Eet and Embryo have no interesting options so just build and
102 install them.
103
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.
108
109 @verbatim
110 1. You need Eina from the trunk svn branch.
111
112   svn co http://svn.enlightenment.org/svn/e/trunk/eina/
113   cd eina
114   ./autogen.sh
115   ./configure
116   make
117   sudo make install
118   cd
119
120 2. You need Eet from the trunk svn branch.
121
122   svn co http://svn.enlightenment.org/svn/e/trunk/eet/
123   cd eet
124   ./autogen.sh
125   ./configure
126   make
127   sudo make install
128   cd
129
130 3. You need Evas from the trunk svn branch built with eet, png and jpeg loader support.
131
132   svn co http://svn.enlightenment.org/svn/e/trunk/evas/
133   cd evas
134   ./autogen.sh
135   ./configure --enable-image-loader-eet --enable-font-loader-eet --enable-image-loader-jpeg --enable-image-loader-png --enable-buffer
136   make
137   sudo make install
138   cd
139
140 4. You need Ecore from the trunk svn branch built with ecore-x and ecore-evas.
141
142   svn co http://svn.enlightenment.org/svn/e/trunk/ecore/
143   cd ecore
144   ./autogen.sh
145   ./configure --enable-ecore-x --enable-ecore-evas --enable-ecore-evas-software-buffer --enable-ecore-evas-software-x11 --enable-ecore-evas-software-buffer
146   make
147   sudo make install
148   cd
149
150 5. You need embryo from the trunk svn branch
151
152   svn co http://svn.enlightenment.org/svn/e/trunk/embryo/
153   cd embryo
154   ./autogen.sh
155   ./configure
156   make
157   sudo make install
158   cd
159
160 @endverbatim
161
162
163
164
165
166
167
168
169
170 @section compiling How to compile and test Edje
171
172 Now you need to compile and install Edje.
173
174 @verbatim
175   ./configure
176   make
177   sudo make install
178 @endverbatim
179
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.
183
184 You may use different tools to edit and view the generated ".edj"
185 files, for instance:
186
187   - editje (http://trac.enlightenment.org/e/wiki/Editje)
188   - edje_viewer (http://trac.enlightenment.org/e/wiki/Edje_Viewer)
189
190
191
192
193
194
195
196
197
198
199 @section details So how does this all work?
200
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
206 data needed.
207
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:
213
214 @code
215
216 #include <Eina.h>
217 #include <Evas.h>
218 #include <Ecore.h>
219 #include <Ecore_Evas.h>
220 #include <Edje.h>
221
222 #define WIDTH 320
223 #define HEIGHT 240
224
225 static Evas_Object *create_my_group(Evas *canvas, const char *text)
226 {
227    Evas_Object *edje;
228
229    edje = edje_object_add(canvas);
230    if (!edje)
231      {
232         EINA_LOG_CRIT("could not create edje object!");
233         return NULL;
234      }
235
236    if (!edje_object_file_set(edje, "edje_example.edj", "my_group"))
237      {
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",
241                      errmsg);
242
243         evas_object_del(edje);
244         return NULL;
245      }
246
247    if (text)
248      {
249         if (!edje_object_part_text_set(edje, "text", text))
250           {
251              EINA_LOG_WARN("could not set the text. "
252                            "Maybe part 'text' does not exist?");
253           }
254      }
255
256    evas_object_move(edje, 0, 0);
257    evas_object_resize(edje, WIDTH, HEIGHT);
258    evas_object_show(edje);
259    return edje;
260 }
261
262 int main(int argc, char *argv[])
263 {
264    Ecore_Evas *window;
265    Evas *canvas;
266    Evas_Object *edje;
267    const char *text;
268
269    eina_init();
270    evas_init();
271    ecore_init();
272    ecore_evas_init();
273    edje_init();
274
275    window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
276    if (!window)
277      {
278         EINA_LOG_CRIT("could not create window.");
279         return -1;
280      }
281    canvas = ecore_evas_get(window);
282
283    text = (argc > 1) ? argv[1] : NULL;
284
285    edje = create_my_group(canvas, text);
286    if (!edje)
287      return -2;
288
289    ecore_evas_show(window);
290    ecore_main_loop_begin();
291
292    evas_object_del(edje);
293    ecore_evas_free(window);
294
295    return 0;
296 }
297 @endcode
298
299 It requires the following source Edje file:
300 @code
301 // compile: edje_cc edje_example.edc
302 collections {
303    group {
304       name: "my_group"; // must be the same as in edje_example.c
305
306       parts {
307          part {
308             name: "background";
309             type: RECT; // plain boring rectangle
310             mouse_events: 0; // we don't need any mouse event on the background
311
312             // just one state "default"
313             description {
314                state: "default" 0.0; // must always exist
315                color: 255 255 255 255; // white
316
317                // define part coordinates:
318
319                rel1 { // top-left point at (0, 0) [WIDTH * 0 + 0, HEIGHT * 0 + 0]
320                   relative: 0.0 0.0;
321                   offset: 0 0;
322                }
323                rel2 { // bottom-right point at (WIDTH * 1.0 - 1, HEIGHT * 1.0 - 1)
324                   relative: 1.0 1.0;
325                   offset: -1 -1;
326                }
327             }
328          }
329
330          part {
331             name: "text";
332             type: TEXT;
333             mouse_events: 1; // we want to change the color on mouse-over
334
335             // 2 states, one "default" and another "over" to be used
336             // on mouse over effect
337
338             description {
339                state: "default" 0.0;
340                color: 255 0 0 255; // red
341
342                // define part coordinates:
343
344                rel1 { // top-left at (WIDTH * 0.1 + 5, HEIGHT * 0.2 + 10)
345                   relative: 0.1 0.2;
346                   offset: 5 10;
347                }
348                rel2 { // bottom-right at (WIDTH * 0.9 - 6, HEIGHT * 0.8 - 11)
349                   relative: 0.9 0.8;
350                   offset: -6 -11;
351                }
352
353                // define text specific state details
354                text {
355                   font: "Sans"; // using fontconfig name!
356                   size: 10;
357                   text: "hello world";
358                }
359             }
360
361             description {
362                state: "over" 0.0;
363                inherit: "default" 0.0; // copy everything from "default" at this point
364
365                color: 0 255 0 255; // override color, now it is green
366             }
367          }
368
369          // do programs to change color on text mouse in/out (over)
370          programs {
371             program {
372                // what triggers this program:
373                signal: "mouse,in";
374                source: "text";
375
376                // what this program does:
377                action: STATE_SET "over" 0.0;
378                target: "text";
379
380                // do the state-set in a nice interpolation animation
381                // using linear time in 0.1 second
382                transition: LINEAR 0.1;
383             }
384
385             program {
386                // what triggers this program:
387                signal: "mouse,out";
388                source: "text";
389
390                // what this program does:
391                action: STATE_SET "default" 0.0;
392                target: "text";
393
394                // do the state-set in a nice interpolation animation
395                // using linear time in 0.1 second
396                transition: LINEAR 0.1;
397             }
398          }
399       }
400    }
401 }
402 @endcode
403
404
405 One should save these files as edje_example.c and edje_example.edc then:
406 @verbatim
407 gcc -o edje_example edje_example.c `pkg-config --cflags --libs eina evas ecore ecore-evas edje`
408 edje_cc edje_example.edc
409
410 ./edje_example "some text"
411 @endverbatim
412
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.
416
417 Before digging into changing or creating your own Edje source (edc)
418 files, read the \ref edcref.
419
420
421
422 @section history Edje History
423
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.
428
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.
439
440 Unlike Ebits, Edje separates the layout and behavior logic.
441
442
443
444
445
446
447
448
449
450 @todo Complete documentation of API
451 @todo Bytecode language for extending programs... but what/how?
452
453 */
454
455
456 /**
457
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.
461
462 @example embryo_pong.edc
463 Super-simple Pong implementation in pure embryo.
464
465 @example embryo_run_program.edc
466 This example show how to run an edje program from embryo code.
467
468 @example embryo_set_state.edc
469 This example show how to change the state of a part from embryo code.
470
471 @example embryo_set_text.edc
472 This example show how to set the text in TEXT part from embryo code.
473
474 @example embryo_timer.edc
475 This example show the usage of timers in embryo.
476
477 @example external_elm_anchorblock.edc
478 This example use an elementary anchorblock and a button to animate the text.
479
480 @example external_elm_button.edc
481 This example create some elementary buttons and do some actions on user click.
482
483 @example external_elm_check.edc
484 This example show EXTERNAL checkbox in action.
485
486 @example external_elm_panes.edc
487 This example show EXTERNAL elementary panes in action.
488
489 @example external_emotion_elm.edc
490 Super-concise video player example using Edje/Emotion/Elementary.
491
492 @example lua_script.edc
493 This example show the usage of lua scripting to create and animate some
494 objects in the canvas.
495
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
499
500 */
501
502 /**
503  * @page luaref Edje Lua scripting
504  *
505  * @section intro Introduction
506  *
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.
512  *
513  * To get you started, here's an example:
514  * @include lua_script.edc
515  *
516  */
517
518 #ifndef _EDJE_H
519 #define _EDJE_H
520
521 #ifndef _MSC_VER
522 # include <stdint.h>
523 #endif
524 #include <math.h>
525 #include <float.h>
526 #include <limits.h>
527
528 #include <Evas.h>
529
530 #ifdef EAPI
531 # undef EAPI
532 #endif
533
534 #ifdef _WIN32
535 # ifdef EFL_EDJE_BUILD
536 #  ifdef DLL_EXPORT
537 #   define EAPI __declspec(dllexport)
538 #  else
539 #   define EAPI
540 #  endif /* ! DLL_EXPORT */
541 # else
542 #  define EAPI __declspec(dllimport)
543 # endif /* ! EFL_EDJE_BUILD */
544 #else
545 # ifdef __GNUC__
546 #  if __GNUC__ >= 4
547 #   define EAPI __attribute__ ((visibility("default")))
548 #  else
549 #   define EAPI
550 #  endif
551 # else
552 #  define EAPI
553 # endif
554 #endif
555
556 #ifdef __cplusplus
557 extern "C" {
558 #endif
559
560 #define EDJE_VERSION_MAJOR 1
561 #define EDJE_VERSION_MINOR 0
562
563    typedef struct _Edje_Version
564      {
565         int major;
566         int minor;
567         int micro;
568         int revision;
569      } Edje_Version;
570
571    EAPI extern Edje_Version *edje_version;
572
573 /**
574  * @file Edje.h
575  * @brief Edje Graphical Design Library
576  *
577  * These routines are used for Edje.
578  */
579
580 typedef enum _Edje_Message_Type
581 {
582    EDJE_MESSAGE_NONE = 0,
583
584    EDJE_MESSAGE_SIGNAL = 1, /* DONT USE THIS */
585
586    EDJE_MESSAGE_STRING = 2,
587    EDJE_MESSAGE_INT = 3,
588    EDJE_MESSAGE_FLOAT = 4,
589
590    EDJE_MESSAGE_STRING_SET = 5,
591    EDJE_MESSAGE_INT_SET = 6,
592    EDJE_MESSAGE_FLOAT_SET = 7,
593
594    EDJE_MESSAGE_STRING_INT = 8,
595    EDJE_MESSAGE_STRING_FLOAT = 9,
596
597    EDJE_MESSAGE_STRING_INT_SET = 10,
598    EDJE_MESSAGE_STRING_FLOAT_SET = 11
599 } Edje_Message_Type;
600
601 typedef enum _Edje_Aspect_Control
602 {
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;
609
610 typedef enum _Edje_Object_Table_Homogeneous_Mode
611 {
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;
616
617 typedef enum _Edje_Part_Type
618 {
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
632 } Edje_Part_Type;
633
634 typedef enum _Edje_Text_Effect
635 {
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,
650
651    EDJE_TEXT_EFFECT_LAST                = 11,
652
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)
664 } Edje_Text_Effect;
665
666 typedef enum _Edje_Action_Type
667 {
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
682 } Edje_Action_Type;
683
684 typedef enum _Edje_Tween_Mode
685 {
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
692 } Edje_Tween_Mode;
693
694 typedef enum _Edje_Cursor
695 {
696    EDJE_CURSOR_MAIN,
697    EDJE_CURSOR_SELECTION_BEGIN,
698    EDJE_CURSOR_SELECTION_END,
699    EDJE_CURSOR_PREEDIT_START,
700    EDJE_CURSOR_PREEDIT_END,
701    EDJE_CURSOR_USER,
702    EDJE_CURSOR_USER_EXTRA,
703    // more later
704 } Edje_Cursor;
705
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;
716
717 struct _Edje_Message_String
718 {
719    char *str;
720 };
721
722 struct _Edje_Message_Int
723 {
724    int val;
725 };
726
727 struct _Edje_Message_Float
728 {
729    double val;
730 };
731
732 struct _Edje_Message_String_Set
733 {
734    int count;
735    char *str[1];
736 };
737
738 struct _Edje_Message_Int_Set
739 {
740    int count;
741    int val[1];
742 };
743
744 struct _Edje_Message_Float_Set
745 {
746    int count;
747    double val[1];
748 };
749
750 struct _Edje_Message_String_Int
751 {
752    char *str;
753    int val;
754 };
755
756 struct _Edje_Message_String_Float
757 {
758    char *str;
759    double val;
760 };
761
762 struct _Edje_Message_String_Int_Set
763 {
764    char *str;
765    int count;
766    int val[1];
767 };
768
769 struct _Edje_Message_String_Float_Set
770 {
771    char *str;
772    int count;
773    double val[1];
774 };
775
776 typedef enum _Edje_Drag_Dir
777 {
778    EDJE_DRAG_DIR_NONE = 0,
779    EDJE_DRAG_DIR_X = 1,
780    EDJE_DRAG_DIR_Y = 2,
781    EDJE_DRAG_DIR_XY = 3
782 } Edje_Drag_Dir;
783
784 typedef enum _Edje_Load_Error
785 {
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
796 } Edje_Load_Error;
797
798 typedef enum _Edje_Text_Filter_Type
799 {
800    EDJE_TEXT_FILTER_TEXT = 0,
801    EDJE_TEXT_FILTER_FORMAT = 1,
802    EDJE_TEXT_FILTER_MARKUP = 2
803 } Edje_Text_Filter_Type;
804
805 typedef enum _Edje_External_Param_Type
806 {
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;
814
815 /**
816  * @typedef Edje_External_Param_Flags flags that determines the
817  * behavior of a parameter.
818  *
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
828  *      description.
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.
835  */
836 typedef enum _Edje_External_Param_Flags
837 {
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;
847
848
849 /**
850  * @brief Converts type identifier to string nicer representation.
851  *
852  * This may be used to debug or other informational purposes.
853  *
854  * @param type the identifier to convert.
855  * @return the string with the string representation, or @c "(unknown)".
856  */
857 EAPI const char *edje_external_param_type_str(Edje_External_Param_Type type) EINA_PURE;
858
859 struct _Edje_External_Param
860 {
861    const char               *name;
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 */
865    double                    d;
866    const char               *s; /**< used by both string and choice */
867 };
868 typedef struct _Edje_External_Param Edje_External_Param;
869
870 #define EDJE_EXTERNAL_INT_UNSET INT_MAX
871 #define EDJE_EXTERNAL_DOUBLE_UNSET DBL_MAX
872
873 typedef struct _Edje_External_Param_Info Edje_External_Param_Info;
874 struct _Edje_External_Param_Info
875 {
876    const char               *name;
877    Edje_External_Param_Type  type;
878    Edje_External_Param_Flags flags;
879    union {
880       struct {
881          int                 def, min, max, step;
882       } i;
883       struct {
884          double              def, min, max, step;
885       } d;
886       struct {
887          const char         *def;
888          const char         *accept_fmt;
889          const char         *deny_fmt;
890       } s;
891       struct {
892          int                 def;
893          const char         *false_str;
894          const char         *true_str;
895       } b;
896       struct {
897          const char         *def;
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 */
901       } c;
902    } info;
903 };
904
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}}}
917
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)
930
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")
939
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)
948
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)
957
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)
966
967 #define EDJE_EXTERNAL_PARAM_INFO_SENTINEL {NULL, 0, 0, {.s = {NULL, NULL, NULL}}}
968
969 /**
970  * @struct _Edje_External_Type
971  *
972  * @brief Information about an external type to be used.
973  *
974  * This structure provides information on how to display and modify a
975  * third party Evas_Object in Edje.
976  *
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.
981  *
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.
986  */
987 struct _Edje_External_Type
988 {
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.
993                               */
994   const char    *module;
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() */
1004
1005   /* The following callbacks aren't used by Edje itself, but by UI design
1006      tools instead */
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) */
1012
1013   Edje_External_Param_Info *parameters_info;
1014   void                     *data;
1015 };
1016 typedef struct _Edje_External_Type Edje_External_Type;
1017
1018 struct _Edje_External_Type_Info
1019 {
1020    const char               *name;
1021    const Edje_External_Type *info;
1022 };
1023 typedef struct _Edje_External_Type_Info Edje_External_Type_Info;
1024
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);
1030
1031 /**
1032  * @brief Initialize the edje library.
1033  *
1034  * @return The new init count. The initial value is zero.
1035  *
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().
1041  *
1042  * @see edje_shutdown()
1043  * @see eina_init()
1044  * @see ecore_init()
1045  * @see embryo_init()
1046  * @see eet_init()
1047  *
1048  */
1049 EAPI int          edje_init                       (void);
1050
1051 /**
1052  * @brief Shutdown the edje library.
1053  *
1054  * @return The number of times the library has been initialised without being
1055  *         shutdown.
1056  *
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
1060  * in your code.
1061  *
1062  * @see edje_init()
1063  * @see eina_shutdown()
1064  * @see ecore_shutdown()
1065  * @see embryo_shutdown()
1066  * @see eet_shutdown()
1067  *
1068  */
1069 EAPI int          edje_shutdown                   (void);
1070
1071 /**
1072  * @brief Set edje trasitions' frame time.
1073  *
1074  * @param t The frame time, in seconds. Default value is 1/30.
1075  *
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().
1080  *
1081  * @see edje_frametime_get()
1082  *
1083  */
1084 EAPI void         edje_frametime_set              (double t);
1085
1086 /**
1087  * @brief Get edje trasitions' frame time.
1088  *
1089  * @return The frame time, in seconds.
1090  *
1091  * This function returns the edje frame time set by
1092  * edje_frametime_set().
1093  *
1094  * @see edje_frametime_set()
1095  *
1096  */
1097 EAPI double       edje_frametime_get              (void);
1098
1099 /**
1100  * @brief Freeze Edje objects.
1101  *
1102  * This function freezes every edje objects in the current process.
1103  *
1104  * See edje_object_freeze().
1105  *
1106  */
1107 EAPI void         edje_freeze                     (void);
1108
1109 /**
1110  * @brief Thaw edje objects.
1111  *
1112  * This function thaw all edje object in the current process.
1113  *
1114  * See edje_object_thaw().
1115  *
1116  */
1117 EAPI void         edje_thaw                       (void);
1118
1119 /**
1120  * @brief Set the edje append fontset.
1121  *
1122  * @param fonts The fontset to append.
1123  *
1124  * This function sets the edje append fontset.
1125  *
1126  */
1127 EAPI void         edje_fontset_append_set         (const char *fonts);
1128
1129 /**
1130  * @brief Get the edje append fontset.
1131  *
1132  * @return The edje append fontset.
1133  *
1134  * This function returns the edje append fontset set by
1135  * edje_fontset_append_set() function.
1136  *
1137  * @see edje_fontset_append_set().
1138  *
1139  */
1140 EAPI const char  *edje_fontset_append_get         (void);
1141
1142 /**
1143  * @brief Set edje's global scaling factor.
1144  *
1145  * @param scale The edje (global) scale factor. The defaul is 1.0.
1146  *
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.
1153  *
1154  * Scaling affects the values of min/max object sizes, which are
1155  * multiplied by it. Font sizes are scaled, too.
1156  *
1157  * This property can be retrieved with edje_scale_get().
1158  *
1159  * @see edje_scale_get().
1160  *
1161  */
1162 EAPI void         edje_scale_set                  (double scale);
1163
1164 /**
1165  * @brief Get edje's global scaling factor.
1166  *
1167  * @return The edje (global) scale factor. The defaul is 1.0.
1168  *
1169  * This function returns edje's global scale factor, which can be set
1170  * by edje_scale_set().
1171  *
1172  * @see edje_scale_set().
1173  *
1174  */
1175 EAPI double       edje_scale_get                  (void);
1176
1177 /**
1178  * @brief Set the edje object's scaling factor.
1179  *
1180  * @param obj The edje object's reference.
1181  * @param scale The edje object scale factor. The defaul is 1.0.
1182  *
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.
1188  *
1189  * This scale factor can be retrieved with edje_object_scale_get().
1190  * @see edje_object_scale_get().
1191  *
1192  */
1193 EAPI Eina_Bool    edje_object_scale_set           (Evas_Object *obj, double scale);
1194
1195 /**
1196  * @brief Get the edje object's scaling factor.
1197  *
1198  * @param obj The edje object's reference.
1199  *
1200  * This function returns the individual scale factor of the @a obj
1201  * edje object, which can be set by edje_object_scale_set().
1202  *
1203  * @see edje_object_scale_set().
1204  *
1205  */
1206 EAPI double       edje_object_scale_get           (const Evas_Object *obj);
1207
1208 /**
1209  * Set the RTL orientation for this object.
1210  *
1211  * @param obj the smart object
1212  * @rtl new value of flag EINA_TRUE/EINA_FALSE
1213  * @since 1.1.0
1214  */
1215 EAPI void         edje_object_mirrored_set        (Evas_Object *obj, Eina_Bool rtl);
1216
1217 /**
1218  * Get the RTL orientation for this object.
1219  *
1220  * You can RTL orientation explicitly with edje_object_mirrored_set.
1221  *
1222  * @param obj the smart object
1223  * @return if flag is set or not.
1224  * @since 1.1.0
1225  */
1226 EAPI Eina_Bool    edje_object_mirrored_get        (const Evas_Object *obj);
1227
1228 /**
1229  * Get a list of groups in an edje file
1230  * @param file The path to the edje file
1231  *
1232  * @return The Eina_List of group names (char *)
1233  *
1234  * Note: the list must be freed using edje_file_collection_list_free()
1235  * when you are done with it.
1236  */
1237 EAPI Eina_List   *edje_file_collection_list       (const char *file);
1238
1239 /**
1240  * Free file collection list
1241  * @param lst The Eina_List of groups
1242  *
1243  * Frees the list returned by edje_file_collection_list().
1244  */
1245 EAPI void         edje_file_collection_list_free  (Eina_List *lst);
1246
1247 /**
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
1251  *
1252  * @return 1 if a match is found, 0 otherwise
1253  */
1254 EAPI Eina_Bool    edje_file_group_exists          (const char *file, const char *glob);
1255
1256 /**
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
1261  *
1262  * If an edje file is built from the following edc:
1263  *
1264  * data {
1265  *   item: "key1" "value1";
1266  *   item: "key2" "value2";
1267  * }
1268  * collections { ... }
1269  *
1270  * Then, edje_file_data_get("key1") will return "value1"
1271  */
1272 EAPI char        *edje_file_data_get              (const char *file, const char *key);
1273
1274 /**
1275  * @brief Set the file cache size.
1276  *
1277  * @param count The file cache size in edje file units. Default is 16.
1278  *
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().
1282  *
1283  * @see edje_file_cache_get()
1284  * @see edje_file_cache_flush()
1285  *
1286  */
1287 EAPI void         edje_file_cache_set             (int count);
1288
1289 /**
1290  * @brief Return the file cache size.
1291  *
1292  * @return The file cache size in edje file units. Default is 16.
1293  *
1294  * This function returns the file cache size set by
1295  * edje_file_cache_set().
1296  *
1297  * @see edje_file_cache_set()
1298  * @see edje_file_cache_flush()
1299  *
1300  */
1301 EAPI int          edje_file_cache_get             (void);
1302
1303 /**
1304  * @brief Clean the file cache.
1305  *
1306  * This function cleans the file cache entries, but keeps this cache's
1307  * size to the last value set.
1308  *
1309  * @see edje_file_cache_set()
1310  * @see edje_file_cache_get()
1311  *
1312  */
1313 EAPI void         edje_file_cache_flush           (void);
1314
1315 /**
1316  * @brief Set the collection cache size.
1317  *
1318  * @param count The collection cache size, in edje object units. Default is 16.
1319  *
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().
1324  *
1325  * @see edje_collection_cache_get()
1326  * @see edje_collection_cache_flush()
1327  *
1328  */
1329 EAPI void         edje_collection_cache_set       (int count);
1330
1331 /**
1332  * @brief Return the collection cache size.
1333  *
1334  * @return The collection cache size, in edje object units. Default is 16.
1335  *
1336  * This function returns the collection cache size set by
1337  * edje_collection_cache_set().
1338  *
1339  * @see edje_collection_cache_set()
1340  * @see edje_collection_cache_flush()
1341  *
1342  */
1343 EAPI int          edje_collection_cache_get       (void);
1344
1345 /**
1346  * @brief Clean the collection cache.
1347  *
1348  * This function cleans the collection cache, but keeps this cache's
1349  * size to the last value set.
1350  *
1351  * @see edje_collection_cache_set()
1352  * @see edje_collection_cache_get()
1353  *
1354  */
1355 EAPI void         edje_collection_cache_flush     (void);
1356
1357 /**
1358  * @brief Set Edje color class.
1359  *
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
1373  *
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
1379  * function).
1380  *
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
1383  * to text parts).
1384  *
1385  * Setting color emits a signal "color_class,set" with source being
1386  * the given color class in all objects.
1387  *
1388  * @see edje_color_class_set().
1389  *
1390  * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1391  *       half-transparent white is 255 255 255 128.
1392  */
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);
1394
1395 /**
1396  * @brief Get Edje color class.
1397  *
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
1411  *
1412  * @return EINA_TRUE if found or EINA_FALSE if not found and all
1413  *         values are zeroed.
1414  *
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().
1419  *
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
1422  * to text parts).
1423  *
1424  * @see edje_color_class_set().
1425  *
1426  * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1427  *       half-transparent white is 255 255 255 128.
1428  */
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);
1432
1433 /**
1434  * @brief Set the Edje text class.
1435  *
1436  * @param text_class The text class name
1437  * @param font The font name
1438  * @param size The font size
1439  *
1440  * This function sets updates all edje members which belong to this
1441  * text class with the new font attributes.
1442  *
1443  * @see edje_text_class_get().
1444  *
1445  */
1446
1447 /**
1448  * @brief Delete the object color class.
1449  *
1450  * @param obj The edje object's reference.
1451  * @param color_class The color class to be deleted.
1452  *
1453  * This function deletes any values at the object level for the
1454  * specified object and color class.
1455  *
1456  * Deleting color emits a signal "color_class,del" with source being
1457  * the given color.
1458  */
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);
1462
1463 /**
1464  * @brief Set the object minimum size.
1465  *
1466  * @param obj A valid Evas_Object handle
1467  * @param minw The minimum width
1468  * @param minh The minimum height
1469  *
1470  * This sets the minimum size restriction for the object.
1471  */
1472 EAPI void         edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
1473
1474 /**
1475  * @brief Set the object maximum size.
1476  *
1477  * @param obj A valid Evas_Object handle
1478  * @param maxw The maximum width
1479  * @param maxh The maximum height
1480  *
1481  * This sets the maximum size restriction for the object.
1482  */
1483 EAPI void         edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh);
1484
1485 /**
1486  * @brief Set the object aspect size.
1487  *
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
1492  *
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.
1497  */
1498 EAPI void         edje_extern_object_aspect_set   (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah);
1499
1500 /**
1501  * @brief Registers a custom layout to be used in edje boxes.
1502  *
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
1506  * for func
1507  * @param layout_data_free Passed to func to free its private data
1508  * when needed
1509  * @param free_data Frees data
1510  * @param data Private pointer passed to layout_data_get
1511  *
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.
1521  */
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);
1523
1524 /**
1525  * Constructs the Edje object
1526  * @param evas A valid Evas handle
1527  * @return The Evas_Object pointer.
1528  *
1529  * Creates the Edje smart object, returning the Evas_Object handle.
1530  */
1531 EAPI Evas_Object *edje_object_add                 (Evas *evas);
1532
1533 /**
1534  * @brief Get Edje object data.
1535  *
1536  * @param obj A valid Evas_Object handle
1537  * @param key The data key
1538  * @return The data string
1539  *
1540  * This function fetches data specified at the object level.
1541  *
1542  * In EDC this comes from a data block within the group block that @a
1543  * obj was loaded from. E.g.
1544  *
1545  * @code
1546  * collections {
1547  *   group {
1548  *     name: "a_group";
1549  *     data {
1550  *       item: "key1" "value1";
1551  *       item: "key2" "value2";
1552  *     }
1553  *   }
1554  * }
1555  * @endcode
1556  */
1557 EAPI const char  *edje_object_data_get            (const Evas_Object *obj, const char *key);
1558
1559 /**
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
1566  *
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.
1570  */
1571 EAPI Eina_Bool        edje_object_file_set        (Evas_Object *obj, const char *file, const char *group);
1572
1573 /**
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
1578  *
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
1582  * to NULL.
1583  *
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.
1586  */
1587 EAPI void             edje_object_file_get        (const Evas_Object *obj, const char **file, const char **group);
1588
1589 /**
1590  * Gets the Edje load error
1591  * @param obj A valid Evas_Object handle
1592  *
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
1604  */
1605 EAPI Edje_Load_Error  edje_object_load_error_get  (const Evas_Object *obj);
1606
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);
1609
1610 /**
1611  * @brief Add a callback for a signal emitted by @a obj.
1612  *
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
1617  * emitted.
1618  * @param data A pointer to data to pass in to the callback function.
1619  *
1620  * Connects a callback function to a signal emitted by @a obj.
1621  * In EDC, a program can emit a signal as follows:
1622  *
1623  * @code
1624  * program {
1625  *   name: "emit_example";
1626  *   action: SIGNAL_EMIT "a_signal" "a_source";
1627  * }
1628  * @endcode
1629  *
1630  * Assuming a function with the following declaration is definded:
1631  *
1632  * @code
1633  * void cb_signal(void *data, Evas_Object *o, const char *emission, const char *source);
1634  * @endcode
1635  *
1636  * a callback is attached using:
1637  *
1638  * @code
1639  * edje_object_signal_callback_add(obj, "a_signal", "a_source", cb_signal, data);
1640  * @endcode
1641  *
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.
1645  *
1646  * Internal edje signals can also be attached to, and globs can occur
1647  * in either the emission or source name, e.g.
1648  *
1649  * @code
1650  * edje_object_signal_callback_add(obj, "mouse,down,*", "button.*", NULL);
1651  * @endcode
1652  *
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").
1657  */
1658 EAPI void         edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
1659
1660 /**
1661  * @brief Remove a signal-triggered callback from an object.
1662  *
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
1668  *
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.
1674  *
1675  * @see edje_object_signal_callback_add().
1676  * @see edje_object_signal_callback_del_full().
1677  *
1678  */
1679 EAPI void        *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func);
1680
1681 /**
1682  * @brief Remove a signal-triggered callback from an object.
1683  *
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
1690  *
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.
1696  *
1697  * @see edje_object_signal_callback_add().
1698  * @see edje_object_signal_callback_del().
1699  *
1700  */
1701 EAPI void        *edje_object_signal_callback_del_full(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
1702
1703 /**
1704  * @brief Send a signal to an edje object.
1705  *
1706  * @param obj A valid Evas_Object handle.
1707  * @param emission The signal's name.
1708  * @param source The signal's source.
1709  *
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
1712  * 'source' fields.
1713  *
1714  * @code
1715  * edje_object_signal_emit(obj, "a_signal", "");
1716  * @endcode
1717  *
1718  * will trigger a program whose EDC block is:
1719  *
1720  * @code
1721  * program {
1722  *  name: "a_program";
1723  *  signal: "a_signal";
1724  *  source: "";
1725  *  action: ...
1726  * }
1727  * @endcode
1728  *
1729  * FIXME: should this signal be sent to children also?
1730  */
1731 EAPI void         edje_object_signal_emit         (Evas_Object *obj, const char *emission, const char *source);
1732
1733 /**
1734  * @brief Set the edje object to playing or paused states.
1735  *
1736  * @param obj A valid Evas_Object handle.
1737  * @param play Object state (1 to playing, 0 to pauseed).
1738  *
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.
1742  *
1743  * @see edje_object_play_get().
1744  *
1745  */
1746 EAPI void         edje_object_play_set            (Evas_Object *obj, Eina_Bool play);
1747
1748 /**
1749  * @brief Get the edje object's play/pause state.
1750  *
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
1754  * state.
1755  *
1756  * This function tells if an edje object is playing or not. This state
1757  * is set by edje_object_play_set().
1758  *
1759  * @see edje_object_play_set().
1760  *
1761  */
1762 EAPI Eina_Bool    edje_object_play_get            (const Evas_Object *obj);
1763
1764 /**
1765  * @brief Set the object's animation state.
1766  *
1767  * @param obj A valid Evas_Object handle.
1768  * @param on Animation State.
1769  *
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().
1773  *
1774  * @see edje_object_animation_get()
1775  *
1776  */
1777 EAPI void         edje_object_animation_set       (Evas_Object *obj, Eina_Bool on);
1778
1779 /**
1780  * @brief Get the edje object's animation state.
1781  *
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.
1785  *
1786  * This function returns if the animation is playing or not. The
1787  * animation state is set by edje_object_play_set().
1788  *
1789  * @see edje_object_animation_set().
1790  *
1791  */
1792 EAPI Eina_Bool    edje_object_animation_get       (const Evas_Object *obj);
1793
1794 /**
1795  * @brief Freeze object.
1796  *
1797  * @param obj A valid Evas_Object handle
1798  * @return The frozen state or 0 on Error
1799  *
1800  * This function puts all changes on hold. Successive freezes will
1801  * nest, requiring an equal number of thaws.
1802  *
1803  */
1804 EAPI int          edje_object_freeze                  (Evas_Object *obj);
1805
1806 /**
1807  * @brief Thaw object.
1808  *
1809  * @param obj A valid Evas_Object handle
1810  * @return The frozen state or 0 on Error
1811  *
1812  * This allows frozen changes to occur.
1813  *
1814  */
1815 EAPI int          edje_object_thaw                    (Evas_Object *obj);
1816
1817 /**
1818  * @brief Sets the object color class.
1819  *
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
1834  *
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
1838  * these values.
1839  *
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
1842  * to text parts).
1843  *
1844  * Setting color emits a signal "color_class,set" with source being
1845  * the given color.
1846  *
1847  * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1848  *       half-transparent white is 255 255 255 128.
1849  */
1850
1851 /**
1852  * @brief Lists color classes.
1853  *
1854  * @return A list of color class names (strings). These strings and
1855  * the list must be free()'d by the caller.
1856  *
1857  * This function lists all color classes known about by the current
1858  * process.
1859  *
1860  */
1861
1862 /**
1863  * @brief Delete edje color class.
1864  *
1865  * @param color_class
1866  *
1867  * This function deletes any values at the process level for the
1868  * specified color class.
1869  *
1870  * Deleting color emits a signal "color_class,del" with source being
1871  * the given color class in all objects.
1872  */
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);
1874
1875 /**
1876  * @brief Gets the object color class.
1877  *
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
1892  *
1893  * @return EINA_TRUE if found or EINA_FALSE if not found and all
1894  *         values are zeroed.
1895  *
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
1898  * be used.
1899  *
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
1902  * to text parts).
1903  *
1904  * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1905  *       half-transparent white is 255 255 255 128.
1906  */
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);
1909
1910 /**
1911  * @brief Sets Edje text class.
1912  *
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
1917  *
1918  * This function sets the text class for the Edje.
1919  *
1920  */
1921
1922 /**
1923  * @brief List text classes.
1924  *
1925  * @return A list of text class names (strings). These strings are
1926  * stringshares and the list must be free()'d by the caller.
1927  *
1928  * This function lists all text classes known about by the current
1929  * process.
1930  *
1931  */
1932
1933 /**
1934  * @brief Delete the text class.
1935  *
1936  * @param text_class The text class name string
1937  *
1938  * This function deletes any values at the process level for the
1939  * specified text class.
1940  *
1941  */
1942 EAPI Eina_Bool    edje_object_text_class_set          (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size);
1943
1944 /**
1945  * @brief Get the minimum size for an object.
1946  *
1947  * @param obj A valid Evas_Object handle
1948  * @param minw Minimum width pointer
1949  * @param minh Minimum height pointer
1950  *
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.
1953  */
1954 EAPI void         edje_object_size_min_get            (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
1955
1956 /**
1957  * @brief Get the maximum size for an object.
1958  *
1959  * @param obj A valid Evas_Object handle
1960  * @param maxw Maximum width pointer
1961  * @param maxh Maximum height pointer
1962  *
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.
1965  */
1966 EAPI void         edje_object_size_max_get            (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
1967
1968 /**
1969  * @brief Force a Size/Geometry calculation.
1970  *
1971  * @param obj A valid Evas_Object handle
1972  *
1973  * Forces the object @p obj to recalculation layout regardless of
1974  * freeze/thaw.
1975  */
1976 EAPI void         edje_object_calc_force              (Evas_Object *obj);
1977
1978 /**
1979  * @brief Calculate minimum size.
1980  *
1981  * @param obj A valid Evas_Object handle
1982  * @param minw Minimum width pointer
1983  * @param minh Minimum height pointer
1984  *
1985  * Calculates the object's minimum size ?!
1986  */
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);
1990
1991 /**
1992  * @brief Check if Edje part exists.
1993  *
1994  * @param obj A valid Evas_Object handle
1995  * @param part The part name to check
1996  *
1997  * @return 0 on Error, 1 if Edje part exists.
1998  *
1999  * This function returns if a part exists in the edje.
2000  *
2001  */
2002 EAPI Eina_Bool    edje_object_part_exists             (const Evas_Object *obj, const char *part);
2003
2004 /**
2005  * @brief Gets the evas object from a part.
2006  *
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)
2011  *
2012  * This functio gets the Evas_Object corresponding to a given part.
2013  *
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)
2018  *
2019  **/
2020 EAPI const Evas_Object *edje_object_part_object_get   (const Evas_Object *obj, const char *part);
2021
2022 /**
2023  * @brief Get the geometry of an Edje part.
2024  *
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
2031  *
2032  * This function gets the geometry of an Edje part.
2033  *
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.
2036  */
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);
2038
2039
2040 /**
2041  * @brief Set the function that provides item objects for named items in an edje entry text
2042  *
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
2046  *
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).
2049  */
2050 EAPI void         edje_object_item_provider_set       (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data);
2051
2052
2053 /**
2054  * @brief Set the object text callback.
2055  *
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.
2059  *
2060  * This function gets the geometry of an Edje part
2061  *
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.
2064  *
2065  */
2066 EAPI void         edje_object_text_change_cb_set      (Evas_Object *obj, Edje_Text_Change_Cb func, void *data);
2067
2068 /**
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
2073  */
2074 EAPI Eina_Bool    edje_object_part_text_set           (Evas_Object *obj, const char *part, const char *text);
2075
2076 /**
2077  * @brief Return the text of the object part.
2078  *
2079  * @param obj A valid Evas_Object handle
2080  * @param part The part name
2081  *
2082  * @return The text string
2083  *
2084  * This function returns the text associated to the object part.
2085  *
2086  */
2087 EAPI const char  *edje_object_part_text_get           (const Evas_Object *obj, const char *part);
2088
2089 /**
2090  * @brief Sets the raw (non escaped) text for an object part.
2091  *
2092  * @param obj A valid Evas Object handle
2093  * @param part The part name
2094  * @param text_to_escape The text string
2095  *
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.
2099  *
2100  * @see edje_object_part_text_unescaped_get().
2101  *
2102  */
2103 EAPI Eina_Bool    edje_object_part_text_unescaped_set (Evas_Object *obj, const char *part, const char *text_to_escape);
2104
2105 /**
2106  * @brief Returns the text of the object part, without escaping.
2107  *
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
2111  * problems.
2112  *
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()
2116  * when done.
2117  *
2118  * @see edje_object_part_text_unescaped_set().
2119  *
2120  */
2121 EAPI char        *edje_object_part_text_unescaped_get (const Evas_Object *obj, const char *part);
2122
2123 /**
2124  * @brief Return the selection text of the object part.
2125  *
2126  * @param obj A valid Evas_Object handle
2127  * @param part The part name
2128  * @return The text string
2129  *
2130  * This function returns selection text of the object part.
2131  *
2132  */
2133 EAPI const char      *edje_object_part_text_selection_get           (const Evas_Object *obj, const char *part);
2134
2135 /**
2136  * @brief Set the selection to be none.
2137  *
2138  * @param obj A valid Evas_Object handle
2139  * @param part The part name
2140  *
2141  * This function sets the selection text to be none.
2142  *
2143  */
2144 EAPI void             edje_object_part_text_select_none             (const Evas_Object *obj, const char *part);
2145
2146 /**
2147  * @brief Set the selection to be everything.
2148  *
2149  * @param obj A valid Evas_Object handle
2150  * @param part The part name
2151  *
2152  * This function selects all text of the object of the part.
2153  *
2154  */
2155 EAPI void             edje_object_part_text_select_all              (const Evas_Object *obj, const char *part);
2156
2157 /**
2158  * @brief Insert text for an object part.
2159  *
2160  * @param obj A valid Evas Object handle
2161  * @param part The part name
2162  * @param text The text string
2163  *
2164  * This function inserts the text for an object part just before the
2165  * cursor position.
2166  *
2167  */
2168 EAPI void             edje_object_part_text_insert                  (Evas_Object *obj, const char *part, const char *text);
2169
2170 /**
2171  * @brief Insert text for an object part.
2172  *
2173  * @param obj A valid Evas Object handle
2174  * @param part The part name
2175  * @param text The text string
2176  *
2177  * This function inserts the text for an object part at the end; It does not
2178  * move the cursor.
2179  *
2180  * @since 1.1
2181  */
2182 EAPI void             edje_object_part_text_append(Evas_Object *obj, const char *part, const char *text);
2183
2184 /**
2185  * @brief Return a list of char anchor names.
2186  *
2187  * @param obj A valid Evas_Object handle
2188  * @param part The part name
2189  *
2190  * @return The list of anchors (const char *), do not modify!
2191  *
2192  * This function returns a list of char anchor names.
2193  *
2194  */
2195 EAPI const Eina_List *edje_object_part_text_anchor_list_get         (const Evas_Object *obj, const char *part);
2196
2197 /**
2198  * @brief Return a list of Evas_Textblock_Rectangle anchor rectangles.
2199  *
2200  * @param obj A valid Evas_Object handle
2201  * @param part The part name
2202  * @param anchor The anchor name
2203  *
2204  * @return The list of anchor rects (const Evas_Textblock_Rectangle
2205  * *), do not modify! Geometry is relative to entry part.
2206  *
2207  * This function return a list of Evas_Textblock_Rectangle anchor
2208  * rectangles.
2209  *
2210  */
2211 EAPI const Eina_List *edje_object_part_text_anchor_geometry_get     (const Evas_Object *obj, const char *part, const char *anchor);
2212
2213 /**
2214  * @brief Return a list of char item names.
2215  *
2216  * @param obj A valid Evas_Object handle
2217  * @param part The part name
2218  *
2219  * @return The list of items (const char *), do not modify!
2220  *
2221  * This function returns a list of char item names.
2222  *
2223  */
2224 EAPI const Eina_List *edje_object_part_text_item_list_get           (const Evas_Object *obj, const char *part);
2225
2226 /**
2227  * @brief Return item geometry.
2228  *
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
2236  *
2237  * @return 1 if item exists, 0 if not
2238  *
2239  * This function return a list of Evas_Textblock_Rectangle item
2240  * rectangles.
2241  *
2242  */
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);
2244
2245 /**
2246  * @brief Returns the cursor geometry of the part relative to the edje
2247  * object.
2248  *
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
2255  *
2256  */
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);
2258
2259 /**
2260  * @brief Enables selection if the entry is an EXPLICIT selection mode
2261  * type.
2262  *
2263  * @param obj A valid Evas_Object handle
2264  * @param part The part name
2265  * @param allow EINA_TRUE to enable, EINA_FALSE otherwise
2266  */
2267 EAPI void             edje_object_part_text_select_allow_set        (const Evas_Object *obj, const char *part, Eina_Bool allow);
2268
2269 /**
2270  * @brief Aborts any selection action on a part.
2271  *
2272  * @param obj A valid Evas_Object handle
2273  * @param part The part name
2274  */
2275 EAPI void             edje_object_part_text_select_abort            (const Evas_Object *obj, const char *part);
2276
2277 /**
2278  * @brief Starts selecting at current cursor position
2279  *
2280  * @param obj A valid Evas_Object handle
2281  * @param part The part name
2282  */
2283 EAPI void             edje_object_part_text_select_begin            (const Evas_Object *obj, const char *part);
2284
2285 /**
2286  * @brief Extends the current selection to the current cursor position
2287  *
2288  * @param obj A valid Evas_Object handle
2289  * @param part The part name
2290  */
2291 EAPI void             edje_object_part_text_select_extend           (const Evas_Object *obj, const char *part);
2292
2293
2294 /**
2295  * @brief Advances the cursor to the next cursor position.
2296  * @see evas_textblock_cursor_char_next
2297  *
2298  * @param obj A valid Evas_Object handle
2299  * @param part The part name
2300  * @param cur The edje cursor to advance
2301  */
2302 EAPI Eina_Bool        edje_object_part_text_cursor_next                 (Evas_Object *obj, const char *part, Edje_Cursor cur);
2303
2304 /**
2305  * @brief Moves the cursor to the previous char
2306  * @see evas_textblock_cursor_char_prev
2307  *
2308  * @param obj A valid Evas_Object handle
2309  * @param part The part name
2310  * @param cur the edje cursor to work on
2311  */
2312 EAPI Eina_Bool        edje_object_part_text_cursor_prev                 (Evas_Object *obj, const char *part, Edje_Cursor cur);
2313
2314 /**
2315  * @brief Move the cursor to the char above the current cursor position.
2316  *
2317  * @param obj A valid Evas_Object handle
2318  * @param part The part name
2319  * @param cur the edje cursor to work on
2320  */
2321 EAPI Eina_Bool        edje_object_part_text_cursor_up                   (Evas_Object *obj, const char *part, Edje_Cursor cur);
2322
2323 /**
2324  * @brief Moves the cursor to the char below the current cursor position.
2325  *
2326  * @param obj A valid Evas_Object handle
2327  * @param part The part name
2328  * @param cur the edje cursor to work on
2329  */
2330 EAPI Eina_Bool        edje_object_part_text_cursor_down                 (Evas_Object *obj, const char *part, Edje_Cursor cur);
2331
2332 /**
2333  * @brief Moves the cursor to the beginning of the text part
2334  * @see evas_textblock_cursor_paragraph_first
2335  *
2336  * @param obj A valid Evas_Object handle
2337  * @param part The part name
2338  * @param cur the edje cursor to work on
2339  */
2340 EAPI void             edje_object_part_text_cursor_begin_set            (Evas_Object *obj, const char *part, Edje_Cursor cur);
2341
2342 /**
2343  * @brief Moves the cursor to the end of the text part.
2344  * @see evas_textblock_cursor_paragraph_last
2345  *
2346  * @param obj A valid Evas_Object handle
2347  * @param part The part name
2348  * @param cur the edje cursor to work on
2349  */
2350 EAPI void             edje_object_part_text_cursor_end_set              (Evas_Object *obj, const char *part, Edje_Cursor cur);
2351
2352 /**
2353  * @brief Copy the cursor to another cursor.
2354  *
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
2359  */
2360 EAPI void             edje_object_part_text_cursor_copy                 (Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst);
2361
2362 /**
2363  * @brief Move the cursor to the beginning of the line.
2364  * @see evas_textblock_cursor_line_char_first
2365  *
2366  * @param obj A valid Evas_Object handle
2367  * @param part The part name
2368  * @param cur the edje cursor to work on
2369  */
2370 EAPI void             edje_object_part_text_cursor_line_begin_set       (Evas_Object *obj, const char *part, Edje_Cursor cur);
2371
2372 /**
2373  * @brief Move the cursor to the end of the line.
2374  * @see evas_textblock_cursor_line_char_last
2375  *
2376  * @param obj A valid Evas_Object handle
2377  * @param part The part name
2378  * @param cur the edje cursor to work on
2379  */
2380 EAPI void             edje_object_part_text_cursor_line_end_set         (Evas_Object *obj, const char *part, Edje_Cursor cur);
2381
2382 /**
2383  * Position the given cursor to a X,Y position.
2384  *
2385  * This is frequently used with the user cursor.
2386  *
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.
2393  */
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);
2395
2396 /**
2397  * @brief Returns whether the cursor points to a format.
2398  * @see evas_textblock_cursor_is_format
2399  *
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.
2404  */
2405 EAPI Eina_Bool        edje_object_part_text_cursor_is_format_get        (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2406
2407 /**
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
2411  *
2412  * @param obj A valid Evas_Object handle
2413  * @param part The part name
2414  * @param cur The cursor to adjust.
2415  */
2416 EAPI Eina_Bool        edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur);
2417
2418 /**
2419  * @brief Returns the content (char) at the cursor position.
2420  * @see evas_textblock_cursor_content_get
2421  *
2422  * @param obj A valid Evas_Object handle
2423  * @param part The part name
2424  * @param cur The cursor to use
2425  */
2426 EAPI const char      *edje_object_part_text_cursor_content_get          (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2427
2428 /**
2429  * @brief Sets the cursor position to the given value
2430  *
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
2435  * @since 1.1.0
2436  */
2437 EAPI void             edje_object_part_text_cursor_pos_set              (Evas_Object *obj, const char *part, Edje_Cursor cur, int pos);
2438
2439 /**
2440  * @brief Retrieves the current position of the cursor
2441  *
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
2446  * @since 1.1.0
2447  */
2448 EAPI int              edje_object_part_text_cursor_pos_get              (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2449
2450 /**
2451  * Add a filter function for newly inserted text.
2452  *
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
2464  * text.
2465  *
2466  * @see edje_object_text_insert_filter_callback_del
2467  * @see edje_object_text_insert_filter_callback_del_full
2468  *
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
2473  */
2474 EAPI void             edje_object_text_insert_filter_callback_add       (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data);
2475
2476 /**
2477  * Delete a function from the filter list.
2478  *
2479  * Delete the given @p func filter from the list in @p part. Returns
2480  * the user data pointer given when added.
2481  *
2482  * @see edje_object_text_insert_filter_callback_add
2483  * @see edje_object_text_insert_filter_callback_del_full
2484  *
2485  * @param obj A valid Evas_Object handle
2486  * @param part The part name
2487  * @param func The function callback to remove
2488  *
2489  * @return The user data pointer if succesful, or NULL otherwise
2490  */
2491 EAPI void            *edje_object_text_insert_filter_callback_del       (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func);
2492
2493 /**
2494  * Delete a function and matching user data from the filter list.
2495  *
2496  * Delete the given @p func filter and @p data user data from the list
2497  * in @p part.
2498  * Returns the user data pointer given when added.
2499  *
2500  * @see edje_object_text_insert_filter_callback_add
2501  * @see edje_object_text_insert_filter_callback_del
2502  *
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
2507  *
2508  * @return The same data pointer if succesful, or NULL otherwise
2509  */
2510 EAPI void            *edje_object_text_insert_filter_callback_del_full  (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data);
2511
2512
2513 /**
2514  * @brief Swallows an object into the edje.
2515  *
2516  * @param obj A valid Evas_Object handle
2517  * @param part The part name
2518  * @param obj_swallow The object to swallow
2519  *
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.).
2523  *
2524  * If an object has already been swallowed into this part, then it
2525  * will first be unswallowed before the new object is swallowed.
2526  */
2527 EAPI Eina_Bool        edje_object_part_swallow        (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
2528
2529 /**
2530  * @brief Unswallow an object.
2531  *
2532  * @param obj A valid Evas_Object handle
2533  * @param obj_swallow The swallowed object
2534  *
2535  * Causes the edje to regurgitate a previously swallowed object.  :)
2536  */
2537 EAPI void             edje_object_part_unswallow      (Evas_Object *obj, Evas_Object *obj_swallow);
2538
2539 /**
2540  * @brief Get the object currently swallowed by a part.
2541  *
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.
2545  */
2546 EAPI Evas_Object     *edje_object_part_swallow_get    (const Evas_Object *obj, const char *part);
2547
2548 /**
2549  * @brief Returns the state of the Edje part.
2550  *
2551  * @param obj A valid Evas_Object handle
2552  * @param part The part name
2553  * @param val_ret
2554  *
2555  * @return The part state:\n
2556  * "default" for the default state\n
2557  * "" for other states
2558  */
2559 EAPI const char      *edje_object_part_state_get      (const Evas_Object *obj, const char *part, double *val_ret);
2560
2561 /**
2562  * @brief Determine dragable directions.
2563  *
2564  * @param obj A valid Evas_Object handle
2565  * @param part The part name
2566  *
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
2571  */
2572 EAPI Edje_Drag_Dir    edje_object_part_drag_dir_get   (const Evas_Object *obj, const char *part);
2573
2574 /**
2575  * @brief Set the dragable object location.
2576  *
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
2581  *
2582  * Places the dragable object at the given location.
2583  */
2584 EAPI Eina_Bool        edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy);
2585
2586 /**
2587  * @brief Get the dragable object location.
2588  *
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
2593  *
2594  * Gets the drag location values.
2595  */
2596 EAPI Eina_Bool        edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
2597
2598 /**
2599  * @brief Set the dragable object size.
2600  *
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
2605  *
2606  * Sets the size of the dragable object.
2607  */
2608 EAPI Eina_Bool        edje_object_part_drag_size_set  (Evas_Object *obj, const char *part, double dw, double dh);
2609
2610 /**
2611  * @brief Get the dragable object size.
2612  *
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
2617  *
2618  * Gets the dragable object size.
2619  */
2620 EAPI Eina_Bool        edje_object_part_drag_size_get  (const Evas_Object *obj, const char *part, double *dw, double *dh);
2621
2622 /**
2623  * @brief Sets the drag step increment.
2624  *
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
2629  *
2630  * Sets the x,y step increments for a dragable object.
2631  */
2632 EAPI Eina_Bool        edje_object_part_drag_step_set  (Evas_Object *obj, const char *part, double dx, double dy);
2633
2634 /**
2635  * @brief Gets the drag step increment values.
2636  *
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
2641  *
2642  * Gets the x and y step increments for the dragable object.
2643  */
2644 EAPI Eina_Bool        edje_object_part_drag_step_get  (const Evas_Object *obj, const char *part, double *dx, double *dy);
2645
2646 /**
2647  * @brief Sets the page step increments.
2648  *
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
2653  *
2654  * Sets the x,y page step increment values.
2655  */
2656 EAPI Eina_Bool        edje_object_part_drag_page_set  (Evas_Object *obj, const char *part, double dx, double dy);
2657
2658 /**
2659  * @brief Gets the page step increments.
2660  *
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
2665  *
2666  * Gets the x,y page step increments for the dragable object.
2667  */
2668 EAPI Eina_Bool        edje_object_part_drag_page_get  (const Evas_Object *obj, const char *part, double *dx, double *dy);
2669
2670 /**
2671  * @brief Steps the dragable x,y steps.
2672  *
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
2677  *
2678  * Steps x,y where the step increment is the amount set by
2679  * edje_object_part_drag_step_set.
2680  */
2681 EAPI Eina_Bool        edje_object_part_drag_step      (Evas_Object *obj, const char *part, double dx, double dy);
2682
2683 /**
2684  * @brief Pages x,y steps.
2685  *
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
2690  *
2691  * Pages x,y where the increment is defined by
2692  * edje_object_part_drag_page_set.\n WARNING: Paging is bugged!
2693  */
2694 EAPI Eina_Bool        edje_object_part_drag_page      (Evas_Object *obj, const char *part, double dx, double dy);
2695
2696
2697 /**
2698  * @brief Get the object created by this external part.
2699  *
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.
2703  *
2704  * This function returns the part created by such external plugins and
2705  * being currently managed by this Edje.
2706  *
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!
2710  *
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.
2715  */
2716 EAPI Evas_Object              *edje_object_part_external_object_get     (const Evas_Object *obj, const char *part);
2717
2718 /**
2719  * @brief Set the parameter for the external part.
2720  *
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.
2725  *
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.
2730  *
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.
2736  *
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
2744  *        returned.
2745  *
2746  * @return @c EINA_TRUE if everything went fine, @c EINA_FALSE on errors.
2747  */
2748 EAPI Eina_Bool                 edje_object_part_external_param_set      (Evas_Object *obj, const char *part, const Edje_External_Param *param);
2749
2750 /**
2751  * @brief Get the parameter for the external part.
2752  *
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
2759  * functions.
2760  *
2761  * This function asks the external plugin what is the current value,
2762  * independent on how it was set.
2763  *
2764  * @param obj A valid Evas_Object handle
2765  * @param part The part name
2766
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
2772  *        returned.
2773  *
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.
2777  */
2778 EAPI Eina_Bool                 edje_object_part_external_param_get      (const Evas_Object *obj, const char *part, Edje_External_Param *param);
2779
2780 EAPI Evas_Object              *edje_object_part_external_content_get    (const Evas_Object *obj, const char *part, const char *content);
2781
2782 /**
2783  * Facility to query the type of the given parameter of the given part.
2784  *
2785  * @param obj A valid Evas_Object handle
2786  * @param part The part name
2787  * @param param the parameter name to use.
2788  *
2789  * @return @c EDJE_EXTERNAL_PARAM_TYPE_MAX on errors, or another value
2790  *         from #Edje_External_Param_Type on success.
2791  */
2792 EAPI Edje_External_Param_Type  edje_object_part_external_param_type_get (const Evas_Object *obj, const char *part, const char *param);
2793
2794
2795 /**
2796  * @brief Appends an object to the box.
2797  *
2798  * @param obj A valid Evas_Object handle
2799  * @param part The part name
2800  * @param child The object to append
2801  *
2802  * @return 1: Successfully added.\n
2803  * 0: An error occurred.
2804  *
2805  * Appends child to the box indicated by part.
2806  */
2807 EAPI Eina_Bool    edje_object_part_box_append             (Evas_Object *obj, const char *part, Evas_Object *child);
2808
2809 /**
2810  * @brief Prepends an object to the box.
2811  *
2812  * @param obj A valid Evas_Object handle
2813  * @param part The part name
2814  * @param child The object to prepend
2815  *
2816  * @return 1: Successfully added.\n
2817  * 0: An error occurred.
2818  *
2819  * Prepends child to the box indicated by part.
2820  */
2821 EAPI Eina_Bool    edje_object_part_box_prepend            (Evas_Object *obj, const char *part, Evas_Object *child);
2822
2823 /**
2824  * @brief Adds an object to the box.
2825  *
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
2830  *
2831  * @return 1: Successfully added.\n
2832  * 0: An error occurred.
2833  *
2834  * Inserts child in the box given by part, in the position marked by
2835  * reference.
2836  */
2837 EAPI Eina_Bool    edje_object_part_box_insert_before      (Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference);
2838
2839 /**
2840  * @brief Inserts an object to the box.
2841  *
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
2846  *
2847  * @return 1: Successfully added.\n
2848  * 0: An error occurred.
2849  *
2850  * Adds child to the box indicated by part, in the position given by
2851  * pos.
2852  */
2853 EAPI Eina_Bool    edje_object_part_box_insert_at          (Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos);
2854
2855 /**
2856  * @brief Removes an object from the box.
2857  *
2858  * @param obj A valid Evas_Object handle
2859  * @param part The part name
2860  * @param child The object to remove
2861  *
2862  * @return Pointer to the object removed, or NULL.
2863  *
2864  * Removes child from the box indicated by part.
2865  */
2866 EAPI Evas_Object *edje_object_part_box_remove             (Evas_Object *obj, const char *part, Evas_Object *child);
2867
2868 /**
2869  * @brief Removes an object from the box.
2870  *
2871  * @param obj A valid Evas_Object handle
2872  * @param part The part name
2873  * @param pos
2874  *
2875  * @return Pointer to the object removed, or NULL.
2876  *
2877  * Removes from the box indicated by part, the object in the position
2878  * pos.
2879  */
2880 EAPI Evas_Object *edje_object_part_box_remove_at          (Evas_Object *obj, const char *part, unsigned int pos);
2881
2882 /**
2883  * @brief Removes all elements from the box.
2884  *
2885  * @param obj A valid Evas_Object handle
2886  * @param part The part name
2887  * @param clear Delete objects on removal
2888  *
2889  * @return 1: Successfully cleared.\n
2890  * 0: An error occurred.
2891  *
2892  * Removes all the external objects from the box indicated by part.
2893  * Elements created from the theme will not be removed.
2894  */
2895 EAPI Eina_Bool    edje_object_part_box_remove_all         (Evas_Object *obj, const char *part, Eina_Bool clear);
2896
2897 /**
2898  * @brief Retrieve a child from a table
2899  *
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
2905  */
2906 EAPI Evas_Object *edje_object_part_table_child_get        (Evas_Object *obj, const char *part, unsigned int col, unsigned int row);
2907
2908 /**
2909  * @brief Packs an object into the table.
2910  *
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
2918  *
2919  * @return 1: Successfully added.\n
2920  * 0: An error occurred.
2921  *
2922  * Packs an object into the table indicated by part.
2923  */
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);
2925
2926 /**
2927  * @brief Removes an object from the table.
2928  *
2929  * @param obj A valid Evas_Object handle
2930  * @param part The part name
2931  * @param child_obj The object to pack in
2932  *
2933  * @return 1: Successfully removed.\n
2934  * 0: An error occurred.
2935  *
2936  * Removes an object from the table indicated by part.
2937  */
2938 EAPI Eina_Bool    edje_object_part_table_unpack           (Evas_Object *obj, const char *part, Evas_Object *child_obj);
2939
2940 /**
2941  * @brief Gets the number of columns and rows the table has.
2942  *
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)
2947  *
2948  * @return 1: Successfully get some data.\n
2949  * 0: An error occurred.
2950  *
2951  * Retrieves the size of the table in number of columns and rows.
2952  */
2953 EAPI Eina_Bool    edje_object_part_table_col_row_size_get (const Evas_Object *obj, const char *part, int *cols, int *rows);
2954
2955 /**
2956  * @brief Removes all object from the table.
2957  *
2958  * @param obj A valid Evas_Object handle
2959  * @param part The part name
2960  * @param clear If set, will delete subobjs on remove
2961  *
2962  * @return 1: Successfully clear table.\n
2963  * 0: An error occurred.
2964  *
2965  * Removes all object from the table indicated by part, except the
2966  * internal ones set from the theme.
2967  */
2968 EAPI Eina_Bool    edje_object_part_table_clear            (Evas_Object *obj, const char *part, Eina_Bool clear);
2969
2970 /**
2971  * @brief Send message to object.
2972  *
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.
2977  *
2978  *
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().
2983  *
2984  * @see edje_object_message_handler_set()
2985  *
2986  */
2987 EAPI void         edje_object_message_send                (Evas_Object *obj, Edje_Message_Type type, int id, void *msg);
2988
2989 /**
2990  * @brief Set the message handler function for this an object.
2991  *
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.
2995  *
2996  *
2997  * This function associates a message handler function and data to the
2998  * edje object.
2999  *
3000  */
3001 EAPI void         edje_object_message_handler_set         (Evas_Object *obj, Edje_Message_Handler_Cb func, void *data);
3002
3003 /**
3004  * @brief Process an object's message queue.
3005  *
3006  * @param obj The edje object reference.
3007  *
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.
3011  *
3012  */
3013 EAPI void         edje_object_message_signal_process      (Evas_Object *obj);
3014
3015
3016 /**
3017  * @brief Process all queued up edje messages.
3018  *
3019  * This function triggers the processing of messages addressed to any
3020  * (alive) edje objects.
3021  *
3022  */
3023 EAPI void         edje_message_signal_process             (void);
3024
3025 /**
3026  * Register given type name to return the given information.
3027  *
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.
3031  *
3032  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3033  *         type already registered).
3034  *
3035  * @see edje_external_type_array_register()
3036  */
3037 EAPI Eina_Bool    edje_external_type_register             (const char *type_name, const Edje_External_Type *type_info);
3038
3039 /**
3040  * Unregister given type name previously registered.
3041  *
3042  * @param type_name name to unregister. It should be registered with
3043  *        edje_external_type_register() before.
3044  *
3045  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3046  *         type_name did not exist).
3047  *
3048  * @see edje_external_type_array_unregister()
3049  */
3050 EAPI Eina_Bool    edje_external_type_unregister           (const char *type_name);
3051
3052 /**
3053  * Register a batch of types and their information.
3054  *
3055  * This is the recommended function to add information as it's faster
3056  * than the single version edje_external_type_register().
3057  *
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.
3063  *
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!
3068  *
3069  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3070  *         type already registered).
3071  *
3072  * @see edje_external_type_register()
3073  */
3074 EAPI void         edje_external_type_array_register       (const Edje_External_Type_Info *array);
3075
3076 /**
3077  * Unregister a batch of given external type previously registered.
3078  *
3079  * @param array @c NULL terminated array, should be the same as the
3080  *        one used to register with edje_external_type_array_register()
3081  *
3082  * @see edje_external_type_unregister()
3083  */
3084 EAPI void         edje_external_type_array_unregister     (const Edje_External_Type_Info *array);
3085
3086
3087 /**
3088  * Return the current ABI version for Edje_External_Type structure.
3089  *
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.
3093  *
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.
3098  *
3099  * Summary:
3100  *   - use edje_external_type_abi_version_get() to check.
3101  *   - use #EDJE_EXTERNAL_TYPE_ABI_VERSION to define/declare.
3102  *
3103  * @return version this edje library was compiled.
3104  */
3105 EAPI unsigned int edje_external_type_abi_version_get      (void) EINA_CONST;
3106
3107
3108
3109 /**
3110  * Returns an iterator that emits Eina_Hash_Tuple pointers with key
3111  * being the name and data being the Edje_External_Type pointer.
3112  *
3113  * @code
3114  * const Eina_Hash_Tuple *tuple;
3115  * Eina_Iterator *itr;
3116  * const Eina_List *l, *modules;
3117  * const char *s;
3118  *
3119  * modules = edje_available_modules_get();
3120  * EINA_LIST_FOREACH(modules, l, s)
3121  *   {
3122  *      if (!edje_module_load(s))
3123  *        printf("Error loading edje module: %s\n", s);
3124  *   }
3125  *
3126  * itr = edje_external_iterator_get();
3127  * EINA_ITERATOR_FOREACH(itr, tuple)
3128  *   {
3129  *      const char *name = tuple->key;
3130  *      const Edje_External_Type *type = tuple->data;
3131  *
3132  *      if ((!type) ||
3133  *          (type->abi_version != edje_external_type_abi_version_get()))
3134  *        {
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());
3138  *           continue;
3139  *        }
3140  *
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) : "");
3145  *   }
3146  *
3147  * @endcode
3148  */
3149 EAPI Eina_Iterator                  *edje_external_iterator_get     (void);
3150
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);
3157
3158 /**
3159  * Get the array of parameters information about a type given its name.
3160  *
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.
3164  *
3165  * @return the NULL terminated array, or @c NULL if type is unknown or
3166  *         it does not have any parameter information.
3167  *
3168  * @see edje_external_type_get()
3169  */
3170 EAPI const Edje_External_Param_Info *edje_external_param_info_get   (const char *type_name);
3171
3172    EAPI const Edje_External_Type       *edje_external_type_get         (const char *type_name);
3173
3174    EAPI Eina_Bool               edje_module_load                (const char *module);
3175    EAPI const Eina_List        *edje_available_modules_get      (void);
3176
3177    /* perspective info for maps inside edje objects */
3178    typedef struct _Edje_Perspective Edje_Perspective;
3179
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);
3188
3189 #ifdef __cplusplus
3190 }
3191 #endif
3192
3193 #endif