Imported Upstream version 1.7.1
[platform/upstream/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 @version 1.7
8 @date 2003-2012
9
10 Please see the @ref authors page for contact details.
11
12
13
14
15
16
17
18 @section intro What is Edje?
19
20 Edje is a complex graphical design & layout library.
21
22 It doesn't intend to do containing and regular layout like a widget
23 set, but it is the base for such components. Based on the requirements
24 of Enlightenment 0.17, Edje should serve all the purposes of creating
25 visual elements (borders of windows, buttons, scrollbars, etc.) and
26 allow the designer the ability to animate, layout and control the look
27 and feel of any program using Edje as its basic GUI constructor. This
28 library allows for multiple collections of Layouts in one file,
29 sharing the same image and font database and thus allowing a whole
30 theme to be conveniently packaged into 1 file and shipped around.
31
32 Edje separates the layout and behavior logic. Edje files ship with an
33 image and font database, used by all the parts in all the collections
34 to source graphical data. It has a directory of logical part names
35 pointing to the part collection entry ID in the file (thus allowing
36 for multiple logical names to point to the same part collection,
37 allowing for the sharing of data between display elements). Each part
38 collection consists of a list of visual parts, as well as a list of
39 programs. A program is a conditionally run program that if a
40 particular event occurs (a button is pressed, a mouse enters or leaves
41 a part) will trigger an action that may affect other parts. In this
42 way a part collection can be "programmed" via its file as to hilight
43 buttons when the mouse passes over them or show hidden parts when a
44 button is clicked somewhere etc. The actions performed in changing
45 from one state to another are also allowed to transition over a period
46 of time, allowing animation. Programs and animations can be run in
47 "parallel".
48
49 This separation and simplistic event driven style of programming can produce
50 almost any look and feel one could want for basic visual elements. Anything
51 more complex is likely the domain of an application or widget set that may
52 use Edje as a convenient way of being able to configure parts of the display.
53
54 For details of Edje's history, see the \ref history section.
55
56
57 @section requirements What does Edje require?
58
59 Edje requires fairly little on your system. to use the Edje runtime library
60 you need:
61
62   - Evas (library)
63   - Ecore (library)
64   - Eet (library)
65   - Embryo (library)
66   - Eina (library)
67   - Lua 5.1 (library)
68
69 Evas needs to be build with the JPEG, PNG and EET image loaders enabled at a
70 minimum. You will also need the buffer engine (which requires the
71 software_generic engine) as well.
72
73 Ecore needs the ECORE, ECORE_EVAS and ECORE_X modules built at a minimum.
74 It's suggested to build all the Ecore modules. You will beed the Buffer
75 engine support built into Ecore_Evas for edje?_cc to function.
76
77
78 @section compiling How to compile and test Edje
79
80 Now you need to compile and install Edje.
81
82 @verbatim
83   ./configure
84   make
85   sudo make install
86 @endverbatim
87
88 You now have it installed and ready to go, but you need input
89 data. There are lots of examples in SVN, the best one is
90 Enlightenment's own theme file.
91
92 You may use different tools to edit and view the generated ".edj"
93 files, for instance:
94
95   - edje_player (provided by Edje)
96   - editje (http://trac.enlightenment.org/e/wiki/Editje)
97   - edje_viewer (http://trac.enlightenment.org/e/wiki/Edje_Viewer)
98
99
100 @section details So how does this all work?
101
102 Edje internally holds a geometry state machine and state graph of what is
103 visible, not, where, at what size, with what colors etc. This is described
104 to Edje from an Edje .edj file containing this information. These files can
105 be produced by using edje_cc to take a text file (a .edc file) and "compile"
106 an output .edj file that contains this information, images and any other
107 data needed.
108
109 The application using Edje will then create an object in its Evas
110 canvas and set the bundle file to use, specifying the @b group name to
111 use. Edje will load such information and create all the required
112 children objects with the specified properties as defined in each @b
113 part of the given group. See the following example:
114 @include edje_example.c
115
116 The above example requires the following annotated source Edje file:
117 @include edje_example.edc
118
119
120 One should save these files as edje_example.c and edje_example.edc then:
121 @verbatim
122 gcc -o edje_example edje_example.c `pkg-config --cflags --libs eina evas ecore ecore-evas edje`
123 edje_cc edje_example.edc
124
125 ./edje_example "some text"
126 @endverbatim
127
128 Although simple, this example illustrates that animations and state
129 changes can be done from the Edje file itself without any requirement
130 in the C application.
131
132 Before digging into changing or creating your own Edje source (edc)
133 files, read the @ref edcref.
134
135
136
137 @section history Edje History
138
139 It's a sequel to "Ebits" which has serviced the needs of Enlightenment
140 development for early version 0.17. The original design parameters under
141 which Ebits came about were a lot more restricted than the resulting
142 use of them, thus Edje was born.
143
144 Edje is a more complex layout engine compared to Ebits. It doesn't
145 pretend to do containing and regular layout like a widget set. It
146 still inherits the more simplistic layout ideas behind Ebits, but it
147 now does them a lot more cleanly, allowing for easy expansion, and the
148 ability to cover much more ground than Ebits ever could. For the
149 purposes of Enlightenment 0.17, Edje was conceived to serve all the
150 purposes of creating visual elements (borders of windows, buttons,
151 scrollbars, etc.) and allow the designer the ability to animate,
152 layout and control the look and feel of any program using Edje as its
153 basic GUI constructor.
154
155 Unlike Ebits, Edje separates the layout and behavior logic.
156
157
158
159 @section Edje_Examples Examples on Edje's usage
160
161 What follows is a list with various commented examples, covering a great
162 part of Edje's API:
163
164 @note The example files are located at /Where/Enlightenment/is/installed/share/edje/examples
165
166 - @ref Example_Edje_Basics
167 - @ref tutorial_edje_basic2
168 - @ref tutorial_edje_swallow
169 - @ref tutorial_edje_swallow2
170 - @ref tutorial_edje_table
171 - @ref tutorial_edje_box
172 - @ref tutorial_edje_box2
173 - @ref tutorial_edje_color_class
174 - @ref tutorial_edje_animations
175 - @ref tutorial_edje_animations_2
176 - @ref Example_Edje_Signals_Messages
177 - @ref tutorial_edje_signals_2
178 - @ref tutorial_edje_text
179 - @ref tutorial_edje_drag
180 - @ref tutorial_edje_perspective
181 */
182
183 /**
184 @page authors Authors
185 @author Carsten Haitzler <raster@@rasterman.com>
186 @author Tilman Sauerbeck (tilman at code-monkey de)
187 @author ZigsMcKenzie <zigsmckenzie@@gmail.com>
188 @author Cedric BAIL <cedric.bail@@free.fr>
189 @author Brian Mattern <rephorm@@rephorm.com>
190 @author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
191 @author Tristan <blunderer@@gmail.com>
192 @author Gustavo Lima Chaves <glima@@profusion.mobi>
193 @author Bruno Dilly <bdilly@@profusion.mobi>
194 @author Fabiano Fidêncio <fidencio@@profusion.mobi>
195 @author Jihoon Kim <jihoon48.kim@@samsung.com>
196 @author Tiago Falcão <tiago@@profusion.mobi>
197 @author Davide Andreoli <dave@@gurumeditation.it>
198 @author Sebastian Dransfeld <sd@@tango.flipp.net>
199 @author Tom Hacohen <tom@@stosb.com>
200 @author Aharon Hillel <a.hillel@@samsung.com>
201 @author Shilpa Singh <shilpa.singh@samsung.com> <shilpasingh.o@gmail.com>
202 @author Mike Blumenkrantz <michael.blumenkrantz@gmail.com
203 @author Jaehwan Kim <jae.hwan.kim@samsung.com>
204 @author billiob (Boris Faure) <billiob@gmail.com>
205 @author Govindaraju SM <govi.sm@samsung.com> <govism@gmail.com>
206 @author Prince Kumar Dubey <prince.dubey@samsung.com> <prince.dubey@gmail.com>
207 @author David Seikel <onefang at gmail.com>
208 @author Guilherme Íscaro <iscaro@profusion.mobi>
209
210 Please contact <enlightenment-devel@lists.sourceforge.net> to get in
211 contact with the developers and maintainers.
212 */
213
214
215 /**
216
217 @example embryo_custom_state.edc
218 This example show how to create a custom state from embryo. Clicking on the
219 3 labels will rotate the object in the given direction.
220
221 @example embryo_pong.edc
222 Super-simple Pong implementation in pure embryo.
223
224 @example embryo_run_program.edc
225 This example show how to run an edje program from embryo code.
226
227 @example embryo_set_state.edc
228 This example show how to change the state of a part from embryo code.
229
230 @example embryo_set_text.edc
231 This example show how to set the text in TEXT part from embryo code.
232
233 @example embryo_timer.edc
234 This example show the usage of timers in embryo.
235
236 @example external_elm_anchorblock.edc
237 This example use an elementary anchorblock and a button to animate the text.
238
239 @example external_elm_button.edc
240 This example create some elementary buttons and do some actions on user click.
241
242 @example external_elm_check.edc
243 This example show EXTERNAL checkbox in action.
244
245 @example external_elm_panes.edc
246 This example show EXTERNAL elementary panes in action.
247
248 @example external_emotion_elm.edc
249 Super-concise video player example using Edje/Emotion/Elementary.
250
251 @example lua_script.edc
252 This example show the usage of lua scripting to create and animate some
253 objects in the canvas.
254
255 @example toggle_using_filter.edc
256 This example show how to toggle the state of a part using the 'filter'
257 param in edje programs
258
259 */
260
261 #ifndef _EDJE_H
262 #define _EDJE_H
263
264 #ifndef _MSC_VER
265 # include <stdint.h>
266 #endif
267 #include <math.h>
268 #include <float.h>
269 #include <limits.h>
270
271 #include <Evas.h>
272
273 #ifdef EAPI
274 # undef EAPI
275 #endif
276
277 #ifdef HAVE_ECORE_IMF
278 #include <Ecore_IMF.h>
279 #endif
280
281 #ifdef _WIN32
282 # ifdef EFL_EDJE_BUILD
283 #  ifdef DLL_EXPORT
284 #   define EAPI __declspec(dllexport)
285 #  else
286 #   define EAPI
287 #  endif /* ! DLL_EXPORT */
288 # else
289 #  define EAPI __declspec(dllimport)
290 # endif /* ! EFL_EDJE_BUILD */
291 #else
292 # ifdef __GNUC__
293 #  if __GNUC__ >= 4
294 #   define EAPI __attribute__ ((visibility("default")))
295 #  else
296 #   define EAPI
297 #  endif
298 # else
299 #  define EAPI
300 # endif
301 #endif
302
303 #ifdef __cplusplus
304 extern "C" {
305 #endif
306
307 #define EDJE_VERSION_MAJOR 1
308 #define EDJE_VERSION_MINOR 7
309
310    typedef struct _Edje_Version
311      {
312         int major;
313         int minor;
314         int micro;
315         int revision;
316      } Edje_Version;
317
318    EAPI extern Edje_Version *edje_version;
319
320 /**
321  * @file Edje.h
322  * @brief Edje Graphical Design Library
323  *
324  * These routines are used for Edje.
325  */
326
327 /**
328  * Identifiers of Edje message types, which can be sent back and forth
329  * code and a given Edje object's theme file/group.
330  *
331  * @see edje_object_message_send()
332  * @see edje_object_message_handler_set()
333  */
334 typedef enum _Edje_Message_Type
335 {
336    EDJE_MESSAGE_NONE = 0,
337
338    EDJE_MESSAGE_SIGNAL = 1, /* DONT USE THIS */
339
340    EDJE_MESSAGE_STRING = 2, /**< A message with a string as value. Use #Edje_Message_String structs as message body, for this type. */
341    EDJE_MESSAGE_INT = 3, /**< A message with an integer number as value. Use #Edje_Message_Int structs as message body, for this type. */
342    EDJE_MESSAGE_FLOAT = 4, /**< A message with a floating pointer number as value. Use #Edje_Message_Float structs as message body, for this type. */
343
344    EDJE_MESSAGE_STRING_SET = 5, /**< A message with a list of strings as value. Use #Edje_Message_String_Set structs as message body, for this type. */
345    EDJE_MESSAGE_INT_SET = 6, /**< A message with a list of integer numbers as value. Use #Edje_Message_Int_Set structs as message body, for this type. */
346    EDJE_MESSAGE_FLOAT_SET = 7, /**< A message with a list of floating point numbers as value. Use #Edje_Message_Float_Set structs as message body, for this type. */
347
348    EDJE_MESSAGE_STRING_INT = 8, /**< A message with a struct containing a string and an integer number as value. Use #Edje_Message_String_Int structs as message body, for this type. */
349    EDJE_MESSAGE_STRING_FLOAT = 9, /**< A message with a struct containing a string and a floating point number as value. Use #Edje_Message_String_Float structs as message body, for this type. */
350
351    EDJE_MESSAGE_STRING_INT_SET = 10, /**< A message with a struct containing a string and list of integer numbers as value. Use #Edje_Message_String_Int_Set structs as message body, for this type. */
352    EDJE_MESSAGE_STRING_FLOAT_SET = 11 /**< A message with a struct containing a string and list of floating point numbers as value. Use #Edje_Message_String_Float_Set structs as message body, for this type. */
353 } Edje_Message_Type;
354
355 typedef enum _Edje_Aspect_Control
356 {
357    EDJE_ASPECT_CONTROL_NONE = 0,
358    EDJE_ASPECT_CONTROL_NEITHER = 1,
359    EDJE_ASPECT_CONTROL_HORIZONTAL = 2,
360    EDJE_ASPECT_CONTROL_VERTICAL = 3,
361    EDJE_ASPECT_CONTROL_BOTH = 4
362 } Edje_Aspect_Control;
363
364 typedef enum _Edje_Object_Table_Homogeneous_Mode
365 {
366    EDJE_OBJECT_TABLE_HOMOGENEOUS_NONE = 0,
367    EDJE_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1,
368    EDJE_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2
369 } Edje_Object_Table_Homogeneous_Mode;
370
371 typedef enum _Edje_Part_Type
372 {
373    EDJE_PART_TYPE_NONE      = 0,
374    EDJE_PART_TYPE_RECTANGLE = 1,
375    EDJE_PART_TYPE_TEXT      = 2,
376    EDJE_PART_TYPE_IMAGE     = 3,
377    EDJE_PART_TYPE_SWALLOW   = 4,
378    EDJE_PART_TYPE_TEXTBLOCK = 5,
379    EDJE_PART_TYPE_GRADIENT  = 6,
380    EDJE_PART_TYPE_GROUP     = 7,
381    EDJE_PART_TYPE_BOX       = 8,
382    EDJE_PART_TYPE_TABLE     = 9,
383    EDJE_PART_TYPE_EXTERNAL  = 10,
384    EDJE_PART_TYPE_PROXY     = 11,
385    EDJE_PART_TYPE_SPACER    = 12, /**< @since 1.7 */
386    EDJE_PART_TYPE_LAST      = 13
387 } Edje_Part_Type;
388
389 typedef enum _Edje_Text_Effect
390 {
391 #define EDJE_TEXT_EFFECT_MASK_BASIC 0xf
392 #define EDJE_TEXT_EFFECT_BASIC_SET(x, s) \
393    do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_BASIC) | (s); } while (0)
394    EDJE_TEXT_EFFECT_NONE                = 0,
395    EDJE_TEXT_EFFECT_PLAIN               = 1,
396    EDJE_TEXT_EFFECT_OUTLINE             = 2,
397    EDJE_TEXT_EFFECT_SOFT_OUTLINE        = 3,
398    EDJE_TEXT_EFFECT_SHADOW              = 4,
399    EDJE_TEXT_EFFECT_SOFT_SHADOW         = 5,
400    EDJE_TEXT_EFFECT_OUTLINE_SHADOW      = 6,
401    EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW = 7,
402    EDJE_TEXT_EFFECT_FAR_SHADOW          = 8,
403    EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW     = 9,
404    EDJE_TEXT_EFFECT_GLOW                = 10,
405
406    EDJE_TEXT_EFFECT_LAST                = 11,
407
408 #define EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION (0x7 << 4)
409 #define EDJE_TEXT_EFFECT_SHADOW_DIRECTION_SET(x, s) \
410    do { x = ((x) & ~EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION) | (s); } while (0)
411    EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4),
412    EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM       = (0x1 << 4),
413    EDJE_TEXT_EFFECT_SHADOW_DIRECTION_BOTTOM_LEFT  = (0x2 << 4),
414    EDJE_TEXT_EFFECT_SHADOW_DIRECTION_LEFT         = (0x3 << 4),
415    EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_LEFT     = (0x4 << 4),
416    EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP          = (0x5 << 4),
417    EDJE_TEXT_EFFECT_SHADOW_DIRECTION_TOP_RIGHT    = (0x6 << 4),
418    EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT        = (0x7 << 4)
419 } Edje_Text_Effect;
420
421 typedef enum _Edje_Action_Type
422 {
423    EDJE_ACTION_TYPE_NONE                = 0,
424    EDJE_ACTION_TYPE_STATE_SET           = 1,
425    EDJE_ACTION_TYPE_ACTION_STOP         = 2,
426    EDJE_ACTION_TYPE_SIGNAL_EMIT         = 3,
427    EDJE_ACTION_TYPE_DRAG_VAL_SET        = 4,
428    EDJE_ACTION_TYPE_DRAG_VAL_STEP       = 5,
429    EDJE_ACTION_TYPE_DRAG_VAL_PAGE       = 6,
430    EDJE_ACTION_TYPE_SCRIPT              = 7,
431    EDJE_ACTION_TYPE_FOCUS_SET           = 8,
432    EDJE_ACTION_TYPE_RESERVED00          = 9,
433    EDJE_ACTION_TYPE_FOCUS_OBJECT        = 10,
434    EDJE_ACTION_TYPE_PARAM_COPY          = 11,
435    EDJE_ACTION_TYPE_PARAM_SET           = 12,
436    EDJE_ACTION_TYPE_SOUND_SAMPLE        = 13, /**< @since 1.1 */
437    EDJE_ACTION_TYPE_SOUND_TONE          = 14, /**< @since 1.1 */
438    EDJE_ACTION_TYPE_LAST                = 15
439 } Edje_Action_Type;
440
441 typedef enum _Edje_Tween_Mode
442 {
443    EDJE_TWEEN_MODE_NONE              = 0,
444    EDJE_TWEEN_MODE_LINEAR            = 1,
445    EDJE_TWEEN_MODE_SINUSOIDAL        = 2,
446    EDJE_TWEEN_MODE_ACCELERATE        = 3,
447    EDJE_TWEEN_MODE_DECELERATE        = 4,
448    EDJE_TWEEN_MODE_ACCELERATE_FACTOR = 5,
449    EDJE_TWEEN_MODE_DECELERATE_FACTOR = 6,
450    EDJE_TWEEN_MODE_SINUSOIDAL_FACTOR = 7,
451    EDJE_TWEEN_MODE_DIVISOR_INTERP    = 8,
452    EDJE_TWEEN_MODE_BOUNCE            = 9,
453    EDJE_TWEEN_MODE_SPRING            = 10,
454    EDJE_TWEEN_MODE_LAST              = 11,
455    EDJE_TWEEN_MODE_MASK              = 0xff,
456    EDJE_TWEEN_MODE_OPT_FROM_CURRENT  = (1 << 31)
457 } Edje_Tween_Mode;
458
459 typedef enum _Edje_Cursor
460 {
461    EDJE_CURSOR_MAIN,
462    EDJE_CURSOR_SELECTION_BEGIN,
463    EDJE_CURSOR_SELECTION_END,
464    EDJE_CURSOR_PREEDIT_START,
465    EDJE_CURSOR_PREEDIT_END,
466    EDJE_CURSOR_USER,
467    EDJE_CURSOR_USER_EXTRA,
468    // more later
469 } Edje_Cursor;
470
471 struct _Edje_Entry_Change_Info
472 {
473    union {
474         struct {
475              const char *content;
476              size_t pos;
477              size_t plain_length; /* Number of cursor positions represented
478                                      in content. */
479         } insert;
480         struct {
481              const char *content;
482              size_t start, end;
483         } del;
484    } change;
485    Eina_Bool insert : 1; /**< True if the "change" union's "insert" is valid */
486    Eina_Bool merge : 1; /**< True if can be merged with the previous one. Used for example with insertion when something is already selected. */
487 };
488
489 /**
490  * @since 1.1.0
491  */
492 typedef struct _Edje_Entry_Change_Info        Edje_Entry_Change_Info;
493
494 typedef struct _Edje_Message_String           Edje_Message_String;
495 typedef struct _Edje_Message_Int              Edje_Message_Int;
496 typedef struct _Edje_Message_Float            Edje_Message_Float;
497 typedef struct _Edje_Message_String_Set       Edje_Message_String_Set;
498 typedef struct _Edje_Message_Int_Set          Edje_Message_Int_Set;
499 typedef struct _Edje_Message_Float_Set        Edje_Message_Float_Set;
500 typedef struct _Edje_Message_String_Int       Edje_Message_String_Int;
501 typedef struct _Edje_Message_String_Float     Edje_Message_String_Float;
502 typedef struct _Edje_Message_String_Int_Set   Edje_Message_String_Int_Set;
503 typedef struct _Edje_Message_String_Float_Set Edje_Message_String_Float_Set;
504
505 struct _Edje_Message_String
506 {
507    char *str; /**< The message's string pointer */
508 }; /**< Structure passed as value on #EDJE_MESSAGE_STRING messages. The string in it is automatically freed be Edje if passed to you by Edje */
509
510 struct _Edje_Message_Int
511 {
512    int val; /**< The message's value */
513 }; /**< Structure passed as value on #EDJE_MESSAGE_INT messages */
514
515 struct _Edje_Message_Float
516 {
517    double val; /**< The message's value */
518 }; /**< Structure passed as value on #EDJE_MESSAGE_FLOAT messages */
519
520 struct _Edje_Message_String_Set
521 {
522    int count; /**< The size of the message's array (may be greater than 1) */
523    char *str[1]; /**< The message's @b array of string pointers */
524 }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_SET messages. The array in it is automatically freed be Edje if passed to you by Edje */
525
526 struct _Edje_Message_Int_Set
527 {
528    int count; /**< The size of the message's array (may be greater than 1) */
529    int val[1]; /**< The message's @b array of integers */
530 }; /**< Structure passed as value on #EDJE_MESSAGE_INT_SET messages. The array in it is automatically freed be Edje if passed to you by Edje */
531
532 struct _Edje_Message_Float_Set
533 {
534    int count; /**< The size of the message's array (may be greater than 1) */
535    double val[1]; /**< The message's @b array of floats */
536 }; /**< Structure passed as value on #EDJE_MESSAGE_FLOAT_SET messages. The array in it is automatically freed be Edje if passed to you by Edje */
537
538 struct _Edje_Message_String_Int
539 {
540    char *str; /**< The message's string value */
541    int val; /**< The message's integer value */
542 }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_INT messages. The string in it is automatically freed be Edje if passed to you by Edje */
543
544 struct _Edje_Message_String_Float
545 {
546    char *str; /**< The message's string value */
547    double val; /**< The message's float value */
548 }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_FLOAT messages. The string in it is automatically freed be Edje if passed to you by Edje */
549
550 struct _Edje_Message_String_Int_Set
551 {
552    char *str; /**< The message's string value */
553    int count; /**< The size of the message's array (may be greater than 1) */
554    int val[1]; /**< The message's @b array of integers */
555 }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_INT_SET messages. The array and string in it are automatically freed be Edje if passed to you by Edje */
556
557 struct _Edje_Message_String_Float_Set
558 {
559    char *str; /**< The message's string value */
560    int count; /**< The size of the message's array (may be greater than 1) */
561    double val[1]; /**< The message's @b array of floats */
562 }; /**< Structure passed as value on #EDJE_MESSAGE_STRING_FLOAT_SET messages. The array and string in it are automatically freed be Edje if passed to you by Edje */
563
564 typedef enum _Edje_Drag_Dir
565 {
566    EDJE_DRAG_DIR_NONE = 0,
567    EDJE_DRAG_DIR_X = 1,
568    EDJE_DRAG_DIR_Y = 2,
569    EDJE_DRAG_DIR_XY = 3
570 } Edje_Drag_Dir;
571
572 typedef enum _Edje_Load_Error
573 {
574    EDJE_LOAD_ERROR_NONE = 0, /**< No error happened, the loading was successful */
575    EDJE_LOAD_ERROR_GENERIC = 1, /**< A generic error happened during the loading */
576    EDJE_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< The file pointed to did not exist */
577    EDJE_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission to read the given file was denied */
578    EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Resource allocation failed during the loading */
579    EDJE_LOAD_ERROR_CORRUPT_FILE = 5, /**< The file pointed to was corrupt */
580    EDJE_LOAD_ERROR_UNKNOWN_FORMAT = 6, /**< The file pointed to had an unknown format */
581    EDJE_LOAD_ERROR_INCOMPATIBLE_FILE = 7, /**< The file pointed to is incompatible, i.e., it doesn't match the library's current version's format */
582    EDJE_LOAD_ERROR_UNKNOWN_COLLECTION = 8, /**< The group/collection set to load from was @b not found in the file */
583    EDJE_LOAD_ERROR_RECURSIVE_REFERENCE = 9 /**< The group/collection set to load from had <b>recursive references</b> on its components */
584 } Edje_Load_Error; /**< Edje file loading error codes one can get - see edje_load_error_str() too. */
585
586 typedef enum _Edje_Text_Filter_Type
587 {
588    EDJE_TEXT_FILTER_TEXT = 0,
589    EDJE_TEXT_FILTER_FORMAT = 1,
590    EDJE_TEXT_FILTER_MARKUP = 2
591 } Edje_Text_Filter_Type;
592
593 typedef enum _Edje_Text_Autocapital_Type
594 {
595    EDJE_TEXT_AUTOCAPITAL_TYPE_NONE,
596    EDJE_TEXT_AUTOCAPITAL_TYPE_WORD,
597    EDJE_TEXT_AUTOCAPITAL_TYPE_SENTENCE,
598    EDJE_TEXT_AUTOCAPITAL_TYPE_ALLCHARACTER
599 } Edje_Text_Autocapital_Type;
600
601 /**
602  * The possible types the parameters of an EXTERNAL part can be.
603  */
604 typedef enum _Edje_External_Param_Type
605 {
606    EDJE_EXTERNAL_PARAM_TYPE_INT, /**< Parameter value is an integer. */
607    EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, /**< Parameter value is a double. */
608    EDJE_EXTERNAL_PARAM_TYPE_STRING, /**< Parameter value is a string. */
609    EDJE_EXTERNAL_PARAM_TYPE_BOOL, /**< Parameter value is boolean. */
610    EDJE_EXTERNAL_PARAM_TYPE_CHOICE, /**< Parameter value is one of a set of
611                                       predefined string choices. */
612    EDJE_EXTERNAL_PARAM_TYPE_MAX /**< Sentinel. Don't use. */
613 } Edje_External_Param_Type;
614
615 /**
616  * Flags that determine how a parameter may be accessed in different
617  * circumstances.
618  */
619 typedef enum _Edje_External_Param_Flags
620 {
621    EDJE_EXTERNAL_PARAM_FLAGS_NONE        = 0, /**< Property is incapable of operations, this is used to catch bogus flags. */
622    EDJE_EXTERNAL_PARAM_FLAGS_GET         = (1 << 0), /**< Property can be read/get. */
623    EDJE_EXTERNAL_PARAM_FLAGS_SET         = (1 << 1), /**< Property can be written/set. This only enables edje_object_part_external_param_set() and Embryo scripts. To enable the parameter being set from state description whenever it changes state, use #EDJE_EXTERNAL_PARAM_FLAGS_STATE. */
624    EDJE_EXTERNAL_PARAM_FLAGS_STATE       = (1 << 2), /**< Property can be set from state description. */
625    EDJE_EXTERNAL_PARAM_FLAGS_CONSTRUCTOR = (1 << 3), /**< This property is only set once when the object is constructed using its value from "default" 0.0 state description. Setting this overrides #EDJE_EXTERNAL_PARAM_FLAGS_STATE. */
626    EDJE_EXTERNAL_PARAM_FLAGS_REGULAR     = (EDJE_EXTERNAL_PARAM_FLAGS_GET |
627                                             EDJE_EXTERNAL_PARAM_FLAGS_SET |
628                                             EDJE_EXTERNAL_PARAM_FLAGS_STATE) /**< Convenience flag that sets property as GET, SET and STATE. */
629 } Edje_External_Param_Flags;
630
631 typedef enum _Edje_Input_Panel_Layout
632 {
633    EDJE_INPUT_PANEL_LAYOUT_NORMAL,          /**< Default layout */
634    EDJE_INPUT_PANEL_LAYOUT_NUMBER,          /**< Number layout */
635    EDJE_INPUT_PANEL_LAYOUT_EMAIL,           /**< Email layout */
636    EDJE_INPUT_PANEL_LAYOUT_URL,             /**< URL layout */
637    EDJE_INPUT_PANEL_LAYOUT_PHONENUMBER,     /**< Phone Number layout */
638    EDJE_INPUT_PANEL_LAYOUT_IP,              /**< IP layout */
639    EDJE_INPUT_PANEL_LAYOUT_MONTH,           /**< Month layout */
640    EDJE_INPUT_PANEL_LAYOUT_NUMBERONLY,      /**< Number Only layout */
641    EDJE_INPUT_PANEL_LAYOUT_INVALID,         /**< Never use this */
642    EDJE_INPUT_PANEL_LAYOUT_HEX,             /**< Hexadecimal layout @since 1.2 */
643    EDJE_INPUT_PANEL_LAYOUT_TERMINAL,        /**< Command-line terminal layout @since 1.2 */
644    EDJE_INPUT_PANEL_LAYOUT_PASSWORD         /**< Like normal, but no auto-correct, no auto-capitalization etc. @since 1.2 */
645 } Edje_Input_Panel_Layout;
646
647 typedef enum _Edje_Input_Panel_Lang
648 {
649    EDJE_INPUT_PANEL_LANG_AUTOMATIC,    /**< Automatic @since 1.2 */
650    EDJE_INPUT_PANEL_LANG_ALPHABET      /**< Alphabet @since 1.2 */
651 } Edje_Input_Panel_Lang;
652
653 typedef enum _Edje_Input_Panel_Return_Key_Type
654 {
655    EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DEFAULT, /**< Default @since 1.2 */
656    EDJE_INPUT_PANEL_RETURN_KEY_TYPE_DONE,    /**< Done @since 1.2 */
657    EDJE_INPUT_PANEL_RETURN_KEY_TYPE_GO,      /**< Go @since 1.2 */
658    EDJE_INPUT_PANEL_RETURN_KEY_TYPE_JOIN,    /**< Join @since 1.2 */
659    EDJE_INPUT_PANEL_RETURN_KEY_TYPE_LOGIN,   /**< Login @since 1.2 */
660    EDJE_INPUT_PANEL_RETURN_KEY_TYPE_NEXT,    /**< Next @since 1.2 */
661    EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEARCH,  /**< Search or magnifier icon @since 1.2 */
662    EDJE_INPUT_PANEL_RETURN_KEY_TYPE_SEND     /**< Send @since 1.2 */
663 } Edje_Input_Panel_Return_Key_Type;
664
665 /**
666  * @brief Converts type identifier to string nicer representation.
667  *
668  * This may be used to debug or other informational purposes.
669  *
670  * @param type the identifier to convert.
671  * @return the string with the string representation, or @c "(unknown)".
672  */
673 EAPI const char *edje_external_param_type_str(Edje_External_Param_Type type) EINA_PURE;
674
675 /**
676  * Struct that holds parameters for parts of type EXTERNAL.
677  */
678 struct _Edje_External_Param
679 {
680    const char               *name; /**< The name of the parameter. */
681    Edje_External_Param_Type  type; /**< The type of the parameter. This defines
682                                      which of the next three variables holds
683                                      the value for it. */
684    // XXX these could be in a union, but eet doesn't support them (or does it?)
685    int                       i; /**< Used by both integer and boolean */
686    double                    d; /**< Used by double */
687    const char               *s; /**< Used by both string and choice */
688 };
689 /**
690  * Struct that holds parameters for parts of type EXTERNAL.
691  */
692 typedef struct _Edje_External_Param Edje_External_Param;
693
694 /**
695  * Helper macro to indicate an EXTERNAL's integer parameter is undefined.
696  */
697 #define EDJE_EXTERNAL_INT_UNSET INT_MAX
698 /**
699  * Helper macro to indicate an EXTERNAL's double parameter is undefined.
700  */
701 #define EDJE_EXTERNAL_DOUBLE_UNSET DBL_MAX
702
703 /**
704  * Struct holding information about an EXTERNAL part's parameters.
705  *
706  * When creating types to use with EXTERNAL parts, an array of this type is
707  * used to describe the different parameters the object uses.
708  *
709  * This struct holds the name, type and flags that define how and when the
710  * parameter is used, as well as information specific to each type, like the
711  * maximum or minimum value, that can be used by editors to restrict the
712  * range of values to set for each parameter.
713  */
714 typedef struct _Edje_External_Param_Info Edje_External_Param_Info;
715 /**
716  * Struct holding information about an EXTERNAL part's parameters.
717  *
718  * When creating types to use with EXTERNAL parts, an array of this type is
719  * used to describe the different parameters the object uses.
720  *
721  * This struct holds the name, type and flags that define how and when the
722  * parameter is used, as well as information specific to each type, like the
723  * maximum or minimum value, that can be used by editors to restrict the
724  * range of values to set for each parameter.
725  */
726 struct _Edje_External_Param_Info
727 {
728    const char               *name; /**< Name of the parameter. */
729    Edje_External_Param_Type  type; /**< Type of the parameter. */
730    Edje_External_Param_Flags flags; /**< Flags indicating how this parameter is
731                                       used. */
732    union {
733       struct {
734          int                 def, /**< Default value for the parameter. */
735                              min, /**< Minimum value it can have. */
736                              max, /**< Maximum value it can have. */
737                              step; /**< Values will be a multiple of this. */
738       } i; /**< Info about integer type parameters. Use #EDJE_EXTERNAL_INT_UNSET
739              on any of them to indicate they are not defined.*/
740       struct {
741          double              def, /**< Default value for the parameter. */
742                              min, /**< Minimum value it can have. */
743                              max, /**< Maximum value it can have. */
744                              step; /**< Values will be a multiple of this. */
745       } d; /**< Info about double type parameters. Use
746 #EDJE_EXTERNAL_DOUBLE_UNSET on any of them to indicate they are not defined.*/
747       struct {
748          const char         *def; /**< Default value. */
749          const char         *accept_fmt; /**< Not implemented. */
750          const char         *deny_fmt; /**< Not implemented */
751       } s; /**< Info about string type parameters. NULL indicates undefined. */
752       struct {
753          int                 def; /**< Default value. */
754          const char         *false_str; /**< String shown by editors to indicate the false state. */
755          const char         *true_str; /**< String shown by editors to indicate the true state. */
756       } b; /**< Info about boolean type parameters.*/
757       struct {
758          const char         *def; /**< Default value. */
759          const char        **choices; /* Array of strings, each represents a
760                                          valid value for this parameter. The
761                                          last element of the array must be
762                                          NULL. */
763          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 */
764          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 */
765       } c; /**< Info about choice type parameters. */
766    } info;
767 };
768
769 #define EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, min, max, step, flags) \
770   {name, EDJE_EXTERNAL_PARAM_TYPE_INT, flags, {.i = {def, min, max, step}}}
771 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, min, max, step, flags) \
772   {name, EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, flags, {.d = {def, min, max, step}}}
773 #define EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, accept, deny, flags) \
774   {name, EDJE_EXTERNAL_PARAM_TYPE_STRING, flags, {.s = {def, accept, deny}}}
775 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, false_str, true_str, flags) \
776   {name, EDJE_EXTERNAL_PARAM_TYPE_BOOL, flags, {.b = {def, false_str, true_str}}}
777 #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL_FLAGS(name, def, choices, flags) \
778   {name, EDJE_EXTERNAL_PARAM_TYPE_CHOICE, flags, {.c = {def, choices, NULL, NULL}}}
779 #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL_FLAGS(name, def_get, query, flags) \
780   {name, EDJE_EXTERNAL_PARAM_TYPE_CHOICE, flags, {.c = {NULL, NULL, def_get, query}}}
781
782 #define EDJE_EXTERNAL_PARAM_INFO_INT_FULL(name, def, min, max, step) \
783   EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, min, max, step, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
784 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL(name, def, min, max, step) \
785   EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, min, max, step, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
786 #define EDJE_EXTERNAL_PARAM_INFO_STRING_FULL(name, def, accept, deny) \
787   EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, accept, deny, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
788 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL(name, def, false_str, true_str) \
789   EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, false_str, true_str, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
790 #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL(name, def, choices) \
791   EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL_FLAGS(name, def, choices, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
792 #define EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL(name, def_get, query) \
793   EDJE_EXTERNAL_PARAM_INFO_CHOICE_DYNAMIC_FULL_FLAGS(name, def_get, query, EDJE_EXTERNAL_PARAM_FLAGS_REGULAR)
794
795 #define EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT(name, def) \
796    EDJE_EXTERNAL_PARAM_INFO_INT_FULL(name, def, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET)
797 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT(name, def) \
798    EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL(name, def, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET)
799 #define EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT(name, def) \
800    EDJE_EXTERNAL_PARAM_INFO_STRING_FULL(name, def, NULL, NULL)
801 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT(name, def) \
802    EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL(name, def, "false", "true")
803
804 #define EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT_FLAGS(name, def, flags)    \
805   EDJE_EXTERNAL_PARAM_INFO_INT_FULL_FLAGS(name, def, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, EDJE_EXTERNAL_INT_UNSET, flags)
806 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT_FLAGS(name, def, flags) \
807   EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FULL_FLAGS(name, def, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, EDJE_EXTERNAL_DOUBLE_UNSET, flags)
808 #define EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT_FLAGS(name, def, flags) \
809   EDJE_EXTERNAL_PARAM_INFO_STRING_FULL_FLAGS(name, def, NULL, NULL, flags)
810 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT_FLAGS(name, def, flags)   \
811   EDJE_EXTERNAL_PARAM_INFO_BOOL_FULL_FLAGS(name, def, "false", "true", flags)
812
813 #define EDJE_EXTERNAL_PARAM_INFO_INT(name) \
814    EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT(name, 0)
815 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE(name) \
816    EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT(name, 0.0)
817 #define EDJE_EXTERNAL_PARAM_INFO_STRING(name) \
818    EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT(name, NULL)
819 #define EDJE_EXTERNAL_PARAM_INFO_BOOL(name) \
820    EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT(name, 0)
821
822 #define EDJE_EXTERNAL_PARAM_INFO_INT_FLAGS(name, flags) \
823    EDJE_EXTERNAL_PARAM_INFO_INT_DEFAULT_FLAGS(name, 0, flags)
824 #define EDJE_EXTERNAL_PARAM_INFO_DOUBLE_FLAGS(name, flags) \
825    EDJE_EXTERNAL_PARAM_INFO_DOUBLE_DEFAULT_FLAGS(name, 0.0, flags)
826 #define EDJE_EXTERNAL_PARAM_INFO_STRING_FLAGS(name, flags) \
827    EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT_FLAGS(name, NULL, flags)
828 #define EDJE_EXTERNAL_PARAM_INFO_BOOL_FLAGS(name, flags) \
829    EDJE_EXTERNAL_PARAM_INFO_BOOL_DEFAULT_FLAGS(name, 0, flags)
830
831 #define EDJE_EXTERNAL_PARAM_INFO_SENTINEL {NULL, 0, 0, {.s = {NULL, NULL, NULL}}}
832
833 /**
834  * @struct _Edje_External_Type
835  *
836  * @brief Information about an external type to be used.
837  *
838  * This structure provides information on how to display and modify a
839  * third party Evas_Object in Edje.
840  *
841  * Some function pointers are not really used by Edje, but provide
842  * means for Edje users to better interact with such objects. For
843  * instance, an editor may use label_get() and icon_get() to list all
844  * registered external types.
845  *
846  * @note The function pointers provided in this structure must check
847  *       for errors and invalid or out-of-range values as for
848  *       performance reasons Edje will not enforce hints provided as
849  *       #Edje_External_Param_Info in the member parameters_info.
850  */
851 struct _Edje_External_Type
852 {
853 #define EDJE_EXTERNAL_TYPE_ABI_VERSION (3)
854   unsigned int  abi_version; /**< always use:
855                               *  - #EDJE_EXTERNAL_TYPE_ABI_VERSION to declare.
856                               *  - edje_external_type_abi_version_get() to check.
857                               */
858   const char    *module; /**< Name of the module that holds these definitions,
859                            as used in the externals {} block of a theme
860                            definition. */
861   const char    *module_name; /**< Canonical name of the module, for displaying
862                                 in edition programs, for example. */
863   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. @p part_name is the name of the part that holds the object and can be used to forward callbacks from the object as signals from Edje. @p params is the list of #Edje_External_Param, not parsed, from the default state of the part. Parameters of type #EDJE_EXTERNAL_PARAM_FLAGS_CONSTRUCTOR should be set on
864  the object here. */
865   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(). The @p pos parameter is a value between 0.0 and 1.0 indicating the position in time within the state transition. */
866   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) */
867   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 */
868   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!) */
869   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!) */
870   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() */
871   void         (*params_free) (void *params); /**< Free parameters parsed with params_parse() */
872
873   /* The following callbacks aren't used by Edje itself, but by UI design
874      tools instead */
875   const char  *(*label_get) (void *data); /**< Get a label to use to identify this EXTERNAL. (For editors) */
876   const char  *(*description_get) (void *data); /**< Get a user friendly description of this EXTERNAL. (For editors) */
877   Evas_Object *(*icon_add) (void *data, Evas *e); /**< Get an icon to use to identify this EXTERNAL. (For editors) */
878   Evas_Object *(*preview_add) (void *data, Evas *e); /**< Get a preview of the EXTERNAL object in use. (For editors) */
879   const char  *(*translate) (void *data, const char *orig); /**< called to translate parameters_info name properties for use in user interfaces that support internationalization (i18n) (For editors) */
880
881   Edje_External_Param_Info *parameters_info; /**< An array of #Edje_External_Param_Info describing the different parameters this EXTERNAL may have. The last element in the array must be #EDJE_EXTERNAL_PARAM_INFO_SENTINEL. */
882   void                     *data; /**< Private user data that will be passed to all of the class functions. */
883 };
884 typedef struct _Edje_External_Type Edje_External_Type;
885
886 /**
887  * Convenience struct used to mass-register types of EXTERNAL objects.
888  *
889  * Used with edje_external_type_array_register().
890  */
891 struct _Edje_External_Type_Info
892 {
893    const char               *name; /**< The name of the type to register. */
894    const Edje_External_Type *info; /**< The type definition. */
895 };
896 typedef struct _Edje_External_Type_Info Edje_External_Type_Info;
897
898 typedef void         (*Edje_Signal_Cb)          (void *data, Evas_Object *obj, const char *emission, const char *source); /**< Edje signal callback functions's prototype definition. @c data will have the auxiliary data pointer set at the time the callback registration. @c obj will be a pointer the Edje object where the signal comes from. @c emission will identify the exact signal's emission string and @c source the exact signal's source one. */
899 typedef void         (*Edje_Text_Change_Cb)     (void *data, Evas_Object *obj, const char *part);
900 typedef void         (*Edje_Message_Handler_Cb) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg); /**< Edje message handler callback functions's prototype definition. @c data will have the auxiliary data pointer set at the time the callback registration. @c obj will be a pointer the Edje object where the message comes from. @c type will identify the type of the given message and @c msg will be a pointer the message's contents, de facto, which depend on @c type. */
901 typedef void         (*Edje_Text_Filter_Cb)     (void *data, Evas_Object *obj, const char *part, Edje_Text_Filter_Type type, char **text);
902 typedef void         (*Edje_Markup_Filter_Cb)   (void *data, Evas_Object *obj, const char *part, char **text);
903 typedef Evas_Object *(*Edje_Item_Provider_Cb)   (void *data, Evas_Object *obj, const char *part, const char *item);
904
905 /**
906  * @brief Initialize the Edje library.
907  *
908  * @return The new init count. The initial value is zero.
909  *
910  * This function initializes the Ejde library, making the proper calls
911  * to internal initialization functions. It will also initialize its
912  * @b dependencies, making calls to @c eina_init(), @c ecore_init(),
913  * @c embryo_init() and @c eet_init(). So, there is no need to call
914  * those functions again, in your code. To shutdown Edje there is the
915  * function edje_shutdown().
916  *
917  * @see edje_shutdown()
918  * @see eina_init()
919  * @see ecore_init()
920  * @see embryo_init()
921  * @see eet_init()
922  *
923  */
924 EAPI int          edje_init                       (void);
925
926 /**
927  * @brief Shutdown the Edje library.
928  *
929  * @return The number of times the library has been initialised
930  *         without being shutdown.
931  *
932  * This function shuts down the Edje library. It will also call the
933  * shutdown functions of its @b dependencies, which are @c
934  * eina_shutdown(), @c ecore_shutdown(), @c embryo_shutdown() and @c
935  * eet_shutdown(), so there is no need to call these functions again,
936  * in your code.
937  *
938  * @see edje_init()
939  * @see eina_shutdown()
940  * @see ecore_shutdown()
941  * @see embryo_shutdown()
942  * @see eet_shutdown()
943  *
944  */
945 EAPI int          edje_shutdown                   (void);
946
947 /**
948  * @brief Set edje trasitions' frame time.
949  *
950  * @param t The frame time, in seconds. Default value is 1/30.
951  *
952  * This function sets the edje built-in animations' frame time (thus,
953  * affecting their resolution) by calling
954  * ecore_animator_frametime_set(). This frame time can be retrieved
955  * with edje_frametime_get().
956  *
957  * @see edje_frametime_get()
958  *
959  */
960 EAPI void         edje_frametime_set              (double t);
961
962 /**
963  * @brief Get edje trasitions' frame time.
964  *
965  * @return The frame time, in seconds.
966  *
967  * This function returns the edje frame time set by
968  * edje_frametime_set() or the default value 1/30.
969  *
970  * @see edje_frametime_set()
971  *
972  */
973 EAPI double       edje_frametime_get              (void);
974
975 /**
976  * @brief Freeze Edje objects.
977  *
978  * This function freezes all Edje animations in the current process.
979  *
980  * @note: for freeze a specific object @see edje_object_freeze().
981  *
982  * @see edje_thaw()
983  *
984  */
985 EAPI void         edje_freeze                     (void);
986
987 /**
988  * @brief Thaw Edje objects.
989  *
990  * This function thaws all Edje animations in the current process.
991  *
992  * @note for thaw a specific object @see edje_object_thaw().
993  *
994  * @see edje_freeze()
995  *
996  */
997 EAPI void         edje_thaw                       (void);
998
999 /**
1000  * @brief Set the edje append fontset.
1001  *
1002  * @param fonts The fontset to append.
1003  *
1004  * This function sets the edje append fontset.
1005  *
1006  */
1007 EAPI void         edje_fontset_append_set         (const char *fonts);
1008
1009 /**
1010  * @brief Get the edje append fontset.
1011  *
1012  * @return The edje append fontset.
1013  *
1014  * This function returns the edje append fontset set by
1015  * edje_fontset_append_set() function.
1016  *
1017  * @see edje_fontset_append_set().
1018  *
1019  */
1020 EAPI const char  *edje_fontset_append_get         (void);
1021
1022 /**
1023  * @brief Set Edje's global scaling factor.
1024  *
1025  * @param scale The global scaling factor (the default value is @c 1.0)
1026  *
1027  * Edje allows one to build scalable interfaces. Scaling factors,
1028  * which are set to neutral (@c 1.0) values by default (no scaling,
1029  * actual sizes), are of two types: @b global and @b individual.
1030  * Edje's global scaling factor will affect all its objects which
1031  * hadn't their individual scaling factors altered from the default
1032  * value (which is zero). If they had it set differently, by
1033  * edje_object_scale_set(), that factor will @b override the global
1034  * one.
1035  *
1036  * Scaling affects the values of minimum/maximum @b part sizes, which
1037  * are @b multiplied by it. Font sizes are scaled, too.
1038  *
1039  * @warning Only parts which, at EDC level, had the @c "scale"
1040  * property set to @c 1, will be affected by this function. Check the
1041  * complete @ref edcref "syntax reference" for EDC files.
1042  *
1043  * @see edje_scale_get().
1044  */
1045 EAPI void         edje_scale_set                  (double scale);
1046
1047 /**
1048  * @brief Retrieve Edje's global scaling factor.
1049  *
1050  * @return The global scaling factor
1051  *
1052  * This function returns Edje's global scaling factor.
1053  *
1054  * @see edje_scale_set() for more details
1055  *
1056  */
1057 EAPI double       edje_scale_get                  (void);
1058
1059 /**
1060  * @brief Show last character in password mode.
1061  *
1062  * @param password_show_last If TRUE enable last character show in password mode.
1063  *
1064  * This function enables last input to be visible when in password mode for few seconds
1065  * or until the next input is entered.
1066  *
1067  * The time out value is obtained by edje_password_show_last_timeout_set function.
1068  *
1069  * @see edje_password_show_last_timeout_set().
1070  */
1071 EAPI void edje_password_show_last_set(Eina_Bool password_show_last);
1072
1073 /**
1074  * @brief Set's the timeout value in last show password mode.
1075  *
1076  * @param password_show_last_timeout The timeout value.
1077  *
1078  * This functions sets the time out value for which the last input entered in password
1079  * mode will be visible.
1080  *
1081  * This value can be used only when last show mode is set in password mode.
1082  *
1083  * @see edje_password_show_last_set().
1084  *
1085  */
1086 EAPI void edje_password_show_last_timeout_set(double password_show_last_timeout);
1087
1088 /**
1089  * @brief Set the scaling factor for a given Edje object.
1090  *
1091  * @param obj A handle to an Edje object
1092  * @param scale The scaling factor (the default value is @c 0.0,
1093  * meaning individual scaling @b not set)
1094  *
1095  * This function sets an @b individual scaling factor on the @a obj
1096  * Edje object. This property (or Edje's global scaling factor, when
1097  * applicable), will affect this object's part sizes. If @p scale is
1098  * not zero, than the individual scaling will @b override any global
1099  * scaling set, for the object @p obj's parts. Put it back to zero to
1100  * get the effects of the global scaling again.
1101  *
1102  * @warning Only parts which, at EDC level, had the @c "scale"
1103  * property set to @c 1, will be affected by this function. Check the
1104  * complete @ref edcref "syntax reference" for EDC files.
1105  *
1106  * @see edje_object_scale_get()
1107  * @see edje_scale_get() for more details
1108  */
1109 EAPI Eina_Bool    edje_object_scale_set           (Evas_Object *obj, double scale);
1110
1111 /**
1112  * @brief Get a given Edje object's scaling factor.
1113  *
1114  * @param obj A handle to an Edje object
1115  *
1116  * This function returns the @c individual scaling factor set on the
1117  * @a obj Edje object.
1118  *
1119  * @see edje_object_scale_set() for more details
1120  *
1121  */
1122 EAPI double       edje_object_scale_get           (const Evas_Object *obj);
1123
1124 /**
1125  * @brief Set the RTL orientation for this object.
1126  *
1127  * @param obj A handle to an Edje object.
1128  * @param rtl new value of flag EINA_TRUE/EINA_FALSE
1129  * @since 1.1.0
1130  */
1131 EAPI void         edje_object_mirrored_set        (Evas_Object *obj, Eina_Bool rtl);
1132
1133 /**
1134  * @brief Get the RTL orientation for this object.
1135  *
1136  * You can RTL orientation explicitly with edje_object_mirrored_set.
1137  *
1138  * @param obj A handle to an Edje object.
1139  * @return @c EINA_TRUE if the flag is set or @c EINA_FALSE if not.
1140  * @since 1.1.0
1141  */
1142 EAPI Eina_Bool    edje_object_mirrored_get        (const Evas_Object *obj);
1143
1144 /**
1145  * Get a list of groups in an edje file
1146  * @param file The path to the edje file
1147  *
1148  * @return The Eina_List of group names (char *)
1149  *
1150  * Note: the list must be freed using edje_file_collection_list_free()
1151  * when you are done with it.
1152  */
1153 EAPI Eina_List   *edje_file_collection_list       (const char *file);
1154
1155 /**
1156  * Free file collection list
1157  * @param lst The Eina_List of groups
1158  *
1159  * Frees the list returned by edje_file_collection_list().
1160  */
1161 EAPI void         edje_file_collection_list_free  (Eina_List *lst);
1162
1163 /**
1164  * Determine whether a group matching glob exists in an edje file.
1165  * @param file The file path
1166  * @param glob A glob to match on
1167  *
1168  * @return 1 if a match is found, 0 otherwise
1169  */
1170 EAPI Eina_Bool    edje_file_group_exists          (const char *file, const char *glob);
1171
1172 /**
1173  * Get data from the file level data block of an edje file
1174  * @param file The path to the .edj file
1175  * @param key The data key
1176  * @return The string value of the data. Must be freed by the user when no
1177  * longer needed.
1178  *
1179  * If an edje file is built from the following edc:
1180  *
1181  * data {
1182  *   item: "key1" "value1";
1183  *   item: "key2" "value2";
1184  * }
1185  * collections { ... }
1186  *
1187  * Then, edje_file_data_get("key1") will return "value1"
1188  */
1189 EAPI char        *edje_file_data_get              (const char *file, const char *key);
1190
1191 /**
1192  * @brief Set the file cache size.
1193  *
1194  * @param count The file cache size in edje file units. Default is 16.
1195  *
1196  * This function sets the file cache size. Edje keeps this cache in
1197  * order to prevent duplicates of edje file entries in memory. The
1198  * file cache size can be retrieved with edje_file_cache_get().
1199  *
1200  * @see edje_file_cache_get()
1201  * @see edje_file_cache_flush()
1202  *
1203  */
1204 EAPI void         edje_file_cache_set             (int count);
1205
1206 /**
1207  * @brief Return the file cache size.
1208  *
1209  * @return The file cache size in edje file units. Default is 16.
1210  *
1211  * This function returns the file cache size set by
1212  * edje_file_cache_set().
1213  *
1214  * @see edje_file_cache_set()
1215  * @see edje_file_cache_flush()
1216  *
1217  */
1218 EAPI int          edje_file_cache_get             (void);
1219
1220 /**
1221  * @brief Clean the file cache.
1222  *
1223  * This function cleans the file cache entries, but keeps this cache's
1224  * size to the last value set.
1225  *
1226  * @see edje_file_cache_set()
1227  * @see edje_file_cache_get()
1228  *
1229  */
1230 EAPI void         edje_file_cache_flush           (void);
1231
1232 /**
1233  * @brief Set the collection cache size.
1234  *
1235  * @param count The collection cache size, in edje object units. Default is 16.
1236  *
1237  * This function sets the collection cache size. Edje keeps this cache
1238  * in order to prevent duplicates of edje {collection,group,part}
1239  * entries in memory. The collection cache size can be retrieved with
1240  * edje_collection_cache_get().
1241  *
1242  * @see edje_collection_cache_get()
1243  * @see edje_collection_cache_flush()
1244  *
1245  */
1246 EAPI void         edje_collection_cache_set       (int count);
1247
1248 /**
1249  * @brief Return the collection cache size.
1250  *
1251  * @return The collection cache size, in edje object units. Default is 16.
1252  *
1253  * This function returns the collection cache size set by
1254  * edje_collection_cache_set().
1255  *
1256  * @see edje_collection_cache_set()
1257  * @see edje_collection_cache_flush()
1258  *
1259  */
1260 EAPI int          edje_collection_cache_get       (void);
1261
1262 /**
1263  * @brief Clean the collection cache.
1264  *
1265  * This function cleans the collection cache, but keeps this cache's
1266  * size to the last value set.
1267  *
1268  * @see edje_collection_cache_set()
1269  * @see edje_collection_cache_get()
1270  *
1271  */
1272 EAPI void         edje_collection_cache_flush     (void);
1273
1274 /**
1275  * @brief Set Edje color class.
1276  *
1277  * @param color_class
1278  * @param r Object Red value
1279  * @param g Object Green value
1280  * @param b Object Blue value
1281  * @param a Object Alpha value
1282  * @param r2 Outline Red value
1283  * @param g2 Outline Green value
1284  * @param b2 Outline Blue value
1285  * @param a2 Outline Alpha value
1286  * @param r3 Shadow Red value
1287  * @param g3 Shadow Green value
1288  * @param b3 Shadow Blue value
1289  * @param a3 Shadow Alpha value
1290  *
1291  * This function sets the color values for a process level color
1292  * class.  This will cause all edje parts in the current process that
1293  * have the specified color class to have their colors multiplied by
1294  * these values.  (Object level color classes set by
1295  * edje_object_color_class_set() will override the values set by this
1296  * function).
1297  *
1298  * The first color is the object, the second is the text outline, and
1299  * the third is the text shadow. (Note that the second two only apply
1300  * to text parts).
1301  *
1302  * Setting color emits a signal "color_class,set" with source being
1303  * the given color class in all objects.
1304  *
1305  * @see edje_color_class_set().
1306  *
1307  * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1308  *       half-transparent white is 255 255 255 128.
1309  */
1310 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);
1311
1312 /**
1313  * @brief Get Edje color class.
1314  *
1315  * @param color_class
1316  * @param r Object Red value
1317  * @param g Object Green value
1318  * @param b Object Blue value
1319  * @param a Object Alpha value
1320  * @param r2 Outline Red value
1321  * @param g2 Outline Green value
1322  * @param b2 Outline Blue value
1323  * @param a2 Outline Alpha value
1324  * @param r3 Shadow Red value
1325  * @param g3 Shadow Green value
1326  * @param b3 Shadow Blue value
1327  * @param a3 Shadow Alpha value
1328  *
1329  * @return EINA_TRUE if found or EINA_FALSE if not found and all
1330  *         values are zeroed.
1331  *
1332  * This function gets the color values for a process level color
1333  * class. This value is the globally set and not per-object, that is,
1334  * the value that would be used by objects if they did not override with
1335  * edje_object_color_class_set().
1336  *
1337  * The first color is the object, the second is the text outline, and
1338  * the third is the text shadow. (Note that the second two only apply
1339  * to text parts).
1340  *
1341  * @see edje_color_class_set().
1342  *
1343  * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1344  *       half-transparent white is 255 255 255 128.
1345  */
1346 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);
1347
1348 /**
1349  * @brief Delete edje color class.
1350  *
1351  * @param color_class
1352  *
1353  * This function deletes any values at the process level for the
1354  * specified color class.
1355  * @note Deleting the color class will revert it to the
1356  *       values defined in the theme file.
1357  *
1358  * Deleting the color class will emit the signal "color_class,del"
1359  * to all the Edje objects in the running program.
1360  */
1361 EAPI void         edje_color_class_del            (const char *color_class);
1362
1363 /**
1364  * @brief Lists color classes.
1365  *
1366  * @return A list of color class names (strings). These strings and
1367  * the list must be free()'d by the caller.
1368  *
1369  * This function lists all color classes known about by the current
1370  * process.
1371  *
1372  */
1373 EAPI Eina_List   *edje_color_class_list           (void);
1374
1375 /**
1376  * @brief Set the Edje text class.
1377  *
1378  * @param text_class The text class name
1379  * @param font The font name
1380  * @param size The font size
1381  *
1382  * @return @c EINA_TRUE, on success or @c EINA_FALSE, on error
1383  *
1384  * This function updates all Edje members at the process level which
1385  * belong to this text class with the new font attributes.
1386  * If the @p size is 0 then the font size will be kept with the previous size.
1387  * If the @p size is less then 0 then the font size will be calculated in the
1388  * percentage. For example, if the @p size is -50, then the font size will be
1389  * scaled to half of the original size and if the @p size is -10 then the font
1390  * size will be scaled as much as 0.1x. 
1391  *
1392  * @see edje_text_class_get().
1393  *
1394  */
1395 EAPI Eina_Bool    edje_text_class_set             (const char *text_class, const char *font, Evas_Font_Size size);
1396
1397 /**
1398  * @brief Delete the text class.
1399  *
1400  * @param text_class The text class name string
1401  *
1402  * This function deletes any values at the process level for the
1403  * specified text class.
1404  *
1405  */
1406 EAPI void         edje_text_class_del             (const char *text_class);
1407
1408 /**
1409  * @brief List text classes.
1410  *
1411  * @return A list of text class names (strings). These strings are
1412  * stringshares and the list must be free()'d by the caller.
1413  *
1414  * This function lists all text classes known about by the current
1415  * process.
1416  *
1417  */
1418 EAPI Eina_List   *edje_text_class_list            (void);
1419
1420 /**
1421  * @brief Set the object minimum size.
1422  *
1423  * @param obj A valid Evas_Object handle
1424  * @param minw The minimum width
1425  * @param minh The minimum height
1426  *
1427  * This sets the minimum size restriction for the object.
1428  */
1429 EAPI void         edje_extern_object_min_size_set (Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
1430
1431 /**
1432  * @brief Set the object maximum size.
1433  *
1434  * @param obj A valid Evas_Object handle
1435  * @param maxw The maximum width
1436  * @param maxh The maximum height
1437  *
1438  * This sets the maximum size restriction for the object.
1439  */
1440 EAPI void         edje_extern_object_max_size_set (Evas_Object *obj, Evas_Coord maxw, Evas_Coord maxh);
1441
1442 /**
1443  * @brief Set the object aspect size.
1444  *
1445  * @param obj A valid Evas_Object handle
1446  * @param aspect The aspect control axes
1447  * @param aw The aspect radio width
1448  * @param ah The aspect ratio height
1449  *
1450  * This sets the desired aspect ratio to keep an object that will be
1451  * swallowed by Edje. The width and height define a preferred size
1452  * ASPECT and the object may be scaled to be larger or smaller, but
1453  * retaining the relative scale of both aspect width and height.
1454  */
1455 EAPI void         edje_extern_object_aspect_set   (Evas_Object *obj, Edje_Aspect_Control aspect, Evas_Coord aw, Evas_Coord ah);
1456
1457 /**
1458  * @brief Registers a custom layout to be used in edje boxes.
1459  *
1460  * @param name The name of the layout
1461  * @param func The function defining the layout
1462  * @param layout_data_get This function gets the custom data pointer
1463  * for func
1464  * @param layout_data_free Passed to func to free its private data
1465  * when needed
1466  * @param free_data Frees data
1467  * @param data Private pointer passed to layout_data_get
1468  *
1469  * This function registers custom layouts that can be referred from
1470  * themes by the registered name. The Evas_Object_Box_Layout
1471  * functions receive two pointers for internal use, one being private
1472  * data, and the other the function to free that data when it's not
1473  * longer needed. From Edje, this private data will be retrieved by
1474  * calling layout_data_get, and layout_data_free will be the free
1475  * function passed to func. layout_data_get will be called with data
1476  * as its parameter, and this one will be freed by free_data whenever
1477  * the layout is unregistered from Edje.
1478  */
1479 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);
1480
1481 /**
1482  * @brief Instantiate a new Edje object
1483  *
1484  * @param evas A valid Evas handle, the canvas to place the new object
1485  * in
1486  * @return A handle to the new object created or @c NULL, on errors.
1487  *
1488  * This function creates a new Edje smart object, returning its @c
1489  * Evas_Object handle. An Edje object is useless without a (source)
1490  * file set to it, so you'd most probably call edje_object_file_set()
1491  * afterwards, like in:
1492  * @code
1493  * Evas_Object *edje;
1494  *
1495  * edje = edje_object_add(canvas);
1496  * if (!edje)
1497  *   {
1498  *      fprintf(stderr, "could not create edje object!\n");
1499  *      return NULL;
1500  *   }
1501  *
1502  * if (!edje_object_file_set(edje, "theme.edj", "group_name"))
1503  *   {
1504  *      int err = edje_object_load_error_get(edje);
1505  *      const char *errmsg = edje_load_error_str(err);
1506  *      fprintf(stderr, "could not load 'group_name' from theme.edj: %s",
1507  *              errmsg);
1508  *
1509  *      evas_object_del(edje);
1510  *      return NULL;
1511  *   }
1512  *
1513  * @endcode
1514  * 
1515  * @note You can get a callback every time edje re-calculates the object
1516  * (either due to animation or some kind of signal or input). This is called
1517  * in-line just after the recalculation has occurred. It is a good idea not
1518  * to go and delete or alter the object inside this callbacks, simply make
1519  * a note that the recalculation has taken place and then do something about
1520  * it outside the callback. to register a callback use code like:
1521  * 
1522  * @code
1523  *    evas_object_smart_callback_add(edje_obj, "recalc", my_cb, my_cb_data);
1524  * @endcode
1525  * 
1526  * @see evas_object_smart_callback_add()
1527  *
1528  * @note Before creating the first Edje object in your code, remember
1529  * to initialize the library, with edje_init(), or unexpected behavior
1530  * might occur.
1531  */
1532 EAPI Evas_Object *edje_object_add                 (Evas *evas);
1533
1534 /**
1535  * @brief Retrive an <b>EDC data field's value</b> from a given Edje
1536  * object's group.
1537  *
1538  * @param obj A handle to an Edje object
1539  * @param key The data field's key string
1540  * @return The data's value string. Must not be freed.
1541  *
1542  * This function fetches an EDC data field's value, which is declared
1543  * on the objects building EDC file, <b>under its group</b>. EDC data
1544  * blocks are most commonly used to pass arbitrary parameters from an
1545  * application's theme to its code.
1546  *
1547  * They look like the following:
1548  *
1549  * @code
1550  * collections {
1551  *   group {
1552  *     name: "a_group";
1553  *     data {
1554  *       item: "key1" "value1";
1555  *       item: "key2" "value2";
1556  *     }
1557  *   }
1558  * }
1559  * @endcode
1560  *
1561  * EDC data fields always hold @b strings as values, hence the return
1562  * type of this function. Check the complete @ref edcref "syntax reference"
1563  * for EDC files.
1564  *
1565  * @warning Do not confuse this call with edje_file_data_get(), which
1566  * queries for a @b global EDC data field on an EDC declaration file.
1567  *
1568  * @see edje_object_file_set()
1569  */
1570 EAPI const char  *edje_object_data_get            (const Evas_Object *obj, const char *key);
1571
1572 /**
1573  * @brief Sets the @b EDJ file (and group within it) to load an Edje
1574  * object's contents from
1575  *
1576  * @param obj A handle to an Edje object
1577  * @param file The path to the EDJ file to load @p from
1578  * @param group The name of the group, in @p file, which implements an
1579  * Edje object
1580  * @return @c EINA_TRUE, on success or @c EINA_FALSE, on errors (check
1581  * edje_object_load_error_get() after this call to get errors causes)
1582  *
1583  * Edje expects EDJ files, which are theming objects' descriptions and
1584  * resources packed together in an EET file, to read Edje object
1585  * definitions from. They usually are created with the @c .edj
1586  * extension. EDJ files, in turn, are assembled from @b textual object
1587  * description files, where one describes Edje objects declaratively
1588  * -- the EDC files (see @ref edcref "the syntax" for those files).
1589  *
1590  * Those description files were designed so that many Edje object
1591  * definitions -- also called @b groups (or collections) -- could be
1592  * packed together <b>in the same EDJ file</b>, so that a whole
1593  * application's theme could be packed in one file only. This is the
1594  * reason for the @p group argument.
1595  *
1596  * Use this function after you instantiate a new Edje object, so that
1597  * you can "give him life", telling where to get its contents from.
1598  *
1599  * @see edje_object_add()
1600  * @see edje_object_file_get()
1601  */
1602 EAPI Eina_Bool        edje_object_file_set        (Evas_Object *obj, const char *file, const char *group);
1603
1604 /**
1605  * @brief Get the file and group name that a given Edje object is bound to
1606  *
1607  * @param obj A handle to an Edje object
1608  * @param file A pointer to a variable whero to store the <b>file's
1609  * path</b>
1610  * @param group A pointer to a variable where to store the <b>group
1611  * name</b> in
1612  *
1613  * This gets the EDJ file's path, with the respective group set for
1614  * the given Edje object. If @a obj is either not an Edje file, or has
1615  * not had its file/group set previously, by edje_object_file_set(),
1616  * then both @p file and @p group will be set to @c NULL, indicating
1617  * an error.
1618  *
1619  * @see edje_object_file_set()
1620  *
1621  * @note Use @c NULL pointers on the file/group components you're not
1622  * interested in: they'll be ignored by the function.
1623  */
1624 EAPI void             edje_object_file_get        (const Evas_Object *obj, const char **file, const char **group);
1625
1626 /**
1627  * @brief Gets the (last) file loading error for a given Edje object
1628  *
1629  * @param obj A handlet to an Edje object
1630  *
1631  * @return The Edje loading error, one of:
1632  * - #EDJE_LOAD_ERROR_NONE
1633  * - #EDJE_LOAD_ERROR_GENERIC
1634  * - #EDJE_LOAD_ERROR_DOES_NOT_EXIST
1635  * - #EDJE_LOAD_ERROR_PERMISSION_DENIED
1636  * - #EDJE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED
1637  * - #EDJE_LOAD_ERROR_CORRUPT_FILE
1638  * - #EDJE_LOAD_ERROR_UNKNOWN_FORMAT
1639  * - #EDJE_LOAD_ERROR_INCOMPATIBLE_FILE
1640  * - #EDJE_LOAD_ERROR_UNKNOWN_COLLECTION
1641  * - #EDJE_LOAD_ERROR_RECURSIVE_REFERENCE
1642  *
1643  * This function is meant to be used after an Edje EDJ <b>file
1644  * loading</b>, what takes place with the edje_object_file_set()
1645  * function. If that function does not return @c EINA_TRUE, one should
1646  * check for the reason of failure with this one.
1647  *
1648  * @see edje_load_error_str()
1649  */
1650 EAPI Edje_Load_Error  edje_object_load_error_get  (const Evas_Object *obj);
1651
1652 /**
1653  * Converts the given Edje file load error code into a string
1654  * describing it in English.
1655  *
1656  * @param error the error code, a value in ::Edje_Load_Error.
1657  * @return Always returns a valid string. If the given @p error is not
1658  *         supported, <code>"Unknown error"</code> is returned.
1659  *
1660  * edje_object_file_set() is a function which sets an error value,
1661  * afterwards, which can be fetched with
1662  * edje_object_load_error_get(). The function in question is meant
1663  * to be used in conjunction with the latter, for pretty-printing any
1664  * possible error cause.
1665  */
1666 EAPI const char      *edje_load_error_str         (Edje_Load_Error error);
1667
1668 /**
1669  * @brief Preload the images on the Edje Object in the background.
1670  *
1671  * @param obj A handle to an Edje object
1672  * @param cancel @c EINA_FALSE will add it the preloading work queue,
1673  *               @c EINA_TRUE will remove it (if it was issued before).
1674  * @return @c EINA_FASLE if obj was not a valid Edje object
1675  *         otherwise @c EINA_TRUE
1676  *
1677  * This function requests the preload of all data images (on the given
1678  * object) in the background. The work is queued before being processed
1679  * (because there might be other pending requests of this type).
1680  * It emits a signal "preload,done" when finished.
1681  *
1682  * @note Use @c EINA_TRUE on scenarios where you don't need
1683  *       the image data preloaded anymore.
1684  */
1685 EAPI Eina_Bool        edje_object_preload         (Evas_Object *obj, Eina_Bool cancel);
1686
1687 /**
1688  * @brief Add a callback for an arriving Edje signal, emitted by
1689  * a given Ejde object.
1690  *
1691  * @param obj A handle to an Edje object
1692  * @param emission The signal's "emission" string
1693  * @param source The signal's "source" string
1694  * @param func The callback function to be executed when the signal is
1695  * emitted.
1696  * @param data A pointer to data to pass in to @p func.
1697  *
1698  * Edje signals are one of the communication interfaces between
1699  * @b code and a given Edje object's @b theme. With signals, one can
1700  * communicate two string values at a time, which are:
1701  * - "emission" value: the name of the signal, in general
1702  * - "source" value: a name for the signal's context, in general
1703  *
1704  * Though there are those common uses for the two strings, one is free
1705  * to use them however they like.
1706  *
1707  * This function adds a callback function to a signal emitted by @a obj, to
1708  * be issued every time an EDC program like the following
1709  * @code
1710  * program {
1711  *   name: "emit_example";
1712  *   action: SIGNAL_EMIT "a_signal" "a_source";
1713  * }
1714  * @endcode
1715  * is run, if @p emission and @p source are given those same values,
1716  * here.
1717  *
1718  * Signal callback registration is powerful, in the way that @b blobs
1719  * may be used to match <b>multiple signals at once</b>. All the @c
1720  * "*?[\" set of @c fnmatch() operators can be used, both for @p
1721  * emission and @p source.
1722  *
1723  * Edje has @b internal signals it will emit, automatically, on
1724  * various actions taking place on group parts. For example, the mouse
1725  * cursor being moved, pressed, released, etc., over a given part's
1726  * area, all generate individual signals.
1727  *
1728  * By using something like
1729  * @code
1730  * edje_object_signal_callback_add(obj, "mouse,down,*", "button.*",
1731  *                                 signal_cb, NULL);
1732  * @endcode
1733  * being @c "button.*" the pattern for the names of parts implementing
1734  * buttons on an interface, you'd be registering for notifications on
1735  * events of mouse buttons being pressed down on either of those parts
1736  * (those events all have the @c "mouse,down," common prefix on their
1737  * names, with a suffix giving the button number). The actual emission
1738  * and source strings of an event will be passed in as the @a emission
1739  * and @a source parameters of the callback function (e.g. @c
1740  * "mouse,down,2" and @c "button.close"), for each of those events.
1741  *
1742  * @note See @ref edcref "the syntax" for EDC files
1743  * @see edje_object_signal_emit() on how to emits Edje signals from
1744  * code to a an object
1745  * @see edje_object_signal_callback_del_full()
1746  */
1747 EAPI void         edje_object_signal_callback_add (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
1748
1749 /**
1750  * @brief Remove a signal-triggered callback from an object.
1751  *
1752  * @param obj A valid Evas_Object handle.
1753  * @param emission The emission string.
1754  * @param source The source string.
1755  * @param func The callback function.
1756  * @return The data pointer
1757  *
1758  * This function removes a callback, previously attached to the
1759  * emittion of a signal, from the object @a obj. The parameters @a
1760  * emission, @a source and @a func must match exactly those passed to
1761  * a previous call to edje_object_signal_callback_add(). The data
1762  * pointer that was passed to this call will be returned.
1763  *
1764  * @see edje_object_signal_callback_add().
1765  * @see edje_object_signal_callback_del_full().
1766  *
1767  */
1768 EAPI void        *edje_object_signal_callback_del (Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func);
1769
1770 /**
1771  * @brief Unregister/delete a callback set for an arriving Edje
1772  * signal, emitted by a given Ejde object.
1773  *
1774  * @param obj A handle to an Edje object
1775  * @param emission The signal's "emission" string
1776  * @param source The signal's "source" string
1777  * @param func The callback function passed on the callback's
1778  * registration
1779  * @param data The pointer given to be passed as data to @p func
1780  * @return @p data, on success or @c NULL, on errors (or if @p data
1781  * had this value)
1782  *
1783  * This function removes a callback, previously attached to the
1784  * emittion of a signal, from the object @a obj. The parameters
1785  * @a emission, @a source, @a func and @a data must match exactly those
1786  * passed to a previous call to edje_object_signal_callback_add(). The
1787  * data pointer that was passed to this call will be returned.
1788  *
1789  * @see edje_object_signal_callback_add().
1790  * @see edje_object_signal_callback_del().
1791  *
1792  */
1793 EAPI void        *edje_object_signal_callback_del_full(Evas_Object *obj, const char *emission, const char *source, Edje_Signal_Cb func, void *data);
1794
1795 /**
1796  * @brief Send/emit an Edje signal to a given Edje object
1797  *
1798  * @param obj A handle to an Edje object
1799  * @param emission The signal's "emission" string
1800  * @param source The signal's "source" string
1801  *
1802  * This function sends a signal to the object @a obj. An Edje program,
1803  * at @p obj's EDC specification level, can respond to a signal by
1804  * having declared matching @c 'signal' and @c 'source' fields on its
1805  * block (see @ref edcref "the syntax" for EDC files).
1806  *
1807  * As an example,
1808  * @code
1809  * edje_object_signal_emit(obj, "a_signal", "");
1810  * @endcode
1811  * would trigger a program which had an EDC declaration block like
1812  * @code
1813  * program {
1814  *  name: "a_program";
1815  *  signal: "a_signal";
1816  *  source: "";
1817  *  action: ...
1818  * }
1819  * @endcode
1820  *
1821  * @see edje_object_signal_callback_add() for more on Edje signals.
1822  */
1823 EAPI void         edje_object_signal_emit         (Evas_Object *obj, const char *emission, const char *source);
1824
1825 /**
1826  * @brief Get extra data passed to callbacks.
1827  *
1828  * @return the extra data for that callback.
1829  *
1830  * Some callbacks pass extra information. This function gives access to that
1831  * extra information. It's somehow like event_info in smart callbacks.
1832  *
1833  * @see edje_object_signal_callback_add() for more on Edje signals.
1834  * @since 1.1.0
1835  */
1836 EAPI void *       edje_object_signal_callback_extra_data_get(void);
1837
1838 /**
1839  * @brief Set the Edje object to playing or paused states.
1840  *
1841  * @param obj A handle to an Edje object.
1842  * @param play Object state (@c EINA_TRUE to playing,
1843  *                           @c EINA_FALSE to paused).
1844  *
1845  * This function sets the Edje object @a obj to playing or paused
1846  * states, depending on the parameter @a play. This has no effect if
1847  * the object was already at that state.
1848  *
1849  * @see edje_object_play_get().
1850  *
1851  */
1852 EAPI void         edje_object_play_set            (Evas_Object *obj, Eina_Bool play);
1853
1854 /**
1855  * @brief Get the Edje object's state.
1856  *
1857  * @param obj A handle to an Edje object.
1858  * @return @c EINA_FALSE if the object is not connected, its @c delete_me flag
1859  * is set, or it is at paused state; @c EINA_TRUE if the object is at playing
1860  * state.
1861  *
1862  * This function tells if an Edje object is playing or not. This state
1863  * is set by edje_object_play_set().
1864  *
1865  * @see edje_object_play_set().
1866  *
1867  */
1868 EAPI Eina_Bool    edje_object_play_get            (const Evas_Object *obj);
1869
1870 /**
1871  * @brief Set the object's animation state.
1872  *
1873  * @param obj A handle to an Edje object.
1874  * @param on The animation state. @c EINA_TRUE to starts or
1875  *           @c EINA_FALSE to stops.
1876  *
1877  * This function starts or stops an Edje object's animation. The
1878  * information if it's stopped can be retrieved by
1879  * edje_object_animation_get().
1880  *
1881  * @see edje_object_animation_get()
1882  *
1883  */
1884 EAPI void         edje_object_animation_set       (Evas_Object *obj, Eina_Bool on);
1885
1886 /**
1887  * @brief Get the Edje object's animation state.
1888  *
1889  * @param obj A handle to an Edje object.
1890  * @return @c EINA_FALSE on error or if object is not animated;
1891  *         @c EINA_TRUE if animated.
1892  *
1893  * This function returns if the animation is stopped or not. The
1894  * animation state is set by edje_object_animation_set().
1895  *
1896  * @see edje_object_animation_set().
1897  *
1898  */
1899 EAPI Eina_Bool    edje_object_animation_get       (const Evas_Object *obj);
1900
1901 /**
1902  * @brief Freezes the Edje object.
1903  *
1904  * @param obj A handle to an Edje object.
1905  * @return The frozen state or 0 on Error
1906  *
1907  * This function puts all changes on hold. Successive freezes will
1908  * nest, requiring an equal number of thaws.
1909  *
1910  * @see edje_object_thaw()
1911  */
1912 EAPI int          edje_object_freeze                  (Evas_Object *obj);
1913
1914 /**
1915  * @brief Thaws the Edje object.
1916  *
1917  * @param obj A handle to an Edje object.
1918  * @return The frozen state or 0 if the object is not frozen or on error.
1919  *
1920  * This function thaws the given Edje object.
1921  *
1922  * @note: If sucessives freezes were done, an equal number of
1923  *        thaws will be required.
1924  *
1925  * @see edje_object_freeze()
1926  */
1927 EAPI int          edje_object_thaw                    (Evas_Object *obj);
1928
1929 /**
1930  * @brief Sets the object color class.
1931  *
1932  * @param obj A valid Evas_Object handle
1933  * @param color_class
1934  * @param r Object Red value
1935  * @param g Object Green value
1936  * @param b Object Blue value
1937  * @param a Object Alpha value
1938  * @param r2 Outline Red value
1939  * @param g2 Outline Green value
1940  * @param b2 Outline Blue value
1941  * @param a2 Outline Alpha value
1942  * @param r3 Shadow Red value
1943  * @param g3 Shadow Green value
1944  * @param b3 Shadow Blue value
1945  * @param a3 Shadow Alpha value
1946  *
1947  * This function sets the color values for an object level color
1948  * class. This will cause all edje parts in the specified object that
1949  * have the specified color class to have their colors multiplied by
1950  * these values.
1951  *
1952  * The first color is the object, the second is the text outline, and
1953  * the third is the text shadow. (Note that the second two only apply
1954  * to text parts).
1955  *
1956  * Setting color emits a signal "color_class,set" with source being
1957  * the given color.
1958  *
1959  * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1960  *       half-transparent white is 255 255 255 128.
1961  */
1962 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);
1963
1964 /**
1965  * @brief Gets the object color class.
1966  *
1967  * @param o A valid Evas_Object handle
1968  * @param color_class
1969  * @param r Object Red value
1970  * @param g Object Green value
1971  * @param b Object Blue value
1972  * @param a Object Alpha value
1973  * @param r2 Outline Red value
1974  * @param g2 Outline Green value
1975  * @param b2 Outline Blue value
1976  * @param a2 Outline Alpha value
1977  * @param r3 Shadow Red value
1978  * @param g3 Shadow Green value
1979  * @param b3 Shadow Blue value
1980  * @param a3 Shadow Alpha value
1981  *
1982  * @return EINA_TRUE if found or EINA_FALSE if not found and all
1983  *         values are zeroed.
1984  *
1985  * This function gets the color values for an object level color
1986  * class. If no explicit object color is set, then global values will
1987  * be used.
1988  *
1989  * The first color is the object, the second is the text outline, and
1990  * the third is the text shadow. (Note that the second two only apply
1991  * to text parts).
1992  *
1993  * @note unlike Evas, Edje colors are @b not pre-multiplied. That is,
1994  *       half-transparent white is 255 255 255 128.
1995  */
1996 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);
1997
1998 /**
1999  * @brief Delete the object color class.
2000  *
2001  * @param obj The edje object's reference.
2002  * @param color_class The color class to be deleted.
2003  *
2004  * This function deletes any values at the object level for the
2005  * specified object and color class.
2006  * @note Deleting the color class will revert it to the values
2007  *       defined by edje_color_class_set() or the color class
2008  *       defined in the theme file.
2009  *
2010  * Deleting the color class will emit the signal "color_class,del"
2011  * for the given Edje object.
2012  */
2013  EAPI void         edje_object_color_class_del         (Evas_Object *obj, const char *color_class);
2014
2015 /**
2016  * @brief Sets Edje text class.
2017  *
2018  * @param obj A valid Evas_Object handle
2019  * @param text_class The text class name
2020  * @param font Font name
2021  * @param size Font Size
2022  *
2023  * @return @c EINA_TRUE, on success or @c EINA_FALSE, on error
2024  *
2025  * This function sets the text class for the Edje.
2026  *
2027  */
2028 EAPI Eina_Bool    edje_object_text_class_set          (Evas_Object *obj, const char *text_class, const char *font, Evas_Font_Size size);
2029
2030 /**
2031  * @brief Get the minimum size specified -- as an EDC property -- for a
2032  * given Edje object
2033  *
2034  * @param obj A handle to an Edje object
2035  * @param minw Pointer to a variable where to store the minimum width
2036  * @param minh Pointer to a variable where to store the minimum height
2037  *
2038  * This function retrieves the @p obj object's minimum size values,
2039  * <b>as declared in its EDC group definition</b>. Minimum size of
2040  * groups have the following syntax
2041  * @code
2042  * collections {
2043  *   group {
2044  *     name: "a_group";
2045  *     min: 100 100;
2046  *   }
2047  * }
2048  * @endcode
2049  *
2050  * where one declares a minimum size of 100 pixels both for width and
2051  * height. Those are (hint) values which should be respected when the
2052  * given object/group is to be controlled by a given container object
2053  * (e.g. an Edje object being "swallowed" into a given @c SWALLOW
2054  * typed part, as in edje_object_part_swallow()). Check the complete
2055  * @ref edcref "syntax reference" for EDC files.
2056  *
2057  * @note If the @c min EDC property was not declared for @p obj, this
2058  * call will return the value 0, for each axis.
2059  *
2060  * @note On failure, this function will make all non-@c NULL size
2061  * pointers' pointed variables be set to zero.
2062  *
2063  * @see edje_object_size_max_get()
2064  */
2065 EAPI void         edje_object_size_min_get            (const Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
2066
2067 /**
2068  * @brief Edje will automatically update the size hints on itself.
2069  *
2070  * @param obj A handle to an Edje object.
2071  * @param update Wether or not update the size hints.
2072  *
2073  * By default edje doesn't set size hints on itself. With this function
2074  * call, it will do so if update is true. Be carefully, it cost a lot to
2075  * trigger this feature as it will recalc the object every time it make
2076  * sense to be sure that's its minimal size hint is always accurate.
2077  */
2078 EAPI void edje_object_update_hints_set(Evas_Object *obj, Eina_Bool update);
2079
2080 /**
2081  * @brief Wether or not Edje will update size hints on itself.
2082  *
2083  * @param obj A handle to an Edje object.
2084  * @return @c true if does, @c false if it doesn't.
2085  */
2086 EAPI Eina_Bool edje_object_update_hints_get(Evas_Object *obj);
2087
2088 /**
2089  * @brief Get the maximum size specified -- as an EDC property -- for a
2090  * given Edje object
2091  *
2092  * @param obj A handle to an Edje object
2093  * @param maxw Pointer to a variable where to store the maximum width
2094  * @param maxh Pointer to a variable where to store the maximum height
2095  *
2096  * This function retrieves the @p obj object's maximum size values,
2097  * <b>as declared in its EDC group definition</b>. Maximum size of
2098  * groups have the following syntax
2099  * @code
2100  * collections {
2101  *   group {
2102  *     name: "a_group";
2103  *     max: 100 100;
2104  *   }
2105  * }
2106  * @endcode
2107  *
2108  * where one declares a maximum size of 100 pixels both for width and
2109  * height. Those are (hint) values which should be respected when the
2110  * given object/group is to be controlled by a given container object
2111  * (e.g. an Edje object being "swallowed" into a given @c SWALLOW
2112  * typed part, as in edje_object_part_swallow()). Check the complete
2113  * @ref edcref "syntax reference" for EDC files.
2114  *
2115  * @note If the @c max EDC property was not declared for @p obj, this
2116  * call will return the maximum size a given Edje object may have, for
2117  * each axis.
2118  *
2119  * @note On failure, this function will make all non-@c NULL size
2120  * pointers' pointed variables be set to zero.
2121  *
2122  * @see edje_object_size_min_get()
2123  */
2124 EAPI void         edje_object_size_max_get            (const Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
2125
2126 /**
2127  * @brief Force a Size/Geometry calculation.
2128  *
2129  * @param obj A valid Evas_Object handle
2130  *
2131  * Forces the object @p obj to recalculation layout regardless of
2132  * freeze/thaw.
2133  */
2134 EAPI void         edje_object_calc_force              (Evas_Object *obj);
2135
2136 /**
2137  * @brief Calculate the minimum required size for a given Edje object.
2138  *
2139  * @param obj A handle to an Edje object
2140  * @param minw Pointer to a variable where to store the minimum
2141  * required width
2142  * @param minh Pointer to a variable where to store the minimum
2143  * required height
2144  *
2145  * This call works exactly as edje_object_size_min_restricted_calc(),
2146  * with the last two arguments set to 0. Please refer to its
2147  * documentation, then.
2148  */
2149 EAPI void         edje_object_size_min_calc           (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
2150
2151 /**
2152  * Calculate the geometry of the region, relative to a given Edje
2153  * object's area, <b>occupied by all parts in the object</b>
2154  *
2155  * @param obj A handle to an Edje object
2156  * @param x A pointer to a variable where to store the parts region's
2157  * x coordinate
2158  * @param y A pointer to a variable where to store the parts region's
2159  * y coordinate
2160  * @param w A pointer to a variable where to store the parts region's
2161  * width
2162  * @param h A pointer to a variable where to store the parts region's
2163  * height
2164  *
2165  * This function gets the geometry of the rectangle equal to the area
2166  * required to group all parts in @p obj's group/collection. The @p x
2167  * and @p y coordinates are relative to the top left corner of the
2168  * whole @p obj object's area. Parts placed out of the group's
2169  * boundaries will also be taken in account, so that @p x and @p y
2170  * <b>may be negative</b>.
2171  *
2172  * @note Use @c NULL pointers on the geometry components you're not
2173  * interested in: they'll be ignored by the function.
2174  *
2175  * @note On failure, this function will make all non-@c NULL geometry
2176  * pointers' pointed variables be set to zero.
2177  */
2178 EAPI Eina_Bool    edje_object_parts_extends_calc      (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
2179
2180 /**
2181  * @brief Calculate the minimum required size for a given Edje object.
2182  *
2183  * @param obj A handle to an Edje object
2184  * @param minw Pointer to a variable where to store the minimum
2185  * required width
2186  * @param minh Pointer to a variable where to store the minimum
2187  * required height
2188  * @param restrictedw Do not allow object's calculated (minimum) width
2189  * to be less than this value
2190  * @param restrictedh Do not allow object's calculated (minimum)
2191  * height to be less than this value
2192  *
2193  * This call will trigger an internal recalculation of all parts of
2194  * the @p obj object, in order to return its minimum required
2195  * dimensions for width and height. The user might choose to @b impose
2196  * those minimum sizes, making the resulting calculation to get to values
2197  * equal or bigger than @p restrictedw and @p restrictedh, for width and
2198  * height, respectively.
2199  *
2200  * @note At the end of this call, @p obj @b won't be automatically
2201  * resized to new dimensions, but just return the calculated
2202  * sizes. The caller is the one up to change its geometry or not.
2203  *
2204  * @warning Be advised that invisible parts in @p obj @b will be taken
2205  * into account in this calculation.
2206  */
2207 EAPI void         edje_object_size_min_restricted_calc(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh, Evas_Coord restrictedw, Evas_Coord restrictedh);
2208
2209 /**
2210  * @brief Check if an Edje part exists in a given Edje object's group
2211  * definition.
2212  *
2213  * @param obj A handle to an Edje object
2214  * @param part The part's name to check for existence in @p obj's
2215  * group
2216  * @return @c EINA_TRUE, if the Edje part exists in @p obj's group or
2217  * @c EINA_FALSE, otherwise (and on errors)
2218  *
2219  * This function returns if a given part exists in the Edje group
2220  * bound to object @p obj (with edje_object_file_set()).
2221  *
2222  * This call is useful, for example, when one could expect or not a
2223  * given GUI element, depending on the @b theme applied to @p obj.
2224  */
2225 EAPI Eina_Bool    edje_object_part_exists             (const Evas_Object *obj, const char *part);
2226
2227 /**
2228  * @brief Get a handle to the Evas object implementing a given Edje
2229  * part, in an Edje object.
2230  *
2231  * @param obj A handle to an Edje object
2232  * @param part The Edje part's name
2233  * @return A pointer to the Evas object implementing the given part,
2234  * or @c NULL on failure (e.g. the given part doesn't exist)
2235  *
2236  * This function gets a pointer of the Evas object corresponding to a
2237  * given part in the @p obj object's group.
2238  *
2239  * You should @b never modify the state of the returned object (with
2240  * @c evas_object_move() or @c evas_object_hide() for example),
2241  * because it's meant to be managed by Edje, solely. You are safe to
2242  * query information about its current state (with @c
2243  * evas_object_visible_get() or @c evas_object_color_get() for
2244  * example), though.
2245  */
2246 EAPI const Evas_Object *edje_object_part_object_get   (const Evas_Object *obj, const char *part);
2247
2248 /**
2249  * @brief Retrieve the geometry of a given Edje part, in a given Edje
2250  * object's group definition, <b>relative to the object's area</b>
2251  *
2252  * @param obj A handle to an Edje object
2253  * @param part The Edje part's name
2254  * @param x A pointer to a variable where to store the part's x
2255  * coordinate
2256  * @param y A pointer to a variable where to store the part's y
2257  * coordinate
2258  * @param w A pointer to a variable where to store the part's width
2259  * @param h A pointer to a variable where to store the part's height
2260  *
2261  * This function gets the geometry of an Edje part within its
2262  * group. The @p x and @p y coordinates are relative to the top left
2263  * corner of the whole @p obj object's area.
2264  *
2265  * @note Use @c NULL pointers on the geometry components you're not
2266  * interested in: they'll be ignored by the function.
2267  *
2268  * @note On failure, this function will make all non-@c NULL geometry
2269  * pointers' pointed variables be set to zero.
2270  */
2271 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);
2272
2273
2274 /**
2275  * @brief Set the function that provides item objects for named items in an edje entry text
2276  *
2277  * @param obj A valid Evas Object handle
2278  * @param func The function to call (or NULL to disable) to get item objects
2279  * @param data The data pointer to pass to the @p func callback
2280  *
2281  * Item objects may be deleted any time by Edje, and will be deleted when the
2282  * Edje object is deleted (or file is set to a new file).
2283  */
2284 EAPI void         edje_object_item_provider_set       (Evas_Object *obj, Edje_Item_Provider_Cb func, void *data);
2285
2286
2287 /**
2288  * @brief Set the object text callback.
2289  *
2290  * @param obj A valid Evas_Object handle
2291  * @param func The callback function to handle the text change
2292  * @param data The data associated to the callback function.
2293  *
2294  * This function sets the callback to be called when the text changes.
2295  */
2296 EAPI void         edje_object_text_change_cb_set      (Evas_Object *obj, Edje_Text_Change_Cb func, void *data);
2297
2298 /**
2299  * @brief Sets the text for an object part
2300  *
2301  * @param obj A valid Evas Object handle
2302  * @param part The part name
2303  * @param text The text string
2304  *
2305  * @return @c EINA_BOOL on success, @c EINA_FALSE otherwise
2306  */
2307 EAPI Eina_Bool    edje_object_part_text_set           (Evas_Object *obj, const char *part, const char *text);
2308
2309 /**
2310  * @brief Sets the text for an object part, but converts HTML escapes to UTF8
2311  *
2312  * This converts the given string @p text to UTF8 assuming it contains HTML
2313  * style escapes like "&amp;" and "&copy;" etc. IF the part is of type TEXT,
2314  * as opposed to TEXTBLOCK.
2315  * 
2316  * @param obj A valid Evas Object handle
2317  * @param part The part name
2318  * @param text The text string
2319  *
2320  * @return @c EINA_BOOL on success, @c EINA_FALSE otherwise
2321  *
2322  * @since 1.2
2323  */
2324 EAPI Eina_Bool    edje_object_part_text_escaped_set   (Evas_Object *obj, const char *part, const char *text);
2325        
2326 /**
2327  * @brief Return the text of the object part.
2328  *
2329  * @param obj A valid Evas_Object handle
2330  * @param part The part name
2331  *
2332  * @return The text string
2333  *
2334  * This function returns the text associated to the object part.
2335  *
2336  * @see edje_object_part_text_set().
2337  */
2338 EAPI const char  *edje_object_part_text_get           (const Evas_Object *obj, const char *part);
2339
2340 /**
2341  * @brief Set the style of the
2342  *
2343  * @param obj A valid Evas_Object handle
2344  * @param part The part name
2345  * @param style The style to set (textblock conventions).
2346  *
2347  * This function sets the style associated with the textblock part.
2348  *
2349  * @since 1.2.0
2350  */
2351 EAPI void edje_object_part_text_style_user_push(Evas_Object *obj, const char *part, const char *style);
2352
2353 /**
2354  * @brief Return the text of the object part.
2355  *
2356  * @param obj A valid Evas_Object handle
2357  * @param part The part name
2358  *
2359  * @return The text string
2360  *
2361  * This function returns the style associated with the textblock part.
2362  *
2363  * @since 1.2.0
2364  */
2365 EAPI const char *edje_object_part_text_style_user_peek(const Evas_Object *obj, const char *part);
2366
2367 /**
2368  * @brief Delete the top style form the user style stack.
2369  *
2370  * @param obj A valid Evas_Object handle
2371  * @param part The part name
2372  *
2373  * @since 1.2.0
2374  */
2375 EAPI void edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part);
2376
2377 /**
2378  * @brief Sets the raw (non escaped) text for an object part.
2379  *
2380  * @param obj A valid Evas Object handle
2381  * @param part The part name
2382  * @param text_to_escape The text string
2383  *
2384  * This funciton will not do escape for you if it is a TEXTBLOCK part, that is,
2385  * if text contain tags, these tags will not be interpreted/parsed by TEXTBLOCK.
2386  *
2387  * @see edje_object_part_text_unescaped_get().
2388  */
2389 EAPI Eina_Bool    edje_object_part_text_unescaped_set (Evas_Object *obj, const char *part, const char *text_to_escape);
2390
2391 /**
2392  * @brief Returns the text of the object part, without escaping.
2393  *
2394  * @param obj A valid Evas_Object handle
2395  * @param part The part name
2396  * @return The @b allocated text string without escaping, or NULL on
2397  * problems.
2398  *
2399  * This function is the counterpart of
2400  * edje_object_part_text_unescaped_set(). Please notice that the
2401  * result is newly allocated memory and should be released with free()
2402  * when done.
2403  *
2404  * @see edje_object_part_text_unescaped_set().
2405  */
2406 EAPI char        *edje_object_part_text_unescaped_get (const Evas_Object *obj, const char *part);
2407
2408 /**
2409  * @brief Return the selection text of the object part.
2410  *
2411  * @param obj A valid Evas_Object handle
2412  * @param part The part name
2413  * @return The text string
2414  *
2415  * This function returns selection text of the object part.
2416  *
2417  * @see edje_object_part_text_select_all()
2418  * @see edje_object_part_text_select_none()
2419  */
2420 EAPI const char      *edje_object_part_text_selection_get           (const Evas_Object *obj, const char *part);
2421
2422 /**
2423  * @brief Set the selection to be none.
2424  *
2425  * @param obj A valid Evas_Object handle
2426  * @param part The part name
2427  *
2428  * This function sets the selection text to be none.
2429  */
2430 EAPI void             edje_object_part_text_select_none             (const Evas_Object *obj, const char *part);
2431
2432 /**
2433  * @brief Set the selection to be everything.
2434  *
2435  * @param obj A valid Evas_Object handle
2436  * @param part The part name
2437  *
2438  * This function selects all text of the object of the part.
2439  */
2440 EAPI void             edje_object_part_text_select_all              (const Evas_Object *obj, const char *part);
2441
2442 /**
2443  * @brief Insert text for an object part.
2444  *
2445  * @param obj A valid Evas Object handle
2446  * @param part The part name
2447  * @param text The text string
2448  *
2449  * This function inserts the text for an object part just before the
2450  * cursor position.
2451  *
2452  */
2453 EAPI void             edje_object_part_text_insert                  (Evas_Object *obj, const char *part, const char *text);
2454
2455 /**
2456  * @brief Insert text for an object part.
2457  *
2458  * @param obj A valid Evas Object handle
2459  * @param part The part name
2460  * @param text The text string
2461  *
2462  * This function inserts the text for an object part at the end; It does not
2463  * move the cursor.
2464  *
2465  * @since 1.1
2466  */
2467 EAPI void             edje_object_part_text_append(Evas_Object *obj, const char *part, const char *text);
2468
2469 /**
2470  * @brief Return a list of char anchor names.
2471  *
2472  * @param obj A valid Evas_Object handle
2473  * @param part The part name
2474  *
2475  * @return The list of anchors (const char *), do not modify!
2476  *
2477  * This function returns a list of char anchor names.
2478  *
2479  */
2480 EAPI const Eina_List *edje_object_part_text_anchor_list_get         (const Evas_Object *obj, const char *part);
2481
2482 /**
2483  * @brief Return a list of Evas_Textblock_Rectangle anchor rectangles.
2484  *
2485  * @param obj A valid Evas_Object handle
2486  * @param part The part name
2487  * @param anchor The anchor name
2488  *
2489  * @return The list of anchor rects (const Evas_Textblock_Rectangle
2490  * *), do not modify! Geometry is relative to entry part.
2491  *
2492  * This function return a list of Evas_Textblock_Rectangle anchor
2493  * rectangles.
2494  *
2495  */
2496 EAPI const Eina_List *edje_object_part_text_anchor_geometry_get     (const Evas_Object *obj, const char *part, const char *anchor);
2497
2498 /**
2499  * @brief Return a list of char item names.
2500  *
2501  * @param obj A valid Evas_Object handle
2502  * @param part The part name
2503  *
2504  * @return The list of items (const char *), do not modify!
2505  *
2506  * This function returns a list of char item names.
2507  *
2508  */
2509 EAPI const Eina_List *edje_object_part_text_item_list_get           (const Evas_Object *obj, const char *part);
2510
2511 /**
2512  * @brief Return item geometry.
2513  *
2514  * @param obj A valid Evas_Object handle
2515  * @param part The part name
2516  * @param item The item name
2517  * @param cx Item x return (relative to entry part)
2518  * @param cy Item y return (relative to entry part)
2519  * @param cw Item width return
2520  * @param ch Item height return
2521  *
2522  * @return 1 if item exists, 0 if not
2523  *
2524  * This function return a list of Evas_Textblock_Rectangle item
2525  * rectangles.
2526  *
2527  */
2528 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);
2529
2530 /**
2531  * @brief Returns the cursor geometry of the part relative to the edje
2532  * object.
2533  *
2534  * @param obj A valid Evas_Object handle
2535  * @param part The part name
2536  * @param x Cursor X position
2537  * @param y Cursor Y position
2538  * @param w Cursor width
2539  * @param h Cursor height
2540  *
2541  */
2542 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);
2543
2544 /**
2545  * @brief Deletes the selection and emits a change event.
2546  *
2547  * @param obj A valid Evas_Object handle
2548  * @param part The part name
2549  * @param text The text string
2550  * @since 1.2.0
2551  */
2552 EAPI void             edje_object_part_text_user_insert        (const Evas_Object *obj, const char *part, const char *text);
2553
2554 /**
2555  * @brief Enables selection if the entry is an EXPLICIT selection mode
2556  * type.
2557  *
2558  * @param obj A valid Evas_Object handle
2559  * @param part The part name
2560  * @param allow EINA_TRUE to enable, EINA_FALSE otherwise
2561  *
2562  * The default is to @b not allow selection. This function only affects user
2563  * selection, functions such as edje_object_part_text_select_all() and
2564  * edje_object_part_text_select_none() are not affected.
2565  */
2566 EAPI void             edje_object_part_text_select_allow_set        (const Evas_Object *obj, const char *part, Eina_Bool allow);
2567
2568 /**
2569  * @brief Aborts any selection action on a part.
2570  *
2571  * @param obj A valid Evas_Object handle
2572  * @param part The part name
2573  */
2574 EAPI void             edje_object_part_text_select_abort            (const Evas_Object *obj, const char *part);
2575
2576 /**
2577  * @brief Starts selecting at current cursor position
2578  *
2579  * @param obj A valid Evas_Object handle
2580  * @param part The part name
2581  */
2582 EAPI void             edje_object_part_text_select_begin            (const Evas_Object *obj, const char *part);
2583
2584 /**
2585  * @brief Extends the current selection to the current cursor position
2586  *
2587  * @param obj A valid Evas_Object handle
2588  * @param part The part name
2589  */
2590 EAPI void             edje_object_part_text_select_extend           (const Evas_Object *obj, const char *part);
2591
2592
2593 /**
2594  * @brief Advances the cursor to the next cursor position.
2595  * @see evas_textblock_cursor_char_next
2596  *
2597  * @param obj A valid Evas_Object handle
2598  * @param part The part name
2599  * @param cur The edje cursor to advance
2600  */
2601 EAPI Eina_Bool        edje_object_part_text_cursor_next                 (Evas_Object *obj, const char *part, Edje_Cursor cur);
2602
2603 /**
2604  * @brief Moves the cursor to the previous char
2605  * @see evas_textblock_cursor_char_prev
2606  *
2607  * @param obj A valid Evas_Object handle
2608  * @param part The part name
2609  * @param cur the edje cursor to work on
2610  */
2611 EAPI Eina_Bool        edje_object_part_text_cursor_prev                 (Evas_Object *obj, const char *part, Edje_Cursor cur);
2612
2613 /**
2614  * @brief Move the cursor to the char above the current cursor position.
2615  *
2616  * @param obj A valid Evas_Object handle
2617  * @param part The part name
2618  * @param cur the edje cursor to work on
2619  */
2620 EAPI Eina_Bool        edje_object_part_text_cursor_up                   (Evas_Object *obj, const char *part, Edje_Cursor cur);
2621
2622 /**
2623  * @brief Moves the cursor to the char below the current cursor position.
2624  *
2625  * @param obj A valid Evas_Object handle
2626  * @param part The part name
2627  * @param cur the edje cursor to work on
2628  */
2629 EAPI Eina_Bool        edje_object_part_text_cursor_down                 (Evas_Object *obj, const char *part, Edje_Cursor cur);
2630
2631 /**
2632  * @brief Moves the cursor to the beginning of the text part
2633  * @see evas_textblock_cursor_paragraph_first
2634  *
2635  * @param obj A valid Evas_Object handle
2636  * @param part The part name
2637  * @param cur the edje cursor to work on
2638  */
2639 EAPI void             edje_object_part_text_cursor_begin_set            (Evas_Object *obj, const char *part, Edje_Cursor cur);
2640
2641 /**
2642  * @brief Moves the cursor to the end of the text part.
2643  * @see evas_textblock_cursor_paragraph_last
2644  *
2645  * @param obj A valid Evas_Object handle
2646  * @param part The part name
2647  * @param cur the edje cursor to work on
2648  */
2649 EAPI void             edje_object_part_text_cursor_end_set              (Evas_Object *obj, const char *part, Edje_Cursor cur);
2650
2651 /**
2652  * @brief Copy the cursor to another cursor.
2653  *
2654  * @param obj A valid Evas_Object handle
2655  * @param part The part name
2656  * @param src the cursor to copy from
2657  * @param dst the cursor to copy to
2658  */
2659 EAPI void             edje_object_part_text_cursor_copy                 (Evas_Object *obj, const char *part, Edje_Cursor src, Edje_Cursor dst);
2660
2661 /**
2662  * @brief Move the cursor to the beginning of the line.
2663  * @see evas_textblock_cursor_line_char_first
2664  *
2665  * @param obj A valid Evas_Object handle
2666  * @param part The part name
2667  * @param cur the edje cursor to work on
2668  */
2669 EAPI void             edje_object_part_text_cursor_line_begin_set       (Evas_Object *obj, const char *part, Edje_Cursor cur);
2670
2671 /**
2672  * @brief Move the cursor to the end of the line.
2673  * @see evas_textblock_cursor_line_char_last
2674  *
2675  * @param obj A valid Evas_Object handle
2676  * @param part The part name
2677  * @param cur the edje cursor to work on
2678  */
2679 EAPI void             edje_object_part_text_cursor_line_end_set         (Evas_Object *obj, const char *part, Edje_Cursor cur);
2680
2681 /**
2682  * Position the given cursor to a X,Y position.
2683  *
2684  * This is frequently used with the user cursor.
2685  *
2686  * @param obj An Edje object.
2687  * @param part The part containing the object.
2688  * @param cur The cursor to adjust.
2689  * @param x X Coordinate.
2690  * @param y Y Coordinate.
2691  * @return True on success, false on error.
2692  */
2693 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);
2694
2695 /**
2696  * @brief Returns whether the cursor points to a format.
2697  * @see evas_textblock_cursor_is_format
2698  *
2699  * @param obj A valid Evas_Object handle
2700  * @param part The part name
2701  * @param cur The cursor to adjust.
2702  * @return EINA_TRUE if it's true, EINA_FALSE otherwise.
2703  */
2704 EAPI Eina_Bool        edje_object_part_text_cursor_is_format_get        (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2705
2706 /**
2707  * @brief Return true if the cursor points to a visible format
2708  * For example \\t, \\n, item and etc.
2709  * @see  evas_textblock_cursor_format_is_visible_get
2710  *
2711  * @param obj A valid Evas_Object handle
2712  * @param part The part name
2713  * @param cur The cursor to adjust.
2714  */
2715 EAPI Eina_Bool        edje_object_part_text_cursor_is_visible_format_get(const Evas_Object *obj, const char *part, Edje_Cursor cur);
2716
2717 /**
2718  * @brief Returns the content (char) at the cursor position.
2719  * @see evas_textblock_cursor_content_get
2720  * 
2721  * You must free the return (if not NULL) after you are done with it.
2722  *
2723  * @param obj A valid Evas_Object handle
2724  * @param part The part name
2725  * @param cur The cursor to use
2726  * @return The character string pointed to (may be a multi-byte utf8 sequence) terminated by a nul byte.
2727  */
2728 EAPI char            *edje_object_part_text_cursor_content_get          (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2729
2730 /**
2731  * @brief Sets the cursor position to the given value
2732  *
2733  * @param obj A valid Evas_Object handle
2734  * @param part The part name
2735  * @param cur The cursor to move
2736  * @param pos the position of the cursor
2737  * @since 1.1.0
2738  */
2739 EAPI void             edje_object_part_text_cursor_pos_set              (Evas_Object *obj, const char *part, Edje_Cursor cur, int pos);
2740
2741 /**
2742  * @brief Retrieves the current position of the cursor
2743  *
2744  * @param obj A valid Evas_Object handle
2745  * @param part The part name
2746  * @param cur The cursor to get the position
2747  * @return The cursor position
2748  * @since 1.1.0
2749  */
2750 EAPI int              edje_object_part_text_cursor_pos_get              (const Evas_Object *obj, const char *part, Edje_Cursor cur);
2751
2752 /**
2753  * @brief Reset the input method context if needed.
2754  *
2755  * This can be necessary in the case where modifying the buffer would confuse on-going input method behavior
2756  *
2757  * @param obj A valid Evas_Object handle
2758  * @param part The part name
2759  * @since 1.2.0
2760  */
2761 EAPI void             edje_object_part_text_imf_context_reset           (const Evas_Object *obj, const char *part);
2762
2763 /**
2764  * @brief Get the input method context in entry.
2765  *
2766  * If ecore_imf was not available when edje was compiled, this function returns NULL
2767  * otherwise, the returned pointer is an Ecore_IMF *
2768  *
2769  * @param obj A valid Evas_Object handle
2770  * @param part The part name
2771  *
2772  * @return The input method context (Ecore_IMF_Context *) in entry 
2773  * @since 1.2.0
2774  */
2775 EAPI void              *edje_object_part_text_imf_context_get           (const Evas_Object *obj, const char *part);
2776
2777 /**
2778  * @brief Set the layout of the input panel.
2779  *
2780  * The layout of the input panel or virtual keyboard can make it easier or
2781  * harder to enter content. This allows you to hint what kind of input you
2782  * are expecting to enter and thus have the input panel automatically
2783  * come up with the right mode.
2784  *
2785  * @param obj A valid Evas_Object handle
2786  * @param part The part name
2787  * @param layout layout type
2788  * @since 1.1
2789  */
2790 EAPI void             edje_object_part_text_input_panel_layout_set      (Evas_Object *obj, const char *part, Edje_Input_Panel_Layout layout);
2791
2792 /**
2793  * @brief Get the layout of the input panel.
2794  *
2795  * @param obj A valid Evas_Object handle
2796  * @param part The part name
2797  *
2798  * @return Layout type of the input panel
2799  *
2800  * @see edje_object_part_text_input_panel_layout_set
2801  * @since 1.1
2802  */
2803 EAPI Edje_Input_Panel_Layout edje_object_part_text_input_panel_layout_get (const Evas_Object *obj, const char *part);
2804
2805 /**
2806  * @brief Set the autocapitalization type on the immodule.
2807  *
2808  * @param obj A valid Evas_Object handle
2809  * @param part The part name
2810  * @param autocapital_type The type of autocapitalization
2811  * @since 1.1.0
2812  */
2813 EAPI void         edje_object_part_text_autocapital_type_set            (Evas_Object *obj, const char *part, Edje_Text_Autocapital_Type autocapital_type);
2814
2815 /**
2816  * @brief Retrieves the autocapitalization type
2817  *
2818  * @param obj A valid Evas_Object handle
2819  * @param part The part name
2820  * @return The autocapitalization type
2821  * @since 1.1.0
2822  */
2823 EAPI Edje_Text_Autocapital_Type edje_object_part_text_autocapital_type_get (const Evas_Object *obj, const char *part);
2824
2825 /**
2826  * @brief Set whether the prediction is allowed or not.
2827  *
2828  * @param obj A valid Evas_Object handle
2829  * @param part The part name
2830  * @param prediction If true, the prediction feature is allowed.
2831  * @since 1.2.0
2832  */
2833 EAPI void             edje_object_part_text_prediction_allow_set        (Evas_Object *obj, const char *part, Eina_Bool prediction);
2834
2835 /**
2836  * @brief Get whether the prediction is allowed or not.
2837  *
2838  * @param obj A valid Evas_Object handle
2839  * @param part The part name
2840  * @return EINA_TRUE if prediction feature is allowed.
2841  * @since 1.2.0
2842  */
2843 EAPI Eina_Bool        edje_object_part_text_prediction_allow_get        (const Evas_Object *obj, const char *part);
2844
2845 /**
2846  * @brief Sets the attribute to show the input panel automatically.
2847  *
2848  * @param obj A valid Evas_Object handle
2849  * @param part The part name
2850  * @param enabled If true, the input panel is appeared when entry is clicked or has a focus
2851  * @since 1.1.0
2852  */
2853 EAPI void             edje_object_part_text_input_panel_enabled_set     (Evas_Object *obj, const char *part, Eina_Bool enabled);
2854
2855 /**
2856  * @brief Retrieve the attribute to show the input panel automatically.
2857  * @see edje_object_part_text_input_panel_enabled_set
2858  *
2859  * @param obj A valid Evas_Object handle
2860  * @param part The part name
2861  * @return EINA_TRUE if it supports or EINA_FALSE otherwise
2862  * @since 1.1.0
2863  */
2864 EAPI Eina_Bool        edje_object_part_text_input_panel_enabled_get (const Evas_Object *obj, const char *part);
2865
2866 /**
2867  * @brief Show the input panel (virtual keyboard) based on the input panel property such as layout, autocapital types, and so on.
2868  *
2869  * Note that input panel is shown or hidden automatically according to the focus state.
2870  * This API can be used in the case of manually controlling by using edje_object_part_text_input_panel_enabled_set.
2871  *
2872  * @param obj A valid Evas_Object handle
2873  * @param part The part name
2874  * @since 1.2.0
2875  */
2876 EAPI void             edje_object_part_text_input_panel_show(const Evas_Object *obj, const char *part);
2877
2878 /**
2879  * @brief Hide the input panel (virtual keyboard).
2880  * @see edje_object_part_text_input_panel_show
2881  *
2882  * Note that input panel is shown or hidden automatically according to the focus state.
2883  * This API can be used in the case of manually controlling by using edje_object_part_text_input_panel_enabled_set.
2884  *
2885  * @param obj A valid Evas_Object handle
2886  * @param part The part name
2887  * @since 1.2.0
2888  */
2889 EAPI void             edje_object_part_text_input_panel_hide(const Evas_Object *obj, const char *part);
2890
2891 /**
2892  * Set the language mode of the input panel.
2893  *
2894  * This API can be used if you want to show the Alphabet keyboard.
2895  *
2896  * @param obj A valid Evas_Object handle
2897  * @param part The part name
2898  * @param lang the language to be set to the input panel.
2899  * @since 1.2.0
2900  */
2901 EAPI void             edje_object_part_text_input_panel_language_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Lang lang);
2902
2903 /**
2904  * Get the language mode of the input panel.
2905  *
2906  * See @ref edje_object_part_text_input_panel_language_set for more details.
2907  *
2908  * @param obj A valid Evas_Object handle
2909  * @param part The part name
2910  * @return input panel language type
2911  * @since 1.2.0
2912  */
2913 EAPI Edje_Input_Panel_Lang edje_object_part_text_input_panel_language_get(const Evas_Object *obj, const char *part);
2914
2915 /**
2916  * Set the input panel-specific data to deliver to the input panel.
2917  *
2918  * This API is used by applications to deliver specific data to the input panel.
2919  * The data format MUST be negotiated by both application and the input panel.
2920  * The size and format of data are defined by the input panel.
2921  *
2922  * @param obj A valid Evas_Object handle
2923  * @param part The part name
2924  * @param data The specific data to be set to the input panel.
2925  * @param len the length of data, in bytes, to send to the input panel
2926  * @since 1.2.0
2927  */
2928 EAPI void             edje_object_part_text_input_panel_imdata_set(Evas_Object *obj, const char *part, const void *data, int len);
2929
2930 /**
2931  * Get the specific data of the current active input panel.
2932  *
2933  * @param obj A valid Evas_Object handle
2934  * @param part The part name
2935  * @param data The specific data to be got from the input panel
2936  * @param len The length of data
2937  * @since 1.2.0
2938  */
2939 EAPI void             edje_object_part_text_input_panel_imdata_get(const Evas_Object *obj, const char *part, void *data, int *len);
2940
2941 /**
2942  * Set the "return" key type. This type is used to set string or icon on the "return" key of the input panel.
2943  *
2944  * An input panel displays the string or icon associated with this type
2945  *
2946  * @param obj A valid Evas_Object handle
2947  * @param part The part name
2948  * @param return_key_type The type of "return" key on the input panel
2949  * @since 1.2.0
2950  */
2951 EAPI void             edje_object_part_text_input_panel_return_key_type_set(Evas_Object *obj, const char *part, Edje_Input_Panel_Return_Key_Type return_key_type);
2952
2953 /**
2954  * Get the "return" key type.
2955  *
2956  * @see edje_object_part_text_input_panel_return_key_type_set() for more details
2957  *
2958  * @param obj A valid Evas_Object handle
2959  * @param part The part name
2960  * @return The type of "return" key on the input panel
2961  * @since 1.2.0
2962  */
2963 EAPI Edje_Input_Panel_Return_Key_Type edje_object_part_text_input_panel_return_key_type_get(const Evas_Object *obj, const char *part);
2964
2965 /**
2966  * Set the return key on the input panel to be disabled.
2967  *
2968  * @param obj A valid Evas_Object handle
2969  * @param part The part name
2970  * @param disabled The state
2971  * @since 1.2.0
2972  */
2973 EAPI void             edje_object_part_text_input_panel_return_key_disabled_set(Evas_Object *obj, const char *part, Eina_Bool disabled);
2974
2975 /**
2976  * Get whether the return key on the input panel should be disabled or not.
2977  *
2978  * @param obj A valid Evas_Object handle
2979  * @param part The part name
2980  * @return EINA_TRUE if it should be disabled
2981  * @since 1.2.0
2982  */
2983 EAPI Eina_Bool        edje_object_part_text_input_panel_return_key_disabled_get(const Evas_Object *obj, const char *part);
2984
2985 /**
2986  * Add a filter function for newly inserted text.
2987  *
2988  * Whenever text is inserted (not the same as set) into the given @p part,
2989  * the list of filter functions will be called to decide if and how the new
2990  * text will be accepted.
2991  * There are three types of filters, EDJE_TEXT_FILTER_TEXT,
2992  * EDJE_TEXT_FILTER_FORMAT and EDJE_TEXT_FILTER_MARKUP.
2993  * The text parameter in the @p func filter can be modified by the user and
2994  * it's up to him to free the one passed if he's to change the pointer. If
2995  * doing so, the newly set text should be malloc'ed, as once all the filters
2996  * are called Edje will free it.
2997  * If the text is to be rejected, freeing it and setting the pointer to NULL
2998  * will make Edje break out of the filter cycle and reject the inserted
2999  * text.
3000  *
3001  * @warning This function will be deprecated because of difficulty in use.
3002  *          The type(format, text, or markup) of text should be always
3003  *          checked in the filter function for correct filtering.
3004  *          Please use edje_object_text_markup_filter_callback_add() instead. There
3005  *          is no need to check the type of text in the filter function
3006  *          because the text is always markup.
3007  * @warning If you use this function with
3008  *          edje_object_text_markup_filter_callback_add() together, all
3009  *          Edje_Text_Filter_Cb functions and Edje_Markup_Filter_Cb functions
3010  *          will be executed, and then filtered text will be inserted.
3011  *
3012  * @see edje_object_text_insert_filter_callback_del
3013  * @see edje_object_text_insert_filter_callback_del_full
3014  * @see edje_object_text_markup_filter_callback_add
3015  *
3016  * @param obj A valid Evas_Object handle
3017  * @param part The part name
3018  * @param func The callback function that will act as filter
3019  * @param data User provided data to pass to the filter function
3020  */
3021 EAPI void             edje_object_text_insert_filter_callback_add       (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data);
3022
3023 /**
3024  * Delete a function from the filter list.
3025  *
3026  * Delete the given @p func filter from the list in @p part. Returns
3027  * the user data pointer given when added.
3028  *
3029  * @see edje_object_text_insert_filter_callback_add
3030  * @see edje_object_text_insert_filter_callback_del_full
3031  *
3032  * @param obj A valid Evas_Object handle
3033  * @param part The part name
3034  * @param func The function callback to remove
3035  *
3036  * @return The user data pointer if successful, or NULL otherwise
3037  */
3038 EAPI void            *edje_object_text_insert_filter_callback_del       (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func);
3039
3040 /**
3041  * Delete a function and matching user data from the filter list.
3042  *
3043  * Delete the given @p func filter and @p data user data from the list
3044  * in @p part.
3045  * Returns the user data pointer given when added.
3046  *
3047  * @see edje_object_text_insert_filter_callback_add
3048  * @see edje_object_text_insert_filter_callback_del
3049  *
3050  * @param obj A valid Evas_Object handle
3051  * @param part The part name
3052  * @param func The function callback to remove
3053  * @param data The data passed to the callback function
3054  *
3055  * @return The same data pointer if successful, or NULL otherwise
3056  */
3057 EAPI void            *edje_object_text_insert_filter_callback_del_full  (Evas_Object *obj, const char *part, Edje_Text_Filter_Cb func, void *data);
3058
3059 /**
3060  * Add a markup filter function for newly inserted text.
3061  *
3062  * Whenever text is inserted (not the same as set) into the given @p part,
3063  * the list of markup filter functions will be called to decide if and how 
3064  * the new text will be accepted.
3065  * The text parameter in the @p func filter is always markup. It can be 
3066  * modified by the user and it's up to him to free the one passed if he's to
3067  * change the pointer. If doing so, the newly set text should be malloc'ed,
3068  * as once all the filters are called Edje will free it.
3069  * If the text is to be rejected, freeing it and setting the pointer to NULL
3070  * will make Edje break out of the filter cycle and reject the inserted
3071  * text.
3072  * This function is different from edje_object_text_insert_filter_callback_add()
3073  * in that the text parameter in the @p fucn filter is always markup.
3074  *
3075  * @warning If you use this function with
3076  *          edje_object_text_insert_filter_callback_add() togehter, all
3077  *          Edje_Text_Filter_Cb functions and Edje_Markup_Filter_Cb functions
3078  *          will be executed, and then filtered text will be inserted.
3079  *
3080  * @see edje_object_text_markup_filter_callback_del
3081  * @see edje_object_text_markup_filter_callback_del_full
3082  * @see edje_object_text_insert_filter_callback_add
3083  *
3084  * @param obj A valid Evas_Object handle
3085  * @param part The part name
3086  * @param func The callback function that will act as markup filter
3087  * @param data User provided data to pass to the filter function
3088  * @since 1.2.0
3089  */
3090 EAPI void edje_object_text_markup_filter_callback_add(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data);
3091
3092 /**
3093  * Delete a function from the markup filter list.
3094  *
3095  * Delete the given @p func filter from the list in @p part. Returns
3096  * the user data pointer given when added.
3097  *
3098  * @see edje_object_text_markup_filter_callback_add
3099  * @see edje_object_text_markup_filter_callback_del_full
3100  *
3101  * @param obj A valid Evas_Object handle
3102  * @param part The part name
3103  * @param func The function callback to remove
3104  *
3105  * @return The user data pointer if successful, or NULL otherwise
3106  * @since 1.2.0
3107  */
3108 EAPI void *edje_object_text_markup_filter_callback_del(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func);
3109
3110 /**
3111  * Delete a function and matching user data from the markup filter list.
3112  *
3113  * Delete the given @p func filter and @p data user data from the list
3114  * in @p part.
3115  * Returns the user data pointer given when added.
3116  *
3117  * @see edje_object_text_markup_filter_callback_add
3118  * @see edje_object_text_markup_filter_callback_del
3119  *
3120  * @param obj A valid Evas_Object handle
3121  * @param part The part name
3122  * @param func The function callback to remove
3123  * @param data The data passed to the callback function
3124  *
3125  * @return The same data pointer if successful, or NULL otherwise
3126  * @since 1.2.0
3127  */
3128 EAPI void *edje_object_text_markup_filter_callback_del_full(Evas_Object *obj, const char *part, Edje_Markup_Filter_Cb func, void *data);
3129
3130 /**
3131  * @brief "Swallows" an object into one of the Edje object @c SWALLOW
3132  * parts.
3133  *
3134  * @param obj A valid Edje object handle
3135  * @param part The swallow part's name
3136  * @param obj_swallow The object to occupy that part
3137  *
3138  * Swallowing an object into an Edje object is, for a given part of
3139  * type @c SWALLOW in the EDC group which gave life to @a obj, to set
3140  * an external object to be controlled by @a obj, being displayed
3141  * exactly over that part's region inside the whole Edje object's
3142  * viewport.
3143  *
3144  * From this point on, @a obj will have total control over @a
3145  * obj_swallow's geometry and visibility. For instance, if @a obj is
3146  * visible, as in @c evas_object_show(), the swallowed object will be
3147  * visible too -- if the given @c SWALLOW part it's in is also
3148  * visible. Other actions on @a obj will also reflect on the swallowed
3149  * object as well (e.g. resizing, moving, raising/lowering, etc.).
3150  *
3151  * Finally, all internal changes to @a part, specifically, will
3152  * reflect on the displaying of @a obj_swallow, for example state
3153  * changes leading to different visibility states, geometries,
3154  * positions, etc.
3155  *
3156  * If an object has already been swallowed into this part, then it
3157  * will first be unswallowed (as in edje_object_part_unswallow())
3158  * before the new object is swallowed.
3159  *
3160  * @note @a obj @b won't delete the swallowed object once it is
3161  * deleted -- @a obj_swallow will get to an unparented state again.
3162  *
3163  * For more details on EDC @c SWALLOW parts, see @ref edcref "syntax
3164  * reference".
3165  */
3166 EAPI Eina_Bool        edje_object_part_swallow        (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
3167
3168 /**
3169  * @brief Unswallow an object.
3170  *
3171  * @param obj A valid Evas_Object handle
3172  * @param obj_swallow The swallowed object
3173  *
3174  * Causes the edje to regurgitate a previously swallowed object. :)
3175  *
3176  * @note @p obj_swallow will @b not be deleted or hidden.
3177  * @note @p obj_swallow may appear shown on the evas depending on its state when
3178  * it got unswallowed. Make sure you delete it or hide it if you do not want it to.
3179  */
3180 EAPI void             edje_object_part_unswallow      (Evas_Object *obj, Evas_Object *obj_swallow);
3181
3182 /**
3183  * @brief Get the object currently swallowed by a part.
3184  *
3185  * @param obj A valid Evas_Object handle
3186  * @param part The part name
3187  * @return The swallowed object, or NULL if there is none.
3188  */
3189 EAPI Evas_Object     *edje_object_part_swallow_get    (const Evas_Object *obj, const char *part);
3190
3191 /**
3192  * @brief Returns the state of the Edje part.
3193  *
3194  * @param obj A valid Evas_Object handle
3195  * @param part The part name
3196  * @param val_ret
3197  *
3198  * @return The part state:\n
3199  * "default" for the default state\n
3200  * "" for other states
3201  */
3202 EAPI const char      *edje_object_part_state_get      (const Evas_Object *obj, const char *part, double *val_ret);
3203
3204 /**
3205  * @brief Determine dragable directions.
3206  *
3207  * @param obj A valid Evas_Object handle
3208  * @param part The part name
3209  *
3210  * The dragable directions are defined in the EDC file, inside the @c dragable
3211  * section, by the attributes @c x and @c y. See the @ref edcref for more
3212  * information.
3213  *
3214  * @return #EDJE_DRAG_DIR_NONE: Not dragable\n
3215  * #EDJE_DRAG_DIR_X: Dragable in X direction\n
3216  * #EDJE_DRAG_DIR_Y: Dragable in Y direction\n
3217  * #EDJE_DRAG_DIR_XY: Dragable in X & Y directions
3218  */
3219 EAPI Edje_Drag_Dir    edje_object_part_drag_dir_get   (const Evas_Object *obj, const char *part);
3220
3221 /**
3222  * @brief Set the dragable object location.
3223  *
3224  * @param obj A valid Evas_Object handle
3225  * @param part The part name
3226  * @param dx The x value
3227  * @param dy The y value
3228  *
3229  * Places the dragable object at the given location.
3230  *
3231  * Values for @p dx and @p dy are real numbers that range from 0 to 1,
3232  * representing the relative position to the dragable area on that axis.
3233  *
3234  * This value means, for the vertical axis, that 0.0 will be at the top if the
3235  * first parameter of @c y in the dragable part theme is 1, and at bottom if it
3236  * is -1.
3237  *
3238  * For the horizontal axis, 0.0 means left if the first parameter of @c x in the
3239  * dragable part theme is 1, and right if it is -1.
3240  *
3241  * @see edje_object_part_drag_value_get()
3242  */
3243 EAPI Eina_Bool        edje_object_part_drag_value_set (Evas_Object *obj, const char *part, double dx, double dy);
3244
3245 /**
3246  * @brief Get the dragable object location.
3247  *
3248  * @param obj A valid Evas_Object handle
3249  * @param part The part name
3250  * @param dx The X value pointer
3251  * @param dy The Y value pointer
3252  *
3253  * Values for @p dx and @p dy are real numbers that range from 0 to 1,
3254  * representing the relative position to the dragable area on that axis.
3255  *
3256  * @see edje_object_part_drag_value_set()
3257  *
3258  * Gets the drag location values.
3259  */
3260 EAPI Eina_Bool        edje_object_part_drag_value_get (const Evas_Object *obj, const char *part, double *dx, double *dy);
3261
3262 /**
3263  * @brief Set the dragable object size.
3264  *
3265  * @param obj A valid Evas_Object handle
3266  * @param part The part name
3267  * @param dw The drag width
3268  * @param dh The drag height
3269  *
3270  * Values for @p dw and @p dh are real numbers that range from 0 to 1,
3271  * representing the relative size of the dragable area on that axis.
3272  *
3273  * Sets the size of the dragable object.
3274  *
3275  * @see edje_object_part_drag_size_get()
3276  */
3277 EAPI Eina_Bool        edje_object_part_drag_size_set  (Evas_Object *obj, const char *part, double dw, double dh);
3278
3279 /**
3280  * @brief Get the dragable object size.
3281  *
3282  * @param obj A valid Evas_Object handle
3283  * @param part The part name
3284  * @param dw The drag width pointer
3285  * @param dh The drag height pointer
3286  *
3287  * Gets the dragable object size.
3288  *
3289  * @see edje_object_part_drag_size_set()
3290  */
3291 EAPI Eina_Bool        edje_object_part_drag_size_get  (const Evas_Object *obj, const char *part, double *dw, double *dh);
3292
3293 /**
3294  * @brief Sets the drag step increment.
3295  *
3296  * @param obj A valid Evas_Object handle
3297  * @param part The part name
3298  * @param dx The x step amount
3299  * @param dy The y step amount
3300  *
3301  * Sets the x,y step increments for a dragable object.
3302  *
3303  * Values for @p dx and @p dy are real numbers that range from 0 to 1,
3304  * representing the relative size of the dragable area on that axis by which the
3305  * part will be moved.
3306  *
3307  * @see edje_object_part_drag_step_get()
3308  */
3309 EAPI Eina_Bool        edje_object_part_drag_step_set  (Evas_Object *obj, const char *part, double dx, double dy);
3310
3311 /**
3312  * @brief Gets the drag step increment values.
3313  *
3314  * @param obj A valid Evas_Object handle
3315  * @param part The part
3316  * @param dx The x step increment pointer
3317  * @param dy The y step increment pointer
3318  *
3319  * Gets the x and y step increments for the dragable object.
3320  *
3321  *
3322  * @see edje_object_part_drag_step_set()
3323  */
3324 EAPI Eina_Bool        edje_object_part_drag_step_get  (const Evas_Object *obj, const char *part, double *dx, double *dy);
3325
3326 /**
3327  * @brief Sets the page step increments.
3328  *
3329  * @param obj A valid Evas_Object handle
3330  * @param part The part name
3331  * @param dx The x page step increment
3332  * @param dy The y page step increment
3333  *
3334  * Sets the x,y page step increment values.
3335  *
3336  * Values for @p dx and @p dy are real numbers that range from 0 to 1,
3337  * representing the relative size of the dragable area on that axis by which the
3338  * part will be moved.
3339  *
3340  * @see edje_object_part_drag_page_get()
3341  */
3342 EAPI Eina_Bool        edje_object_part_drag_page_set  (Evas_Object *obj, const char *part, double dx, double dy);
3343
3344 /**
3345  * @brief Gets the page step increments.
3346  *
3347  * @param obj A valid Evas_Object handle
3348  * @param part The part name
3349  * @param dx The dx page increment pointer
3350  * @param dy The dy page increment pointer
3351  *
3352  * Gets the x,y page step increments for the dragable object.
3353  *
3354  * @see edje_object_part_drag_page_set()
3355  */
3356 EAPI Eina_Bool        edje_object_part_drag_page_get  (const Evas_Object *obj, const char *part, double *dx, double *dy);
3357
3358 /**
3359  * @brief Steps the dragable x,y steps.
3360  *
3361  * @param obj A valid Evas_Object handle
3362  * @param part The part name
3363  * @param dx The x step
3364  * @param dy The y step
3365  *
3366  * Steps x,y where the step increment is the amount set by
3367  * edje_object_part_drag_step_set.
3368  *
3369  * Values for @p dx and @p dy are real numbers that range from 0 to 1.
3370  *
3371  * @see edje_object_part_drag_page()
3372  */
3373 EAPI Eina_Bool        edje_object_part_drag_step      (Evas_Object *obj, const char *part, double dx, double dy);
3374
3375 /**
3376  * @brief Pages x,y steps.
3377  *
3378  * @param obj A valid Evas_Object handle
3379  * @param part The part name
3380  * @param dx The x step
3381  * @param dy The y step
3382  *
3383  * Pages x,y where the increment is defined by
3384  * edje_object_part_drag_page_set.
3385  *
3386  * Values for @p dx and @p dy are real numbers that range from 0 to 1.
3387  *
3388  * @warning Paging is bugged!
3389  *
3390  * @see edje_object_part_drag_step()
3391  */
3392 EAPI Eina_Bool        edje_object_part_drag_page      (Evas_Object *obj, const char *part, double dx, double dy);
3393
3394
3395 /**
3396  * @brief Get the object created by this external part.
3397  *
3398  * Parts of type external creates the part object using information
3399  * provided by external plugins. It's somehow like "swallow"
3400  * (edje_object_part_swallow()), but it's all set automatically.
3401  *
3402  * This function returns the part created by such external plugins and
3403  * being currently managed by this Edje.
3404  *
3405  * @note Almost all swallow rules apply: you should not move, resize,
3406  *       hide, show, set the color or clipper of such part. It's a bit
3407  *       more restrictive as one must @b never delete this object!
3408  *
3409  * @param obj A valid Evas_Object handle
3410  * @param part The part name
3411  * @return The externally created object, or NULL if there is none or
3412  *         part is not an external.
3413  */
3414 EAPI Evas_Object              *edje_object_part_external_object_get     (const Evas_Object *obj, const char *part);
3415
3416 /**
3417  * @brief Set the parameter for the external part.
3418  *
3419  * Parts of type external may carry extra properties that have
3420  * meanings defined by the external plugin. For instance, it may be a
3421  * string that defines a button label and setting this property will
3422  * change that label on the fly.
3423  *
3424  * @note external parts have parameters set when they change
3425  *       states. Those parameters will never be changed by this
3426  *       function. The interpretation of how state_set parameters and
3427  *       param_set will interact is up to the external plugin.
3428  *
3429  * @note this function will not check if parameter value is valid
3430  *       using #Edje_External_Param_Info minimum, maximum, valid
3431  *       choices and others. However these should be checked by the
3432  *       underlying implementation provided by the external
3433  *       plugin. This is done for performance reasons.
3434  *
3435  * @param obj A valid Evas_Object handle
3436  * @param part The part name
3437  * @param param the parameter details, including its name, type and
3438  *        actual value. This pointer should be valid, and the
3439  *        parameter must exist in
3440  *        #Edje_External_Type::parameters_info, with the exact type,
3441  *        otherwise the operation will fail and @c EINA_FALSE will be
3442  *        returned.
3443  *
3444  * @return @c EINA_TRUE if everything went fine, @c EINA_FALSE on errors.
3445  */
3446 EAPI Eina_Bool                 edje_object_part_external_param_set      (Evas_Object *obj, const char *part, const Edje_External_Param *param);
3447
3448 /**
3449  * @brief Get the parameter for the external part.
3450  *
3451  * Parts of type external may carry extra properties that have
3452  * meanings defined by the external plugin. For instance, it may be a
3453  * string that defines a button label. This property can be modified by
3454  * state parameters, by explicit calls to
3455  * edje_object_part_external_param_set() or getting the actual object
3456  * with edje_object_part_external_object_get() and calling native
3457  * functions.
3458  *
3459  * This function asks the external plugin what is the current value,
3460  * independent on how it was set.
3461  *
3462  * @param obj A valid Evas_Object handle
3463  * @param part The part name
3464
3465  * @param param the parameter details. It is used as both input and
3466  *        output variable. This pointer should be valid, and the
3467  *        parameter must exist in
3468  *        #Edje_External_Type::parameters_info, with the exact type,
3469  *        otherwise the operation will fail and @c EINA_FALSE will be
3470  *        returned.
3471  *
3472  * @return @c EINA_TRUE if everything went fine and @p param members
3473  *         are filled with information, @c EINA_FALSE on errors and @p
3474  *         param member values are not set or valid.
3475  */
3476 EAPI Eina_Bool                 edje_object_part_external_param_get      (const Evas_Object *obj, const char *part, Edje_External_Param *param);
3477
3478 /**
3479  * @brief Get an object contained in an part of type EXTERNAL
3480  *
3481  * The @p content string must not be NULL. Its actual value depends on the
3482  * code providing the EXTERNAL.
3483  *
3484  * @param obj The Edje object
3485  * @param part The name of the part holding the EXTERNAL
3486  * @param content A string identifying which content from the EXTERNAL to get
3487  */
3488 EAPI Evas_Object              *edje_object_part_external_content_get    (const Evas_Object *obj, const char *part, const char *content);
3489
3490 /**
3491  * Facility to query the type of the given parameter of the given part.
3492  *
3493  * @param obj A valid Evas_Object handle
3494  * @param part The part name
3495  * @param param the parameter name to use.
3496  *
3497  * @return @c EDJE_EXTERNAL_PARAM_TYPE_MAX on errors, or another value
3498  *         from #Edje_External_Param_Type on success.
3499  */
3500 EAPI Edje_External_Param_Type  edje_object_part_external_param_type_get (const Evas_Object *obj, const char *part, const char *param);
3501
3502
3503 /**
3504  * @brief Appends an object to the box.
3505  *
3506  * @param obj A valid Evas_Object handle
3507  * @param part The part name
3508  * @param child The object to append
3509  *
3510  * @return @c EINA_TRUE: Successfully added.\n
3511  * @c EINA_FALSE: An error occurred.
3512  *
3513  * Appends child to the box indicated by part.
3514  *
3515  * @see edje_object_part_box_prepend()
3516  * @see edje_object_part_box_insert_before()
3517  * @see edje_object_part_box_insert_at()
3518  */
3519 EAPI Eina_Bool    edje_object_part_box_append             (Evas_Object *obj, const char *part, Evas_Object *child);
3520
3521 /**
3522  * @brief Prepends an object to the box.
3523  *
3524  * @param obj A valid Evas_Object handle
3525  * @param part The part name
3526  * @param child The object to prepend
3527  *
3528  * @return @c EINA_TRUE: Successfully added.\n
3529  * @c EINA_FALSE: An error occurred.
3530  *
3531  * Prepends child to the box indicated by part.
3532  *
3533  * @see edje_object_part_box_append()
3534  * @see edje_object_part_box_insert_before()
3535  * @see edje_object_part_box_insert_at()
3536  */
3537 EAPI Eina_Bool    edje_object_part_box_prepend            (Evas_Object *obj, const char *part, Evas_Object *child);
3538
3539 /**
3540  * @brief Adds an object to the box.
3541  *
3542  * @param obj A valid Evas_Object handle
3543  * @param part The part name
3544  * @param child The object to insert
3545  * @param reference The object to be used as reference
3546  *
3547  * @return @c EINA_TRUE: Successfully added.\n
3548  * @c EINA_FALSE: An error occurred.
3549  *
3550  * Inserts child in the box given by part, in the position marked by
3551  * reference.
3552  *
3553  * @see edje_object_part_box_append()
3554  * @see edje_object_part_box_prepend()
3555  * @see edje_object_part_box_insert_at()
3556  */
3557 EAPI Eina_Bool    edje_object_part_box_insert_before      (Evas_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference);
3558
3559 /**
3560  * @brief Inserts an object to the box.
3561  *
3562  * @param obj A valid Evas_Object handle
3563  * @param part The part name
3564  * @param child The object to insert
3565  * @param pos The position where to insert child
3566  *
3567  * @return @c EINA_TRUE: Successfully added.\n
3568  * @c EINA_FALSE: An error occurred.
3569  *
3570  * Adds child to the box indicated by part, in the position given by
3571  * pos.
3572  *
3573  * @see edje_object_part_box_append()
3574  * @see edje_object_part_box_prepend()
3575  * @see edje_object_part_box_insert_before()
3576  */
3577 EAPI Eina_Bool    edje_object_part_box_insert_at          (Evas_Object *obj, const char *part, Evas_Object *child, unsigned int pos);
3578
3579 /**
3580  * @brief Removes an object from the box.
3581  *
3582  * @param obj A valid Evas_Object handle
3583  * @param part The part name
3584  * @param child The object to remove
3585  *
3586  * @return Pointer to the object removed, or @c NULL.
3587  *
3588  * Removes child from the box indicated by part.
3589  *
3590  * @see edje_object_part_box_remove_at()
3591  * @see edje_object_part_box_remove_all()
3592  */
3593 EAPI Evas_Object *edje_object_part_box_remove             (Evas_Object *obj, const char *part, Evas_Object *child);
3594
3595 /**
3596  * @brief Removes an object from the box.
3597  *
3598  * @param obj A valid Evas_Object handle
3599  * @param part The part name
3600  * @param pos The position index of the object (starts counting from 0)
3601  *
3602  * @return Pointer to the object removed, or @c NULL.
3603  *
3604  * Removes from the box indicated by part, the object in the position
3605  * pos.
3606  *
3607  * @see edje_object_part_box_remove()
3608  * @see edje_object_part_box_remove_all()
3609  */
3610 EAPI Evas_Object *edje_object_part_box_remove_at          (Evas_Object *obj, const char *part, unsigned int pos);
3611
3612 /**
3613  * @brief Removes all elements from the box.
3614  *
3615  * @param obj A valid Evas_Object handle
3616  * @param part The part name
3617  * @param clear Delete objects on removal
3618  *
3619  * @return 1: Successfully cleared.\n
3620  * 0: An error occurred.
3621  *
3622  * Removes all the external objects from the box indicated by part.
3623  * Elements created from the theme will not be removed.
3624  *
3625  * @see edje_object_part_box_remove()
3626  * @see edje_object_part_box_remove_at()
3627  */
3628 EAPI Eina_Bool    edje_object_part_box_remove_all         (Evas_Object *obj, const char *part, Eina_Bool clear);
3629
3630 /**
3631  * @brief Retrieve a list all accessibility part names
3632  *
3633  * @param obj A valid Evas_Object handle
3634  * @return A list all accessibility part names on @p obj
3635  * @since 1.7.0
3636  */
3637 EAPI Eina_List * edje_object_access_part_list_get         (const Evas_Object *obj);
3638
3639 /**
3640  * @brief Retrieve a child from a table
3641  *
3642  * @param obj A valid Evas_Object handle
3643  * @param part The part name
3644  * @param col The column of the child to get
3645  * @param row The row of the child to get
3646  * @return The child Evas_Object
3647  */
3648 EAPI Evas_Object *edje_object_part_table_child_get        (const Evas_Object *obj, const char *part, unsigned int col, unsigned int row);
3649
3650 /**
3651  * @brief Packs an object into the table.
3652  *
3653  * @param obj A valid Evas_Object handle
3654  * @param part The part name
3655  * @param child_obj The object to pack in
3656  * @param col The column to place it in
3657  * @param row The row to place it in
3658  * @param colspan Columns the child will take
3659  * @param rowspan Rows the child will take
3660  *
3661  * @return @c EINA_TRUE object was added, @c EINA_FALSE on failure
3662  *
3663  * Packs an object into the table indicated by part.
3664  */
3665 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);
3666
3667 /**
3668  * @brief Removes an object from the table.
3669  *
3670  * @param obj A valid Evas_Object handle
3671  * @param part The part name
3672  * @param child_obj The object to pack in
3673  *
3674  * @return @c EINA_TRUE object removed, @c EINA_FALSE on failure
3675  *
3676  * Removes an object from the table indicated by part.
3677  */
3678 EAPI Eina_Bool    edje_object_part_table_unpack           (Evas_Object *obj, const char *part, Evas_Object *child_obj);
3679
3680 /**
3681  * @brief Gets the number of columns and rows the table has.
3682  *
3683  * @param obj A valid Evas_Object handle
3684  * @param part The part name
3685  * @param cols Pointer where to store number of columns (can be NULL)
3686  * @param rows Pointer where to store number of rows (can be NULL)
3687  *
3688  * @return @c EINA_TRUE get some data, @c EINA_FALSE on failure
3689  *
3690  * Retrieves the size of the table in number of columns and rows.
3691  */
3692 EAPI Eina_Bool    edje_object_part_table_col_row_size_get (const Evas_Object *obj, const char *part, int *cols, int *rows);
3693
3694 /**
3695  * @brief Removes all object from the table.
3696  *
3697  * @param obj A valid Evas_Object handle
3698  * @param part The part name
3699  * @param clear If set, will delete subobjs on remove
3700  *
3701  * @return @c EINA_TRUE clear the table, @c EINA_FALSE on failure
3702  *
3703  * Removes all object from the table indicated by part, except the
3704  * internal ones set from the theme.
3705  */
3706 EAPI Eina_Bool    edje_object_part_table_clear            (Evas_Object *obj, const char *part, Eina_Bool clear);
3707
3708 /**
3709  * @brief Send an (Edje) message to a given Edje object
3710  *
3711  * @param obj A handle to an Edje object
3712  * @param type The type of message to send to @p obj
3713  * @param id A identification number for the message to be sent
3714  * @param msg The message's body, a struct depending on @p type
3715  *
3716  * This function sends an Edje message to @p obj and to all of its
3717  * child objects, if it has any (swallowed objects are one kind of
3718  * child object). @p type and @p msg @b must be matched accordingly,
3719  * as documented in #Edje_Message_Type.
3720  *
3721  * The @p id argument as a form of code and theme defining a common
3722  * interface on message communication. One should define the same IDs
3723  * on both code and EDC declaration (see @ref edcref "the syntax" for
3724  * EDC files), to individualize messages (binding them to a given
3725  * context).
3726  *
3727  * The function to handle messages arriving @b from @b obj is set with
3728  * edje_object_message_handler_set().
3729  */
3730 EAPI void         edje_object_message_send                (Evas_Object *obj, Edje_Message_Type type, int id, void *msg);
3731
3732 /**
3733  * @brief Set an Edje message handler function for a given Edje object.
3734  *
3735  * @param obj A handle to an Edje object
3736  * @param func The function to handle messages @b coming from @p obj
3737  * @param data Auxiliary data to be passed to @p func
3738  *
3739  * Edje messages are one of the communication interfaces between
3740  * @b code and a given Edje object's @b theme. With messages, one can
3741  * communicate values beyond strings (which are the subject of Edje
3742  * signals -- see edje_object_signal_emit()), like float and integer
3743  * numbers. Moreover, messages can be identified by integer
3744  * numbers. See #Edje_Message_Type for the full list of message types.
3745  *
3746  * For scriptable programs on an Edje object's defining EDC file which
3747  * send messages with the @c send_message() primitive, one can attach
3748  * <b>handler functions</b>, to be called in the code which creates
3749  * that object (see @ref edcref "the syntax" for EDC files).
3750  *
3751  * This function associates a message handler function and the
3752  * attached data pointer to the object @p obj.
3753  *
3754  * @see edje_object_message_send()
3755  */
3756 EAPI void         edje_object_message_handler_set         (Evas_Object *obj, Edje_Message_Handler_Cb func, void *data);
3757
3758 /**
3759  * @brief Process an object's message queue.
3760  *
3761  * @param obj A handle to an Edje object.
3762  *
3763  * This function goes through the object message queue processing the
3764  * pending messages for @b this specific Edje object. Normally they'd
3765  * be processed only at idle time.
3766  *
3767  */
3768 EAPI void         edje_object_message_signal_process      (Evas_Object *obj);
3769
3770
3771 /**
3772  * @brief Process all queued up edje messages.
3773  *
3774  * This function triggers the processing of messages addressed to any
3775  * (alive) edje objects.
3776  *
3777  */
3778 EAPI void         edje_message_signal_process             (void);
3779
3780 /**
3781  * Register a type to be used by EXTERNAL parts.
3782  *
3783  * Edje supports parts of type EXTERNAL, which will call user defined functions
3784  * to create and manipulate the object that's allocated in that part. This is
3785  * done by expecifying in the @c source property of the part the name of the
3786  * external to use, which must be one registered with this function.
3787  *
3788  * @param type_name name to register and be known by edje's "source:"
3789  *        parameter of "type: EXTERNAL" parts.
3790  * @param type_info meta-information describing how to interact with it.
3791  *
3792  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3793  *         type already registered).
3794  *
3795  * @see edje_external_type_array_register()
3796  */
3797 EAPI Eina_Bool    edje_external_type_register             (const char *type_name, const Edje_External_Type *type_info);
3798
3799 /**
3800  * Unregister a previously registered EXTERNAL type.
3801  *
3802  * @param type_name name to unregister. It should have been registered with
3803  *        edje_external_type_register() before.
3804  *
3805  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3806  *         type_name did not exist).
3807  *
3808  * @see edje_external_type_array_unregister()
3809  */
3810 EAPI Eina_Bool    edje_external_type_unregister           (const char *type_name);
3811
3812 /**
3813  * Register a batch of types and their information.
3814  *
3815  * When several types will be registered it is recommended to use this
3816  * function instead of several calls to edje_external_type_register(), as it
3817  * is faster.
3818  *
3819  * @note The contents of the array will be referenced directly for as long as
3820  * the type remains registered, so both the @c name and @c info in the
3821  * @p array must be kept alive during all this period (usually, the entire
3822  * program lifetime). The most common case would be to keep the array as a
3823  * @c static @c const type anyway.
3824  *
3825  * @param array @c NULL terminated array with type name and
3826  *        information. Note that type name or information are
3827  *        referenced directly, so they must be kept alive after
3828  *        this function returns!
3829  *
3830  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure (like
3831  *         type already registered).
3832  *
3833  * @see edje_external_type_register()
3834  */
3835 EAPI void         edje_external_type_array_register       (const Edje_External_Type_Info *array);
3836
3837 /**
3838  * Unregister a batch of given external type previously registered.
3839  *
3840  * @param array @c NULL terminated array, should be the same as the
3841  *        one used to register with edje_external_type_array_register()
3842  *
3843  * @see edje_external_type_unregister()
3844  */
3845 EAPI void         edje_external_type_array_unregister     (const Edje_External_Type_Info *array);
3846
3847 /**
3848  * Return the current ABI version for Edje_External_Type structure.
3849  *
3850  * Always check this number before accessing Edje_External_Type in
3851  * your own software. If the number is not the same, your software may
3852  * access invalid memory and crash, or just get garbage values.
3853  *
3854  * @warning @b NEVER, EVER define your own Edje_External_Type using the
3855  *          return of this function as it will change as Edje library
3856  *          (libedje.so) changes, but your type definition will
3857  *          not. Instead, use #EDJE_EXTERNAL_TYPE_ABI_VERSION.
3858  *
3859  * Summary:
3860  *   - use edje_external_type_abi_version_get() to check.
3861  *   - use #EDJE_EXTERNAL_TYPE_ABI_VERSION to define/declare.
3862  *
3863  * @return The external ABI version the Edje library was compiled with. That
3864  * is, the value #EDJE_EXTERNAL_TYPE_ABI_VERSION had at that moment.
3865  */
3866 EAPI unsigned int edje_external_type_abi_version_get      (void) EINA_CONST;
3867
3868 /**
3869  * Returns an interator of all the registered EXTERNAL types.
3870  *
3871  * Each item in the iterator is an @c Eina_Hash_Tuple which has the type
3872  * of the external in the @c key and #Edje_External_Type as @c data.
3873  *
3874  * @code
3875  * const Eina_Hash_Tuple *tuple;
3876  * Eina_Iterator *itr;
3877  * const Eina_List *l, *modules;
3878  * const char *s;
3879  *
3880  * modules = edje_available_modules_get();
3881  * EINA_LIST_FOREACH(modules, l, s)
3882  *   {
3883  *      if (!edje_module_load(s))
3884  *        printf("Error loading edje module: %s\n", s);
3885  *   }
3886  *
3887  * itr = edje_external_iterator_get();
3888  * EINA_ITERATOR_FOREACH(itr, tuple)
3889  *   {
3890  *      const char *name = tuple->key;
3891  *      const Edje_External_Type *type = tuple->data;
3892  *
3893  *      if ((!type) ||
3894  *          (type->abi_version != edje_external_type_abi_version_get()))
3895  *        {
3896  *           printf("Error: invalid type %p (abi: %d, expected: %d)\n",
3897  *                   type, type ? type->abi_version : 0,
3898  *                   edje_external_type_abi_version_get());
3899  *           continue;
3900  *        }
3901  *
3902  *      printf("%s: %s (%s) label='%s' desc='%s'\n",
3903  *             name, type->module, type->module_name,
3904  *             type->label_get ? type->label_get(type->data) : "",
3905  *             type->description_get ? type->description_get(type->data) : "");
3906  *   }
3907  *
3908  * @endcode
3909  */
3910 EAPI Eina_Iterator                  *edje_external_iterator_get     (void);
3911
3912 /**
3913  * Conevenience function to find a specific parameter in a list of them.
3914  *
3915  * @param params The list of parameters for the external
3916  * @param key The parameter to look for
3917  *
3918  * @return The matching #Edje_External_Param or NULL if it's not found.
3919  */
3920    EAPI Edje_External_Param            *edje_external_param_find       (const Eina_List *params, const char *key);
3921 /**
3922  * Get the value of the given parameter of integer type.
3923  *
3924  * Look for the @p key parameter in the @p params list and return its value in
3925  * @p ret. If the parameter is found and is of type
3926  * #EDJE_EXTERNAL_PARAM_TYPE_INT, its value will be stored in the int pointed
3927  * by @p ret, returning EINA_TRUE. In any other case, the function returns
3928  * EINA_FALSE.
3929  *
3930  * @param params List of parameters where to look
3931  * @param key Name of the parameter to fetch
3932  * @param ret Int pointer where to store the value, must not be NULL.
3933  *
3934  * @return EINA_TRUE if the parameter was found and is of integer type,
3935  * EINA_FALSE otherwise.
3936  */
3937    EAPI Eina_Bool                       edje_external_param_int_get    (const Eina_List *params, const char *key, int *ret);
3938 /**
3939  * Get the value of the given parameter of double type.
3940  *
3941  * Look for the @p key parameter in the @p params list and return its value in
3942  * @p ret. If the parameter is found and is of type
3943  * #EDJE_EXTERNAL_PARAM_TYPE_DOUBLE, its value will be stored in the double
3944  * pointed by @p ret, returning EINA_TRUE. In any other case, the function
3945  * returns EINA_FALSE.
3946  *
3947  * @param params List of parameters where to look
3948  * @param key Name of the parameter to fetch
3949  * @param ret Double pointer where to store the value, must not be NULL.
3950  *
3951  * @return EINA_TRUE if the parameter was found and is of double type,
3952  * EINA_FALSE otherwise.
3953  */
3954    EAPI Eina_Bool                       edje_external_param_double_get (const Eina_List *params, const char *key, double *ret);
3955 /**
3956  * Get the value of the given parameter of string type.
3957  *
3958  * Look for the @p key parameter in the @p params list and return its value in
3959  * @p ret. If the parameter is found and is of type
3960  * #EDJE_EXTERNAL_PARAM_TYPE_STRING, its value will be stored in the pointer
3961  * pointed by @p ret, returning EINA_TRUE. In any other case, the function
3962  * returns EINA_FALSE.
3963  *
3964  * The string stored in @p ret must not be freed or modified.
3965  *
3966  * @param params List of parameters where to look
3967  * @param key Name of the parameter to fetch
3968  * @param ret String pointer where to store the value, must not be NULL.
3969  *
3970  * @return EINA_TRUE if the parameter was found and is of string type,
3971  * EINA_FALSE otherwise.
3972  */
3973    EAPI Eina_Bool                       edje_external_param_string_get (const Eina_List *params, const char *key, const char **ret);
3974 /**
3975  * Get the value of the given parameter of boolean type.
3976  *
3977  * Look for the @p key parameter in the @p params list and return its value in
3978  * @p ret. If the parameter is found and is of type
3979  * #EDJE_EXTERNAL_PARAM_TYPE_BOOL, its value will be stored in the Eina_Bool
3980  * pointed by @p ret, returning EINA_TRUE. In any other case, the function
3981  * returns EINA_FALSE.
3982  *
3983  * @param params List of parameters where to look
3984  * @param key Name of the parameter to fetch
3985  * @param ret Eina_Bool pointer where to store the value, must not be NULL.
3986  *
3987  * @return EINA_TRUE if the parameter was found and is of boolean type,
3988  * EINA_FALSE otherwise.
3989  */
3990    EAPI Eina_Bool                       edje_external_param_bool_get   (const Eina_List *params, const char *key, Eina_Bool *ret);
3991 /**
3992  * Get the value of the given parameter of choice type.
3993  *
3994  * Look for the @p key parameter in the @p params list and return its value in
3995  * @p ret. If the parameter is found and is of type
3996  * #EDJE_EXTERNAL_PARAM_TYPE_CHOICE, its value will be stored in the string
3997  * pointed by @p ret, returning EINA_TRUE. In any other case, the function
3998  * returns EINA_FALSE.
3999  *
4000  * The string stored in @p ret must not be freed or modified.
4001  *
4002  * @param params List of parameters where to look
4003  * @param key Name of the parameter to fetch
4004  * @param ret String pointer where to store the value, must not be NULL.
4005  *
4006  * @return EINA_TRUE if the parameter was found and is of integer type,
4007  * EINA_FALSE otherwise.
4008  */
4009    EAPI Eina_Bool                       edje_external_param_choice_get (const Eina_List *params, const char *key, const char **ret);
4010
4011 /**
4012  * Get the array of parameters information about a type given its name.
4013  *
4014  * @note the type names and other strings are static, that means they are
4015  *       @b NOT translated. One must use
4016  *       Edje_External_Type::translate() to translate those.
4017  *
4018  * @return the NULL terminated array, or @c NULL if type is unknown or
4019  *         it does not have any parameter information.
4020  *
4021  * @see edje_external_type_get()
4022  */
4023 EAPI const Edje_External_Param_Info *edje_external_param_info_get   (const char *type_name);
4024
4025 /**
4026  * Get the #Edje_External_Type that defines an EXTERNAL type registered with
4027  * the name @p type_name.
4028  */
4029    EAPI const Edje_External_Type       *edje_external_type_get         (const char *type_name);
4030
4031    EAPI Eina_Bool               edje_module_load                (const char *module);
4032    EAPI const Eina_List        *edje_available_modules_get      (void);
4033
4034    /* perspective info for maps inside edje objects */
4035    typedef struct _Edje_Perspective Edje_Perspective;
4036
4037    /**
4038     * Creates a new perspective in the given canvas.
4039     *
4040     * @param e The given canvas (Evas).
4041     * @return An @ref Edje_Perspective object for this canvas, or @c NULL on errors.
4042     *
4043     * This function creates a perspective object that can be set on an Edje
4044     * object, or globally to all Edje objects on this canvas.
4045     *
4046     * @see edje_perspective_set()
4047     * @see edje_perspective_free()
4048     */
4049    EAPI Edje_Perspective       *edje_perspective_new            (Evas *e);
4050    /**
4051     * Delete the given perspective object.
4052     *
4053     * @param ps A valid perspective object, or @c NULL.
4054     *
4055     * This function will delete the perspective object. If the perspective
4056     * effect was being applied to any Edje object or part, this effect won't be
4057     * applied anymore.
4058     *
4059     * @see edje_perspective_new()
4060     */
4061    EAPI void                    edje_perspective_free           (Edje_Perspective *ps);
4062    /**
4063     * Setup the transform for this perspective object.
4064     *
4065     * This sets the parameters of the perspective transformation. X, Y and Z
4066     * values are used. The px and py points specify the "infinite distance" point
4067     * in the 3D conversion (where all lines converge to like when artists draw
4068     * 3D by hand). The @p z0 value specifies the z value at which there is a 1:1
4069     * mapping between spatial coordinates and screen coordinates. Any points
4070     * on this z value will not have their X and Y values modified in the transform.
4071     * Those further away (Z value higher) will shrink into the distance, and
4072     * those less than this value will expand and become bigger. The @p foc value
4073     * determines the "focal length" of the camera. This is in reality the distance
4074     * between the camera lens plane itself (at or closer than this rendering
4075     * results are undefined) and the "z0" z value. This allows for some "depth"
4076     * control and @p foc must be greater than 0.
4077     *
4078     * @param ps The perspective object
4079     * @param px The perspective distance X coordinate
4080     * @param py The perspective distance Y coordinate
4081     * @param z0 The "0" z plane value
4082     * @param foc The focal distance
4083     */
4084    EAPI void                    edje_perspective_set            (Edje_Perspective *ps, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
4085    /**
4086     * Make this perspective object be global for its canvas.
4087     *
4088     * @param ps The given perspective object
4089     * @param global @c EINA_TRUE if the perspective should be global, @c
4090     * EINA_FALSE otherwise.
4091     *
4092     * The canvas which this perspective object is being set as global is the one
4093     * given as argument upon the object creation (the @p evas parameter on the
4094     * function @c edje_perspective_new(evas) ).
4095     *
4096     * There can be only one global perspective object set per canvas, and if
4097     * a perspective object is set to global when there was already another
4098     * global perspective set, the old one will be set as non-global.
4099     *
4100     * A global perspective just affects a part if its Edje object doesn't have a
4101     * perspective object set to it, and if the part doesn't point to another
4102     * part to be used as perspective.
4103     *
4104     * @see edje_object_perspective_set()
4105     * @see edje_perspective_global_get()
4106     * @see edje_perspective_new()
4107     */
4108    EAPI void                    edje_perspective_global_set     (Edje_Perspective *ps, Eina_Bool global);
4109    /**
4110     * Get whether the given perspective object is global or not.
4111     *
4112     * @param ps The given perspective object.
4113     * @return @c EINA_TRUE if this perspective object is global, @c EINA_FALSE
4114     * otherwise.
4115     *
4116     * @see edje_perspective_global_set()
4117     */
4118    EAPI Eina_Bool               edje_perspective_global_get     (const Edje_Perspective *ps);
4119    /**
4120     * Get the global perspective object set for this canvas.
4121     *
4122     * @param e The given canvas (Evas).
4123     * @return The perspective object set as global for this canvas. Or @c NULL
4124     * if there is no global perspective set and on errors.
4125     *
4126     * This function will return the perspective object that was set as global
4127     * with edje_perspective_global_set().
4128     *
4129     * @see edje_perspective_global_set()
4130     * @see edje_perspective_global_get()
4131     */
4132    EAPI const Edje_Perspective *edje_evas_global_perspective_get(const Evas *e);
4133    /**
4134     * Set the given perspective object on this Edje object.
4135     *
4136     * @param obj The Edje object on the perspective will be set.
4137     * @param ps The perspective object that will be used.
4138     *
4139     * Make the given perspective object be the default perspective for this Edje
4140     * object.
4141     *
4142     * There can be only one perspective object per Edje object, and if a
4143     * previous one was set, it will be removed and the new perspective object
4144     * will be used.
4145     *
4146     * An Edje perspective will only affect a part if it doesn't point to another
4147     * part to be used as perspective.
4148     *
4149     * @see edje_object_perspective_new()
4150     * @see edje_object_perspective_get()
4151     * @see edje_perspective_set()
4152     */
4153    EAPI void                    edje_object_perspective_set     (Evas_Object *obj, Edje_Perspective *ps);
4154    /**
4155     * Get the current perspective used on this Edje object.
4156     *
4157     * @param obj the given Edje object.
4158     * @return The perspective object being used on this Edje object. Or @c NULL
4159     * if there was none, and on errors.
4160     *
4161     * @see edje_object_perspective_set()
4162     */
4163    EAPI const Edje_Perspective *edje_object_perspective_get     (const Evas_Object *obj);
4164
4165 #ifdef __cplusplus
4166 }
4167 #endif
4168
4169 #endif