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