741e6e38135d6c05a7f3d731957910b21e61d7b6
[framework/uifw/efl.git] / src / lib / evas / Evas_Legacy.h
1 #ifndef _EVAS_H
2 # error You shall not include this header directly
3 #endif
4
5 /////////////////////////////////////////////////////////////////
6 // TIZEN_ONLY(20150112): Add dummy APIs to fix build failure.
7 /////////////////////////////////////////////////////////////////
8 EAPI void                    evas_font_reinit(void);
9 /////////////////////////////////////////////////////////////////
10
11 /**
12  * @addtogroup Evas_Canvas
13  *
14  * @{
15  */
16 /**
17  * @brief Creates a new empty evas.
18  *
19  * @if MOBILE @since_tizen 2.3
20  * @elseif WEARABLE @since_tizen 2.3.1
21  * @endif
22  *
23  * @remark Note that before you can use the evas, you will to at a minimum:
24  * @li Set its render method with @ref evas_output_method_set .
25  * @li Set its viewport size with @ref evas_output_viewport_set .
26  * @li Set its size of the canvas with @ref evas_output_size_set .
27  * @li Ensure that the render engine is given the correct settings
28  *     with @ref evas_engine_info_set .
29  *
30  * @remark This function should only fail if the memory allocation fails
31  *
32  * @remark this function is very low level. Instead of using it
33  *       directly, consider using the high level functions in
34  *       @ref Ecore_Evas_Group such as @c ecore_evas_new(). See
35  *       @ref Ecore.
36  *
37  * @attention it is recommended that one calls Evas Initialization function before
38  *       creating new canvas.
39  *
40  * @return A new uninitialised Evas canvas on success. Otherwise, @c NULL.
41  */
42 EAPI Evas             *evas_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
43
44 /**
45  * @brief Frees the given evas and any objects created on it.
46  *
47  * @if MOBILE @since_tizen 2.3
48  * @elseif WEARABLE @since_tizen 2.3.1
49  * @endif
50  *
51  * @remark Any objects with 'free' callbacks will have those callbacks called
52  * in this function.
53  *
54  * @param[in]   e The given evas.
55  *
56  */
57 EAPI void              evas_free(Evas *e)  EINA_ARG_NONNULL(1);
58
59 #include "canvas/evas_canvas.eo.legacy.h"
60
61 /**
62  * @}
63  */
64
65
66 /**
67  * @addtogroup Evas_Canvas_Events
68  *
69  * @{
70  */
71
72 /**
73  * @brief Add (register) a callback function to a given canvas event.
74  *
75  * @if MOBILE @since_tizen 2.3
76  * @elseif WEARABLE @since_tizen 2.3.1
77  * @endif
78  *
79  * @param[in] e Canvas to attach a callback to
80  * @param[in] type The type of event that will trigger the callback
81  * @param[in] func The (callback) function to be called when the event is
82  *        triggered
83  * @param[in] data The data pointer to be passed to @p func
84  *
85  * @remark This function adds a function callback to the canvas @p e when the
86  * event of type @p type occurs on it. The function pointer is @p
87  * func.
88  *
89  * @remark In the event of a memory allocation error during the addition of
90  * the callback to the canvas, Evas Alloc Error function  should be used to
91  * determine the nature of the error, if any, and the program should
92  * sensibly try and recover.
93  *
94  * @remark A callback function must have the ::Evas_Event_Cb prototype
95  * definition. The first parameter (@p data) in this definition will
96  * have the same value passed to evas_event_callback_add() as the @p
97  * data parameter, at runtime. The second parameter @p e is the canvas
98  * pointer on which the event occurred. The third parameter @p
99  * event_info is a pointer to a data structure that may or may not be
100  * passed to the callback, depending on the event type that triggered
101  * the callback. This is so because some events don't carry extra
102  * context with them, but others do.
103  *
104  * @remark The event type @p type to trigger the function may be one of
105  * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST,
106  * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT,
107  * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN and
108  * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT. This determines the kind of
109  * event that will trigger the callback to be called. Only the last
110  * two of the event types listed here provide useful event information
111  * data -- a pointer to the recently focused Evas object. For the
112  * others the @p event_info pointer is going to be @c NULL.
113  *
114  * @remark Example:
115  * @dontinclude evas-events.c
116  * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE
117  * @until two canvas event callbacks
118  *
119  * @remark Looking to the callbacks registered above,
120  * @dontinclude evas-events.c
121  * @skip called when our rectangle gets focus
122  * @until let's have our events back
123  *
124  * @remark we see that the canvas flushes its rendering pipeline
125  * (#EVAS_CALLBACK_RENDER_FLUSH_PRE) whenever the @c _resize_cb
126  * routine takes place: it has to redraw that image at a different
127  * size. Also, the callback on an object being focused comes just
128  * after we focus it explicitly, on code.
129  *
130  * @remark See the full @ref Example_Evas_Events "example".
131  *
132  * @remark Be careful not to add the same callback multiple times, if
133  * that's not what you want, because Evas won't check if a callback
134  * existed before exactly as the one being registered (and thus, call
135  * it more than once on the event, in this case). This would make
136  * sense if you passed different functions and/or callback data, only.
137  */
138 EAPI void  evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
139
140 /**
141  * @brief Add (register) a callback function to a given canvas event with a
142  * non-default priority set. Except for the priority field, it's exactly the
143  * same as @ref evas_event_callback_add
144  *
145  * @if MOBILE @since_tizen 2.3
146  * @elseif WEARABLE @since_tizen 2.3.1
147  * @endif
148  *
149  * @param[in] e Canvas to attach a callback to
150  * @param[in] type The type of event that will trigger the callback
151  * @param[in] priority The priority of the callback, lower values called first.
152  * @param[in] func The (callback) function to be called when the event is
153  *        triggered
154  * @param[in] data The data pointer to be passed to @p func
155  *
156  * @see evas_event_callback_add
157  * @since 1.1
158  */
159 EAPI void  evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4);
160
161 /**
162  * @brief Delete a callback function from the canvas.
163  *
164  * @if MOBILE @since_tizen 2.3
165  * @elseif WEARABLE @since_tizen 2.3.1
166  * @endif
167  *
168  * @param[in] e Canvas to remove a callback from
169  * @param[in] type The type of event that was triggering the callback
170  * @param[in] func The function that was to be called when the event was triggered
171  * @return The data pointer that was to be passed to the callback
172  *
173  * @remark This function removes the most recently added callback from the
174  * canvas @p e which was triggered by the event type @p type and was
175  * calling the function @p func when triggered. If the removal is
176  * successful it will also return the data pointer that was passed to
177  * evas_event_callback_add() when the callback was added to the
178  * canvas. If not successful @c NULL will be returned.
179  *
180  * @remark Example:
181  * @code
182  * extern Evas *e;
183  * void *my_data;
184  * void focus_in_callback(void *data, Evas *e, void *event_info);
185  *
186  * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback);
187  * @endcode
188  */
189 EAPI void *evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
190
191 /**
192  * @brief Delete (unregister) a callback function registered to a given
193  * canvas event.
194  *
195  * @if MOBILE @since_tizen 2.3
196  * @elseif WEARABLE @since_tizen 2.3.1
197  * @endif
198  *
199  * @param[in] e Canvas to remove an event callback from
200  * @param[in] type The type of event that was triggering the callback
201  * @param[in] func The function that was to be called when the event was
202  *        triggered
203  * @param[in] data The data pointer that was to be passed to the callback
204  * @return The data pointer that was to be passed to the callback
205  *
206  * @remark This function removes <b>the first</b> added callback from the
207  * canvas @p e matching the event type @p type, the registered
208  * function pointer @p func and the callback data pointer @p data. If
209  * the removal is successful it will also return the data pointer that
210  * was passed to evas_event_callback_add() (that will be the same as
211  * the parameter) when the callback(s) was(were) added to the
212  * canvas. If not successful @c NULL will be returned. A common use
213  * would be to remove an exact match of a callback.
214  *
215  * @remark Example:
216  * @dontinclude evas-events.c
217  * @skip evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
218  * @until _object_focus_in_cb, NULL);
219  *
220  * @remark See the full @ref Example_Evas_Events "example".
221  *
222  * @remark For deletion of canvas events callbacks filtering by just
223  * type and function pointer, user evas_event_callback_del().
224  */
225 EAPI void *evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
226
227 /**
228  * @brief Push a callback on the post-event callback stack
229  *
230  * @if MOBILE @since_tizen 2.3
231  * @elseif WEARABLE @since_tizen 2.3.1
232  * @endif
233  *
234  * @param[in] e Canvas to push the callback on
235  * @param[in] func The function that to be called when the stack is unwound
236  * @param[in] data The data pointer to be passed to the callback
237  *
238  * @remark Evas has a stack of callbacks that get called after all the callbacks for
239  * an event have triggered (all the objects it triggers on and all the callbacks
240  * in each object triggered). When all these have been called, the stack is
241  * unwond from most recently to least recently pushed item and removed from the
242  * stack calling the callback set for it.
243  *
244  * @remark This is intended for doing reverse logic-like processing, example - when a
245  * child object that happens to get the event later is meant to be able to
246  * "steal" functions from a parent and thus on unwind of this stack have its
247  * function called first, thus being able to set flags, or return 0 from the
248  * post-callback that stops all other post-callbacks in the current stack from
249  * being called (thus basically allowing a child to take control, if the event
250  * callback prepares information ready for taking action, but the post callback
251  * actually does the action).
252  *
253  */
254 EAPI void  evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
255
256 /**
257  * @brief Remove a callback from the post-event callback stack
258  *
259  * @if MOBILE @since_tizen 2.3
260  * @elseif WEARABLE @since_tizen 2.3.1
261  * @endif
262  *
263  * @param[in] e Canvas to push the callback on
264  * @param[in] func The function that to be called when the stack is unwound
265  *
266  * @remark This removes a callback from the stack added with
267  * evas_post_event_callback_push(). The first instance of the function in
268  * the callback stack is removed from being executed when the stack is
269  * unwound. Further instances may still be run on unwind.
270  */
271 EAPI void  evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func);
272
273 /**
274  * @brief Remove a callback from the post-event callback stack
275  *
276  * @if MOBILE @since_tizen 2.3
277  * @elseif WEARABLE @since_tizen 2.3.1
278  * @endif
279  *
280  * @param[in] e Canvas to push the callback on
281  * @param[in] func The function that to be called when the stack is unwound
282  * @param[in] data The data pointer to be passed to the callback
283  *
284  * @remark This removes a callback from the stack added with
285  * evas_post_event_callback_push(). The first instance of the function and data
286  * in the callback stack is removed from being executed when the stack is
287  * unwound. Further instances may still be run on unwind.
288  */
289 EAPI void  evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
290
291 /**
292  * @}
293  */
294
295 /**
296  * @addtogroup Evas_Event_Freezing_Group
297  *
298  * @{
299  */
300
301 /**
302  * @brief Freeze all input events processing.
303  *
304  * @if MOBILE @since_tizen 2.3
305  * @elseif WEARABLE @since_tizen 2.3.1
306  * @endif
307  *
308  * @param[in] e The canvas to freeze input events processing on.
309  *
310  * @remark This function will indicate to Evas that the canvas @p e is to have
311  * all input event processing frozen until a matching
312  * evas_event_thaw() function is called on the same canvas. All events
313  * of this kind during the freeze will get @b discarded. Every freeze
314  * call must be matched by a thaw call in order to completely thaw out
315  * a canvas (i.e. these calls may be nested). The most common use is
316  * when you don't want the user to interact with your user interface
317  * when you're populating a view or changing the layout.
318  *
319  * @remark Example:
320  * @dontinclude evas-events.c
321  * @skip freeze input for 3 seconds
322  * @until }
323  * @dontinclude evas-events.c
324  * @skip let's have our events back
325  * @until }
326  *
327  * @remark See the full @ref Example_Evas_Events "example".
328  *
329  * @remark If you run that example, you'll see the canvas ignoring all input
330  * events for 3 seconds, when the "f" key is pressed. In a more
331  * realistic code we would be freezing while a toolkit or Edje was
332  * doing some UI changes, thawing it back afterwards.
333  */
334 EAPI void             evas_event_freeze(Evas *e) EINA_ARG_NONNULL(1);
335
336 /**
337  * @brief Thaw a canvas out after freezing (for input events).
338  *
339  * @if MOBILE @since_tizen 2.3
340  * @elseif WEARABLE @since_tizen 2.3.1
341  * @endif
342  *
343  * @param[in] e The canvas to thaw out.
344  *
345  * @remark This will thaw out a canvas after a matching evas_event_freeze()
346  * call. If this call completely thaws out a canvas, i.e., there's no
347  * other unbalanced call to evas_event_freeze(), events will start to
348  * be processed again, but any "missed" events will @b not be
349  * evaluated.
350  *
351  * @remark See evas_event_freeze() for an example.
352  */
353 EAPI void             evas_event_thaw(Evas *e) EINA_ARG_NONNULL(1);
354
355 /**
356  * @brief Return the freeze count on input events of a given canvas.
357  *
358  * @if MOBILE @since_tizen 2.3
359  * @elseif WEARABLE @since_tizen 2.3.1
360  * @endif
361  *
362  * @param[in] e The canvas to fetch the freeze count from.
363  *
364  * @remark This returns the number of times the canvas has been told to freeze
365  * input events. It is possible to call evas_event_freeze() multiple
366  * times, and these must be matched by evas_event_thaw() calls. This
367  * call allows the program to discover just how many times things have
368  * been frozen in case it may want to break out of a deep freeze state
369  * where the count is high.
370  *
371  * @remark Example:
372  * @code
373  * extern Evas *evas;
374  *
375  * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
376  * @endcode
377  *
378  */
379 EAPI int              evas_event_freeze_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
380
381 /**
382  * @brief After thaw of a canvas, re-evaluate the state of objects and call callbacks
383  *
384  * @if MOBILE @since_tizen 2.3
385  * @elseif WEARABLE @since_tizen 2.3.1
386  * @endif
387  *
388  * @param[in] e The canvas to evaluate after a thaw
389  *
390  * @remark This is normally called after evas_event_thaw() to re-evaluate mouse
391  * containment and other states and thus also call callbacks for mouse in and
392  * out on new objects if the state change demands it.
393  */
394 EAPI void             evas_event_thaw_eval(Evas *e) EINA_ARG_NONNULL(1);
395 /**
396  * @}
397  */
398
399 /**
400  * @ingroup Evas_Font_Group
401  *
402  * @{
403  */
404
405 /**
406  * Free list of font descriptions returned by evas_font_dir_available_list().
407  *
408  * @param e The evas instance that returned such list.
409  * @param available the list returned by evas_font_dir_available_list().
410  *
411  * @ingroup Evas_Font_Group
412  */
413 EAPI void                    evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
414
415 /**
416  * @}
417  */
418
419 /**
420  * @addtogroup Evas_Object_Group_Basic
421  *
422  * @{
423  */
424
425 /**
426  * @brief Increments object reference count to defer its deletion.
427  *
428  * @if MOBILE @since_tizen 2.3
429  * @elseif WEARABLE @since_tizen 2.3.1
430  * @endif
431  *
432  * @param[in] obj The given Evas object to reference
433  *
434  * @remark This increments the reference count of an object, which if greater
435  * than 0 will defer deletion by evas_object_del() until all
436  * references are released back (counter back to 0). References cannot
437  * go below 0 and unreferencing past that will result in the reference
438  * count being limited to 0. References are limited to <c>2^32 - 1</c>
439  * for an object. Referencing it more than this will result in it
440  * being limited to this value.
441  *
442  * @see evas_object_unref()
443  * @see evas_object_del()
444  *
445  * @remark This is a <b>very simple</b> reference counting mechanism! For
446  * instance, Evas is not ready to check for pending references on a
447  * canvas deletion, or things like that. This is useful on scenarios
448  * where, inside a code block, callbacks exist which would possibly
449  * delete an object we are operating on afterwards. Then, one would
450  * evas_object_ref() it on the beginning of the block and
451  * evas_object_unref() it on the end. It would then be deleted at this
452  * point, if it should be.
453  *
454  * @remark Example:
455  * @code
456  *  evas_object_ref(obj);
457  *
458  *  // action here...
459  *  evas_object_smart_callback_call(obj, SIG_SELECTED, NULL);
460  *  // more action here...
461  *  evas_object_unref(obj);
462  * @endcode
463  *
464  * @since 1.1
465  */
466 EAPI void             evas_object_ref(Evas_Object *obj);
467
468 /**
469  * @brief Decrements object reference count.
470  *
471  * @if MOBILE @since_tizen 2.3
472  * @elseif WEARABLE @since_tizen 2.3.1
473  * @endif
474  *
475  * @param[in] obj The given Evas object to unreference
476  *
477  * @remark This decrements the reference count of an object. If the object has
478  * had evas_object_del() called on it while references were more than
479  * 0, it will be deleted at the time this function is called and puts
480  * the counter back to 0. See evas_object_ref() for more information.
481  *
482  * @see evas_object_ref() (for an example)
483  * @see evas_object_del()
484  *
485  * @since 1.1
486  */
487 EAPI void             evas_object_unref(Evas_Object *obj);
488
489 /**
490  * @brief Get the object reference count.
491  *
492  * @if MOBILE @since_tizen 2.3
493  * @elseif WEARABLE @since_tizen 2.3.1
494  * @endif
495  *
496  * @param[in] obj The given Evas object to query
497  *
498  * @remark This gets the reference count for an object (normally 0 until it is
499  * referenced). Values of 1 or greater mean that someone is holding a
500  * reference to this object that needs to be unreffed before it can be
501  * deleted.
502  *
503  * @see evas_object_ref()
504  * @see evas_object_unref()
505  * @see evas_object_del()
506  *
507  * @since 1.2
508  */
509 EAPI int              evas_object_ref_get(const Evas_Object *obj);
510
511 /**
512  * @brief Marks the given Evas object for deletion (when Evas will free its
513  * memory).
514  *
515  * @if MOBILE @since_tizen 2.3
516  * @elseif WEARABLE @since_tizen 2.3.1
517  * @endif
518  *
519  * @param[in] obj The given Evas object.
520  *
521  * @remark This call will mark @p obj for deletion, which will take place
522  * whenever it has no more references to it (see evas_object_ref() and
523  * evas_object_unref()).
524  *
525  * @remark At actual deletion time, which may or may not be just after this
526  * call, ::EVAS_CALLBACK_DEL and ::EVAS_CALLBACK_FREE callbacks will
527  * be called. If the object currently had the focus, its
528  * ::EVAS_CALLBACK_FOCUS_OUT callback will also be called.
529  *
530  * @see evas_object_ref()
531  * @see evas_object_unref()
532  *
533  */
534 EAPI void             evas_object_del(Evas_Object *obj) EINA_ARG_NONNULL(1);
535
536 /**
537  * @brief Retrieves the position and (rectangular) size of the given Evas
538  * object.
539  *
540  * @if MOBILE @since_tizen 2.3
541  * @elseif WEARABLE @since_tizen 2.3.1
542  * @endif
543  *
544  * @param[in] obj The given Evas object.
545  * @param[out] x Pointer to an integer in which to store the X coordinate
546  *          of the object.
547  * @param[out] y Pointer to an integer in which to store the Y coordinate
548  *          of the object.
549  * @param[out] w Pointer to an integer in which to store the width of the
550  *          object.
551  * @param[out] h Pointer to an integer in which to store the height of the
552  *          object.
553  *
554  * @remark The position, naturally, will be relative to the top left corner of
555  * the canvas' viewport.
556  *
557  * @remark Use @c NULL pointers on the geometry components you're not
558  * interested in: they'll be ignored by the function.
559  *
560  * @remark Example:
561  * @dontinclude evas-events.c
562  * @skip int w, h, cw, ch;
563  * @until return
564  *
565  * @remark See the full @ref Example_Evas_Events "example".
566  *
567  */
568 EAPI void             evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
569
570 /**
571  * @internal
572  * Set the position and (rectangular) size of the given Evas object.
573  *
574  * @param obj The given Evas object.
575  * @param x   X position to move the object to, in canvas units.
576  * @param y   Y position to move the object to, in canvas units.
577  * @param w   The new width of the Evas object.
578  * @param h   The new height of the Evas object.
579  *
580  * The position, naturally, will be relative to the top left corner of
581  * the canvas' viewport.
582  *
583  * If the object get moved, the object's ::EVAS_CALLBACK_MOVE callback
584  * will be called.
585  *
586  * If the object get resized, the object's ::EVAS_CALLBACK_RESIZE callback
587  * will be called.
588  *
589  * @see evas_object_move()
590  * @see evas_object_resize()
591  * @see evas_object_geometry_get
592  *
593  * @since 1.8
594  */
595 EAPI void             evas_object_geometry_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
596
597
598 /**
599  * @brief Makes the given Evas object visible.
600  *
601  * @if MOBILE @since_tizen 2.3
602  * @elseif WEARABLE @since_tizen 2.3.1
603  * @endif
604  *
605  * @param[in] obj The given Evas object.
606  *
607  * @remark Besides becoming visible, the object's ::EVAS_CALLBACK_SHOW
608  * callback will be called.
609  *
610  * @see evas_object_hide() for more on object visibility.
611  * @see evas_object_visible_get()
612  *
613  */
614 EAPI void             evas_object_show(Evas_Object *obj) EINA_ARG_NONNULL(1);
615
616 /**
617  * @brief Makes the given Evas object invisible.
618  *
619  * @if MOBILE @since_tizen 2.3
620  * @elseif WEARABLE @since_tizen 2.3.1
621  * @endif
622  *
623  * @param[in] obj The given Evas object.
624  *
625  * @remark Hidden objects, besides not being shown at all in your canvas,
626  * won't be checked for changes on the canvas rendering
627  * process. Furthermore, they will not catch input events. Thus, they
628  * are much ligher (in processing needs) than an object that is
629  * invisible due to indirect causes, such as being clipped or out of
630  * the canvas' viewport.
631  *
632  * @remark Besides becoming hidden, @p obj object's ::EVAS_CALLBACK_SHOW
633  * callback will be called.
634  *
635  * @remark All objects are created in the hidden state! If you want them
636  * shown, use evas_object_show() after their creation.
637  *
638  * @see evas_object_show()
639  * @see evas_object_visible_get()
640  *
641  * @remark Example:
642  * @dontinclude evas-object-manipulation.c
643  * @skip if (evas_object_visible_get(d.clipper))
644  * @until return
645  *
646  * @remark See the full @ref Example_Evas_Object_Manipulation "example".
647  *
648  */
649 EAPI void             evas_object_hide(Evas_Object *obj) EINA_ARG_NONNULL(1);
650
651
652 /**
653  * @brief Sets the general/main color of the given Evas object to the given
654  * one.
655  *
656  * @if MOBILE @since_tizen 2.3
657  * @elseif WEARABLE @since_tizen 2.3.1
658  * @endif
659  *
660  * @see evas_object_color_get() (for an example)
661  * @remark These color values are expected to be premultiplied by @p a.
662  *
663  * @param[in] obj The given Evas object.
664  * @param[in] r The red component of the given color.
665  * @param[in] g The green component of the given color.
666  * @param[in] b The blue component of the given color.
667  * @param[in] a The alpha component of the given color.
668  */
669 EAPI void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a);
670
671 /**
672  * @brief Retrieves the general/main color of the given Evas object.
673  *
674  * @if MOBILE @since_tizen 2.3
675  * @elseif WEARABLE @since_tizen 2.3.1
676  * @endif
677  *
678  * @remark Retrieves the “main” color's RGB component (and alpha channel)
679  * values, <b>which range from 0 to 255</b>. For the alpha channel,
680  * which defines the object's transparency level, 0 means totally
681  * transparent, while 255 means opaque. These color values are
682  * premultiplied by the alpha value.
683  *
684  * @remark Usually you’ll use this attribute for text and rectangle objects,
685  * where the “main” color is their unique one. If set for objects
686  * which themselves have colors, like the images one, those colors get
687  * modulated by this one.
688  *
689  * @remark All newly created Evas rectangles get the default color
690  * values of <code>255 255 255 255</code> (opaque white).
691  *
692  * @remark Use @c NULL pointers on the components you're not interested
693  * in: they'll be ignored by the function.
694  *
695  * @remark Example:
696  * @dontinclude evas-object-manipulation.c
697  * @skip int alpha, r, g, b;
698  * @until return
699  *
700  * @remark See the full @ref Example_Evas_Object_Manipulation "example".
701  *
702  * @param[in] obj The given Evas object.
703  * @param[out] r The red component of the given color.
704  * @param[out] g The green component of the given color.
705  * @param[out] b The blue component of the given color.
706  * @param[out] a The alpha component of the given color.
707  */
708 EAPI void evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a);
709
710 /**
711  * @brief Move the given Evas object to the given location inside its canvas' viewport.
712  *
713  * @if MOBILE @since_tizen 2.3
714  * @elseif WEARABLE @since_tizen 2.3.1
715  * @endif
716  *
717  * @param[in] obj The given Evas object.
718  * @param[in] x in
719  * @param[in] y in
720  */
721 EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
722
723 /**
724  * @brief Changes the size of the given Evas object.
725  *
726  * @if MOBILE @since_tizen 2.3
727  * @elseif WEARABLE @since_tizen 2.3.1
728  * @endif
729  *
730  * @param[in] obj The given Evas object.
731  * @param[in] w in
732  * @param[in] h in
733  */
734 EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
735
736 /**
737  * @brief Retrieves whether or not the given Evas object is visible.
738  *
739  * @if MOBILE @since_tizen 2.3
740  * @elseif WEARABLE @since_tizen 2.3.1
741  * @endif
742  *
743  */
744 EAPI Eina_Bool evas_object_visible_get(const Evas_Object *obj);
745
746
747 #include "canvas/evas_common_interface.eo.legacy.h"
748 #include "canvas/evas_object.eo.legacy.h"
749
750 /**
751  * @}
752  */
753
754 /**
755  * @addtogroup Evas_Object_Group_Events
756  *
757  * @{
758  */
759
760 /**
761  * @brief Add (register) a callback function to a given Evas object event.
762  *
763  * @if MOBILE @since_tizen 2.3
764  * @elseif WEARABLE @since_tizen 2.3.1
765  * @endif
766  *
767  * @param[in] obj Object to attach a callback to
768  * @param[in] type The type of event that will trigger the callback
769  * @param[in] func The function to be called when the event is triggered
770  * @param[in] data The data pointer to be passed to @p func
771  *
772  * @remark This function adds a function callback to an object when the event
773  * of type @p type occurs on object @p obj. The function is @p func.
774  *
775  * @remark In the event of a memory allocation error during addition of the
776  * callback to the object, Evas Alloc Error function should be used to
777  * determine the nature of the error, if any, and the program should
778  * sensibly try and recover.
779  *
780  * @remark A callback function must have the ::Evas_Object_Event_Cb prototype
781  * definition. The first parameter (@p data) in this definition will
782  * have the same value passed to evas_object_event_callback_add() as
783  * the @p data parameter, at runtime. The second parameter @p e is the
784  * canvas pointer on which the event occurred. The third parameter is
785  * a pointer to the object on which event occurred. Finally, the
786  * fourth parameter @p event_info is a pointer to a data structure
787  * that may or may not be passed to the callback, depending on the
788  * event type that triggered the callback. This is so because some
789  * events don't carry extra context with them, but others do.
790  *
791  * @remark The event type @p type to trigger the function may be one of
792  * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT,
793  * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP,
794  * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL,
795  * #EVAS_CALLBACK_MULTI_DOWN, #EVAS_CALLBACK_MULTI_UP,
796  * #EVAS_CALLBACK_AXIS_UPDATE,
797  * #EVAS_CALLBACK_MULTI_MOVE, #EVAS_CALLBACK_FREE,
798  * #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP,
799  * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT,
800  * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE,
801  * #EVAS_CALLBACK_RESIZE, #EVAS_CALLBACK_RESTACK, #EVAS_CALLBACK_DEL,
802  * #EVAS_CALLBACK_HOLD, #EVAS_CALLBACK_CHANGED_SIZE_HINTS,
803  * #EVAS_CALLBACK_IMAGE_PRELOADED or #EVAS_CALLBACK_IMAGE_UNLOADED.
804  *
805  * @remark This determines the kind of event that will trigger the callback.
806  * What follows is a list explaining better the nature of each type of
807  * event, along with their associated @p event_info pointers:
808  *
809  * - #EVAS_CALLBACK_MOUSE_IN: @p event_info is a pointer to an
810  *   #Evas_Event_Mouse_In struct\n\n
811  *   This event is triggered when the mouse pointer enters the area
812  *   (not shaded by other objects) of the object @p obj. This may
813  *   occur by the mouse pointer being moved by
814  *   evas_event_feed_mouse_move() calls, or by the object being shown,
815  *   raised, moved, resized, or other objects being moved out of the
816  *   way, hidden or lowered, whatever may cause the mouse pointer to
817  *   get on top of @p obj, having been on top of another object
818  *   previously.
819  *
820  * - #EVAS_CALLBACK_MOUSE_OUT: @p event_info is a pointer to an
821  *   #Evas_Event_Mouse_Out struct\n\n
822  *   This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is,
823  *   but it occurs when the mouse pointer exits an object's area. Note
824  *   that no mouse out events will be reported if the mouse pointer is
825  *   implicitly grabbed to an object (mouse buttons are down, having
826  *   been pressed while the pointer was over that object). In these
827  *   cases, mouse out events will be reported once all buttons are
828  *   released, if the mouse pointer has left the object's area. The
829  *   indirect ways of taking off the mouse pointer from an object,
830  *   like cited above, for #EVAS_CALLBACK_MOUSE_IN, also apply here,
831  *   naturally.
832  *
833  * - #EVAS_CALLBACK_MOUSE_DOWN: @p event_info is a pointer to an
834  *   #Evas_Event_Mouse_Down struct\n\n
835  *   This event is triggered by a mouse button being pressed while the
836  *   mouse pointer is over an object. If the pointer mode for Evas is
837  *   #EVAS_OBJECT_POINTER_MODE_AUTOGRAB (default), this causes this
838  *   object to <b>passively grab the mouse</b> until all mouse buttons
839  *   have been released: all future mouse events will be reported to
840  *   only this object until no buttons are down. That includes mouse
841  *   move events, mouse in and mouse out events, and further button
842  *   presses. When all buttons are released, event propagation will
843  *   occur as normal (see #Evas_Object_Pointer_Mode).
844  *
845  * - #EVAS_CALLBACK_MOUSE_UP: @p event_info is a pointer to an
846  *   #Evas_Event_Mouse_Up struct\n\n
847  *   This event is triggered by a mouse button being released while
848  *   the mouse pointer is over an object's area (or when passively
849  *   grabbed to an object).
850  *
851  * - #EVAS_CALLBACK_MOUSE_MOVE: @p event_info is a pointer to an
852  *   #Evas_Event_Mouse_Move struct\n\n
853  *   This event is triggered by the mouse pointer being moved while
854  *   over an object's area (or while passively grabbed to an object).
855  *
856  * - #EVAS_CALLBACK_MOUSE_WHEEL: @p event_info is a pointer to an
857  *   #Evas_Event_Mouse_Wheel struct\n\n
858  *   This event is triggered by the mouse wheel being rolled while the
859  *   mouse pointer is over an object (or passively grabbed to an
860  *   object).
861  *
862  * - #EVAS_CALLBACK_MULTI_DOWN: @p event_info is a pointer to an
863  *   #Evas_Event_Multi_Down struct
864  *
865  * - #EVAS_CALLBACK_MULTI_UP: @p event_info is a pointer to an
866  *   #Evas_Event_Multi_Up struct
867  *
868  * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an
869  *   #Evas_Event_Multi_Move struct
870  *
871  * - #EVAS_CALLBACK_AXIS_UPDATE: @p event_info is a pointer to an
872  *   #Evas_Event_Axis_Update struct
873  *
874  * - #EVAS_CALLBACK_FREE: @p event_info is @c NULL \n\n
875  *   This event is triggered just before Evas is about to free all
876  *   memory used by an object and remove all references to it. This is
877  *   useful for programs to use if they attached data to an object and
878  *   want to free it when the object is deleted. The object is still
879  *   valid when this callback is called, but after it returns, there
880  *   is no guarantee on the object's validity.
881  *
882  * - #EVAS_CALLBACK_KEY_DOWN: @p event_info is a pointer to an
883  *   #Evas_Event_Key_Down struct\n\n
884  *   This callback is called when a key is pressed and the focus is on
885  *   the object, or a key has been grabbed to a particular object
886  *   which wants to intercept the key press regardless of what object
887  *   has the focus.
888  *
889  * - #EVAS_CALLBACK_KEY_UP: @p event_info is a pointer to an
890  *   #Evas_Event_Key_Up struct \n\n
891  *   This callback is called when a key is released and the focus is
892  *   on the object, or a key has been grabbed to a particular object
893  *   which wants to intercept the key release regardless of what
894  *   object has the focus.
895  *
896  * - #EVAS_CALLBACK_FOCUS_IN: @p event_info is @c NULL \n\n
897  *   This event is called when an object gains the focus. When it is
898  *   called the object has already gained the focus.
899  *
900  * - #EVAS_CALLBACK_FOCUS_OUT: @p event_info is @c NULL \n\n
901  *   This event is triggered when an object loses the focus. When it
902  *   is called the object has already lost the focus.
903  *
904  * - #EVAS_CALLBACK_SHOW: @p event_info is @c NULL \n\n
905  *   This event is triggered by the object being shown by
906  *   evas_object_show().
907  *
908  * - #EVAS_CALLBACK_HIDE: @p event_info is @c NULL \n\n
909  *   This event is triggered by an object being hidden by
910  *   evas_object_hide().
911  *
912  * - #EVAS_CALLBACK_MOVE: @p event_info is @c NULL \n\n
913  *   This event is triggered by an object being
914  *   moved. evas_object_move() can trigger this, as can any
915  *   object-specific manipulations that would mean the object's origin
916  *   could move.
917  *
918  * - #EVAS_CALLBACK_RESIZE: @p event_info is @c NULL \n\n
919  *   This event is triggered by an object being resized. Resizes can
920  *   be triggered by evas_object_resize() or by any object-specific
921  *   calls that may cause the object to resize.
922  *
923  * - #EVAS_CALLBACK_RESTACK: @p event_info is @c NULL \n\n
924  *   This event is triggered by an object being re-stacked. Stacking
925  *   changes can be triggered by
926  *   evas_object_stack_below()/evas_object_stack_above() and others.
927  *
928  * - #EVAS_CALLBACK_DEL: @p event_info is @c NULL.
929  *
930  * - #EVAS_CALLBACK_HOLD: @p event_info is a pointer to an
931  *   #Evas_Event_Hold struct
932  *
933  * - #EVAS_CALLBACK_CHANGED_SIZE_HINTS: @p event_info is @c NULL.
934  *
935  * - #EVAS_CALLBACK_IMAGE_PRELOADED: @p event_info is @c NULL.
936  *
937  * - #EVAS_CALLBACK_IMAGE_UNLOADED: @p event_info is @c NULL.
938  *
939  * @remark Be careful not to add the same callback multiple times, if
940  * that's not what you want, because Evas won't check if a callback
941  * existed before exactly as the one being registered (and thus, call
942  * it more than once on the event, in this case). This would make
943  * sense if you passed different functions and/or callback data, only.
944  *
945  * @remark Example:
946  * @dontinclude evas-events.c
947  * @skip evas_object_event_callback_add(
948  * @until }
949  *
950  * @remark See the full example @ref Example_Evas_Events "here".
951  *
952  */
953 EAPI void      evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
954
955 /**
956  * @brief Add (register) a callback function to a given Evas object event with a
957  * non-default priority set. Except for the priority field, it's exactly the
958  * same as @ref evas_object_event_callback_add
959  *
960  * @if MOBILE @since_tizen 2.3
961  * @elseif WEARABLE @since_tizen 2.3.1
962  * @endif
963  *
964  * @param[in] obj Object to attach a callback to
965  * @param[in] type The type of event that will trigger the callback
966  * @param[in] priority The priority of the callback, lower values called first.
967  * @param[in] func The function to be called when the event is triggered
968  * @param[in] data The data pointer to be passed to @p func
969  *
970  * @see evas_object_event_callback_add
971  * @since 1.1
972  */
973 EAPI void      evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 4);
974
975 /**
976  * @brief Delete a callback function from an object
977  *
978  * @if MOBILE @since_tizen 2.3
979  * @elseif WEARABLE @since_tizen 2.3.1
980  * @endif
981  *
982  * @param[in] obj Object to remove a callback from
983  * @param[in] type The type of event that was triggering the callback
984  * @param[in] func The function that was to be called when the event was triggered
985  * @return The data pointer that was to be passed to the callback
986  *
987  * @remark This function removes the most recently added callback from the
988  * object @p obj which was triggered by the event type @p type and was
989  * calling the function @p func when triggered. If the removal is
990  * successful it will also return the data pointer that was passed to
991  * evas_object_event_callback_add() when the callback was added to the
992  * object. If not successful @c NULL will be returned.
993  *
994  * @remark Example:
995  * @code
996  * extern Evas_Object *object;
997  * void *my_data;
998  * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
999  *
1000  * my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback);
1001  * @endcode
1002  */
1003 EAPI void     *evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3);
1004
1005 /**
1006  * @brief Delete (unregister) a callback function registered to a given
1007  * Evas object event.
1008  *
1009  * @if MOBILE @since_tizen 2.3
1010  * @elseif WEARABLE @since_tizen 2.3.1
1011  * @endif
1012  *
1013  * @param[in] obj Object to remove a callback from
1014  * @param[in] type The type of event that was triggering the callback
1015  * @param[in] func The function that was to be called when the event was
1016  * triggered
1017  * @param[in] data The data pointer that was to be passed to the callback
1018  * @return The data pointer that was to be passed to the callback
1019  *
1020  * @remark This function removes the most recently added callback from the
1021  * object @p obj, which was triggered by the event type @p type and was
1022  * calling the function @p func with data @p data, when triggered. If
1023  * the removal is successful it will also return the data pointer that
1024  * was passed to evas_object_event_callback_add() (that will be the
1025  * same as the parameter) when the callback was added to the
1026  * object. In errors, @c NULL will be returned.
1027  *
1028  * @remark For deletion of Evas object events callbacks filtering by
1029  * just type and function pointer, use
1030  * evas_object_event_callback_del().
1031  *
1032  * @remark Example:
1033  * @code
1034  * extern Evas_Object *object;
1035  * void *my_data;
1036  * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
1037  *
1038  * my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data);
1039  * @endcode
1040  */
1041 EAPI void     *evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
1042
1043 /**
1044  * @}
1045  */
1046
1047 /**
1048  * @addtogroup Evas_Object_Group_Extras
1049  *
1050  * @{
1051  */
1052
1053 /**
1054  * @brief Set an attached data pointer to an object with a given string key.
1055  *
1056  * @if MOBILE @since_tizen 2.3
1057  * @elseif WEARABLE @since_tizen 2.3.1
1058  * @endif
1059  *
1060  * @param[in] obj The object to attach the data pointer to
1061  * @param[in] key The string key for the data to access it
1062  * @param[in] data The pointer to the data to be attached
1063  *
1064  * @remark This attaches the pointer @p data to the object @p obj, given the
1065  * access string @p key. This pointer will stay "hooked" to the object
1066  * until a new pointer with the same string key is attached with
1067  * evas_object_data_set() or it is deleted with
1068  * evas_object_data_del(). On deletion of the object @p obj, the
1069  * pointers will not be accessible from the object anymore.
1070  *
1071  * @remark You can find the pointer attached under a string key using
1072  * evas_object_data_get(). It is the job of the calling application to
1073  * free any data pointed to by @p data when it is no longer required.
1074  *
1075  * @remark If @p data is @c NULL, the old value stored at @p key will be
1076  * removed but no new value will be stored. This is synonymous with
1077  * calling evas_object_data_del() with @p obj and @p key.
1078  *
1079  * @remark This function is very handy when you have data associated
1080  * specifically to an Evas object, being of use only when dealing with
1081  * it. Than you don't have the burden to a pointer to it elsewhere,
1082  * using this family of functions.
1083  *
1084  * @remark Example:
1085  *
1086  * @code
1087  * int *my_data;
1088  * extern Evas_Object *obj;
1089  *
1090  * my_data = malloc(500);
1091  * evas_object_data_set(obj, "name_of_data", my_data);
1092  * printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data"));
1093  * @endcode
1094  */
1095 EAPI void                     evas_object_data_set(Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2);
1096
1097 /**
1098  * @brief Return an attached data pointer on an Evas object by its given
1099  * string key.
1100  *
1101  * @if MOBILE @since_tizen 2.3
1102  * @elseif WEARABLE @since_tizen 2.3.1
1103  * @endif
1104  *
1105  * @param[in] obj The object to which the data was attached
1106  * @param[in] key The string key the data was stored under
1107  * @return The data pointer stored, or @c NULL if none was stored
1108  *
1109  * @remark This function will return the data pointer attached to the object
1110  * @p obj, stored using the string key @p key. If the object is valid
1111  * and a data pointer was stored under the given key, that pointer
1112  * will be returned. If this is not the case, @c NULL will be
1113  * returned, signifying an invalid object or a non-existent key. It is
1114  * possible that a @c NULL pointer was stored given that key, but this
1115  * situation is non-sensical and thus can be considered an error as
1116  * well. @c NULL pointers are never stored as this is the return value
1117  * if an error occurs.
1118  *
1119  * @remark Example:
1120  *
1121  * @code
1122  * int *my_data;
1123  * extern Evas_Object *obj;
1124  *
1125  * my_data = evas_object_data_get(obj, "name_of_my_data");
1126  * if (my_data) printf("Data stored was %p\n", my_data);
1127  * else printf("No data was stored on the object\n");
1128  * @endcode
1129  */
1130 EAPI void                    *evas_object_data_get(const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
1131
1132 /**
1133  * @brief Delete an attached data pointer from an object.
1134  *
1135  * @if MOBILE @since_tizen 2.3
1136  * @elseif WEARABLE @since_tizen 2.3.1
1137  * @endif
1138  *
1139  * @param[in] obj The object to delete the data pointer from
1140  * @param[in] key The string key the data was stored under
1141  * @return The original data pointer stored at @p key on @p obj
1142  *
1143  * @remark This will remove the stored data pointer from @p obj stored under
1144  * @p key and return this same pointer, if actually there was data
1145  * there, or @c NULL, if nothing was stored under that key.
1146  *
1147  * @remark Example:
1148  *
1149  * @code
1150  * int *my_data;
1151  * extern Evas_Object *obj;
1152  *
1153  * my_data = evas_object_data_del(obj, "name_of_my_data");
1154  * @endcode
1155  */
1156 EAPI void                    *evas_object_data_del(Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
1157
1158 /**
1159  * @}
1160  */
1161
1162 /**
1163  * @internal
1164  * @ingroup Evas_Object_Group_Find
1165  *
1166  * @{
1167  */
1168
1169 /**
1170  * Retrieve the Evas object stacked at the top at the position of the
1171  * mouse cursor, over a given canvas
1172  *
1173  * @param   e A handle to the canvas.
1174  * @return  The Evas object that is over all other objects at the mouse
1175  * pointer's position
1176  *
1177  * This function will traverse all the layers of the given canvas,
1178  * from top to bottom, querying for objects with areas covering the
1179  * mouse pointer's position, over @p e.
1180  *
1181  * @warning This function will @b skip objects parented by smart
1182  * objects, acting only on the ones at the "top level", with regard to
1183  * object parenting.
1184  */
1185 EAPI Evas_Object *evas_object_top_at_pointer_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1186
1187 /**
1188  * @}
1189  */
1190
1191 /**
1192  * @internal
1193  * @ingroup Evas_Object_Group_Interceptors
1194  *
1195  * @{
1196  */
1197
1198 /**
1199  * Set the callback function that intercepts a show event of an object.
1200  *
1201  * @param obj The given canvas object pointer.
1202  * @param func The given function to be the callback function.
1203  * @param data The data passed to the callback function.
1204  *
1205  * This function sets a callback function to intercepts a show event
1206  * of a canvas object.
1207  *
1208  * @see evas_object_intercept_show_callback_del().
1209  *
1210  */
1211 EAPI void  evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1212
1213 /**
1214  * Unset the callback function that intercepts a show event of a object.
1215  *
1216  * @param obj The given canvas object pointer.
1217  * @param func The given callback function.
1218  *
1219  * This function sets a callback function to intercepts a show event
1220  * of a canvas object.
1221  *
1222  * @see evas_object_intercept_show_callback_add().
1223  *
1224  */
1225 EAPI void *evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2);
1226
1227 /**
1228  * Set the callback function that intercepts a hide event of a object.
1229  *
1230  * @param obj The given canvas object pointer.
1231  * @param func The given function to be the callback function.
1232  * @param data The data passed to the callback function.
1233  *
1234  * This function sets a callback function to intercepts a hide event
1235  * of a canvas object.
1236  *
1237  * @see evas_object_intercept_hide_callback_del().
1238  *
1239  */
1240 EAPI void  evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1241
1242 /**
1243  * Unset the callback function that intercepts a hide event of a object.
1244  *
1245  * @param obj The given canvas object pointer.
1246  * @param func The given callback function.
1247  *
1248  * This function sets a callback function to intercepts a hide event
1249  * of a canvas object.
1250  *
1251  * @see evas_object_intercept_hide_callback_add().
1252  *
1253  */
1254 EAPI void *evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2);
1255
1256 /**
1257  * Set the callback function that intercepts a move event of an object.
1258  *
1259  * @param obj The given canvas object pointer.
1260  * @param func The given function to be the callback function.
1261  * @param data The data passed to the callback function.
1262  *
1263  * This function sets a callback function to intercepts a move event
1264  * of a canvas object.
1265  *
1266  * @see evas_object_intercept_move_callback_del().
1267  *
1268  */
1269 EAPI void  evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1270
1271 /**
1272  * Unset the callback function that intercepts a move event of an object.
1273  *
1274  * @param obj The given canvas object pointer.
1275  * @param func The given callback function.
1276  *
1277  * This function sets a callback function to intercepts a move event
1278  * of a canvas object.
1279  *
1280  * @see evas_object_intercept_move_callback_add().
1281  *
1282  */
1283 EAPI void *evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2);
1284
1285 /**
1286  * Set the callback function that intercepts a resize event of an object.
1287  *
1288  * @param obj The given canvas object pointer.
1289  * @param func The given function to be the callback function.
1290  * @param data The data passed to the callback function.
1291  *
1292  * This function sets a callback function to intercepts a resize event
1293  * of a canvas object.
1294  *
1295  * @see evas_object_intercept_resize_callback_del().
1296  *
1297  */
1298 EAPI void  evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1299
1300 /**
1301  * Unset the callback function that intercepts a resize event of an object.
1302  *
1303  * @param obj The given canvas object pointer.
1304  * @param func The given callback function.
1305  *
1306  * This function sets a callback function to intercepts a resize event
1307  * of a canvas object.
1308  *
1309  * @see evas_object_intercept_resize_callback_add().
1310  *
1311  */
1312 EAPI void *evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2);
1313
1314 /**
1315  * Set the callback function that intercepts a raise event of an object.
1316  *
1317  * @param obj The given canvas object pointer.
1318  * @param func The given function to be the callback function.
1319  * @param data The data passed to the callback function.
1320  *
1321  * This function sets a callback function to intercepts a raise event
1322  * of a canvas object.
1323  *
1324  * @see evas_object_intercept_raise_callback_del().
1325  *
1326  */
1327 EAPI void  evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1328
1329 /**
1330  * Unset the callback function that intercepts a raise event of an object.
1331  *
1332  * @param obj The given canvas object pointer.
1333  * @param func The given callback function.
1334  *
1335  * This function sets a callback function to intercepts a raise event
1336  * of a canvas object.
1337  *
1338  * @see evas_object_intercept_raise_callback_add().
1339  *
1340  */
1341 EAPI void *evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2);
1342
1343 /**
1344  * Set the callback function that intercepts a lower event of an object.
1345  *
1346  * @param obj The given canvas object pointer.
1347  * @param func The given function to be the callback function.
1348  * @param data The data passed to the callback function.
1349  *
1350  * This function sets a callback function to intercepts a lower event
1351  * of a canvas object.
1352  *
1353  * @see evas_object_intercept_lower_callback_del().
1354  *
1355  */
1356 EAPI void  evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1357
1358 /**
1359  * Unset the callback function that intercepts a lower event of an object.
1360  *
1361  * @param obj The given canvas object pointer.
1362  * @param func The given callback function.
1363  *
1364  * This function sets a callback function to intercepts a lower event
1365  * of a canvas object.
1366  *
1367  * @see evas_object_intercept_lower_callback_add().
1368  *
1369  */
1370 EAPI void *evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2);
1371
1372 /**
1373  * Set the callback function that intercepts a stack above event of an object.
1374  *
1375  * @param obj The given canvas object pointer.
1376  * @param func The given function to be the callback function.
1377  * @param data The data passed to the callback function.
1378  *
1379  * This function sets a callback function to intercepts a stack above event
1380  * of a canvas object.
1381  *
1382  * @see evas_object_intercept_stack_above_callback_del().
1383  *
1384  */
1385 EAPI void  evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1386
1387 /**
1388  * Unset the callback function that intercepts a stack above event of an object.
1389  *
1390  * @param obj The given canvas object pointer.
1391  * @param func The given callback function.
1392  *
1393  * This function sets a callback function to intercepts a stack above event
1394  * of a canvas object.
1395  *
1396  * @see evas_object_intercept_stack_above_callback_add().
1397  *
1398  */
1399 EAPI void *evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) EINA_ARG_NONNULL(1, 2);
1400
1401 /**
1402  * Set the callback function that intercepts a stack below event of an object.
1403  *
1404  * @param obj The given canvas object pointer.
1405  * @param func The given function to be the callback function.
1406  * @param data The data passed to the callback function.
1407  *
1408  * This function sets a callback function to intercepts a stack below event
1409  * of a canvas object.
1410  *
1411  * @see evas_object_intercept_stack_below_callback_del().
1412  *
1413  */
1414 EAPI void  evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1415
1416 /**
1417  * Unset the callback function that intercepts a stack below event of an object.
1418  *
1419  * @param obj The given canvas object pointer.
1420  * @param func The given callback function.
1421  *
1422  * This function sets a callback function to intercepts a stack below event
1423  * of a canvas object.
1424  *
1425  * @see evas_object_intercept_stack_below_callback_add().
1426  *
1427  */
1428 EAPI void *evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) EINA_ARG_NONNULL(1, 2);
1429
1430 /**
1431  * Set the callback function that intercepts a layer set event of an object.
1432  *
1433  * @param obj The given canvas object pointer.
1434  * @param func The given function to be the callback function.
1435  * @param data The data passed to the callback function.
1436  *
1437  * This function sets a callback function to intercepts a layer set event
1438  * of a canvas object.
1439  *
1440  * @see evas_object_intercept_layer_set_callback_del().
1441  *
1442  */
1443 EAPI void  evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1444
1445 /**
1446  * Unset the callback function that intercepts a layer set event of an object.
1447  *
1448  * @param obj The given canvas object pointer.
1449  * @param func The given callback function.
1450  *
1451  * This function sets a callback function to intercepts a layer set event
1452  * of a canvas object.
1453  *
1454  * @see evas_object_intercept_layer_set_callback_add().
1455  *
1456  */
1457 EAPI void *evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) EINA_ARG_NONNULL(1, 2);
1458
1459 /**
1460  * Set the callback function that intercepts a color set event of an object.
1461  *
1462  * @param obj The given canvas object pointer.
1463  * @param func The given function to be the callback function.
1464  * @param data The data passed to the callback function.
1465  *
1466  * This function sets a callback function to intercepts a color set event
1467  * of a canvas object.
1468  *
1469  * @see evas_object_intercept_color_set_callback_del().
1470  *
1471  */
1472 EAPI void  evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1473
1474 /**
1475  * Unset the callback function that intercepts a color set event of an object.
1476  *
1477  * @param obj The given canvas object pointer.
1478  * @param func The given callback function.
1479  *
1480  * This function sets a callback function to intercepts a color set event
1481  * of a canvas object.
1482  *
1483  * @see evas_object_intercept_color_set_callback_add().
1484  *
1485  */
1486 EAPI void *evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) EINA_ARG_NONNULL(1, 2);
1487
1488 /**
1489  * Set the callback function that intercepts a clip set event of an object.
1490  *
1491  * @param obj The given canvas object pointer.
1492  * @param func The given function to be the callback function.
1493  * @param data The data passed to the callback function.
1494  *
1495  * This function sets a callback function to intercepts a clip set event
1496  * of a canvas object.
1497  *
1498  * @see evas_object_intercept_clip_set_callback_del().
1499  *
1500  */
1501 EAPI void  evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1502
1503 /**
1504  * Unset the callback function that intercepts a clip set event of an object.
1505  *
1506  * @param obj The given canvas object pointer.
1507  * @param func The given callback function.
1508  *
1509  * This function sets a callback function to intercepts a clip set event
1510  * of a canvas object.
1511  *
1512  * @see evas_object_intercept_clip_set_callback_add().
1513  *
1514  */
1515 EAPI void *evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) EINA_ARG_NONNULL(1, 2);
1516
1517 /**
1518  * Set the callback function that intercepts a clip unset event of an object.
1519  *
1520  * @param obj The given canvas object pointer.
1521  * @param func The given function to be the callback function.
1522  * @param data The data passed to the callback function.
1523  *
1524  * This function sets a callback function to intercepts a clip unset event
1525  * of a canvas object.
1526  *
1527  * @see evas_object_intercept_clip_unset_callback_del().
1528  *
1529  */
1530 EAPI void  evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1531
1532 /**
1533  * Unset the callback function that intercepts a clip unset event of an object.
1534  *
1535  * @param obj The given canvas object pointer.
1536  * @param func The given callback function.
1537  *
1538  * This function sets a callback function to intercepts a clip unset event
1539  * of a canvas object.
1540  *
1541  * @see evas_object_intercept_clip_unset_callback_add().
1542  *
1543  */
1544 EAPI void *evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) EINA_ARG_NONNULL(1, 2);
1545
1546 /**
1547  * Set the callback function that intercepts a focus set event of an object.
1548  *
1549  * @param obj The given canvas object pointer.
1550  * @param func The given function to be the callback function.
1551  * @param data The data passed to the callback function.
1552  *
1553  * This function sets a callback function to intercepts a focus set event
1554  * of a canvas object.
1555  *
1556  * @see evas_object_intercept_focus_set_callback_del().
1557  *
1558  */
1559 EAPI void  evas_object_intercept_focus_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Focus_Set_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
1560
1561 /**
1562  * Unset the callback function that intercepts a focus set event of an object.
1563  *
1564  * @param obj The given canvas object pointer.
1565  * @param func The given callback function.
1566  *
1567  * This function sets a callback function to intercepts a focus set event
1568  * of a canvas object.
1569  *
1570  * @see evas_object_intercept_focus_set_callback_add().
1571  *
1572  */
1573 EAPI void *evas_object_intercept_focus_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Focus_Set_Cb func) EINA_ARG_NONNULL(1, 2);
1574
1575 /**
1576  * @}
1577  */
1578
1579 /**
1580  * @addtogroup Evas_Object_Rectangle
1581  *
1582  * @{
1583  */
1584
1585 /**
1586  * @brief Adds a rectangle to the given evas.
1587  * @param[in]   e The given evas.
1588  *
1589  * @if MOBILE @since_tizen 2.3
1590  * @elseif WEARABLE @since_tizen 2.3.1
1591  * @endif
1592  *
1593  * @return  The new rectangle object.
1594  *
1595  * @ingroup Evas_Object_Rectangle
1596  */
1597 EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1598
1599 #include "canvas/evas_rectangle.eo.legacy.h"
1600
1601 /**
1602  * @}
1603  */
1604
1605 /**
1606  * @internal
1607  * @defgroup Evas_Object_Vg
1608  * @ingroup Evas
1609  *
1610  * Evas_Object_Vg is the scene graph for managing vector graphics  objects.
1611  * User can create shape objects as well as fill objects and give it to the
1612  * Evas_Object_Vg for drawing on the screen as well as managing the lifecycle
1613  * of the objects. enabling reuse of shape objects.
1614  *
1615  * As Evas_Object_Vg is a Evas_Object all the operation that applicable to
1616  * a Evas_Object can be performed on it(clipping , map, etc).
1617  *
1618  * To create any complex vector graphics you can create a hirarchy of shape
1619  * and fill objects and give the hirarchy to Evas_Object which  will be
1620  * responsible for drawing and showing on the screen.
1621  *
1622  * As the shape object and fill object (linear and radial gradient) have
1623  * retain mode API, you only have to create it once and set the properties
1624  * and give it to evas_object_vg.
1625  *
1626  * Any change in the property of shape/fill object will automaticaly notified
1627  * to the evas_object_vg which will trigger a redrawing to reflect the change.
1628  *
1629  * To create a vector path, you can give list of path commands to the shape
1630  * object using efl_gfx_shape_path_set() API.
1631  *
1632  * Enabling graphical shapes to be constructed and reused.
1633  *
1634  * Below are the list of feature currently supported by Vector object.
1635  *
1636  * @li Drawing SVG Path.
1637  *     You can construct a path by using api in efl_gfx_utils.h
1638  *
1639  * @li Gradient filling and stroking.
1640  *     You can fill or stroke the path using linear or radial gradient.
1641  *     @see Evas_Vg_Gradient_Linear and Evas_Vg_Gradient_Radial
1642  *
1643  * @li Transformation support for path and gradient fill. You can apply
1644        affin transformation on path object.
1645  *     @see Eina_Matrix.
1646  *
1647  * @note Below are the list of interface, classes can be used to draw vector
1648  *       graphics using vector object.
1649  *
1650  * @li Efl.Gfx.Shape
1651  * @li Evas.VG_Shape
1652  * @li Evas.VG_Node
1653  * @li Efl.Gfx.Gradient
1654  * @li Efl.Gfx.Gradient_Radial
1655  * @li Efl.Gfx.Gradient_Linear
1656  *
1657  * Example:
1658  * @code
1659  * vector = evas_object_vg_add(canvas);
1660  * root = evas_obj_vg_root_node_get(vector);
1661  * shape = eo_add(EVAS_VG_SHAPE_CLASS, root);
1662  * Efl_Gfx_Path_Command *path_cmd = NULL;
1663  * double *points = NULL;
1664  * efl_gfx_path_append_circle(&path_cmd, &points);
1665  * eo_do(shape,
1666  *       evas_vg_node_origin_set(10, 10),
1667  *       efl_gfx_shape_stroke_width_set(1.0),
1668  *       evas_vg_node_color_set(128, 128, 128, 80),
1669  *       efl_gfx_shape_path_set(path_cmd, points));
1670  * @endcode
1671  *
1672  * @since 1.14
1673  *
1674  * @{
1675  */
1676
1677 #ifdef EFL_BETA_API_SUPPORT
1678
1679 /**
1680  * Creates a new vector object on the given Evas @p e canvas.
1681  *
1682  * @param e The given canvas.
1683  * @return The created vector object handle.
1684  *
1685  * The shape object hirarchy can be added to the evas_object_vg by accessing
1686  * the rootnode of the vg canvas and adding the hirarchy as child to the root
1687  * node.
1688  *
1689  * @see evas_obj_vg_root_node_get()
1690  * @since 1.14
1691  */
1692 EAPI Evas_Object *evas_object_vg_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1693
1694 #include "canvas/evas_vg.eo.legacy.h"
1695
1696 /**
1697  * Creates a new vector shape object \.
1698  *
1699  * @param parent The given vector container object.
1700  * @return The created vector shape object handle.
1701  *
1702  * @since 1.14
1703  */
1704 EAPI Efl_VG* evas_vg_shape_add(Efl_VG *parent);
1705
1706 /**
1707  * Creates a new vector container object \.
1708  *
1709  * @param parent The given vector container object.
1710  * @return The created vector container object handle.
1711  *
1712  * @since 1.14
1713  */
1714
1715 EAPI Efl_VG* evas_vg_container_add(Efl_VG *parent);
1716
1717 /**
1718  *
1719  * Retrieves whether or not the given Efl_Vg object is visible.
1720  *
1721  *
1722  */
1723 EAPI Eina_Bool evas_vg_node_visible_get(Eo *obj);
1724
1725 /**
1726  *
1727  * Makes the given Efl_Vg object visible or invisible.
1728  *
1729  * @param[in] v @c EINA_TRUE if to make the object visible, @c EINA_FALSE otherwise
1730  *
1731  */
1732 EAPI void evas_vg_node_visible_set(Eo *obj, Eina_Bool v);
1733
1734 /**
1735  *
1736  * Retrieves the general/main color of the given Efl_Vg object.
1737  *
1738  * Retrieves the “main” color's RGB component (and alpha channel)
1739  * values, <b>which range from 0 to 255</b>. For the alpha channel,
1740  * which defines the object's transparency level, 0 means totally
1741  * transparent, while 255 means opaque. These color values are
1742  * premultiplied by the alpha value.
1743  *
1744  *
1745  * @note Use @c NULL pointers on the components you're not interested
1746  * in: they'll be ignored by the function.
1747  *
1748  * @param[out] r The red component of the given color.
1749  * @param[out] g The green component of the given color.
1750  * @param[out] b The blue component of the given color.
1751  * @param[out] a The alpha component of the given color.
1752  *
1753  */
1754 EAPI void evas_vg_node_color_get(Eo *obj, int *r, int *g, int *b, int *a);
1755
1756 /**
1757  *
1758  * Sets the general/main color of the given Efl_Vg object to the given
1759  * one.
1760  *
1761  * @see evas_vg_node_color_get() (for an example)
1762  * @note These color values are expected to be premultiplied by @p a.
1763  *
1764  * @param[in] r The red component of the given color.
1765  * @param[in] g The green component of the given color.
1766  * @param[in] b The blue component of the given color.
1767  * @param[in] a The alpha component of the given color.
1768  *
1769  */
1770 EAPI void evas_vg_node_color_set(Eo *obj, int r, int g, int b, int a);
1771
1772 /**
1773  *
1774  * Retrieves the geometry of the given Efl_Vg object.
1775  *
1776  * @param[out] x in
1777  * @param[out] y in
1778  * @param[out] w in
1779  * @param[out] h in
1780  *
1781  */
1782 EAPI void evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h);
1783
1784 /**
1785  *
1786  * Changes the geometry of the given Efl_Vg object.
1787  *
1788  * @param[in] x in
1789  * @param[in] y in
1790  * @param[in] w in
1791  * @param[in] h in
1792  *
1793  */
1794 EAPI void evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h);
1795
1796 /**
1797  *
1798  * Stack @p obj immediately below @p below
1799  *
1800  * Objects, in a given canvas, are stacked in the order they get added
1801  * to it.  This means that, if they overlap, the highest ones will
1802  * cover the lowest ones, in that order. This function is a way to
1803  * change the stacking order for the objects.
1804  *
1805  * This function is intended to be used with <b>objects belonging to
1806  * the same layer</b> in a given canvas, otherwise it will fail (and
1807  * accomplish nothing).
1808  *
1809  * If you have smart objects on your canvas and @p obj is a member of
1810  * one of them, then @p below must also be a member of the same
1811  * smart object.
1812  *
1813  * Similarly, if @p obj is not a member of a smart object, @p below
1814  * must not be either.
1815  *
1816  * @see evas_object_layer_get()
1817  * @see evas_object_layer_set()
1818  * @see evas_object_stack_below()
1819  *
1820  *
1821  * @param[in] below the object below which to stack
1822  *
1823  */
1824 EAPI void evas_vg_node_stack_below(Eo *obj, Eo *below);
1825
1826 /**
1827  *
1828  * Stack @p obj immediately above @p above
1829  *
1830  * Objects, in a given canvas, are stacked in the order they get added
1831  * to it.  This means that, if they overlap, the highest ones will
1832  * cover the lowest ones, in that order. This function is a way to
1833  * change the stacking order for the objects.
1834  *
1835  * This function is intended to be used with <b>objects belonging to
1836  * the same layer</b> in a given canvas, otherwise it will fail (and
1837  * accomplish nothing).
1838  *
1839  * If you have smart objects on your canvas and @p obj is a member of
1840  * one of them, then @p above must also be a member of the same
1841  * smart object.
1842  *
1843  * Similarly, if @p obj is not a member of a smart object, @p above
1844  * must not be either.
1845  *
1846  * @see evas_object_layer_get()
1847  * @see evas_object_layer_set()
1848  * @see evas_object_stack_below()
1849  *
1850  *
1851  * @param[in] above the object above which to stack
1852  *
1853  */
1854 EAPI void evas_vg_node_stack_above(Eo *obj, Eo *above);
1855
1856 /**
1857  *
1858  * Raise @p obj to the top of its layer.
1859  *
1860  * @p obj will, then, be the highest one in the layer it belongs
1861  * to. Object on other layers won't get touched.
1862  *
1863  * @see evas_object_stack_above()
1864  * @see evas_object_stack_below()
1865  * @see evas_object_lower()
1866  *
1867  */
1868 EAPI void evas_vg_node_raise(Eo *obj);
1869
1870 /**
1871  *
1872  * Lower @p obj to the bottom of its layer.
1873  *
1874  * @p obj will, then, be the lowest one in the layer it belongs
1875  * to. Objects on other layers won't get touched.
1876  *
1877  * @see evas_object_stack_above()
1878  * @see evas_object_stack_below()
1879  * @see evas_object_raise()
1880  *
1881  *
1882  *
1883  */
1884 EAPI void evas_vg_node_lower(Eo *obj);
1885
1886 #include "canvas/efl_vg_base.eo.legacy.h"
1887
1888 /**
1889  *
1890  * Get the stroke scaling factor used for stroking this path.
1891  * @since 1.14
1892  *
1893  *
1894  */
1895 EAPI double evas_vg_shape_stroke_scale_get(Eo *obj);
1896
1897 /**
1898  *
1899  * Sets the stroke scale to be used for stroking the path.
1900  * the scale property will be used along with stroke width property.
1901  * @since 1.14
1902  *
1903  * @param[in] s stroke scale value
1904  *
1905  */
1906 EAPI void evas_vg_shape_stroke_scale_set(Eo *obj, double s);
1907
1908 /**
1909  *
1910  * Gets the color used for stroking the path.
1911  * @since 1.14
1912  *
1913  * @param[out] r The red component of the given color.
1914  * @param[out] g The green component of the given color.
1915  * @param[out] b The blue component of the given color.
1916  * @param[out] a The alpha component of the given color.
1917  *
1918  */
1919 EAPI void evas_vg_shape_stroke_color_get(Eo *obj, int *r, int *g, int *b, int *a);
1920
1921 /**
1922  *
1923  * Sets the color to be used for stroking the path.
1924  * @since 1.14
1925  *
1926  * @param[in] r The red component of the given color.
1927  * @param[in] g The green component of the given color.
1928  * @param[in] b The blue component of the given color.
1929  * @param[in] a The alpha component of the given color.
1930  *
1931  */
1932 EAPI void evas_vg_shape_stroke_color_set(Eo *obj, int r, int g, int b, int a);
1933
1934 /**
1935  *
1936  * Gets the stroke width to be used for stroking the path.
1937  * @since 1.14
1938  *
1939  *
1940  */
1941 EAPI double evas_vg_shape_stroke_width_get(Eo *obj);
1942
1943 /**
1944  *
1945  * Sets the stroke width to be used for stroking the path.
1946  * @since 1.14
1947  *
1948  * @param[in] w stroke width to be used
1949  *
1950  */
1951 EAPI void evas_vg_shape_stroke_width_set(Eo *obj, double w);
1952
1953 /**
1954  *
1955  * Not Implemented
1956  *
1957  *
1958  */
1959 EAPI double evas_vg_shape_stroke_location_get(Eo *obj);
1960
1961 /**
1962  *
1963  * Not Implemented
1964  *
1965  * @param[in] centered
1966  *
1967  */
1968 EAPI void evas_vg_shape_stroke_location_set(Eo *obj, double centered);
1969
1970 /**
1971  *
1972  * Not Implemented
1973  *
1974  * @param[out] dash
1975  * @param[out] length
1976  *
1977  */
1978 EAPI void evas_vg_shape_stroke_dash_get(Eo *obj, const Efl_Gfx_Dash **dash, unsigned int *length);
1979
1980 /**
1981  *
1982  * Not Implemented
1983  *
1984  * @param[in] dash
1985  * @param[in] length
1986  *
1987  */
1988 EAPI void evas_vg_shape_stroke_dash_set(Eo *obj, const Efl_Gfx_Dash *dash, unsigned int length);
1989
1990 /**
1991  *
1992  * Gets the cap style used for stroking path.
1993  * @since 1.14
1994  *
1995  *
1996  */
1997 EAPI Efl_Gfx_Cap evas_vg_shape_stroke_cap_get(Eo *obj);
1998
1999 /**
2000  *
2001  * Sets the cap style to be used for stroking the path.
2002  * The cap will be used for capping the end point of a
2003  * open subpath.
2004  *
2005  * @see Efl_Gfx_Cap
2006  * @since 1.14
2007  *
2008  * @param[in] c cap style to use , default is EFL_GFX_CAP_BUTT
2009  *
2010  */
2011 EAPI void evas_vg_shape_stroke_cap_set(Eo *obj, Efl_Gfx_Cap c);
2012
2013 /**
2014  *
2015  * Gets the join style used for stroking path.
2016  * @since 1.14
2017  *
2018  *
2019  */
2020 EAPI Efl_Gfx_Join evas_vg_shape_stroke_join_get(Eo *obj);
2021
2022 /**
2023  *
2024  * Sets the join style to be used for stroking the path.
2025  * The join style will be used for joining the two line segment
2026  * while stroking teh path.
2027  *
2028  * @see Efl_Gfx_Join
2029  * @since 1.14
2030  *
2031  * @param[in] j join style to use , default is
2032 EFL_GFX_JOIN_MITER
2033  *
2034  */
2035 EAPI void evas_vg_shape_stroke_join_set(Eo *obj, Efl_Gfx_Join j);
2036
2037 /**
2038  *
2039  * Set the list of commands and points to be used to create the
2040  * content of shape.
2041  *
2042  * @note see efl_gfx_path interface for how to create a command list.
2043  * @see Efl_Gfx_Path_Command
2044  * @since 1.14
2045  *
2046  * @param[in] op command list
2047  * @param[in] points point list
2048  *
2049  */
2050 EAPI void evas_vg_shape_shape_path_set(Eo *obj, const Efl_Gfx_Path_Command *op, const double *points);
2051
2052 /**
2053  *
2054  * Gets the command and points list
2055  * @since 1.14
2056  *
2057  * @param[out] op command list
2058  * @param[out] points point list
2059  *
2060  */
2061
2062 EAPI void evas_vg_shape_shape_path_get(Eo *obj, const Efl_Gfx_Path_Command **op, const double **points);
2063 EAPI void evas_vg_shape_shape_path_length_get(Eo *obj, unsigned int *commands, unsigned int *points);
2064 EAPI void evas_vg_shape_shape_current_get(Eo *obj, double *x, double *y);
2065 EAPI void evas_vg_shape_shape_current_ctrl_get(Eo *obj, double *x, double *y);
2066
2067 /**
2068  *
2069  * Copy the shape data from the object specified .
2070  *
2071  * @since 1.14
2072  *
2073  *
2074  * @param[in] dup_from Shape object from where data will be copied.
2075  *
2076  */
2077 EAPI void evas_vg_shape_shape_dup(Eo *obj, Eo *dup_from);
2078
2079 /**
2080  *
2081  * Reset the shape data of the shape object.
2082  *
2083  * @since 1.14
2084  *
2085  *
2086  *
2087  */
2088 EAPI void evas_vg_shape_shape_reset(Eo *obj);
2089
2090 /**
2091  *
2092  * Moves the current point to the given point,
2093  * implicitly starting a new subpath and closing the previous one.
2094  *
2095  * @see efl_gfx_path_append_close()
2096  * @since 1.14
2097  *
2098  *
2099  * @param[in] x X co-ordinate of the current point.
2100  * @param[in] y Y co-ordinate of the current point.
2101  *
2102  */
2103 EAPI void evas_vg_shape_shape_append_move_to(Eo *obj, double x, double y);
2104
2105 /**
2106  *
2107  * Adds a straight line from the current position to the given endPoint.
2108  * After the line is drawn, the current position is updated to be at the end
2109  * point of the line.
2110  *
2111  * @note if no current position present, it draws a line to itself, basically
2112  * a point.
2113  *
2114  * @see efl_gfx_path_append_move_to()
2115  * @since 1.14
2116  *
2117  *
2118  * @param[in] x X co-ordinate of end point of the line.
2119  * @param[in] y Y co-ordinate of end point of the line.
2120  *
2121  */
2122 EAPI void evas_vg_shape_shape_append_line_to(Eo *obj, double x, double y);
2123
2124 /**
2125  *
2126  * Adds a quadratic Bezier curve between the current position and the
2127  * given end point (x,y) using the control points specified by (ctrl_x, ctrl_y).
2128  * After the path is drawn, the current position is updated to be at the end
2129  * point of the path.
2130  *
2131  * @since 1.14
2132  *
2133  *
2134  * @param[in] x X co-ordinate of end point of the line.
2135  * @param[in] y Y co-ordinate of end point of the line.
2136  * @param[in] ctrl_x X co-ordinate of control point.
2137  * @param[in] ctrl_y Y co-ordinate of control point.
2138  *
2139  */
2140 EAPI void evas_vg_shape_shape_append_quadratic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y);
2141
2142 /**
2143  *
2144  * Same as efl_gfx_path_append_quadratic_to() api only difference is that it
2145  * uses the current control point to draw the bezier.
2146  *
2147  * @see efl_gfx_path_append_quadratic_to()
2148  * @since 1.14
2149  *
2150  *
2151  * @param[in] x X co-ordinate of end point of the line.
2152  * @param[in] y Y co-ordinate of end point of the line.
2153  *
2154  */
2155 EAPI void evas_vg_shape_shape_append_squadratic_to(Eo *obj, double x, double y);
2156
2157 /**
2158  *
2159  * Adds a cubic Bezier curve between the current position and the
2160  * given end point (x,y) using the control points specified by
2161  * (ctrl_x0, ctrl_y0), and (ctrl_x1, ctrl_y1). After the path is drawn,
2162  * the current position is updated to be at the end point of the path.
2163  *
2164  * @since 1.14
2165  *
2166  *
2167  * @param[in] x X co-ordinate of end point of the line.
2168  * @param[in] y Y co-ordinate of end point of the line.
2169  * @param[in] ctrl_x0 X co-ordinate of 1st control point.
2170  * @param[in] ctrl_y0 Y co-ordinate of 1st control point.
2171  * @param[in] ctrl_x1 X co-ordinate of 2nd control point.
2172  * @param[in] ctrl_y1 Y co-ordinate of 2nd control point.
2173  *
2174  */
2175 EAPI void evas_vg_shape_shape_append_cubic_to(Eo *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1);
2176
2177 /**
2178  *
2179  * Same as efl_gfx_path_append_cubic_to() api only difference is that it uses
2180  * the current control point to draw the bezier.
2181  *
2182  * @see efl_gfx_path_append_cubic_to()
2183  *
2184  * @since 1.14
2185  *
2186  *
2187  * @param[in] x X co-ordinate of end point of the line.
2188  * @param[in] y Y co-ordinate of end point of the line.
2189  * @param[in] ctrl_x X co-ordinate of 2nd control point.
2190  * @param[in] ctrl_y Y co-ordinate of 2nd control point.
2191  *
2192  */
2193 EAPI void evas_vg_shape_shape_append_scubic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y);
2194
2195 /**
2196  *
2197  * Append an arc that connects from the current point int the point list
2198  * to the given point (x,y). The arc is defined by the given radius in
2199  * x-direction (rx) and radius in y direction (ry) .
2200  *
2201  * @note Use this api if you know the end point's of the arc otherwise
2202  * use more convenient function efl_gfx_path_append_arc()
2203  *
2204  * @see efl_gfx_path_append_arc()
2205  * @since 1.14
2206  *
2207  *
2208  * @param[in] x X co-ordinate of end point of the arc.
2209  * @param[in] y Y co-ordinate of end point of the arc.
2210  * @param[in] rx radius of arc in x direction.
2211  * @param[in] ry radius of arc in y direction.
2212  * @param[in] angle x-axis rotation , normally 0.
2213  * @param[in] large_arc Defines whether to draw the larger arc or smaller arc joining two point.
2214  * @param[in] sweep Defines whether the arc will be drawn counter-clockwise or clockwise from current point to the end point taking into account the large_arc property.
2215  *
2216  */
2217 EAPI void evas_vg_shape_shape_append_arc_to(Eo *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep);
2218
2219 /**
2220  *
2221  * Append an arc that enclosed in the given rectangle (x, y, w, h).
2222  * The angle is defined in counter clock wise , use -ve angle for clockwise arc.
2223  *
2224  * @since 1.15
2225  *
2226  * @param[in] x X co-ordinate of the rect.
2227  * @param[in] y Y co-ordinate of the rect.
2228  * @param[in] w width of the rect.
2229  * @param[in] h height of the rect.
2230  * @param[in] start_angle Angle at which the arc will start.
2231  * @param[in] sweep_length Length of the arc.
2232  *
2233  */
2234 EAPI void evas_vg_shape_shape_append_arc(Eo *obj, double x, double y, double w, double h, double start_angle, double sweep_length);
2235
2236 /**
2237  *
2238  * Closes the current subpath by drawing a line to the beginning of the subpath,
2239  * automatically starting a new path. The current point of the new path is
2240  * (0, 0).
2241  *
2242  * @note If the subpath does not contain any points, this function does nothing.
2243  *
2244  * @since 1.14
2245  *
2246  *
2247  *
2248  */
2249 EAPI void evas_vg_shape_shape_append_close(Eo *obj);
2250
2251 /**
2252  *
2253  * Append a circle with given center and radius.
2254  *
2255  * @see efl_gfx_path_append_arc()
2256  * @since 1.14
2257  *
2258  *
2259  * @param[in] x X co-ordinate of the center of the circle.
2260  * @param[in] y Y co-ordinate of the center of the circle.
2261  * @param[in] radius radius of the circle.
2262  *
2263  */
2264 EAPI void evas_vg_shape_shape_append_circle(Eo *obj, double x, double y, double radius);
2265
2266 /**
2267  *
2268  * Append the given rectangle with rounded corner to the path.
2269  *
2270  * The xr and yr arguments specify the radii of the ellipses defining the
2271  * corners of the rounded rectangle.
2272  *
2273  * @note xr and yr are specified in terms of width and height respectively.
2274  *
2275  * @note if xr and yr are 0, then it will draw a rectangle without rounded corner.
2276  *
2277  * @since 1.14
2278  *
2279  *
2280  * @param[in] x X co-ordinate of the rectangle.
2281  * @param[in] y Y co-ordinate of the rectangle.
2282  * @param[in] w Width of the rectangle.
2283  * @param[in] h Height of the rectangle.
2284  * @param[in] rx The x radius of the rounded corner and should be in range [ 0 to w/2 ]
2285  * @param[in] ry The y radius of the rounded corner and should be in range [ 0 to h/2 ]
2286  *
2287  */
2288 EAPI void evas_vg_shape_shape_append_rect(Eo *obj, double x, double y, double w, double h, double rx, double ry);
2289
2290 EAPI void evas_vg_shape_shape_append_svg_path(Eo *obj, const char *svg_path_data);
2291 EAPI Eina_Bool evas_vg_shape_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map);
2292 EAPI Eina_Bool evas_vg_shape_shape_equal_commands(Eo *obj, const Eo *with);
2293
2294 #include "canvas/efl_vg_shape.eo.legacy.h"
2295
2296 /**
2297  *
2298  * Set the list of color stops for the gradient
2299  * @since 1.14
2300  *
2301  * @param[in] colors color stops list
2302  * @param[in] length length of the list
2303  *
2304  */
2305 EAPI void evas_vg_gradient_stop_set(Eo *obj, const Efl_Gfx_Gradient_Stop *colors, unsigned int length);
2306
2307 /**
2308  *
2309  * get the list of color stops.
2310  * @since 1.14
2311  *
2312  * @param[out] colors color stops list
2313  * @param[out] length length of the list
2314  *
2315  */
2316 EAPI void evas_vg_gradient_stop_get(Eo *obj, const Efl_Gfx_Gradient_Stop **colors, unsigned int *length);
2317
2318 /**
2319  *
2320  * Specifies the spread method that should be used for this gradient.
2321  * @since 1.14
2322  *
2323  * @param[in] s spread type to be used
2324  *
2325  */
2326 EAPI void evas_vg_gradient_spread_set(Eo *obj, Efl_Gfx_Gradient_Spread s);
2327
2328 /**
2329  *
2330  * Returns the spread method use by this gradient. The default is
2331  * EFL_GFX_GRADIENT_SPREAD_PAD.
2332  * @since 1.14
2333  *
2334  *
2335  */
2336 EAPI Efl_Gfx_Gradient_Spread evas_vg_gradient_spread_get(Eo *obj);
2337
2338 #include "canvas/efl_vg_gradient.eo.legacy.h"
2339
2340 /**
2341  *
2342  * Sets the start point of this linear gradient.
2343  *
2344  * @param[in] x x co-ordinate of start point
2345  * @param[in] y y co-ordinate of start point
2346  *
2347  */
2348 EAPI void evas_vg_gradient_linear_start_set(Eo *obj, double x, double y);
2349
2350 /**
2351  *
2352  * Gets the start point of this linear gradient.
2353  *
2354  * @param[out] x x co-ordinate of start point
2355  * @param[out] y y co-ordinate of start point
2356  *
2357  */
2358 EAPI void evas_vg_gradient_linear_start_get(Eo *obj, double *x, double *y);
2359
2360 /**
2361  *
2362  * Sets the end point of this linear gradient.
2363  *
2364  * @param[in] x x co-ordinate of end point
2365  * @param[in] y y co-ordinate of end point
2366  *
2367  */
2368 EAPI void evas_vg_gradient_linear_end_set(Eo *obj, double x, double y);
2369
2370 /**
2371  *
2372  * Gets the end point of this linear gradient.
2373  *
2374  * @param[out] x x co-ordinate of end point
2375  * @param[out] y y co-ordinate of end point
2376  *
2377  */
2378 EAPI void evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y);
2379
2380 #include "canvas/efl_vg_gradient_linear.eo.legacy.h"
2381
2382 /**
2383  *
2384  * Sets the center of this radial gradient.
2385  *
2386  * @param[in] x x co-ordinate of center point
2387  * @param[in] y y co-ordinate of center point
2388  *
2389  */
2390 EAPI void evas_vg_gradient_radial_center_set(Eo *obj, double x, double y);
2391
2392 /**
2393  *
2394  * Gets the center of this radial gradient.
2395  *
2396  * @param[out] x x co-ordinate of center point
2397  * @param[out] y y co-ordinate of center point
2398  *
2399  */
2400 EAPI void evas_vg_gradient_radial_center_get(Eo *obj, double *x, double *y);
2401
2402 /**
2403  *
2404  * Sets the center radius of this radial gradient.
2405  *
2406  * @param[in] r center radius
2407  *
2408  */
2409 EAPI void evas_vg_gradient_radial_radius_set(Eo *obj, double r);
2410
2411 /**
2412  *
2413  * Gets the center radius of this radial gradient.
2414  *
2415  *
2416  */
2417 EAPI double evas_vg_gradient_radial_radius_get(Eo *obj);
2418
2419 /**
2420  *
2421  * Sets the focal point of this radial gradient.
2422  *
2423  * @param[in] x x co-ordinate of focal point
2424  * @param[in] y y co-ordinate of focal point
2425  *
2426  */
2427 EAPI void evas_vg_gradient_radial_focal_set(Eo *obj, double x, double y);
2428
2429 /**
2430  *
2431  * Gets the focal point of this radial gradient.
2432  *
2433  * @param[out] x x co-ordinate of focal point
2434  * @param[out] y y co-ordinate of focal point
2435  *
2436  */
2437 EAPI void evas_vg_gradient_radial_focal_get(Eo *obj, double *x, double *y);
2438
2439 #include "canvas/efl_vg_gradient_radial.eo.legacy.h"
2440
2441 #endif
2442
2443 /**
2444  * @}
2445  */
2446
2447 /**
2448  * @ingroup Evas_Object_Image
2449  *
2450  * @{
2451  */
2452 /**
2453  * @brief Creates a new image object on the given Evas @p e canvas.
2454  *
2455  * @if MOBILE @since_tizen 2.3
2456  * @elseif WEARABLE @since_tizen 2.3.1
2457  * @endif
2458  *
2459  * @param[in] e The given canvas.
2460  * @return The created image object handle.
2461  *
2462  * @remark If you intend to @b display an image somehow in a GUI,
2463  * besides binding it to a real image file/source (with
2464  * evas_object_image_file_set(), for example), you'll have to tell
2465  * this image object how to fill its space with the pixels it can get
2466  * from the source. See evas_object_image_filled_add(), for a helper
2467  * on the common case of scaling up an image source to the whole area
2468  * of the image object.
2469  *
2470  * @see evas_object_image_fill_set()
2471  *
2472  * @remark Example:
2473  * @code
2474  * img = evas_object_image_add(canvas);
2475  * evas_object_image_file_set(img, "/path/to/img", NULL);
2476  * @endcode
2477  */
2478 EAPI Evas_Object                  *evas_object_image_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2479
2480 /**
2481  * @brief Creates a new image object that @b automatically scales its bound
2482  * image to the object's area, on both axis.
2483  *
2484  * @if MOBILE @since_tizen 2.3
2485  * @elseif WEARABLE @since_tizen 2.3.1
2486  * @endif
2487  *
2488  * @param[in] e The given canvas.
2489  * @return The created image object handle.
2490  *
2491  * @remark This is a helper function around evas_object_image_add() and
2492  * evas_object_image_filled_set(). It has the same effect of applying
2493  * those functions in sequence, which is a very common use case.
2494  *
2495  * @remark Whenever this object gets resized, the bound image will be
2496  * rescaled, too.
2497  *
2498  * @see evas_object_image_add()
2499  * @see evas_object_image_filled_set()
2500  * @see evas_object_image_fill_set()
2501  */
2502 EAPI Evas_Object                  *evas_object_image_filled_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2503
2504 /**
2505  * @brief Sets the data for an image from memory to be loaded
2506  *
2507  * @if MOBILE @since_tizen 2.3
2508  * @elseif WEARABLE @since_tizen 2.3.1
2509  * @endif
2510  *
2511  * @remark This is the same as evas_object_image_file_set() but the file to be loaded
2512  * may exist at an address in memory (the data for the file, not the filename
2513  * itself). The @p data at the address is copied and stored for future use, so
2514  * no @p data needs to be kept after this call is made. It will be managed and
2515  * freed for you when no longer needed. The @p size is limited to 2 gigabytes
2516  * in size, and must be greater than 0. A @c NULL @p data pointer is also
2517  * invalid. Set the filename to @c NULL to reset to empty state and have the
2518  * image file data freed from memory using evas_object_image_file_set().
2519  *
2520  * @remark The @p format is optional (pass @c NULL if you don't need/use it). It is
2521  * used to help Evas guess better which loader to use for the data. It may
2522  * simply be the "extension" of the file as it would normally be on disk
2523  * such as "jpg" or "png" or "gif" etc.
2524  *
2525  * @param[in] obj The given image object.
2526  * @param[in] data The image file data address
2527  * @param[in] size The size of the image file data in bytes
2528  * @param[in] format The format of the file (optional), or @c NULL if not needed
2529  * @param[in] key The image key in file, or @c NULL.
2530  */
2531 EAPI void                          evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2);
2532
2533 /**
2534  * @brief Set the native surface of a given image of the canvas
2535  *
2536  * @if MOBILE @since_tizen 2.3
2537  * @elseif WEARABLE @since_tizen 2.3.1
2538  * @endif
2539  *
2540  * @param[in] obj The given canvas pointer.
2541  * @param[in] surf The new native surface.
2542  *
2543  * @remark This function sets a native surface of a given canvas image.
2544  *
2545  */
2546 EAPI void                          evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2);
2547
2548 /**
2549  * @brief Preload an image object's image data in the background
2550  *
2551  * @if MOBILE @since_tizen 2.3
2552  * @elseif WEARABLE @since_tizen 2.3.1
2553  * @endif
2554  *
2555  * @param[in] obj The given image object.
2556  * @param[in] cancel @c EINA_FALSE will add it the preloading work queue,
2557  *               @c EINA_TRUE will remove it (if it was issued before).
2558  *
2559  * @remark This function requests the preload of the data image in the
2560  * background. The work is queued before being processed (because
2561  * there might be other pending requests of this type).
2562  *
2563  * @remark Whenever the image data gets loaded, Evas will call
2564  * #EVAS_CALLBACK_IMAGE_PRELOADED registered callbacks on @p obj (what
2565  * may be immediately, if the data was already preloaded before).
2566  *
2567  * @remark Use @c EINA_TRUE for @p cancel on scenarios where you don't need
2568  * the image data preloaded anymore.
2569  *
2570  * @remark Any evas_object_show() call after evas_object_image_preload()
2571  * will make the latter to be @b cancelled, with the loading process
2572  * now taking place @b synchronously (and, thus, blocking the return
2573  * of the former until the image is loaded). It is highly advisable,
2574  * then, that the user preload an image with it being @b hidden, just
2575  * to be shown on the #EVAS_CALLBACK_IMAGE_PRELOADED event's callback.
2576  */
2577 EAPI void                          evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
2578
2579 /**
2580  * @brief Clear the source object on a proxy image object.
2581  *
2582  * @if MOBILE @since_tizen 2.3
2583  * @elseif WEARABLE @since_tizen 2.3.1
2584  * @endif
2585  *
2586  * @param[in] obj Image object to clear source of.
2587  * @return @c EINA_TRUE on success, @c EINA_FALSE on error.
2588  *
2589  * @remark This is equivalent to calling evas_object_image_source_set() with a
2590  * @c NULL source.
2591  */
2592 EAPI Eina_Bool                     evas_object_image_source_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
2593
2594 /**
2595  * @brief Enable an image to be used as an alpha mask.
2596  *
2597  * @if MOBILE @since_tizen 2.3
2598  * @elseif WEARABLE @since_tizen 2.3.1
2599  * @endif
2600  *
2601  * @remark This will set any flags, and discard any excess image data not used as an
2602  * alpha mask.
2603  *
2604  * @remark Note there is little point in using a image as alpha mask unless it has an
2605  * alpha channel.
2606  *
2607  * @param[in] obj Object to use as an alpha mask.
2608  * @param[in] ismask Use image as alphamask, must be true.
2609  */
2610 EAPI void                          evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1);
2611
2612 /**
2613  * @brief
2614  * Set the source file from where an image object must fetch the real
2615  * image data (it may be an Eet file, besides pure image ones).
2616  *
2617  * @if MOBILE @since_tizen 2.3
2618  * @elseif WEARABLE @since_tizen 2.3.1
2619  * @endif
2620  *
2621  * @remark If the file supports multiple data stored in it (as Eet files do),
2622  * you can specify the key to be used as the index of the image in
2623  * this file.
2624  *
2625  * @remark Example:
2626  * @code
2627  * img = evas_object_image_add(canvas);
2628  * evas_object_image_file_set(img, "/path/to/img", NULL);
2629  * err = evas_object_image_load_error_get(img);
2630  * if (err != EVAS_LOAD_ERROR_NONE)
2631  * {
2632  * fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
2633  * valid_path, evas_load_error_str(err));
2634  * }
2635  * else
2636  * {
2637  * evas_object_image_fill_set(img, 0, 0, w, h);
2638  * evas_object_resize(img, w, h);
2639  * evas_object_show(img);
2640  * }
2641  * @endcode
2642  *
2643  * @param[in] file The image file path.
2644  * @param[in] key The image key in @p file (if its an Eet one), or @c
2645 NULL, otherwise.
2646  */
2647 EAPI void evas_object_image_file_set(Eo *obj, const char *file, const char *key);
2648
2649 /**
2650  * @brief Retrieve the source file from where an image object is to fetch the
2651  * real image data (it may be an Eet file, besides pure image ones).
2652  *
2653  * @if MOBILE @since_tizen 2.3
2654  * @elseif WEARABLE @since_tizen 2.3.1
2655  * @endif
2656  *
2657  * @remark You must @b not modify the strings on the returned pointers.
2658  *
2659  * @remark Use @c NULL pointers on the file components you're not
2660  * interested in: they'll be ignored by the function.
2661  *
2662  * @param[out] file The image file path.
2663  * @param[out] key The image key in @p file (if its an Eet one), or @c
2664 NULL, otherwise.
2665  */
2666 EAPI void evas_object_image_file_get(const Eo *obj, const char **file, const char **key);
2667
2668 /**
2669  * @internal
2670  *
2671  * Set the source mmaped file from where an image object must fetch the real
2672  * image data (it must be an Eina_File).
2673  *
2674  * If the file supports multiple data stored in it (as Eet files do),
2675  * you can specify the key to be used as the index of the image in
2676  * this file.
2677  *
2678  * @since 1.8
2679  *
2680  * @param[in] f The mmaped file
2681  * @param[in] key The image key in @p file (if its an Eet one), or @c
2682 NULL, otherwise.
2683  */
2684 EAPI void evas_object_image_mmap_set(Eo *obj, const Eina_File *f, const char *key);
2685
2686 /**
2687  * @internal
2688  *
2689  * Get the source mmaped file from where an image object must fetch the real
2690  * image data (it must be an Eina_File).
2691  *
2692  * If the file supports multiple data stored in it (as Eet files do),
2693  * you can get the key to be used as the index of the image in
2694  * this file.
2695  *
2696  * @since 1.10
2697  *
2698  * @param[out] f The mmaped file
2699  * @param[out] key The image key in @p file (if its an Eet one), or @c
2700 NULL, otherwise.
2701  */
2702 EAPI void evas_object_image_mmap_get(const Eo *obj, const Eina_File **f, const char **key);
2703
2704 /**
2705  * @brief
2706  * Save the given image object's contents to an (image) file.
2707  *
2708  * @if MOBILE @since_tizen 2.3
2709  * @elseif WEARABLE @since_tizen 2.3.1
2710  * @endif
2711  *
2712  * @remark The extension suffix on @p file will determine which <b>saver
2713  * module</b> Evas is to use when saving, thus the final file's
2714  * format. If the file supports multiple data stored in it (Eet ones),
2715  * you can specify the key to be used as the index of the image in it.
2716  *
2717  * @remark You can specify some flags when saving the image.  Currently
2718  * acceptable flags are @c quality and @c compress. Eg.: @c
2719  * "quality=100 compress=9"
2720  *
2721  * @param[in] file The filename to be used to save the image (extension
2722 obligatory).
2723  * @param[in] key The image key in the file (if an Eet one), or @c NULL,
2724 otherwise.
2725  * @param[in] flags String containing the flags to be used (@c NULL for
2726 none).
2727  */
2728 EAPI Eina_Bool evas_object_image_save(const Eo *obj, const char *file, const char *key, const char *flags) EINA_ARG_NONNULL(2);
2729
2730 /**
2731  * @brief Check if an image object can be animated (have multiple frames)
2732  *
2733  * @if MOBILE @since_tizen 2.3
2734  * @elseif WEARABLE @since_tizen 2.3.1
2735  * @endif
2736  *
2737  * @return whether obj support animation
2738  *
2739  * @remark This returns if the image file of an image object is capable of animation
2740  * such as an animated gif file might. This is only useful to be called once
2741  * the image object file has been set.
2742  *
2743  * @remark Example:
2744  * @code
2745  * extern Evas_Object *obj;
2746  *
2747  * if (evas_object_image_animated_get(obj))
2748  * {
2749  * int frame_count;
2750  * int loop_count;
2751  * Evas_Image_Animated_Loop_Hint loop_type;
2752  * double duration;
2753  *
2754  * frame_count = evas_object_image_animated_frame_count_get(obj);
2755  * printf("This image has %d frames\n",frame_count);
2756  *
2757  * duration = evas_object_image_animated_frame_duration_get(obj,1,0);
2758  * printf("Frame 1's duration is %f. You had better set object's frame to 2 after this duration using timer\n");
2759  *
2760  * loop_count = evas_object_image_animated_loop_count_get(obj);
2761  * printf("loop count is %d. You had better run loop %d times\n",loop_count,loop_count);
2762  *
2763  * loop_type = evas_object_image_animated_loop_type_get(obj);
2764  * if (loop_type == EVAS_IMAGE_ANIMATED_HINT_LOOP)
2765  * printf("You had better set frame like 1->2->3->1->2->3...\n");
2766  * else if (loop_type == EVAS_IMAGE_ANIMATED_HINT_PINGPONG)
2767  * printf("You had better set frame like 1->2->3->2->1->2...\n");
2768  * else
2769  * printf("Unknown loop type\n");
2770  *
2771  * evas_object_image_animated_frame_set(obj,1);
2772  * printf("You set image object's frame to 1. You can see frame 1\n");
2773  * }
2774  * @endcode
2775  *
2776  * @see evas_object_image_animated_get()
2777  * @see evas_object_image_animated_frame_count_get()
2778  * @see evas_object_image_animated_loop_type_get()
2779  * @see evas_object_image_animated_loop_count_get()
2780  * @see evas_object_image_animated_frame_duration_get()
2781  * @see evas_object_image_animated_frame_set()
2782  * @since 1.1
2783  *
2784  */
2785 EAPI Eina_Bool evas_object_image_animated_get(const Eo *obj);
2786
2787 /**
2788  * @brief Set the load size of a given image object's source image.
2789  *
2790  * @if MOBILE @since_tizen 2.3
2791  * @elseif WEARABLE @since_tizen 2.3.1
2792  * @endif
2793  *
2794  * @remark This function sets a new geometry size for the given canvas image.
2795  * The image will be loaded into memory as if it was the set size instead of
2796  * the original size.
2797  *
2798  * @remark The size of a given image object's source image will be less than or
2799  * equal to the size of @p w and @p h.
2800  *
2801  * @see evas_object_image_load_size_get()
2802  *
2803  * @param[in] w The new width of the image's load size.
2804  * @param[in] h The new height of the image's load size.
2805  */
2806 EAPI void evas_object_image_load_size_set(Eo *obj, int w, int h);
2807
2808 /**
2809  * @brief Get the load size of a given image object's source image.
2810  *
2811  * @if MOBILE @since_tizen 2.3
2812  * @elseif WEARABLE @since_tizen 2.3.1
2813  * @endif
2814  *
2815  * @remark This function gets the geometry size set manually for the given canvas image.
2816  *
2817  * @remark Use @c NULL pointers on the size components you're not
2818  * interested in: they'll be ignored by the function.
2819  * @remark @p w and @p h will be set with the image's loading size only if
2820  * the image's load size is set manually: if evas_object_image_load_size_set()
2821  * has not been called, @p w and @p h will be set with 0.
2822  *
2823  * @see evas_object_image_load_size_set() for more details
2824  *
2825  * @param[out] w The new width of the image's load size.
2826  * @param[out] h The new height of the image's load size.
2827  */
2828 EAPI void evas_object_image_load_size_get(const Eo *obj, int *w, int *h);
2829
2830 /**
2831  * @brief Sets whether to use high-quality image scaling algorithm on the
2832  * given image object.
2833  *
2834  * @if MOBILE @since_tizen 2.3
2835  * @elseif WEARABLE @since_tizen 2.3.1
2836  * @endif
2837  *
2838  * @remark When enabled, a higher quality image scaling algorithm is used when
2839  * scaling images to sizes other than the source image's original
2840  * one. This gives better results but is more computationally
2841  * expensive.
2842  *
2843  * @remark Image objects get created originally with smooth scaling @b
2844  * on.
2845  *
2846  * @see evas_object_image_smooth_scale_get()
2847  *
2848  * @param[in] smooth_scale Whether to use smooth scale or not.
2849  */
2850 EAPI void evas_object_image_smooth_scale_set(Eo *obj, Eina_Bool smooth_scale);
2851
2852 /**
2853  * @brief Retrieves whether the given image object is using high-quality
2854  * image scaling algorithm.
2855  *
2856  * @if MOBILE @since_tizen 2.3
2857  * @elseif WEARABLE @since_tizen 2.3.1
2858  * @endif
2859  *
2860  * @return Whether smooth scale is being used.
2861  *
2862  * @remark See @ref evas_object_image_smooth_scale_set() for more details.
2863  *
2864  */
2865 EAPI Eina_Bool evas_object_image_smooth_scale_get(const Eo *obj);
2866
2867 #include "canvas/evas_image.eo.legacy.h"
2868
2869 /**
2870  * @}
2871  */
2872
2873 /**
2874  * @addtogroup Evas_Object_Text
2875  *
2876  * @{
2877  */
2878
2879 /**
2880  * @brief Creates a new text object on the provided canvas.
2881  *
2882  * @if MOBILE @since_tizen 2.3
2883  * @elseif WEARABLE @since_tizen 2.3.1
2884  * @endif
2885  *
2886  * @param[in] e The canvas to create the text object on.
2887  * @return @c NULL on error, a pointer to a new text object on
2888  * success.
2889  *
2890  * @remark Text objects are for simple, single line text elements. If you want
2891  * more elaborated text blocks, see @ref Evas_Object_Textblock.
2892  *
2893  * @see evas_object_text_font_source_set()
2894  * @see evas_object_text_font_set()
2895  * @see evas_object_text_text_set()
2896  */
2897 EAPI Evas_Object         *evas_object_text_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2898
2899 /**
2900  * @brief Sets the text string to be displayed by the given text object.
2901  *
2902  * @if MOBILE @since_tizen 2.3
2903  * @elseif WEARABLE @since_tizen 2.3.1
2904  * @endif
2905  *
2906  * @see evas_object_text_text_get()
2907  *
2908  * @param[in] text Text string to display on it.
2909  */
2910 EAPI void evas_object_text_text_set(Eo *obj, const char *text);
2911
2912 /**
2913  * @brief Retrieves the text string currently being displayed by the given
2914  * text object.
2915  *
2916  * @if MOBILE @since_tizen 2.3
2917  * @elseif WEARABLE @since_tizen 2.3.1
2918  * @endif
2919  *
2920  * @return The text string currently being displayed on it.
2921  *
2922  * @remark Do not free() the return value.
2923  *
2924  * @see evas_object_text_text_set()
2925  *
2926  */
2927 EAPI const char *evas_object_text_text_get(const Eo *obj);
2928
2929 #include "canvas/evas_text.eo.legacy.h"
2930
2931 /**
2932  * @brief Set the font (source) file to be used on a given text object.
2933  *
2934  * @if MOBILE @since_tizen 2.3
2935  * @elseif WEARABLE @since_tizen 2.3.1
2936  * @endif
2937  *
2938  * @remark This function allows the font file to be explicitly set for a given
2939  * text object, overriding system lookup, which will first occur in
2940  * the given file's contents.
2941  *
2942  * @see evas_object_text_font_get()
2943  *
2944  * @param[in] font_source The font file's path.
2945  */
2946 EAPI void evas_object_text_font_source_set(Eo *obj, const char *font_source);
2947
2948 /**
2949  * @brief Get the font file's path which is being used on a given text
2950  * object.
2951  *
2952  * @if MOBILE @since_tizen 2.3
2953  * @elseif WEARABLE @since_tizen 2.3.1
2954  * @endif
2955  *
2956  * @return The font file's path.
2957  *
2958  * @see evas_object_text_font_get() for more details
2959  *
2960  */
2961 EAPI const char *evas_object_text_font_source_get(const Eo *obj);
2962
2963 /**
2964  * @brief Set the font family or filename, and size on a given text object.
2965  *
2966  * @if MOBILE @since_tizen 2.3
2967  * @elseif WEARABLE @since_tizen 2.3.1
2968  * @endif
2969  *
2970  * @remark This function allows the font name and size of a text object to be
2971  * set. The @p font string has to follow fontconfig's convention on
2972  * naming fonts, as it's the underlying library used to query system
2973  * fonts by Evas (see the @c fc-list command's output, on your system,
2974  * to get an idea). Alternatively, one can use a full path to a font file.
2975  *
2976  * @see evas_object_text_font_get()
2977  * @see evas_object_text_font_source_set()
2978  *
2979  * @param[in] font The font family name or filename.
2980  * @param[in] size The font size, in points.
2981  */
2982 EAPI void evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size);
2983
2984 /**
2985  * @brief Retrieve the font family and size in use on a given text object.
2986  *
2987  * @if MOBILE @since_tizen 2.3
2988  * @elseif WEARABLE @since_tizen 2.3.1
2989  * @endif
2990  *
2991  * @remark This function allows the font name and size of a text object to be
2992  * queried. Be aware that the font name string is still owned by Evas
2993  * and should @b not have free() called on it by the caller of the
2994  * function.
2995  *
2996  * @see evas_object_text_font_set()
2997  *
2998  * @param[out] font The font family name or filename.
2999  * @param[out] size The font size, in points.
3000  */
3001 EAPI void evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size);
3002
3003 // TIZEN_ONLY(20150513): Add evas_object_text/textblock_ellipsis_status_get internal API.
3004 /**
3005  * @internal
3006  */
3007 EAPI Eina_Bool evas_object_text_ellipsis_status_get(const Evas_Object *eo_obj);
3008 //
3009
3010 /**
3011  * @}
3012  */
3013
3014 /**
3015  * @addtogroup Evas_Object_Textblock
3016  *
3017  * @{
3018  */
3019
3020 /**
3021  * @brief Adds a textblock to the given evas.
3022  * @param[in]   e The given evas.
3023  *
3024  * @if MOBILE @since_tizen 2.3
3025  * @elseif WEARABLE @since_tizen 2.3.1
3026  * @endif
3027  *
3028  * @return  The new textblock object.
3029  */
3030 EAPI Evas_Object                             *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3031
3032 /**
3033  * @brief Return the plain version of the markup.
3034  *
3035  * @if MOBILE @since_tizen 2.3
3036  * @elseif WEARABLE @since_tizen 2.3.1
3037  * @endif
3038  *
3039  * @remark Works as if you set the markup to a textblock and then retrieve the plain
3040  * version of the text. i.e: <br> and <\n> will be replaced with \n, &...; with
3041  * the actual char and etc.
3042  *
3043  * @param[in] obj The textblock object to work with. (if @c NULL, tries the
3044  * default).
3045  * @param[in] text The markup text (if @c NULL, return @c NULL).
3046  * @return An allocated plain text version of the markup.
3047  * @since 1.2
3048  */
3049 EAPI char                                    *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
3050
3051 /**
3052  * @brief Return the markup version of the plain text.
3053  *
3054  * @if MOBILE @since_tizen 2.3
3055  * @elseif WEARABLE @since_tizen 2.3.1
3056  * @endif
3057  *
3058  * @remark Replaces \\n -\> \<br/\> \\t -\> \<tab/\> and etc. Generally needed before you pass
3059  * plain text to be set in a textblock.
3060  *
3061  * @param[in] obj the textblock object to work with (if @c NULL, it just does the
3062  * default behaviour, i.e with no extra object information).
3063  * @param[in] text The plain text (if @c NULL, return @c NULL).
3064  * @return An allocated markup version of the plain text.
3065  * @since 1.2
3066  */
3067 EAPI char                                    *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
3068
3069 /**
3070  * @brief Clear the textblock object.
3071  * @remark Does *NOT* free the Evas object itself.
3072  *
3073  * @if MOBILE @since_tizen 2.3
3074  * @elseif WEARABLE @since_tizen 2.3.1
3075  * @endif
3076  *
3077  * @param[in] obj the object to clear.
3078  * @return nothing.
3079  */
3080 EAPI void                                     evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
3081
3082 // TIZEN_ONLY(20150513): Add evas_object_text/textblock_ellipsis_status_get internal API.
3083 /**
3084  * @internal
3085  */
3086 EAPI Eina_Bool                                evas_object_textblock_ellipsis_status_get(const Evas_Object *eo_obj);
3087 //
3088
3089
3090 #include "canvas/evas_textblock.eo.legacy.h"
3091
3092 /**
3093  * @}
3094  */
3095
3096 /**
3097  * @internal
3098  *
3099  * @ingroup Evas_Object_Grid
3100  *
3101  * @{
3102  */
3103 /**
3104  * @brief Add a textgrid to the given Evas.
3105  *
3106  * @param e The given evas.
3107  * @return The new textgrid object.
3108  *
3109  * This function adds a new textgrid object to the Evas @p e and returns the object.
3110  *
3111  * @since 1.7
3112  */
3113 EAPI Evas_Object *evas_object_textgrid_add(Evas *e);
3114
3115 #include "canvas/evas_textgrid.eo.legacy.h"
3116
3117 /**
3118  *
3119  * @brief Set the font (source) file to be used on a given textgrid object.
3120  *
3121  * This function allows the font file @p font_source to be explicitly
3122  * set for the textgrid object @p obj, overriding system lookup, which
3123  * will first occur in the given file's contents. If @p font_source is
3124  * @c NULL or is an empty string, or the same font_source has already
3125  * been set, or on error, this function does nothing.
3126  *
3127  * @see evas_object_textgrid_font_get()
3128  * @see evas_object_textgrid_font_set()
3129  * @see evas_object_textgrid_font_source_get()
3130  *
3131  * @since 1.7
3132  *
3133  * @param[in] font_source The font file's path.
3134  */
3135 EAPI void evas_object_textgrid_font_source_set(Eo *obj, const char *font_source);
3136
3137 /**
3138  *
3139  * @brief Get the font file's path which is being used on a given textgrid object.
3140  *
3141  * @return The font file's path.
3142  *
3143  * This function returns the font source path of the textgrid object
3144  * @p obj. If the font source path has not been set, or on error,
3145  * @c NULL is returned.
3146  *
3147  * @see evas_object_textgrid_font_get()
3148  * @see evas_object_textgrid_font_set()
3149  * @see evas_object_textgrid_font_source_set()
3150  *
3151  * @since 1.7
3152  *
3153  */
3154 EAPI const char *evas_object_textgrid_font_source_get(const Eo *obj);
3155
3156 /**
3157  *
3158  * @brief Set the font family and size on a given textgrid object.
3159  *
3160  * This function allows the font name @p font_name and size
3161  * @p font_size of the textgrid object @p obj to be set. The @p font_name
3162  * string has to follow fontconfig's convention on naming fonts, as
3163  * it's the underlying library used to query system fonts by Evas (see
3164  * the @c fc-list command's output, on your system, to get an
3165  * idea). It also has to be a monospace font. If @p font_name is
3166  * @c NULL, or if it is an empty string, or if @p font_size is less or
3167  * equal than 0, or on error, this function does nothing.
3168  *
3169  * @see evas_object_textgrid_font_get()
3170  * @see evas_object_textgrid_font_source_set()
3171  * @see evas_object_textgrid_font_source_get()
3172  *
3173  * @since 1.7
3174  *
3175  * @param[in] font_name The font (family) name.
3176  * @param[in] font_size The font size, in points.
3177  */
3178 EAPI void evas_object_textgrid_font_set(Eo *obj, const char *font_name, Evas_Font_Size font_size);
3179
3180 /**
3181  *
3182  * @brief Retrieve the font family and size in use on a given textgrid object.
3183  *
3184  * This function allows the font name and size of a textgrid object
3185  * @p obj to be queried and stored respectively in the buffers
3186  * @p font_name and @p font_size. Be aware that the font name string is
3187  * still owned by Evas and should @b not have free() called on it by
3188  * the caller of the function. On error, the font name is the empty
3189  * string and the font size is 0. @p font_name and @p font_source can
3190  * be @c NULL.
3191  *
3192  * @see evas_object_textgrid_font_set()
3193  * @see evas_object_textgrid_font_source_set()
3194  * @see evas_object_textgrid_font_source_get()
3195  *
3196  * @since 1.7
3197  *
3198  * @param[out] font_name The font (family) name.
3199  * @param[out] font_size The font size, in points.
3200  */
3201 EAPI void evas_object_textgrid_font_get(const Eo *obj, const char **font_name, Evas_Font_Size *font_size);
3202
3203 /**
3204  * @}
3205  */
3206
3207 /**
3208  * @addtogroup Evas_Line_Group
3209  *
3210  * @{
3211  */
3212 /**
3213  * @brief Adds a new evas line object to the given evas.
3214  * @param[in]   e The given evas.
3215  *
3216  * @if MOBILE @since_tizen 2.3
3217  * @elseif WEARABLE @since_tizen 2.3.1
3218  * @endif
3219  *
3220  * @return  The new evas line object.
3221  */
3222 EAPI Evas_Object *evas_object_line_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3223
3224 #include "canvas/evas_line.eo.legacy.h"
3225
3226 /**
3227  * @}
3228  */
3229
3230 /**
3231  * @addtogroup Evas_Object_Polygon
3232  *
3233  * @{
3234  */
3235 /**
3236  * @brief Adds a new evas polygon object to the given evas.
3237  * @param[in]   e The given evas.
3238  *
3239  * @if MOBILE @since_tizen 2.3
3240  * @elseif WEARABLE @since_tizen 2.3.1
3241  * @endif
3242  *
3243  * @return  A new evas polygon object.
3244  */
3245 EAPI Evas_Object *evas_object_polygon_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3246
3247 #include "canvas/evas_polygon.eo.legacy.h"
3248 /**
3249  * @}
3250  */
3251
3252
3253 /**
3254  * @addtogroup Evas_Smart_Object_Group
3255  *
3256  * @{
3257  */
3258 /**
3259  * @brief Instantiates a new smart object described by @p s.
3260  *
3261  * @if MOBILE @since_tizen 2.3
3262  * @elseif WEARABLE @since_tizen 2.3.1
3263  * @endif
3264  *
3265  * @param[in] e the canvas on which to add the object
3266  * @param[in] s the #Evas_Smart describing the smart object
3267  * @return a new #Evas_Object handle
3268  *
3269  * @remark This is the function one should use when defining the public
3270  * function @b adding an instance of the new smart object to a given
3271  * canvas. It will take care of setting all of its internals to work
3272  * as they should, if the user set things properly, as seem on the
3273  * #EVAS_SMART_SUBCLASS_NEW, for example.
3274  *
3275  */
3276 EAPI Evas_Object *evas_object_smart_add(Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
3277
3278 /**
3279  * @brief Set an Evas object as a member of a given smart object.
3280  *
3281  * @if MOBILE @since_tizen 2.3
3282  * @elseif WEARABLE @since_tizen 2.3.1
3283  * @endif
3284  *
3285  * @param[in] obj The member object
3286  * @param[in] smart_obj The smart object
3287  *
3288  * @remark Members will automatically be stacked and layered together with the
3289  * smart object. The various stacking functions will operate on
3290  * members relative to the other members instead of the entire canvas,
3291  * since they now live on an exclusive layer (see
3292  * evas_object_stack_above(), for more details).
3293  *
3294  * @remark Any @p smart_obj object's specific implementation of the @c
3295  * member_add() smart function will take place too, naturally.
3296  *
3297  * @see evas_object_smart_member_del()
3298  * @see evas_object_smart_members_get()
3299  *
3300  */
3301 EAPI void         evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2);
3302
3303 /**
3304  * @brief Removes a member object from a given smart object.
3305  *
3306  * @if MOBILE @since_tizen 2.3
3307  * @elseif WEARABLE @since_tizen 2.3.1
3308  * @endif
3309  *
3310  * @param[in] obj the member object
3311  *
3312  * @remark This removes a member object from a smart object, if it was added
3313  * to any. The object will still be on the canvas, but no longer
3314  * associated with whichever smart object it was associated with.
3315  *
3316  * @see evas_object_smart_member_add() for more details
3317  * @see evas_object_smart_members_get()
3318  */
3319 EAPI void         evas_object_smart_member_del(Evas_Object *obj) EINA_ARG_NONNULL(1);
3320
3321 /**
3322  * @brief Add (register) a callback function to the smart event specified by
3323  * @p event on the smart object @p obj.
3324  *
3325  * @if MOBILE @since_tizen 2.3
3326  * @elseif WEARABLE @since_tizen 2.3.1
3327  * @endif
3328  *
3329  * @param[in] obj a smart object
3330  * @param[in] event the event's name string
3331  * @param[in] func the callback function
3332  * @param[in] data user data to be passed to the callback function
3333  *
3334  * @remark Smart callbacks look very similar to Evas callbacks, but are
3335  * implemented as smart object's custom ones.
3336  *
3337  * @remark This function adds a function callback to an smart object when the
3338  * event named @p event occurs in it. The function is @p func.
3339  *
3340  * @remark In the event of a memory allocation error during addition of the
3341  * callback to the object, Evas Alloc Error function should be used to
3342  * determine the nature of the error, if any, and the program should
3343  * sensibly try and recover.
3344  *
3345  * @remark A smart callback function must have the ::Evas_Smart_Cb prototype
3346  * definition. The first parameter (@p data) in this definition will
3347  * have the same value passed to evas_object_smart_callback_add() as
3348  * the @p data parameter, at runtime. The second parameter @p obj is a
3349  * handle to the object on which the event occurred. The third
3350  * parameter, @p event_info, is a pointer to data which is totally
3351  * dependent on the smart object's implementation and semantic for the
3352  * given event.
3353  *
3354  * @remark There is an infrastructure for introspection on smart objects'
3355  * events, but no
3356  * internal smart objects on Evas implement them yet.
3357  *
3358  * @see @ref Evas_Smart_Object_Group_Callbacks for more details.
3359  *
3360  * @see evas_object_smart_callback_del()
3361  */
3362 EAPI void         evas_object_smart_callback_add(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3);
3363
3364 /**
3365  * @internal
3366  *
3367  * Add (register) a callback function to the smart event specified by
3368  * @p event on the smart object @p obj. Except for the priority field,
3369  * it's exactly the same as @ref evas_object_smart_callback_add
3370  *
3371  * @param obj a smart object
3372  * @param event the event's name string
3373  * @param priority The priority of the callback, lower values called first.
3374  * @param func the callback function
3375  * @param data user data to be passed to the callback function
3376  *
3377  * @see evas_object_smart_callback_add
3378  * @since 1.1
3379  */
3380 EAPI void         evas_object_smart_callback_priority_add(Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data);
3381
3382 /**
3383  * @brief Delete (unregister) a callback function from the smart event
3384  * specified by @p event on the smart object @p obj.
3385  *
3386  * @if MOBILE @since_tizen 2.3
3387  * @elseif WEARABLE @since_tizen 2.3.1
3388  * @endif
3389  *
3390  * @param[in] obj a smart object
3391  * @param[in] event the event's name string
3392  * @param[in] func the callback function
3393  * @return the data pointer
3394  *
3395  * @remark This function removes <b>the first</b> added smart callback on the
3396  * object @p obj matching the event name @p event and the registered
3397  * function pointer @p func. If the removal is successful it will also
3398  * return the data pointer that was passed to
3399  * evas_object_smart_callback_add() (that will be the same as the
3400  * parameter) when the callback(s) was(were) added to the canvas. If
3401  * not successful @c NULL will be returned.
3402  *
3403  * @see evas_object_smart_callback_add() for more details.
3404  *
3405  */
3406 EAPI void        *evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3);
3407
3408 /**
3409  * @brief Delete (unregister) a callback function from the smart event
3410  * specified by @p event on the smart object @p obj.
3411  *
3412  * @if MOBILE @since_tizen 2.3
3413  * @elseif WEARABLE @since_tizen 2.3.1
3414  * @endif
3415  *
3416  * @param[in] obj a smart object
3417  * @param[in] event the event's name string
3418  * @param[in] func the callback function
3419  * @param[in] data the data pointer that was passed to the callback
3420  * @return the data pointer
3421  *
3422  * @remark This function removes <b>the first</b> added smart callback on the
3423  * object @p obj matching the event name @p event, the registered
3424  * function pointer @p func and the callback data pointer @p data. If
3425  * the removal is successful it will also return the data pointer that
3426  * was passed to evas_object_smart_callback_add() (that will be the same
3427  * as the parameter) when the callback(s) was(were) added to the canvas.
3428  * If not successful @c NULL will be returned. A common use would be to
3429  * remove an exact match of a callback
3430  *
3431  * @see evas_object_smart_callback_add() for more details.
3432  * @since 1.2
3433  *
3434  * @remark To delete all smart event callbacks which match @p type and @p func,
3435  * use evas_object_smart_callback_del().
3436  */
3437 EAPI void        *evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1, 2, 3);
3438
3439 /**
3440  * @brief Call a given smart callback on the smart object @p obj.
3441  *
3442  * @if MOBILE @since_tizen 2.3
3443  * @elseif WEARABLE @since_tizen 2.3.1
3444  * @endif
3445  *
3446  * @param[in] obj the smart object
3447  * @param[in] event the event's name string
3448  * @param[in] event_info pointer to an event specific struct or information to
3449  * pass to the callback functions registered on this smart event
3450  *
3451  * @remark This should be called @b internally, from the smart object's own
3452  * code, when some specific event has occurred and the implementor
3453  * wants is to pertain to the object's events API (see @ref
3454  * Evas_Smart_Object_Group_Callbacks). The documentation for the smart
3455  * object should include a list of possible events and what type of @p
3456  * event_info to expect for each of them. Also, when defining an
3457  * #Evas_Smart_Class, smart object implementors are strongly
3458  * encouraged to properly set the Evas_Smart_Class::callbacks
3459  * callbacks description array, so that the users of the smart object
3460  * can have introspection on its events API <b>at run time</b>.
3461  *
3462  */
3463 EAPI void         evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2);
3464
3465 /**
3466  * @internal
3467  *
3468  * Retrieve an Evas smart object's interface, by name string pointer.
3469  *
3470  * @param obj An Evas smart object.
3471  * @param name Name string of the desired interface, which must be the
3472  *             same pointer used at the interface's declarion, when
3473  *             creating the smart object @a obj.
3474  *
3475  * @since 1.7
3476  *
3477  * @return The interface's handle pointer, if found, @c NULL
3478  * otherwise.
3479  */
3480 EAPI const void       *evas_object_smart_interface_get(const Evas_Object *obj, const char *name);
3481
3482 /**
3483  * @internal
3484  *
3485  * Retrieve an Evas smart object interface's <b>private data</b>.
3486  *
3487  * @param obj An Evas smart object.
3488  * @param iface The given object's interface handle.
3489  *
3490  * @since 1.7
3491  *
3492  * @return The object interface's private data blob pointer, if found,
3493  * @c NULL otherwise.
3494  */
3495 EAPI void             *evas_object_smart_interface_data_get(const Evas_Object *obj, const Evas_Smart_Interface *iface);
3496
3497 /**
3498  * @brief This gets the internal counter that counts the number of smart calculations
3499  *
3500  * @if MOBILE @since_tizen 2.3
3501  * @elseif WEARABLE @since_tizen 2.3.1
3502  * @endif
3503  *
3504  * @param[in] e The canvas to get the calculate counter from
3505  *
3506  * @remark Whenever evas performs smart object calculations on the whole canvas
3507  * it increments a counter by 1. This is the smart object calculate counter
3508  * that this function returns the value of. It starts at the value of 0 and
3509  * will increase (and eventually wrap around to negative values and so on) by
3510  * 1 every time objects are calculated. You can use this counter to ensure
3511  * you don't re-do calculations withint the same calculation generation/run
3512  * if the calculations maybe cause self-feeding effects.
3513  *
3514  * @since 1.1
3515  */
3516 EAPI int          evas_smart_objects_calculate_count_get(const Evas *e);
3517
3518 #include "canvas/evas_object_smart.eo.legacy.h"
3519
3520 /**
3521  * @}
3522  */
3523
3524 /**
3525  * @ingroup Evas_Smart_Object_Clipped
3526  *
3527  * @{
3528  */
3529 /**
3530  * Get the clipper object for the given clipped smart object.
3531  *
3532  * @param obj the clipped smart object to retrieve associated clipper
3533  * from.
3534  * @return the clipper object.
3535  *
3536  * Use this function if you want to change any of this clipper's
3537  * properties, like colors.
3538  *
3539  * @see evas_object_smart_clipped_smart_add()
3540  */
3541 EAPI Evas_Object            *evas_object_smart_clipped_clipper_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3542
3543 #include "canvas/evas_smart_clipped.eo.legacy.h"
3544
3545 /**
3546  * @}
3547  */
3548
3549 /**
3550  * @addtogroup Evas_Object_Box
3551  *
3552  * @{
3553  */
3554
3555 /**
3556  * @brief Add a new box object on the provided canvas.
3557  *
3558  * @if MOBILE @since_tizen 2.3
3559  * @elseif WEARABLE @since_tizen 2.3.1
3560  * @endif
3561  *
3562  * @param[in] evas The canvas to create the box object on.
3563  * @return @c NULL on error, a pointer to a new box object on
3564  * success.
3565  *
3566  * @remark After instantiation, if a box object hasn't its layout function
3567  * set, via evas_object_box_layout_set(), it will have it by default
3568  * set to evas_object_box_layout_horizontal(). The remaining
3569  * properties of the box must be set/retrieved via
3570  * <c>evas_object_box_{h,v}_{align,padding}_{get,set)()</c>.
3571  */
3572 EAPI Evas_Object               *evas_object_box_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3573
3574 /**
3575  * @brief Get a property's value (by its given numerical identifier), on a
3576  * given box child element -- by a variable argument list
3577  *
3578  * @if MOBILE @since_tizen 2.3
3579  * @elseif WEARABLE @since_tizen 2.3.1
3580  * @endif
3581  *
3582  * @param[in] o The box parenting the child element
3583  * @param[in] opt The box option structure bound to the child box element
3584  * to get a property from
3585  * @param[in] property The numerical ID of the given property
3586  * @param[out] args The variable argument list with pointers to where to
3587  * store the values of this property. They @b must point to variables
3588  * of the same type the user has defined for them.
3589  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
3590  *
3591  * @remark This is a variable argument list variant of the
3592  * evas_object_box_option_property_get(). See its documentation for
3593  * more details.
3594  */
3595 EAPI Eina_Bool                  evas_object_box_option_property_vget(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2);
3596
3597 /**
3598  * @brief Set a property value (by its given numerical identifier), on a
3599  * given box child element -- by a variable argument list
3600  *
3601  * @if MOBILE @since_tizen 2.3
3602  * @elseif WEARABLE @since_tizen 2.3.1
3603  * @endif
3604  *
3605  * @param[in] o The box parenting the child element
3606  * @param[in] opt The box option structure bound to the child box element
3607  * to set a property on
3608  * @param[in] property The numerical ID of the given property
3609  * @param[in] args The variable argument list implementing the value to
3610  * be set for this property. It @b must be of the same type the user has
3611  * defined for it.
3612  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
3613  *
3614  * @remark This is a variable argument list variant of the
3615  * evas_object_box_option_property_set(). See its documentation for
3616  * more details.
3617  */
3618 EAPI Eina_Bool                  evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2);
3619
3620 /**
3621  * @brief Set a property value (by its given numerical identifier), on a
3622  * given box child element
3623  *
3624  * @if MOBILE @since_tizen 2.3
3625  * @elseif WEARABLE @since_tizen 2.3.1
3626  * @endif
3627  *
3628  * @param[in] o The box parenting the child element
3629  * @param[in] opt The box option structure bound to the child box element
3630  * to set a property on
3631  * @param[in] property The numerical ID of the given property
3632  * @param[in] ... (List of) actual value(s) to be set for this
3633  * property. It (they) @b must be of the same type the user has
3634  * defined for it (them).
3635  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
3636  *
3637  * @remark This call won't do anything for a canonical Evas box. Only
3638  * users which have @b subclassed it, setting custom box items options
3639  * (see #Evas_Object_Box_Option) on it, would benefit from this
3640  * function. They'd have to implement it and set it to be the
3641  * _Evas_Object_Box_Api::property_set smart class function of the box,
3642  * which is originally set to @c NULL.
3643  *
3644  * @remark This function will internally create a variable argument
3645  * list, with the values passed after @p property, and call
3646  * evas_object_box_option_property_vset() with this list and the same
3647  * previous arguments.
3648  */
3649 EAPI Eina_Bool                  evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
3650
3651 /**
3652  * @brief Get a property's value (by its given numerical identifier), on a
3653  * given box child element
3654  *
3655  * @if MOBILE @since_tizen 2.3
3656  * @elseif WEARABLE @since_tizen 2.3.1
3657  * @endif
3658  *
3659  * @param[in] o The box parenting the child element
3660  * @param[in] opt The box option structure bound to the child box element
3661  * to get a property from
3662  * @param[in] property The numerical ID of the given property
3663  * @param[out] ... (List of) pointer(s) where to store the value(s) set for
3664  * this property. It (they) @b must point to variable(s) of the same
3665  * type the user has defined for it (them).
3666  * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
3667  *
3668  * @remark This call won't do anything for a canonical Evas box. Only
3669  * users which have @b subclassed it, getting custom box items options
3670  * (see #Evas_Object_Box_Option) on it, would benefit from this
3671  * function. They'd have to implement it and get it to be the
3672  * _Evas_Object_Box_Api::property_get smart class function of the
3673  * box, which is originally get to @c NULL.
3674  *
3675  * @remark This function will internally create a variable argument
3676  * list, with the values passed after @p property, and call
3677  * evas_object_box_option_property_vget() with this list and the same
3678  * previous arguments.
3679  */
3680 EAPI Eina_Bool                  evas_object_box_option_property_get(const Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
3681
3682 /**
3683  * @brief Get the list of children objects in a given box object.
3684  *
3685  * @if MOBILE @since_tizen 2.3
3686  * @elseif WEARABLE @since_tizen 2.3.1
3687  * @endif
3688  *
3689  * @param[in] o The box to retrieve an items list from
3690  * @return A list of @p o's child objects, on success, or @c NULL,
3691  * on errors (or if it has no child objects)
3692  *
3693  * @remark The returned list should be freed with @c eina_list_free() when you
3694  * no longer need it.
3695  *
3696  * @remark This is a duplicate of the list kept by the box internally.
3697  *       It's up to the user to destroy it when it no longer needs it.
3698  *       It's possible to remove objects from the box when walking
3699  *       this list, but these removals won't be reflected on it.
3700  */
3701 EAPI Eina_List                 *evas_object_box_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3702
3703 #include "canvas/evas_box.eo.legacy.h"
3704
3705 /**
3706  * @}
3707  */
3708
3709 /**
3710  * @ingroup Evas_Object_Table
3711  *
3712  * @{
3713  */
3714 /**
3715  * @brief Create a new table.
3716  *
3717  * @if MOBILE @since_tizen 2.3
3718  * @elseif WEARABLE @since_tizen 2.3.1
3719  * @endif
3720  *
3721  * @param[in] evas Canvas in which table will be added.
3722  */
3723 EAPI Evas_Object                       *evas_object_table_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3724
3725 /**
3726  * @brief Get the child of the table at the given coordinates
3727  *
3728  * @if MOBILE @since_tizen 2.3
3729  * @elseif WEARABLE @since_tizen 2.3.1
3730  * @endif
3731  *
3732  * @param[in] o The given Evas object.
3733  * @param[in] col The number of col.
3734  * @param[in] row The number of row.
3735  *
3736  * @remark This does not take into account col/row spanning
3737  */
3738 EAPI Evas_Object                       *evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1);
3739
3740 #include "canvas/evas_table.eo.legacy.h"
3741
3742 /**
3743  * @}
3744  */
3745
3746 /**
3747  * @addtogroup Evas_Object_Grid
3748  *
3749  * @{
3750  */
3751 /**
3752  * @brief Create a new grid.
3753  *
3754  * @if MOBILE @since_tizen 2.3
3755  * @elseif WEARABLE @since_tizen 2.3.1
3756  * @endif
3757  *
3758  * @param[in] evas Canvas in which grid will be added.
3759  *
3760  * @remark It's set to a virtual size of 1x1 by default and add children with
3761  * evas_object_grid_pack().
3762  * @since 1.1
3763  */
3764 EAPI Evas_Object   *evas_object_grid_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3765
3766 #include "canvas/evas_grid.eo.legacy.h"
3767
3768 /**
3769  * @}
3770  */
3771
3772 /**
3773  *
3774  * Adds an output to the canvas
3775  *
3776  * @parem e The canvas to add the output to
3777  * @return The output
3778  *
3779  * @see evas_out_engine_info_set
3780  * @see evas_output_viewport_set
3781  * @see evas_output_size_set
3782  *
3783  * @since 1.8
3784  */
3785 EAPI Evas_Out *evas_out_add(Evas *e);
3786
3787 /**
3788  *
3789  * Deletes an output
3790  *
3791  * @parem evo The output object
3792  *
3793  * @see evas_out_add
3794  *
3795  * @since 1.8
3796  *
3797  */
3798 EAPI void evas_output_del(Evas_Out *evo);
3799
3800 #include "canvas/evas_out.eo.legacy.h"