2 # error You shall not include this header directly
5 /////////////////////////////////////////////////////////////////
6 // TIZEN_ONLY(20150112): Add dummy APIs to fix build failure.
7 /////////////////////////////////////////////////////////////////
8 EAPI void evas_font_reinit(void);
9 /////////////////////////////////////////////////////////////////
12 * @addtogroup Evas_Canvas
17 * @brief Creates a new empty evas.
19 * @if MOBILE @since_tizen 2.3
20 * @elseif WEARABLE @since_tizen 2.3.1
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 .
30 * @remark This function should only fail if the memory allocation fails
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
37 * @attention it is recommended that one calls Evas Initialization function before
38 * creating new canvas.
40 * @return A new uninitialised Evas canvas on success. Otherwise, @c NULL.
42 EAPI Evas *evas_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
45 * @brief Frees the given evas and any objects created on it.
47 * @if MOBILE @since_tizen 2.3
48 * @elseif WEARABLE @since_tizen 2.3.1
51 * @remark Any objects with 'free' callbacks will have those callbacks called
54 * @param[in] e The given evas.
57 EAPI void evas_free(Evas *e) EINA_ARG_NONNULL(1);
59 #include "canvas/evas_canvas.eo.legacy.h"
67 * @addtogroup Evas_Canvas_Events
73 * @brief Add (register) a callback function to a given canvas event.
75 * @if MOBILE @since_tizen 2.3
76 * @elseif WEARABLE @since_tizen 2.3.1
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
83 * @param[in] data The data pointer to be passed to @p func
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
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.
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.
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.
115 * @dontinclude evas-events.c
116 * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE
117 * @until two canvas event callbacks
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
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.
130 * @remark See the full @ref Example_Evas_Events "example".
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.
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);
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
145 * @if MOBILE @since_tizen 2.3
146 * @elseif WEARABLE @since_tizen 2.3.1
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
154 * @param[in] data The data pointer to be passed to @p func
156 * @see evas_event_callback_add
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);
162 * @brief Delete a callback function from the canvas.
164 * @if MOBILE @since_tizen 2.3
165 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
184 * void focus_in_callback(void *data, Evas *e, void *event_info);
186 * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback);
189 EAPI void *evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
192 * @brief Delete (unregister) a callback function registered to a given
195 * @if MOBILE @since_tizen 2.3
196 * @elseif WEARABLE @since_tizen 2.3.1
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
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
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.
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);
220 * @remark See the full @ref Example_Evas_Events "example".
222 * @remark For deletion of canvas events callbacks filtering by just
223 * type and function pointer, user evas_event_callback_del().
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);
228 * @brief Push a callback on the post-event callback stack
230 * @if MOBILE @since_tizen 2.3
231 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
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).
254 EAPI void evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
257 * @brief Remove a callback from the post-event callback stack
259 * @if MOBILE @since_tizen 2.3
260 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
271 EAPI void evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func);
274 * @brief Remove a callback from the post-event callback stack
276 * @if MOBILE @since_tizen 2.3
277 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
289 EAPI void evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
296 * @addtogroup Evas_Event_Freezing_Group
302 * @brief Freeze all input events processing.
304 * @if MOBILE @since_tizen 2.3
305 * @elseif WEARABLE @since_tizen 2.3.1
308 * @param[in] e The canvas to freeze input events processing on.
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.
320 * @dontinclude evas-events.c
321 * @skip freeze input for 3 seconds
323 * @dontinclude evas-events.c
324 * @skip let's have our events back
327 * @remark See the full @ref Example_Evas_Events "example".
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.
334 EAPI void evas_event_freeze(Evas *e) EINA_ARG_NONNULL(1);
337 * @brief Thaw a canvas out after freezing (for input events).
339 * @if MOBILE @since_tizen 2.3
340 * @elseif WEARABLE @since_tizen 2.3.1
343 * @param[in] e The canvas to thaw out.
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
351 * @remark See evas_event_freeze() for an example.
353 EAPI void evas_event_thaw(Evas *e) EINA_ARG_NONNULL(1);
356 * @brief Return the freeze count on input events of a given canvas.
358 * @if MOBILE @since_tizen 2.3
359 * @elseif WEARABLE @since_tizen 2.3.1
362 * @param[in] e The canvas to fetch the freeze count from.
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.
375 * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
379 EAPI int evas_event_freeze_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
382 * @brief After thaw of a canvas, re-evaluate the state of objects and call callbacks
384 * @if MOBILE @since_tizen 2.3
385 * @elseif WEARABLE @since_tizen 2.3.1
388 * @param[in] e The canvas to evaluate after a thaw
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.
394 EAPI void evas_event_thaw_eval(Evas *e) EINA_ARG_NONNULL(1);
400 * @ingroup Evas_Font_Group
406 * Free list of font descriptions returned by evas_font_dir_available_list().
408 * @param e The evas instance that returned such list.
409 * @param available the list returned by evas_font_dir_available_list().
411 * @ingroup Evas_Font_Group
413 EAPI void evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
420 * @addtogroup Evas_Object_Group_Basic
426 * @brief Increments object reference count to defer its deletion.
428 * @if MOBILE @since_tizen 2.3
429 * @elseif WEARABLE @since_tizen 2.3.1
432 * @param[in] obj The given Evas object to reference
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.
442 * @see evas_object_unref()
443 * @see evas_object_del()
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.
456 * evas_object_ref(obj);
459 * evas_object_smart_callback_call(obj, SIG_SELECTED, NULL);
460 * // more action here...
461 * evas_object_unref(obj);
466 EAPI void evas_object_ref(Evas_Object *obj);
469 * @brief Decrements object reference count.
471 * @if MOBILE @since_tizen 2.3
472 * @elseif WEARABLE @since_tizen 2.3.1
475 * @param[in] obj The given Evas object to unreference
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.
482 * @see evas_object_ref() (for an example)
483 * @see evas_object_del()
487 EAPI void evas_object_unref(Evas_Object *obj);
490 * @brief Get the object reference count.
492 * @if MOBILE @since_tizen 2.3
493 * @elseif WEARABLE @since_tizen 2.3.1
496 * @param[in] obj The given Evas object to query
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
503 * @see evas_object_ref()
504 * @see evas_object_unref()
505 * @see evas_object_del()
509 EAPI int evas_object_ref_get(const Evas_Object *obj);
512 * @brief Marks the given Evas object for deletion (when Evas will free its
515 * @if MOBILE @since_tizen 2.3
516 * @elseif WEARABLE @since_tizen 2.3.1
519 * @param[in] obj The given Evas object.
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()).
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.
530 * @see evas_object_ref()
531 * @see evas_object_unref()
534 EAPI void evas_object_del(Evas_Object *obj) EINA_ARG_NONNULL(1);
537 * @brief Retrieves the position and (rectangular) size of the given Evas
540 * @if MOBILE @since_tizen 2.3
541 * @elseif WEARABLE @since_tizen 2.3.1
544 * @param[in] obj The given Evas object.
545 * @param[out] x Pointer to an integer in which to store the X coordinate
547 * @param[out] y Pointer to an integer in which to store the Y coordinate
549 * @param[out] w Pointer to an integer in which to store the width of the
551 * @param[out] h Pointer to an integer in which to store the height of the
554 * @remark The position, naturally, will be relative to the top left corner of
555 * the canvas' viewport.
557 * @remark Use @c NULL pointers on the geometry components you're not
558 * interested in: they'll be ignored by the function.
561 * @dontinclude evas-events.c
562 * @skip int w, h, cw, ch;
565 * @remark See the full @ref Example_Evas_Events "example".
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);
572 * Set the position and (rectangular) size of the given Evas object.
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.
580 * The position, naturally, will be relative to the top left corner of
581 * the canvas' viewport.
583 * If the object get moved, the object's ::EVAS_CALLBACK_MOVE callback
586 * If the object get resized, the object's ::EVAS_CALLBACK_RESIZE callback
589 * @see evas_object_move()
590 * @see evas_object_resize()
591 * @see evas_object_geometry_get
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);
599 * @brief Makes the given Evas object visible.
601 * @if MOBILE @since_tizen 2.3
602 * @elseif WEARABLE @since_tizen 2.3.1
605 * @param[in] obj The given Evas object.
607 * @remark Besides becoming visible, the object's ::EVAS_CALLBACK_SHOW
608 * callback will be called.
610 * @see evas_object_hide() for more on object visibility.
611 * @see evas_object_visible_get()
614 EAPI void evas_object_show(Evas_Object *obj) EINA_ARG_NONNULL(1);
617 * @brief Makes the given Evas object invisible.
619 * @if MOBILE @since_tizen 2.3
620 * @elseif WEARABLE @since_tizen 2.3.1
623 * @param[in] obj The given Evas object.
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.
632 * @remark Besides becoming hidden, @p obj object's ::EVAS_CALLBACK_SHOW
633 * callback will be called.
635 * @remark All objects are created in the hidden state! If you want them
636 * shown, use evas_object_show() after their creation.
638 * @see evas_object_show()
639 * @see evas_object_visible_get()
642 * @dontinclude evas-object-manipulation.c
643 * @skip if (evas_object_visible_get(d.clipper))
646 * @remark See the full @ref Example_Evas_Object_Manipulation "example".
649 EAPI void evas_object_hide(Evas_Object *obj) EINA_ARG_NONNULL(1);
653 * @brief Sets the general/main color of the given Evas object to the given
656 * @if MOBILE @since_tizen 2.3
657 * @elseif WEARABLE @since_tizen 2.3.1
660 * @see evas_object_color_get() (for an example)
661 * @remark These color values are expected to be premultiplied by @p a.
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.
669 EAPI void evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a);
672 * @brief Retrieves the general/main color of the given Evas object.
674 * @if MOBILE @since_tizen 2.3
675 * @elseif WEARABLE @since_tizen 2.3.1
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.
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.
689 * @remark All newly created Evas rectangles get the default color
690 * values of <code>255 255 255 255</code> (opaque white).
692 * @remark Use @c NULL pointers on the components you're not interested
693 * in: they'll be ignored by the function.
696 * @dontinclude evas-object-manipulation.c
697 * @skip int alpha, r, g, b;
700 * @remark See the full @ref Example_Evas_Object_Manipulation "example".
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.
708 EAPI void evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a);
711 * @brief Move the given Evas object to the given location inside its canvas' viewport.
713 * @if MOBILE @since_tizen 2.3
714 * @elseif WEARABLE @since_tizen 2.3.1
717 * @param[in] obj The given Evas object.
721 EAPI void evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
724 * @brief Changes the size of the given Evas object.
726 * @if MOBILE @since_tizen 2.3
727 * @elseif WEARABLE @since_tizen 2.3.1
730 * @param[in] obj The given Evas object.
734 EAPI void evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
737 * @brief Retrieves whether or not the given Evas object is visible.
739 * @if MOBILE @since_tizen 2.3
740 * @elseif WEARABLE @since_tizen 2.3.1
744 EAPI Eina_Bool evas_object_visible_get(const Evas_Object *obj);
747 #include "canvas/evas_common_interface.eo.legacy.h"
748 #include "canvas/evas_object.eo.legacy.h"
755 * @addtogroup Evas_Object_Group_Events
761 * @brief Add (register) a callback function to a given Evas object event.
763 * @if MOBILE @since_tizen 2.3
764 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
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.
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.
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.
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:
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
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,
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).
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).
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).
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
862 * - #EVAS_CALLBACK_MULTI_DOWN: @p event_info is a pointer to an
863 * #Evas_Event_Multi_Down struct
865 * - #EVAS_CALLBACK_MULTI_UP: @p event_info is a pointer to an
866 * #Evas_Event_Multi_Up struct
868 * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an
869 * #Evas_Event_Multi_Move struct
871 * - #EVAS_CALLBACK_AXIS_UPDATE: @p event_info is a pointer to an
872 * #Evas_Event_Axis_Update struct
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.
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
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.
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.
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.
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().
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().
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
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.
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.
928 * - #EVAS_CALLBACK_DEL: @p event_info is @c NULL.
930 * - #EVAS_CALLBACK_HOLD: @p event_info is a pointer to an
931 * #Evas_Event_Hold struct
933 * - #EVAS_CALLBACK_CHANGED_SIZE_HINTS: @p event_info is @c NULL.
935 * - #EVAS_CALLBACK_IMAGE_PRELOADED: @p event_info is @c NULL.
937 * - #EVAS_CALLBACK_IMAGE_UNLOADED: @p event_info is @c NULL.
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.
946 * @dontinclude evas-events.c
947 * @skip evas_object_event_callback_add(
950 * @remark See the full example @ref Example_Evas_Events "here".
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);
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
960 * @if MOBILE @since_tizen 2.3
961 * @elseif WEARABLE @since_tizen 2.3.1
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
970 * @see evas_object_event_callback_add
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);
976 * @brief Delete a callback function from an object
978 * @if MOBILE @since_tizen 2.3
979 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
996 * extern Evas_Object *object;
998 * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
1000 * my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback);
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);
1006 * @brief Delete (unregister) a callback function registered to a given
1007 * Evas object event.
1009 * @if MOBILE @since_tizen 2.3
1010 * @elseif WEARABLE @since_tizen 2.3.1
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
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
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.
1028 * @remark For deletion of Evas object events callbacks filtering by
1029 * just type and function pointer, use
1030 * evas_object_event_callback_del().
1034 * extern Evas_Object *object;
1036 * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
1038 * my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data);
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);
1048 * @addtogroup Evas_Object_Group_Extras
1054 * @brief Set an attached data pointer to an object with a given string key.
1056 * @if MOBILE @since_tizen 2.3
1057 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
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.
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.
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.
1088 * extern Evas_Object *obj;
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"));
1095 EAPI void evas_object_data_set(Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2);
1098 * @brief Return an attached data pointer on an Evas object by its given
1101 * @if MOBILE @since_tizen 2.3
1102 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
1123 * extern Evas_Object *obj;
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");
1130 EAPI void *evas_object_data_get(const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
1133 * @brief Delete an attached data pointer from an object.
1135 * @if MOBILE @since_tizen 2.3
1136 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
1151 * extern Evas_Object *obj;
1153 * my_data = evas_object_data_del(obj, "name_of_my_data");
1156 EAPI void *evas_object_data_del(Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
1164 * @ingroup Evas_Object_Group_Find
1170 * Retrieve the Evas object stacked at the top at the position of the
1171 * mouse cursor, over a given canvas
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
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.
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
1185 EAPI Evas_Object *evas_object_top_at_pointer_get(const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1193 * @ingroup Evas_Object_Group_Interceptors
1199 * Set the callback function that intercepts a show event of an object.
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.
1205 * This function sets a callback function to intercepts a show event
1206 * of a canvas object.
1208 * @see evas_object_intercept_show_callback_del().
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);
1214 * Unset the callback function that intercepts a show event of a object.
1216 * @param obj The given canvas object pointer.
1217 * @param func The given callback function.
1219 * This function sets a callback function to intercepts a show event
1220 * of a canvas object.
1222 * @see evas_object_intercept_show_callback_add().
1225 EAPI void *evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2);
1228 * Set the callback function that intercepts a hide event of a object.
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.
1234 * This function sets a callback function to intercepts a hide event
1235 * of a canvas object.
1237 * @see evas_object_intercept_hide_callback_del().
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);
1243 * Unset the callback function that intercepts a hide event of a object.
1245 * @param obj The given canvas object pointer.
1246 * @param func The given callback function.
1248 * This function sets a callback function to intercepts a hide event
1249 * of a canvas object.
1251 * @see evas_object_intercept_hide_callback_add().
1254 EAPI void *evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2);
1257 * Set the callback function that intercepts a move event of an object.
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.
1263 * This function sets a callback function to intercepts a move event
1264 * of a canvas object.
1266 * @see evas_object_intercept_move_callback_del().
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);
1272 * Unset the callback function that intercepts a move event of an object.
1274 * @param obj The given canvas object pointer.
1275 * @param func The given callback function.
1277 * This function sets a callback function to intercepts a move event
1278 * of a canvas object.
1280 * @see evas_object_intercept_move_callback_add().
1283 EAPI void *evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2);
1286 * Set the callback function that intercepts a resize event of an object.
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.
1292 * This function sets a callback function to intercepts a resize event
1293 * of a canvas object.
1295 * @see evas_object_intercept_resize_callback_del().
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);
1301 * Unset the callback function that intercepts a resize event of an object.
1303 * @param obj The given canvas object pointer.
1304 * @param func The given callback function.
1306 * This function sets a callback function to intercepts a resize event
1307 * of a canvas object.
1309 * @see evas_object_intercept_resize_callback_add().
1312 EAPI void *evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2);
1315 * Set the callback function that intercepts a raise event of an object.
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.
1321 * This function sets a callback function to intercepts a raise event
1322 * of a canvas object.
1324 * @see evas_object_intercept_raise_callback_del().
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);
1330 * Unset the callback function that intercepts a raise event of an object.
1332 * @param obj The given canvas object pointer.
1333 * @param func The given callback function.
1335 * This function sets a callback function to intercepts a raise event
1336 * of a canvas object.
1338 * @see evas_object_intercept_raise_callback_add().
1341 EAPI void *evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2);
1344 * Set the callback function that intercepts a lower event of an object.
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.
1350 * This function sets a callback function to intercepts a lower event
1351 * of a canvas object.
1353 * @see evas_object_intercept_lower_callback_del().
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);
1359 * Unset the callback function that intercepts a lower event of an object.
1361 * @param obj The given canvas object pointer.
1362 * @param func The given callback function.
1364 * This function sets a callback function to intercepts a lower event
1365 * of a canvas object.
1367 * @see evas_object_intercept_lower_callback_add().
1370 EAPI void *evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2);
1373 * Set the callback function that intercepts a stack above event of an object.
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.
1379 * This function sets a callback function to intercepts a stack above event
1380 * of a canvas object.
1382 * @see evas_object_intercept_stack_above_callback_del().
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);
1388 * Unset the callback function that intercepts a stack above event of an object.
1390 * @param obj The given canvas object pointer.
1391 * @param func The given callback function.
1393 * This function sets a callback function to intercepts a stack above event
1394 * of a canvas object.
1396 * @see evas_object_intercept_stack_above_callback_add().
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);
1402 * Set the callback function that intercepts a stack below event of an object.
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.
1408 * This function sets a callback function to intercepts a stack below event
1409 * of a canvas object.
1411 * @see evas_object_intercept_stack_below_callback_del().
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);
1417 * Unset the callback function that intercepts a stack below event of an object.
1419 * @param obj The given canvas object pointer.
1420 * @param func The given callback function.
1422 * This function sets a callback function to intercepts a stack below event
1423 * of a canvas object.
1425 * @see evas_object_intercept_stack_below_callback_add().
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);
1431 * Set the callback function that intercepts a layer set event of an object.
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.
1437 * This function sets a callback function to intercepts a layer set event
1438 * of a canvas object.
1440 * @see evas_object_intercept_layer_set_callback_del().
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);
1446 * Unset the callback function that intercepts a layer set event of an object.
1448 * @param obj The given canvas object pointer.
1449 * @param func The given callback function.
1451 * This function sets a callback function to intercepts a layer set event
1452 * of a canvas object.
1454 * @see evas_object_intercept_layer_set_callback_add().
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);
1460 * Set the callback function that intercepts a color set event of an object.
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.
1466 * This function sets a callback function to intercepts a color set event
1467 * of a canvas object.
1469 * @see evas_object_intercept_color_set_callback_del().
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);
1475 * Unset the callback function that intercepts a color set event of an object.
1477 * @param obj The given canvas object pointer.
1478 * @param func The given callback function.
1480 * This function sets a callback function to intercepts a color set event
1481 * of a canvas object.
1483 * @see evas_object_intercept_color_set_callback_add().
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);
1489 * Set the callback function that intercepts a clip set event of an object.
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.
1495 * This function sets a callback function to intercepts a clip set event
1496 * of a canvas object.
1498 * @see evas_object_intercept_clip_set_callback_del().
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);
1504 * Unset the callback function that intercepts a clip set event of an object.
1506 * @param obj The given canvas object pointer.
1507 * @param func The given callback function.
1509 * This function sets a callback function to intercepts a clip set event
1510 * of a canvas object.
1512 * @see evas_object_intercept_clip_set_callback_add().
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);
1518 * Set the callback function that intercepts a clip unset event of an object.
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.
1524 * This function sets a callback function to intercepts a clip unset event
1525 * of a canvas object.
1527 * @see evas_object_intercept_clip_unset_callback_del().
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);
1533 * Unset the callback function that intercepts a clip unset event of an object.
1535 * @param obj The given canvas object pointer.
1536 * @param func The given callback function.
1538 * This function sets a callback function to intercepts a clip unset event
1539 * of a canvas object.
1541 * @see evas_object_intercept_clip_unset_callback_add().
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);
1547 * Set the callback function that intercepts a focus set event of an object.
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.
1553 * This function sets a callback function to intercepts a focus set event
1554 * of a canvas object.
1556 * @see evas_object_intercept_focus_set_callback_del().
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);
1562 * Unset the callback function that intercepts a focus set event of an object.
1564 * @param obj The given canvas object pointer.
1565 * @param func The given callback function.
1567 * This function sets a callback function to intercepts a focus set event
1568 * of a canvas object.
1570 * @see evas_object_intercept_focus_set_callback_add().
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);
1580 * @addtogroup Evas_Object_Rectangle
1586 * @brief Adds a rectangle to the given evas.
1587 * @param[in] e The given evas.
1589 * @if MOBILE @since_tizen 2.3
1590 * @elseif WEARABLE @since_tizen 2.3.1
1593 * @return The new rectangle object.
1595 * @ingroup Evas_Object_Rectangle
1597 EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1599 #include "canvas/evas_rectangle.eo.legacy.h"
1607 * @defgroup Evas_Object_Vg
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.
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).
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.
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.
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.
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.
1632 * Enabling graphical shapes to be constructed and reused.
1634 * Below are the list of feature currently supported by Vector object.
1636 * @li Drawing SVG Path.
1637 * You can construct a path by using api in efl_gfx_utils.h
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
1643 * @li Transformation support for path and gradient fill. You can apply
1644 affin transformation on path object.
1647 * @note Below are the list of interface, classes can be used to draw vector
1648 * graphics using vector object.
1653 * @li Efl.Gfx.Gradient
1654 * @li Efl.Gfx.Gradient_Radial
1655 * @li Efl.Gfx.Gradient_Linear
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);
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));
1677 #ifdef EFL_BETA_API_SUPPORT
1680 * Creates a new vector object on the given Evas @p e canvas.
1682 * @param e The given canvas.
1683 * @return The created vector object handle.
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
1689 * @see evas_obj_vg_root_node_get()
1692 EAPI Evas_Object *evas_object_vg_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1694 #include "canvas/evas_vg.eo.legacy.h"
1697 * Creates a new vector shape object \.
1699 * @param parent The given vector container object.
1700 * @return The created vector shape object handle.
1704 EAPI Efl_VG* evas_vg_shape_add(Efl_VG *parent);
1707 * Creates a new vector container object \.
1709 * @param parent The given vector container object.
1710 * @return The created vector container object handle.
1715 EAPI Efl_VG* evas_vg_container_add(Efl_VG *parent);
1719 * Retrieves whether or not the given Efl_Vg object is visible.
1723 EAPI Eina_Bool evas_vg_node_visible_get(Eo *obj);
1727 * Makes the given Efl_Vg object visible or invisible.
1729 * @param[in] v @c EINA_TRUE if to make the object visible, @c EINA_FALSE otherwise
1732 EAPI void evas_vg_node_visible_set(Eo *obj, Eina_Bool v);
1736 * Retrieves the general/main color of the given Efl_Vg object.
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.
1745 * @note Use @c NULL pointers on the components you're not interested
1746 * in: they'll be ignored by the function.
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.
1754 EAPI void evas_vg_node_color_get(Eo *obj, int *r, int *g, int *b, int *a);
1758 * Sets the general/main color of the given Efl_Vg object to the given
1761 * @see evas_vg_node_color_get() (for an example)
1762 * @note These color values are expected to be premultiplied by @p a.
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.
1770 EAPI void evas_vg_node_color_set(Eo *obj, int r, int g, int b, int a);
1774 * Retrieves the geometry of the given Efl_Vg object.
1782 EAPI void evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h);
1786 * Changes the geometry of the given Efl_Vg object.
1794 EAPI void evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h);
1798 * Stack @p obj immediately below @p below
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.
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).
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
1813 * Similarly, if @p obj is not a member of a smart object, @p below
1814 * must not be either.
1816 * @see evas_object_layer_get()
1817 * @see evas_object_layer_set()
1818 * @see evas_object_stack_below()
1821 * @param[in] below the object below which to stack
1824 EAPI void evas_vg_node_stack_below(Eo *obj, Eo *below);
1828 * Stack @p obj immediately above @p above
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.
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).
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
1843 * Similarly, if @p obj is not a member of a smart object, @p above
1844 * must not be either.
1846 * @see evas_object_layer_get()
1847 * @see evas_object_layer_set()
1848 * @see evas_object_stack_below()
1851 * @param[in] above the object above which to stack
1854 EAPI void evas_vg_node_stack_above(Eo *obj, Eo *above);
1858 * Raise @p obj to the top of its layer.
1860 * @p obj will, then, be the highest one in the layer it belongs
1861 * to. Object on other layers won't get touched.
1863 * @see evas_object_stack_above()
1864 * @see evas_object_stack_below()
1865 * @see evas_object_lower()
1868 EAPI void evas_vg_node_raise(Eo *obj);
1872 * Lower @p obj to the bottom of its layer.
1874 * @p obj will, then, be the lowest one in the layer it belongs
1875 * to. Objects on other layers won't get touched.
1877 * @see evas_object_stack_above()
1878 * @see evas_object_stack_below()
1879 * @see evas_object_raise()
1884 EAPI void evas_vg_node_lower(Eo *obj);
1886 #include "canvas/efl_vg_base.eo.legacy.h"
1890 * Get the stroke scaling factor used for stroking this path.
1895 EAPI double evas_vg_shape_stroke_scale_get(Eo *obj);
1899 * Sets the stroke scale to be used for stroking the path.
1900 * the scale property will be used along with stroke width property.
1903 * @param[in] s stroke scale value
1906 EAPI void evas_vg_shape_stroke_scale_set(Eo *obj, double s);
1910 * Gets the color used for stroking the path.
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.
1919 EAPI void evas_vg_shape_stroke_color_get(Eo *obj, int *r, int *g, int *b, int *a);
1923 * Sets the color to be used for stroking the path.
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.
1932 EAPI void evas_vg_shape_stroke_color_set(Eo *obj, int r, int g, int b, int a);
1936 * Gets the stroke width to be used for stroking the path.
1941 EAPI double evas_vg_shape_stroke_width_get(Eo *obj);
1945 * Sets the stroke width to be used for stroking the path.
1948 * @param[in] w stroke width to be used
1951 EAPI void evas_vg_shape_stroke_width_set(Eo *obj, double w);
1959 EAPI double evas_vg_shape_stroke_location_get(Eo *obj);
1965 * @param[in] centered
1968 EAPI void evas_vg_shape_stroke_location_set(Eo *obj, double centered);
1975 * @param[out] length
1978 EAPI void evas_vg_shape_stroke_dash_get(Eo *obj, const Efl_Gfx_Dash **dash, unsigned int *length);
1988 EAPI void evas_vg_shape_stroke_dash_set(Eo *obj, const Efl_Gfx_Dash *dash, unsigned int length);
1992 * Gets the cap style used for stroking path.
1997 EAPI Efl_Gfx_Cap evas_vg_shape_stroke_cap_get(Eo *obj);
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
2008 * @param[in] c cap style to use , default is EFL_GFX_CAP_BUTT
2011 EAPI void evas_vg_shape_stroke_cap_set(Eo *obj, Efl_Gfx_Cap c);
2015 * Gets the join style used for stroking path.
2020 EAPI Efl_Gfx_Join evas_vg_shape_stroke_join_get(Eo *obj);
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.
2031 * @param[in] j join style to use , default is
2035 EAPI void evas_vg_shape_stroke_join_set(Eo *obj, Efl_Gfx_Join j);
2039 * Set the list of commands and points to be used to create the
2042 * @note see efl_gfx_path interface for how to create a command list.
2043 * @see Efl_Gfx_Path_Command
2046 * @param[in] op command list
2047 * @param[in] points point list
2050 EAPI void evas_vg_shape_shape_path_set(Eo *obj, const Efl_Gfx_Path_Command *op, const double *points);
2054 * Gets the command and points list
2057 * @param[out] op command list
2058 * @param[out] points point list
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);
2069 * Copy the shape data from the object specified .
2074 * @param[in] dup_from Shape object from where data will be copied.
2077 EAPI void evas_vg_shape_shape_dup(Eo *obj, Eo *dup_from);
2081 * Reset the shape data of the shape object.
2088 EAPI void evas_vg_shape_shape_reset(Eo *obj);
2092 * Moves the current point to the given point,
2093 * implicitly starting a new subpath and closing the previous one.
2095 * @see efl_gfx_path_append_close()
2099 * @param[in] x X co-ordinate of the current point.
2100 * @param[in] y Y co-ordinate of the current point.
2103 EAPI void evas_vg_shape_shape_append_move_to(Eo *obj, double x, double y);
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.
2111 * @note if no current position present, it draws a line to itself, basically
2114 * @see efl_gfx_path_append_move_to()
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.
2122 EAPI void evas_vg_shape_shape_append_line_to(Eo *obj, double x, double y);
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.
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.
2140 EAPI void evas_vg_shape_shape_append_quadratic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y);
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.
2147 * @see efl_gfx_path_append_quadratic_to()
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.
2155 EAPI void evas_vg_shape_shape_append_squadratic_to(Eo *obj, double x, double y);
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.
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.
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);
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.
2182 * @see efl_gfx_path_append_cubic_to()
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.
2193 EAPI void evas_vg_shape_shape_append_scubic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y);
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) .
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()
2204 * @see efl_gfx_path_append_arc()
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.
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);
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.
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.
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);
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
2242 * @note If the subpath does not contain any points, this function does nothing.
2249 EAPI void evas_vg_shape_shape_append_close(Eo *obj);
2253 * Append a circle with given center and radius.
2255 * @see efl_gfx_path_append_arc()
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.
2264 EAPI void evas_vg_shape_shape_append_circle(Eo *obj, double x, double y, double radius);
2268 * Append the given rectangle with rounded corner to the path.
2270 * The xr and yr arguments specify the radii of the ellipses defining the
2271 * corners of the rounded rectangle.
2273 * @note xr and yr are specified in terms of width and height respectively.
2275 * @note if xr and yr are 0, then it will draw a rectangle without rounded corner.
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 ]
2288 EAPI void evas_vg_shape_shape_append_rect(Eo *obj, double x, double y, double w, double h, double rx, double ry);
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);
2294 #include "canvas/efl_vg_shape.eo.legacy.h"
2298 * Set the list of color stops for the gradient
2301 * @param[in] colors color stops list
2302 * @param[in] length length of the list
2305 EAPI void evas_vg_gradient_stop_set(Eo *obj, const Efl_Gfx_Gradient_Stop *colors, unsigned int length);
2309 * get the list of color stops.
2312 * @param[out] colors color stops list
2313 * @param[out] length length of the list
2316 EAPI void evas_vg_gradient_stop_get(Eo *obj, const Efl_Gfx_Gradient_Stop **colors, unsigned int *length);
2320 * Specifies the spread method that should be used for this gradient.
2323 * @param[in] s spread type to be used
2326 EAPI void evas_vg_gradient_spread_set(Eo *obj, Efl_Gfx_Gradient_Spread s);
2330 * Returns the spread method use by this gradient. The default is
2331 * EFL_GFX_GRADIENT_SPREAD_PAD.
2336 EAPI Efl_Gfx_Gradient_Spread evas_vg_gradient_spread_get(Eo *obj);
2338 #include "canvas/efl_vg_gradient.eo.legacy.h"
2342 * Sets the start point of this linear gradient.
2344 * @param[in] x x co-ordinate of start point
2345 * @param[in] y y co-ordinate of start point
2348 EAPI void evas_vg_gradient_linear_start_set(Eo *obj, double x, double y);
2352 * Gets the start point of this linear gradient.
2354 * @param[out] x x co-ordinate of start point
2355 * @param[out] y y co-ordinate of start point
2358 EAPI void evas_vg_gradient_linear_start_get(Eo *obj, double *x, double *y);
2362 * Sets the end point of this linear gradient.
2364 * @param[in] x x co-ordinate of end point
2365 * @param[in] y y co-ordinate of end point
2368 EAPI void evas_vg_gradient_linear_end_set(Eo *obj, double x, double y);
2372 * Gets the end point of this linear gradient.
2374 * @param[out] x x co-ordinate of end point
2375 * @param[out] y y co-ordinate of end point
2378 EAPI void evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y);
2380 #include "canvas/efl_vg_gradient_linear.eo.legacy.h"
2384 * Sets the center of this radial gradient.
2386 * @param[in] x x co-ordinate of center point
2387 * @param[in] y y co-ordinate of center point
2390 EAPI void evas_vg_gradient_radial_center_set(Eo *obj, double x, double y);
2394 * Gets the center of this radial gradient.
2396 * @param[out] x x co-ordinate of center point
2397 * @param[out] y y co-ordinate of center point
2400 EAPI void evas_vg_gradient_radial_center_get(Eo *obj, double *x, double *y);
2404 * Sets the center radius of this radial gradient.
2406 * @param[in] r center radius
2409 EAPI void evas_vg_gradient_radial_radius_set(Eo *obj, double r);
2413 * Gets the center radius of this radial gradient.
2417 EAPI double evas_vg_gradient_radial_radius_get(Eo *obj);
2421 * Sets the focal point of this radial gradient.
2423 * @param[in] x x co-ordinate of focal point
2424 * @param[in] y y co-ordinate of focal point
2427 EAPI void evas_vg_gradient_radial_focal_set(Eo *obj, double x, double y);
2431 * Gets the focal point of this radial gradient.
2433 * @param[out] x x co-ordinate of focal point
2434 * @param[out] y y co-ordinate of focal point
2437 EAPI void evas_vg_gradient_radial_focal_get(Eo *obj, double *x, double *y);
2439 #include "canvas/efl_vg_gradient_radial.eo.legacy.h"
2448 * @ingroup Evas_Object_Image
2453 * @brief Creates a new image object on the given Evas @p e canvas.
2455 * @if MOBILE @since_tizen 2.3
2456 * @elseif WEARABLE @since_tizen 2.3.1
2459 * @param[in] e The given canvas.
2460 * @return The created image object handle.
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.
2470 * @see evas_object_image_fill_set()
2474 * img = evas_object_image_add(canvas);
2475 * evas_object_image_file_set(img, "/path/to/img", NULL);
2478 EAPI Evas_Object *evas_object_image_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2481 * @brief Creates a new image object that @b automatically scales its bound
2482 * image to the object's area, on both axis.
2484 * @if MOBILE @since_tizen 2.3
2485 * @elseif WEARABLE @since_tizen 2.3.1
2488 * @param[in] e The given canvas.
2489 * @return The created image object handle.
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.
2495 * @remark Whenever this object gets resized, the bound image will be
2498 * @see evas_object_image_add()
2499 * @see evas_object_image_filled_set()
2500 * @see evas_object_image_fill_set()
2502 EAPI Evas_Object *evas_object_image_filled_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2505 * @brief Sets the data for an image from memory to be loaded
2507 * @if MOBILE @since_tizen 2.3
2508 * @elseif WEARABLE @since_tizen 2.3.1
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().
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.
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.
2531 EAPI void evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2);
2534 * @brief Set the native surface of a given image of the canvas
2536 * @if MOBILE @since_tizen 2.3
2537 * @elseif WEARABLE @since_tizen 2.3.1
2540 * @param[in] obj The given canvas pointer.
2541 * @param[in] surf The new native surface.
2543 * @remark This function sets a native surface of a given canvas image.
2546 EAPI void evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2);
2549 * @brief Preload an image object's image data in the background
2551 * @if MOBILE @since_tizen 2.3
2552 * @elseif WEARABLE @since_tizen 2.3.1
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).
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).
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).
2567 * @remark Use @c EINA_TRUE for @p cancel on scenarios where you don't need
2568 * the image data preloaded anymore.
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.
2577 EAPI void evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
2580 * @brief Clear the source object on a proxy image object.
2582 * @if MOBILE @since_tizen 2.3
2583 * @elseif WEARABLE @since_tizen 2.3.1
2586 * @param[in] obj Image object to clear source of.
2587 * @return @c EINA_TRUE on success, @c EINA_FALSE on error.
2589 * @remark This is equivalent to calling evas_object_image_source_set() with a
2592 EAPI Eina_Bool evas_object_image_source_unset(Evas_Object *obj) EINA_ARG_NONNULL(1);
2595 * @brief Enable an image to be used as an alpha mask.
2597 * @if MOBILE @since_tizen 2.3
2598 * @elseif WEARABLE @since_tizen 2.3.1
2601 * @remark This will set any flags, and discard any excess image data not used as an
2604 * @remark Note there is little point in using a image as alpha mask unless it has an
2607 * @param[in] obj Object to use as an alpha mask.
2608 * @param[in] ismask Use image as alphamask, must be true.
2610 EAPI void evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1);
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).
2617 * @if MOBILE @since_tizen 2.3
2618 * @elseif WEARABLE @since_tizen 2.3.1
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
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)
2632 * fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
2633 * valid_path, evas_load_error_str(err));
2637 * evas_object_image_fill_set(img, 0, 0, w, h);
2638 * evas_object_resize(img, w, h);
2639 * evas_object_show(img);
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
2647 EAPI void evas_object_image_file_set(Eo *obj, const char *file, const char *key);
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).
2653 * @if MOBILE @since_tizen 2.3
2654 * @elseif WEARABLE @since_tizen 2.3.1
2657 * @remark You must @b not modify the strings on the returned pointers.
2659 * @remark Use @c NULL pointers on the file components you're not
2660 * interested in: they'll be ignored by the function.
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
2666 EAPI void evas_object_image_file_get(const Eo *obj, const char **file, const char **key);
2671 * Set the source mmaped file from where an image object must fetch the real
2672 * image data (it must be an Eina_File).
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
2680 * @param[in] f The mmaped file
2681 * @param[in] key The image key in @p file (if its an Eet one), or @c
2684 EAPI void evas_object_image_mmap_set(Eo *obj, const Eina_File *f, const char *key);
2689 * Get the source mmaped file from where an image object must fetch the real
2690 * image data (it must be an Eina_File).
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
2698 * @param[out] f The mmaped file
2699 * @param[out] key The image key in @p file (if its an Eet one), or @c
2702 EAPI void evas_object_image_mmap_get(const Eo *obj, const Eina_File **f, const char **key);
2706 * Save the given image object's contents to an (image) file.
2708 * @if MOBILE @since_tizen 2.3
2709 * @elseif WEARABLE @since_tizen 2.3.1
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.
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"
2721 * @param[in] file The filename to be used to save the image (extension
2723 * @param[in] key The image key in the file (if an Eet one), or @c NULL,
2725 * @param[in] flags String containing the flags to be used (@c NULL for
2728 EAPI Eina_Bool evas_object_image_save(const Eo *obj, const char *file, const char *key, const char *flags) EINA_ARG_NONNULL(2);
2731 * @brief Check if an image object can be animated (have multiple frames)
2733 * @if MOBILE @since_tizen 2.3
2734 * @elseif WEARABLE @since_tizen 2.3.1
2737 * @return whether obj support animation
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.
2745 * extern Evas_Object *obj;
2747 * if (evas_object_image_animated_get(obj))
2751 * Evas_Image_Animated_Loop_Hint loop_type;
2754 * frame_count = evas_object_image_animated_frame_count_get(obj);
2755 * printf("This image has %d frames\n",frame_count);
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");
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);
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");
2769 * printf("Unknown loop type\n");
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");
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()
2785 EAPI Eina_Bool evas_object_image_animated_get(const Eo *obj);
2788 * @brief Set the load size of a given image object's source image.
2790 * @if MOBILE @since_tizen 2.3
2791 * @elseif WEARABLE @since_tizen 2.3.1
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.
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.
2801 * @see evas_object_image_load_size_get()
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.
2806 EAPI void evas_object_image_load_size_set(Eo *obj, int w, int h);
2809 * @brief Get the load size of a given image object's source image.
2811 * @if MOBILE @since_tizen 2.3
2812 * @elseif WEARABLE @since_tizen 2.3.1
2815 * @remark This function gets the geometry size set manually for the given canvas image.
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.
2823 * @see evas_object_image_load_size_set() for more details
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.
2828 EAPI void evas_object_image_load_size_get(const Eo *obj, int *w, int *h);
2831 * @brief Sets whether to use high-quality image scaling algorithm on the
2832 * given image object.
2834 * @if MOBILE @since_tizen 2.3
2835 * @elseif WEARABLE @since_tizen 2.3.1
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
2843 * @remark Image objects get created originally with smooth scaling @b
2846 * @see evas_object_image_smooth_scale_get()
2848 * @param[in] smooth_scale Whether to use smooth scale or not.
2850 EAPI void evas_object_image_smooth_scale_set(Eo *obj, Eina_Bool smooth_scale);
2853 * @brief Retrieves whether the given image object is using high-quality
2854 * image scaling algorithm.
2856 * @if MOBILE @since_tizen 2.3
2857 * @elseif WEARABLE @since_tizen 2.3.1
2860 * @return Whether smooth scale is being used.
2862 * @remark See @ref evas_object_image_smooth_scale_set() for more details.
2865 EAPI Eina_Bool evas_object_image_smooth_scale_get(const Eo *obj);
2867 #include "canvas/evas_image.eo.legacy.h"
2874 * @addtogroup Evas_Object_Text
2880 * @brief Creates a new text object on the provided canvas.
2882 * @if MOBILE @since_tizen 2.3
2883 * @elseif WEARABLE @since_tizen 2.3.1
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
2890 * @remark Text objects are for simple, single line text elements. If you want
2891 * more elaborated text blocks, see @ref Evas_Object_Textblock.
2893 * @see evas_object_text_font_source_set()
2894 * @see evas_object_text_font_set()
2895 * @see evas_object_text_text_set()
2897 EAPI Evas_Object *evas_object_text_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2900 * @brief Sets the text string to be displayed by the given text object.
2902 * @if MOBILE @since_tizen 2.3
2903 * @elseif WEARABLE @since_tizen 2.3.1
2906 * @see evas_object_text_text_get()
2908 * @param[in] text Text string to display on it.
2910 EAPI void evas_object_text_text_set(Eo *obj, const char *text);
2913 * @brief Retrieves the text string currently being displayed by the given
2916 * @if MOBILE @since_tizen 2.3
2917 * @elseif WEARABLE @since_tizen 2.3.1
2920 * @return The text string currently being displayed on it.
2922 * @remark Do not free() the return value.
2924 * @see evas_object_text_text_set()
2927 EAPI const char *evas_object_text_text_get(const Eo *obj);
2929 #include "canvas/evas_text.eo.legacy.h"
2932 * @brief Set the font (source) file to be used on a given text object.
2934 * @if MOBILE @since_tizen 2.3
2935 * @elseif WEARABLE @since_tizen 2.3.1
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.
2942 * @see evas_object_text_font_get()
2944 * @param[in] font_source The font file's path.
2946 EAPI void evas_object_text_font_source_set(Eo *obj, const char *font_source);
2949 * @brief Get the font file's path which is being used on a given text
2952 * @if MOBILE @since_tizen 2.3
2953 * @elseif WEARABLE @since_tizen 2.3.1
2956 * @return The font file's path.
2958 * @see evas_object_text_font_get() for more details
2961 EAPI const char *evas_object_text_font_source_get(const Eo *obj);
2964 * @brief Set the font family or filename, and size on a given text object.
2966 * @if MOBILE @since_tizen 2.3
2967 * @elseif WEARABLE @since_tizen 2.3.1
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.
2976 * @see evas_object_text_font_get()
2977 * @see evas_object_text_font_source_set()
2979 * @param[in] font The font family name or filename.
2980 * @param[in] size The font size, in points.
2982 EAPI void evas_object_text_font_set(Eo *obj, const char *font, Evas_Font_Size size);
2985 * @brief Retrieve the font family and size in use on a given text object.
2987 * @if MOBILE @since_tizen 2.3
2988 * @elseif WEARABLE @since_tizen 2.3.1
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
2996 * @see evas_object_text_font_set()
2998 * @param[out] font The font family name or filename.
2999 * @param[out] size The font size, in points.
3001 EAPI void evas_object_text_font_get(const Eo *obj, const char **font, Evas_Font_Size *size);
3003 // TIZEN_ONLY(20150513): Add evas_object_text/textblock_ellipsis_status_get internal API.
3007 EAPI Eina_Bool evas_object_text_ellipsis_status_get(const Evas_Object *eo_obj);
3015 * @addtogroup Evas_Object_Textblock
3021 * @brief Adds a textblock to the given evas.
3022 * @param[in] e The given evas.
3024 * @if MOBILE @since_tizen 2.3
3025 * @elseif WEARABLE @since_tizen 2.3.1
3028 * @return The new textblock object.
3030 EAPI Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3033 * @brief Return the plain version of the markup.
3035 * @if MOBILE @since_tizen 2.3
3036 * @elseif WEARABLE @since_tizen 2.3.1
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.
3043 * @param[in] obj The textblock object to work with. (if @c NULL, tries the
3045 * @param[in] text The markup text (if @c NULL, return @c NULL).
3046 * @return An allocated plain text version of the markup.
3049 EAPI char *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
3052 * @brief Return the markup version of the plain text.
3054 * @if MOBILE @since_tizen 2.3
3055 * @elseif WEARABLE @since_tizen 2.3.1
3058 * @remark Replaces \\n -\> \<br/\> \\t -\> \<tab/\> and etc. Generally needed before you pass
3059 * plain text to be set in a textblock.
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.
3067 EAPI char *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
3070 * @brief Clear the textblock object.
3071 * @remark Does *NOT* free the Evas object itself.
3073 * @if MOBILE @since_tizen 2.3
3074 * @elseif WEARABLE @since_tizen 2.3.1
3077 * @param[in] obj the object to clear.
3080 EAPI void evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
3082 // TIZEN_ONLY(20150513): Add evas_object_text/textblock_ellipsis_status_get internal API.
3086 EAPI Eina_Bool evas_object_textblock_ellipsis_status_get(const Evas_Object *eo_obj);
3090 #include "canvas/evas_textblock.eo.legacy.h"
3099 * @ingroup Evas_Object_Grid
3104 * @brief Add a textgrid to the given Evas.
3106 * @param e The given evas.
3107 * @return The new textgrid object.
3109 * This function adds a new textgrid object to the Evas @p e and returns the object.
3113 EAPI Evas_Object *evas_object_textgrid_add(Evas *e);
3115 #include "canvas/evas_textgrid.eo.legacy.h"
3119 * @brief Set the font (source) file to be used on a given textgrid object.
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.
3127 * @see evas_object_textgrid_font_get()
3128 * @see evas_object_textgrid_font_set()
3129 * @see evas_object_textgrid_font_source_get()
3133 * @param[in] font_source The font file's path.
3135 EAPI void evas_object_textgrid_font_source_set(Eo *obj, const char *font_source);
3139 * @brief Get the font file's path which is being used on a given textgrid object.
3141 * @return The font file's path.
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.
3147 * @see evas_object_textgrid_font_get()
3148 * @see evas_object_textgrid_font_set()
3149 * @see evas_object_textgrid_font_source_set()
3154 EAPI const char *evas_object_textgrid_font_source_get(const Eo *obj);
3158 * @brief Set the font family and size on a given textgrid object.
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.
3169 * @see evas_object_textgrid_font_get()
3170 * @see evas_object_textgrid_font_source_set()
3171 * @see evas_object_textgrid_font_source_get()
3175 * @param[in] font_name The font (family) name.
3176 * @param[in] font_size The font size, in points.
3178 EAPI void evas_object_textgrid_font_set(Eo *obj, const char *font_name, Evas_Font_Size font_size);
3182 * @brief Retrieve the font family and size in use on a given textgrid object.
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
3192 * @see evas_object_textgrid_font_set()
3193 * @see evas_object_textgrid_font_source_set()
3194 * @see evas_object_textgrid_font_source_get()
3198 * @param[out] font_name The font (family) name.
3199 * @param[out] font_size The font size, in points.
3201 EAPI void evas_object_textgrid_font_get(const Eo *obj, const char **font_name, Evas_Font_Size *font_size);
3208 * @addtogroup Evas_Line_Group
3213 * @brief Adds a new evas line object to the given evas.
3214 * @param[in] e The given evas.
3216 * @if MOBILE @since_tizen 2.3
3217 * @elseif WEARABLE @since_tizen 2.3.1
3220 * @return The new evas line object.
3222 EAPI Evas_Object *evas_object_line_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3224 #include "canvas/evas_line.eo.legacy.h"
3231 * @addtogroup Evas_Object_Polygon
3236 * @brief Adds a new evas polygon object to the given evas.
3237 * @param[in] e The given evas.
3239 * @if MOBILE @since_tizen 2.3
3240 * @elseif WEARABLE @since_tizen 2.3.1
3243 * @return A new evas polygon object.
3245 EAPI Evas_Object *evas_object_polygon_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3247 #include "canvas/evas_polygon.eo.legacy.h"
3254 * @addtogroup Evas_Smart_Object_Group
3259 * @brief Instantiates a new smart object described by @p s.
3261 * @if MOBILE @since_tizen 2.3
3262 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
3276 EAPI Evas_Object *evas_object_smart_add(Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
3279 * @brief Set an Evas object as a member of a given smart object.
3281 * @if MOBILE @since_tizen 2.3
3282 * @elseif WEARABLE @since_tizen 2.3.1
3285 * @param[in] obj The member object
3286 * @param[in] smart_obj The smart object
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).
3294 * @remark Any @p smart_obj object's specific implementation of the @c
3295 * member_add() smart function will take place too, naturally.
3297 * @see evas_object_smart_member_del()
3298 * @see evas_object_smart_members_get()
3301 EAPI void evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2);
3304 * @brief Removes a member object from a given smart object.
3306 * @if MOBILE @since_tizen 2.3
3307 * @elseif WEARABLE @since_tizen 2.3.1
3310 * @param[in] obj the member object
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.
3316 * @see evas_object_smart_member_add() for more details
3317 * @see evas_object_smart_members_get()
3319 EAPI void evas_object_smart_member_del(Evas_Object *obj) EINA_ARG_NONNULL(1);
3322 * @brief Add (register) a callback function to the smart event specified by
3323 * @p event on the smart object @p obj.
3325 * @if MOBILE @since_tizen 2.3
3326 * @elseif WEARABLE @since_tizen 2.3.1
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
3334 * @remark Smart callbacks look very similar to Evas callbacks, but are
3335 * implemented as smart object's custom ones.
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.
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.
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
3354 * @remark There is an infrastructure for introspection on smart objects'
3356 * internal smart objects on Evas implement them yet.
3358 * @see @ref Evas_Smart_Object_Group_Callbacks for more details.
3360 * @see evas_object_smart_callback_del()
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);
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
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
3377 * @see evas_object_smart_callback_add
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);
3383 * @brief Delete (unregister) a callback function from the smart event
3384 * specified by @p event on the smart object @p obj.
3386 * @if MOBILE @since_tizen 2.3
3387 * @elseif WEARABLE @since_tizen 2.3.1
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
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.
3403 * @see evas_object_smart_callback_add() for more details.
3406 EAPI void *evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3);
3409 * @brief Delete (unregister) a callback function from the smart event
3410 * specified by @p event on the smart object @p obj.
3412 * @if MOBILE @since_tizen 2.3
3413 * @elseif WEARABLE @since_tizen 2.3.1
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
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
3431 * @see evas_object_smart_callback_add() for more details.
3434 * @remark To delete all smart event callbacks which match @p type and @p func,
3435 * use evas_object_smart_callback_del().
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);
3440 * @brief Call a given smart callback on the smart object @p obj.
3442 * @if MOBILE @since_tizen 2.3
3443 * @elseif WEARABLE @since_tizen 2.3.1
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
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>.
3463 EAPI void evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2);
3468 * Retrieve an Evas smart object's interface, by name string pointer.
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.
3477 * @return The interface's handle pointer, if found, @c NULL
3480 EAPI const void *evas_object_smart_interface_get(const Evas_Object *obj, const char *name);
3485 * Retrieve an Evas smart object interface's <b>private data</b>.
3487 * @param obj An Evas smart object.
3488 * @param iface The given object's interface handle.
3492 * @return The object interface's private data blob pointer, if found,
3493 * @c NULL otherwise.
3495 EAPI void *evas_object_smart_interface_data_get(const Evas_Object *obj, const Evas_Smart_Interface *iface);
3498 * @brief This gets the internal counter that counts the number of smart calculations
3500 * @if MOBILE @since_tizen 2.3
3501 * @elseif WEARABLE @since_tizen 2.3.1
3504 * @param[in] e The canvas to get the calculate counter from
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.
3516 EAPI int evas_smart_objects_calculate_count_get(const Evas *e);
3518 #include "canvas/evas_object_smart.eo.legacy.h"
3525 * @ingroup Evas_Smart_Object_Clipped
3530 * Get the clipper object for the given clipped smart object.
3532 * @param obj the clipped smart object to retrieve associated clipper
3534 * @return the clipper object.
3536 * Use this function if you want to change any of this clipper's
3537 * properties, like colors.
3539 * @see evas_object_smart_clipped_smart_add()
3541 EAPI Evas_Object *evas_object_smart_clipped_clipper_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3543 #include "canvas/evas_smart_clipped.eo.legacy.h"
3550 * @addtogroup Evas_Object_Box
3556 * @brief Add a new box object on the provided canvas.
3558 * @if MOBILE @since_tizen 2.3
3559 * @elseif WEARABLE @since_tizen 2.3.1
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
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>.
3572 EAPI Evas_Object *evas_object_box_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3575 * @brief Get a property's value (by its given numerical identifier), on a
3576 * given box child element -- by a variable argument list
3578 * @if MOBILE @since_tizen 2.3
3579 * @elseif WEARABLE @since_tizen 2.3.1
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.
3591 * @remark This is a variable argument list variant of the
3592 * evas_object_box_option_property_get(). See its documentation for
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);
3598 * @brief Set a property value (by its given numerical identifier), on a
3599 * given box child element -- by a variable argument list
3601 * @if MOBILE @since_tizen 2.3
3602 * @elseif WEARABLE @since_tizen 2.3.1
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
3612 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
3614 * @remark This is a variable argument list variant of the
3615 * evas_object_box_option_property_set(). See its documentation for
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);
3621 * @brief Set a property value (by its given numerical identifier), on a
3622 * given box child element
3624 * @if MOBILE @since_tizen 2.3
3625 * @elseif WEARABLE @since_tizen 2.3.1
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.
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.
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.
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);
3652 * @brief Get a property's value (by its given numerical identifier), on a
3653 * given box child element
3655 * @if MOBILE @since_tizen 2.3
3656 * @elseif WEARABLE @since_tizen 2.3.1
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.
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.
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.
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);
3683 * @brief Get the list of children objects in a given box object.
3685 * @if MOBILE @since_tizen 2.3
3686 * @elseif WEARABLE @since_tizen 2.3.1
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)
3693 * @remark The returned list should be freed with @c eina_list_free() when you
3694 * no longer need it.
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.
3701 EAPI Eina_List *evas_object_box_children_get(const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3703 #include "canvas/evas_box.eo.legacy.h"
3710 * @ingroup Evas_Object_Table
3715 * @brief Create a new table.
3717 * @if MOBILE @since_tizen 2.3
3718 * @elseif WEARABLE @since_tizen 2.3.1
3721 * @param[in] evas Canvas in which table will be added.
3723 EAPI Evas_Object *evas_object_table_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3726 * @brief Get the child of the table at the given coordinates
3728 * @if MOBILE @since_tizen 2.3
3729 * @elseif WEARABLE @since_tizen 2.3.1
3732 * @param[in] o The given Evas object.
3733 * @param[in] col The number of col.
3734 * @param[in] row The number of row.
3736 * @remark This does not take into account col/row spanning
3738 EAPI Evas_Object *evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1);
3740 #include "canvas/evas_table.eo.legacy.h"
3747 * @addtogroup Evas_Object_Grid
3752 * @brief Create a new grid.
3754 * @if MOBILE @since_tizen 2.3
3755 * @elseif WEARABLE @since_tizen 2.3.1
3758 * @param[in] evas Canvas in which grid will be added.
3760 * @remark It's set to a virtual size of 1x1 by default and add children with
3761 * evas_object_grid_pack().
3764 EAPI Evas_Object *evas_object_grid_add(Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3766 #include "canvas/evas_grid.eo.legacy.h"
3774 * Adds an output to the canvas
3776 * @parem e The canvas to add the output to
3777 * @return The output
3779 * @see evas_out_engine_info_set
3780 * @see evas_output_viewport_set
3781 * @see evas_output_size_set
3785 EAPI Evas_Out *evas_out_add(Evas *e);
3791 * @parem evo The output object
3798 EAPI void evas_output_del(Evas_Out *evo);
3800 #include "canvas/evas_out.eo.legacy.h"