7 Please see the @ref authors page for contact details.
9 @section toc Table of Contents
16 @li @ref intro_example
19 @section intro What is Evas?
21 Evas is a clean display canvas API for several target display systems
22 that can draw anti-aliased text, smooth super and sub-sampled scaled
23 images, alpha-blend objects and much more.
25 It abstracts any need to know much about what the characteristics of
26 your display system are or what graphics calls are used to draw them
27 and how. It deals on an object level where all you do is create and
28 manipulate objects in a canvas, set their properties, and the rest is
31 Evas optimises the rendering pipeline to minimise effort in redrawing
32 changes made to the canvas and so takes this work out of the
33 programmers hand, saving a lot of time and energy.
35 It's small and lean, designed to work on embedded systems all the way
36 to large and powerful multi-cpu workstations. It can be compiled to
37 only have the features you need for your target platform if you so
38 wish, thus keeping it small and lean. It has several display
39 back-ends, letting it display on several display systems, making it
40 portable for cross-device and cross-platform development.
42 @subsection intro_not_evas What Evas is not?
44 Evas is not a widget set or widget toolkit, however it is their
45 base. See Elementary (http://docs.enlightenment.org/auto/elementary/)
46 for a toolkit based on Evas, Edje, Ecore and other Enlightenment
49 It is not dependent or aware of main loops, input or output
50 systems. Input should be polled from various sources and fed to
51 Evas. Similarly, it will not create windows or report windows updates
52 to your system, rather just drawing the pixels and reporting to the
53 user the areas that were changed. Of course these operations are quite
54 common and thus they are ready to use in Ecore, particularly in
55 Ecore_Evas (http://docs.enlightenment.org/auto/ecore/).
58 @section work How does Evas work?
60 Evas is a canvas display library. This is markedly different from most
61 display and windowing systems as a canvas is structural and is also a
62 state engine, whereas most display and windowing systems are immediate
63 mode display targets. Evas handles the logic between a structural
64 display via its state engine, and controls the target windowing system
65 in order to produce rendered results of the current canvas' state on
68 Immediate mode display systems retain very little, or no state. A
69 program will execute a series of commands, as in the pseudo code:
72 draw line from position (0, 0) to position (100, 200);
74 draw rectangle from position (10, 30) to position (50, 500);
76 bitmap_handle = create_bitmap();
77 scale bitmap_handle to size 100 x 100;
78 draw image bitmap_handle at position (10, 30);
81 The series of commands is executed by the windowing system and the
82 results are displayed on the screen (normally). Once the commands are
83 executed the display system has little or no idea of how to reproduce
84 this image again, and so has to be instructed by the application how
85 to redraw sections of the screen whenever needed. Each successive
86 command will be executed as instructed by the application and either
87 emulated by software or sent to the graphics hardware on the device to
90 The advantage of such a system is that it is simple, and gives a
91 program tight control over how something looks and is drawn. Given the
92 increasing complexity of displays and demands by users to have better
93 looking interfaces, more and more work is needing to be done at this
94 level by the internals of widget sets, custom display widgets and
95 other programs. This means more and more logic and display rendering
96 code needs to be written time and time again, each time the
97 application needs to figure out how to minimise redraws so that
98 display is fast and interactive, and keep track of redraw logic. The
99 power comes at a high-price, lots of extra code and work. Programmers
100 not very familiar with graphics programming will often make mistakes
101 at this level and produce code that is sub optimal. Those familiar
102 with this kind of programming will simply get bored by writing the
103 same code again and again.
105 For example, if in the above scene, the windowing system requires the
106 application to redraw the area from 0, 0 to 50, 50 (also referred as
107 "expose event"), then the programmer must calculate manually the
108 updates and repaint it again:
111 Redraw from position (0, 0) to position (50, 50):
113 // what was in area (0, 0, 50, 50)?
115 // 1. intersection part of line (0, 0) to (100, 200)?
116 draw line from position (0, 0) to position (25, 50);
118 // 2. intersection part of rectangle (10, 30) to (50, 500)?
119 draw rectangle from position (10, 30) to position (50, 50)
121 // 3. intersection part of image at (10, 30), size 100 x 100?
122 bitmap_subimage = subregion from position (0, 0) to position (40, 20)
123 draw image bitmap_subimage at position (10, 30);
126 The clever reader might have noticed that, if all elements in the
127 above scene are opaque, then the system is doing useless paints: part
128 of the line is behind the rectangle, and part of the rectangle is
129 behind the image. These useless paints tend to be very costly, as
130 pixels tend to be 4 bytes in size, thus an overlapping region of 100 x
131 100 pixels is around 40000 useless writes! The developer could write
132 code to calculate the overlapping areas and avoid painting then, but
133 then it should be mixed with the "expose event" handling mentioned
134 above and quickly one realizes the initially simpler method became
137 Evas is a structural system in which the programmer creates and
138 manages display objects and their properties, and as a result of this
139 higher level state management, the canvas is able to redraw the set of
140 objects when needed to represent the current state of the canvas.
142 For example, the pseudo code:
145 line_handle = create_line();
146 set line_handle from position (0, 0) to position (100, 200);
149 rectangle_handle = create_rectangle();
150 move rectangle_handle to position (10, 30);
151 resize rectangle_handle to size 40 x 470;
152 show rectangle_handle;
154 bitmap_handle = create_bitmap();
155 scale bitmap_handle to size 100 x 100;
156 move bitmap_handle to position (10, 30);
162 This may look longer, but when the display needs to be refreshed or
163 updated, the programmer only moves, resizes, shows, hides etc. the
164 objects that need to change. The programmer simply thinks at the
165 object logic level, and the canvas software does the rest of the work
166 for them, figuring out what actually changed in the canvas since it
167 was last drawn, how to most efficiently redraw the canvas and its
168 contents to reflect the current state, and then it can go off and do
169 the actual drawing of the canvas.
171 This lets the programmer think in a more natural way when dealing with
172 a display, and saves time and effort of working out how to load and
173 display images, render given the current display system etc. Since
174 Evas also is portable across different display systems, this also
175 gives the programmer the ability to have their code ported and
176 displayed on different display systems with very little work.
178 Evas can be seen as a display system that stands somewhere between a
179 widget set and an immediate mode display system. It retains basic
180 display logic, but does very little high-level logic such as
181 scrollbars, sliders, push buttons etc.
184 @section compiling How to compile using Evas ?
186 Evas is a library your application links to. The procedure for this is
187 very simple. You simply have to compile your application with the
188 appropriate compiler flags that the @c pkg-config script outputs. For
191 Compiling C or C++ files into object files:
194 gcc -c -o main.o main.c `pkg-config --cflags evas`
197 Linking object files into a binary executable:
200 gcc -o my_application main.o `pkg-config --libs evas`
203 You simply have to make sure that @c pkg-config is in your shell's @c
204 PATH (see the manual page for your appropriate shell) and @c evas.pc
205 in @c /usr/lib/pkgconfig or its path in the @c PKG_CONFIG_PATH
206 environment variable. It's that simple to link and use Evas once you
207 have written your code to use it.
209 Since the program is linked to Evas, it is now able to use any
210 advertised API calls to display graphics in a canvas managed by it, as
211 well as use the API calls provided to manage data.
213 You should make sure you add any extra compile and link flags to your
214 compile commands that your application may need as well. The above
215 example is only guaranteed to make Evas add it's own requirements.
218 @section install How is it installed?
230 @section next_steps Next Steps
232 After you understood what Evas is and installed it in your system you
233 should proceed understanding the programming interface for all
234 objects, then see the specific for the most used elements. We'd
235 recommend you to take a while to learn Ecore
236 (http://docs.enlightenment.org/auto/ecore/) and Edje
237 (http://docs.enlightenment.org/auto/edje/) as they will likely save
238 you tons of work compared to using just Evas directly.
242 @li @ref Evas_Object_Group, where you'll get how to basically
243 manipulate generic objects lying on an Evas canvas, handle canvas
244 and object events, etc.
245 @li @ref Evas_Object_Rectangle, to learn about the most basic object
246 type on Evas -- the rectangle.
247 @li @ref Evas_Object_Polygon, to learn how to create polygon elements
249 @li @ref Evas_Line_Group, to learn how to create line elements on the
251 @li @ref Evas_Object_Image, to learn about image objects, over which
252 Evas can do a plethora of operations.
253 @li @ref Evas_Object_Text, to learn how to create textual elements on
255 @li @ref Evas_Object_Textblock, to learn how to create multiline
256 textual elements on the canvas.
257 @li @ref Evas_Smart_Object_Group and @ref Evas_Smart_Group, to define
258 new objects that provide @b custom functions to handle clipping,
259 hiding, moving, resizing, color setting and more. These could
260 be as simple as a group of objects that move together (see @ref
261 Evas_Smart_Object_Clipped) up to implementations of what
262 ends to be a widget, providing some intelligence (thus the name)
263 to Evas objects -- like a button or check box, for example.
265 @section intro_example Introductory Example
267 @include evas-buffer-simple.c
271 @page authors Authors
272 @author Carsten Haitzler <raster@@rasterman.com>
273 @author Till Adam <till@@adam-lilienthal.de>
274 @author Steve Ireland <sireland@@pobox.com>
275 @author Brett Nash <nash@@nash.id.au>
276 @author Tilman Sauerbeck <tilman@@code-monkey.de>
277 @author Corey Donohoe <atmos@@atmos.org>
278 @author Yuri Hudobin <glassy_ape@@users.sourceforge.net>
279 @author Nathan Ingersoll <ningerso@@d.umn.edu>
280 @author Willem Monsuwe <willem@@stack.nl>
281 @author Jose O Gonzalez <jose_ogp@@juno.com>
282 @author Bernhard Nemec <Bernhard.Nemec@@viasyshc.com>
283 @author Jorge Luis Zapata Muga <jorgeluis.zapata@@gmail.com>
284 @author Cedric Bail <cedric.bail@@free.fr>
285 @author Gustavo Sverzut Barbieri <barbieri@@profusion.mobi>
286 @author Vincent Torri <vtorri@@univ-evry.fr>
287 @author Tim Horton <hortont424@@gmail.com>
288 @author Tom Hacohen <tom@@stosb.com>
289 @author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
290 @author Iván Briano <ivan@@profusion.mobi>
291 @author Gustavo Lima Chaves <glima@@profusion.mobi>
292 @author Samsung Electronics <tbd>
293 @author Samsung SAIT <tbd>
294 @author Sung W. Park <sungwoo@@gmail.com>
295 @author Jiyoun Park <jy0703.park@@samsung.com>
296 @author Myoungwoon Roy Kim(roy_kim) <myoungwoon.kim@@samsung.com> <myoungwoon@@gmail.com>
297 @author Thierry el Borgi <thierry@@substantiel.fr>
298 @author ChunEon Park <hermet@@hermet.pe.kr>
299 @author Christopher 'devilhorns' Michael <cpmichael1@comcast.net>
300 @author Seungsoo Woo <om101.woo@samsung.com>
302 Please contact <enlightenment-devel@lists.sourceforge.net> to get in
303 contact with the developers and maintainers.
318 # ifdef EFL_EVAS_BUILD
320 # define EAPI __declspec(dllexport)
323 # endif /* ! DLL_EXPORT */
325 # define EAPI __declspec(dllimport)
326 # endif /* ! EFL_EVAS_BUILD */
330 # define EAPI __attribute__ ((visibility("default")))
337 #endif /* ! _WIN32 */
343 #define EVAS_VERSION_MAJOR 1
344 #define EVAS_VERSION_MINOR 0
346 typedef struct _Evas_Version
354 EAPI extern Evas_Version *evas_version;
358 * @brief These routines are used for Evas library interaction.
360 * @todo check boolean return values and convert to Eina_Bool
361 * @todo change all api to use EINA_SAFETY_*
362 * @todo finish api documentation
365 /* BiDi exposed stuff */
367 typedef enum _Evas_BiDi_Direction
369 EVAS_BIDI_DIRECTION_NATURAL,
370 EVAS_BIDI_DIRECTION_NEUTRAL = EVAS_BIDI_DIRECTION_NATURAL,
371 EVAS_BIDI_DIRECTION_LTR,
372 EVAS_BIDI_DIRECTION_RTL
373 } Evas_BiDi_Direction;
376 * Identifier of callbacks to be set for Evas canvases or Evas
379 * The following figure illustrates some Evas callbacks:
381 * @image html evas-callbacks.png
382 * @image rtf evas-callbacks.png
383 * @image latex evas-callbacks.eps
385 * @see evas_object_event_callback_add()
386 * @see evas_event_callback_add()
388 typedef enum _Evas_Callback_Type
391 * The following events are only for use with Evas objects, with
392 * evas_object_event_callback_add():
394 EVAS_CALLBACK_MOUSE_IN, /**< Mouse In Event */
395 EVAS_CALLBACK_MOUSE_OUT, /**< Mouse Out Event */
396 EVAS_CALLBACK_MOUSE_DOWN, /**< Mouse Button Down Event */
397 EVAS_CALLBACK_MOUSE_UP, /**< Mouse Button Up Event */
398 EVAS_CALLBACK_MOUSE_MOVE, /**< Mouse Move Event */
399 EVAS_CALLBACK_MOUSE_WHEEL, /**< Mouse Wheel Event */
400 EVAS_CALLBACK_MULTI_DOWN, /**< Multi-touch Down Event */
401 EVAS_CALLBACK_MULTI_UP, /**< Multi-touch Up Event */
402 EVAS_CALLBACK_MULTI_MOVE, /**< Multi-touch Move Event */
403 EVAS_CALLBACK_FREE, /**< Object Being Freed (Called after Del) */
404 EVAS_CALLBACK_KEY_DOWN, /**< Key Press Event */
405 EVAS_CALLBACK_KEY_UP, /**< Key Release Event */
406 EVAS_CALLBACK_FOCUS_IN, /**< Focus In Event */
407 EVAS_CALLBACK_FOCUS_OUT, /**< Focus Out Event */
408 EVAS_CALLBACK_SHOW, /**< Show Event */
409 EVAS_CALLBACK_HIDE, /**< Hide Event */
410 EVAS_CALLBACK_MOVE, /**< Move Event */
411 EVAS_CALLBACK_RESIZE, /**< Resize Event */
412 EVAS_CALLBACK_RESTACK, /**< Restack Event */
413 EVAS_CALLBACK_DEL, /**< Object Being Deleted (called before Free) */
414 EVAS_CALLBACK_HOLD, /**< Events go on/off hold */
415 EVAS_CALLBACK_CHANGED_SIZE_HINTS, /**< Size hints changed event */
416 EVAS_CALLBACK_IMAGE_PRELOADED, /**< Image has been preloaded */
419 * The following events are only for use with Evas canvases, with
420 * evas_event_callback_add():
422 EVAS_CALLBACK_CANVAS_FOCUS_IN, /**< Canvas got focus as a whole */
423 EVAS_CALLBACK_CANVAS_FOCUS_OUT, /**< Canvas lost focus as a whole */
424 EVAS_CALLBACK_RENDER_FLUSH_PRE, /**< Called just before rendering is updated on the canvas target */
425 EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */
426 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */
427 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */
430 * More Evas object event types - see evas_object_event_callback_add():
432 EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanims in Evas that throw out original image data) */
434 EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */
435 } Evas_Callback_Type; /**< The types of events triggering a callback */
438 * @def EVAS_CALLBACK_PRIORITY_BEFORE
439 * Slightly more prioritized than default.
442 #define EVAS_CALLBACK_PRIORITY_BEFORE -100
444 * @def EVAS_CALLBACK_PRIORITY_DEFAULT
445 * Default callback priority level
448 #define EVAS_CALLBACK_PRIORITY_DEFAULT 0
450 * @def EVAS_CALLBACK_PRIORITY_AFTER
451 * Slightly less prioritized than default.
454 #define EVAS_CALLBACK_PRIORITY_AFTER 100
457 * @typedef Evas_Callback_Priority
459 * Callback priority value. Range is -32k - 32k. The lower the number, the
460 * bigger the priority.
462 * @see EVAS_CALLBACK_PRIORITY_AFTER
463 * @see EVAS_CALLBACK_PRIORITY_BEFORE
464 * @see EVAS_CALLBACK_PRIORITY_DEFAULT
468 typedef short Evas_Callback_Priority;
471 * Flags for Mouse Button events
473 typedef enum _Evas_Button_Flags
475 EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */
476 EVAS_BUTTON_DOUBLE_CLICK = (1 << 0), /**< This mouse button press was the 2nd press of a double click */
477 EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */
478 } Evas_Button_Flags; /**< Flags for Mouse Button events */
483 typedef enum _Evas_Event_Flags
485 EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */
486 EVAS_EVENT_FLAG_ON_HOLD = (1 << 0), /**< This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */
487 EVAS_EVENT_FLAG_ON_SCROLL = (1 << 1) /**< This event flag indicates the event occurs while scrolling; for exameple, DOWN event occurs during scrolling; the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */
488 } Evas_Event_Flags; /**< Flags for Events */
491 * State of Evas_Coord_Touch_Point
493 typedef enum _Evas_Touch_Point_State
495 EVAS_TOUCH_POINT_DOWN, /**< Touch point is pressed down */
496 EVAS_TOUCH_POINT_UP, /**< Touch point is released */
497 EVAS_TOUCH_POINT_MOVE, /**< Touch point is moved */
498 EVAS_TOUCH_POINT_STILL, /**< Touch point is not moved after pressed */
499 EVAS_TOUCH_POINT_CANCEL /**< Touch point is calcelled */
500 } Evas_Touch_Point_State;
503 * Flags for Font Hinting
504 * @ingroup Evas_Font_Group
506 typedef enum _Evas_Font_Hinting_Flags
508 EVAS_FONT_HINTING_NONE, /**< No font hinting */
509 EVAS_FONT_HINTING_AUTO, /**< Automatic font hinting */
510 EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */
511 } Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */
514 * Colorspaces for pixel data supported by Evas
515 * @ingroup Evas_Object_Image
517 typedef enum _Evas_Colorspace
519 EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */
520 /* these are not currently supported - but planned for the future */
521 EVAS_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
522 EVAS_COLORSPACE_YCBCR422P709_PL,/**< YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
523 EVAS_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */
524 EVAS_COLORSPACE_GRY8, /**< 8bit grayscale */
525 EVAS_COLORSPACE_YCBCR422601_PL, /**< YCbCr 4:2:2, ITU.BT-601 specifications. The data poitned to is just an array of row pointer, pointing to line of Y,Cb,Y,Cr bytes */
526 EVAS_COLORSPACE_YCBCR420NV12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of row pointer, pointing to the Y rows, then the Cb,Cr rows. */
527 EVAS_COLORSPACE_YCBCR420TM12601_PL, /**< YCbCr 4:2:0, ITU.BT-601 specification. The data pointed to is just an array of tiled row pointer, pointing to the Y rows, then the Cb,Cr rows. */
528 } Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */
531 * How to pack items into cells in a table.
532 * @ingroup Evas_Object_Table
534 * @see evas_object_table_homogeneous_set() for an explanation of the funcion of
537 typedef enum _Evas_Object_Table_Homogeneous_Mode
539 EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0,
540 EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1,
541 EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2
542 } Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */
544 typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */
545 typedef struct _Evas_Point Evas_Point; /**< integer point */
547 typedef struct _Evas_Coord_Point Evas_Coord_Point; /**< Evas_Coord point */
548 typedef struct _Evas_Coord_Precision_Point Evas_Coord_Precision_Point; /**< Evas_Coord point with sub-pixel precision */
550 typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */
551 typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */
554 * @typedef Evas_Smart_Class
556 * A smart object's @b base class definition
558 * @ingroup Evas_Smart_Group
560 typedef struct _Evas_Smart_Class Evas_Smart_Class;
563 * @typedef Evas_Smart_Cb_Description
565 * A smart object callback description, used to provide introspection
567 * @ingroup Evas_Smart_Group
569 typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description;
574 * An opaque handle to map points
576 * @see evas_map_new()
577 * @see evas_map_free()
578 * @see evas_map_dup()
580 * @ingroup Evas_Object_Group_Map
582 typedef struct _Evas_Map Evas_Map;
587 * An opaque handle to an Evas canvas.
592 * @ingroup Evas_Canvas
594 typedef struct _Evas Evas;
597 * @typedef Evas_Object
598 * An Evas Object handle.
599 * @ingroup Evas_Object_Group
601 typedef struct _Evas_Object Evas_Object;
603 typedef void Evas_Performance; /**< An Evas Performance handle */
604 typedef struct _Evas_Modifier Evas_Modifier; /**< An opaque type containing information on which modifier keys are registered in an Evas canvas */
605 typedef struct _Evas_Lock Evas_Lock; /**< An opaque type containing information on which lock keys are registered in an Evas canvas */
606 typedef struct _Evas_Smart Evas_Smart; /**< An Evas Smart Object handle */
607 typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic datatype for engine specific native surface information */
610 * @typedef Evas_Video_Surface
612 * A generic datatype for video specific surface information
613 * @see evas_object_image_video_surface_set
614 * @see evas_object_image_video_surface_get
617 typedef struct _Evas_Video_Surface Evas_Video_Surface;
619 typedef unsigned long long Evas_Modifier_Mask; /**< An Evas modifier mask type */
621 typedef int Evas_Coord;
622 typedef int Evas_Font_Size;
623 typedef int Evas_Angle;
625 struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */
627 Evas_Coord x; /**< top-left x co-ordinate of rectangle */
628 Evas_Coord y; /**< top-left y co-ordinate of rectangle */
629 Evas_Coord w; /**< width of rectangle */
630 Evas_Coord h; /**< height of rectangle */
638 struct _Evas_Coord_Point
643 struct _Evas_Coord_Precision_Point
649 struct _Evas_Position
652 Evas_Coord_Point canvas;
655 struct _Evas_Precision_Position
658 Evas_Coord_Precision_Point canvas;
661 typedef enum _Evas_Aspect_Control
663 EVAS_ASPECT_CONTROL_NONE = 0, /**< Preference on scaling unset */
664 EVAS_ASPECT_CONTROL_NEITHER = 1, /**< Same effect as unset preference on scaling */
665 EVAS_ASPECT_CONTROL_HORIZONTAL = 2, /**< Use all horizontal container space to place an object, using the given aspect */
666 EVAS_ASPECT_CONTROL_VERTICAL = 3, /**< Use all vertical container space to place an object, using the given aspect */
667 EVAS_ASPECT_CONTROL_BOTH = 4 /**< Use all horizontal @b and vertical container spaces to place an object (never growing it out of those bounds), using the given aspect */
668 } Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */
670 typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */
671 typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */
672 typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */
673 typedef struct _Evas_Event_Mouse_Down Evas_Event_Mouse_Down; /**< Event structure for #EVAS_CALLBACK_MOUSE_DOWN event callbacks */
674 typedef struct _Evas_Event_Mouse_Up Evas_Event_Mouse_Up; /**< Event structure for #EVAS_CALLBACK_MOUSE_UP event callbacks */
675 typedef struct _Evas_Event_Mouse_In Evas_Event_Mouse_In; /**< Event structure for #EVAS_CALLBACK_MOUSE_IN event callbacks */
676 typedef struct _Evas_Event_Mouse_Out Evas_Event_Mouse_Out; /**< Event structure for #EVAS_CALLBACK_MOUSE_OUT event callbacks */
677 typedef struct _Evas_Event_Mouse_Move Evas_Event_Mouse_Move; /**< Event structure for #EVAS_CALLBACK_MOUSE_MOVE event callbacks */
678 typedef struct _Evas_Event_Mouse_Wheel Evas_Event_Mouse_Wheel; /**< Event structure for #EVAS_CALLBACK_MOUSE_WHEEL event callbacks */
679 typedef struct _Evas_Event_Multi_Down Evas_Event_Multi_Down; /**< Event structure for #EVAS_CALLBACK_MULTI_DOWN event callbacks */
680 typedef struct _Evas_Event_Multi_Up Evas_Event_Multi_Up; /**< Event structure for #EVAS_CALLBACK_MULTI_UP event callbacks */
681 typedef struct _Evas_Event_Multi_Move Evas_Event_Multi_Move; /**< Event structure for #EVAS_CALLBACK_MULTI_MOVE event callbacks */
682 typedef struct _Evas_Event_Key_Down Evas_Event_Key_Down; /**< Event structure for #EVAS_CALLBACK_KEY_DOWN event callbacks */
683 typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */
684 typedef struct _Evas_Event_Hold Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */
686 typedef enum _Evas_Load_Error
688 EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */
689 EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */
690 EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */
691 EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission deinied to an existing file (or path) */
692 EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */
693 EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */
694 EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */
695 } Evas_Load_Error; /**< Evas image load error codes one can get - see evas_load_error_str() too. */
698 typedef enum _Evas_Alloc_Error
700 EVAS_ALLOC_ERROR_NONE = 0, /**< No allocation error */
701 EVAS_ALLOC_ERROR_FATAL = 1, /**< Allocation failed despite attempts to free up memory */
702 EVAS_ALLOC_ERROR_RECOVERED = 2 /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */
703 } Evas_Alloc_Error; /**< Possible allocation errors returned by evas_alloc_error() */
705 typedef enum _Evas_Fill_Spread
707 EVAS_TEXTURE_REFLECT = 0, /**< image fill tiling mode - tiling reflects */
708 EVAS_TEXTURE_REPEAT = 1, /**< tiling repeats */
709 EVAS_TEXTURE_RESTRICT = 2, /**< tiling clamps - range offset ignored */
710 EVAS_TEXTURE_RESTRICT_REFLECT = 3, /**< tiling clamps and any range offset reflects */
711 EVAS_TEXTURE_RESTRICT_REPEAT = 4, /**< tiling clamps and any range offset repeats */
712 EVAS_TEXTURE_PAD = 5 /**< tiling extends with end values */
713 } Evas_Fill_Spread; /**< Fill types used for evas_object_image_fill_spread_set() */
715 typedef enum _Evas_Pixel_Import_Pixel_Format
717 EVAS_PIXEL_FORMAT_NONE = 0, /**< No pixel format */
718 EVAS_PIXEL_FORMAT_ARGB32 = 1, /**< ARGB 32bit pixel format with A in the high byte per 32bit pixel word */
719 EVAS_PIXEL_FORMAT_YUV420P_601 = 2 /**< YUV 420 Planar format with CCIR 601 color encoding wuth contiguous planes in the order Y, U and V */
720 } Evas_Pixel_Import_Pixel_Format; /**< Pixel format for import call. See evas_object_image_pixels_import() */
722 struct _Evas_Pixel_Import_Source
724 Evas_Pixel_Import_Pixel_Format format; /**< pixel format type ie ARGB32, YUV420P_601 etc. */
725 int w, h; /**< width and height of source in pixels */
726 void **rows; /**< an array of pointers (size depends on format) pointing to left edge of each scanline */
729 /* magic version number to know what the native surf struct looks like */
730 #define EVAS_NATIVE_SURFACE_VERSION 2
732 typedef enum _Evas_Native_Surface_Type
734 EVAS_NATIVE_SURFACE_NONE,
735 EVAS_NATIVE_SURFACE_X11,
736 EVAS_NATIVE_SURFACE_OPENGL
737 } Evas_Native_Surface_Type;
739 struct _Evas_Native_Surface
742 Evas_Native_Surface_Type type;
745 void *visual; /**< visual of the pixmap to use (Visual) */
746 unsigned long pixmap; /**< pixmap id to use (Pixmap) */
749 unsigned int texture_id; /**< opengl texture id to use from glGenTextures() */
750 unsigned int framebuffer_id; /**< 0 if not a FBO, FBO id otherwise from glGenFramebuffers() */
751 unsigned int internal_format; /**< same as 'internalFormat' for glTexImage2D() */
752 unsigned int format; /**< same as 'format' for glTexImage2D() */
753 unsigned int x, y, w, h; /**< region inside the texture to use (image size is assumed as texture size, with 0, 0 being the top-left and co-ordinates working down to the right and bottom being positive) */
759 * @def EVAS_VIDEO_SURFACE_VERSION
760 * Magic version number to know what the video surf struct looks like
763 #define EVAS_VIDEO_SURFACE_VERSION 1
765 typedef void (*Evas_Video_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface);
766 typedef void (*Evas_Video_Coord_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface, Evas_Coord a, Evas_Coord b);
768 struct _Evas_Video_Surface
772 Evas_Video_Coord_Cb move; /**< Move the video surface to this position */
773 Evas_Video_Coord_Cb resize; /**< Resize the video surface to that size */
774 Evas_Video_Cb show; /**< Show the video overlay surface */
775 Evas_Video_Cb hide; /**< Hide the video overlay surface */
776 Evas_Video_Cb update_pixels; /**< Please update the Evas_Object_Image pixels when called */
782 #define EVAS_LAYER_MIN -32768 /**< bottom-most layer number */
783 #define EVAS_LAYER_MAX 32767 /**< top-most layer number */
785 #define EVAS_COLOR_SPACE_ARGB 0 /**< Not used for anything */
786 #define EVAS_COLOR_SPACE_AHSV 1 /**< Not used for anything */
787 #define EVAS_TEXT_INVALID -1 /**< Not used for anything */
788 #define EVAS_TEXT_SPECIAL -2 /**< Not used for anything */
790 #define EVAS_HINT_EXPAND 1.0 /**< Use with evas_object_size_hint_weight_set(), evas_object_size_hint_weight_get(), evas_object_size_hint_expand_set(), evas_object_size_hint_expand_get() */
791 #define EVAS_HINT_FILL -1.0 /**< Use with evas_object_size_hint_align_set(), evas_object_size_hint_align_get(), evas_object_size_hint_fill_set(), evas_object_size_hint_fill_get() */
792 #define evas_object_size_hint_fill_set evas_object_size_hint_align_set /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */
793 #define evas_object_size_hint_fill_get evas_object_size_hint_align_get /**< Convenience macro to make it easier to understand that align is also used for fill properties (as fill is mutually exclusive to align) */
794 #define evas_object_size_hint_expand_set evas_object_size_hint_weight_set /**< Convenience macro to make it easier to understand that weight is also used for expand properties */
795 #define evas_object_size_hint_expand_get evas_object_size_hint_weight_get /**< Convenience macro to make it easier to understand that weight is also used for expand properties */
798 * How the object should be rendered to output.
799 * @ingroup Evas_Object_Group_Extras
801 typedef enum _Evas_Render_Op
803 EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */
804 EVAS_RENDER_BLEND_REL = 1, /**< d = d*(1 - sa) + s*da */
805 EVAS_RENDER_COPY = 2, /**< d = s */
806 EVAS_RENDER_COPY_REL = 3, /**< d = s*da */
807 EVAS_RENDER_ADD = 4, /**< d = d + s */
808 EVAS_RENDER_ADD_REL = 5, /**< d = d + s*da */
809 EVAS_RENDER_SUB = 6, /**< d = d - s */
810 EVAS_RENDER_SUB_REL = 7, /**< d = d - s*da */
811 EVAS_RENDER_TINT = 8, /**< d = d*s + d*(1 - sa) + s*(1 - da) */
812 EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */
813 EVAS_RENDER_MASK = 10, /**< d = d*sa */
814 EVAS_RENDER_MUL = 11 /**< d = d*s */
815 } Evas_Render_Op; /**< How the object should be rendered to output. */
817 typedef enum _Evas_Border_Fill_Mode
819 EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be rendered */
820 EVAS_BORDER_FILL_DEFAULT = 1, /**< Image's center region is to be @b blended with objects underneath it, if it has transparency. This is the default behavior for image objects */
821 EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, even if it has transparency on it */
822 } Evas_Border_Fill_Mode; /**< How an image's center region (the complement to the border region) should be rendered by Evas */
824 typedef enum _Evas_Image_Scale_Hint
826 EVAS_IMAGE_SCALE_HINT_NONE = 0, /**< No scale hint at all */
827 EVAS_IMAGE_SCALE_HINT_DYNAMIC = 1, /**< Image is being re-scaled over time, thus turning scaling cache @b off for its data */
828 EVAS_IMAGE_SCALE_HINT_STATIC = 2 /**< Image is not being re-scaled over time, thus turning scaling cache @b on for its data */
829 } Evas_Image_Scale_Hint; /**< How an image's data is to be treated by Evas, with regard to scaling cache */
831 typedef enum _Evas_Image_Animated_Loop_Hint
833 EVAS_IMAGE_ANIMATED_HINT_NONE = 0,
834 EVAS_IMAGE_ANIMATED_HINT_LOOP = 1, /**< Image's animation mode is loop like 1->2->3->1->2->3 */
835 EVAS_IMAGE_ANIMATED_HINT_PINGPONG = 2 /**< Image's animation mode is pingpong like 1->2->3->2->1-> ... */
836 } Evas_Image_Animated_Loop_Hint;
838 typedef enum _Evas_Engine_Render_Mode
840 EVAS_RENDER_MODE_BLOCKING = 0,
841 EVAS_RENDER_MODE_NONBLOCKING = 1,
842 } Evas_Engine_Render_Mode;
844 typedef enum _Evas_Image_Content_Hint
846 EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */
847 EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change over time */
848 EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change over time */
849 } Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, for optimization */
851 struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */
853 int magic; /**< Magic number */
856 struct _Evas_Event_Mouse_Down /** Mouse button press event */
858 int button; /**< Mouse button number that went down (1 - 32) */
860 Evas_Point output; /**< The X/Y location of the cursor */
861 Evas_Coord_Point canvas; /**< The X/Y location of the cursor */
864 Evas_Modifier *modifiers; /**< modifier keys pressed during the event */
867 Evas_Button_Flags flags; /**< button flags set during the event */
868 unsigned int timestamp;
869 Evas_Event_Flags event_flags;
873 struct _Evas_Event_Mouse_Up /** Mouse button release event */
875 int button; /**< Mouse button number that was raised (1 - 32) */
878 Evas_Coord_Point canvas;
881 Evas_Modifier *modifiers;
884 Evas_Button_Flags flags;
885 unsigned int timestamp;
886 Evas_Event_Flags event_flags;
890 struct _Evas_Event_Mouse_In /** Mouse enter event */
892 int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
895 Evas_Coord_Point canvas;
898 Evas_Modifier *modifiers;
900 unsigned int timestamp;
901 Evas_Event_Flags event_flags;
905 struct _Evas_Event_Mouse_Out /** Mouse leave event */
907 int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
911 Evas_Coord_Point canvas;
914 Evas_Modifier *modifiers;
916 unsigned int timestamp;
917 Evas_Event_Flags event_flags;
921 struct _Evas_Event_Mouse_Move /** Mouse button down event */
923 int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
925 Evas_Position cur, prev;
928 Evas_Modifier *modifiers;
930 unsigned int timestamp;
931 Evas_Event_Flags event_flags;
935 struct _Evas_Event_Mouse_Wheel /** Wheel event */
937 int direction; /* 0 = default up/down wheel FIXME: more wheel types */
938 int z; /* ...,-2,-1 = down, 1,2,... = up */
941 Evas_Coord_Point canvas;
944 Evas_Modifier *modifiers;
946 unsigned int timestamp;
947 Evas_Event_Flags event_flags;
951 struct _Evas_Event_Multi_Down /** Multi button press event */
953 int device; /**< Multi device number that went down (1 or more for extra touches) */
954 double radius, radius_x, radius_y;
955 double pressure, angle;
958 Evas_Coord_Precision_Point canvas;
961 Evas_Modifier *modifiers;
964 Evas_Button_Flags flags;
965 unsigned int timestamp;
966 Evas_Event_Flags event_flags;
970 struct _Evas_Event_Multi_Up /** Multi button release event */
972 int device; /**< Multi device number that went up (1 or more for extra touches) */
973 double radius, radius_x, radius_y;
974 double pressure, angle;
977 Evas_Coord_Precision_Point canvas;
980 Evas_Modifier *modifiers;
983 Evas_Button_Flags flags;
984 unsigned int timestamp;
985 Evas_Event_Flags event_flags;
989 struct _Evas_Event_Multi_Move /** Multi button down event */
991 int device; /**< Multi device number that moved (1 or more for extra touches) */
992 double radius, radius_x, radius_y;
993 double pressure, angle;
995 Evas_Precision_Position cur;
998 Evas_Modifier *modifiers;
1000 unsigned int timestamp;
1001 Evas_Event_Flags event_flags;
1005 struct _Evas_Event_Key_Down /** Key press event */
1007 char *keyname; /**< the name string of the key pressed */
1009 Evas_Modifier *modifiers;
1012 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
1013 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
1014 const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */
1015 unsigned int timestamp;
1016 Evas_Event_Flags event_flags;
1020 struct _Evas_Event_Key_Up /** Key release event */
1022 char *keyname; /**< the name string of the key released */
1024 Evas_Modifier *modifiers;
1027 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
1028 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
1029 const char *compose; /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */
1030 unsigned int timestamp;
1031 Evas_Event_Flags event_flags;
1035 struct _Evas_Event_Hold /** Hold change event */
1037 int hold; /**< The hold flag */
1040 unsigned int timestamp;
1041 Evas_Event_Flags event_flags;
1046 * How the mouse pointer should be handled by Evas.
1048 * In the mode #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button
1049 * is pressed down over an object and held, with the mouse pointer
1050 * being moved outside of it, the pointer still behaves as being bound
1051 * to that object, albeit out of its drawing region. When the button
1052 * is released, the event will be fed to the object, that may check if
1053 * the final position is over it or not and do something about it.
1055 * In the mode #EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer will
1056 * always be bound to the object right below it.
1058 * @ingroup Evas_Object_Group_Extras
1060 typedef enum _Evas_Object_Pointer_Mode
1062 EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */
1063 EVAS_OBJECT_POINTER_MODE_NOGRAB /**< pointer always bound to the object right below it */
1064 } Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */
1066 typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info); /**< Evas smart objects' "smart callback" function signature */
1067 typedef void (*Evas_Event_Cb) (void *data, Evas *e, void *event_info); /**< Evas event callback function signature */
1068 typedef Eina_Bool (*Evas_Object_Event_Post_Cb) (void *data, Evas *e);
1069 typedef void (*Evas_Object_Event_Cb) (void *data, Evas *e, Evas_Object *obj, void *event_info); /**< Evas object event callback function signature */
1070 typedef void (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type type, void *event_info);
1073 * @defgroup Evas_Group Top Level Functions
1075 * Functions that affect Evas as a whole.
1081 * @return The init counter value.
1083 * This function initializes Evas and increments a counter of the
1084 * number of calls to it. It returns the new counter's value.
1086 * @see evas_shutdown().
1088 * Most EFL users wouldn't be using this function directly, because
1089 * they wouldn't access Evas directly by themselves. Instead, they
1090 * would be using higher level helpers, like @c ecore_evas_init().
1091 * See http://docs.enlightenment.org/auto/ecore/.
1093 * You should be using this if your use is something like the
1094 * following. The buffer engine is just one of the many ones Evas
1097 * @dontinclude evas-buffer-simple.c
1100 * And being the canvas creation something like:
1101 * @skip static Evas *create_canvas
1102 * @until evas_output_viewport_set(canvas,
1104 * Note that this is code creating an Evas canvas with no usage of
1105 * Ecore helpers at all -- no linkage with Ecore on this scenario,
1106 * thus. Again, this wouldn't be on Evas common usage for most
1107 * developers. See the full @ref Example_Evas_Buffer_Simple "example".
1109 * @ingroup Evas_Group
1111 EAPI int evas_init (void);
1116 * @return Evas' init counter value.
1118 * This function finalizes Evas, decrementing the counter of the
1119 * number of calls to the function evas_init(). This new value for the
1120 * counter is returned.
1124 * If you were the sole user of Evas, by means of evas_init(), you can
1125 * check if it's being properly shut down by expecting a return value
1128 * Example code follows.
1129 * @dontinclude evas-buffer-simple.c
1130 * @skip // NOTE: use ecore_evas_buffer_new
1131 * @until evas_shutdown
1132 * Where that function would contain:
1133 * @skip evas_free(canvas)
1134 * @until evas_free(canvas)
1136 * Most users would be using ecore_evas_shutdown() instead, like told
1137 * in evas_init(). See the full @ref Example_Evas_Buffer_Simple
1140 * @ingroup Evas_Group
1142 EAPI int evas_shutdown (void);
1146 * Return if any allocation errors have occurred during the prior function
1147 * @return The allocation error flag
1149 * This function will return if any memory allocation errors occurred during,
1150 * and what kind they were. The return value will be one of
1151 * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED
1152 * with each meaning something different.
1154 * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function
1155 * worked as expected.
1157 * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform
1158 * its job and will have exited as cleanly as possible. The programmer
1159 * should consider this as a sign of very low memory and should try and safely
1160 * recover from the prior functions failure (or try free up memory elsewhere
1161 * and try again after more memory is freed).
1163 * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was
1164 * recovered from by evas finding memory of its own it has allocated and
1165 * freeing what it sees as not really usefully allocated memory. What is freed
1166 * may vary. Evas may reduce the resolution of images, free cached images or
1167 * fonts, trhow out pre-rendered data, reduce the complexity of change lists
1168 * etc. Evas and the program will function as per normal after this, but this
1169 * is a sign of low memory, and it is suggested that the program try and
1170 * identify memory it doesn't need, and free it.
1174 * extern Evas_Object *object;
1175 * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);
1177 * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL);
1178 * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL)
1180 * fprintf(stderr, "ERROR: Completely unable to attach callback. Must\n");
1181 * fprintf(stderr, " destroy object now as it cannot be used.\n");
1182 * evas_object_del(object);
1184 * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
1185 * my_memory_cleanup();
1187 * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED)
1189 * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
1190 * my_memory_cleanup();
1194 * @ingroup Evas_Group
1196 EAPI Evas_Alloc_Error evas_alloc_error (void);
1200 * @brief Get evas' internal asynchronous events read file descriptor.
1202 * @return The canvas' asynchronous events read file descriptor.
1204 * Evas' asynchronous events are meant to be dealt with internally,
1205 * i. e., when building stuff to be glued together into the EFL
1206 * infrastructure -- a module, for example. The context which demands
1207 * its use is when calculations need to be done out of the main
1208 * thread, asynchronously, and some action must be performed after
1211 * An example of actual use of this API is for image asynchronous
1212 * preload inside evas. If the canvas was instantiated through
1213 * ecore-evas usage, ecore itself will take care of calling those
1214 * events' processing.
1216 * This function returns the read file descriptor where to get the
1217 * asynchronous events of the canvas. Naturally, other mainloops,
1218 * apart from ecore, may make use of it.
1220 * @ingroup Evas_Group
1222 EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
1225 * @brief Trigger the processing of all events waiting on the file
1226 * descriptor returned by evas_async_events_fd_get().
1228 * @return The number of events processed.
1230 * All asynchronous events queued up by evas_async_events_put() are
1231 * processed here. More precisely, the callback functions, informed
1232 * together with other event parameters, when queued, get called (with
1233 * those parameters), in that order.
1235 * @ingroup Evas_Group
1237 EAPI int evas_async_events_process (void);
1240 * Insert asynchronous events on the canvas.
1242 * @param target The target to be affected by the events.
1243 * @param type The type of callback function.
1244 * @param event_info Information about the event.
1245 * @param func The callback function pointer.
1247 * This is the way, for a routine running outside evas' main thread,
1248 * to report an asynchronous event. A callback function is informed,
1249 * whose call is to happen after evas_async_events_process() is
1252 * @ingroup Evas_Group
1254 EAPI Eina_Bool evas_async_events_put (const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func) EINA_ARG_NONNULL(1, 4);
1257 * @defgroup Evas_Canvas Canvas Functions
1259 * Low level Evas canvas functions. Sub groups will present more high
1260 * level ones, though.
1262 * Most of these functions deal with low level Evas actions, like:
1263 * @li create/destroy raw canvases, not bound to any displaying engine
1264 * @li tell a canvas i got focused (in a windowing context, for example)
1265 * @li tell a canvas a region should not be calculated anymore in rendering
1266 * @li tell a canvas to render its contents, immediately
1268 * Most users will be using Evas by means of the @c Ecore_Evas
1269 * wrapper, which deals with all the above mentioned issues
1270 * automatically for them. Thus, you'll be looking at this section
1271 * only if you're building low level stuff.
1273 * The groups within present you functions that deal with the canvas
1274 * directly, too, and not yet with its @b objects. They are the
1275 * functions you need to use at a minimum to get a working canvas.
1277 * Some of the funcions in this group are exemplified @ref
1278 * Example_Evas_Events "here".
1282 * Creates a new empty evas.
1284 * Note that before you can use the evas, you will to at a minimum:
1285 * @li Set its render method with @ref evas_output_method_set .
1286 * @li Set its viewport size with @ref evas_output_viewport_set .
1287 * @li Set its size of the canvas with @ref evas_output_size_set .
1288 * @li Ensure that the render engine is given the correct settings
1289 * with @ref evas_engine_info_set .
1291 * This function should only fail if the memory allocation fails
1293 * @note this function is very low level. Instead of using it
1294 * directly, consider using the high level functions in
1295 * Ecore_Evas such as @c ecore_evas_new(). See
1296 * http://docs.enlightenment.org/auto/ecore/.
1298 * @attention it is recommended that one calls evas_init() before
1299 * creating new canvas.
1301 * @return A new uninitialised Evas canvas on success. Otherwise, @c
1303 * @ingroup Evas_Canvas
1305 EAPI Evas *evas_new (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
1308 * Frees the given evas and any objects created on it.
1310 * Any objects with 'free' callbacks will have those callbacks called
1313 * @param e The given evas.
1315 * @ingroup Evas_Canvas
1317 EAPI void evas_free (Evas *e) EINA_ARG_NONNULL(1);
1320 * Inform to the evas that it got the focus.
1322 * @param e The evas to change information.
1323 * @ingroup Evas_Canvas
1325 EAPI void evas_focus_in (Evas *e);
1328 * Inform to the evas that it lost the focus.
1330 * @param e The evas to change information.
1331 * @ingroup Evas_Canvas
1333 EAPI void evas_focus_out (Evas *e);
1336 * Get the focus state known by the given evas
1338 * @param e The evas to query information.
1339 * @ingroup Evas_Canvas
1341 EAPI Eina_Bool evas_focus_state_get (const Evas *e) EINA_PURE;
1344 * Push the nochange flag up 1
1346 * This tells evas, that while the nochange flag is greater than 0, do not
1347 * mark objects as "changed" when making changes.
1349 * @param e The evas to change information.
1350 * @ingroup Evas_Canvas
1352 EAPI void evas_nochange_push (Evas *e);
1355 * Pop the nochange flag down 1
1357 * This tells evas, that while the nochange flag is greater than 0, do not
1358 * mark objects as "changed" when making changes.
1360 * @param e The evas to change information.
1361 * @ingroup Evas_Canvas
1363 EAPI void evas_nochange_pop (Evas *e);
1367 * Attaches a specific pointer to the evas for fetching later
1369 * @param e The canvas to attach the pointer to
1370 * @param data The pointer to attach
1371 * @ingroup Evas_Canvas
1373 EAPI void evas_data_attach_set (Evas *e, void *data) EINA_ARG_NONNULL(1);
1376 * Returns the pointer attached by evas_data_attach_set()
1378 * @param e The canvas to attach the pointer to
1379 * @return The pointer attached
1380 * @ingroup Evas_Canvas
1382 EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1386 * Add a damage rectangle.
1388 * @param e The given canvas pointer.
1389 * @param x The rectangle's left position.
1390 * @param y The rectangle's top position.
1391 * @param w The rectangle's width.
1392 * @param h The rectangle's height.
1394 * This is the function by which one tells evas that a part of the
1395 * canvas has to be repainted.
1397 * @ingroup Evas_Canvas
1399 EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
1402 * Add an "obscured region" to an Evas canvas.
1404 * @param e The given canvas pointer.
1405 * @param x The rectangle's top left corner's horizontal coordinate.
1406 * @param y The rectangle's top left corner's vertical coordinate
1407 * @param w The rectangle's width.
1408 * @param h The rectangle's height.
1410 * This is the function by which one tells an Evas canvas that a part
1411 * of it <b>must not</b> be repainted. The region must be
1412 * rectangular and its coordinates inside the canvas viewport are
1413 * passed in the call. After this call, the region specified won't
1414 * participate in any form in Evas' calculations and actions during
1415 * its rendering updates, having its displaying content frozen as it
1416 * was just after this function took place.
1418 * We call it "obscured region" because the most common use case for
1419 * this rendering (partial) freeze is something else (most problaby
1420 * other canvas) being on top of the specified rectangular region,
1421 * thus shading it completely from the user's final scene in a
1422 * display. To avoid unnecessary processing, one should indicate to the
1423 * obscured canvas not to bother about the non-important area.
1425 * The majority of users won't have to worry about this funcion, as
1426 * they'll be using just one canvas in their applications, with
1427 * nothing inset or on top of it in any form.
1429 * To make this region one that @b has to be repainted again, call the
1430 * function evas_obscured_clear().
1432 * @note This is a <b>very low level function</b>, which most of
1433 * Evas' users wouldn't care about.
1435 * @note This function does @b not flag the canvas as having its state
1436 * changed. If you want to re-render it afterwards expecting new
1437 * contents, you have to add "damage" regions yourself (see
1438 * evas_damage_rectangle_add()).
1440 * @see evas_obscured_clear()
1441 * @see evas_render_updates()
1443 * Example code follows.
1444 * @dontinclude evas-events.c
1445 * @skip add an obscured
1446 * @until evas_obscured_clear(evas);
1448 * In that example, pressing the "Ctrl" and "o" keys will impose or
1449 * remove an obscured region in the middle of the canvas. You'll get
1450 * the same contents at the time the key was pressed, if toggling it
1451 * on, until you toggle it off again (make sure the animation is
1452 * running on to get the idea better). See the full @ref
1453 * Example_Evas_Events "example".
1455 * @ingroup Evas_Canvas
1457 EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
1460 * Remove all "obscured regions" from an Evas canvas.
1462 * @param e The given canvas pointer.
1464 * This function removes all the rectangles from the obscured regions
1465 * list of the canvas @p e. It takes obscured areas added with
1466 * evas_obscured_rectangle_add() and make them again a regions that @b
1467 * have to be repainted on rendering updates.
1469 * @note This is a <b>very low level function</b>, which most of
1470 * Evas' users wouldn't care about.
1472 * @note This function does @b not flag the canvas as having its state
1473 * changed. If you want to re-render it afterwards expecting new
1474 * contents, you have to add "damage" regions yourself (see
1475 * evas_damage_rectangle_add()).
1477 * @see evas_obscured_rectangle_add() for an example
1478 * @see evas_render_updates()
1480 * @ingroup Evas_Canvas
1482 EAPI void evas_obscured_clear (Evas *e) EINA_ARG_NONNULL(1);
1485 * Force immediate renderization of the given Evas canvas.
1487 * @param e The given canvas pointer.
1488 * @return A newly allocated list of updated rectangles of the canvas
1489 * (@c Eina_Rectangle structs). Free this list with
1490 * evas_render_updates_free().
1492 * This function forces an immediate renderization update of the given
1495 * @note This is a <b>very low level function</b>, which most of
1496 * Evas' users wouldn't care about. One would use it, for example, to
1497 * grab an Evas' canvas update regions and paint them back, using the
1498 * canvas' pixmap, on a displaying system working below Evas.
1500 * @note Evas is a stateful canvas. If no operations changing its
1501 * state took place since the last rendering action, you won't see no
1502 * changes and this call will be a no-op.
1504 * Example code follows.
1505 * @dontinclude evas-events.c
1506 * @skip add an obscured
1507 * @until d.obscured = !d.obscured;
1509 * See the full @ref Example_Evas_Events "example".
1511 * @ingroup Evas_Canvas
1513 EAPI Eina_List *evas_render_updates (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1516 * Free the rectangles returned by evas_render_updates().
1518 * @param updates The list of updated rectangles of the canvas.
1520 * This function removes the region from the render updates list. It
1521 * makes the region doesn't be render updated anymore.
1523 * @see evas_render_updates() for an example
1525 * @ingroup Evas_Canvas
1527 EAPI void evas_render_updates_free (Eina_List *updates);
1530 * Force renderization of the given canvas.
1532 * @param e The given canvas pointer.
1534 * @ingroup Evas_Canvas
1536 EAPI void evas_render (Evas *e) EINA_ARG_NONNULL(1);
1539 * Update the canvas internal objects but not triggering immediate
1542 * @param e The given canvas pointer.
1544 * This function updates the canvas internal objects not triggering
1545 * renderization. To force renderization function evas_render() should
1550 * @ingroup Evas_Canvas
1552 EAPI void evas_norender (Evas *e) EINA_ARG_NONNULL(1);
1555 * Make the canvas discard internally cached data used for rendering.
1557 * @param e The given canvas pointer.
1559 * This function flushes the arrays of delete, active and render objects.
1560 * Other things it may also discard are: shared memory segments,
1561 * temporary scratch buffers, cached data to avoid re-compute of that data etc.
1563 * @ingroup Evas_Canvas
1565 EAPI void evas_render_idle_flush (Evas *e) EINA_ARG_NONNULL(1);
1568 * Make the canvas discard as much data as possible used by the engine at
1571 * @param e The given canvas pointer.
1573 * This function will unload images, delete textures and much more, where
1574 * possible. You may also want to call evas_render_idle_flush() immediately
1575 * prior to this to perhaps discard a little more, though evas_render_dump()
1576 * should implicitly delete most of what evas_render_idle_flush() might
1579 * @ingroup Evas_Canvas
1581 EAPI void evas_render_dump (Evas *e) EINA_ARG_NONNULL(1);
1584 * @defgroup Evas_Output_Method Render Engine Functions
1586 * Functions that are used to set the render engine for a given
1587 * function, and then get that engine working.
1589 * The following code snippet shows how they can be used to
1590 * initialise an evas that uses the X11 software engine:
1593 * Evas_Engine_Info_Software_X11 *einfo;
1594 * extern Display *display;
1595 * extern Window win;
1599 * evas = evas_new();
1600 * evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
1601 * evas_output_size_set(evas, 640, 480);
1602 * evas_output_viewport_set(evas, 0, 0, 640, 480);
1603 * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
1604 * einfo->info.display = display;
1605 * einfo->info.visual = DefaultVisual(display, DefaultScreen(display));
1606 * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display));
1607 * einfo->info.drawable = win;
1608 * einfo->info.depth = DefaultDepth(display, DefaultScreen(display));
1609 * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
1612 * @ingroup Evas_Canvas
1616 * Look up a numeric ID from a string name of a rendering engine.
1618 * @param name the name string of an engine
1619 * @return A numeric (opaque) ID for the rendering engine
1620 * @ingroup Evas_Output_Method
1622 * This function looks up a numeric return value for the named engine
1623 * in the string @p name. This is a normal C string, NUL byte
1624 * terminated. The name is case sensitive. If the rendering engine is
1625 * available, a numeric ID for that engine is returned that is not
1626 * 0. If the engine is not available, 0 is returned, indicating an
1629 * The programmer should NEVER rely on the numeric ID of an engine
1630 * unless it is returned by this function. Programs should NOT be
1631 * written accessing render method ID's directly, without first
1632 * obtaining it from this function.
1634 * @attention it is mandatory that one calls evas_init() before
1635 * looking up the render method.
1644 * evas = evas_new();
1647 * fprintf(stderr, "ERROR: Canvas creation failed. Fatal error.\n");
1650 * engine_id = evas_render_method_lookup("software_x11");
1653 * fprintf(stderr, "ERROR: Requested rendering engine is absent.\n");
1656 * evas_output_method_set(evas, engine_id);
1659 EAPI int evas_render_method_lookup (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1662 * List all the rendering engines compiled into the copy of the Evas library
1664 * @return A linked list whose data members are C strings of engine names
1665 * @ingroup Evas_Output_Method
1667 * Calling this will return a handle (pointer) to an Evas linked
1668 * list. Each node in the linked list will have the data pointer be a
1669 * (char *) pointer to the name string of the rendering engine
1670 * available. The strings should never be modified, neither should the
1671 * list be modified. This list should be cleaned up as soon as the
1672 * program no longer needs it using evas_render_method_list_free(). If
1673 * no engines are available from Evas, NULL will be returned.
1677 * Eina_List *engine_list, *l;
1678 * char *engine_name;
1680 * engine_list = evas_render_method_list();
1683 * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
1686 * printf("Available Evas Engines:\n");
1687 * EINA_LIST_FOREACH(engine_list, l, engine_name)
1688 * printf("%s\n", engine_name);
1689 * evas_render_method_list_free(engine_list);
1692 EAPI Eina_List *evas_render_method_list (void) EINA_WARN_UNUSED_RESULT;
1695 * This function should be called to free a list of engine names
1697 * @param list The Eina_List base pointer for the engine list to be freed
1698 * @ingroup Evas_Output_Method
1700 * When this function is called it will free the engine list passed in
1701 * as @p list. The list should only be a list of engines generated by
1702 * calling evas_render_method_list(). If @p list is NULL, nothing will
1707 * Eina_List *engine_list, *l;
1708 * char *engine_name;
1710 * engine_list = evas_render_method_list();
1713 * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
1716 * printf("Available Evas Engines:\n");
1717 * EINA_LIST_FOREACH(engine_list, l, engine_name)
1718 * printf("%s\n", engine_name);
1719 * evas_render_method_list_free(engine_list);
1722 EAPI void evas_render_method_list_free (Eina_List *list);
1726 * Sets the output engine for the given evas.
1728 * Once the output engine for an evas is set, any attempt to change it
1729 * will be ignored. The value for @p render_method can be found using
1730 * @ref evas_render_method_lookup .
1732 * @param e The given evas.
1733 * @param render_method The numeric engine value to use.
1735 * @attention it is mandatory that one calls evas_init() before
1736 * setting the output method.
1738 * @ingroup Evas_Output_Method
1740 EAPI void evas_output_method_set (Evas *e, int render_method) EINA_ARG_NONNULL(1);
1743 * Retrieves the number of the output engine used for the given evas.
1744 * @param e The given evas.
1745 * @return The ID number of the output engine being used. @c 0 is
1746 * returned if there is an error.
1747 * @ingroup Evas_Output_Method
1749 EAPI int evas_output_method_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1753 * Retrieves the current render engine info struct from the given evas.
1755 * The returned structure is publicly modifiable. The contents are
1756 * valid until either @ref evas_engine_info_set or @ref evas_render
1759 * This structure does not need to be freed by the caller.
1761 * @param e The given evas.
1762 * @return A pointer to the Engine Info structure. @c NULL is returned if
1763 * an engine has not yet been assigned.
1764 * @ingroup Evas_Output_Method
1766 EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1769 * Applies the engine settings for the given evas from the given @c
1770 * Evas_Engine_Info structure.
1772 * To get the Evas_Engine_Info structure to use, call @ref
1773 * evas_engine_info_get . Do not try to obtain a pointer to an
1774 * @c Evas_Engine_Info structure in any other way.
1776 * You will need to call this function at least once before you can
1777 * create objects on an evas or render that evas. Some engines allow
1778 * their settings to be changed more than once.
1780 * Once called, the @p info pointer should be considered invalid.
1782 * @param e The pointer to the Evas Canvas
1783 * @param info The pointer to the Engine Info to use
1784 * @return 1 if no error occurred, 0 otherwise
1785 * @ingroup Evas_Output_Method
1787 EAPI Eina_Bool evas_engine_info_set (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1);
1790 * @defgroup Evas_Output_Size Output and Viewport Resizing Functions
1792 * Functions that set and retrieve the output and viewport size of an
1795 * @ingroup Evas_Canvas
1799 * Sets the output size of the render engine of the given evas.
1801 * The evas will render to a rectangle of the given size once this
1802 * function is called. The output size is independent of the viewport
1803 * size. The viewport will be stretched to fill the given rectangle.
1805 * The units used for @p w and @p h depend on the engine used by the
1808 * @param e The given evas.
1809 * @param w The width in output units, usually pixels.
1810 * @param h The height in output units, usually pixels.
1811 * @ingroup Evas_Output_Size
1813 EAPI void evas_output_size_set (Evas *e, int w, int h) EINA_ARG_NONNULL(1);
1816 * Retrieve the output size of the render engine of the given evas.
1818 * The output size is given in whatever the output units are for the
1821 * If either @p w or @p h is @c NULL, then it is ignored. If @p e is
1822 * invalid, the returned results are undefined.
1824 * @param e The given evas.
1825 * @param w The pointer to an integer to store the width in.
1826 * @param h The pointer to an integer to store the height in.
1827 * @ingroup Evas_Output_Size
1829 EAPI void evas_output_size_get (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1);
1832 * Sets the output viewport of the given evas in evas units.
1834 * The output viewport is the area of the evas that will be visible to
1835 * the viewer. The viewport will be stretched to fit the output
1836 * target of the evas when rendering is performed.
1838 * @note The coordinate values do not have to map 1-to-1 with the output
1839 * target. However, it is generally advised that it is done for ease
1842 * @param e The given evas.
1843 * @param x The top-left corner x value of the viewport.
1844 * @param y The top-left corner y value of the viewport.
1845 * @param w The width of the viewport. Must be greater than 0.
1846 * @param h The height of the viewport. Must be greater than 0.
1847 * @ingroup Evas_Output_Size
1849 EAPI void evas_output_viewport_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
1852 * Get the render engine's output viewport co-ordinates in canvas units.
1853 * @param e The pointer to the Evas Canvas
1854 * @param x The pointer to a x variable to be filled in
1855 * @param y The pointer to a y variable to be filled in
1856 * @param w The pointer to a width variable to be filled in
1857 * @param h The pointer to a height variable to be filled in
1858 * @ingroup Evas_Output_Size
1860 * Calling this function writes the current canvas output viewport
1861 * size and location values into the variables pointed to by @p x, @p
1862 * y, @p w and @p h. On success the variables have the output
1863 * location and size values written to them in canvas units. Any of @p
1864 * x, @p y, @p w or @p h that are NULL will not be written to. If @p e
1865 * is invalid, the results are undefined.
1869 * extern Evas *evas;
1870 * Evas_Coord x, y, width, height;
1872 * evas_output_viewport_get(evas, &x, &y, &w, &h);
1875 EAPI void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1878 * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions
1880 * Functions that are used to map coordinates from the canvas to the
1881 * screen or the screen to the canvas.
1883 * @ingroup Evas_Canvas
1887 * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
1889 * @param e The pointer to the Evas Canvas
1890 * @param x The screen/output x co-ordinate
1891 * @return The screen co-ordinate translated to canvas unit co-ordinates
1892 * @ingroup Evas_Coord_Mapping_Group
1894 * This function takes in a horizontal co-ordinate as the @p x
1895 * parameter and converts it into canvas units, accounting for output
1896 * size, viewport size and location, returning it as the function
1897 * return value. If @p e is invalid, the results are undefined.
1901 * extern Evas *evas;
1902 * extern int screen_x;
1903 * Evas_Coord canvas_x;
1905 * canvas_x = evas_coord_screen_x_to_world(evas, screen_x);
1908 EAPI Evas_Coord evas_coord_screen_x_to_world (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1911 * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
1913 * @param e The pointer to the Evas Canvas
1914 * @param y The screen/output y co-ordinate
1915 * @return The screen co-ordinate translated to canvas unit co-ordinates
1916 * @ingroup Evas_Coord_Mapping_Group
1918 * This function takes in a vertical co-ordinate as the @p y parameter
1919 * and converts it into canvas units, accounting for output size,
1920 * viewport size and location, returning it as the function return
1921 * value. If @p e is invalid, the results are undefined.
1925 * extern Evas *evas;
1926 * extern int screen_y;
1927 * Evas_Coord canvas_y;
1929 * canvas_y = evas_coord_screen_y_to_world(evas, screen_y);
1932 EAPI Evas_Coord evas_coord_screen_y_to_world (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1935 * Convert/scale a canvas co-ordinate into output screen co-ordinates
1937 * @param e The pointer to the Evas Canvas
1938 * @param x The canvas x co-ordinate
1939 * @return The output/screen co-ordinate translated to output co-ordinates
1940 * @ingroup Evas_Coord_Mapping_Group
1942 * This function takes in a horizontal co-ordinate as the @p x
1943 * parameter and converts it into output units, accounting for output
1944 * size, viewport size and location, returning it as the function
1945 * return value. If @p e is invalid, the results are undefined.
1949 * extern Evas *evas;
1951 * extern Evas_Coord canvas_x;
1953 * screen_x = evas_coord_world_x_to_screen(evas, canvas_x);
1956 EAPI int evas_coord_world_x_to_screen (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1959 * Convert/scale a canvas co-ordinate into output screen co-ordinates
1961 * @param e The pointer to the Evas Canvas
1962 * @param y The canvas y co-ordinate
1963 * @return The output/screen co-ordinate translated to output co-ordinates
1964 * @ingroup Evas_Coord_Mapping_Group
1966 * This function takes in a vertical co-ordinate as the @p x parameter
1967 * and converts it into output units, accounting for output size,
1968 * viewport size and location, returning it as the function return
1969 * value. If @p e is invalid, the results are undefined.
1973 * extern Evas *evas;
1975 * extern Evas_Coord canvas_y;
1977 * screen_y = evas_coord_world_y_to_screen(evas, canvas_y);
1980 EAPI int evas_coord_world_y_to_screen (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1983 * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions
1985 * Functions that deal with the status of the pointer (mouse cursor).
1987 * @ingroup Evas_Canvas
1991 * This function returns the current known pointer co-ordinates
1993 * @param e The pointer to the Evas Canvas
1994 * @param x The pointer to an integer to be filled in
1995 * @param y The pointer to an integer to be filled in
1996 * @ingroup Evas_Pointer_Group
1998 * This function returns the current known screen/output co-ordinates
1999 * of the mouse pointer and sets the contents of the integers pointed
2000 * to by @p x and @p y to contain these co-ordinates. If @p e is not a
2001 * valid canvas the results of this function are undefined.
2005 * extern Evas *evas;
2006 * int mouse_x, mouse_y;
2008 * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y);
2009 * printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y);
2012 EAPI void evas_pointer_output_xy_get (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1);
2015 * This function returns the current known pointer co-ordinates
2017 * @param e The pointer to the Evas Canvas
2018 * @param x The pointer to a Evas_Coord to be filled in
2019 * @param y The pointer to a Evas_Coord to be filled in
2020 * @ingroup Evas_Pointer_Group
2022 * This function returns the current known canvas unit co-ordinates of
2023 * the mouse pointer and sets the contents of the Evas_Coords pointed
2024 * to by @p x and @p y to contain these co-ordinates. If @p e is not a
2025 * valid canvas the results of this function are undefined.
2029 * extern Evas *evas;
2030 * Evas_Coord mouse_x, mouse_y;
2032 * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y);
2033 * printf("Mouse is at canvas position %f, %f\n", mouse_x, mouse_y);
2036 EAPI void evas_pointer_canvas_xy_get (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1);
2039 * Returns a bitmask with the mouse buttons currently pressed, set to 1
2041 * @param e The pointer to the Evas Canvas
2042 * @return A bitmask of the currently depressed buttons on the cavas
2043 * @ingroup Evas_Pointer_Group
2045 * Calling this function will return a 32-bit integer with the
2046 * appropriate bits set to 1 that correspond to a mouse button being
2047 * depressed. This limits Evas to a mouse devices with a maximum of 32
2048 * buttons, but that is generally in excess of any host system's
2049 * pointing device abilities.
2051 * A canvas by default begins with no mouse buttons being pressed and
2052 * only calls to evas_event_feed_mouse_down(),
2053 * evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and
2054 * evas_event_feed_mouse_up_data() will alter that.
2056 * The least significant bit corresponds to the first mouse button
2057 * (button 1) and the most significant bit corresponds to the last
2058 * mouse button (button 32).
2060 * If @p e is not a valid canvas, the return value is undefined.
2064 * extern Evas *evas;
2065 * int button_mask, i;
2067 * button_mask = evas_pointer_button_down_mask_get(evas);
2068 * printf("Buttons currently pressed:\n");
2069 * for (i = 0; i < 32; i++)
2071 * if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1);
2075 EAPI int evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2078 * Returns whether the mouse pointer is logically inside the canvas
2080 * @param e The pointer to the Evas Canvas
2081 * @return An integer that is 1 if the mouse is inside the canvas, 0 otherwise
2082 * @ingroup Evas_Pointer_Group
2084 * When this function is called it will return a value of either 0 or
2085 * 1, depending on if evas_event_feed_mouse_in(),
2086 * evas_event_feed_mouse_in_data(), or evas_event_feed_mouse_out(),
2087 * evas_event_feed_mouse_out_data() have been called to feed in a
2088 * mouse enter event into the canvas.
2090 * A return value of 1 indicates the mouse is logically inside the
2091 * canvas, and 0 implies it is logically outside the canvas.
2093 * A canvas begins with the mouse being assumed outside (0).
2095 * If @p e is not a valid canvas, the return value is undefined.
2099 * extern Evas *evas;
2101 * if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n");
2102 * else printf("Mouse is out!\n");
2105 EAPI Eina_Bool evas_pointer_inside_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2106 EAPI void evas_sync(Evas *e) EINA_ARG_NONNULL(1);
2109 * @defgroup Evas_Canvas_Events Canvas Events
2111 * Functions relating to canvas events, which are mainly reports on
2112 * its internal states changing (an object got focused, the rendering
2115 * Some of the funcions in this group are exemplified @ref
2116 * Example_Evas_Events "here".
2118 * @ingroup Evas_Canvas
2122 * @addtogroup Evas_Canvas_Events
2127 * Add (register) a callback function to a given canvas event.
2129 * @param e Canvas to attach a callback to
2130 * @param type The type of event that will trigger the callback
2131 * @param func The (callback) function to be called when the event is
2133 * @param data The data pointer to be passed to @p func
2135 * This function adds a function callback to the canvas @p e when the
2136 * event of type @p type occurs on it. The function pointer is @p
2139 * In the event of a memory allocation error during the addition of
2140 * the callback to the canvas, evas_alloc_error() should be used to
2141 * determine the nature of the error, if any, and the program should
2142 * sensibly try and recover.
2144 * A callback function must have the ::Evas_Event_Cb prototype
2145 * definition. The first parameter (@p data) in this definition will
2146 * have the same value passed to evas_event_callback_add() as the @p
2147 * data parameter, at runtime. The second parameter @p e is the canvas
2148 * pointer on which the event occurred. The third parameter @p
2149 * event_info is a pointer to a data structure that may or may not be
2150 * passed to the callback, depending on the event type that triggered
2151 * the callback. This is so because some events don't carry extra
2152 * context with them, but others do.
2154 * The event type @p type to trigger the function may be one of
2155 * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST,
2156 * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT,
2157 * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN and
2158 * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT. This determines the kind of
2159 * event that will trigger the callback to be called. Only the last
2160 * two of the event types listed here provide useful event information
2161 * data -- a pointer to the recently focused Evas object. For the
2162 * others the @p event_info pointer is going to be @c NULL.
2165 * @dontinclude evas-events.c
2166 * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE
2167 * @until two canvas event callbacks
2169 * Looking to the callbacks registered above,
2170 * @dontinclude evas-events.c
2171 * @skip called when our rectangle gets focus
2172 * @until let's have our events back
2174 * we see that the canvas flushes its rendering pipeline
2175 * (#EVAS_CALLBACK_RENDER_FLUSH_PRE) whenever the @c _resize_cb
2176 * routine takes place: it has to redraw that image at a different
2177 * size. Also, the callback on an object being focused comes just
2178 * after we focus it explicitly, on code.
2180 * See the full @ref Example_Evas_Events "example".
2182 * @note Be careful not to add the same callback multiple times, if
2183 * that's not what you want, because Evas won't check if a callback
2184 * existed before exactly as the one being registered (and thus, call
2185 * it more than once on the event, in this case). This would make
2186 * sense if you passed different functions and/or callback data, only.
2188 EAPI void evas_event_callback_add (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
2191 * Add (register) a callback function to a given canvas event with a
2192 * non-default priority set. Except for the priority field, it's exactly the
2193 * same as @ref evas_event_callback_add
2195 * @param e Canvas to attach a callback to
2196 * @param type The type of event that will trigger the callback
2197 * @param priority The priority of the callback, lower values called first.
2198 * @param func The (callback) function to be called when the event is
2200 * @param data The data pointer to be passed to @p func
2202 * @see evas_event_callback_add
2205 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);
2208 * Delete a callback function from the canvas.
2210 * @param e Canvas to remove a callback from
2211 * @param type The type of event that was triggering the callback
2212 * @param func The function that was to be called when the event was triggered
2213 * @return The data pointer that was to be passed to the callback
2215 * This function removes the most recently added callback from the
2216 * canvas @p e which was triggered by the event type @p type and was
2217 * calling the function @p func when triggered. If the removal is
2218 * successful it will also return the data pointer that was passed to
2219 * evas_event_callback_add() when the callback was added to the
2220 * canvas. If not successful NULL will be returned.
2226 * void focus_in_callback(void *data, Evas *e, void *event_info);
2228 * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback);
2231 EAPI void *evas_event_callback_del (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
2234 * Delete (unregister) a callback function registered to a given
2237 * @param e Canvas to remove an event callback from
2238 * @param type The type of event that was triggering the callback
2239 * @param func The function that was to be called when the event was
2241 * @param data The data pointer that was to be passed to the callback
2242 * @return The data pointer that was to be passed to the callback
2244 * This function removes <b>the first</b> added callback from the
2245 * canvas @p e matching the event type @p type, the registered
2246 * function pointer @p func and the callback data pointer @p data. If
2247 * the removal is successful it will also return the data pointer that
2248 * was passed to evas_event_callback_add() (that will be the same as
2249 * the parameter) when the callback(s) was(were) added to the
2250 * canvas. If not successful @c NULL will be returned. A common use
2251 * would be to remove an exact match of a callback.
2254 * @dontinclude evas-events.c
2255 * @skip evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
2256 * @until _object_focus_in_cb, NULL);
2258 * See the full @ref Example_Evas_Events "example".
2260 * @note For deletion of canvas events callbacks filtering by just
2261 * type and function pointer, user evas_event_callback_del().
2263 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);
2266 * Push a callback on the post-event callback stack
2268 * @param e Canvas to push the callback on
2269 * @param func The function that to be called when the stack is unwound
2270 * @param data The data pointer to be passed to the callback
2272 * Evas has a stack of callbacks that get called after all the callbacks for
2273 * an event have triggered (all the objects it triggers on and al the callbacks
2274 * in each object triggered). When all these have been called, the stack is
2275 * unwond from most recently to least recently pushed item and removed from the
2276 * stack calling the callback set for it.
2278 * This is intended for doing reverse logic-like processing, example - when a
2279 * child object that happens to get the event later is meant to be able to
2280 * "steal" functions from a parent and thus on unwind of this stack hav its
2281 * function called first, thus being able to set flags, or return 0 from the
2282 * post-callback that stops all other post-callbacks in the current stack from
2283 * being called (thus basically allowing a child to take control, if the event
2284 * callback prepares information ready for taking action, but the post callback
2285 * actually does the action).
2288 EAPI void evas_post_event_callback_push (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
2291 * Remove a callback from the post-event callback stack
2293 * @param e Canvas to push the callback on
2294 * @param func The function that to be called when the stack is unwound
2296 * This removes a callback from the stack added with
2297 * evas_post_event_callback_push(). The first instance of the function in
2298 * the callback stack is removed from being executed when the stack is
2299 * unwound. Further instances may still be run on unwind.
2301 EAPI void evas_post_event_callback_remove (Evas *e, Evas_Object_Event_Post_Cb func);
2304 * Remove a callback from the post-event callback stack
2306 * @param e Canvas to push the callback on
2307 * @param func The function that to be called when the stack is unwound
2308 * @param data The data pointer to be passed to the callback
2310 * This removes a callback from the stack added with
2311 * evas_post_event_callback_push(). The first instance of the function and data
2312 * in the callback stack is removed from being executed when the stack is
2313 * unwound. Further instances may still be run on unwind.
2315 EAPI void evas_post_event_callback_remove_full (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
2318 * @defgroup Evas_Event_Freezing_Group Input Events Freezing Functions
2320 * Functions that deal with the freezing of input event processing of
2323 * There might be scenarios during a graphical user interface
2324 * program's use when the developer whishes the users wouldn't be able
2325 * to deliver input events to this application. It may, for example,
2326 * be the time for it to populate a view or to change some
2327 * layout. Assuming proper behavior with user interaction during this
2328 * exact time would be hard, as things are in a changing state. The
2329 * programmer can then tell the canvas to ignore input events,
2330 * bringing it back to normal behavior when he/she wants.
2332 * Some of the funcions in this group are exemplified @ref
2333 * Example_Evas_Events "here".
2335 * @ingroup Evas_Canvas_Events
2339 * @addtogroup Evas_Event_Freezing_Group
2344 * Freeze all input events processing.
2346 * @param e The canvas to freeze input events processing on.
2348 * This function will indicate to Evas that the canvas @p e is to have
2349 * all input event processing frozen until a matching
2350 * evas_event_thaw() function is called on the same canvas. All events
2351 * of this kind during the freeze will get @b discarded. Every freeze
2352 * call must be matched by a thaw call in order to completely thaw out
2353 * a canvas (i.e. these calls may be nested). The most common use is
2354 * when you don't want the user to interect with your user interface
2355 * when you're populating a view or changing the layout.
2358 * @dontinclude evas-events.c
2359 * @skip freeze input for 3 seconds
2361 * @dontinclude evas-events.c
2362 * @skip let's have our events back
2365 * See the full @ref Example_Evas_Events "example".
2367 * If you run that example, you'll see the canvas ignoring all input
2368 * events for 3 seconds, when the "f" key is pressed. In a more
2369 * realistic code we would be freezing while a toolkit or Edje was
2370 * doing some UI changes, thawing it back afterwards.
2372 EAPI void evas_event_freeze (Evas *e) EINA_ARG_NONNULL(1);
2375 * Thaw a canvas out after freezing (for input events).
2377 * @param e The canvas to thaw out.
2379 * This will thaw out a canvas after a matching evas_event_freeze()
2380 * call. If this call completely thaws out a canvas, i.e., there's no
2381 * other unbalanced call to evas_event_freeze(), events will start to
2382 * be processed again, but any "missed" events will @b not be
2385 * See evas_event_freeze() for an example.
2387 EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONNULL(1);
2390 * Return the freeze count on input events of a given canvas.
2392 * @param e The canvas to fetch the freeze count from.
2394 * This returns the number of times the canvas has been told to freeze
2395 * input events. It is possible to call evas_event_freeze() multiple
2396 * times, and these must be matched by evas_event_thaw() calls. This
2397 * call allows the program to discover just how many times things have
2398 * been frozen in case it may want to break out of a deep freeze state
2399 * where the count is high.
2403 * extern Evas *evas;
2405 * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
2409 EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2412 * After thaw of a canvas, re-evaluate the state of objects and call callbacks
2414 * @param e The canvas to evaluate after a thaw
2416 * This is normally called after evas_event_thaw() to re-evaluate mouse
2417 * containment and other states and thus also call callbacks for mouse in and
2418 * out on new objects if the state change demands it.
2420 EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONNULL(1);
2427 * @defgroup Evas_Event_Feeding_Group Input Events Feeding Functions
2429 * Functions to tell Evas that input events happened and should be
2432 * As explained in @ref intro_not_evas, Evas does not know how to poll
2433 * for input events, so the developer should do it and then feed such
2434 * events to the canvas to be processed. This is only required if
2435 * operating Evas directly. Modules such as Ecore_Evas do that for
2438 * Some of the funcions in this group are exemplified @ref
2439 * Example_Evas_Events "here".
2441 * @ingroup Evas_Canvas_Events
2445 * @addtogroup Evas_Event_Feeding_Group
2450 * Mouse down event feed.
2452 * @param e The given canvas pointer.
2453 * @param b The button number.
2454 * @param flags The evas button flags.
2455 * @param timestamp The timestamp of the mouse down event.
2456 * @param data The data for canvas.
2458 * This function will set some evas properties that is necessary when
2459 * the mouse button is pressed. It prepares information to be treated
2460 * by the callback function.
2463 EAPI void evas_event_feed_mouse_down (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2466 * Mouse up event feed.
2468 * @param e The given canvas pointer.
2469 * @param b The button number.
2470 * @param flags evas button flags.
2471 * @param timestamp The timestamp of the mouse up event.
2472 * @param data The data for canvas.
2474 * This function will set some evas properties that is necessary when
2475 * the mouse button is released. It prepares information to be treated
2476 * by the callback function.
2479 EAPI void evas_event_feed_mouse_up (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2482 * Mouse move event feed.
2484 * @param e The given canvas pointer.
2485 * @param x The horizontal position of the mouse pointer.
2486 * @param y The vertical position of the mouse pointer.
2487 * @param timestamp The timestamp of the mouse up event.
2488 * @param data The data for canvas.
2490 * This function will set some evas properties that is necessary when
2491 * the mouse is moved from its last position. It prepares information
2492 * to be treated by the callback function.
2495 EAPI void evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2498 * Mouse in event feed.
2500 * @param e The given canvas pointer.
2501 * @param timestamp The timestamp of the mouse up event.
2502 * @param data The data for canvas.
2504 * This function will set some evas properties that is necessary when
2505 * the mouse in event happens. It prepares information to be treated
2506 * by the callback function.
2509 EAPI void evas_event_feed_mouse_in (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2512 * Mouse out event feed.
2514 * @param e The given canvas pointer.
2515 * @param timestamp Timestamp of the mouse up event.
2516 * @param data The data for canvas.
2518 * This function will set some evas properties that is necessary when
2519 * the mouse out event happens. It prepares information to be treated
2520 * by the callback function.
2523 EAPI void evas_event_feed_mouse_out (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2524 EAPI void evas_event_feed_multi_down (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
2525 EAPI void evas_event_feed_multi_up (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, Evas_Button_Flags flags, unsigned int timestamp, const void *data);
2526 EAPI void evas_event_feed_multi_move (Evas *e, int d, int x, int y, double rad, double radx, double rady, double pres, double ang, double fx, double fy, unsigned int timestamp, const void *data);
2529 * Mouse cancel event feed.
2531 * @param e The given canvas pointer.
2532 * @param timestamp The timestamp of the mouse up event.
2533 * @param data The data for canvas.
2535 * This function will call evas_event_feed_mouse_up() when a
2536 * mouse cancel event happens.
2539 EAPI void evas_event_feed_mouse_cancel (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2542 * Mouse wheel event feed.
2544 * @param e The given canvas pointer.
2545 * @param direction The wheel mouse direction.
2546 * @param z How much mouse wheel was scrolled up or down.
2547 * @param timestamp The timestamp of the mouse up event.
2548 * @param data The data for canvas.
2550 * This function will set some evas properties that is necessary when
2551 * the mouse wheel is scrolled up or down. It prepares information to
2552 * be treated by the callback function.
2555 EAPI void evas_event_feed_mouse_wheel (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2558 * Key down event feed
2560 * @param e The canvas to thaw out
2561 * @param keyname Name of the key
2562 * @param key The key pressed.
2563 * @param string A String
2564 * @param compose The compose string
2565 * @param timestamp Timestamp of the mouse up event
2566 * @param data Data for canvas.
2568 * This function will set some evas properties that is necessary when
2569 * a key is pressed. It prepares information to be treated by the
2570 * callback function.
2573 EAPI void evas_event_feed_key_down (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2578 * @param e The canvas to thaw out
2579 * @param keyname Name of the key
2580 * @param key The key released.
2581 * @param string string
2582 * @param compose compose
2583 * @param timestamp Timestamp of the mouse up event
2584 * @param data Data for canvas.
2586 * This function will set some evas properties that is necessary when
2587 * a key is released. It prepares information to be treated by the
2588 * callback function.
2591 EAPI void evas_event_feed_key_up (Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2596 * @param e The given canvas pointer.
2597 * @param hold The hold.
2598 * @param timestamp The timestamp of the mouse up event.
2599 * @param data The data for canvas.
2601 * This function makes the object to stop sending events.
2604 EAPI void evas_event_feed_hold (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2609 * @param e The given canvas pointer.
2610 * @param event_copy the event to refeed
2611 * @param event_type Event type
2613 * This function re-feeds the event pointed by event_copy
2615 * This function call evas_event_feed_* functions, so it can
2616 * cause havoc if not used wisely. Please use it responsibly.
2618 EAPI void evas_event_refeed_event (Evas *e, void *event_copy, Evas_Callback_Type event_type) EINA_ARG_NONNULL(1);
2630 * @defgroup Evas_Image_Group Image Functions
2632 * Functions that deals with images at canvas level.
2634 * @ingroup Evas_Canvas
2638 * @addtogroup Evas_Image_Group
2643 * Flush the image cache of the canvas.
2645 * @param e The given evas pointer.
2647 * This function flushes image cache of canvas.
2650 EAPI void evas_image_cache_flush (Evas *e) EINA_ARG_NONNULL(1);
2653 * Reload the image cache
2655 * @param e The given evas pointer.
2657 * This function reloads the image cache of canvas.
2660 EAPI void evas_image_cache_reload (Evas *e) EINA_ARG_NONNULL(1);
2663 * Set the image cache.
2665 * @param e The given evas pointer.
2666 * @param size The cache size.
2668 * This function sets the image cache of canvas in bytes.
2671 EAPI void evas_image_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1);
2674 * Get the image cache
2676 * @param e The given evas pointer.
2678 * This function returns the image cache size of canvas in bytes.
2681 EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2684 * Get the maximum image size evas can possibly handle
2686 * @param e The given evas pointer.
2687 * @param maxw Pointer to hold the return value in pixels of the maxumum width
2688 * @param maxh Pointer to hold the return value in pixels of the maximum height
2690 * This function returns the larges image or surface size that evas can handle
2691 * in pixels, and if there is one, returns EINA_TRUE. It returns EINA_FALSE
2692 * if no extra constraint on maximum image size exists. You still should
2693 * check the return values of @p maxw and @p maxh as there may still be a
2694 * limit, just a much higher one.
2698 EAPI Eina_Bool evas_image_max_size_get (const Evas *e, int *maxw, int *maxh) EINA_ARG_NONNULL(1) EINA_PURE;
2705 * @defgroup Evas_Font_Group Font Functions
2707 * Functions that deals with fonts.
2709 * @ingroup Evas_Canvas
2713 * Changes the font hinting for the given evas.
2715 * @param e The given evas.
2716 * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE,
2717 * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
2718 * @ingroup Evas_Font_Group
2720 EAPI void evas_font_hinting_set (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1);
2723 * Retrieves the font hinting used by the given evas.
2725 * @param e The given evas to query.
2726 * @return The hinting in use, one of #EVAS_FONT_HINTING_NONE,
2727 * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
2728 * @ingroup Evas_Font_Group
2730 EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2733 * Checks if the font hinting is supported by the given evas.
2735 * @param e The given evas to query.
2736 * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE,
2737 * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
2738 * @return @c EINA_TRUE if it is supported, @c EINA_FALSE otherwise.
2739 * @ingroup Evas_Font_Group
2741 EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2745 * Force the given evas and associated engine to flush its font cache.
2747 * @param e The given evas to flush font cache.
2748 * @ingroup Evas_Font_Group
2750 EAPI void evas_font_cache_flush (Evas *e) EINA_ARG_NONNULL(1);
2753 * Changes the size of font cache of the given evas.
2755 * @param e The given evas to flush font cache.
2756 * @param size The size, in bytes.
2758 * @ingroup Evas_Font_Group
2760 EAPI void evas_font_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1);
2763 * Changes the size of font cache of the given evas.
2765 * @param e The given evas to flush font cache.
2766 * @return The size, in bytes.
2768 * @ingroup Evas_Font_Group
2770 EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2774 * List of available font descriptions known or found by this evas.
2776 * The list depends on Evas compile time configuration, such as
2777 * fontconfig support, and the paths provided at runtime as explained
2778 * in @ref Evas_Font_Path_Group.
2780 * @param e The evas instance to query.
2781 * @return a newly allocated list of strings. Do not change the
2782 * strings. Be sure to call evas_font_available_list_free()
2783 * after you're done.
2785 * @ingroup Evas_Font_Group
2787 EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2790 * Free list of font descriptions returned by evas_font_dir_available_list().
2792 * @param e The evas instance that returned such list.
2793 * @param available the list returned by evas_font_dir_available_list().
2795 * @ingroup Evas_Font_Group
2797 EAPI void evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
2800 * @defgroup Evas_Font_Path_Group Font Path Functions
2802 * Functions that edit the paths being used to load fonts.
2804 * @ingroup Evas_Font_Group
2808 * Removes all font paths loaded into memory for the given evas.
2809 * @param e The given evas.
2810 * @ingroup Evas_Font_Path_Group
2812 EAPI void evas_font_path_clear (Evas *e) EINA_ARG_NONNULL(1);
2815 * Appends a font path to the list of font paths used by the given evas.
2816 * @param e The given evas.
2817 * @param path The new font path.
2818 * @ingroup Evas_Font_Path_Group
2820 EAPI void evas_font_path_append (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
2823 * Prepends a font path to the list of font paths used by the given evas.
2824 * @param e The given evas.
2825 * @param path The new font path.
2826 * @ingroup Evas_Font_Path_Group
2828 EAPI void evas_font_path_prepend (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
2831 * Retrieves the list of font paths used by the given evas.
2832 * @param e The given evas.
2833 * @return The list of font paths used.
2834 * @ingroup Evas_Font_Path_Group
2836 EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2839 * @defgroup Evas_Object_Group Generic Object Functions
2841 * Functions that manipulate generic Evas objects.
2843 * All Evas displaying units are Evas objects. One handles them all by
2844 * means of the handle ::Evas_Object. Besides Evas treats their
2845 * objects equally, they have @b types, which define their specific
2846 * behavior (and individual API).
2848 * Evas comes with a set of built-in object types:
2856 * These functions apply to @b any Evas object, whichever type thay
2859 * @note The built-in types which are most used are rectangles, text
2860 * and images. In fact, with these ones one can create 2D interfaces
2861 * of arbitrary complexity and EFL makes it easy.
2865 * @defgroup Evas_Object_Group_Basic Basic Object Manipulation
2867 * Methods that are broadly used, like those that change the color,
2868 * clippers and geometry of an Evas object.
2870 * An example on the most used functions in this group can be seen @ref
2871 * Example_Evas_Object_Manipulation "here".
2873 * For function dealing with stacking, the examples are gathered @ref
2874 * Example_Evas_Stacking "here".
2876 * @ingroup Evas_Object_Group
2880 * @addtogroup Evas_Object_Group_Basic
2885 * Clip one object to another.
2887 * @param obj The object to be clipped
2888 * @param clip The object to clip @p obj by
2890 * This function will clip the object @p obj to the area occupied by
2891 * the object @p clip. This means the object @p obj will only be
2892 * visible within the area occupied by the clipping object (@p clip).
2894 * The color of the object being clipped will be multiplied by the
2895 * color of the clipping one, so the resulting color for the former
2896 * will be <code>RESULT = (OBJ * CLIP) / (255 * 255)</code>, per color
2897 * element (red, green, blue and alpha).
2899 * Clipping is recursive, so clipping objects may be clipped by
2900 * others, and their color will in term be multiplied. You may @b not
2901 * set up circular clipping lists (i.e. object 1 clips object 2, which
2902 * clips object 1): the behavior of Evas is undefined in this case.
2904 * Objects which do not clip others are visible in the canvas as
2905 * normal; <b>those that clip one or more objects become invisible
2906 * themselves</b>, only affecting what they clip. If an object ceases
2907 * to have other objects being clipped by it, it will become visible
2910 * The visibility of an object affects the objects that are clipped by
2911 * it, so if the object clipping others is not shown (as in
2912 * evas_object_show()), the objects clipped by it will not be shown
2915 * If @p obj was being clipped by another object when this function is
2916 * called, it gets implicitly removed from the old clipper's domain
2917 * and is made now to be clipped by its new clipper.
2919 * The following figure illustrates some clipping in Evas:
2921 * @image html clipping.png
2922 * @image rtf clipping.png
2923 * @image latex clipping.eps
2925 * @note At the moment the <b>only objects that can validly be used to
2926 * clip other objects are rectangle objects</b>. All other object
2927 * types are invalid and the result of using them is undefined. The
2928 * clip object @p clip must be a valid object, but can also be @c
2929 * NULL, in which case the effect of this function is the same as
2930 * calling evas_object_clip_unset() on the @p obj object.
2933 * @dontinclude evas-object-manipulation.c
2934 * @skip solid white clipper (note that it's the default color for a
2935 * @until evas_object_show(d.clipper);
2937 * See the full @ref Example_Evas_Object_Manipulation "example".
2939 EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2);
2942 * Get the object clipping @p obj (if any).
2944 * @param obj The object to get the clipper from
2946 * This function returns the object clipping @p obj. If @p obj is
2947 * not being clipped at all, @c NULL is returned. The object @p obj
2948 * must be a valid ::Evas_Object.
2950 * See also evas_object_clip_set(), evas_object_clip_unset() and
2951 * evas_object_clipees_get().
2954 * @dontinclude evas-object-manipulation.c
2955 * @skip if (evas_object_clip_get(d.img) == d.clipper)
2958 * See the full @ref Example_Evas_Object_Manipulation "example".
2960 EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2963 * Disable/cease clipping on a clipped @p obj object.
2965 * @param obj The object to cease clipping on
2967 * This function disables clipping for the object @p obj, if it was
2968 * already clipped, i.e., its visibility and color get detached from
2969 * the previous clipper. If it wasn't, this has no effect. The object
2970 * @p obj must be a valid ::Evas_Object.
2972 * See also evas_object_clip_set() (for an example),
2973 * evas_object_clipees_get() and evas_object_clip_get().
2976 EAPI void evas_object_clip_unset (Evas_Object *obj);
2979 * Return a list of objects currently clipped by @p obj.
2981 * @param obj The object to get a list of clippees from
2982 * @return a list of objects being clipped by @p obj
2984 * This returns the internal list handle that contains all objects
2985 * clipped by the object @p obj. If none are clipped by it, the call
2986 * returns @c NULL. This list is only valid until the clip list is
2987 * changed and should be fetched again with another call to
2988 * evas_object_clipees_get() if any objects being clipped by this
2989 * object are unclipped, clipped by a new object, deleted or get the
2990 * clipper deleted. These operations will invalidate the list
2991 * returned, so it should not be used anymore after that point. Any
2992 * use of the list after this may have undefined results, possibly
2993 * leading to crashes. The object @p obj must be a valid
2996 * See also evas_object_clip_set(), evas_object_clip_unset() and
2997 * evas_object_clip_get().
3001 * extern Evas_Object *obj;
3002 * Evas_Object *clipper;
3004 * clipper = evas_object_clip_get(obj);
3007 * Eina_List *clippees, *l;
3008 * Evas_Object *obj_tmp;
3010 * clippees = evas_object_clipees_get(clipper);
3011 * printf("Clipper clips %i objects\n", eina_list_count(clippees));
3012 * EINA_LIST_FOREACH(clippees, l, obj_tmp)
3013 * evas_object_show(obj_tmp);
3017 EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3021 * Sets or unsets a given object as the currently focused one on its
3024 * @param obj The object to be focused or unfocused.
3025 * @param focus @c EINA_TRUE, to set it as focused or @c EINA_FALSE,
3026 * to take away the focus from it.
3028 * Changing focus only affects where (key) input events go. There can
3029 * be only one object focused at any time. If @p focus is @c
3030 * EINA_TRUE, @p obj will be set as the currently focused object and
3031 * it will receive all keyboard events that are not exclusive key
3032 * grabs on other objects.
3035 * @dontinclude evas-events.c
3036 * @skip evas_object_focus_set
3037 * @until evas_object_focus_set
3039 * See the full example @ref Example_Evas_Events "here".
3041 * @see evas_object_focus_get
3042 * @see evas_focus_get
3043 * @see evas_object_key_grab
3044 * @see evas_object_key_ungrab
3046 EAPI void evas_object_focus_set (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1);
3049 * Retrieve whether an object has the focus.
3051 * @param obj The object to retrieve focus information from.
3052 * @return @c EINA_TRUE if the object has the focus, @c EINA_FALSE
3055 * If the passed object is the currently focused one, @c EINA_TRUE is
3056 * returned. @c EINA_FALSE is returned, otherwise.
3059 * @dontinclude evas-events.c
3061 * @until something is bad
3063 * See the full example @ref Example_Evas_Events "here".
3065 * @see evas_object_focus_set
3066 * @see evas_focus_get
3067 * @see evas_object_key_grab
3068 * @see evas_object_key_ungrab
3070 EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3074 * Sets the layer of the its canvas that the given object will be part
3077 * @param obj The given Evas object.
3078 * @param l The number of the layer to place the object on.
3079 * Must be between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX.
3081 * If you don't use this function, you'll be dealing with an @b unique
3082 * layer of objects, the default one. Additional layers are handy when
3083 * you don't want a set of objects to interfere with another set with
3084 * regard to @b stacking. Two layers are completely disjoint in that
3087 * This is a low-level function, which you'd be using when something
3088 * should be always on top, for example.
3090 * @warning Be careful, it doesn't make sense to change the layer of
3091 * smart objects' children. Smart objects have a layer of their own,
3092 * which should contain all their children objects.
3094 * @see evas_object_layer_get()
3096 EAPI void evas_object_layer_set (Evas_Object *obj, short l) EINA_ARG_NONNULL(1);
3099 * Retrieves the layer of its canvas that the given object is part of.
3101 * @param obj The given Evas object to query layer from
3102 * @return Number of the its layer
3104 * @see evas_object_layer_set()
3106 EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3110 * Sets the name of the given Evas object to the given name.
3112 * @param obj The given object.
3113 * @param name The given name.
3115 * There might be occasions where one would like to name his/her
3119 * @dontinclude evas-events.c
3120 * @skip d.bg = evas_object_rectangle_add(d.canvas);
3121 * @until evas_object_name_set(d.bg, "our dear rectangle");
3123 * See the full @ref Example_Evas_Events "example".
3125 EAPI void evas_object_name_set (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1);
3128 * Retrieves the name of the given Evas object.
3130 * @param obj The given object.
3131 * @return The name of the object or @c NULL, if no name has been given
3135 * @dontinclude evas-events.c
3136 * @skip fprintf(stdout, "An object got focused: %s\n",
3137 * @until evas_focus_get
3139 * See the full @ref Example_Evas_Events "example".
3141 EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3145 * Increments object reference count to defer its deletion.
3147 * @param obj The given Evas object to reference
3149 * This increments the reference count of an object, which if greater
3150 * than 0 will defer deletion by evas_object_del() until all
3151 * references are released back (counter back to 0). References cannot
3152 * go below 0 and unreferencing past that will result in the reference
3153 * count being limited to 0. References are limited to <c>2^32 - 1</c>
3154 * for an object. Referencing it more than this will result in it
3155 * being limited to this value.
3157 * @see evas_object_unref()
3158 * @see evas_object_del()
3160 * @note This is a <b>very simple<b> reference counting mechanism! For
3161 * instance, Evas is not ready to check for pending references on a
3162 * canvas deletion, or things like that. This is useful on scenarios
3163 * where, inside a code block, callbacks exist which would possibly
3164 * delete an object we are operating on afterwards. Then, one would
3165 * evas_object_ref() it on the beginning of the block and
3166 * evas_object_unref() it on the end. It would then be deleted at this
3167 * point, if it should be.
3171 * evas_object_ref(obj);
3174 * evas_object_smart_callback_call(obj, SIG_SELECTED, NULL);
3175 * // more action here...
3176 * evas_object_unref(obj);
3179 * @ingroup Evas_Object_Group_Basic
3182 EAPI void evas_object_ref (Evas_Object *obj);
3185 * Decrements object reference count.
3187 * @param obj The given Evas object to unreference
3189 * This decrements the reference count of an object. If the object has
3190 * had evas_object_del() called on it while references were more than
3191 * 0, it will be deleted at the time this function is called and puts
3192 * the counter back to 0. See evas_object_ref() for more information.
3194 * @see evas_object_ref() (for an example)
3195 * @see evas_object_del()
3197 * @ingroup Evas_Object_Group_Basic
3200 EAPI void evas_object_unref (Evas_Object *obj);
3204 * Marks the given Evas object for deletion (when Evas will free its
3207 * @param obj The given Evas object.
3209 * This call will mark @p obj for deletion, which will take place
3210 * whenever it has no more references to it (see evas_object_ref() and
3211 * evas_object_unref()).
3213 * At actual deletion time, which may or may not be just after this
3214 * call, ::EVAS_CALLBACK_DEL and ::EVAS_CALLBACK_FREE callbacks will
3215 * be called. If the object currently had the focus, its
3216 * ::EVAS_CALLBACK_FOCUS_OUT callback will also be called.
3218 * @see evas_object_ref()
3219 * @see evas_object_unref()
3221 * @ingroup Evas_Object_Group_Basic
3223 EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1);
3226 * Move the given Evas object to the given location inside its
3229 * @param obj The given Evas object.
3230 * @param x X position to move the object to, in canvas units.
3231 * @param y Y position to move the object to, in canvas units.
3233 * Besides being moved, the object's ::EVAS_CALLBACK_MOVE callback
3236 * @note Naturally, newly created objects are placed at the canvas'
3237 * origin: <code>0, 0</code>.
3240 * @dontinclude evas-object-manipulation.c
3241 * @skip evas_object_image_border_set(d.clipper_border, 3, 3, 3, 3);
3242 * @until evas_object_show
3244 * See the full @ref Example_Evas_Object_Manipulation "example".
3246 * @ingroup Evas_Object_Group_Basic
3248 EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
3251 * Changes the size of the given Evas object.
3253 * @param obj The given Evas object.
3254 * @param w The new width of the Evas object.
3255 * @param h The new height of the Evas object.
3257 * Besides being resized, the object's ::EVAS_CALLBACK_RESIZE callback
3260 * @note Newly created objects have zeroed dimensions. Then, you most
3261 * probably want to use evas_object_resize() on them after they are
3264 * @note Be aware that resizing an object changes its drawing area,
3265 * but that does imply the object is rescaled! For instance, images
3266 * are filled inside their drawing area using the specifications of
3267 * evas_object_image_fill_set(). Thus to scale the image to match
3268 * exactly your drawing area, you need to change the
3269 * evas_object_image_fill_set() as well.
3271 * @note This is more evident in images, but text, textblock, lines
3272 * and polygons will behave similarly. Check their specific APIs to
3273 * know how to achieve your desired behavior. Consider the following
3277 * // rescale image to fill exactly its area without tiling:
3278 * evas_object_resize(img, w, h);
3279 * evas_object_image_fill_set(img, 0, 0, w, h);
3282 * @ingroup Evas_Object_Group_Basic
3284 EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
3287 * Retrieves the position and (rectangular) size of the given Evas
3290 * @param obj The given Evas object.
3291 * @param x Pointer to an integer in which to store the X coordinate
3293 * @param y Pointer to an integer in which to store the Y coordinate
3295 * @param w Pointer to an integer in which to store the width of the
3297 * @param h Pointer to an integer in which to store the height of the
3300 * The position, naturally, will be relative to the top left corner of
3301 * the canvas' viewport.
3303 * @note Use @c NULL pointers on the geometry components you're not
3304 * interested in: they'll be ignored by the function.
3307 * @dontinclude evas-events.c
3308 * @skip int w, h, cw, ch;
3311 * See the full @ref Example_Evas_Events "example".
3313 * @ingroup Evas_Object_Group_Basic
3315 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);
3319 * Makes the given Evas object visible.
3321 * @param obj The given Evas object.
3323 * Besides becoming visible, the object's ::EVAS_CALLBACK_SHOW
3324 * callback will be called.
3326 * @see evas_object_hide() for more on object visibility.
3327 * @see evas_object_visible_get()
3329 * @ingroup Evas_Object_Group_Basic
3331 EAPI void evas_object_show (Evas_Object *obj) EINA_ARG_NONNULL(1);
3334 * Makes the given Evas object invisible.
3336 * @param obj The given Evas object.
3338 * Hidden objects, besides not being shown at all in your canvas,
3339 * won't be checked for changes on the canvas rendering
3340 * process. Furthermore, they will not catch input events. Thus, they
3341 * are much ligher (in processing needs) than an object that is
3342 * invisible due to indirect causes, such as being clipped or out of
3343 * the canvas' viewport.
3345 * Besides becoming hidden, @p obj object's ::EVAS_CALLBACK_SHOW
3346 * callback will be called.
3348 * @note All objects are created in the hidden state! If you want them
3349 * shown, use evas_object_show() after their creation.
3351 * @see evas_object_show()
3352 * @see evas_object_visible_get()
3355 * @dontinclude evas-object-manipulation.c
3356 * @skip if (evas_object_visible_get(d.clipper))
3359 * See the full @ref Example_Evas_Object_Manipulation "example".
3361 * @ingroup Evas_Object_Group_Basic
3363 EAPI void evas_object_hide (Evas_Object *obj) EINA_ARG_NONNULL(1);
3366 * Retrieves whether or not the given Evas object is visible.
3368 * @param obj The given Evas object.
3369 * @return @c EINA_TRUE if the object is visible, @c EINA_FALSE
3372 * This retrieves an object's visibily as the one enforced by
3373 * evas_object_show() and evas_object_hide().
3375 * @note The value returned isn't, by any means, influenced by
3376 * clippers covering @obj, it being out of its canvas' viewport or
3377 * stacked below other object.
3379 * @see evas_object_show()
3380 * @see evas_object_hide() (for an example)
3382 * @ingroup Evas_Object_Group_Basic
3384 EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3388 * Sets the general/main color of the given Evas object to the given
3391 * @param obj The given Evas object.
3392 * @param r The red component of the given color.
3393 * @param g The green component of the given color.
3394 * @param b The blue component of the given color.
3395 * @param a The alpha component of the given color.
3397 * @see evas_object_color_get() (for an example)
3398 * @note These color values are expected to be premultiplied by @p a.
3400 * @ingroup Evas_Object_Group_Basic
3402 EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
3405 * Retrieves the general/main color of the given Evas object.
3407 * @param obj The given Evas object to retrieve color from.
3408 * @param r Pointer to an integer in which to store the red component
3410 * @param g Pointer to an integer in which to store the green
3411 * component of the color.
3412 * @param b Pointer to an integer in which to store the blue component
3414 * @param a Pointer to an integer in which to store the alpha
3415 * component of the color.
3417 * Retrieves the “main” color's RGB component (and alpha channel)
3418 * values, <b>which range from 0 to 255</b>. For the alpha channel,
3419 * which defines the object's transparency level, 0 means totally
3420 * trasparent, while 255 means opaque. These color values are
3421 * premultiplied by the alpha value.
3423 * Usually you’ll use this attribute for text and rectangle objects,
3424 * where the “main” color is their unique one. If set for objects
3425 * which themselves have colors, like the images one, those colors get
3426 * modulated by this one.
3428 * @note All newly created Evas rectangles get the default color
3429 * values of <code>255 255 255 255</code> (opaque white).
3431 * @note Use @c NULL pointers on the components you're not interested
3432 * in: they'll be ignored by the function.
3435 * @dontinclude evas-object-manipulation.c
3436 * @skip int alpha, r, g, b;
3439 * See the full @ref Example_Evas_Object_Manipulation "example".
3441 * @ingroup Evas_Object_Group_Basic
3443 EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
3447 * Retrieves the Evas canvas that the given object lives on.
3449 * @param obj The given Evas object.
3450 * @return A pointer to the canvas where the object is on.
3452 * This function is most useful at code contexts where you need to
3453 * operate on the canvas but have only the object pointer.
3455 * @ingroup Evas_Object_Group_Basic
3457 EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3460 * Retrieves the type of the given Evas object.
3462 * @param obj The given object.
3463 * @return The type of the object.
3465 * For Evas' builtin types, the return strings will be one of:
3466 * - <c>"rectangle"</c>,
3468 * - <c>"polygon"</c>,
3470 * - <c>"textblock"</c> and
3473 * For Evas smart objects (see @ref Evas_Smart_Group), the name of the
3474 * smart class itself is returned on this call. For the built-in smart
3475 * objects, these names are:
3476 * - <c>"EvasObjectSmartClipped"</c>, for the clipped smart object
3477 * - <c>"Evas_Object_Box"</c>, for the box object and
3478 * - <c>"Evas_Object_Table"</c>, for the table object.
3481 * @dontinclude evas-object-manipulation.c
3482 * @skip d.img = evas_object_image_filled_add(d.canvas);
3483 * @until border on the
3485 * See the full @ref Example_Evas_Object_Manipulation "example".
3487 EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3490 * Raise @p obj to the top of its layer.
3492 * @param obj the object to raise
3494 * @p obj will, then, be the highest one in the layer it belongs
3495 * to. Object on other layers won't get touched.
3497 * @see evas_object_stack_above()
3498 * @see evas_object_stack_below()
3499 * @see evas_object_lower()
3501 EAPI void evas_object_raise (Evas_Object *obj) EINA_ARG_NONNULL(1);
3504 * Lower @p obj to the bottom of its layer.
3506 * @param obj the object to lower
3508 * @p obj will, then, be the lowest one in the layer it belongs
3509 * to. Objects on other layers won't get touched.
3511 * @see evas_object_stack_above()
3512 * @see evas_object_stack_below()
3513 * @see evas_object_raise()
3515 EAPI void evas_object_lower (Evas_Object *obj) EINA_ARG_NONNULL(1);
3518 * Stack @p obj immediately above @p above
3520 * @param obj the object to stack
3521 * @param above the object above which to stack
3523 * Objects, in a given canvas, are stacked in the order they get added
3524 * to it. This means that, if they overlap, the highest ones will
3525 * cover the lowest ones, in that order. This function is a way to
3526 * change the stacking order for the objects.
3528 * This function is intended to be used with <b>objects belonging to
3529 * the same layer</b> in a given canvas, otherwise it will fail (and
3530 * accomplish nothing).
3532 * If you have smart objects on your canvas and @p obj is a member of
3533 * one of them, then @p above must also be a member of the same
3536 * Similarly, if @p obj is not a member of a smart object, @p above
3537 * must not be either.
3539 * @see evas_object_layer_get()
3540 * @see evas_object_layer_set()
3541 * @see evas_object_stack_below()
3543 EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2);
3546 * Stack @p obj immediately below @p below
3548 * @param obj the object to stack
3549 * @param below the object below which to stack
3551 * Objects, in a given canvas, are stacked in the order they get added
3552 * to it. This means that, if they overlap, the highest ones will
3553 * cover the lowest ones, in that order. This function is a way to
3554 * change the stacking order for the objects.
3556 * This function is intended to be used with <b>objects belonging to
3557 * the same layer</b> in a given canvas, otherwise it will fail (and
3558 * accomplish nothing).
3560 * If you have smart objects on your canvas and @p obj is a member of
3561 * one of them, then @p below must also be a member of the same
3564 * Similarly, if @p obj is not a member of a smart object, @p below
3565 * must not be either.
3567 * @see evas_object_layer_get()
3568 * @see evas_object_layer_set()
3569 * @see evas_object_stack_below()
3571 EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2);
3574 * Get the Evas object stacked right above @p obj
3576 * @param obj an #Evas_Object
3577 * @return the #Evas_Object directly above @p obj, if any, or @c NULL,
3580 * This function will traverse layers in its search, if there are
3581 * objects on layers above the one @p obj is placed at.
3583 * @see evas_object_layer_get()
3584 * @see evas_object_layer_set()
3585 * @see evas_object_below_get()
3588 EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3591 * Get the Evas object stacked right below @p obj
3593 * @param obj an #Evas_Object
3594 * @return the #Evas_Object directly below @p obj, if any, or @c NULL,
3597 * This function will traverse layers in its search, if there are
3598 * objects on layers below the one @p obj is placed at.
3600 * @see evas_object_layer_get()
3601 * @see evas_object_layer_set()
3602 * @see evas_object_below_get()
3604 EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3611 * @defgroup Evas_Object_Group_Events Object Events
3613 * Objects generate events when they are moved, resized, when their
3614 * visibility change, when they are deleted and so on. These methods
3615 * allow one to be notified about and to handle such events.
3617 * Objects also generate events on input (keyboard and mouse), if they
3618 * accept them (are visible, focused, etc).
3620 * For each of those events, Evas provides a way for one to register
3621 * callback functions to be issued just after they happen.
3623 * The following figure illustrates some Evas (event) callbacks:
3625 * @image html evas-callbacks.png
3626 * @image rtf evas-callbacks.png
3627 * @image latex evas-callbacks.eps
3629 * Thees events have their values in the #Evas_Callback_Type
3630 * enumeration, which has also ones happening on the canvas level (se
3631 * #Evas_Canvas_Events).
3633 * Examples on this group of functions can be found @ref
3634 * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here".
3636 * @ingroup Evas_Object_Group
3640 * @addtogroup Evas_Object_Group_Events
3645 * Add (register) a callback function to a given Evas object event.
3647 * @param obj Object to attach a callback to
3648 * @param type The type of event that will trigger the callback
3649 * @param func The function to be called when the event is triggered
3650 * @param data The data pointer to be passed to @p func
3652 * This function adds a function callback to an object when the event
3653 * of type @p type occurs on object @p obj. The function is @p func.
3655 * In the event of a memory allocation error during addition of the
3656 * callback to the object, evas_alloc_error() should be used to
3657 * determine the nature of the error, if any, and the program should
3658 * sensibly try and recover.
3660 * A callback function must have the ::Evas_Object_Event_Cb prototype
3661 * definition. The first parameter (@p data) in this definition will
3662 * have the same value passed to evas_object_event_callback_add() as
3663 * the @p data parameter, at runtime. The second parameter @p e is the
3664 * canvas pointer on which the event occurred. The third parameter is
3665 * a pointer to the object on which event occurred. Finally, the
3666 * fourth parameter @p event_info is a pointer to a data structure
3667 * that may or may not be passed to the callback, depending on the
3668 * event type that triggered the callback. This is so because some
3669 * events don't carry extra context with them, but others do.
3671 * The event type @p type to trigger the function may be one of
3672 * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT,
3673 * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP,
3674 * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL,
3675 * #EVAS_CALLBACK_MULTI_DOWN, #EVAS_CALLBACK_MULTI_UP,
3676 * #EVAS_CALLBACK_MULTI_MOVE, #EVAS_CALLBACK_FREE,
3677 * #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP,
3678 * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT,
3679 * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE,
3680 * #EVAS_CALLBACK_RESIZE, #EVAS_CALLBACK_RESTACK, #EVAS_CALLBACK_DEL,
3681 * #EVAS_CALLBACK_HOLD, #EVAS_CALLBACK_CHANGED_SIZE_HINTS,
3682 * #EVAS_CALLBACK_IMAGE_PRELOADED or #EVAS_CALLBACK_IMAGE_UNLOADED.
3684 * This determines the kind of event that will trigger the callback.
3685 * What follows is a list explaining better the nature of each type of
3686 * event, along with their associated @p event_info pointers:
3688 * - #EVAS_CALLBACK_MOUSE_IN: @p event_info is a pointer to an
3689 * #Evas_Event_Mouse_In struct\n\n
3690 * This event is triggered when the mouse pointer enters the area
3691 * (not shaded by other objects) of the object @p obj. This may
3692 * occur by the mouse pointer being moved by
3693 * evas_event_feed_mouse_move() calls, or by the object being shown,
3694 * raised, moved, resized, or other objects being moved out of the
3695 * way, hidden or lowered, whatever may cause the mouse pointer to
3696 * get on top of @p obj, having been on top of another object
3699 * - #EVAS_CALLBACK_MOUSE_OUT: @p event_info is a pointer to an
3700 * #Evas_Event_Mouse_Out struct\n\n
3701 * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is,
3702 * but it occurs when the mouse pointer exits an object's area. Note
3703 * that no mouse out events will be reported if the mouse pointer is
3704 * implicitly grabbed to an object (mouse buttons are down, having
3705 * been pressed while the pointer was over that object). In these
3706 * cases, mouse out events will be reported once all buttons are
3707 * released, if the mouse pointer has left the object's area. The
3708 * indirect ways of taking off the mouse pointer from an object,
3709 * like cited above, for #EVAS_CALLBACK_MOUSE_IN, also apply here,
3712 * - #EVAS_CALLBACK_MOUSE_DOWN: @p event_info is a pointer to an
3713 * #Evas_Event_Mouse_Down struct\n\n
3714 * This event is triggered by a mouse button being pressed while the
3715 * mouse pointer is over an object. If the pointer mode for Evas is
3716 * #EVAS_OBJECT_POINTER_MODE_AUTOGRAB (default), this causes this
3717 * object to <b>passively grab the mouse</b> until all mouse buttons
3718 * have been released: all future mouse events will be reported to
3719 * only this object until no buttons are down. That includes mouse
3720 * move events, mouse in and mouse out events, and further button
3721 * presses. When all buttons are released, event propagation will
3722 * occur as normal (see #Evas_Object_Pointer_Mode).
3724 * - #EVAS_CALLBACK_MOUSE_UP: @p event_info is a pointer to an
3725 * #Evas_Event_Mouse_Up struct\n\n
3726 * This event is triggered by a mouse button being released while
3727 * the mouse pointer is over an object's area (or when passively
3728 * grabbed to an object).
3730 * - #EVAS_CALLBACK_MOUSE_MOVE: @p event_info is a pointer to an
3731 * #Evas_Event_Mouse_Move struct\n\n
3732 * This event is triggered by the mouse pointer being moved while
3733 * over an object's area (or while passively grabbed to an object).
3735 * - #EVAS_CALLBACK_MOUSE_WHEEL: @p event_info is a pointer to an
3736 * #Evas_Event_Mouse_Wheel struct\n\n
3737 * This event is triggered by the mouse wheel being rolled while the
3738 * mouse pointer is over an object (or passively grabbed to an
3741 * - #EVAS_CALLBACK_MULTI_DOWN: @p event_info is a pointer to an
3742 * #Evas_Event_Multi_Down struct
3744 * - #EVAS_CALLBACK_MULTI_UP: @p event_info is a pointer to an
3745 * #Evas_Event_Multi_Up struct
3747 * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an
3748 * #Evas_Event_Multi_Move struct
3750 * - #EVAS_CALLBACK_FREE: @p event_info is @c NULL \n\n
3751 * This event is triggered just before Evas is about to free all
3752 * memory used by an object and remove all references to it. This is
3753 * useful for programs to use if they attached data to an object and
3754 * want to free it when the object is deleted. The object is still
3755 * valid when this callback is called, but after it returns, there
3756 * is no guarantee on the object's validity.
3758 * - #EVAS_CALLBACK_KEY_DOWN: @p event_info is a pointer to an
3759 * #Evas_Event_Key_Down struct\n\n
3760 * This callback is called when a key is pressed and the focus is on
3761 * the object, or a key has been grabbed to a particular object
3762 * which wants to intercept the key press regardless of what object
3765 * - #EVAS_CALLBACK_KEY_UP: @p event_info is a pointer to an
3766 * #Evas_Event_Key_Up struct \n\n
3767 * This callback is called when a key is released and the focus is
3768 * on the object, or a key has been grabbed to a particular object
3769 * which wants to intercept the key release regardless of what
3770 * object has the focus.
3772 * - #EVAS_CALLBACK_FOCUS_IN: @p event_info is @c NULL \n\n
3773 * This event is called when an object gains the focus. When it is
3774 * called the object has already gained the focus.
3776 * - #EVAS_CALLBACK_FOCUS_OUT: @p event_info is @c NULL \n\n
3777 * This event is triggered when an object loses the focus. When it
3778 * is called the object has already lost the focus.
3780 * - #EVAS_CALLBACK_SHOW: @p event_info is @c NULL \n\n
3781 * This event is triggered by the object being shown by
3782 * evas_object_show().
3784 * - #EVAS_CALLBACK_HIDE: @p event_info is @c NULL \n\n
3785 * This event is triggered by an object being hidden by
3786 * evas_object_hide().
3788 * - #EVAS_CALLBACK_MOVE: @p event_info is @c NULL \n\n
3789 * This event is triggered by an object being
3790 * moved. evas_object_move() can trigger this, as can any
3791 * object-specific manipulations that would mean the object's origin
3794 * - #EVAS_CALLBACK_RESIZE: @p event_info is @c NULL \n\n
3795 * This event is triggered by an object being resized. Resizes can
3796 * be triggered by evas_object_resize() or by any object-specific
3797 * calls that may cause the object to resize.
3799 * - #EVAS_CALLBACK_RESTACK: @p event_info is @c NULL \n\n
3800 * This event is triggered by an object being re-stacked. Stacking
3801 * changes can be triggered by
3802 * evas_object_stack_below()/evas_object_stack_above() and others.
3804 * - #EVAS_CALLBACK_DEL: @p event_info is @c NULL.
3806 * - #EVAS_CALLBACK_HOLD: @p event_info is a pointer to an
3807 * #Evas_Event_Hold struct
3809 * - #EVAS_CALLBACK_CHANGED_SIZE_HINTS: @p event_info is @c NULL.
3811 * - #EVAS_CALLBACK_IMAGE_PRELOADED: @p event_info is @c NULL.
3813 * - #EVAS_CALLBACK_IMAGE_UNLOADED: @p event_info is @c NULL.
3815 * @note Be careful not to add the same callback multiple times, if
3816 * that's not what you want, because Evas won't check if a callback
3817 * existed before exactly as the one being registered (and thus, call
3818 * it more than once on the event, in this case). This would make
3819 * sense if you passed different functions and/or callback data, only.
3822 * @dontinclude evas-events.c
3823 * @skip evas_object_event_callback_add(
3826 * See the full example @ref Example_Evas_Events "here".
3829 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);
3832 * Add (register) a callback function to a given Evas object event with a
3833 * non-default priority set. Except for the priority field, it's exactly the
3834 * same as @ref evas_object_event_callback_add
3836 * @param obj Object to attach a callback to
3837 * @param type The type of event that will trigger the callback
3838 * @param priority The priority of the callback, lower values called first.
3839 * @param func The function to be called when the event is triggered
3840 * @param data The data pointer to be passed to @p func
3842 * @see evas_object_event_callback_add
3845 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);
3848 * Delete a callback function from an object
3850 * @param obj Object to remove a callback from
3851 * @param type The type of event that was triggering the callback
3852 * @param func The function that was to be called when the event was triggered
3853 * @return The data pointer that was to be passed to the callback
3855 * This function removes the most recently added callback from the
3856 * object @p obj which was triggered by the event type @p type and was
3857 * calling the function @p func when triggered. If the removal is
3858 * successful it will also return the data pointer that was passed to
3859 * evas_object_event_callback_add() when the callback was added to the
3860 * object. If not successful NULL will be returned.
3864 * extern Evas_Object *object;
3866 * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
3868 * my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback);
3871 EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3);
3874 * Delete (unregister) a callback function registered to a given
3875 * Evas object event.
3877 * @param obj Object to remove a callback from
3878 * @param type The type of event that was triggering the callback
3879 * @param func The function that was to be called when the event was
3881 * @param data The data pointer that was to be passed to the callback
3882 * @return The data pointer that was to be passed to the callback
3884 * This function removes the most recently added callback from the
3885 * object @p obj, which was triggered by the event type @p type and was
3886 * calling the function @p func with data @p data, when triggered. If
3887 * the removal is successful it will also return the data pointer that
3888 * was passed to evas_object_event_callback_add() (that will be the
3889 * same as the parameter) when the callback was added to the
3890 * object. In errors, @c NULL will be returned.
3892 * @note For deletion of Evas object events callbacks filtering by
3893 * just type and function pointer, user
3894 * evas_object_event_callback_del().
3898 * extern Evas_Object *object;
3900 * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
3902 * my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data);
3905 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);
3909 * Set whether an Evas object is to pass (ignore) events.
3911 * @param obj the Evas object to operate on
3912 * @param pass whether @p obj is to pass events (@c EINA_TRUE) or not
3915 * If @p pass is @c EINA_TRUE, it will make events on @p obj to be @b
3916 * ignored. They will be triggered on the @b next lower object (that
3917 * is not set to pass events), instead (see evas_object_below_get()).
3919 * If @p pass is @c EINA_FALSE, events will be processed on that
3922 * @see evas_object_pass_events_get() for an example
3923 * @see evas_object_repeat_events_set()
3924 * @see evas_object_propagate_events_set()
3925 * @see evas_object_freeze_events_set()
3927 EAPI void evas_object_pass_events_set (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1);
3930 * Determine whether an object is set to pass (ignore) events.
3932 * @param obj the Evas object to get information from.
3933 * @return pass whether @p obj is set to pass events (@c EINA_TRUE) or not
3937 * @dontinclude evas-stacking.c
3938 * @skip if (strcmp(ev->keyname, "p") == 0)
3941 * See the full @ref Example_Evas_Stacking "example".
3943 * @see evas_object_pass_events_set()
3944 * @see evas_object_repeat_events_get()
3945 * @see evas_object_propagate_events_get()
3946 * @see evas_object_freeze_events_get()
3948 EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3951 * Set whether an Evas object is to repeat events.
3953 * @param obj the Evas object to operate on
3954 * @param repeat whether @p obj is to repeat events (@c EINA_TRUE) or not
3957 * If @p repeat is @c EINA_TRUE, it will make events on @p obj to also
3958 * be repeated for the @b next lower object in the objects' stack (see
3959 * see evas_object_below_get()).
3961 * If @p repeat is @c EINA_FALSE, events occurring on @p obj will be
3962 * processed only on it.
3965 * @dontinclude evas-stacking.c
3966 * @skip if (strcmp(ev->keyname, "r") == 0)
3969 * See the full @ref Example_Evas_Stacking "example".
3971 * @see evas_object_repeat_events_get()
3972 * @see evas_object_pass_events_set()
3973 * @see evas_object_propagate_events_set()
3974 * @see evas_object_freeze_events_set()
3976 EAPI void evas_object_repeat_events_set (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
3979 * Determine whether an object is set to repeat events.
3981 * @param obj the given Evas object pointer
3982 * @retrieve whether @p obj is set to repeat events (@c EINA_TRUE)
3983 * or not (@c EINA_FALSE)
3985 * @see evas_object_repeat_events_set() for an example
3986 * @see evas_object_pass_events_get()
3987 * @see evas_object_propagate_events_get()
3988 * @see evas_object_freeze_events_get()
3990 EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
3993 * Set whether events on a smart object's member should get propagated
3996 * @param obj the smart object's child to operate on
3997 * @param prop whether to propagate events (@c EINA_TRUE) or not (@c
4000 * This function has @b no effect if @p obj is not a member of a smart
4003 * If @p prop is @c EINA_TRUE, events occurring on this object will be
4004 * propagated on to the smart object of which @p obj is a member. If
4005 * @p prop is @c EINA_FALSE, events occurring on this object will @b
4006 * not be propagated on to the smart object of which @p obj is a
4007 * member. The default value is @c EINA_TRUE.
4009 * @see evas_object_propagate_events_get()
4010 * @see evas_object_repeat_events_set()
4011 * @see evas_object_pass_events_set()
4012 * @see evas_object_freeze_events_set()
4014 EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1);
4017 * Retrieve whether an Evas object is set to propagate events.
4019 * @param obj the given Evas object pointer
4020 * @return whether @p obj is set to propagate events (@c EINA_TRUE)
4021 * or not (@c EINA_FALSE)
4023 * @see evas_object_propagate_events_set()
4024 * @see evas_object_repeat_events_get()
4025 * @see evas_object_pass_events_get()
4026 * @see evas_object_freeze_events_get()
4028 EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
4031 * Set whether an Evas object is to freeze (discard) events.
4033 * @param obj the Evas object to operate on
4034 * @param pass whether @p obj is to freeze events (@c EINA_TRUE) or not
4037 * If @p freeze is @c EINA_TRUE, it will make events on @p obj to be @b
4038 * discarded. Unlike evas_object_pass_events_set(), events will not be
4039 * passed to @b next lower object. This API can be used for blocking
4040 * events while @p obj is on transiting.
4042 * If @p freeze is @c EINA_FALSE, events will be processed on that
4045 * @see evas_object_freeze_events_get()
4046 * @see evas_object_pass_events_set()
4047 * @see evas_object_repeat_events_set()
4048 * @see evas_object_propagate_events_set()
4051 EAPI void evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) EINA_ARG_NONNULL(1);
4054 * Determine whether an object is set to freeze (discard) events.
4056 * @param obj the Evas object to get information from.
4057 * @return freeze whether @p obj is set to freeze events (@c EINA_TRUE) or
4058 * not (@c EINA_FALSE)
4060 * @see evas_object_freeze_events_set()
4061 * @see evas_object_pass_events_get()
4062 * @see evas_object_repeat_events_get()
4063 * @see evas_object_propagate_events_get()
4066 EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
4073 * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspective, 3D...)
4075 * Evas allows different transformations to be applied to all kinds of
4076 * objects. These are applied by means of UV mapping.
4078 * With UV mapping, one maps points in the source object to a 3D space
4079 * positioning at target. This allows rotation, perspective, scale and
4080 * lots of other effects, depending on the map that is used.
4082 * Each map point may carry a multiplier color. If properly
4083 * calculated, these can do shading effects on the object, producing
4086 * As usual, Evas provides both the raw and easy to use methods. The
4087 * raw methods allow developer to create its maps somewhere else,
4088 * maybe load them from some file format. The easy to use methods,
4089 * calculate the points given some high-level parameters, such as
4090 * rotation angle, ambient light and so on.
4092 * @note applying mapping will reduce performance, so use with
4093 * care. The impact on performance depends on engine in
4094 * use. Software is quite optimized, but not as fast as OpenGL.
4096 * @section sec-map-points Map points
4097 * @subsection subsec-rotation Rotation
4099 * A map consists of a set of points, currently only four are supported. Each
4100 * of these points contains a set of canvas coordinates @c x and @c y that
4101 * can be used to alter the geometry of the mapped object, and a @c z
4102 * coordinate that indicates the depth of that point. This last coordinate
4103 * does not normally affect the map, but it's used by several of the utility
4104 * functions to calculate the right position of the point given other
4107 * The coordinates for each point are set with evas_map_point_coord_set().
4108 * The following image shows a map set to match the geometry of an existing
4111 * @image html map-set-map-points-1.png
4112 * @image rtf map-set-map-points-1.png
4113 * @image latex map-set-map-points-1.eps
4115 * This is a common practice, so there are a few functions that help make it
4118 * evas_map_util_points_populate_from_geometry() sets the coordinates of each
4119 * point in the given map to match the rectangle defined by the function
4122 * evas_map_util_points_populate_from_object() and
4123 * evas_map_util_points_populate_from_object_full() both take an object and
4124 * set the map points to match its geometry. The difference between the two
4125 * is that the first function sets the @c z value of all points to 0, while
4126 * the latter receives the value to set in said coordinate as a parameter.
4128 * The following lines of code all produce the same result as in the image
4131 * evas_map_util_points_populate_from_geometry(m, 100, 100, 200, 200, 0);
4132 * // Assuming o is our original object
4133 * evas_object_move(o, 100, 100);
4134 * evas_object_resize(o, 200, 200);
4135 * evas_map_util_points_populate_from_object(m, o);
4136 * evas_map_util_points_populate_from_object_full(m, o, 0);
4139 * Several effects can be applied to an object by simply setting each point
4140 * of the map to the right coordinates. For example, a simulated perspective
4141 * could be achieve as follows.
4143 * @image html map-set-map-points-2.png
4144 * @image rtf map-set-map-points-2.png
4145 * @image latex map-set-map-points-2.eps
4147 * As said before, the @c z coordinate is unused here so when setting points
4148 * by hand, its value is of no importance.
4150 * @image html map-set-map-points-3.png
4151 * @image rtf map-set-map-points-3.png
4152 * @image latex map-set-map-points-3.eps
4154 * In all three cases above, setting the map to be used by the object is the
4157 * evas_object_map_set(o, m);
4158 * evas_object_map_enable_set(o, EINA_TRUE);
4161 * Doing things this way, however, is a lot of work that can be avoided by
4162 * using the provided utility functions, as described in the next section.
4164 * @section map-utils Utility functions
4166 * Utility functions take an already set up map and alter it to produce a
4167 * specific effect. For example, to rotate an object around its own center
4168 * you would need to take the rotation angle, the coordinates of each corner
4169 * of the object and do all the math to get the new set of coordinates that
4170 * need to tbe set in the map.
4172 * Or you can use this code:
4174 * evas_object_geometry_get(o, &x, &y, &w, &h);
4175 * m = evas_map_new(4);
4176 * evas_map_util_points_populate_from_object(m, o);
4177 * evas_map_util_rotate(m, 45, x + (w / 2), y + (h / 2));
4178 * evas_object_map_set(o, m);
4179 * evas_object_map_enable_set(o, EINA_TRUE);
4183 * Which will rotate the object around its center point in a 45 degree angle
4184 * in the clockwise direction, taking it from this
4186 * @image html map-rotation-2d-1.png
4187 * @image rtf map-rotation-2d-1.png
4188 * @image latex map-rotation-2d-1.eps
4192 * @image html map-rotation-2d-2.png
4193 * @image rtf map-rotation-2d-2.png
4194 * @image latex map-rotation-2d-2.eps
4196 * Objects may be rotated around any other point just by setting the last two
4197 * paramaters of the evas_map_util_rotate() function to the right values. A
4198 * circle of roughly the diameter of the object overlaid on each image shows
4199 * where the center of rotation is set for each example.
4201 * For example, this code
4203 * evas_object_geometry_get(o, &x, &y, &w, &h);
4204 * m = evas_map_new(4);
4205 * evas_map_util_points_populate_from_object(m, o);
4206 * evas_map_util_rotate(m, 45, x + w - 20, y + h - 20);
4207 * evas_object_map_set(o, m);
4208 * evas_object_map_enable_set(o, EINA_TRUE);
4212 * produces something like
4214 * @image html map-rotation-2d-3.png
4215 * @image rtf map-rotation-2d-3.png
4216 * @image latex map-rotation-2d-3.eps
4220 * evas_output_size_get(evas, &w, &h);
4221 * m = evas_map_new(4);
4222 * evas_map_util_points_populate_from_object(m, o);
4223 * evas_map_util_rotate(m, 45, w, h);
4224 * evas_object_map_set(o, m);
4225 * evas_object_map_enable_set(o, EINA_TRUE);
4229 * rotates the object around the center of the window
4231 * @image html map-rotation-2d-4.png
4232 * @image rtf map-rotation-2d-4.png
4233 * @image latex map-rotation-2d-4.eps
4235 * @subsection subsec-3d 3D Maps
4237 * Maps can also be used to achieve the effect of 3-dimensionality. When doing
4238 * this, the @c z coordinate of each point counts, with higher values meaning
4239 * the point is further into the screen, and smaller values (negative, usually)
4240 * meaning the point is closwer towards the user.
4242 * Thinking in 3D also introduces the concept of back-face of an object. An
4243 * object is said to be facing the user when all its points are placed in a
4244 * clockwise fashion. The next image shows this, with each point showing the
4245 * with which is identified within the map.
4247 * @image html map-point-order-face.png
4248 * @image rtf map-point-order-face.png
4249 * @image latex map-point-order-face.eps
4251 * Rotating this map around the @c Y axis would leave the order of the points
4252 * in a counter-clockwise fashion, as seen in the following image.
4254 * @image html map-point-order-back.png
4255 * @image rtf map-point-order-back.png
4256 * @image latex map-point-order-back.eps
4258 * This way we can say that we are looking at the back face of the object.
4259 * This will have stronger implications later when we talk about lighting.
4261 * To know if a map is facing towards the user or not it's enough to use
4262 * the evas_map_util_clockwise_get() function, but this is normally done
4263 * after all the other operations are applied on the map.
4265 * @subsection subsec-3d-rot 3D rotation and perspective
4267 * Much like evas_map_util_rotate(), there's the function
4268 * evas_map_util_3d_rotate() that transforms the map to apply a 3D rotation
4269 * to an object. As in its 2D counterpart, the rotation can be applied around
4270 * any point in the canvas, this time with a @c z coordinate too. The rotation
4271 * can also be around any of the 3 axis.
4273 * Starting from this simple setup
4275 * @image html map-3d-basic-1.png
4276 * @image rtf map-3d-basic-1.png
4277 * @image latex map-3d-basic-1.eps
4279 * and setting maps so that the blue square to rotate on all axis around a
4280 * sphere that uses the object as its center, and the red square to rotate
4281 * around the @c Y axis, we get the following. A simple overlay over the image
4282 * shows the original geometry of each object and the axis around which they
4283 * are being rotated, with the @c Z one not appearing due to being orthogonal
4286 * @image html map-3d-basic-2.png
4287 * @image rtf map-3d-basic-2.png
4288 * @image latex map-3d-basic-2.eps
4290 * which doesn't look very real. This can be helped by adding perspective
4291 * to the transformation, which can be simply done by calling
4292 * evas_map_util_3d_perspective() on the map after its position has been set.
4293 * The result in this case, making the vanishing point the center of each
4296 * @image html map-3d-basic-3.png
4297 * @image rtf map-3d-basic-3.png
4298 * @image latex map-3d-basic-3.eps
4300 * @section sec-color Color and lighting
4302 * Each point in a map can be set to a color, which will be multiplied with
4303 * the objects own color and linearly interpolated in between adjacent points.
4304 * This is done with evas_map_point_color_set() for each point of the map,
4305 * or evas_map_util_points_color_set() to set every point to the same color.
4307 * When using 3D effects, colors can be used to improve the looks of them by
4308 * simulating a light source. The evas_map_util_3d_lighting() function makes
4309 * this task easier by taking the coordinates of the light source and its
4310 * color, along with the color of the ambient light. Evas then sets the color
4311 * of each point based on the distance to the light source, the angle with
4312 * which the object is facing the light and the ambient light. Here, the
4313 * orientation of each point as explained before, becomes more important.
4314 * If the map is defined counter-clockwise, the object will be facing away
4315 * from the user and thus become obscured, since no light would be reflecting
4318 * @image html map-light.png
4319 * @image rtf map-light.png
4320 * @image latex map-light.eps
4321 * @note Object facing the light source
4323 * @image html map-light2.png
4324 * @image rtf map-light2.png
4325 * @image latex map-light2.eps
4326 * @note Same object facing away from the user
4328 * @section Image mapping
4330 * @image html map-uv-mapping-1.png
4331 * @image rtf map-uv-mapping-1.png
4332 * @image latex map-uv-mapping-1.eps
4334 * Images need some special handlign when mapped. Evas can easily take care
4335 * of objects and do almost anything with them, but it's completely oblivious
4336 * to the content of images, so each point in the map needs to be told to what
4337 * pixel in the source image it belongs. Failing to do may sometimes result
4338 * in the expected behavior, or it may look like a partial work.
4340 * The next image illustrates one possibility of a map being set to an image
4341 * object, without setting the right UV mapping for each point. The objects
4342 * themselves are mapped properly to their new geometry, but the image content
4343 * may not be displayed correctly within the mapped object.
4345 * @image html map-uv-mapping-2.png
4346 * @image rtf map-uv-mapping-2.png
4347 * @image latex map-uv-mapping-2.eps
4349 * Once Evas knows how to handle the source image within the map, it will
4350 * transform it as needed. This is done with evas_map_point_image_uv_set(),
4351 * which tells the map to which pixel in image it maps.
4353 * To match our example images to the maps above all we need is the size of
4354 * each image, which can always be found with evas_object_image_size_get().
4357 * evas_map_point_image_uv_set(m, 0, 0, 0);
4358 * evas_map_point_image_uv_set(m, 1, 150, 0);
4359 * evas_map_point_image_uv_set(m, 2, 150, 200);
4360 * evas_map_point_image_uv_set(m, 3, 0, 200);
4361 * evas_object_map_set(o, m);
4362 * evas_object_map_enable_set(o, EINA_TRUE);
4364 * evas_map_point_image_uv_set(m, 0, 0, 0);
4365 * evas_map_point_image_uv_set(m, 1, 120, 0);
4366 * evas_map_point_image_uv_set(m, 2, 120, 160);
4367 * evas_map_point_image_uv_set(m, 3, 0, 160);
4368 * evas_object_map_set(o2, m);
4369 * evas_object_map_enable_set(o2, EINA_TRUE);
4374 * @image html map-uv-mapping-3.png
4375 * @image rtf map-uv-mapping-3.png
4376 * @image latex map-uv-mapping-3.eps
4378 * Maps can also be set to use part of an image only, or even map them inverted,
4379 * and combined with evas_object_image_source_set() it can be used to achieve
4380 * more interesting results.
4383 * evas_object_image_size_get(evas_object_image_source_get(o), &w, &h);
4384 * evas_map_point_image_uv_set(m, 0, 0, h);
4385 * evas_map_point_image_uv_set(m, 1, w, h);
4386 * evas_map_point_image_uv_set(m, 2, w, h / 3);
4387 * evas_map_point_image_uv_set(m, 3, 0, h / 3);
4388 * evas_object_map_set(o, m);
4389 * evas_object_map_enable_set(o, EINA_TRUE);
4392 * @image html map-uv-mapping-4.png
4393 * @image rtf map-uv-mapping-4.png
4394 * @image latex map-uv-mapping-4.eps
4397 * @li @ref Example_Evas_Map_Overview
4399 * @ingroup Evas_Object_Group
4405 * Enable or disable the map that is set.
4407 * Enable or disable the use of map for the object @p obj.
4408 * On enable, the object geometry will be saved, and the new geometry will
4409 * change (position and size) to reflect the map geometry set.
4411 * If the object doesn't have a map set (with evas_object_map_set()), the
4412 * initial geometry will be undefined. It is advised to always set a map
4413 * to the object first, and then call this function to enable its use.
4415 * @param obj object to enable the map on
4416 * @param enabled enabled state
4418 EAPI void evas_object_map_enable_set (Evas_Object *obj, Eina_Bool enabled);
4421 * Get the map enabled state
4423 * This returns the currently enabled state of the map on the object indicated.
4424 * The default map enable state is off. You can enable and disable it with
4425 * evas_object_map_enable_set().
4427 * @param obj object to get the map enabled state from
4428 * @return the map enabled state
4430 EAPI Eina_Bool evas_object_map_enable_get (const Evas_Object *obj);
4433 * Set the map source object
4435 * This sets the object from which the map is taken - can be any object that
4436 * has map enabled on it.
4438 * Currently not implemented. for future use.
4440 * @param obj object to set the map source of
4441 * @param src the source object from which the map is taken
4443 EAPI void evas_object_map_source_set (Evas_Object *obj, Evas_Object *src);
4446 * Get the map source object
4448 * @param obj object to set the map source of
4449 * @return the object set as the source
4451 * @see evas_object_map_source_set()
4453 EAPI Evas_Object *evas_object_map_source_get (const Evas_Object *obj);
4456 * Set current object transformation map.
4458 * This sets the map on a given object. It is copied from the @p map pointer,
4459 * so there is no need to keep the @p map object if you don't need it anymore.
4461 * A map is a set of 4 points which have canvas x, y coordinates per point,
4462 * with an optional z point value as a hint for perspective correction, if it
4463 * is available. As well each point has u and v coordinates. These are like
4464 * "texture coordinates" in OpenGL in that they define a point in the source
4465 * image that is mapped to that map vertex/point. The u corresponds to the x
4466 * coordinate of this mapped point and v, the y coordinate. Note that these
4467 * coordinates describe a bounding region to sample. If you have a 200x100
4468 * source image and want to display it at 200x100 with proper pixel
4469 * precision, then do:
4472 * Evas_Map *m = evas_map_new(4);
4473 * evas_map_point_coord_set(m, 0, 0, 0, 0);
4474 * evas_map_point_coord_set(m, 1, 200, 0, 0);
4475 * evas_map_point_coord_set(m, 2, 200, 100, 0);
4476 * evas_map_point_coord_set(m, 3, 0, 100, 0);
4477 * evas_map_point_image_uv_set(m, 0, 0, 0);
4478 * evas_map_point_image_uv_set(m, 1, 200, 0);
4479 * evas_map_point_image_uv_set(m, 2, 200, 100);
4480 * evas_map_point_image_uv_set(m, 3, 0, 100);
4481 * evas_object_map_set(obj, m);
4485 * Note that the map points a uv coordinates match the image geometry. If
4486 * the @p map parameter is NULL, the stored map will be freed and geometry
4487 * prior to enabling/setting a map will be restored.
4489 * @param obj object to change transformation map
4490 * @param map new map to use
4492 * @see evas_map_new()
4494 EAPI void evas_object_map_set (Evas_Object *obj, const Evas_Map *map);
4497 * Get current object transformation map.
4499 * This returns the current internal map set on the indicated object. It is
4500 * intended for read-only acces and is only valid as long as the object is
4501 * not deleted or the map on the object is not changed. If you wish to modify
4502 * the map and set it back do the following:
4505 * const Evas_Map *m = evas_object_map_get(obj);
4506 * Evas_Map *m2 = evas_map_dup(m);
4507 * evas_map_util_rotate(m2, 30.0, 0, 0);
4508 * evas_object_map_set(obj);
4509 * evas_map_free(m2);
4512 * @param obj object to query transformation map.
4513 * @return map reference to map in use. This is an internal data structure, so
4516 * @see evas_object_map_set()
4518 EAPI const Evas_Map *evas_object_map_get (const Evas_Object *obj);
4522 * Populate source and destination map points to match exactly object.
4524 * Usually one initialize map of an object to match it's original
4525 * position and size, then transform these with evas_map_util_*
4526 * functions, such as evas_map_util_rotate() or
4527 * evas_map_util_3d_rotate(). The original set is done by this
4528 * function, avoiding code duplication all around.
4530 * @param m map to change all 4 points (must be of size 4).
4531 * @param obj object to use unmapped geometry to populate map coordinates.
4532 * @param z Point Z Coordinate hint (pre-perspective transform). This value
4533 * will be used for all four points.
4535 * @see evas_map_util_points_populate_from_object()
4536 * @see evas_map_point_coord_set()
4537 * @see evas_map_point_image_uv_set()
4539 EAPI void evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z);
4542 * Populate source and destination map points to match exactly object.
4544 * Usually one initialize map of an object to match it's original
4545 * position and size, then transform these with evas_map_util_*
4546 * functions, such as evas_map_util_rotate() or
4547 * evas_map_util_3d_rotate(). The original set is done by this
4548 * function, avoiding code duplication all around.
4550 * Z Point coordinate is assumed as 0 (zero).
4552 * @param m map to change all 4 points (must be of size 4).
4553 * @param obj object to use unmapped geometry to populate map coordinates.
4555 * @see evas_map_util_points_populate_from_object_full()
4556 * @see evas_map_util_points_populate_from_geometry()
4557 * @see evas_map_point_coord_set()
4558 * @see evas_map_point_image_uv_set()
4560 EAPI void evas_map_util_points_populate_from_object (Evas_Map *m, const Evas_Object *obj);
4563 * Populate source and destination map points to match given geometry.
4565 * Similar to evas_map_util_points_populate_from_object_full(), this
4566 * call takes raw values instead of querying object's unmapped
4567 * geometry. The given width will be used to calculate destination
4568 * points (evas_map_point_coord_set()) and set the image uv
4569 * (evas_map_point_image_uv_set()).
4571 * @param m map to change all 4 points (must be of size 4).
4572 * @param x Point X Coordinate
4573 * @param y Point Y Coordinate
4574 * @param w width to use to calculate second and third points.
4575 * @param h height to use to calculate third and fourth points.
4576 * @param z Point Z Coordinate hint (pre-perspective transform). This value
4577 * will be used for all four points.
4579 * @see evas_map_util_points_populate_from_object()
4580 * @see evas_map_point_coord_set()
4581 * @see evas_map_point_image_uv_set()
4583 EAPI void evas_map_util_points_populate_from_geometry (Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z);
4586 * Set color of all points to given color.
4588 * This call is useful to reuse maps after they had 3d lightning or
4589 * any other colorization applied before.
4591 * @param m map to change the color of.
4592 * @param r red (0 - 255)
4593 * @param g green (0 - 255)
4594 * @param b blue (0 - 255)
4595 * @param a alpha (0 - 255)
4597 * @see evas_map_point_color_set()
4599 EAPI void evas_map_util_points_color_set (Evas_Map *m, int r, int g, int b, int a);
4602 * Change the map to apply the given rotation.
4604 * This rotates the indicated map's coordinates around the center coordinate
4605 * given by @p cx and @p cy as the rotation center. The points will have their
4606 * X and Y coordinates rotated clockwise by @p degrees degress (360.0 is a
4607 * full rotation). Negative values for degrees will rotate counter-clockwise
4608 * by that amount. All coordinates are canvas global coordinates.
4610 * @param m map to change.
4611 * @param degrees amount of degrees from 0.0 to 360.0 to rotate.
4612 * @param cx rotation's center horizontal position.
4613 * @param cy rotation's center vertical position.
4615 * @see evas_map_point_coord_set()
4616 * @see evas_map_util_zoom()
4618 EAPI void evas_map_util_rotate (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy);
4621 * Change the map to apply the given zooming.
4623 * Like evas_map_util_rotate(), this zooms the points of the map from a center
4624 * point. That center is defined by @p cx and @p cy. The @p zoomx and @p zoomy
4625 * parameters specify how much to zoom in the X and Y direction respectively.
4626 * A value of 1.0 means "don't zoom". 2.0 means "dobule the size". 0.5 is
4627 * "half the size" etc. All coordinates are canvas global coordinates.
4629 * @param m map to change.
4630 * @param zoomx horizontal zoom to use.
4631 * @param zoomy vertical zoom to use.
4632 * @param cx zooming center horizontal position.
4633 * @param cy zooming center vertical position.
4635 * @see evas_map_point_coord_set()
4636 * @see evas_map_util_rotate()
4638 EAPI void evas_map_util_zoom (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy);
4641 * Rotate the map around 3 axes in 3D
4643 * This will rotate not just around the "Z" axis as in evas_map_util_rotate()
4644 * (which is a convenience call for those only wanting 2D). This will rotate
4645 * around the X, Y and Z axes. The Z axis points "into" the screen with low
4646 * values at the screen and higher values further away. The X axis runs from
4647 * left to right on the screen and the Y axis from top to bottom. Like with
4648 * evas_map_util_rotate() you provide a center point to rotate around (in 3D).
4650 * @param m map to change.
4651 * @param dx amount of degrees from 0.0 to 360.0 to rotate arount X axis.
4652 * @param dy amount of degrees from 0.0 to 360.0 to rotate arount Y axis.
4653 * @param dz amount of degrees from 0.0 to 360.0 to rotate arount Z axis.
4654 * @param cx rotation's center horizontal position.
4655 * @param cy rotation's center vertical position.
4656 * @param cz rotation's center vertical position.
4658 EAPI void evas_map_util_3d_rotate (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz);
4661 * Perform lighting calculations on the given Map
4663 * This is used to apply lighting calculations (from a single light source)
4664 * to a given map. The R, G and B values of each vertex will be modified to
4665 * reflect the lighting based on the lixth point coordinates, the light
4666 * color and the ambient color, and at what angle the map is facing the
4667 * light source. A surface should have its points be declared in a
4668 * clockwise fashion if the face is "facing" towards you (as opposed to
4669 * away from you) as faces have a "logical" side for lighting.
4671 * @image html map-light3.png
4672 * @image rtf map-light3.png
4673 * @image latex map-light3.eps
4674 * @note Grey object, no lighting used
4676 * @image html map-light4.png
4677 * @image rtf map-light4.png
4678 * @image latex map-light4.eps
4679 * @note Lights out! Every color set to 0
4681 * @image html map-light5.png
4682 * @image rtf map-light5.png
4683 * @image latex map-light5.eps
4684 * @note Ambient light to full black, red light coming from close at the
4685 * bottom-left vertex
4687 * @image html map-light6.png
4688 * @image rtf map-light6.png
4689 * @image latex map-light6.eps
4690 * @note Same light as before, but not the light is set to 0 and ambient light
4693 * @image html map-light7.png
4694 * @image rtf map-light7.png
4695 * @image latex map-light7.eps
4696 * @note Both lights are on
4698 * @image html map-light8.png
4699 * @image rtf map-light8.png
4700 * @image latex map-light8.eps
4701 * @note Both lights again, but this time both are the same color.
4703 * @param m map to change.
4704 * @param lx X coordinate in space of light point
4705 * @param ly Y coordinate in space of light point
4706 * @param lz Z coordinate in space of light point
4707 * @param lr light red value (0 - 255)
4708 * @param lg light green value (0 - 255)
4709 * @param lb light blue value (0 - 255)
4710 * @param ar ambient color red value (0 - 255)
4711 * @param ag ambient color green value (0 - 255)
4712 * @param ab ambient color blue value (0 - 255)
4714 EAPI void evas_map_util_3d_lighting (Evas_Map *m, Evas_Coord lx, Evas_Coord ly, Evas_Coord lz, int lr, int lg, int lb, int ar, int ag, int ab);
4717 * Apply a perspective transform to the map
4719 * This applies a given perspective (3D) to the map coordinates. X, Y and Z
4720 * values are used. The px and py points specify the "infinite distance" point
4721 * in the 3D conversion (where all lines converge to like when artists draw
4722 * 3D by hand). The @p z0 value specifis the z value at which there is a 1:1
4723 * mapping between spatial coorinates and screen coordinates. Any points
4724 * on this z value will not have their X and Y values modified in the transform.
4725 * Those further away (Z value higher) will shrink into the distance, and
4726 * those less than this value will expand and become bigger. The @p foc value
4727 * determines the "focal length" of the camera. This is in reality the distance
4728 * between the camera lens plane itself (at or closer than this rendering
4729 * results are undefined) and the "z0" z value. This allows for some "depth"
4730 * control and @p foc must be greater than 0.
4732 * @param m map to change.
4733 * @param px The pespective distance X coordinate
4734 * @param py The pespective distance Y coordinate
4735 * @param z0 The "0" z plane value
4736 * @param foc The focal distance
4738 EAPI void evas_map_util_3d_perspective (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
4741 * Get the clockwise state of a map
4743 * This determines if the output points (X and Y. Z is not used) are
4744 * clockwise or anti-clockwise. This can be used for "back-face culling". This
4745 * is where you hide objects that "face away" from you. In this case objects
4746 * that are not clockwise.
4748 * @param m map to query.
4749 * @return 1 if clockwise, 0 otherwise
4751 EAPI Eina_Bool evas_map_util_clockwise_get (Evas_Map *m);
4755 * Create map of transformation points to be later used with an Evas object.
4757 * This creates a set of points (currently only 4 is supported. no other
4758 * number for @p count will work). That is empty and ready to be modified
4759 * with evas_map calls.
4761 * @param count number of points in the map.
4762 * @return a newly allocated map or @c NULL on errors.
4764 * @see evas_map_free()
4765 * @see evas_map_dup()
4766 * @see evas_map_point_coord_set()
4767 * @see evas_map_point_image_uv_set()
4768 * @see evas_map_util_points_populate_from_object_full()
4769 * @see evas_map_util_points_populate_from_object()
4771 * @see evas_object_map_set()
4773 EAPI Evas_Map *evas_map_new (int count);
4776 * Set the smoothing for map rendering
4778 * This sets smoothing for map rendering. If the object is a type that has
4779 * its own smoothing settings, then both the smooth settings for this object
4780 * and the map must be turned off. By default smooth maps are enabled.
4782 * @param m map to modify. Must not be NULL.
4783 * @param enabled enable or disable smooth map rendering
4785 EAPI void evas_map_smooth_set (Evas_Map *m, Eina_Bool enabled);
4788 * get the smoothing for map rendering
4790 * This gets smoothing for map rendering.
4792 * @param m map to get the smooth from. Must not be NULL.
4794 EAPI Eina_Bool evas_map_smooth_get (const Evas_Map *m);
4797 * Set the alpha flag for map rendering
4799 * This sets alpha flag for map rendering. If the object is a type that has
4800 * its own alpha settings, then this will take precedence. Only image objects
4801 * have this currently.
4802 * Setting this off stops alpha blending of the map area, and is
4803 * useful if you know the object and/or all sub-objects is 100% solid.
4805 * @param m map to modify. Must not be NULL.
4806 * @param enabled enable or disable alpha map rendering
4808 EAPI void evas_map_alpha_set (Evas_Map *m, Eina_Bool enabled);
4811 * get the alpha flag for map rendering
4813 * This gets the alph flag for map rendering.
4815 * @param m map to get the alpha from. Must not be NULL.
4817 EAPI Eina_Bool evas_map_alpha_get (const Evas_Map *m);
4820 * Copy a previously allocated map.
4822 * This makes a duplicate of the @p m object and returns it.
4824 * @param m map to copy. Must not be NULL.
4825 * @return newly allocated map with the same count and contents as @p m.
4827 EAPI Evas_Map *evas_map_dup (const Evas_Map *m);
4830 * Free a previously allocated map.
4832 * This frees a givem map @p m and all memory associated with it. You must NOT
4833 * free a map returned by evas_object_map_get() as this is internal.
4835 * @param m map to free.
4837 EAPI void evas_map_free (Evas_Map *m);
4842 * Returns the number of points in a map. Should be at least 4.
4844 * @param m map to get size.
4845 * @return -1 on error, points otherwise.
4847 EAPI int evas_map_count_get (const Evas_Map *m) EINA_CONST;
4850 * Change the map point's coordinate.
4852 * This sets the fixed point's coordinate in the map. Note that points
4853 * describe the outline of a quadrangle and are ordered either clockwise
4854 * or anit-clock-wise. It is suggested to keep your quadrangles concave and
4855 * non-complex, though these polygon modes may work, they may not render
4856 * a desired set of output. The quadrangle will use points 0 and 1 , 1 and 2,
4857 * 2 and 3, and 3 and 0 to describe the edges of the quandrangle.
4859 * The X and Y and Z coordinates are in canvas units. Z is optional and may
4860 * or may not be honored in drawing. Z is a hint and does not affect the
4861 * X and Y rendered coordinates. It may be used for calculating fills with
4862 * perspective correct rendering.
4864 * Remember all coordinates are canvas global ones like with move and reize
4867 * @param m map to change point. Must not be @c NULL.
4868 * @param idx index of point to change. Must be smaller than map size.
4869 * @param x Point X Coordinate
4870 * @param y Point Y Coordinate
4871 * @param z Point Z Coordinate hint (pre-perspective transform)
4873 * @see evas_map_util_rotate()
4874 * @see evas_map_util_zoom()
4875 * @see evas_map_util_points_populate_from_object_full()
4876 * @see evas_map_util_points_populate_from_object()
4878 EAPI void evas_map_point_coord_set (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z);
4881 * Get the map point's coordinate.
4883 * This returns the coordinates of the given point in the map.
4885 * @param m map to query point.
4886 * @param idx index of point to query. Must be smaller than map size.
4887 * @param x where to return the X coordinate.
4888 * @param y where to return the Y coordinate.
4889 * @param z where to return the Z coordinate.
4891 EAPI void evas_map_point_coord_get (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z);
4894 * Change the map point's U and V texture source point
4896 * This sets the U and V coordinates for the point. This determines which
4897 * coordinate in the source image is mapped to the given point, much like
4898 * OpenGL and textures. Notes that these points do select the pixel, but
4899 * are double floating point values to allow for accuracy and sub-pixel
4902 * @param m map to change the point of.
4903 * @param idx index of point to change. Must be smaller than map size.
4904 * @param u the X coordinate within the image/texture source
4905 * @param v the Y coordinate within the image/texture source
4907 * @see evas_map_point_coord_set()
4908 * @see evas_object_map_set()
4909 * @see evas_map_util_points_populate_from_object_full()
4910 * @see evas_map_util_points_populate_from_object()
4912 EAPI void evas_map_point_image_uv_set (Evas_Map *m, int idx, double u, double v);
4915 * Get the map point's U and V texture source points
4917 * This returns the texture points set by evas_map_point_image_uv_set().
4919 * @param m map to query point.
4920 * @param idx index of point to query. Must be smaller than map size.
4921 * @param u where to write the X coordinate within the image/texture source
4922 * @param v where to write the Y coordinate within the image/texture source
4924 EAPI void evas_map_point_image_uv_get (const Evas_Map *m, int idx, double *u, double *v);
4927 * Set the color of a vertex in the map
4929 * This sets the color of the vertex in the map. Colors will be linearly
4930 * interpolated between vertex points through the map. Color will multiply
4931 * the "texture" pixels (like GL_MODULATE in OpenGL). The default color of
4932 * a vertex in a map is white solid (255, 255, 255, 255) which means it will
4933 * have no affect on modifying the texture pixels.
4935 * @param m map to change the color of.
4936 * @param idx index of point to change. Must be smaller than map size.
4937 * @param r red (0 - 255)
4938 * @param g green (0 - 255)
4939 * @param b blue (0 - 255)
4940 * @param a alpha (0 - 255)
4942 * @see evas_map_util_points_color_set()
4943 * @see evas_map_point_coord_set()
4944 * @see evas_object_map_set()
4946 EAPI void evas_map_point_color_set (Evas_Map *m, int idx, int r, int g, int b, int a);
4949 * Get the color set on a vertex in the map
4951 * This gets the color set by evas_map_point_color_set() on the given vertex
4954 * @param m map to get the color of the vertex from.
4955 * @param idx index of point get. Must be smaller than map size.
4956 * @param r pointer to red return
4957 * @param g pointer to green return
4958 * @param b pointer to blue return
4959 * @param a pointer to alpha return (0 - 255)
4961 * @see evas_map_point_coord_set()
4962 * @see evas_object_map_set()
4964 EAPI void evas_map_point_color_get (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a);
4970 * @defgroup Evas_Object_Group_Size_Hints Size Hints
4972 * Objects may carry hints, so that another object that acts as a
4973 * manager (see @ref Evas_Smart_Object_Group) may know how to properly
4974 * position and resize its subordinate objects. The Size Hints provide
4975 * a common interface that is recommended as the protocol for such
4978 * For example, box objects use alignment hints to align its
4979 * lines/columns inside its container, padding hints to set the
4980 * padding between each individual child, etc.
4982 * Examples on their usage:
4983 * - @ref Example_Evas_Size_Hints "evas-hints.c"
4984 * - @ref Example_Evas_Aspect_Hints "evas-aspect-hints.c"
4986 * @ingroup Evas_Object_Group
4990 * @addtogroup Evas_Object_Group_Size_Hints
4995 * Retrieves the hints for an object's minimum size.
4997 * @param obj The given Evas object to query hints from.
4998 * @param w Pointer to an integer in which to store the minimum width.
4999 * @param h Pointer to an integer in which to store the minimum height.
5001 * These are hints on the minimim sizes @p obj should have. This is
5002 * not a size enforcement in any way, it's just a hint that should be
5003 * used whenever appropriate.
5005 * @note Use @c NULL pointers on the hint components you're not
5006 * interested in: they'll be ignored by the function.
5008 * @see evas_object_size_hint_min_set() for an example
5010 EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
5013 * Sets the hints for an object's minimum size.
5015 * @param obj The given Evas object to query hints from.
5016 * @param w Integer to use as the minimum width hint.
5017 * @param h Integer to use as the minimum height hint.
5019 * This is not a size enforcement in any way, it's just a hint that
5020 * should be used whenever appropriate.
5022 * Values @c 0 will be treated as unset hint components, when queried
5026 * @dontinclude evas-hints.c
5027 * @skip evas_object_size_hint_min_set
5030 * In this example the minimum size hints change de behavior of an
5031 * Evas box when layouting its children. See the full @ref
5032 * Example_Evas_Size_Hints "example".
5034 * @see evas_object_size_hint_min_get()
5036 EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5039 * Retrieves the hints for an object's maximum size.
5041 * @param obj The given Evas object to query hints from.
5042 * @param w Pointer to an integer in which to store the maximum width.
5043 * @param h Pointer to an integer in which to store the maximum height.
5045 * These are hints on the maximum sizes @p obj should have. This is
5046 * not a size enforcement in any way, it's just a hint that should be
5047 * used whenever appropriate.
5049 * @note Use @c NULL pointers on the hint components you're not
5050 * interested in: they'll be ignored by the function.
5052 * @see evas_object_size_hint_max_set()
5054 EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
5057 * Sets the hints for an object's maximum size.
5059 * @param obj The given Evas object to query hints from.
5060 * @param w Integer to use as the maximum width hint.
5061 * @param h Integer to use as the maximum height hint.
5063 * This is not a size enforcement in any way, it's just a hint that
5064 * should be used whenever appropriate.
5066 * Values @c -1 will be treated as unset hint components, when queried
5070 * @dontinclude evas-hints.c
5071 * @skip evas_object_size_hint_max_set
5074 * In this example the maximum size hints change de behavior of an
5075 * Evas box when layouting its children. See the full @ref
5076 * Example_Evas_Size_Hints "example".
5078 * @see evas_object_size_hint_max_get()
5080 EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5083 * Retrieves the hints for an object's optimum size.
5085 * @param obj The given Evas object to query hints from.
5086 * @param w Pointer to an integer in which to store the requested width.
5087 * @param h Pointer to an integer in which to store the requested height.
5089 * These are hints on the optimum sizes @p obj should have. This is
5090 * not a size enforcement in any way, it's just a hint that should be
5091 * used whenever appropriate.
5093 * @note Use @c NULL pointers on the hint components you're not
5094 * interested in: they'll be ignored by the function.
5096 * @see evas_object_size_hint_request_set()
5098 EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
5101 * Sets the hints for an object's optimum size.
5103 * @param obj The given Evas object to query hints from.
5104 * @param w Integer to use as the preferred width hint.
5105 * @param h Integer to use as the preferred height hint.
5107 * This is not a size enforcement in any way, it's just a hint that
5108 * should be used whenever appropriate.
5110 * Values @c 0 will be treated as unset hint components, when queried
5113 * @see evas_object_size_hint_request_get()
5115 EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5118 * Retrieves the hints for an object's aspect ratio.
5120 * @param obj The given Evas object to query hints from.
5121 * @param aspect Returns the policy/type of aspect ratio applied to @p obj.
5122 * @param w Pointer to an integer in which to store the aspect's width
5124 * @param h Pointer to an integer in which to store the aspect's
5125 * height ratio term.
5127 * The different aspect ratio policies are documented in the
5128 * #Evas_Aspect_Control type. A container respecting these size hints
5129 * would @b resize its children accordingly to those policies.
5131 * For any policy, if any of the given aspect ratio terms are @c 0,
5132 * the object's container should ignore the aspect and scale @p obj to
5133 * occupy the whole available area. If they are both positive
5134 * integers, that proportion will be respected, under each scaling
5137 * These images illustrate some of the #Evas_Aspect_Control policies:
5139 * @image html any-policy.png
5140 * @image rtf any-policy.png
5141 * @image latex any-policy.eps
5143 * @image html aspect-control-none-neither.png
5144 * @image rtf aspect-control-none-neither.png
5145 * @image latex aspect-control-none-neither.eps
5147 * @image html aspect-control-both.png
5148 * @image rtf aspect-control-both.png
5149 * @image latex aspect-control-both.eps
5151 * @image html aspect-control-horizontal.png
5152 * @image rtf aspect-control-horizontal.png
5153 * @image latex aspect-control-horizontal.eps
5155 * This is not a size enforcement in any way, it's just a hint that
5156 * should be used whenever appropriate.
5158 * @note Use @c NULL pointers on the hint components you're not
5159 * interested in: they'll be ignored by the function.
5162 * @dontinclude evas-aspect-hints.c
5163 * @skip if (strcmp(ev->keyname, "c") == 0)
5166 * See the full @ref Example_Evas_Aspect_Hints "example".
5168 * @see evas_object_size_hint_aspect_set()
5170 EAPI void evas_object_size_hint_aspect_get (const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
5173 * Sets the hints for an object's aspect ratio.
5175 * @param obj The given Evas object to query hints from.
5176 * @param aspect The policy/type of aspect ratio to apply to @p obj.
5177 * @param w Integer to use as aspect width ratio term.
5178 * @param h Integer to use as aspect height ratio term.
5180 * This is not a size enforcement in any way, it's just a hint that should
5181 * be used whenever appropriate.
5183 * If any of the given aspect ratio terms are @c 0,
5184 * the object's container will ignore the aspect and scale @p obj to
5185 * occupy the whole available area, for any given policy.
5187 * @see evas_object_size_hint_aspect_get() for more information.
5189 EAPI void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5192 * Retrieves the hints for on object's alignment.
5194 * @param obj The given Evas object to query hints from.
5195 * @param x Pointer to a double in which to store the horizontal
5197 * @param y Pointer to a double in which to store the vertical
5200 * This is not a size enforcement in any way, it's just a hint that
5201 * should be used whenever appropriate.
5203 * @note Use @c NULL pointers on the hint components you're not
5204 * interested in: they'll be ignored by the function.
5206 * @see evas_object_size_hint_align_set() for more information
5208 EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
5211 * Sets the hints for an object's alignment.
5213 * @param obj The given Evas object to query hints from.
5214 * @param x Double, ranging from @c 0.0 to @c 1.0 or with the
5215 * special value #EVAS_HINT_FILL, to use as horizontal alignment hint.
5216 * @param y Double, ranging from @c 0.0 to @c 1.0 or with the
5217 * special value #EVAS_HINT_FILL, to use as vertical alignment hint.
5219 * These are hints on how to align an object <b>inside the boundaries
5220 * of a container/manager</b>. Accepted values are in the @c 0.0 to @c
5221 * 1.0 range, with the special value #EVAS_HINT_FILL used to specify
5222 * "justify" or "fill" by some users. In this case, maximum size hints
5223 * should be enforced with higher priority, if they are set. Also, any
5224 * padding hint set on objects should add up to the alignment space on
5225 * the final scene composition.
5227 * See documentation of possible users: in Evas, they are the @ref
5228 * Evas_Object_Box "box" and @ref Evas_Object_Table "table" smart
5231 * For the horizontal component, @c 0.0 means to the left, @c 1.0
5232 * means to the right. Analogously, for the vertical component, @c 0.0
5233 * to the top, @c 1.0 means to the bottom.
5235 * See the following figure:
5237 * @image html alignment-hints.png
5238 * @image rtf alignment-hints.png
5239 * @image latex alignment-hints.eps
5241 * This is not a size enforcement in any way, it's just a hint that
5242 * should be used whenever appropriate.
5245 * @dontinclude evas-hints.c
5246 * @skip evas_object_size_hint_align_set
5249 * In this example the alignment hints change de behavior of an Evas
5250 * box when layouting its children. See the full @ref
5251 * Example_Evas_Size_Hints "example".
5253 * @see evas_object_size_hint_align_get()
5254 * @see evas_object_size_hint_max_set()
5255 * @see evas_object_size_hint_padding_set()
5257 EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
5260 * Retrieves the hints for an object's weight.
5262 * @param obj The given Evas object to query hints from.
5263 * @param x Pointer to a double in which to store the horizontal weight.
5264 * @param y Pointer to a double in which to store the vertical weight.
5266 * Accepted values are zero or positive values. Some users might use
5267 * this hint as a boolean, but some might consider it as a @b
5268 * proportion, see documentation of possible users, which in Evas are
5269 * the @ref Evas_Object_Box "box" and @ref Evas_Object_Table "table"
5272 * This is not a size enforcement in any way, it's just a hint that
5273 * should be used whenever appropriate.
5275 * @note Use @c NULL pointers on the hint components you're not
5276 * interested in: they'll be ignored by the function.
5278 * @see evas_object_size_hint_weight_set() for an example
5280 EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
5283 * Sets the hints for an object's weight.
5285 * @param obj The given Evas object to query hints from.
5286 * @param x Nonnegative double value to use as horizontal weight hint.
5287 * @param y Nonnegative double value to use as vertical weight hint.
5289 * This is not a size enforcement in any way, it's just a hint that
5290 * should be used whenever appropriate.
5292 * This is a hint on how a container object should @b resize a given
5293 * child within its area. Containers may adhere to the simpler logic
5294 * of just expanding the child object's dimensions to fit its own (see
5295 * the #EVAS_HINT_EXPAND helper weight macro) or the complete one of
5296 * taking each child's weight hint as real @b weights to how much of
5297 * its size to allocate for them in each axis. A container is supposed
5298 * to, after @b normalizing the weights of its children (with weight
5299 * hints), distribute the space it has to layout them by those factors
5300 * -- most weighted children get larger in this process than the least
5304 * @dontinclude evas-hints.c
5305 * @skip evas_object_size_hint_weight_set
5308 * In this example the weight hints change de behavior of an Evas box
5309 * when layouting its children. See the full @ref
5310 * Example_Evas_Size_Hints "example".
5312 * @see evas_object_size_hint_weight_get() for more information
5314 EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
5317 * Retrieves the hints for an object's padding space.
5319 * @param obj The given Evas object to query hints from.
5320 * @param l Pointer to an integer in which to store left padding.
5321 * @param r Pointer to an integer in which to store right padding.
5322 * @param t Pointer to an integer in which to store top padding.
5323 * @param b Pointer to an integer in which to store bottom padding.
5325 * Padding is extra space an object takes on each of its delimiting
5326 * rectangle sides, in canvas units. This space will be rendered
5327 * transparent, naturally, as in the following figure:
5329 * @image html padding-hints.png
5330 * @image rtf padding-hints.png
5331 * @image latex padding-hints.eps
5333 * This is not a size enforcement in any way, it's just a hint that
5334 * should be used whenever appropriate.
5336 * @note Use @c NULL pointers on the hint components you're not
5337 * interested in: they'll be ignored by the function.
5340 * @dontinclude evas-hints.c
5341 * @skip evas_object_size_hint_padding_set
5344 * In this example the padding hints change de behavior of an Evas box
5345 * when layouting its children. See the full @ref
5346 * Example_Evas_Size_Hints "example".
5348 * @see evas_object_size_hint_padding_set()
5350 EAPI void evas_object_size_hint_padding_get (const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
5353 * Sets the hints for an object's padding space.
5355 * @param obj The given Evas object to query hints from.
5356 * @param l Integer to specify left padding.
5357 * @param r Integer to specify right padding.
5358 * @param t Integer to specify top padding.
5359 * @param b Integer to specify bottom padding.
5361 * This is not a size enforcement in any way, it's just a hint that
5362 * should be used whenever appropriate.
5364 * @see evas_object_size_hint_padding_get() for more information
5366 EAPI void evas_object_size_hint_padding_set (Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b) EINA_ARG_NONNULL(1);
5373 * @defgroup Evas_Object_Group_Extras Extra Object Manipulation
5375 * Miscellaneous functions that also apply to any object, but are less
5376 * used or not implemented by all objects.
5378 * Examples on this group of functions can be found @ref
5379 * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here".
5381 * @ingroup Evas_Object_Group
5385 * @addtogroup Evas_Object_Group_Extras
5390 * Set an attached data pointer to an object with a given string key.
5392 * @param obj The object to attach the data pointer to
5393 * @param key The string key for the data to access it
5394 * @param data The ponter to the data to be attached
5396 * This attaches the pointer @p data to the object @p obj, given the
5397 * access string @p key. This pointer will stay "hooked" to the object
5398 * until a new pointer with the same string key is attached with
5399 * evas_object_data_set() or it is deleted with
5400 * evas_object_data_del(). On deletion of the object @p obj, the
5401 * pointers will not be accessible from the object anymore.
5403 * You can find the pointer attached under a string key using
5404 * evas_object_data_get(). It is the job of the calling application to
5405 * free any data pointed to by @p data when it is no longer required.
5407 * If @p data is @c NULL, the old value stored at @p key will be
5408 * removed but no new value will be stored. This is synonymous with
5409 * calling evas_object_data_del() with @p obj and @p key.
5411 * @note This function is very handy when you have data associated
5412 * specifically to an Evas object, being of use only when dealing with
5413 * it. Than you don't have the burden to a pointer to it elsewhere,
5414 * using this family of functions.
5420 * extern Evas_Object *obj;
5422 * my_data = malloc(500);
5423 * evas_object_data_set(obj, "name_of_data", my_data);
5424 * printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data"));
5427 EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2);
5430 * Return an attached data pointer on an Evas object by its given
5433 * @param obj The object to which the data was attached
5434 * @param key The string key the data was stored under
5435 * @return The data pointer stored, or @c NULL if none was stored
5437 * This function will return the data pointer attached to the object
5438 * @p obj, stored using the string key @p key. If the object is valid
5439 * and a data pointer was stored under the given key, that pointer
5440 * will be returned. If this is not the case, @c NULL will be
5441 * returned, signifying an invalid object or a non-existent key. It is
5442 * possible that a @c NULL pointer was stored given that key, but this
5443 * situation is non-sensical and thus can be considered an error as
5444 * well. @c NULL pointers are never stored as this is the return value
5445 * if an error occurs.
5451 * extern Evas_Object *obj;
5453 * my_data = evas_object_data_get(obj, "name_of_my_data");
5454 * if (my_data) printf("Data stored was %p\n", my_data);
5455 * else printf("No data was stored on the object\n");
5458 EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
5461 * Delete an attached data pointer from an object.
5463 * @param obj The object to delete the data pointer from
5464 * @param key The string key the data was stored under
5465 * @return The original data pointer stored at @p key on @p obj
5467 * This will remove the stored data pointer from @p obj stored under
5468 * @p key and return this same pointer, if actually there was data
5469 * there, or @c NULL, if nothing was stored under that key.
5475 * extern Evas_Object *obj;
5477 * my_data = evas_object_data_del(obj, "name_of_my_data");
5480 EAPI void *evas_object_data_del (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
5484 * Set pointer behavior.
5487 * @param setting desired behavior.
5489 * This function has direct effect on event callbacks related to
5492 * If @p setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse
5493 * is down at this object, events will be restricted to it as source,
5494 * mouse moves, for example, will be emitted even if outside this
5497 * If @p setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will
5498 * be emitted just when inside this object area.
5500 * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB.
5502 * @ingroup Evas_Object_Group_Extras
5504 EAPI void evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1);
5507 * Determine how pointer will behave.
5509 * @return pointer behavior.
5510 * @ingroup Evas_Object_Group_Extras
5512 EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5516 * Sets whether or not the given Evas object is to be drawn anti-aliased.
5518 * @param obj The given Evas object.
5519 * @param anti_alias 1 if the object is to be anti_aliased, 0 otherwise.
5520 * @ingroup Evas_Object_Group_Extras
5522 EAPI void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1);
5525 * Retrieves whether or not the given Evas object is to be drawn anti_aliased.
5526 * @param obj The given Evas object.
5527 * @return @c 1 if the object is to be anti_aliased. @c 0 otherwise.
5528 * @ingroup Evas_Object_Group_Extras
5530 EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5534 * Sets the scaling factor for an Evas object. Does not affect all
5537 * @param obj The given Evas object.
5538 * @param scale The scaling factor. <c>1.0</c> means no scaling,
5541 * This will multiply the object's dimension by the given factor, thus
5542 * altering its geometry (width and height). Useful when you want
5543 * scalable UI elements, possibly at run time.
5545 * @note Only text and textblock objects have scaling change
5546 * handlers. Other objects won't change visually on this call.
5548 * @see evas_object_scale_get()
5550 * @ingroup Evas_Object_Group_Extras
5552 EAPI void evas_object_scale_set (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1);
5555 * Retrieves the scaling factor for the given Evas object.
5557 * @param obj The given Evas object.
5558 * @return The scaling factor.
5560 * @ingroup Evas_Object_Group_Extras
5562 * @see evas_object_scale_set()
5564 EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5568 * Sets the render_op to be used for rendering the Evas object.
5569 * @param obj The given Evas object.
5570 * @param render_op one of the Evas_Render_Op values.
5571 * @ingroup Evas_Object_Group_Extras
5573 EAPI void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1);
5576 * Retrieves the current value of the operation used for rendering the Evas object.
5577 * @param obj The given Evas object.
5578 * @return one of the enumerated values in Evas_Render_Op.
5579 * @ingroup Evas_Object_Group_Extras
5581 EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5584 * Set whether to use precise (usually expensive) point collision
5585 * detection for a given Evas object.
5587 * @param obj The given object.
5588 * @param precise whether to use precise point collision detection or
5589 * not The default value is false.
5591 * Use this function to make Evas treat objects' transparent areas as
5592 * @b not belonging to it with regard to mouse pointer events. By
5593 * default, all of the object's boundary rectangle will be taken in
5596 * @warning By using precise point collision detection you'll be
5597 * making Evas more resource intensive.
5599 * Example code follows.
5600 * @dontinclude evas-events.c
5601 * @skip if (strcmp(ev->keyname, "p") == 0)
5604 * See the full example @ref Example_Evas_Events "here".
5606 * @see evas_object_precise_is_inside_get()
5607 * @ingroup Evas_Object_Group_Extras
5609 EAPI void evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1);
5612 * Determine whether an object is set to use precise point collision
5615 * @param obj The given object.
5616 * @return whether @p obj is set to use precise point collision
5617 * detection or not The default value is false.
5619 * @see evas_object_precise_is_inside_set() for an example
5621 * @ingroup Evas_Object_Group_Extras
5623 EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5626 * Set a hint flag on the given Evas object that it's used as a "static
5629 * @param obj The given object.
5630 * @param is_static_clip @c EINA_TRUE if it's to be used as a static
5631 * clipper, @c EINA_FALSE otherwise
5633 * This is a hint to Evas that this object is used as a big static
5634 * clipper and shouldn't be moved with children and otherwise
5635 * considered specially. The default value for new objects is @c
5638 * @see evas_object_static_clip_get()
5640 * @ingroup Evas_Object_Group_Extras
5642 EAPI void evas_object_static_clip_set (Evas_Object *obj, Eina_Bool is_static_clip) EINA_ARG_NONNULL(1);
5645 * Get the "static clipper" hint flag for a given Evas object.
5647 * @param obj The given object.
5648 * @returrn @c EINA_TRUE if it's set as a static clipper, @c
5649 * EINA_FALSE otherwise
5651 * @see evas_object_static_clip_set() for more details
5653 * @ingroup Evas_Object_Group_Extras
5655 EAPI Eina_Bool evas_object_static_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5662 * @defgroup Evas_Object_Group_Find Finding Objects
5664 * Functions that allows finding objects by their position, name or
5667 * @ingroup Evas_Object_Group
5671 * @addtogroup Evas_Object_Group_Find
5676 * Retrieve the object that currently has focus.
5678 * @param e The Evas canvas to query for focused object on.
5679 * @return The object that has focus or @c NULL if there is not one.
5681 * Evas can have (at most) one of its objects focused at a time.
5682 * Focused objects will be the ones having <b>key events</b> delivered
5683 * to, which the programmer can act upon by means of
5684 * evas_object_event_callback_add() usage.
5686 * @note Most users wouldn't be dealing directly with Evas' focused
5687 * objects. Instead, they would be using a higher level library for
5688 * that (like a toolkit, as Elementary) to handle focus and who's
5689 * receiving input for them.
5691 * This call returns the object that currently has focus on the canvas
5692 * @p e or @c NULL, if none.
5694 * @see evas_object_focus_set
5695 * @see evas_object_focus_get
5696 * @see evas_object_key_grab
5697 * @see evas_object_key_ungrab
5700 * @dontinclude evas-events.c
5701 * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
5702 * @until evas_object_focus_set(d.bg, EINA_TRUE);
5703 * @dontinclude evas-events.c
5704 * @skip called when our rectangle gets focus
5707 * In this example the @c event_info is exactly a pointer to that
5708 * focused rectangle. See the full @ref Example_Evas_Events "example".
5710 * @ingroup Evas_Object_Group_Find
5712 EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5715 * Retrieves the object on the given evas with the given name.
5716 * @param e The given evas.
5717 * @param name The given name.
5718 * @return If successful, the Evas object with the given name. Otherwise,
5720 * @ingroup Evas_Object_Group_Find
5722 EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5725 * Retrieve the Evas object stacked at the top of a given position in
5728 * @param e A handle to the canvas.
5729 * @param x The horizontal coordinate of the position
5730 * @param y The vertical coordinate of the position
5731 * @param include_pass_events_objects Boolean flag to include or not
5732 * objects which pass events in this calculation
5733 * @param include_hidden_objects Boolean flag to include or not hidden
5734 * objects in this calculation
5735 * @return The Evas object that is over all other objects at the given
5738 * This function will traverse all the layers of the given canvas,
5739 * from top to bottom, querying for objects with areas covering the
5740 * given position. The user can remove from from the query
5741 * objects which are hidden and/or which are set to pass events.
5743 * @warning This function will @b skip objects parented by smart
5744 * objects, acting only on the ones at the "top level", with regard to
5747 EAPI Evas_Object *evas_object_top_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5750 * Retrieve the Evas object stacked at the top at the position of the
5751 * mouse cursor, over a given canvas
5753 * @param e A handle to the canvas.
5754 * @return The Evas object that is over all other objects at the mouse
5755 * pointer's position
5757 * This function will traverse all the layers of the given canvas,
5758 * from top to bottom, querying for objects with areas covering the
5759 * mouse pointer's position, over @p e.
5761 * @warning This function will @b skip objects parented by smart
5762 * objects, acting only on the ones at the "top level", with regard to
5765 EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5768 * Retrieve the Evas object stacked at the top of a given rectangular
5769 * region in a canvas
5771 * @param e A handle to the canvas.
5772 * @param x The top left corner's horizontal coordinate for the
5773 * rectangular region
5774 * @param y The top left corner's vertical coordinate for the
5775 * rectangular region
5776 * @param w The width of the rectangular region
5777 * @param h The height of the rectangular region
5778 * @param include_pass_events_objects Boolean flag to include or not
5779 * objects which pass events in this calculation
5780 * @param include_hidden_objects Boolean flag to include or not hidden
5781 * objects in this calculation
5782 * @return The Evas object that is over all other objects at the given
5783 * rectangular region.
5785 * This function will traverse all the layers of the given canvas,
5786 * from top to bottom, querying for objects with areas overlapping
5787 * with the given rectangular region inside @p e. The user can remove
5788 * from the query objects which are hidden and/or which are set to
5791 * @warning This function will @b skip objects parented by smart
5792 * objects, acting only on the ones at the "top level", with regard to
5795 EAPI Evas_Object *evas_object_top_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5798 * Retrieve a list of Evas objects lying over a given position in
5801 * @param e A handle to the canvas.
5802 * @param x The horizontal coordinate of the position
5803 * @param y The vertical coordinate of the position
5804 * @param include_pass_events_objects Boolean flag to include or not
5805 * objects which pass events in this calculation
5806 * @param include_hidden_objects Boolean flag to include or not hidden
5807 * objects in this calculation
5808 * @return The list of Evas objects that are over the given position
5811 * This function will traverse all the layers of the given canvas,
5812 * from top to bottom, querying for objects with areas covering the
5813 * given position. The user can remove from from the query
5814 * objects which are hidden and/or which are set to pass events.
5816 * @warning This function will @b skip objects parented by smart
5817 * objects, acting only on the ones at the "top level", with regard to
5820 EAPI Eina_List *evas_objects_at_xy_get (const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5821 EAPI Eina_List *evas_objects_in_rectangle_get (const Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5824 * Get the lowest (stacked) Evas object on the canvas @p
5826 * @param e a valid canvas pointer
5827 * @return a pointer to the lowest object on it, if any, or @c NULL,
5830 * This function will take all populated layers in the canvas into
5831 * account, getting the lowest object for the lowest layer, naturally.
5833 * @see evas_object_layer_get()
5834 * @see evas_object_layer_set()
5835 * @see evas_object_below_get()
5836 * @see evas_object_above_get()
5838 * @warning This function will @b skip objects parented by smart
5839 * objects, acting only on the ones at the "top level", with regard to
5842 EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5845 * Get the highest (stacked) Evas object on the canvas @p
5847 * @param e a valid canvas pointer
5848 * @return a pointer to the highest object on it, if any, or @c NULL,
5851 * This function will take all populated layers in the canvas into
5852 * account, getting the highest object for the highest layer,
5855 * @see evas_object_layer_get()
5856 * @see evas_object_layer_set()
5857 * @see evas_object_below_get()
5858 * @see evas_object_above_get()
5860 * @warning This function will @b skip objects parented by smart
5861 * objects, acting only on the ones at the "top level", with regard to
5864 EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
5871 * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors
5873 * Evas provides a way to intercept method calls. The interceptor
5874 * callback may opt to completely deny the call, or may check and
5875 * change the parameters before continuing. The continuation of an
5876 * intercepted call is done by calling the intercepted call again,
5877 * from inside the interceptor callback.
5879 * @ingroup Evas_Object_Group
5883 * @addtogroup Evas_Object_Group_Interceptors
5887 typedef void (*Evas_Object_Intercept_Show_Cb) (void *data, Evas_Object *obj);
5888 typedef void (*Evas_Object_Intercept_Hide_Cb) (void *data, Evas_Object *obj);
5889 typedef void (*Evas_Object_Intercept_Move_Cb) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y);
5890 typedef void (*Evas_Object_Intercept_Resize_Cb) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h);
5891 typedef void (*Evas_Object_Intercept_Raise_Cb) (void *data, Evas_Object *obj);
5892 typedef void (*Evas_Object_Intercept_Lower_Cb) (void *data, Evas_Object *obj);
5893 typedef void (*Evas_Object_Intercept_Stack_Above_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
5894 typedef void (*Evas_Object_Intercept_Stack_Below_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
5895 typedef void (*Evas_Object_Intercept_Layer_Set_Cb) (void *data, Evas_Object *obj, int l);
5896 typedef void (*Evas_Object_Intercept_Color_Set_Cb) (void *data, Evas_Object *obj, int r, int g, int b, int a);
5897 typedef void (*Evas_Object_Intercept_Clip_Set_Cb) (void *data, Evas_Object *obj, Evas_Object *clip);
5898 typedef void (*Evas_Object_Intercept_Clip_Unset_Cb) (void *data, Evas_Object *obj);
5901 * Set the callback function that intercepts a show event of a object.
5903 * @param obj The given canvas object pointer.
5904 * @param func The given function to be the callback function.
5905 * @param data The data passed to the callback function.
5907 * This function sets a callback function to intercepts a show event
5908 * of a canvas object.
5910 * @see evas_object_intercept_show_callback_del().
5913 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);
5916 * Unset the callback function that intercepts a show event of a
5919 * @param obj The given canvas object pointer.
5920 * @param func The given callback function.
5922 * This function sets a callback function to intercepts a show event
5923 * of a canvas object.
5925 * @see evas_object_intercept_show_callback_add().
5928 EAPI void *evas_object_intercept_show_callback_del (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2);
5931 * Set the callback function that intercepts a hide event of a object.
5933 * @param obj The given canvas object pointer.
5934 * @param func The given function to be the callback function.
5935 * @param data The data passed to the callback function.
5937 * This function sets a callback function to intercepts a hide event
5938 * of a canvas object.
5940 * @see evas_object_intercept_hide_callback_del().
5943 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);
5946 * Unset the callback function that intercepts a hide event of a
5949 * @param obj The given canvas object pointer.
5950 * @param func The given callback function.
5952 * This function sets a callback function to intercepts a hide event
5953 * of a canvas object.
5955 * @see evas_object_intercept_hide_callback_add().
5958 EAPI void *evas_object_intercept_hide_callback_del (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2);
5961 * Set the callback function that intercepts a move event of a object.
5963 * @param obj The given canvas object pointer.
5964 * @param func The given function to be the callback function.
5965 * @param data The data passed to the callback function.
5967 * This function sets a callback function to intercepts a move event
5968 * of a canvas object.
5970 * @see evas_object_intercept_move_callback_del().
5973 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);
5976 * Unset the callback function that intercepts a move event of a
5979 * @param obj The given canvas object pointer.
5980 * @param func The given callback function.
5982 * This function sets a callback function to intercepts a move event
5983 * of a canvas object.
5985 * @see evas_object_intercept_move_callback_add().
5988 EAPI void *evas_object_intercept_move_callback_del (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2);
5990 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);
5991 EAPI void *evas_object_intercept_resize_callback_del (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2);
5992 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);
5993 EAPI void *evas_object_intercept_raise_callback_del (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2);
5994 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);
5995 EAPI void *evas_object_intercept_lower_callback_del (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2);
5996 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);
5997 EAPI void *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) EINA_ARG_NONNULL(1, 2);
5998 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);
5999 EAPI void *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) EINA_ARG_NONNULL(1, 2);
6000 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);
6001 EAPI void *evas_object_intercept_layer_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) EINA_ARG_NONNULL(1, 2);
6002 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);
6003 EAPI void *evas_object_intercept_color_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) EINA_ARG_NONNULL(1, 2);
6004 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);
6005 EAPI void *evas_object_intercept_clip_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) EINA_ARG_NONNULL(1, 2);
6006 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);
6007 EAPI void *evas_object_intercept_clip_unset_callback_del (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) EINA_ARG_NONNULL(1, 2);
6014 * @defgroup Evas_Object_Specific Specific Object Functions
6016 * Functions that work on specific objects.
6021 * @defgroup Evas_Object_Rectangle Rectangle Object Functions
6023 * @brief Function to create evas rectangle objects.
6025 * This function may seem useless given there are no functions to manipulate
6026 * the created rectangle, however the rectangle is actually very useful and can
6027 * be manipulate using the generic @ref Evas_Object_Group
6028 * "evas object functions".
6030 * For an example of use of an evas_object_rectangle see @ref
6031 * Example_Evas_Object_Manipulation "here".
6033 * @ingroup Evas_Object_Specific
6037 * Adds a rectangle to the given evas.
6038 * @param e The given evas.
6039 * @return The new rectangle object.
6041 * @ingroup Evas_Object_Rectangle
6043 EAPI Evas_Object *evas_object_rectangle_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
6046 * @defgroup Evas_Object_Image Image Object Functions
6048 * Here are grouped together functions used to create and manipulate
6049 * image objects. They are available to whichever occasion one needs
6050 * complex imagery on a GUI that could not be achieved by the other
6051 * Evas' primitive object types, or to make image manipulations.
6053 * Evas will support whichever image file types it was compiled with
6054 * support to (its image loaders) -- check your software packager for
6055 * that information and see
6056 * evas_object_image_extension_can_load_get().
6058 * @section Evas_Object_Image_Basics Image object basics
6060 * The most common use of image objects -- to display an image on the
6061 * canvas -- is achieved by a common function triplet:
6063 * img = evas_object_image_add(canvas);
6064 * evas_object_image_file_set(img, "path/to/img", NULL);
6065 * evas_object_image_fill_set(img, 0, 0, w, h);
6067 * The first function, naturally, is creating the image object. Then,
6068 * one must set an source file on it, so that it knows where to fetch
6069 * image data from. Next, one must set <b>how to fill the image
6070 * object's area</b> with that given pixel data. One could use just a
6071 * sub-region of the original image or even have it tiled repeatedly
6072 * on the image object. For the common case of having the whole source
6073 * image to be displayed on the image object, streched to the
6074 * destination's size, there's also a function helper, to be used
6075 * instead of evas_object_image_fill_set():
6077 * evas_object_image_filled_set(img, EINA_TRUE);
6079 * See those functions' documentation for more details.
6081 * @section Evas_Object_Image_Scale Scale and resizing
6083 * Resizing of image objects will scale their respective source images
6084 * to their areas, if they are set to "fill" the object's area
6085 * (evas_object_image_filled_set()). If the user wants any control on
6086 * the aspect ratio of an image for different sizes, he/she has to
6087 * take care of that themselves. There are functions to make images to
6088 * get loaded scaled (up or down) in memory, already, if the user is
6089 * going to use them at pre-determined sizes and wants to save
6092 * Evas has even a scale cache, which will take care of caching scaled
6093 * versions of images with more often usage/hits. Finally, one can
6094 * have images being rescaled @b smoothly by Evas (more
6095 * computationally expensive) or not.
6097 * @section Evas_Object_Image_Performance Performance hints
6099 * When dealing with image objects, there are some tricks to boost the
6100 * performance of your application, if it does intense image loading
6101 * and/or manipulations, as in animations on a UI.
6103 * @subsection Evas_Object_Image_Load Load hints
6105 * In image viewer applications, for example, the user will be looking
6106 * at a given image, at full size, and will desire that the navigation
6107 * to the adjacent images on his/her album be fluid and fast. Thus,
6108 * while displaying a given image, the program can be on the
6109 * background loading the next and previous imagens already, so that
6110 * displaying them on the sequence is just a matter of repainting the
6111 * screen (and not decoding image data).
6113 * Evas addresses this issue with <b>image pre-loading</b>. The code
6114 * for the situation above would be something like the following:
6116 * prev = evas_object_image_filled_add(canvas);
6117 * evas_object_image_file_set(prev, "/path/to/prev", NULL);
6118 * evas_object_image_preload(prev, EINA_TRUE);
6120 * next = evas_object_image_filled_add(canvas);
6121 * evas_object_image_file_set(next, "/path/to/next", NULL);
6122 * evas_object_image_preload(next, EINA_TRUE);
6125 * If you're loading images which are too big, consider setting
6126 * previously it's loading size to something smaller, in case you
6127 * won't expose them in real size. It may speed up the loading
6130 * //to load a scaled down version of the image in memory, if that's
6131 * //the size you'll be displaying it anyway
6132 * evas_object_image_load_scale_down_set(img, zoom);
6134 * //optional: if you know you'll be showing a sub-set of the image's
6135 * //pixels, you can avoid loading the complementary data
6136 * evas_object_image_load_region_set(img, x, y, w, h);
6138 * Refer to Elementary's Photocam widget for a high level (smart)
6139 * object which does lots of loading speed-ups for you.
6141 * @subsection Evas_Object_Image_Animation Animation hints
6143 * If you want to animate image objects on a UI (what you'd get by
6144 * concomitant usage of other libraries, like Ecore and Edje), there
6145 * are also some tips on how to boost the performance of your
6146 * application. If the animation involves resizing of an image (thus,
6147 * re-scaling), you'd better turn off smooth scaling on it @b during
6148 * the animation, turning it back on afterwrads, for less
6149 * computations. Also, in this case you'd better flag the image object
6150 * in question not to cache scaled versions of it:
6152 * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_DYNAMIC);
6154 * // resizing takes place in between
6156 * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_STATIC);
6159 * Finally, movement of opaque images through the canvas is less
6160 * expensive than of translucid ones, because of blending
6163 * @section Evas_Object_Image_Borders Borders
6165 * Evas provides facilities for one to specify an image's region to be
6166 * treated specially -- as "borders". This will make those regions be
6167 * treated specially on resizing scales, by keeping their aspect. This
6168 * makes setting frames around other objects on UIs easy.
6169 * See the following figures for a visual explanation:\n
6171 * <img src="image-borders.png" style="max-width: 100%;" />
6172 * <a href="image-borders.png">Full-size</a>
6174 * @image rtf image-borders.png
6175 * @image latex image-borders.eps width=\textwidth
6177 * <img src="border-effect.png" style="max-width: 100%;" />
6178 * <a href="border-effect.png">Full-size</a>
6180 * @image rtf border-effect.png
6181 * @image latex border-effect.eps width=\textwidth
6183 * @section Evas_Object_Image_Manipulation Manipulating pixels
6185 * Evas image objects can be used to manipulate raw pixels in many
6186 * ways. The meaning of the data in the pixel arrays will depend on
6187 * the image's color space, be warned (see next section). You can set
6188 * your own data as an image's pixel data, fetch an image's pixel data
6189 * for saving/altering, convert images between different color spaces
6190 * and even advanced operations like setting a native surface as image
6193 * @section Evas_Object_Image_Color_Spaces Color spaces
6195 * Image objects may return or accept "image data" in multiple
6196 * formats. This is based on the color space of an object. Here is a
6197 * rundown on formats:
6199 * - #EVAS_COLORSPACE_ARGB8888:
6201 * This pixel format is a linear block of pixels, starting at the
6202 * top-left row by row until the bottom right of the image or pixel
6203 * region. All pixels are 32-bit unsigned int's with the high-byte
6204 * being alpha and the low byte being blue in the format ARGB. Alpha
6205 * may or may not be used by evas depending on the alpha flag of the
6206 * image, but if not used, should be set to 0xff anyway.
6208 * This colorspace uses premultiplied alpha. That means that R, G
6209 * and B cannot exceed A in value. The conversion from
6210 * non-premultiplied colorspace is:
6212 * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255;
6214 * So 50% transparent blue will be: 0x80000080. This will not be
6215 * "dark" - just 50% transparent. Values are 0 == black, 255 ==
6216 * solid or full red, green or blue.
6218 * - #EVAS_COLORSPACE_YCBCR422P601_PL:
6220 * This is a pointer-list indirected set of YUV (YCbCr) pixel
6221 * data. This means that the data returned or set is not actual
6222 * pixel data, but pointers TO lines of pixel data. The list of
6223 * pointers will first be N rows of pointers to the Y plane -
6224 * pointing to the first pixel at the start of each row in the Y
6225 * plane. N is the height of the image data in pixels. Each pixel in
6226 * the Y, U and V planes is 1 byte exactly, packed. The next N / 2
6227 * pointers will point to rows in the U plane, and the next N / 2
6228 * pointers will point to the V plane rows. U and V planes are half
6229 * the horizontal and vertical resolution of the Y plane.
6231 * Row order is top to bottom and row pixels are stored left to
6234 * There is a limitation that these images MUST be a multiple of 2
6235 * pixels in size horizontally or vertically. This is due to the U
6236 * and V planes being half resolution. Also note that this assumes
6237 * the itu601 YUV colorspace specification. This is defined for
6238 * standard television and mpeg streams. HDTV may use the itu709
6241 * Values are 0 to 255, indicating full or no signal in that plane
6244 * - #EVAS_COLORSPACE_YCBCR422P709_PL:
6246 * Not implemented yet.
6248 * - #EVAS_COLORSPACE_RGB565_A5P:
6250 * In the process of being implemented in 1 engine only. This may
6253 * This is a pointer to image data for 16-bit half-word pixel data
6254 * in 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue),
6255 * with the high-byte containing red and the low byte containing
6256 * blue, per pixel. This data is packed row by row from the top-left
6257 * to the bottom right.
6259 * If the image has an alpha channel enabled there will be an extra
6260 * alpha plane after the color pixel plane. If not, then this data
6261 * will not exist and should not be accessed in any way. This plane
6262 * is a set of pixels with 1 byte per pixel defining the alpha
6263 * values of all pixels in the image from the top-left to the bottom
6264 * right of the image, row by row. Even though the values of the
6265 * alpha pixels can be 0 to 255, only values 0 through to 32 are
6266 * used, 32 being solid and 0 being transparent.
6268 * RGB values can be 0 to 31 for red and blue and 0 to 63 for green,
6269 * with 0 being black and 31 or 63 being full red, green or blue
6270 * respectively. This colorspace is also pre-multiplied like
6271 * EVAS_COLORSPACE_ARGB8888 so:
6273 * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32;
6275 * - #EVAS_COLORSPACE_GRY8:
6277 * The image is just a alpha mask (8 bit's per pixel). This is used
6278 * for alpha masking.
6280 * Some examples on this group of functions can be found @ref
6281 * Example_Evas_Images "here".
6283 * @ingroup Evas_Object_Specific
6287 * @addtogroup Evas_Object_Image
6291 typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o);
6295 * Creates a new image object on the given Evas @p e canvas.
6297 * @param e The given canvas.
6298 * @return The created image object handle.
6300 * @note If you intend to @b display an image somehow in a GUI,
6301 * besides binding it to a real image file/source (with
6302 * evas_object_image_file_set(), for example), you'll have to tell
6303 * this image object how to fill its space with the pixels it can get
6304 * from the source. See evas_object_image_filled_add(), for a helper
6305 * on the common case of scaling up an image source to the whole area
6306 * of the image object.
6308 * @see evas_object_image_fill_set()
6312 * img = evas_object_image_add(canvas);
6313 * evas_object_image_file_set(img, "/path/to/img", NULL);
6316 EAPI Evas_Object *evas_object_image_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
6319 * Creates a new image object that @b automatically scales its bound
6320 * image to the object's area, on both axis.
6322 * @param e The given canvas.
6323 * @return The created image object handle.
6325 * This is a helper function around evas_object_image_add() and
6326 * evas_object_image_filled_set(). It has the same effect of applying
6327 * those functions in sequence, which is a very common use case.
6329 * @note Whenever this object gets resized, the bound image will be
6332 * @see evas_object_image_add()
6333 * @see evas_object_image_filled_set()
6334 * @see evas_object_image_fill_set()
6336 EAPI Evas_Object *evas_object_image_filled_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
6340 * Sets the data for an image from memory to be loaded
6342 * This is the same as evas_object_image_file_set() but the file to be loaded
6343 * may exist at an address in memory (the data for the file, not the filename
6344 * itself). The @p data at the address is copied and stored for future use, so
6345 * no @p data needs to be kept after this call is made. It will be managed and
6346 * freed for you when no longer needed. The @p size is limited to 2 gigabytes
6347 * in size, and must be greater than 0. A NULL @p data pointer is also invalid.
6348 * Set the filename to NULL to reset to empty state and have the image file
6349 * data freed from memory using evas_object_image_file_set().
6351 * The @p format is optional (pass NULL if you don't need/use it). It is used
6352 * to help Evas guess better which loader to use for the data. It may simply
6353 * be the "extension" of the file as it would normally be on disk such as
6354 * "jpg" or "png" or "gif" etc.
6356 * @param obj The given image object.
6357 * @param data The image file data address
6358 * @param size The size of the image file data in bytes
6359 * @param format The format of the file (optional), or @c NULL if not needed
6360 * @param key The image key in file, or @c NULL.
6362 EAPI void evas_object_image_memfile_set (Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2);
6365 * Set the source file from where an image object must fetch the real
6366 * image data (it may be an Eet file, besides pure image ones).
6368 * @param obj The given image object.
6369 * @param file The image file path.
6370 * @param key The image key in @p file (if its an Eet one), or @c
6373 * If the file supports multiple data stored in it (as Eet files do),
6374 * you can specify the key to be used as the index of the image in
6379 * img = evas_object_image_add(canvas);
6380 * evas_object_image_file_set(img, "/path/to/img", NULL);
6381 * err = evas_object_image_load_error_get(img);
6382 * if (err != EVAS_LOAD_ERROR_NONE)
6384 * fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
6385 * valid_path, evas_load_error_str(err));
6389 * evas_object_image_fill_set(img, 0, 0, w, h);
6390 * evas_object_resize(img, w, h);
6391 * evas_object_show(img);
6395 EAPI void evas_object_image_file_set (Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1);
6398 * Retrieve the source file from where an image object is to fetch the
6399 * real image data (it may be an Eet file, besides pure image ones).
6401 * @param obj The given image object.
6402 * @param file Location to store the image file path.
6403 * @param key Location to store the image key (if @p file is an Eet
6406 * You must @b not modify the strings on the returned pointers.
6408 * @note Use @c NULL pointers on the file components you're not
6409 * interested in: they'll be ignored by the function.
6411 EAPI void evas_object_image_file_get (const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2);
6414 * Set the dimensions for an image object's border, a region which @b
6415 * won't ever be scaled together with its center.
6417 * @param obj The given image object.
6418 * @param l The border's left width.
6419 * @param r The border's right width.
6420 * @param t The border's top width.
6421 * @param b The border's bottom width.
6423 * When Evas is rendering, an image source may be scaled to fit the
6424 * size of its image object. This function sets an area from the
6425 * borders of the image inwards which is @b not to be scaled. This
6426 * function is useful for making frames and for widget theming, where,
6427 * for example, buttons may be of varying sizes, but their border size
6428 * must remain constant.
6430 * The units used for @p l, @p r, @p t and @p b are canvas units.
6432 * @note The border region itself @b may be scaled by the
6433 * evas_object_image_border_scale_set() function.
6435 * @note By default, image objects have no borders set, i. e. @c l, @c
6436 * r, @c t and @c b start as @c 0.
6438 * See the following figures for visual explanation:\n
6440 * <img src="image-borders.png" style="max-width: 100%;" />
6441 * <a href="image-borders.png">Full-size</a>
6443 * @image rtf image-borders.png
6444 * @image latex image-borders.eps width=\textwidth
6446 * <img src="border-effect.png" style="max-width: 100%;" />
6447 * <a href="border-effect.png">Full-size</a>
6449 * @image rtf border-effect.png
6450 * @image latex border-effect.eps width=\textwidth
6452 * @see evas_object_image_border_get()
6453 * @see evas_object_image_border_center_fill_set()
6455 EAPI void evas_object_image_border_set (Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1);
6458 * Retrieve the dimensions for an image object's border, a region
6459 * which @b won't ever be scaled together with its center.
6461 * @param obj The given image object.
6462 * @param l Location to store the border's left width in.
6463 * @param r Location to store the border's right width in.
6464 * @param t Location to store the border's top width in.
6465 * @param b Location to store the border's bottom width in.
6467 * @note Use @c NULL pointers on the border components you're not
6468 * interested in: they'll be ignored by the function.
6470 * See @ref evas_object_image_border_set() for more details.
6472 EAPI void evas_object_image_border_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
6475 * Sets @b how the center part of the given image object (not the
6476 * borders) should be drawn when Evas is rendering it.
6478 * @param obj The given image object.
6479 * @param fill Fill mode of the center region of @p obj (a value in
6480 * #Evas_Border_Fill_Mode).
6482 * This function sets how the center part of the image object's source
6483 * image is to be drawn, which must be one of the values in
6484 * #Evas_Border_Fill_Mode. By center we mean the complementary part of
6485 * that defined by evas_object_image_border_set(). This one is very
6486 * useful for making frames and decorations. You would most probably
6487 * also be using a filled image (as in evas_object_image_filled_set())
6488 * to use as a frame.
6490 * @see evas_object_image_border_center_fill_get()
6492 EAPI void evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill) EINA_ARG_NONNULL(1);
6495 * Retrieves @b how the center part of the given image object (not the
6496 * borders) is to be drawn when Evas is rendering it.
6498 * @param obj The given image object.
6499 * @return fill Fill mode of the center region of @p obj (a value in
6500 * #Evas_Border_Fill_Mode).
6502 * See @ref evas_object_image_fill_set() for more details.
6504 EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6507 * Set whether the image object's fill property should track the
6510 * @param obj The given image object.
6511 * @param setting @c EINA_TRUE, to make the fill property follow
6512 * object size or @c EINA_FALSE, otherwise
6514 * If @p setting is @c EINA_TRUE, then every evas_object_resize() will
6515 * @b automatically trigger a call to evas_object_image_fill_set()
6516 * with the that new size (and @c 0, @c 0 as source image's origin),
6517 * so the bound image will fill the whole object's area.
6519 * @see evas_object_image_filled_add()
6520 * @see evas_object_image_fill_get()
6522 EAPI void evas_object_image_filled_set (Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
6525 * Retrieve whether the image object's fill property should track the
6528 * @param obj The given image object.
6529 * @return @c EINA_TRUE if it is tracking, @c EINA_FALSE, if not (and
6530 * evas_object_fill_set() must be called manually).
6532 * @see evas_object_image_filled_set() for more information
6534 EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6537 * Sets the scaling factor (multiplier) for the borders of an image
6540 * @param obj The given image object.
6541 * @param scale The scale factor (default is @c 1.0 - i.e. no scaling)
6543 * @see evas_object_image_border_set()
6544 * @see evas_object_image_border_scale_get()
6546 EAPI void evas_object_image_border_scale_set (Evas_Object *obj, double scale);
6549 * Retrieves the scaling factor (multiplier) for the borders of an
6552 * @param obj The given image object.
6553 * @return The scale factor set for its borders
6555 * @see evas_object_image_border_set()
6556 * @see evas_object_image_border_scale_set()
6558 EAPI double evas_object_image_border_scale_get (const Evas_Object *obj);
6561 * Set how to fill an image object's drawing rectangle given the
6562 * (real) image bound to it.
6564 * @param obj The given image object to operate on.
6565 * @param x The x coordinate (from the top left corner of the bound
6566 * image) to start drawing from.
6567 * @param y The y coordinate (from the top left corner of the bound
6568 * image) to start drawing from.
6569 * @param w The width the bound image will be displayed at.
6570 * @param h The height the bound image will be displayed at.
6572 * Note that if @p w or @p h are smaller than the dimensions of
6573 * @p obj, the displayed image will be @b tiled around the object's
6574 * area. To have only one copy of the bound image drawn, @p x and @p y
6575 * must be 0 and @p w and @p h need to be the exact width and height
6576 * of the image object itself, respectively.
6578 * See the following image to better understand the effects of this
6579 * call. On this diagram, both image object and original image source
6580 * have @c a x @c a dimentions and the image itself is a circle, with
6581 * empty space around it:
6583 * @image html image-fill.png
6584 * @image rtf image-fill.png
6585 * @image latex image-fill.eps
6587 * @warning The default values for the fill parameters are @p x = 0,
6588 * @p y = 0, @p w = 0 and @p h = 0. Thus, if you're not using the
6589 * evas_object_image_filled_add() helper and want your image
6590 * displayed, you'll have to set valid values with this fuction on
6593 * @note evas_object_image_filled_set() is a helper function which
6594 * will @b override the values set here automatically, for you, in a
6597 EAPI void evas_object_image_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
6600 * Retrieve how an image object is to fill its drawing rectangle,
6601 * given the (real) image bound to it.
6603 * @param obj The given image object.
6604 * @param x Location to store the x coordinate (from the top left
6605 * corner of the bound image) to start drawing from.
6606 * @param y Location to store the y coordinate (from the top left
6607 * corner of the bound image) to start drawing from.
6608 * @param w Location to store the width the bound image is to be
6610 * @param h Location to store the height the bound image is to be
6613 * @note Use @c NULL pointers on the fill components you're not
6614 * interested in: they'll be ignored by the function.
6616 * See @ref evas_object_image_fill_set() for more details.
6618 EAPI void evas_object_image_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
6621 * Sets the tiling mode for the given evas image object's fill.
6622 * @param obj The given evas image object.
6623 * @param spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT,
6624 * EVAS_TEXTURE_RESTRICT, or EVAS_TEXTURE_PAD.
6626 EAPI void evas_object_image_fill_spread_set (Evas_Object *obj, Evas_Fill_Spread spread) EINA_ARG_NONNULL(1);
6629 * Retrieves the spread (tiling mode) for the given image object's
6632 * @param obj The given evas image object.
6633 * @return The current spread mode of the image object.
6635 EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6638 * Sets the size of the given image object.
6640 * @param obj The given image object.
6641 * @param w The new width of the image.
6642 * @param h The new height of the image.
6644 * This function will scale down or crop the image so that it is
6645 * treated as if it were at the given size. If the size given is
6646 * smaller than the image, it will be cropped. If the size given is
6647 * larger, then the image will be treated as if it were in the upper
6648 * left hand corner of a larger image that is otherwise transparent.
6650 EAPI void evas_object_image_size_set (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
6653 * Retrieves the size of the given image object.
6655 * @param obj The given image object.
6656 * @param w Location to store the width of the image in, or @c NULL.
6657 * @param h Location to store the height of the image in, or @c NULL.
6659 * See @ref evas_object_image_size_set() for more details.
6661 EAPI void evas_object_image_size_get (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
6664 * Retrieves the row stride of the given image object.
6666 * @param obj The given image object.
6667 * @return The stride of the image (<b>in bytes</b>).
6669 * The row stride is the number of bytes between the start of a row
6670 * and the start of the next row for image data.
6672 EAPI int evas_object_image_stride_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6675 * Retrieves a number representing any error that occurred during the
6676 * last loading of the given image object's source image.
6678 * @param obj The given image object.
6679 * @return A value giving the last error that occurred. It should be
6680 * one of the #Evas_Load_Error values. #EVAS_LOAD_ERROR_NONE
6681 * is returned if there was no error.
6683 EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6686 * Sets the raw image data of the given image object.
6688 * @param obj The given image object.
6689 * @param data The raw data, or @c NULL.
6691 * Note that the raw data must be of the same size (see
6692 * evas_object_image_size_set(), which has to be called @b before this
6693 * one) and colorspace (see evas_object_image_colorspace_set()) of the
6694 * image. If data is @c NULL, the current image data will be
6695 * freed. Naturally, if one does not set an image object's data
6696 * manually, it will still have one, allocated by Evas.
6698 * @see evas_object_image_data_get()
6700 EAPI void evas_object_image_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
6703 * Get a pointer to the raw image data of the given image object.
6705 * @param obj The given image object.
6706 * @param for_writing Whether the data being retrieved will be
6707 * modified (@c EINA_TRUE) or not (@c EINA_FALSE).
6708 * @return The raw image data.
6710 * This function returns a pointer to an image object's internal pixel
6711 * buffer, for reading only or read/write. If you request it for
6712 * writing, the image will be marked dirty so that it gets redrawn at
6715 * Each time you call this function on an image object, its data
6716 * buffer will have an internal reference counter
6717 * incremented. Decrement it back by using
6718 * evas_object_image_data_set(). This is specially important for the
6719 * directfb Evas engine.
6721 * This is best suited for when you want to modify an existing image,
6722 * without changing its dimensions.
6724 * @note The contents' formart returned by it depend on the color
6725 * space of the given image object.
6727 * @note You may want to use evas_object_image_data_update_add() to
6728 * inform data changes, if you did any.
6730 * @see evas_object_image_data_set()
6732 EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6735 * Converts the raw image data of the given image object to the
6736 * specified colorspace.
6738 * Note that this function does not modify the raw image data. If the
6739 * requested colorspace is the same as the image colorspace nothing is
6740 * done and NULL is returned. You should use
6741 * evas_object_image_colorspace_get() to check the current image
6744 * See @ref evas_object_image_colorspace_get.
6746 * @param obj The given image object.
6747 * @param to_cspace The colorspace to which the image raw data will be converted.
6748 * @return data A newly allocated data in the format specified by to_cspace.
6750 EAPI void *evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6753 * Replaces the raw image data of the given image object.
6755 * @param obj The given image object.
6756 * @param data The raw data to replace.
6758 * This function lets the application replace an image object's
6759 * internal pixel buffer with an user-allocated one. For best results,
6760 * you should generally first call evas_object_image_size_set() with
6761 * the width and height for the new buffer.
6763 * This call is best suited for when you will be using image data with
6764 * different dimensions than the existing image data, if any. If you
6765 * only need to modify the existing image in some fashion, then using
6766 * evas_object_image_data_get() is probably what you are after.
6768 * Note that the caller is responsible for freeing the buffer when
6769 * finished with it, as user-set image data will not be automatically
6770 * freed when the image object is deleted.
6772 * See @ref evas_object_image_data_get() for more details.
6775 EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
6778 * Mark a sub-region of the given image object to be redrawn.
6780 * @param obj The given image object.
6781 * @param x X-offset of the region to be updated.
6782 * @param y Y-offset of the region to be updated.
6783 * @param w Width of the region to be updated.
6784 * @param h Height of the region to be updated.
6786 * This function schedules a particular rectangular region of an image
6787 * object to be updated (redrawn) at the next rendering cycle.
6789 EAPI void evas_object_image_data_update_add (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
6792 * Enable or disable alpha channel usage on the given image object.
6794 * @param obj The given image object.
6795 * @param has_alpha Whether to use alpha channel (@c EINA_TRUE) data
6796 * or not (@c EINA_FALSE).
6798 * This function sets a flag on an image object indicating whether or
6799 * not to use alpha channel data. A value of @c EINA_TRUE makes it use
6800 * alpha channel data, and @c EINA_FALSE makes it ignore that
6801 * data. Note that this has nothing to do with an object's color as
6802 * manipulated by evas_object_color_set().
6804 * @see evas_object_image_alpha_get()
6806 EAPI void evas_object_image_alpha_set (Evas_Object *obj, Eina_Bool has_alpha) EINA_ARG_NONNULL(1);
6809 * Retrieve whether alpha channel data is being used on the given
6812 * @param obj The given image object.
6813 * @return Whether the alpha channel data is being used (@c EINA_TRUE)
6814 * or not (@c EINA_FALSE).
6816 * This function returns @c EINA_TRUE if the image object's alpha
6817 * channel is being used, or @c EINA_FALSE otherwise.
6819 * See @ref evas_object_image_alpha_set() for more details.
6821 EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6824 * Sets whether to use high-quality image scaling algorithm on the
6825 * given image object.
6827 * @param obj The given image object.
6828 * @param smooth_scale Whether to use smooth scale or not.
6830 * When enabled, a higher quality image scaling algorithm is used when
6831 * scaling images to sizes other than the source image's original
6832 * one. This gives better results but is more computationally
6835 * @note Image objects get created originally with smooth scaling @b
6838 * @see evas_object_image_smooth_scale_get()
6840 EAPI void evas_object_image_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth_scale) EINA_ARG_NONNULL(1);
6843 * Retrieves whether the given image object is using high-quality
6844 * image scaling algorithm.
6846 * @param obj The given image object.
6847 * @return Whether smooth scale is being used.
6849 * See @ref evas_object_image_smooth_scale_set() for more details.
6851 EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6854 * Preload an image object's image data in the background
6856 * @param obj The given image object.
6857 * @param cancel @c EINA_FALSE will add it the preloading work queue,
6858 * @c EINA_TRUE will remove it (if it was issued before).
6860 * This function requests the preload of the data image in the
6861 * background. The work is queued before being processed (because
6862 * there might be other pending requests of this type).
6864 * Whenever the image data gets loaded, Evas will call
6865 * #EVAS_CALLBACK_IMAGE_PRELOADED registered callbacks on @p obj (what
6866 * may be immediately, if the data was already preloaded before).
6868 * Use @c EINA_TRUE for @p cancel on scenarios where you don't need
6869 * the image data preloaded anymore.
6871 * @note Any evas_object_show() call after evas_object_image_preload()
6872 * will make the latter to be @b cancelled, with the loading process
6873 * now taking place @b synchronously (and, thus, blocking the return
6874 * of the former until the image is loaded). It is highly advisable,
6875 * then, that the user preload an image with it being @b hidden, just
6876 * to be shown on the #EVAS_CALLBACK_IMAGE_PRELOADED event's callback.
6878 EAPI void evas_object_image_preload (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
6881 * Reload an image object's image data.
6883 * @param obj The given image object pointer.
6885 * This function reloads the image data bound to image object @p obj.
6887 EAPI void evas_object_image_reload (Evas_Object *obj) EINA_ARG_NONNULL(1);
6890 * Save the given image object's contents to an (image) file.
6892 * @param obj The given image object.
6893 * @param file The filename to be used to save the image (extension
6895 * @param key The image key in the file (if an Eet one), or @c NULL,
6897 * @param flags String containing the flags to be used (@c NULL for
6900 * The extension suffix on @p file will determine which <b>saver
6901 * module</b> Evas is to use when saving, thus the final file's
6902 * format. If the file supports multiple data stored in it (Eet ones),
6903 * you can specify the key to be used as the index of the image in it.
6905 * You can specify some flags when saving the image. Currently
6906 * acceptable flags are @c quality and @c compress. Eg.: @c
6907 * "quality=100 compress=9"
6909 EAPI Eina_Bool evas_object_image_save (const Evas_Object *obj, const char *file, const char *key, const char *flags) EINA_ARG_NONNULL(1, 2);
6912 * Import pixels from given source to a given canvas image object.
6914 * @param obj The given canvas object.
6915 * @param pixels The pixel's source to be imported.
6917 * This function imports pixels from a given source to a given canvas image.
6920 EAPI Eina_Bool evas_object_image_pixels_import (Evas_Object *obj, Evas_Pixel_Import_Source *pixels) EINA_ARG_NONNULL(1, 2);
6923 * Set the callback function to get pixels from a canva's image.
6925 * @param obj The given canvas pointer.
6926 * @param func The callback function.
6927 * @param data The data pointer to be passed to @a func.
6929 * This functions sets a function to be the callback function that get
6930 * pixes from a image of the canvas.
6933 EAPI void evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data) EINA_ARG_NONNULL(1, 2);
6936 * Mark whether the given image object is dirty (needs to be redrawn).
6938 * @param obj The given image object.
6939 * @param dirty Whether the image is dirty.
6941 EAPI void evas_object_image_pixels_dirty_set (Evas_Object *obj, Eina_Bool dirty) EINA_ARG_NONNULL(1);
6944 * Retrieves whether the given image object is dirty (needs to be redrawn).
6946 * @param obj The given image object.
6947 * @return Whether the image is dirty.
6949 EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6952 * Set the DPI resolution of an image object's source image.
6954 * @param obj The given canvas pointer.
6955 * @param dpi The new DPI resolution.
6957 * This function sets the DPI resolution of a given loaded canvas
6958 * image. Most useful for the SVG image loader.
6960 * @see evas_object_image_load_dpi_get()
6962 EAPI void evas_object_image_load_dpi_set (Evas_Object *obj, double dpi) EINA_ARG_NONNULL(1);
6965 * Get the DPI resolution of a loaded image object in the canvas.
6967 * @param obj The given canvas pointer.
6968 * @return The DPI resolution of the given canvas image.
6970 * This function returns the DPI resolution of the given canvas image.
6972 * @see evas_object_image_load_dpi_set() for more details
6974 EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
6977 * Set the size of a given image object's source image, when loading
6980 * @param obj The given canvas object.
6981 * @param w The new width of the image's load size.
6982 * @param h The new height of the image's load size.
6984 * This function sets a new (loading) size for the given canvas
6987 * @see evas_object_image_load_size_get()
6989 EAPI void evas_object_image_load_size_set (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
6992 * Get the size of a given image object's source image, when loading
6995 * @param obj The given image object.
6996 * @param w Where to store the new width of the image's load size.
6997 * @param h Where to store the new height of the image's load size.
6999 * @note Use @c NULL pointers on the size components you're not
7000 * interested in: they'll be ignored by the function.
7002 * @see evas_object_image_load_size_set() for more details
7004 EAPI void evas_object_image_load_size_get (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
7007 * Set the scale down factor of a given image object's source image,
7010 * @param obj The given image object pointer.
7011 * @param scale_down The scale down factor.
7013 * This function sets the scale down factor of a given canvas
7014 * image. Most useful for the SVG image loader.
7016 * @see evas_object_image_load_scale_down_get()
7018 EAPI void evas_object_image_load_scale_down_set (Evas_Object *obj, int scale_down) EINA_ARG_NONNULL(1);
7021 * get the scale down factor of a given image object's source image,
7024 * @param obj The given image object pointer.
7026 * @see evas_object_image_load_scale_down_set() for more details
7028 EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7031 * Inform a given image object to load a selective region of its
7034 * @param obj The given image object pointer.
7035 * @param x X-offset of the region to be loaded.
7036 * @param y Y-offset of the region to be loaded.
7037 * @param w Width of the region to be loaded.
7038 * @param h Height of the region to be loaded.
7040 * This function is useful when one is not showing all of an image's
7041 * area on its image object.
7043 * @note The image loader for the image format in question has to
7044 * support selective region loading in order to this function to take
7047 * @see evas_object_image_load_region_get()
7049 EAPI void evas_object_image_load_region_set (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
7052 * Retrieve the coordinates of a given image object's selective
7053 * (source image) load region.
7055 * @param obj The given image object pointer.
7056 * @param x Where to store the X-offset of the region to be loaded.
7057 * @param y Where to store the Y-offset of the region to be loaded.
7058 * @param w Where to store the width of the region to be loaded.
7059 * @param h Where to store the height of the region to be loaded.
7061 * @note Use @c NULL pointers on the coordinates you're not interested
7062 * in: they'll be ignored by the function.
7064 * @see evas_object_image_load_region_get()
7066 EAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
7069 * Define if the orientation information in the image file should be honored.
7071 * @param obj The given image object pointer.
7072 * @param enable @p EINA_TRUE means that it should honor the orientation information
7075 EAPI void evas_object_image_load_orientation_set (Evas_Object *obj, Eina_Bool enable) EINA_ARG_NONNULL(1);
7078 * Get if the orientation information in the image file should be honored.
7080 * @param obj The given image object pointer.
7083 EAPI Eina_Bool evas_object_image_load_orientation_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
7086 * Set the colorspace of a given image of the canvas.
7088 * @param obj The given image object pointer.
7089 * @param cspace The new color space.
7091 * This function sets the colorspace of given canvas image.
7094 EAPI void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1);
7097 * Get the colorspace of a given image of the canvas.
7099 * @param obj The given image object pointer.
7100 * @return The colorspace of the image.
7102 * This function returns the colorspace of given canvas image.
7105 EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7108 * Set the native surface of a given image of the canvas
7110 * @param obj The given canvas pointer.
7111 * @param surf The new native surface.
7113 * This function sets a native surface of a given canvas image.
7116 EAPI void evas_object_image_native_surface_set (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2);
7119 * Get the native surface of a given image of the canvas
7121 * @param obj The given canvas pointer.
7122 * @return The native surface of the given canvas image.
7124 * This function returns the native surface of a given canvas image.
7127 EAPI Evas_Native_Surface *evas_object_image_native_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7130 * Set the video surface linked to a given image of the canvas
7132 * @param obj The given canvas pointer.
7133 * @param surf The new video surface.
7136 * This function link a video surface to a given canvas image.
7139 EAPI void evas_object_image_video_surface_set (Evas_Object *obj, Evas_Video_Surface *surf) EINA_ARG_NONNULL(1);
7142 * Get the video surface linekd to a given image of the canvas
7144 * @param obj The given canvas pointer.
7145 * @return The video surface of the given canvas image.
7148 * This function returns the video surface linked to a given canvas image.
7151 EAPI const Evas_Video_Surface *evas_object_image_video_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7154 * Set the scale hint of a given image of the canvas.
7156 * @param obj The given image object pointer.
7157 * @param hint The scale hint, a value in
7158 * #Evas_Image_Scale_Hint.
7160 * This function sets the scale hint value of the given image object
7161 * in the canvas, which will affect how Evas is to cache scaled
7162 * versions of its original source image.
7164 * @see evas_object_image_scale_hint_get()
7166 EAPI void evas_object_image_scale_hint_set (Evas_Object *obj, Evas_Image_Scale_Hint hint) EINA_ARG_NONNULL(1);
7169 * Get the scale hint of a given image of the canvas.
7171 * @param obj The given image object pointer.
7172 * @return The scale hint value set on @p obj, a value in
7173 * #Evas_Image_Scale_Hint.
7175 * This function returns the scale hint value of the given image
7176 * object of the canvas.
7178 * @see evas_object_image_scale_hint_set() for more details.
7180 EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7183 * Set the content hint setting of a given image object of the canvas.
7185 * @param obj The given canvas pointer.
7186 * @param hint The content hint value, one of the
7187 * #Evas_Image_Content_Hint ones.
7189 * This function sets the content hint value of the given image of the
7190 * canvas. For example, if you're on the GL engine and your driver
7191 * implementation supports it, setting this hint to
7192 * #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need @b zero copies
7193 * at texture upload time, which is an "expensive" operation.
7195 * @see evas_object_image_content_hint_get()
7197 EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1);
7200 * Get the content hint setting of a given image object of the canvas.
7202 * @param obj The given canvas pointer.
7203 * @return hint The content hint value set on it, one of the
7204 * #Evas_Image_Content_Hint ones (#EVAS_IMAGE_CONTENT_HINT_NONE means
7207 * This function returns the content hint value of the given image of
7210 * @see evas_object_image_content_hint_set()
7212 EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7216 * Enable an image to be used as an alpha mask.
7218 * This will set any flags, and discard any excess image data not used as an
7221 * Note there is little point in using a image as alpha mask unless it has an
7224 * @param obj Object to use as an alpha mask.
7225 * @param ismask Use image as alphamask, must be true.
7227 EAPI void evas_object_image_alpha_mask_set (Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1);
7230 * Set the source object on an image object to used as a @b proxy.
7232 * @param obj Proxy (image) object.
7233 * @param src Source object to use for the proxy.
7234 * @return @c EINA_TRUE on success, @c EINA_FALSE on error.
7236 * If an image object is set to behave as a @b proxy, it will mirror
7237 * the rendering contents of a given @b source object in its drawing
7238 * region, without affecting that source in any way. The source must
7239 * be another valid Evas object. Other effects may be applied to the
7240 * proxy, such as a map (see evas_object_map_set()) to create a
7241 * reflection of the original object (for example).
7243 * Any existing source object on @p obj will be removed after this
7244 * call. Setting @p src to @c NULL clears the proxy object (not in
7245 * "proxy state" anymore).
7247 * @warning You cannot set a proxy as another proxy's source.
7249 * @see evas_object_image_source_get()
7250 * @see evas_object_image_source_unset()
7252 EAPI Eina_Bool evas_object_image_source_set (Evas_Object *obj, Evas_Object *src) EINA_ARG_NONNULL(1);
7255 * Get the current source object of an image object.
7257 * @param obj Image object
7258 * @return Source object (if any), or @c NULL, if not in "proxy mode"
7261 * @see evas_object_image_source_set() for more details
7263 EAPI Evas_Object *evas_object_image_source_get (Evas_Object *obj) EINA_ARG_NONNULL(1);
7266 * Clear the source object on a proxy image object.
7268 * @param obj Image object to clear source of.
7269 * @return @c EINA_TRUE on success, @c EINA_FALSE on error.
7271 * This is equivalent to calling evas_object_image_source_set() with a
7274 EAPI Eina_Bool evas_object_image_source_unset (Evas_Object *obj) EINA_ARG_NONNULL(1);
7277 * Check if a file extension may be supported by @ref Evas_Object_Image.
7279 * @param file The file to check
7280 * @return EINA_TRUE if we may be able to opeen it, EINA_FALSE if it's unlikely.
7283 * If file is a Eina_Stringshare, use directly @ref evas_object_image_extension_can_load_fast_get.
7285 * This functions is threadsafe.
7287 EAPI Eina_Bool evas_object_image_extension_can_load_get(const char *file);
7290 * Check if a file extension may be supported by @ref Evas_Object_Image.
7292 * @param file The file to check, it should be an Eina_Stringshare.
7293 * @return EINA_TRUE if we may be able to opeen it, EINA_FALSE if it's unlikely.
7296 * This functions is threadsafe.
7298 EAPI Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file);
7301 * Check if an image object can be animated (have multiple frames)
7303 * @param obj Image object
7304 * @return whether obj support animation
7306 * This returns if the image file of an image object is capable of animation
7307 * such as an animated gif file might. This is only useful to be called once
7308 * the image object file has been set.
7312 * extern Evas_Object *obj;
7314 * if (evas_object_image_animated_get(obj))
7318 * Evas_Image_Animated_Loop_Hint loop_type;
7321 * frame_count = evas_object_image_animated_frame_count_get(obj);
7322 * printf("This image has %d frames\n",frame_count);
7324 * duration = evas_object_image_animated_frame_duration_get(obj,1,0);
7325 * printf("Frame 1's duration is %f. You had better set object's frame to 2 after this duration using timer\n");
7327 * loop_count = evas_object_image_animated_loop_count_get(obj);
7328 * printf("loop count is %d. You had better run loop %d times\n",loop_count,loop_count);
7330 * loop_type = evas_object_image_animated_loop_type_get(obj);
7331 * if (loop_type == EVAS_IMAGE_ANIMATED_HINT_LOOP)
7332 * printf("You had better set frame like 1->2->3->1->2->3...\n");
7333 * else if (loop_type == EVAS_IMAGE_ANIMATED_HINT_PINGPONG)
7334 * printf("You had better set frame like 1->2->3->2->1->2...\n");
7336 * printf("Unknown loop type\n");
7338 * evas_object_image_animated_frame_set(obj,1);
7339 * printf("You set image object's frame to 1. You can see frame 1\n");
7343 * @see evas_object_image_animated_get()
7344 * @see evas_object_image_animated_frame_count_get()
7345 * @see evas_object_image_animated_loop_type_get()
7346 * @see evas_object_image_animated_loop_count_get()
7347 * @see evas_object_image_animated_frame_duration_get()
7348 * @see evas_object_image_animated_frame_set()
7351 EAPI Eina_Bool evas_object_image_animated_get(const Evas_Object *obj);
7354 * Get the total number of frames of the image object.
7356 * @param obj Image object
7357 * @return The number of frames
7359 * This returns total number of frames the image object supports (if animated)
7361 * @see evas_object_image_animated_get()
7362 * @see evas_object_image_animated_frame_count_get()
7363 * @see evas_object_image_animated_loop_type_get()
7364 * @see evas_object_image_animated_loop_count_get()
7365 * @see evas_object_image_animated_frame_duration_get()
7366 * @see evas_object_image_animated_frame_set()
7369 EAPI int evas_object_image_animated_frame_count_get(const Evas_Object *obj);
7372 * Get the kind of looping the image object does.
7374 * @param obj Image object
7375 * @return Loop type of the image object
7377 * This returns the kind of looping the image object wants to do.
7379 * If it returns EVAS_IMAGE_ANIMATED_HINT_LOOP, you should display frames in a sequence like:
7380 * 1->2->3->1->2->3->1...
7381 * If it returns EVAS_IMAGE_ANIMATED_HINT_PINGPONG, it is better to
7382 * display frames in a sequence like: 1->2->3->2->1->2->3->1...
7384 * The default type is EVAS_IMAGE_ANIMATED_HINT_LOOP.
7386 * @see evas_object_image_animated_get()
7387 * @see evas_object_image_animated_frame_count_get()
7388 * @see evas_object_image_animated_loop_type_get()
7389 * @see evas_object_image_animated_loop_count_get()
7390 * @see evas_object_image_animated_frame_duration_get()
7391 * @see evas_object_image_animated_frame_set()
7394 EAPI Evas_Image_Animated_Loop_Hint evas_object_image_animated_loop_type_get(const Evas_Object *obj);
7397 * Get the number times the animation of the object loops.
7399 * @param obj Image object
7400 * @return The number of loop of an animated image object
7402 * This returns loop count of image. The loop count is the number of times
7403 * the animation will play fully from first to last frame until the animation
7404 * should stop (at the final frame).
7406 * If 0 is returned, then looping should happen indefinitely (no limit to
7407 * the number of times it loops).
7409 * @see evas_object_image_animated_get()
7410 * @see evas_object_image_animated_frame_count_get()
7411 * @see evas_object_image_animated_loop_type_get()
7412 * @see evas_object_image_animated_loop_count_get()
7413 * @see evas_object_image_animated_frame_duration_get()
7414 * @see evas_object_image_animated_frame_set()
7417 EAPI int evas_object_image_animated_loop_count_get(const Evas_Object *obj);
7420 * Get the duration of a sequence of frames.
7422 * @param obj Image object
7423 * @param start_frame The first frame
7424 * @param fram_num Number of frames in the sequence
7426 * This returns total duration that the specified sequence of frames should
7429 * If you set start_frame to 1 and frame_num 0, you get frame 1's duration
7430 * If you set start_frame to 1 and frame_num 1, you get frame 1's duration +
7433 * @see evas_object_image_animated_get()
7434 * @see evas_object_image_animated_frame_count_get()
7435 * @see evas_object_image_animated_loop_type_get()
7436 * @see evas_object_image_animated_loop_count_get()
7437 * @see evas_object_image_animated_frame_duration_get()
7438 * @see evas_object_image_animated_frame_set()
7441 EAPI double evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int fram_num);
7444 * Set the frame to current frame of an image object
7446 * @param obj The given image object.
7447 * @param frame_num The index of current frame
7449 * This set image object's current frame to frame_num with 1 being the first
7452 * @see evas_object_image_animated_get()
7453 * @see evas_object_image_animated_frame_count_get()
7454 * @see evas_object_image_animated_loop_type_get()
7455 * @see evas_object_image_animated_loop_count_get()
7456 * @see evas_object_image_animated_frame_duration_get()
7457 * @see evas_object_image_animated_frame_set()
7460 EAPI void evas_object_image_animated_frame_set(Evas_Object *obj, int frame_num);
7466 * @defgroup Evas_Object_Text Text Object Functions
7468 * Functions that operate on single line, single style text objects.
7470 * For multiline and multiple style text, see @ref Evas_Object_Textblock.
7472 * See some @ref Example_Evas_Text "examples" on this group of functions.
7474 * @ingroup Evas_Object_Specific
7478 * @addtogroup Evas_Object_Text
7482 /* basic styles (4 bits allocated use 0->10 now, 5 left) */
7483 #define EVAS_TEXT_STYLE_MASK_BASIC 0xf
7486 * Text style type creation macro. Use style types on the 's'
7487 * arguments, being 'x' your style variable.
7489 #define EVAS_TEXT_STYLE_BASIC_SET(x, s) \
7490 do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0)
7492 #define EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION (0x7 << 4)
7495 * Text style type creation macro. This one will impose shadow
7496 * directions on the style type variable -- use the @c
7497 * EVAS_TEXT_STYLE_SHADOW_DIRECTION_* values on 's', incremmentally.
7499 #define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s) \
7500 do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0)
7502 typedef enum _Evas_Text_Style_Type
7504 EVAS_TEXT_STYLE_PLAIN, /**< plain, standard text */
7505 EVAS_TEXT_STYLE_SHADOW, /**< text with shadow underneath */
7506 EVAS_TEXT_STYLE_OUTLINE, /**< text with an outline */
7507 EVAS_TEXT_STYLE_SOFT_OUTLINE, /**< text with a soft outline */
7508 EVAS_TEXT_STYLE_GLOW, /**< text with a glow effect */
7509 EVAS_TEXT_STYLE_OUTLINE_SHADOW, /**< text with both outline and shadow effects */
7510 EVAS_TEXT_STYLE_FAR_SHADOW, /**< text with (far) shadow underneath */
7511 EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW, /**< text with outline and soft shadow effects combined */
7512 EVAS_TEXT_STYLE_SOFT_SHADOW, /**< text with (soft) shadow underneath */
7513 EVAS_TEXT_STYLE_FAR_SOFT_SHADOW, /**< text with (far soft) shadow underneath */
7515 /* OR these to modify shadow direction (3 bits needed) */
7516 EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< shadow growing to bottom right */
7517 EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< shadow growing to the bottom */
7518 EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< shadow growing to bottom left */
7519 EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< shadow growing to the left */
7520 EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< shadow growing to top left */
7521 EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< shadow growing to the top */
7522 EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< shadow growing to top right */
7523 EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< shadow growing to the right */
7524 } Evas_Text_Style_Type; /**< Types of styles to be applied on text objects. The @c EVAS_TEXT_STYLE_SHADOW_DIRECTION_* ones are to be ORed together with others imposing shadow, to change shadow's direction */
7527 * Creates a new text object on the provided canvas.
7529 * @param e The canvas to create the text object on.
7530 * @return @c NULL on error, a pointer to a new text object on
7533 * Text objects are for simple, single line text elements. If you want
7534 * more elaborated text blocks, see @ref Evas_Object_Textblock.
7536 * @see evas_object_text_font_source_set()
7537 * @see evas_object_text_font_set()
7538 * @see evas_object_text_text_set()
7540 EAPI Evas_Object *evas_object_text_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
7543 * Set the font (source) file to be used on a given text object.
7545 * @param obj The text object to set font for.
7546 * @param font The font file's path.
7548 * This function allows the font file to be explicitly set for a given
7549 * text object, overriding system lookup, which will first occur in
7550 * the given file's contents.
7552 * @see evas_object_text_font_get()
7554 EAPI void evas_object_text_font_source_set (Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1);
7557 * Get the font file's path which is being used on a given text
7560 * @param obj The text object to set font for.
7561 * @param font The font file's path.
7563 * @see evas_object_text_font_get() for more details
7565 EAPI const char *evas_object_text_font_source_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7568 * Set the font family and size on a given text object.
7570 * @param obj The text object to set font for.
7571 * @param font The font (family) name.
7572 * @param size The font size, in points.
7574 * This function allows the font name and size of a text object to be
7575 * set. The @p font string has to follow fontconfig's convention on
7576 * naming fonts, as it's the underlying lybrary used to query system
7577 * fonts by Evas (see the @c fc-list command's output, on your system,
7580 * @see evas_object_text_font_get()
7581 * @see evas_object_text_font_source_set()
7583 EAPI void evas_object_text_font_set (Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1);
7586 * Retrieve the font family and size in use on a given text object.
7588 * @param obj The evas text object to query for font information.
7589 * @param font A pointer to the location to store the font name in.
7590 * @param size A pointer to the location to store the font size in.
7592 * This function allows the font name and size of a text object to be
7593 * queried. Be aware that the font name string is still owned by Evas
7594 * and should @b not have free() called on it by the caller of the
7597 * @see evas_object_text_font_set()
7599 EAPI void evas_object_text_font_get (const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1);
7602 * Sets the text string to be displayed by the given text object.
7604 * @param obj The text object to set text string on.
7605 * @param text Text string to display on it.
7607 * @see evas_object_text_text_get()
7609 EAPI void evas_object_text_text_set (Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
7612 * Retrieves the text string currently being displayed by the given
7615 * @param obj The given text object.
7616 * @return The text string currently being displayed on it.
7618 * @note Do not free() the return value.
7620 * @see evas_object_text_text_set()
7622 EAPI const char *evas_object_text_text_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7625 * @brief Sets the BiDi delimiters used in the textblock.
7627 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
7628 * is useful for example in recipients fields of e-mail clients where bidi
7629 * oddities can occur when mixing rtl and ltr.
7631 * @param obj The given text object.
7632 * @param delim A null terminated string of delimiters, e.g ",|".
7635 EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim);
7638 * @brief Gets the BiDi delimiters used in the textblock.
7640 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
7641 * is useful for example in recipients fields of e-mail clients where bidi
7642 * oddities can occur when mixing rtl and ltr.
7644 * @param obj The given text object.
7645 * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL.
7648 EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj);
7650 EAPI Evas_Coord evas_object_text_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7651 EAPI Evas_Coord evas_object_text_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7652 EAPI Evas_Coord evas_object_text_max_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7653 EAPI Evas_Coord evas_object_text_max_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7654 EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7655 EAPI Evas_Coord evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7656 EAPI Evas_Coord evas_object_text_inset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7659 * Retrieve position and dimension information of a character within a text @c Evas_Object.
7661 * This function is used to obtain the X, Y, width and height of a the character
7662 * located at @p pos within the @c Evas_Object @p obj. @p obj must be a text object
7663 * as created with evas_object_text_add(). Any of the @c Evas_Coord parameters (@p cx,
7664 * @p cy, @p cw, @p ch) may be NULL in which case no value will be assigned to that
7667 * @param obj The text object to retrieve position information for.
7668 * @param pos The character position to request co-ordinates for.
7669 * @param cx A pointer to an @c Evas_Coord to store the X value in (can be NULL).
7670 * @param cy A pointer to an @c Evas_Coord to store the Y value in (can be NULL).
7671 * @param cw A pointer to an @c Evas_Coord to store the Width value in (can be NULL).
7672 * @param ch A pointer to an @c Evas_Coord to store the Height value in (can be NULL).
7674 * @returns EINA_FALSE on success, EINA_TRUE on error.
7676 EAPI Eina_Bool evas_object_text_char_pos_get (const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
7677 EAPI int evas_object_text_char_coords_get (const Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
7680 * Returns the logical position of the last char in the text
7681 * up to the pos given. this is NOT the position of the last char
7682 * because of the possibility of RTL in the text.
7684 EAPI int evas_object_text_last_up_to_pos (const Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
7687 * Retrieves the style on use on the given text object.
7689 * @param obj the given text object to set style on.
7690 * @return the style type in use.
7692 * @see evas_object_text_style_set() for more details.
7694 EAPI Evas_Text_Style_Type evas_object_text_style_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
7697 * Sets the style to apply on the given text object.
7699 * @param obj the given text object to set style on.
7700 * @param type a style type.
7702 * Text object styles are one of the values in
7703 * #Evas_Text_Style_Type. Some of those values are combinations of
7704 * more than one style, and some account for the direction of the
7705 * rendering of shadow effects.
7707 * @note One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and
7708 * #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value.
7710 * The following figure illustrates the text styles:
7712 * @image html text-styles.png
7713 * @image rtf text-styles.png
7714 * @image latex text-styles.eps
7716 * @see evas_object_text_style_get()
7717 * @see evas_object_text_shadow_color_set()
7718 * @see evas_object_text_outline_color_set()
7719 * @see evas_object_text_glow_color_set()
7720 * @see evas_object_text_glow2_color_set()
7722 EAPI void evas_object_text_style_set (Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1);
7725 * Sets the shadow color for the given text object.
7727 * @param obj The given Evas text object.
7728 * @param r The red component of the given color.
7729 * @param g The green component of the given color.
7730 * @param b The blue component of the given color.
7731 * @param a The alpha component of the given color.
7733 * Shadow effects, which are fading colors decorating the text
7734 * underneath it, will just be shown if the object is set to one of
7735 * the following styles:
7737 * - #EVAS_TEXT_STYLE_SHADOW
7738 * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW
7739 * - #EVAS_TEXT_STYLE_FAR_SHADOW
7740 * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW
7741 * - #EVAS_TEXT_STYLE_SOFT_SHADOW
7742 * - #EVAS_TEXT_STYLE_FAR_SOFT_SHADOW
7744 * One can also change de direction the shadow grows to, with
7745 * evas_object_text_style_set().
7747 * @see evas_object_text_shadow_color_get()
7749 EAPI void evas_object_text_shadow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
7752 * Retrieves the shadow color for the given text object.
7754 * @param obj The given Evas text object.
7755 * @param r Pointer to variable to hold the red component of the given
7757 * @param g Pointer to variable to hold the green component of the
7759 * @param b Pointer to variable to hold the blue component of the
7761 * @param a Pointer to variable to hold the alpha component of the
7764 * @note Use @c NULL pointers on the color components you're not
7765 * interested in: they'll be ignored by the function.
7767 * @see evas_object_text_shadow_color_set() for more details.
7769 EAPI void evas_object_text_shadow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
7772 * Sets the glow color for the given text object.
7774 * @param obj The given Evas text object.
7775 * @param r The red component of the given color.
7776 * @param g The green component of the given color.
7777 * @param b The blue component of the given color.
7778 * @param a The alpha component of the given color.
7780 * Glow effects, which are glowing colors decorating the text's
7781 * surroundings, will just be shown if the object is set to the
7782 * #EVAS_TEXT_STYLE_GLOW style.
7784 * @note Glow effects are placed from a short distance of the text
7785 * itself, but no touching it. For glowing effects right on the
7786 * borders of the glyphs, see 'glow 2' effects
7787 * (evas_object_text_glow2_color_set()).
7789 * @see evas_object_text_glow_color_get()
7791 EAPI void evas_object_text_glow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
7794 * Retrieves the glow color for the given text object.
7796 * @param obj The given Evas text object.
7797 * @param r Pointer to variable to hold the red component of the given
7799 * @param g Pointer to variable to hold the green component of the
7801 * @param b Pointer to variable to hold the blue component of the
7803 * @param a Pointer to variable to hold the alpha component of the
7806 * @note Use @c NULL pointers on the color components you're not
7807 * interested in: they'll be ignored by the function.
7809 * @see evas_object_text_glow_color_set() for more details.
7811 EAPI void evas_object_text_glow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
7814 * Sets the 'glow 2' color for the given text object.
7816 * @param obj The given Evas text object.
7817 * @param r The red component of the given color.
7818 * @param g The green component of the given color.
7819 * @param b The blue component of the given color.
7820 * @param a The alpha component of the given color.
7822 * 'Glow 2' effects, which are glowing colors decorating the text's
7823 * (immediate) surroundings, will just be shown if the object is set
7824 * to the #EVAS_TEXT_STYLE_GLOW style. See also
7825 * evas_object_text_glow_color_set().
7827 * @see evas_object_text_glow2_color_get()
7829 EAPI void evas_object_text_glow2_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
7832 * Retrieves the 'glow 2' color for the given text object.
7834 * @param obj The given Evas text object.
7835 * @param r Pointer to variable to hold the red component of the given
7837 * @param g Pointer to variable to hold the green component of the
7839 * @param b Pointer to variable to hold the blue component of the
7841 * @param a Pointer to variable to hold the alpha component of the
7844 * @note Use @c NULL pointers on the color components you're not
7845 * interested in: they'll be ignored by the function.
7847 * @see evas_object_text_glow2_color_set() for more details.
7849 EAPI void evas_object_text_glow2_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
7852 * Sets the outline color for the given text object.
7854 * @param obj The given Evas text object.
7855 * @param r The red component of the given color.
7856 * @param g The green component of the given color.
7857 * @param b The blue component of the given color.
7858 * @param a The alpha component of the given color.
7860 * Outline effects (colored lines around text glyphs) will just be
7861 * shown if the object is set to one of the following styles:
7862 * - #EVAS_TEXT_STYLE_OUTLINE
7863 * - #EVAS_TEXT_STYLE_SOFT_OUTLINE
7864 * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW
7865 * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW
7867 * @see evas_object_text_outline_color_get()
7869 EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
7872 * Retrieves the outline color for the given text object.
7874 * @param obj The given Evas text object.
7875 * @param r Pointer to variable to hold the red component of the given
7877 * @param g Pointer to variable to hold the green component of the
7879 * @param b Pointer to variable to hold the blue component of the
7881 * @param a Pointer to variable to hold the alpha component of the
7884 * @note Use @c NULL pointers on the color components you're not
7885 * interested in: they'll be ignored by the function.
7887 * @see evas_object_text_outline_color_set() for more details.
7889 EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
7892 * Gets the text style pad of a text object.
7894 * @param obj The given text object.
7895 * @param l The left pad (or @c NULL).
7896 * @param r The right pad (or @c NULL).
7897 * @param t The top pad (or @c NULL).
7898 * @param b The bottom pad (or @c NULL).
7901 EAPI void evas_object_text_style_pad_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
7904 * Retrieves the direction of the text currently being displayed in the
7906 * @param obj The given evas text object.
7907 * @return the direction of the text
7909 EAPI Evas_BiDi_Direction evas_object_text_direction_get (const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
7916 * @defgroup Evas_Object_Textblock Textblock Object Functions
7918 * Functions used to create and manipulate textblock objects. Unlike
7919 * @ref Evas_Object_Text, these handle complex text, doing multiple
7920 * styles and multiline text based on HTML-like tags. Of these extra
7921 * features will be heavier on memory and processing cost.
7923 * @section Evas_Object_Textblock_Tutorial Textblock Object Tutorial
7925 * This part explains about the textblock object's API and proper usage.
7926 * If you want to develop textblock, you should also refer to @ref Evas_Object_Textblock_Internal.
7927 * The main user of the textblock object is the edje entry object in Edje, so
7928 * that's a good place to learn from, but I think this document is more than
7929 * enough, if it's not, please contact me and I'll update it.
7931 * @subsection textblock_intro Introduction
7932 * The textblock objects is, as implied, an object that can show big chunks of
7933 * text. Textblock supports many features including: Text formatting, automatic
7934 * and manual text alignment, embedding items (for example icons) and more.
7935 * Textblock has three important parts, the text paragraphs, the format nodes
7938 * You can use markup to format text, for example: "<font_size=50>Big!</font_size>".
7939 * You can also put more than one style directive in one tag:
7940 * "<font_size=50 color=#F00>Big and Red!</font_size>".
7941 * Please notice that we used "</font_size>" although the format also included
7942 * color, this is because the first format determines the matching closing tag's
7943 * name. You can also use anonymous tags, like: "<font_size=30>Big</>" which
7944 * just pop any type of format, but it's advised to use the named alternatives
7947 * @subsection textblock_cursors Textblock Object Cursors
7948 * A textblock Cursor @ref Evas_Textblock_Cursor is data type that represents
7949 * a position in a textblock. Each cursor contains information about the
7950 * paragraph it points to, the position in that paragraph and the object itself.
7951 * Cursors register to textblock objects upon creation, this means that once
7952 * you created a cursor, it belongs to a specific obj and you can't for example
7953 * copy a cursor "into" a cursor of a different object. Registered cursors
7954 * also have the added benefit of updating automatically upon textblock changes,
7955 * this means that if you have a cursor pointing to a specific character, it'll
7956 * still point to it even after you change the whole object completely (as long
7957 * as the char was not deleted), this is not possible without updating, because
7958 * as mentioned, each cursor holds a character position. There are many
7959 * functions that handle cursors, just check out the evas_textblock_cursor*
7960 * functions. For creation and deletion of cursors check out:
7961 * @see evas_object_textblock_cursor_new()
7962 * @see evas_textblock_cursor_free()
7963 * @note Cursors are generally the correct way to handle text in the textblock object, and there are enough functions to do everything you need with them (no need to get big chunks of text and processing them yourself).
7965 * @subsection textblock_paragraphs Textblock Object Paragraphs
7966 * The textblock object is made out of text splitted to paragraphs (delimited
7967 * by the paragraph separation character). Each paragraph has many (or none)
7968 * format nodes associated with it which are responsible for the formatting
7969 * of that paragraph.
7971 * @subsection textblock_format_nodes Textblock Object Format Nodes
7972 * As explained in @ref textblock_paragraphs each one of the format nodes
7973 * is associated with a paragraph.
7974 * There are two types of format nodes, visible and invisible:
7975 * Visible: formats that a cursor can point to, i.e formats that
7976 * occupy space, for example: newlines, tabs, items and etc. Some visible items
7977 * are made of two parts, in this case, only the opening tag is visible.
7978 * A closing tag (i.e a </tag> tag) should NEVER be visible.
7979 * Invisible: formats that don't occupy space, for example: bold and underline.
7980 * Being able to access format nodes is very important for some uses. For
7981 * example, edje uses the "<a>" format to create links in the text (and pop
7982 * popups above them when clicked). For the textblock object a is just a
7983 * formatting instruction (how to color the text), but edje utilizes the access
7984 * to the format nodes to make it do more.
7985 * For more information, take a look at all the evas_textblock_node_format_*
7987 * The translation of "<tag>" tags to actual format is done according to the
7988 * tags defined in the style, see @ref evas_textblock_style_set
7990 * @subsection textblock_special_formats Special Formats
7991 * Textblock supports various format directives that can be used either in
7992 * markup, or by calling @ref evas_object_textblock_format_append or
7993 * @ref evas_object_textblock_format_prepend. In addition to the mentioned
7994 * format directives, textblock allows creating additional format directives
7995 * using "tags" that can be set in the style see @ref evas_textblock_style_set .
7997 * Textblock supports the following formats:
7998 * @li font - Font description in fontconfig like format, e.g: "Sans:style=Italic:lang=hi". or "Serif:style=Bold".
7999 * @li font_weight - Overrides the weight defined in "font". E.g: "font_weight=Bold" is the same as "font=:style=Bold". Supported weights: "normal", "thin", "ultralight", "light", "book", "medium", "semibold", "bold", "ultrabold", "black", and "extrablack".
8000 * @li font_style - Overrides the style defined in "font". E.g: "font_style=Italic" is the same as "font=:style=Italic". Supported styles: "normal", "oblique", and "italic".
8001 * @li font_width - Overrides the width defined in "font". E.g: "font_width=Condensed" is the same as "font=:style=Condensed". Supported widths: "normal", "ultracondensed", "extracondensed", "condensed", "semicondensed", "semiexpanded", "expanded", "extraexpanded", and "ultraexpanded".
8002 * @li lang - Overrides the language defined in "font". E.g: "lang=he" is the same as "font=:lang=he".
8003 * @li font_fallbacks - A comma delimited list of fonts to try if finding the main font fails.
8004 * @li font_size - The font size in points.
8005 * @li font_source - The source of the font, e.g an eet file.
8006 * @li color - Text color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8007 * @li underline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8008 * @li underline2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8009 * @li outline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8010 * @li shadow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8011 * @li glow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8012 * @li glow2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8013 * @li backing_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8014 * @li strikethrough_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8015 * @li align - Either "auto" (meaning according to text direction), "left", "right", "center", "middle", a value between 0.0 and 1.0, or a value between 0% to 100%.
8016 * @li valign - Either "top", "bottom", "middle", "center", "baseline", "base", a value between 0.0 and 1.0, or a value between 0% to 100%.
8017 * @li wrap - "word", "char", "mixed", or "none".
8018 * @li left_margin - Either "reset", or a pixel value indicating the margin.
8019 * @li right_margin - Either "reset", or a pixel value indicating the margin.
8020 * @li underline - "on", "off", "single", or "double".
8021 * @li strikethrough - "on" or "off"
8022 * @li backing - "on" or "off"
8023 * @li style - Either "off", "none", "plain", "shadow", "outline", "soft_outline", "outline_shadow", "outline_soft_shadow", "glow", "far_shadow", "soft_shadow", or "far_soft_shadow".
8024 * @li tabstops - Pixel value for tab width.
8025 * @li linesize - Force a line size in pixels.
8026 * @li linerelsize - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size.
8027 * @li linegap - Force a line gap in pixels.
8028 * @li linerelgap - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size.
8029 * @li item - Creates an empty space that should be filled by an upper layer. Use "size", "abssize", or "relsize". To define the items size, and an optional: vsize=full/ascent to define the item's position in the line.
8030 * @li linefill - Either a float value or percentage indicating how much to fill the line.
8031 * @li ellipsis - Value between 0.0-1.0 to indicate the type of ellipsis, or -1.0 to indicate ellipsis isn't wanted.
8032 * @li password - "on" or "off". This is used to specifically turn replacing chars with the replacement char (i.e password mode) on and off.
8035 * @todo put here some usage examples
8037 * @ingroup Evas_Object_Specific
8042 typedef struct _Evas_Textblock_Style Evas_Textblock_Style;
8043 typedef struct _Evas_Textblock_Cursor Evas_Textblock_Cursor;
8045 * @typedef Evas_Object_Textblock_Node_Format
8048 typedef struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Format;
8049 typedef struct _Evas_Textblock_Rectangle Evas_Textblock_Rectangle;
8051 struct _Evas_Textblock_Rectangle
8053 Evas_Coord x, y, w, h;
8056 typedef enum _Evas_Textblock_Text_Type
8058 EVAS_TEXTBLOCK_TEXT_RAW,
8059 EVAS_TEXTBLOCK_TEXT_PLAIN,
8060 EVAS_TEXTBLOCK_TEXT_MARKUP
8061 } Evas_Textblock_Text_Type;
8063 typedef enum _Evas_Textblock_Cursor_Type
8065 EVAS_TEXTBLOCK_CURSOR_UNDER,
8066 EVAS_TEXTBLOCK_CURSOR_BEFORE
8067 } Evas_Textblock_Cursor_Type;
8071 * Adds a textblock to the given evas.
8072 * @param e The given evas.
8073 * @return The new textblock object.
8075 EAPI Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
8079 * Returns the unescaped version of escape.
8080 * @param escape the string to be escaped
8081 * @return the unescaped version of escape
8083 EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8086 * Returns the escaped version of the string.
8087 * @param string to escape
8088 * @param len_ret the len of the part of the string that was used.
8089 * @return the escaped string.
8091 EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8094 * Return the unescaped version of the string between start and end.
8096 * @param escape_start the start of the string.
8097 * @param escape_end the end of the string.
8098 * @return the unescaped version of the range
8100 EAPI const char *evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
8104 * Creates a new textblock style.
8105 * @return The new textblock style.
8107 EAPI Evas_Textblock_Style *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
8110 * Destroys a textblock style.
8111 * @param ts The textblock style to free.
8113 EAPI void evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
8116 * Sets the style ts to the style passed as text by text.
8117 * Expected a string consisting of many (or none) tag='format' pairs.
8119 * @param ts the style to set.
8120 * @param text the text to parse - NOT NULL.
8121 * @return Returns no value.
8123 EAPI void evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1);
8126 * Return the text of the style ts.
8127 * @param ts the style to get it's text.
8128 * @return the text of the style or null on error.
8130 EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8134 * Set the objects style to ts.
8135 * @param obj the Evas object to set the style to.
8136 * @param ts the style to set.
8137 * @return Returns no value.
8139 EAPI void evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
8142 * Return the style of an object.
8143 * @param obj the object to get the style from.
8144 * @return the style of the object.
8146 EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8149 * @brief Set the "replacement character" to use for the given textblock object.
8151 * @param obj The given textblock object.
8152 * @param ch The charset name.
8154 EAPI void evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) EINA_ARG_NONNULL(1);
8157 * @brief Get the "replacement character" for given textblock object. Returns
8158 * NULL if no replacement character is in use.
8160 * @param obj The given textblock object
8161 * @return replacement character or @c NULL
8163 EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8166 * @brief Sets the vertical alignment of text within the textblock object
8169 * Normally alignment is 0.0 (top of object). Values given should be
8170 * between 0.0 and 1.0 (1.0 bottom of object, 0.5 being vertically centered
8173 * @param obj The given textblock object.
8174 * @param align A value between 0.0 and 1.0
8177 EAPI void evas_object_textblock_valign_set(Evas_Object *obj, double align);
8180 * @brief Gets the vertical alignment of a textblock
8182 * @param obj The given textblock object.
8183 * @return The elignment set for the object
8186 EAPI double evas_object_textblock_valign_get(const Evas_Object *obj);
8189 * @brief Sets the BiDi delimiters used in the textblock.
8191 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
8192 * is useful for example in recipients fields of e-mail clients where bidi
8193 * oddities can occur when mixing rtl and ltr.
8195 * @param obj The given textblock object.
8196 * @param delim A null terminated string of delimiters, e.g ",|".
8199 EAPI void evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim);
8202 * @brief Gets the BiDi delimiters used in the textblock.
8204 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
8205 * is useful for example in recipients fields of e-mail clients where bidi
8206 * oddities can occur when mixing rtl and ltr.
8208 * @param obj The given textblock object.
8209 * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL.
8212 EAPI const char *evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj);
8215 * @brief Sets newline mode. When true, newline character will behave
8216 * as a paragraph separator.
8218 * @param obj The given textblock object.
8219 * @param mode EINA_TRUE for legacy mode, EINA_FALSE otherwise.
8222 EAPI void evas_object_textblock_legacy_newline_set(Evas_Object *obj, Eina_Bool mode) EINA_ARG_NONNULL(1);
8225 * @brief Gets newline mode. When true, newline character behaves
8226 * as a paragraph separator.
8228 * @param obj The given textblock object.
8229 * @return EINA_TRUE if in legacy mode, EINA_FALSE otherwise.
8232 EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8236 * Sets the tetxblock's text to the markup text.
8238 * @note assumes text does not include the unicode object replacement char (0xFFFC)
8240 * @param obj the textblock object.
8241 * @param text the markup text to use.
8242 * @return Return no value.
8244 EAPI void evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
8247 * Prepends markup to the cursor cur.
8249 * @note assumes text does not include the unicode object replacement char (0xFFFC)
8251 * @param cur the cursor to prepend to.
8252 * @param text the markup text to prepend.
8253 * @return Return no value.
8255 EAPI void evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
8258 * Return the markup of the object.
8260 * @param obj the Evas object.
8261 * @return the markup text of the object.
8263 EAPI const char *evas_object_textblock_text_markup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
8267 * Return the object's main cursor.
8269 * @param obj the object.
8270 * @return the obj's main cursor.
8272 EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8275 * Create a new cursor, associate it to the obj and init it to point
8276 * to the start of the textblock. Association to the object means the cursor
8277 * will be updated when the object will change.
8279 * @note if you need speed and you know what you are doing, it's slightly faster to just allocate the cursor yourself and not associate it. (only people developing the actual object, and not users of the object).
8281 * @param obj the object to associate to.
8282 * @return the new cursor.
8284 EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_new(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
8288 * Free the cursor and unassociate it from the object.
8289 * @note do not use it to free unassociated cursors.
8291 * @param cur the cursor to free.
8292 * @return Returns no value.
8294 EAPI void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8298 * Sets the cursor to the start of the first text node.
8300 * @param cur the cursor to update.
8301 * @return Returns no value.
8303 EAPI void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8306 * sets the cursor to the end of the last text node.
8308 * @param cur the cursor to set.
8309 * @return Returns no value.
8311 EAPI void evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8314 * Advances to the start of the next text node
8316 * @param cur the cursor to update
8317 * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise.
8319 EAPI Eina_Bool evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8322 * Advances to the end of the previous text node
8324 * @param cur the cursor to update
8325 * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise.
8327 EAPI Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8332 * @param obj The evas, must not be NULL.
8333 * @param anchor the anchor name to get
8334 * @return Returns the list format node corresponding to the anchor, may be null if there are none.
8336 EAPI const Eina_List *evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor) EINA_ARG_NONNULL(1, 2);
8339 * Returns the first format node.
8341 * @param obj The evas, must not be NULL.
8342 * @return Returns the first format node, may be null if there are none.
8344 EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
8347 * Returns the last format node.
8349 * @param obj The evas textblock, must not be NULL.
8350 * @return Returns the first format node, may be null if there are none.
8352 EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
8355 * Returns the next format node (after n)
8357 * @param n the current format node - not null.
8358 * @return Returns the next format node, may be null.
8360 EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
8363 * Returns the prev format node (after n)
8365 * @param n the current format node - not null.
8366 * @return Returns the prev format node, may be null.
8368 EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
8371 * Remove a format node and it's match. i.e, removes a <tag> </tag> pair.
8372 * Assumes the node is the first part of <tag> i.e, this won't work if
8373 * n is a closing tag.
8375 * @param obj the Evas object of the textblock - not null.
8376 * @param n the current format node - not null.
8378 EAPI void evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
8381 * Sets the cursor to point to the place where format points to.
8383 * @param cur the cursor to update.
8384 * @param n the format node to update according.
8385 * @deprecated duplicate of evas_textblock_cursor_at_format_set
8387 EINA_DEPRECATED EAPI void evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
8390 * Return the format node at the position pointed by cur.
8392 * @param cur the position to look at.
8393 * @return the format node if found, NULL otherwise.
8394 * @see evas_textblock_cursor_format_is_visible_get()
8396 EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8399 * Get the text format representation of the format node.
8401 * @param fmt the format node.
8402 * @return the textual format of the format node.
8404 EAPI const char *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fnode) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8407 * Set the cursor to point to the position of fmt.
8409 * @param cur the cursor to update
8410 * @param fmt the format to update according to.
8412 EAPI void evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2);
8415 * Check if the current cursor position is a visible format. This way is more
8416 * efficient than evas_textblock_cursor_format_get() to check for the existence
8417 * of a visible format.
8419 * @param cur the cursor to look at.
8420 * @return #EINA_TRUE if the cursor points to a visible format, #EINA_FALSE otherwise.
8421 * @see evas_textblock_cursor_format_get()
8423 EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8426 * Advances to the next format node
8428 * @param cur the cursor to be updated.
8429 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8431 EAPI Eina_Bool evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8434 * Advances to the previous format node.
8436 * @param cur the cursor to update.
8437 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8439 EAPI Eina_Bool evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8442 * Returns true if the cursor points to a format.
8444 * @param cur the cursor to check.
8445 * @return Returns #EINA_TRUE if a cursor points to a format #EINA_FALSE otherwise.
8447 EAPI Eina_Bool evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8450 * Advances 1 char forward.
8452 * @param cur the cursor to advance.
8453 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8455 EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8458 * Advances 1 char backward.
8460 * @param cur the cursor to advance.
8461 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8463 EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8466 * Go to the first char in the node the cursor is pointing on.
8468 * @param cur the cursor to update.
8469 * @return Returns no value.
8471 EAPI void evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8474 * Go to the last char in a text node.
8476 * @param cur the cursor to update.
8477 * @return Returns no value.
8479 EAPI void evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8482 * Go to the start of the current line
8484 * @param cur the cursor to update.
8485 * @return Returns no value.
8487 EAPI void evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8490 * Go to the end of the current line.
8492 * @param cur the cursor to update.
8493 * @return Returns no value.
8495 EAPI void evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8498 * Return the current cursor pos.
8500 * @param cur the cursor to take the position from.
8501 * @return the position or -1 on error
8503 EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8506 * Set the cursor pos.
8508 * @param cur the cursor to be set.
8509 * @param pos the pos to set.
8511 EAPI void evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos) EINA_ARG_NONNULL(1);
8514 * Go to the start of the line passed
8516 * @param cur cursor to update.
8517 * @param line numer to set.
8518 * @return #EINA_TRUE on success, #EINA_FALSE on error.
8520 EAPI Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1);
8523 * Compare two cursors.
8525 * @param cur1 the first cursor.
8526 * @param cur2 the second cursor.
8527 * @return -1 if cur1 < cur2, 0 if cur1 == cur2 and 1 otherwise.
8529 EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
8532 * Make cur_dest point to the same place as cur. Does not work if they don't
8533 * point to the same object.
8535 * @param cur the source cursor.
8536 * @param cur_dest destination cursor.
8537 * @return Returns no value.
8539 EAPI void evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) EINA_ARG_NONNULL(1, 2);
8543 * Adds text to the current cursor position and set the cursor to *before*
8544 * the start of the text just added.
8546 * @param cur the cursor to where to add text at.
8547 * @param _text the text to add.
8548 * @return Returns the len of the text added.
8549 * @see evas_textblock_cursor_text_prepend()
8551 EAPI int evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
8554 * Adds text to the current cursor position and set the cursor to *after*
8555 * the start of the text just added.
8557 * @param cur the cursor to where to add text at.
8558 * @param _text the text to add.
8559 * @return Returns the len of the text added.
8560 * @see evas_textblock_cursor_text_append()
8562 EAPI int evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
8566 * Adds format to the current cursor position. If the format being added is a
8567 * visible format, add it *before* the cursor position, otherwise, add it after.
8568 * This behavior is because visible formats are like characters and invisible
8569 * should be stacked in a way that the last one is added last.
8571 * This function works with native formats, that means that style defined
8572 * tags like <br> won't work here. For those kind of things use markup prepend.
8574 * @param cur the cursor to where to add format at.
8575 * @param format the format to add.
8576 * @return Returns true if a visible format was added, false otherwise.
8577 * @see evas_textblock_cursor_format_prepend()
8581 * Check if the current cursor position points to the terminating null of the
8582 * last paragraph. (shouldn't be allowed to point to the terminating null of
8583 * any previous paragraph anyway.
8585 * @param cur the cursor to look at.
8586 * @return #EINA_TRUE if the cursor points to the terminating null, #EINA_FALSE otherwise.
8588 EAPI Eina_Bool evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
8591 * Adds format to the current cursor position. If the format being added is a
8592 * visible format, add it *before* the cursor position, otherwise, add it after.
8593 * This behavior is because visible formats are like characters and invisible
8594 * should be stacked in a way that the last one is added last.
8595 * If the format is visible the cursor is advanced after it.
8597 * This function works with native formats, that means that style defined
8598 * tags like <br> won't work here. For those kind of things use markup prepend.
8600 * @param cur the cursor to where to add format at.
8601 * @param format the format to add.
8602 * @return Returns true if a visible format was added, false otherwise.
8603 * @see evas_textblock_cursor_format_prepend()
8605 EAPI Eina_Bool evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
8608 * Delete the character at the location of the cursor. If there's a format
8609 * pointing to this position, delete it as well.
8611 * @param cur the cursor pointing to the current location.
8612 * @return Returns no value.
8614 EAPI void evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8617 * Delete the range between cur1 and cur2.
8619 * @param cur1 one side of the range.
8620 * @param cur2 the second side of the range
8621 * @return Returns no value.
8623 EAPI void evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2);
8627 * Return the text of the paragraph cur points to - returns the text in markup..
8629 * @param cur the cursor pointing to the paragraph.
8630 * @return the text on success, NULL otherwise.
8632 EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8635 * Return the length of the paragraph, cheaper the eina_unicode_strlen()
8637 * @param cur the position of the paragraph.
8638 * @return the length of the paragraph on success, -1 otehrwise.
8640 EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8643 * Return the currently visible range.
8645 * @param start the start of the range.
8646 * @param end the end of the range.
8647 * @return EINA_TRUE on success. EINA_FALSE otherwise.
8650 Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2);
8653 * Return the format nodes in the range between cur1 and cur2.
8655 * @param cur1 one side of the range.
8656 * @param cur2 the other side of the range
8657 * @return the foramt nodes in the range. You have to free it.
8660 EAPI Eina_List * evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
8663 * Return the text in the range between cur1 and cur2
8665 * @param cur1 one side of the range.
8666 * @param cur2 the other side of the range
8667 * @param format The form on which to return the text. Markup - in textblock markup. Plain - UTF8.
8668 * @return the text in the range
8669 * @see elm_entry_markup_to_utf8()
8671 EAPI char *evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
8674 * Return the content of the cursor.
8676 * @param cur the cursor
8677 * @return the text in the range
8679 EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
8683 * Returns the geometry of the cursor. Depends on the type of cursor requested.
8684 * This should be used instead of char_geometry_get because there are weird
8685 * special cases with BiDi text.
8686 * in '_' cursor mode (i.e a line below the char) it's the same as char_geometry
8687 * get, except for the case of the last char of a line which depends on the
8688 * paragraph direction.
8690 * in '|' cursor mode (i.e a line between two chars) it is very varyable.
8691 * For example consider the following visual string:
8692 * "abcCBA" (ABC are rtl chars), a cursor pointing on A should actually draw
8693 * a '|' between the c and the C.
8695 * @param cur the cursor.
8696 * @param cx the x of the cursor
8697 * @param cy the y of the cursor
8698 * @param cw the width of the cursor
8699 * @param ch the height of the cursor
8700 * @param dir the direction of the cursor, can be NULL.
8701 * @param ctype the type of the cursor.
8702 * @return line number of the char on success, -1 on error.
8704 EAPI int evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch, Evas_BiDi_Direction *dir, Evas_Textblock_Cursor_Type ctype) EINA_ARG_NONNULL(1);
8707 * Returns the geometry of the char at cur.
8709 * @param cur the position of the char.
8710 * @param cx the x of the char.
8711 * @param cy the y of the char.
8712 * @param cw the w of the char.
8713 * @param ch the h of the char.
8714 * @return line number of the char on success, -1 on error.
8716 EAPI int evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
8719 * Returns the geometry of the pen at cur.
8721 * @param cur the position of the char.
8722 * @param cpen_x the pen_x of the char.
8723 * @param cy the y of the char.
8724 * @param cadv the adv of the char.
8725 * @param ch the h of the char.
8726 * @return line number of the char on success, -1 on error.
8728 EAPI int evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cpen_x, Evas_Coord *cy, Evas_Coord *cadv, Evas_Coord *ch) EINA_ARG_NONNULL(1);
8731 * Returns the geometry of the line at cur.
8733 * @param cur the position of the line.
8734 * @param cx the x of the line.
8735 * @param cy the y of the line.
8736 * @param cw the width of the line.
8737 * @param ch the height of the line.
8738 * @return line number of the line on success, -1 on error.
8740 EAPI int evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
8743 * Set the position of the cursor according to the X and Y coordinates.
8745 * @param cur the cursor to set.
8746 * @param x coord to set by.
8747 * @param y coord to set by.
8748 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
8750 EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
8753 * Set the cursor position according to the y coord.
8755 * @param cur the cur to be set.
8756 * @param y the coord to set by.
8757 * @return the line number found, -1 on error.
8759 EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
8762 * Get the geometry of a range.
8764 * @param cur1 one side of the range.
8765 * @param cur2 other side of the range.
8766 * @return a list of Rectangles representing the geometry of the range.
8768 EAPI Eina_List *evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
8769 EAPI Eina_Bool evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
8773 * Checks if the cursor points to the end of the line.
8775 * @param cur the cursor to check.
8776 * @return #EINA_TRUE if true, #EINA_FALSE otherwise.
8778 EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
8782 * Get the geometry of a line number.
8784 * @param obj the object.
8785 * @param line the line number.
8786 * @param cx x coord of the line.
8787 * @param cy y coord of the line.
8788 * @param cw w coord of the line.
8789 * @param ch h coord of the line.
8790 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
8792 EAPI Eina_Bool evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) EINA_ARG_NONNULL(1);
8795 * Clear the textblock object.
8796 * @note Does *NOT* free the Evas object itself.
8798 * @param obj the object to clear.
8801 EAPI void evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
8804 * Get the formatted width and height. This calculates the actual size after restricting
8805 * the textblock to the current size of the object.
8806 * The main difference between this and @ref evas_object_textblock_size_native_get
8807 * is that the "native" function does not wrapping into account
8808 * it just calculates the real width of the object if it was placed on an
8809 * infinite canvas, while this function gives the size after wrapping
8810 * according to the size restrictions of the object.
8812 * For example for a textblock containing the text: "You shall not pass!"
8813 * with no margins or padding and assuming a monospace font and a size of
8814 * 7x10 char widths (for simplicity) has a native size of 19x1
8815 * and a formatted size of 5x4.
8818 * @param obj the Evas object.
8819 * @param w[out] the width of the object.
8820 * @param h[out] the height of the object
8821 * @return Returns no value.
8822 * @see evas_object_textblock_size_native_get
8824 EAPI void evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
8827 * Get the native width and height. This calculates the actual size without taking account
8828 * the current size of the object.
8829 * The main difference between this and @ref evas_object_textblock_size_formatted_get
8830 * is that the "native" function does not take wrapping into account
8831 * it just calculates the real width of the object if it was placed on an
8832 * infinite canvas, while the "formatted" function gives the size after
8833 * wrapping text according to the size restrictions of the object.
8835 * For example for a textblock containing the text: "You shall not pass!"
8836 * with no margins or padding and assuming a monospace font and a size of
8837 * 7x10 char widths (for simplicity) has a native size of 19x1
8838 * and a formatted size of 5x4.
8840 * @param obj the Evas object of the textblock
8841 * @param w[out] the width returned
8842 * @param h[out] the height returned
8843 * @return Returns no value.
8845 EAPI void evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
8846 EAPI void evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b) EINA_ARG_NONNULL(1);
8852 * @defgroup Evas_Line_Group Line Object Functions
8854 * Functions used to deal with evas line objects.
8856 * @ingroup Evas_Object_Specific
8862 * Adds a new evas line object to the given evas.
8863 * @param e The given evas.
8864 * @return The new evas line object.
8866 EAPI Evas_Object *evas_object_line_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
8869 * Sets the coordinates of the end points of the given evas line object.
8870 * @param obj The given evas line object.
8871 * @param x1 The X coordinate of the first point.
8872 * @param y1 The Y coordinate of the first point.
8873 * @param x2 The X coordinate of the second point.
8874 * @param y2 The Y coordinate of the second point.
8876 EAPI void evas_object_line_xy_set (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2);
8879 * Retrieves the coordinates of the end points of the given evas line object.
8880 * @param obj The given line object.
8881 * @param x1 Pointer to an integer in which to store the X coordinate of the
8883 * @param y1 Pointer to an integer in which to store the Y coordinate of the
8885 * @param x2 Pointer to an integer in which to store the X coordinate of the
8887 * @param y2 Pointer to an integer in which to store the Y coordinate of the
8890 EAPI void evas_object_line_xy_get (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2);
8896 * @defgroup Evas_Object_Polygon Polygon Object Functions
8898 * Functions that operate on evas polygon objects.
8900 * Hint: as evas does not provide ellipse, smooth paths or circle, one
8901 * can calculate points and convert these to a polygon.
8903 * @ingroup Evas_Object_Specific
8909 * Adds a new evas polygon object to the given evas.
8910 * @param e The given evas.
8911 * @return A new evas polygon object.
8913 EAPI Evas_Object *evas_object_polygon_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
8916 * Adds the given point to the given evas polygon object.
8917 * @param obj The given evas polygon object.
8918 * @param x The X coordinate of the given point.
8919 * @param y The Y coordinate of the given point.
8920 * @ingroup Evas_Polygon_Group
8922 EAPI void evas_object_polygon_point_add (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
8925 * Removes all of the points from the given evas polygon object.
8926 * @param obj The given polygon object.
8928 EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA_ARG_NONNULL(1);
8934 * @defgroup Evas_Smart_Group Smart Functions
8936 * Functions that deal with #Evas_Smart structs, creating definition
8937 * (classes) of objects that will have customized behavior for methods
8938 * like evas_object_move(), evas_object_resize(),
8939 * evas_object_clip_set() and others.
8941 * These objects will accept the generic methods defined in @ref
8942 * Evas_Object_Group and the extensions defined in @ref
8943 * Evas_Smart_Object_Group. There are a couple of existent smart
8944 * objects in Evas itself (see @ref Evas_Object_Box, @ref
8945 * Evas_Object_Table and @ref Evas_Smart_Object_Clipped).
8947 * See also some @ref Example_Evas_Smart_Objects "examples" of this
8948 * group of functions.
8952 * @addtogroup Evas_Smart_Group
8957 * @def EVAS_SMART_CLASS_VERSION
8959 * The version you have to put into the version field in the
8960 * #Evas_Smart_Class struct. Used to safeguard from binaries with old
8961 * smart object intefaces running with newer ones.
8963 * @ingroup Evas_Smart_Group
8965 #define EVAS_SMART_CLASS_VERSION 4
8967 * @struct _Evas_Smart_Class
8969 * A smart object's @b base class definition
8971 * @ingroup Evas_Smart_Group
8973 struct _Evas_Smart_Class
8975 const char *name; /**< the name string of the class */
8977 void (*add) (Evas_Object *o); /**< code to be run when adding object to a canvas */
8978 void (*del) (Evas_Object *o); /**< code to be run when removing object to a canvas */
8979 void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y); /**< code to be run when moving object on a canvas */
8980 void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h); /**< code to be run when resizing object on a canvas */
8981 void (*show) (Evas_Object *o); /**< code to be run when showing object on a canvas */
8982 void (*hide) (Evas_Object *o); /**< code to be run when hiding object on a canvas */
8983 void (*color_set) (Evas_Object *o, int r, int g, int b, int a); /**< code to be run when setting color of object on a canvas */
8984 void (*clip_set) (Evas_Object *o, Evas_Object *clip); /**< code to be run when setting clipper of object on a canvas */
8985 void (*clip_unset) (Evas_Object *o); /**< code to be run when unsetting clipper of object on a canvas */
8986 void (*calculate) (Evas_Object *o); /**< code to be run when object has rendering updates on a canvas */
8987 void (*member_add) (Evas_Object *o, Evas_Object *child); /**< code to be run when child member is added to object */
8988 void (*member_del) (Evas_Object *o, Evas_Object *child); /**< code to be run when child member is removed from object */
8990 const Evas_Smart_Class *parent; /**< this class inherits from this parent */
8991 const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, @c NULL terminated */
8992 void *interfaces; /**< to be used in a future near you */
8997 * @struct _Evas_Smart_Cb_Description
8999 * Describes a callback issued by a smart object
9000 * (evas_object_smart_callback_call()), as defined in its smart object
9001 * class. This is particularly useful to explain to end users and
9002 * their code (i.e., introspection) what the parameter @c event_info
9005 * @ingroup Evas_Smart_Group
9007 struct _Evas_Smart_Cb_Description
9009 const char *name; /**< callback name ("changed", for example) */
9012 * @brief Hint on the type of @c event_info parameter's contents on
9013 * a #Evas_Smart_Cb callback.
9015 * The type string uses the pattern similar to
9016 * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures,
9017 * but extended to optionally include variable names within
9018 * brackets preceding types. Example:
9020 * @li Structure with two integers:
9023 * @li Structure called 'x' with two integers named 'a' and 'b':
9024 * @c "[x]([a]i[b]i)"
9026 * @li Array of integers:
9029 * @li Array called 'x' of struct with two integers:
9032 * @note This type string is used as a hint and is @b not validated
9033 * or enforced in any way. Implementors should make the best
9034 * use of it to help bindings, documentation and other users
9035 * of introspection features.
9041 * @def EVAS_SMART_CLASS_INIT_NULL
9042 * Initializer to zero a whole Evas_Smart_Class structure.
9044 * @see EVAS_SMART_CLASS_INIT_VERSION
9045 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
9046 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9047 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9048 * @ingroup Evas_Smart_Group
9050 #define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
9053 * @def EVAS_SMART_CLASS_INIT_VERSION
9054 * Initializer to zero a whole Evas_Smart_Class structure and set version.
9056 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
9057 * latest EVAS_SMART_CLASS_VERSION.
9059 * @see EVAS_SMART_CLASS_INIT_NULL
9060 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
9061 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9062 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9063 * @ingroup Evas_Smart_Group
9065 #define EVAS_SMART_CLASS_INIT_VERSION {NULL, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
9068 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION
9069 * Initializer to zero a whole Evas_Smart_Class structure and set name
9072 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
9073 * latest EVAS_SMART_CLASS_VERSION and name to the specified value.
9075 * It will keep a reference to name field as a "const char *", that is,
9076 * name must be available while the structure is used (hint: static or global!)
9077 * and will not be modified.
9079 * @see EVAS_SMART_CLASS_INIT_NULL
9080 * @see EVAS_SMART_CLASS_INIT_VERSION
9081 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9082 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9083 * @ingroup Evas_Smart_Group
9085 #define EVAS_SMART_CLASS_INIT_NAME_VERSION(name) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
9088 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9089 * Initializer to zero a whole Evas_Smart_Class structure and set name,
9090 * version and parent class.
9092 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
9093 * latest EVAS_SMART_CLASS_VERSION, name to the specified value and
9096 * It will keep a reference to name field as a "const char *", that is,
9097 * name must be available while the structure is used (hint: static or global!)
9098 * and will not be modified. Similarly, parent reference will be kept.
9100 * @see EVAS_SMART_CLASS_INIT_NULL
9101 * @see EVAS_SMART_CLASS_INIT_VERSION
9102 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
9103 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9104 * @ingroup Evas_Smart_Group
9106 #define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT(name, parent) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, NULL, NULL}
9109 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9110 * Initializer to zero a whole Evas_Smart_Class structure and set name,
9111 * version, parent class and callbacks definition.
9113 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
9114 * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent
9115 * class and callbacks at this level.
9117 * It will keep a reference to name field as a "const char *", that is,
9118 * name must be available while the structure is used (hint: static or global!)
9119 * and will not be modified. Similarly, parent and callbacks reference
9122 * @see EVAS_SMART_CLASS_INIT_NULL
9123 * @see EVAS_SMART_CLASS_INIT_VERSION
9124 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
9125 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9126 * @ingroup Evas_Smart_Group
9128 #define EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS(name, parent, callbacks) {name, EVAS_SMART_CLASS_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, parent, callbacks, NULL}
9131 * @def EVAS_SMART_SUBCLASS_NEW
9133 * Convenience macro to subclass a given Evas smart class.
9135 * @param smart_name The name used for the smart class. e.g:
9136 * @c "Evas_Object_Box".
9137 * @param prefix Prefix used for all variables and functions defined
9138 * and referenced by this macro.
9139 * @param api_type Type of the structure used as API for the smart
9140 * class. Either #Evas_Smart_Class or something derived from it.
9141 * @param parent_type Type of the parent class API.
9142 * @param parent_func Function that gets the parent class. e.g:
9143 * evas_object_box_smart_class_get().
9144 * @param cb_desc Array of callback descriptions for this smart class.
9146 * This macro saves some typing when writing a smart class derived
9147 * from another one. In order to work, the user @b must provide some
9148 * functions adhering to the following guidelines:
9149 * - @<prefix@>_smart_set_user(): the @b internal @c _smart_set
9150 * function (defined by this macro) will call this one, provided by
9151 * the user, after inheriting everything from the parent, which
9152 * should <b>take care of setting the right member functions for
9153 * the class</b>, both overrides and extensions, if any.
9154 * - If this new class should be subclassable as well, a @b public @c
9155 * _smart_set() function is desirable to fill in the class used as
9156 * parent by the children. It's up to the user to provide this
9157 * interface, which will most likely call @<prefix@>_smart_set() to
9160 * After the macro's usage, the following will be defined for use:
9161 * - @<prefix@>_parent_sc: A pointer to the @b parent smart
9162 * class. When calling parent functions from overloaded ones, use
9163 * this global variable.
9164 * - @<prefix@>_smart_class_new(): this function returns the
9165 * #Evas_Smart needed to create smart objects with this class,
9166 * which should be passed to evas_object_smart_add().
9168 * @warning @p smart_name has to be a pointer to a globally available
9169 * string! The smart class created here will just have a pointer set
9170 * to that, and all object instances will depend on it for smart class
9173 * @ingroup Evas_Smart_Group
9175 #define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \
9176 static const parent_type * prefix##_parent_sc = NULL; \
9177 static void prefix##_smart_set_user(api_type *api); \
9178 static void prefix##_smart_set(api_type *api) \
9180 Evas_Smart_Class *sc; \
9181 if (!(sc = (Evas_Smart_Class *)api)) \
9183 if (!prefix##_parent_sc) \
9184 prefix##_parent_sc = parent_func(); \
9185 evas_smart_class_inherit(sc, (const Evas_Smart_Class *)prefix##_parent_sc); \
9186 prefix##_smart_set_user(api); \
9188 static Evas_Smart * prefix##_smart_class_new(void) \
9190 static Evas_Smart *smart = NULL; \
9191 static api_type api; \
9194 Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \
9195 memset(&api, 0, sizeof(api_type)); \
9196 sc->version = EVAS_SMART_CLASS_VERSION; \
9197 sc->name = smart_name; \
9198 sc->callbacks = cb_desc; \
9199 prefix##_smart_set(&api); \
9200 smart = evas_smart_class_new(sc); \
9206 * @def EVAS_SMART_DATA_ALLOC
9208 * Convenience macro to allocate smart data only if needed.
9210 * When writing a subclassable smart object, the @c .add() function
9211 * will need to check if the smart private data was already allocated
9212 * by some child object or not. This macro makes it easier to do it.
9214 * @note This is an idiom used when one calls the parent's @c. add()
9215 * after the specialized code. Naturally, the parent's base smart data
9216 * has to be contemplated as the specialized one's first member, for
9219 * @param o Evas object passed to the @c .add() function
9220 * @param priv_type The type of the data to allocate
9222 * @ingroup Evas_Smart_Group
9224 #define EVAS_SMART_DATA_ALLOC(o, priv_type) \
9226 priv = evas_object_smart_data_get(o); \
9228 priv = (priv_type *)calloc(1, sizeof(priv_type)); \
9229 if (!priv) return; \
9230 evas_object_smart_data_set(o, priv); \
9235 * Free an #Evas_Smart struct
9237 * @param s the #Evas_Smart struct to free
9239 * @warning If this smart handle was created using
9240 * evas_smart_class_new(), the associated #Evas_Smart_Class will not
9243 * @note If you're using the #EVAS_SMART_SUBCLASS_NEW schema to create your
9244 * smart object, note that an #Evas_Smart handle will be shared amongst all
9245 * instances of the given smart class, through a static variable.
9246 * Evas will internally count references on #Evas_Smart handles and free them
9247 * when they are not referenced anymore. Thus, this function is of no use
9248 * for Evas users, most probably.
9250 EAPI void evas_smart_free (Evas_Smart *s) EINA_ARG_NONNULL(1);
9253 * Creates a new #Evas_Smart from a given #Evas_Smart_Class struct
9255 * @param sc the smart class definition
9256 * @return a new #Evas_Smart pointer
9258 * #Evas_Smart handles are necessary to create new @b instances of
9259 * smart objects belonging to the class described by @p sc. That
9260 * handle will contain, besides the smart class interface definition,
9261 * all its smart callbacks infrastructure set, too.
9263 * @note If you are willing to subclass a given smart class to
9264 * construct yours, consider using the #EVAS_SMART_SUBCLASS_NEW macro,
9265 * which will make use of this function automatically for you.
9267 EAPI Evas_Smart *evas_smart_class_new (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
9270 * Get the #Evas_Smart_Class handle of an #Evas_Smart struct
9272 * @param s a valid #Evas_Smart pointer
9273 * @return the #Evas_Smart_Class in it
9275 EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
9279 * @brief Get the data pointer set on an #Evas_Smart struct
9281 * @param s a valid #Evas_Smart handle
9283 * This data pointer is set as the data field in the #Evas_Smart_Class
9284 * passed in to evas_smart_class_new().
9286 EAPI void *evas_smart_data_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
9289 * Get the smart callbacks known by this #Evas_Smart handle's smart
9292 * @param s A valid #Evas_Smart handle.
9293 * @param[out] count Returns the number of elements in the returned
9295 * @return The array with callback descriptions known by this smart
9296 * class, with its size returned in @a count parameter. It
9297 * should not be modified in any way. If no callbacks are
9298 * known, @c NULL is returned. The array is sorted by event
9299 * names and elements refer to the original values given to
9300 * evas_smart_class_new()'s #Evas_Smart_Class::callbacks
9301 * (pointer to them).
9303 * This is likely different from
9304 * evas_object_smart_callbacks_descriptions_get() as it will contain
9305 * the callbacks of @b all this class hierarchy sorted, while the
9306 * direct smart class member refers only to that specific class and
9307 * should not include parent's.
9309 * If no callbacks are known, this function returns @c NULL.
9311 * The array elements and thus their contents will be @b references to
9312 * original values given to evas_smart_class_new() as
9313 * Evas_Smart_Class::callbacks.
9315 * The array is sorted by Evas_Smart_Cb_Description::name. The last
9316 * array element is a @c NULL pointer and is not accounted for in @a
9317 * count. Loop iterations can check any of these size indicators.
9319 * @note objects may provide per-instance callbacks, use
9320 * evas_object_smart_callbacks_descriptions_get() to get those
9322 * @see evas_object_smart_callbacks_descriptions_get()
9324 EAPI const Evas_Smart_Cb_Description **evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) EINA_ARG_NONNULL(1, 1);
9328 * Find a callback description for the callback named @a name.
9330 * @param s The #Evas_Smart where to search for class registered smart
9332 * @param name Name of the desired callback, which must @b not be @c
9333 * NULL. The search has a special case for @a name being the
9334 * same pointer as registered with #Evas_Smart_Cb_Description.
9335 * One can use it to avoid excessive use of strcmp().
9336 * @return A reference to the description if found, or @c NULL, otherwise
9338 * @see evas_smart_callbacks_descriptions_get()
9340 EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE;
9344 * Sets one class to inherit from the other.
9346 * Copy all function pointers, set @c parent to @a parent_sc and copy
9347 * everything after sizeof(Evas_Smart_Class) present in @a parent_sc,
9348 * using @a parent_sc_size as reference.
9350 * This is recommended instead of a single memcpy() since it will take
9351 * care to not modify @a sc name, version, callbacks and possible
9354 * @param sc child class.
9355 * @param parent_sc parent class, will provide attributes.
9356 * @param parent_sc_size size of parent_sc structure, child should be at least
9357 * this size. Everything after @c Evas_Smart_Class size is copied
9358 * using regular memcpy().
9360 EAPI Eina_Bool evas_smart_class_inherit_full (Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size) EINA_ARG_NONNULL(1, 2);
9363 * Get the number of users of the smart instance
9365 * @param s The Evas_Smart to get the usage count of
9366 * @return The number of uses of the smart instance
9368 * This function tells you how many more uses of the smart instance are in
9369 * existence. This should be used before freeing/clearing any of the
9370 * Evas_Smart_Class that was used to create the smart instance. The smart
9371 * instance will refer to data in the Evas_Smart_Class used to create it and
9372 * thus you cannot remove the original data until all users of it are gone.
9373 * When the usage count goes to 0, you can evas_smart_free() the smart
9374 * instance @p s and remove from memory any of the Evas_Smart_Class that
9375 * was used to create the smart instance, if you desire. Removing it from
9376 * memory without doing this will cause problems (crashes, undefined
9377 * behavior etc. etc.), so either never remove the original
9378 * Evas_Smart_Class data from memory (have it be a constant structure and
9379 * data), or use this API call and be very careful.
9381 EAPI int evas_smart_usage_get(const Evas_Smart *s);
9384 * @def evas_smart_class_inherit
9385 * Easy to use version of evas_smart_class_inherit_full().
9387 * This version will use sizeof(parent_sc), copying everything.
9389 * @param sc child class, will have methods copied from @a parent_sc
9390 * @param parent_sc parent class, will provide contents to be copied.
9391 * @return 1 on success, 0 on failure.
9392 * @ingroup Evas_Smart_Group
9394 #define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, parent_sc, sizeof(*parent_sc))
9401 * @defgroup Evas_Smart_Object_Group Smart Object Functions
9403 * Functions dealing with Evas smart objects (instances).
9405 * Smart objects are groupings of primitive Evas objects that behave
9406 * as a cohesive group. For instance, a file manager icon may be a
9407 * smart object composed of an image object, a text label and two
9408 * rectangles that appear behind the image and text when the icon is
9409 * selected. As a smart object, the normal Evas object API could be
9410 * used on the icon object.
9412 * Besides that, generally smart objects implement a <b>specific
9413 * API</b>, so that users interect with its own custom features. The
9414 * API takes form of explicit exported functions one may call and
9415 * <b>smart callbacks</b>.
9417 * @section Evas_Smart_Object_Group_Callbacks Smart events and callbacks
9419 * Smart objects can elect events (smart events, from now on) ocurring
9420 * inside of them to be reported back to their users via callback
9421 * functions (smart callbacks). This way, you can extend Evas' own
9422 * object events. They are defined by an <b>event string</b>, which
9423 * identifies them uniquely. There's also a function prototype
9424 * definition for the callback functions: #Evas_Smart_Cb.
9426 * When defining an #Evas_Smart_Class, smart object implementors are
9427 * strongly encorauged to properly set the Evas_Smart_Class::callbacks
9428 * callbacks description array, so that the users of the smart object
9429 * can have introspection on its events API <b>at run time</b>.
9431 * See some @ref Example_Evas_Smart_Objects "examples" of this group
9434 * @see @ref Evas_Smart_Group for class definitions.
9438 * @addtogroup Evas_Smart_Object_Group
9443 * Instantiates a new smart object described by @p s.
9445 * @param e the canvas on which to add the object
9446 * @param s the #Evas_Smart describing the smart object
9447 * @return a new #Evas_Object handle
9449 * This is the function one should use when defining the public
9450 * function @b adding an instance of the new smart object to a given
9451 * canvas. It will take care of setting all of its internals to work
9452 * as they should, if the user set things properly, as seem on the
9453 * #EVAS_SMART_SUBCLASS_NEW, for example.
9455 * @ingroup Evas_Smart_Object_Group
9457 EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
9460 * Set an Evas object as a member of a given smart object.
9462 * @param obj The member object
9463 * @param smart_obj The smart object
9465 * Members will automatically be stacked and layered together with the
9466 * smart object. The various stacking functions will operate on
9467 * members relative to the other members instead of the entire canvas,
9468 * since they now live on an exclusive layer (see
9469 * evas_object_stack_above(), for more details).
9471 * Any @p smart_obj object's specific implementation of the @c
9472 * member_add() smart function will take place too, naturally.
9474 * @see evas_object_smart_member_del()
9475 * @see evas_object_smart_members_get()
9477 * @ingroup Evas_Smart_Object_Group
9479 EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2);
9482 * Removes a member object from a given smart object.
9484 * @param obj the member object
9485 * @ingroup Evas_Smart_Object_Group
9487 * This removes a member object from a smart object, if it was added
9488 * to any. The object will still be on the canvas, but no longer
9489 * associated with whichever smart object it was associated with.
9491 * @see evas_object_smart_member_add() for more details
9492 * @see evas_object_smart_members_get()
9494 EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA_ARG_NONNULL(1);
9497 * Retrieves the list of the member objects of a given Evas smart
9500 * @param obj the smart object to get members from
9501 * @return Returns the list of the member objects of @p obj.
9503 * The returned list should be freed with @c eina_list_free() when you
9504 * no longer need it.
9506 * @see evas_object_smart_member_add()
9507 * @see evas_object_smart_member_del()
9509 EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
9512 * Gets the parent smart object of a given Evas object, if it has one.
9514 * @param obj the Evas object you want to get the parent smart object
9516 * @return Returns the parent smart object of @a obj or @c NULL, if @a
9517 * obj is not a smart member of any
9519 * @ingroup Evas_Smart_Object_Group
9521 EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
9524 * Checks whether a given smart object or any of its smart object
9525 * parents is of a given smart class.
9527 * @param obj An Evas smart object to check the type of
9528 * @param type The @b name (type) of the smart class to check for
9529 * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a
9530 * type, @c EINA_FALSE otherwise
9532 * If @p obj is not a smart object, this call will fail
9533 * immediately. Otherwise, make sure evas_smart_class_inherit() or its
9534 * sibling functions were used correctly when creating the smart
9535 * object's class, so it has a valid @b parent smart class pointer
9538 * The checks use smart classes names and <b>string
9539 * comparison</b>. There is a version of this same check using
9540 * <b>pointer comparison</b>, since a smart class' name is a single
9543 * @see evas_object_smart_type_check_ptr()
9544 * @see #EVAS_SMART_SUBCLASS_NEW
9546 * @ingroup Evas_Smart_Object_Group
9548 EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
9551 * Checks whether a given smart object or any of its smart object
9552 * parents is of a given smart class, <b>using pointer comparison</b>.
9554 * @param obj An Evas smart object to check the type of
9555 * @param type The type (name string) to check for. Must be the name
9556 * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a
9557 * type, @c EINA_FALSE otherwise
9559 * @see evas_object_smart_type_check() for more details
9561 * @ingroup Evas_Smart_Object_Group
9563 EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
9566 * Get the #Evas_Smart from which @p obj smart object was created.
9568 * @param obj a smart object
9569 * @return the #Evas_Smart handle or @c NULL, on errors
9571 * @ingroup Evas_Smart_Object_Group
9573 EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
9576 * Retrieve user data stored on a given smart object.
9578 * @param obj The smart object's handle
9579 * @return A pointer to data stored using
9580 * evas_object_smart_data_set(), or @c NULL, if none has been
9583 * @see evas_object_smart_data_set()
9585 * @ingroup Evas_Smart_Object_Group
9587 EAPI void *evas_object_smart_data_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
9590 * Store a pointer to user data for a given smart object.
9592 * @param obj The smart object's handle
9593 * @param data A pointer to user data
9595 * This data is stored @b independently of the one set by
9596 * evas_object_data_set(), naturally.
9598 * @see evas_object_smart_data_get()
9600 * @ingroup Evas_Smart_Object_Group
9602 EAPI void evas_object_smart_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
9605 * Add (register) a callback function to the smart event specified by
9606 * @p event on the smart object @p obj.
9608 * @param obj a smart object
9609 * @param event the event's name string
9610 * @param func the callback function
9611 * @param data user data to be passed to the callback function
9613 * Smart callbacks look very similar to Evas callbacks, but are
9614 * implemented as smart object's custom ones.
9616 * This function adds a function callback to an smart object when the
9617 * event named @p event occurs in it. The function is @p func.
9619 * In the event of a memory allocation error during addition of the
9620 * callback to the object, evas_alloc_error() should be used to
9621 * determine the nature of the error, if any, and the program should
9622 * sensibly try and recover.
9624 * A smart callback function must have the ::Evas_Smart_Cb prototype
9625 * definition. The first parameter (@p data) in this definition will
9626 * have the same value passed to evas_object_smart_callback_add() as
9627 * the @p data parameter, at runtime. The second parameter @p obj is a
9628 * handle to the object on which the event occurred. The third
9629 * parameter, @p event_info, is a pointer to data which is totally
9630 * dependent on the smart object's implementation and semantic for the
9633 * There is an infrastructure for introspection on smart objects'
9634 * events (see evas_smart_callbacks_descriptions_get()), but no
9635 * internal smart objects on Evas implement them yet.
9637 * @see @ref Evas_Smart_Object_Group_Callbacks for more details.
9639 * @see evas_object_smart_callback_del()
9640 * @ingroup Evas_Smart_Object_Group
9642 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);
9645 * Add (register) a callback function to the smart event specified by
9646 * @p event on the smart object @p obj. Except for the priority field,
9647 * it's exactly the same as @ref evas_object_smart_callback_add
9649 * @param obj a smart object
9650 * @param event the event's name string
9651 * @param priority The priority of the callback, lower values called first.
9652 * @param func the callback function
9653 * @param data user data to be passed to the callback function
9655 * @see evas_object_smart_callback_add
9657 * @ingroup Evas_Smart_Object_Group
9659 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);
9662 * Delete (unregister) a callback function from the smart event
9663 * specified by @p event on the smart object @p obj.
9665 * @param obj a smart object
9666 * @param event the event's name string
9667 * @param func the callback function
9668 * @return the data pointer
9670 * This function removes <b>the first</b> added smart callback on the
9671 * object @p obj matching the event name @p event and the registered
9672 * function pointer @p func. If the removal is successful it will also
9673 * return the data pointer that was passed to
9674 * evas_object_smart_callback_add() (that will be the same as the
9675 * parameter) when the callback(s) was(were) added to the canvas. If
9676 * not successful @c NULL will be returned.
9678 * @see evas_object_smart_callback_add() for more details.
9680 * @ingroup Evas_Smart_Object_Group
9682 EAPI void *evas_object_smart_callback_del (Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3);
9685 * Call a given smart callback on the smart object @p obj.
9687 * @param obj the smart object
9688 * @param event the event's name string
9689 * @param event_info pointer to an event specific struct or information to
9690 * pass to the callback functions registered on this smart event
9692 * This should be called @b internally, from the smart object's own
9693 * code, when some specific event has occurred and the implementor
9694 * wants is to pertain to the object's events API (see @ref
9695 * Evas_Smart_Object_Group_Callbacks). The documentation for the smart
9696 * object should include a list of possible events and what type of @p
9697 * event_info to expect for each of them. Also, when defining an
9698 * #Evas_Smart_Class, smart object implementors are strongly
9699 * encorauged to properly set the Evas_Smart_Class::callbacks
9700 * callbacks description array, so that the users of the smart object
9701 * can have introspection on its events API <b>at run time</b>.
9703 * @ingroup Evas_Smart_Object_Group
9705 EAPI void evas_object_smart_callback_call (Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2);
9709 * Set an smart object @b instance's smart callbacks descriptions.
9711 * @param obj A smart object
9712 * @param descriptions @c NULL terminated array with
9713 * #Evas_Smart_Cb_Description descriptions. Array elements won't be
9714 * modified at run time, but references to them and their contents
9715 * will be made, so this array should be kept alive during the whole
9716 * object's lifetime.
9717 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
9719 * These descriptions are hints to be used by introspection and are
9720 * not enforced in any way.
9722 * It will not be checked if instance callbacks descriptions have the
9723 * same name as respective possibly registered in the smart object
9724 * @b class. Both are kept in different arrays and users of
9725 * evas_object_smart_callbacks_descriptions_get() should handle this
9726 * case as they wish.
9728 * @note Becase @p descriptions must be @c NULL terminated, and
9729 * because a @c NULL name makes little sense, too,
9730 * Evas_Smart_Cb_Description::name must @b not be @c NULL.
9732 * @note While instance callbacks descriptions are possible, they are
9733 * @b not recommended. Use @b class callbacks descriptions
9734 * instead as they make you smart object user's life simpler and
9735 * will use less memory, as descriptions and arrays will be
9736 * shared among all instances.
9738 * @ingroup Evas_Smart_Object_Group
9740 EAPI Eina_Bool evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) EINA_ARG_NONNULL(1);
9743 * Retrieve an smart object's know smart callback descriptions (both
9744 * instance and class ones).
9746 * @param obj The smart object to get callback descriptions from.
9747 * @param class_descriptions Where to store class callbacks
9748 * descriptions array, if any is known. If no descriptions are
9749 * known, @c NULL is returned
9750 * @param class_count Returns how many class callbacks descriptions
9752 * @param instance_descriptions Where to store instance callbacks
9753 * descriptions array, if any is known. If no descriptions are
9754 * known, @c NULL is returned.
9755 * @param instance_count Returns how many instance callbacks
9756 * descriptions are known.
9758 * This call searchs for registered callback descriptions for both
9759 * instance and class of the given smart object. These arrays will be
9760 * sorted by Evas_Smart_Cb_Description::name and also @c NULL
9761 * terminated, so both @a class_count and @a instance_count can be
9762 * ignored, if the caller wishes so. The terminator @c NULL is not
9763 * counted in these values.
9765 * @note If just class descriptions are of interest, try
9766 * evas_smart_callbacks_descriptions_get() instead.
9768 * @note Use @c NULL pointers on the descriptions/counters you're not
9769 * interested in: they'll be ignored by the function.
9771 * @see evas_smart_callbacks_descriptions_get()
9773 * @ingroup Evas_Smart_Object_Group
9775 EAPI void evas_object_smart_callbacks_descriptions_get(const Evas_Object *obj, const Evas_Smart_Cb_Description ***class_descriptions, unsigned int *class_count, const Evas_Smart_Cb_Description ***instance_descriptions, unsigned int *instance_count) EINA_ARG_NONNULL(1);
9778 * Find callback description for callback called @a name.
9780 * @param obj the smart object.
9781 * @param name name of desired callback, must @b not be @c NULL. The
9782 * search have a special case for @a name being the same
9783 * pointer as registered with Evas_Smart_Cb_Description, one
9784 * can use it to avoid excessive use of strcmp().
9785 * @param class_description pointer to return class description or @c
9786 * NULL if not found. If parameter is @c NULL, no search will
9787 * be done on class descriptions.
9788 * @param instance_description pointer to return instance description
9789 * or @c NULL if not found. If parameter is @c NULL, no search
9790 * will be done on instance descriptions.
9791 * @return reference to description if found, @c NULL if not found.
9793 EAPI void evas_object_smart_callback_description_find(const Evas_Object *obj, const char *name, const Evas_Smart_Cb_Description **class_description, const Evas_Smart_Cb_Description **instance_description) EINA_ARG_NONNULL(1, 2);
9797 * Mark smart object as changed, dirty.
9799 * @param obj The given Evas smart object
9801 * This will flag the given object as needing recalculation,
9802 * forcefully. As an effect, on the next rendering cycle it's @b
9803 * calculate() (see #Evas_Smart_Class) smart function will be called.
9805 * @see evas_object_smart_need_recalculate_set().
9806 * @see evas_object_smart_calculate().
9808 * @ingroup Evas_Smart_Object_Group
9810 EAPI void evas_object_smart_changed (Evas_Object *obj) EINA_ARG_NONNULL(1);
9813 * Set or unset the flag signalling that a given smart object needs to
9816 * @param obj the smart object
9817 * @param value whether one wants to set (@c EINA_TRUE) or to unset
9818 * (@c EINA_FALSE) the flag.
9820 * If this flag is set, then the @c calculate() smart function of @p
9821 * obj will be called, if one is provided, during rendering phase of
9822 * Evas (see evas_render()), after which this flag will be
9823 * automatically unset.
9825 * If that smart function is not provided for the given object, this
9826 * flag will be left unchanged.
9828 * @note just setting this flag will not make the canvas' whole scene
9829 * dirty, by itself, and evas_render() will have no effect. To
9830 * force that, use evas_object_smart_changed(), that will also
9831 * automatically call this function automatically, with @c
9832 * EINA_TRUE as parameter.
9834 * @see evas_object_smart_need_recalculate_get()
9835 * @see evas_object_smart_calculate()
9836 * @see evas_smart_objects_calculate()
9838 * @ingroup Evas_Smart_Object_Group
9840 EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
9843 * Get the value of the flag signalling that a given smart object needs to
9846 * @param obj the smart object
9847 * @return if flag is set or not.
9849 * @note this flag will be unset during the rendering phase, when the
9850 * @c calculate() smart function is called, if one is provided.
9851 * If it's not provided, then the flag will be left unchanged
9852 * after the rendering phase.
9854 * @see evas_object_smart_need_recalculate_set(), for more details
9856 * @ingroup Evas_Smart_Object_Group
9858 EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
9861 * Call the @b calculate() smart function immediataly on a given smart
9864 * @param obj the smart object's handle
9866 * This will force immediate calculations (see #Evas_Smart_Class)
9867 * needed for renderization of this object and, besides, unset the
9868 * flag on it telling it needs recalculation for the next rendering
9871 * @see evas_object_smart_need_recalculate_set()
9873 * @ingroup Evas_Smart_Object_Group
9875 EAPI void evas_object_smart_calculate (Evas_Object *obj) EINA_ARG_NONNULL(1);
9878 * Call user-provided @c calculate() smart functions and unset the
9879 * flag signalling that the object needs to get recalculated to @b all
9880 * smart objects in the canvas.
9882 * @param e The canvas to calculate all smart objects in
9884 * @see evas_object_smart_need_recalculate_set()
9886 * @ingroup Evas_Smart_Object_Group
9888 EAPI void evas_smart_objects_calculate (Evas *e);
9891 * This gets the internal counter that counts the number of smart calculations
9893 * @param e The canvas to get the calculate counter from
9895 * Whenever evas performs smart object calculations on the whole canvas
9896 * it increments a counter by 1. This is the smart object calculate counter
9897 * that this function returns the value of. It starts at the value of 0 and
9898 * will increase (and eventually wrap around to negative values and so on) by
9899 * 1 every time objects are calculated. You can use this counter to ensure
9900 * you dont re-do calculations withint the same calculation generation/run
9901 * if the calculations maybe cause self-feeding effects.
9903 * @ingroup Evas_Smart_Object_Group
9906 EAPI int evas_smart_objects_calculate_count_get (const Evas *e);
9909 * Moves all children objects of a given smart object relative to a
9912 * @param obj the smart object.
9913 * @param dx horizontal offset (delta).
9914 * @param dy vertical offset (delta).
9916 * This will make each of @p obj object's children to move, from where
9917 * they before, with those delta values (offsets) on both directions.
9919 * @note This is most useful on custom smart @c move() functions.
9921 * @note Clipped smart objects already make use of this function on
9922 * their @c move() smart function definition.
9924 EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1);
9931 * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object
9933 * Clipped smart object is a base to construct other smart objects
9934 * based on the concept of having an internal clipper that is applied
9935 * to all children objects. This clipper will control the visibility,
9936 * clipping and color of sibling objects (remember that the clipping
9937 * is recursive, and clipper color modulates the color of its
9938 * clippees). By default, this base will also move children relatively
9939 * to the parent, and delete them when parent is deleted. In other
9940 * words, it is the base for simple object grouping.
9942 * See some @ref Example_Evas_Smart_Objects "examples" of this group
9945 * @see evas_object_smart_clipped_smart_set()
9947 * @ingroup Evas_Smart_Object_Group
9951 * @addtogroup Evas_Smart_Object_Clipped
9956 * Every subclass should provide this at the beginning of their own
9957 * data set with evas_object_smart_data_set().
9959 typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data;
9960 struct _Evas_Object_Smart_Clipped_Data
9962 Evas_Object *clipper;
9968 * Get the clipper object for the given clipped smart object.
9970 * @param obj the clipped smart object to retrieve associated clipper
9972 * @return the clipper object.
9974 * Use this function if you want to change any of this clipper's
9975 * properties, like colors.
9977 * @see evas_object_smart_clipped_smart_add()
9979 EAPI Evas_Object *evas_object_smart_clipped_clipper_get (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
9982 * Set a given smart class' callbacks so it implements the <b>clipped smart
9983 * object"</b>'s interface.
9985 * @param sc The smart class handle to operate on
9987 * This call will assign all the required methods of the @p sc
9988 * #Evas_Smart_Class instance to the implementations set for clipped
9989 * smart objects. If one wants to "subclass" it, call this function
9990 * and then override desired values. If one wants to call any original
9991 * method, save it somewhere. Example:
9994 * static Evas_Smart_Class parent_sc = EVAS_SMART_CLASS_INIT_NULL;
9996 * static void my_class_smart_add(Evas_Object *o)
9999 * evas_object_color_set(evas_object_smart_clipped_clipper_get(o),
10003 * Evas_Smart_Class *my_class_new(void)
10005 * static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass");
10006 * if (!parent_sc.name)
10008 * evas_object_smart_clipped_smart_set(&sc);
10010 * sc.add = my_class_smart_add;
10016 * Default behavior for each of #Evas_Smart_Class functions on a
10017 * clipped smart object are:
10018 * - @c add: creates a hidden clipper with "infinite" size, to clip
10019 * any incoming members;
10020 * - @c del: delete all children objects;
10021 * - @c move: move all objects relative relatively;
10022 * - @c resize: <b>not defined</b>;
10023 * - @c show: if there are children objects, show clipper;
10024 * - @c hide: hides clipper;
10025 * - @c color_set: set the color of clipper;
10026 * - @c clip_set: set clipper of clipper;
10027 * - @c clip_unset: unset the clipper of clipper;
10029 * @note There are other means of assigning parent smart classes to
10030 * child ones, like the #EVAS_SMART_SUBCLASS_NEW macro or the
10031 * evas_smart_class_inherit_full() function.
10033 EAPI void evas_object_smart_clipped_smart_set (Evas_Smart_Class *sc) EINA_ARG_NONNULL(1);
10036 * Get a pointer to the <b>clipped smart object's</b> class, to use
10037 * for proper inheritance
10039 * @see #Evas_Smart_Object_Clipped for more information on this smart
10042 EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get (void) EINA_CONST;
10049 * @defgroup Evas_Object_Box Box Smart Object
10051 * A box is a convenience smart object that packs children inside it
10052 * in @b sequence, using a layouting function specified by the
10053 * user. There are a couple of pre-made layouting functions <b>built-in
10054 * in Evas</b>, all of them using children size hints to define their
10055 * size and alignment inside their cell space.
10057 * Examples on this smart object's usage:
10058 * - @ref Example_Evas_Box
10059 * - @ref Example_Evas_Size_Hints
10061 * @see @ref Evas_Object_Group_Size_Hints
10063 * @ingroup Evas_Smart_Object_Group
10067 * @addtogroup Evas_Object_Box
10072 * @typedef Evas_Object_Box_Api
10074 * Smart class extension, providing extra box object requirements.
10076 * @ingroup Evas_Object_Box
10078 typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api;
10081 * @typedef Evas_Object_Box_Data
10083 * Smart object instance data, providing box object requirements.
10085 * @ingroup Evas_Object_Box
10087 typedef struct _Evas_Object_Box_Data Evas_Object_Box_Data;
10090 * @typedef Evas_Object_Box_Option
10092 * The base structure for a box option. Box options are a way of
10093 * extending box items properties, which will be taken into account
10094 * for layouting decisions. The box layouting functions provided by
10095 * Evas will only rely on objects' canonical size hints to layout
10096 * them, so the basic box option has @b no (custom) property set.
10098 * Users creating their own layouts, but not depending on extra child
10099 * items' properties, would be fine just using
10100 * evas_object_box_layout_set(). But if one desires a layout depending
10101 * on extra child properties, he/she has to @b subclass the box smart
10102 * object. Thus, by using evas_object_box_smart_class_get() and
10103 * evas_object_box_smart_set(), the @c option_new() and @c
10104 * option_free() smart class functions should be properly
10105 * redefined/extended.
10107 * Object properties are bound to an integer identifier and must have
10108 * a name string. Their values are open to any data. See the API on
10109 * option properties for more details.
10111 * @ingroup Evas_Object_Box
10113 typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option;
10116 * @typedef Evas_Object_Box_Layout
10118 * Function signature for an Evas box object layouting routine. By
10119 * @a o it will be passed the box object in question, by @a priv it will
10120 * be passed the box's internal data and, by @a user_data, it will be
10121 * passed any custom data one could have set to a given box layouting
10122 * function, with evas_object_box_layout_set().
10124 * @ingroup Evas_Object_Box
10126 typedef void (*Evas_Object_Box_Layout) (Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data);
10129 * @def EVAS_OBJECT_BOX_API_VERSION
10131 * Current version for Evas box object smart class, a value which goes
10132 * to _Evas_Object_Box_Api::version.
10134 * @ingroup Evas_Object_Box
10136 #define EVAS_OBJECT_BOX_API_VERSION 1
10139 * @struct _Evas_Object_Box_Api
10141 * This structure should be used by any smart class inheriting from
10142 * the box's one, to provide custom box behavior which could not be
10143 * achieved only by providing a layout function, with
10144 * evas_object_box_layout_set().
10146 * @extends Evas_Smart_Class
10147 * @ingroup Evas_Object_Box
10149 struct _Evas_Object_Box_Api
10151 Evas_Smart_Class base; /**< Base smart class struct, need for all smart objects */
10152 int version; /**< Version of this smart class definition */
10153 Evas_Object_Box_Option *(*append) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to append child elements in boxes */
10154 Evas_Object_Box_Option *(*prepend) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to prepend child elements in boxes */
10155 Evas_Object_Box_Option *(*insert_before) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference); /**< Smart function to insert a child element before another in boxes */
10156 Evas_Object_Box_Option *(*insert_after) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference); /**< Smart function to insert a child element after another in boxes */
10157 Evas_Object_Box_Option *(*insert_at) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos); /**< Smart function to insert a child element at a given positon on boxes */
10158 Evas_Object *(*remove) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to remove a child element from boxes */
10159 Evas_Object *(*remove_at) (Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos); /**< Smart function to remove a child element from boxes, by its position */
10160 Eina_Bool (*property_set) (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args); /**< Smart function to set a custom property on a box child */
10161 Eina_Bool (*property_get) (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args); /**< Smart function to retrieve a custom property from a box child */
10162 const char *(*property_name_get)(Evas_Object *o, int property); /**< Smart function to get the name of a custom property of box children */
10163 int (*property_id_get) (Evas_Object *o, const char *name); /**< Smart function to get the numerical ID of a custom property of box children */
10164 Evas_Object_Box_Option *(*option_new) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to create a new box option struct */
10165 void (*option_free) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt); /**< Smart function to delete a box option struct */
10169 * @def EVAS_OBJECT_BOX_API_INIT
10171 * Initializer for a whole #Evas_Object_Box_Api structure, with
10172 * @c NULL values on its specific fields.
10174 * @param smart_class_init initializer to use for the "base" field
10175 * (#Evas_Smart_Class).
10177 * @see EVAS_SMART_CLASS_INIT_NULL
10178 * @see EVAS_SMART_CLASS_INIT_VERSION
10179 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
10180 * @see EVAS_OBJECT_BOX_API_INIT_NULL
10181 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
10182 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
10183 * @ingroup Evas_Object_Box
10185 #define EVAS_OBJECT_BOX_API_INIT(smart_class_init) {smart_class_init, EVAS_OBJECT_BOX_API_VERSION, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
10188 * @def EVAS_OBJECT_BOX_API_INIT_NULL
10190 * Initializer to zero out a whole #Evas_Object_Box_Api structure.
10192 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
10193 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
10194 * @see EVAS_OBJECT_BOX_API_INIT
10195 * @ingroup Evas_Object_Box
10197 #define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
10200 * @def EVAS_OBJECT_BOX_API_INIT_VERSION
10202 * Initializer to zero out a whole #Evas_Object_Box_Api structure and
10203 * set a specific version on it.
10205 * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will set
10206 * the version field of #Evas_Smart_Class (base field) to the latest
10207 * #EVAS_SMART_CLASS_VERSION.
10209 * @see EVAS_OBJECT_BOX_API_INIT_NULL
10210 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
10211 * @see EVAS_OBJECT_BOX_API_INIT
10212 * @ingroup Evas_Object_Box
10214 #define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
10217 * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
10219 * Initializer to zero out a whole #Evas_Object_Box_Api structure and
10220 * set its name and version.
10222 * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will also
10223 * set the version field of #Evas_Smart_Class (base field) to the
10224 * latest #EVAS_SMART_CLASS_VERSION and name it to the specific value.
10226 * It will keep a reference to the name field as a <c>"const char *"</c>,
10227 * i.e., the name must be available while the structure is
10228 * used (hint: static or global variable!) and must not be modified.
10230 * @see EVAS_OBJECT_BOX_API_INIT_NULL
10231 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
10232 * @see EVAS_OBJECT_BOX_API_INIT
10233 * @ingroup Evas_Object_Box
10235 #define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
10238 * @struct _Evas_Object_Box_Data
10240 * This structure augments clipped smart object's instance data,
10241 * providing extra members required by generic box implementation. If
10242 * a subclass inherits from #Evas_Object_Box_Api, then it may augment
10243 * #Evas_Object_Box_Data to fit its own needs.
10245 * @extends Evas_Object_Smart_Clipped_Data
10246 * @ingroup Evas_Object_Box
10248 struct _Evas_Object_Box_Data
10250 Evas_Object_Smart_Clipped_Data base;
10251 const Evas_Object_Box_Api *api;
10258 Eina_List *children;
10260 Evas_Object_Box_Layout cb;
10262 void (*free_data)(void *data);
10264 Eina_Bool layouting : 1;
10265 Eina_Bool children_changed : 1;
10268 struct _Evas_Object_Box_Option
10270 Evas_Object *obj; /**< Pointer to the box child object, itself */
10271 Eina_Bool max_reached:1;
10272 Eina_Bool min_reached:1;
10273 Evas_Coord alloc_size;
10274 }; /**< #Evas_Object_Box_Option struct fields */
10277 * Set the default box @a api struct (Evas_Object_Box_Api)
10278 * with the default values. May be used to extend that API.
10280 * @param api The box API struct to set back, most probably with
10281 * overriden fields (on class extensions scenarios)
10283 EAPI void evas_object_box_smart_set (Evas_Object_Box_Api *api) EINA_ARG_NONNULL(1);
10286 * Get the Evas box smart class, for inheritance purposes.
10288 * @return the (canonical) Evas box smart class.
10290 * The returned value is @b not to be modified, just use it as your
10293 EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get (void) EINA_CONST;
10296 * Set a new layouting function to a given box object
10298 * @param o The box object to operate on.
10299 * @param cb The new layout function to set on @p o.
10300 * @param data Data pointer to be passed to @p cb.
10301 * @param free_data Function to free @p data, if need be.
10303 * A box layout function affects how a box object displays child
10304 * elements within its area. The list of pre-defined box layouts
10305 * available in Evas is:
10306 * - evas_object_box_layout_horizontal()
10307 * - evas_object_box_layout_vertical()
10308 * - evas_object_box_layout_homogeneous_horizontal()
10309 * - evas_object_box_layout_homogeneous_vertical()
10310 * - evas_object_box_layout_homogeneous_max_size_horizontal()
10311 * - evas_object_box_layout_homogeneous_max_size_vertical()
10312 * - evas_object_box_layout_flow_horizontal()
10313 * - evas_object_box_layout_flow_vertical()
10314 * - evas_object_box_layout_stack()
10316 * Refer to each of their documentation texts for details on them.
10318 * @note A box layouting function will be triggered by the @c
10319 * 'calculate' smart callback of the box's smart class.
10321 EAPI void evas_object_box_layout_set (Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data)) EINA_ARG_NONNULL(1, 2);
10324 * Add a new box object on the provided canvas.
10326 * @param evas The canvas to create the box object on.
10327 * @return @c NULL on error, a pointer to a new box object on
10330 * After instantiation, if a box object hasn't its layout function
10331 * set, via evas_object_box_layout_set(), it will have it by default
10332 * set to evas_object_box_layout_horizontal(). The remaining
10333 * properties of the box must be set/retrieved via
10334 * <c>evas_object_box_{h,v}_{align,padding}_{get,set)()</c>.
10336 EAPI Evas_Object *evas_object_box_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
10339 * Add a new box as a @b child of a given smart object.
10341 * @param parent The parent smart object to put the new box in.
10342 * @return @c NULL on error, a pointer to a new box object on
10345 * This is a helper function that has the same effect of putting a new
10346 * box object into @p parent by use of evas_object_smart_member_add().
10348 * @see evas_object_box_add()
10350 EAPI Evas_Object *evas_object_box_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
10353 * Layout function which sets the box @a o to a (basic) horizontal box
10355 * @param o The box object in question
10356 * @param priv The smart data of the @p o
10357 * @param data The data pointer passed on
10358 * evas_object_box_layout_set(), if any
10360 * In this layout, the box object's overall behavior is controlled by
10361 * its padding/alignment properties, which are set by the
10362 * <c>evas_object_box_{h,v}_{align,padding}_set()</c> family of
10363 * functions. The size hints of the elements in the box -- set by the
10364 * <c>evas_object_size_hint_{align,padding,weight}_set()</c> functions
10365 * -- also control the way this function works.
10367 * \par Box's properties:
10368 * @c align_h controls the horizontal alignment of the child objects
10369 * relative to the containing box. When set to @c 0.0, children are
10370 * aligned to the left. A value of @c 1.0 makes them aligned to the
10371 * right border. Values in between align them proportionally. Note
10372 * that if the size required by the children, which is given by their
10373 * widths and the @c padding_h property of the box, is bigger than the
10374 * their container's width, the children will be displayed out of the
10375 * box's bounds. A negative value of @c align_h makes the box to
10376 * @b justify its children. The padding between them, in this case, is
10377 * corrected so that the leftmost one touches the left border and the
10378 * rightmost one touches the right border (even if they must
10379 * overlap). The @c align_v and @c padding_v properties of the box
10380 * @b don't contribute to its behaviour when this layout is chosen.
10382 * \par Child element's properties:
10383 * @c align_x does @b not influence the box's behavior. @c padding_l
10384 * and @c padding_r sum up to the container's horizontal padding
10385 * between elements. The child's @c padding_t, @c padding_b and
10386 * @c align_y properties apply for padding/alignment relative to the
10387 * overall height of the box. Finally, there is the @c weight_x
10388 * property, which, if set to a non-zero value, tells the container
10389 * that the child width is @b not pre-defined. If the container can't
10390 * accommodate all its children, it sets the widths of the ones
10391 * <b>with weights</b> to sizes as small as they can all fit into
10392 * it. If the size required by the children is less than the
10393 * available, the box increases its childrens' (which have weights)
10394 * widths as to fit the remaining space. The @c weight_x property,
10395 * besides telling the element is resizable, gives a @b weight for the
10396 * resizing process. The parent box will try to distribute (or take
10397 * off) widths accordingly to the @b normalized list of weigths: most
10398 * weighted children remain/get larger in this process than the least
10399 * ones. @c weight_y does not influence the layout.
10401 * If one desires that, besides having weights, child elements must be
10402 * resized bounded to a minimum or maximum size, those size hints must
10403 * be set, by the <c>evas_object_size_hint_{min,max}_set()</c>
10406 EAPI void evas_object_box_layout_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10409 * Layout function which sets the box @a o to a (basic) vertical box
10411 * This function behaves analogously to
10412 * evas_object_box_layout_horizontal(). The description of its
10413 * behaviour can be derived from that function's documentation.
10415 EAPI void evas_object_box_layout_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10418 * Layout function which sets the box @a o to a @b homogeneous
10421 * This function behaves analogously to
10422 * evas_object_box_layout_homogeneous_horizontal(). The description
10423 * of its behaviour can be derived from that function's documentation.
10425 EAPI void evas_object_box_layout_homogeneous_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10428 * Layout function which sets the box @a o to a @b homogeneous
10431 * @param o The box object in question
10432 * @param priv The smart data of the @p o
10433 * @param data The data pointer passed on
10434 * evas_object_box_layout_set(), if any
10436 * In a homogeneous horizontal box, its width is divided @b equally
10437 * between the contained objects. The box's overall behavior is
10438 * controlled by its padding/alignment properties, which are set by
10439 * the <c>evas_object_box_{h,v}_{align,padding}_set()</c> family of
10440 * functions. The size hints the elements in the box -- set by the
10441 * <c>evas_object_size_hint_{align,padding,weight}_set()</c> functions
10442 * -- also control the way this function works.
10444 * \par Box's properties:
10445 * @c align_h has no influence on the box for this layout.
10446 * @c padding_h tells the box to draw empty spaces of that size, in
10447 * pixels, between the (equal) child objects's cells. The @c align_v
10448 * and @c padding_v properties of the box don't contribute to its
10449 * behaviour when this layout is chosen.
10451 * \par Child element's properties:
10452 * @c padding_l and @c padding_r sum up to the required width of the
10453 * child element. The @c align_x property tells the relative position
10454 * of this overall child width in its allocated cell (@r 0.0 to
10455 * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to
10456 * @c align_x makes the box try to resize this child element to the exact
10457 * width of its cell (respecting the minimum and maximum size hints on
10458 * the child's width and accounting for its horizontal padding
10459 * hints). The child's @c padding_t, @c padding_b and @c align_y
10460 * properties apply for padding/alignment relative to the overall
10461 * height of the box. A value of @c -1.0 to @c align_y makes the box
10462 * try to resize this child element to the exact height of its parent
10463 * (respecting the maximum size hint on the child's height).
10465 EAPI void evas_object_box_layout_homogeneous_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10468 * Layout function which sets the box @a o to a <b>maximum size,
10469 * homogeneous</b> horizontal box
10471 * @param o The box object in question
10472 * @param priv The smart data of the @p o
10473 * @param data The data pointer passed on
10474 * evas_object_box_layout_set(), if any
10476 * In a maximum size, homogeneous horizontal box, besides having cells
10477 * of <b>equal size</b> reserved for the child objects, this size will
10478 * be defined by the size of the @b largest child in the box (in
10479 * width). The box's overall behavior is controlled by its properties,
10480 * which are set by the
10481 * <c>evas_object_box_{h,v}_{align,padding}_set()</c> family of
10482 * functions. The size hints of the elements in the box -- set by the
10483 * <c>evas_object_size_hint_{align,padding,weight}_set()</c> functions
10484 * -- also control the way this function works.
10486 * \par Box's properties:
10487 * @c padding_h tells the box to draw empty spaces of that size, in
10488 * pixels, between the child objects's cells. @c align_h controls the
10489 * horizontal alignment of the child objects, relative to the
10490 * containing box. When set to @c 0.0, children are aligned to the
10491 * left. A value of @c 1.0 lets them aligned to the right
10492 * border. Values in between align them proportionally. A negative
10493 * value of @c align_h makes the box to @b justify its children
10494 * cells. The padding between them, in this case, is corrected so that
10495 * the leftmost one touches the left border and the rightmost one
10496 * touches the right border (even if they must overlap). The
10497 * @c align_v and @c padding_v properties of the box don't contribute to
10498 * its behaviour when this layout is chosen.
10500 * \par Child element's properties:
10501 * @c padding_l and @c padding_r sum up to the required width of the
10502 * child element. The @c align_x property tells the relative position
10503 * of this overall child width in its allocated cell (@c 0.0 to
10504 * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to
10505 * @c align_x makes the box try to resize this child element to the exact
10506 * width of its cell (respecting the minimun and maximum size hints on
10507 * the child's width and accounting for its horizontal padding
10508 * hints). The child's @c padding_t, @c padding_b and @c align_y
10509 * properties apply for padding/alignment relative to the overall
10510 * height of the box. A value of @c -1.0 to @c align_y makes the box
10511 * try to resize this child element to the exact height of its parent
10512 * (respecting the max hint on the child's height).
10514 EAPI void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10517 * Layout function which sets the box @a o to a <b>maximum size,
10518 * homogeneous</b> vertical box
10520 * This function behaves analogously to
10521 * evas_object_box_layout_homogeneous_max_size_horizontal(). The
10522 * description of its behaviour can be derived from that function's
10525 EAPI void evas_object_box_layout_homogeneous_max_size_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10528 * Layout function which sets the box @a o to a @b flow horizontal
10531 * @param o The box object in question
10532 * @param priv The smart data of the @p o
10533 * @param data The data pointer passed on
10534 * evas_object_box_layout_set(), if any
10536 * In a flow horizontal box, the box's child elements are placed in
10537 * @b rows (think of text as an analogy). A row has as much elements as
10538 * can fit into the box's width. The box's overall behavior is
10539 * controlled by its properties, which are set by the
10540 * <c>evas_object_box_{h,v}_{align,padding}_set()</c> family of
10541 * functions. The size hints of the elements in the box -- set by the
10542 * <c>evas_object_size_hint_{align,padding,weight}_set()</c> functions
10543 * -- also control the way this function works.
10545 * \par Box's properties:
10546 * @c padding_h tells the box to draw empty spaces of that size, in
10547 * pixels, between the child objects's cells. @c align_h dictates the
10548 * horizontal alignment of the rows (@c 0.0 to left align them, @c 1.0
10549 * to right align). A value of @c -1.0 to @c align_h lets the rows
10550 * @b justified horizontally. @c align_v controls the vertical alignment
10551 * of the entire set of rows (@c 0.0 to top, @c 1.0 to bottom). A
10552 * value of @c -1.0 to @c align_v makes the box to @b justify the rows
10553 * vertically. The padding between them, in this case, is corrected so
10554 * that the first row touches the top border and the last one touches
10555 * the bottom border (even if they must overlap). @c padding_v has no
10556 * influence on the layout.
10558 * \par Child element's properties:
10559 * @c padding_l and @c padding_r sum up to the required width of the
10560 * child element. The @c align_x property has no influence on the
10561 * layout. The child's @c padding_t and @c padding_b sum up to the
10562 * required height of the child element and is the only means (besides
10563 * row justifying) of setting space between rows. Note, however, that
10564 * @c align_y dictates positioning relative to the <b>largest
10565 * height</b> required by a child object in the actual row.
10567 EAPI void evas_object_box_layout_flow_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10570 * Layout function which sets the box @a o to a @b flow vertical box.
10572 * This function behaves analogously to
10573 * evas_object_box_layout_flow_horizontal(). The description of its
10574 * behaviour can be derived from that function's documentation.
10576 EAPI void evas_object_box_layout_flow_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10579 * Layout function which sets the box @a o to a @b stacking box
10581 * @param o The box object in question
10582 * @param priv The smart data of the @p o
10583 * @param data The data pointer passed on
10584 * evas_object_box_layout_set(), if any
10586 * In a stacking box, all children will be given the same size -- the
10587 * box's own size -- and they will be stacked one above the other, so
10588 * that the first object in @p o's internal list of child elements
10589 * will be the bottommost in the stack.
10591 * \par Box's properties:
10592 * No box properties are used.
10594 * \par Child element's properties:
10595 * @c padding_l and @c padding_r sum up to the required width of the
10596 * child element. The @c align_x property tells the relative position
10597 * of this overall child width in its allocated cell (@c 0.0 to
10598 * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to @c
10599 * align_x makes the box try to resize this child element to the exact
10600 * width of its cell (respecting the min and max hints on the child's
10601 * width and accounting for its horizontal padding properties). The
10602 * same applies to the vertical axis.
10604 EAPI void evas_object_box_layout_stack (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10607 * Set the alignment of the whole bounding box of contents, for a
10608 * given box object.
10610 * @param o The given box object to set alignment from
10611 * @param horizontal The horizontal alignment, in pixels
10612 * @param vertical the vertical alignment, in pixels
10614 * This will influence how a box object is to align its bounding box
10615 * of contents within its own area. The values @b must be in the range
10616 * @c 0.0 - @c 1.0, or undefined behavior is expected. For horizontal
10617 * alignment, @c 0.0 means to the left, with @c 1.0 meaning to the
10618 * right. For vertical alignment, @c 0.0 means to the top, with @c 1.0
10619 * meaning to the bottom.
10621 * @note The default values for both alignments is @c 0.5.
10623 * @see evas_object_box_align_get()
10625 EAPI void evas_object_box_align_set (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
10628 * Get the alignment of the whole bounding box of contents, for a
10629 * given box object.
10631 * @param o The given box object to get alignment from
10632 * @param horizontal Pointer to a variable where to store the
10633 * horizontal alignment
10634 * @param vertical Pointer to a variable where to store the vertical
10637 * @see evas_object_box_align_set() for more information
10639 EAPI void evas_object_box_align_get (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
10642 * Set the (space) padding between cells set for a given box object.
10644 * @param o The given box object to set padding from
10645 * @param horizontal The horizontal padding, in pixels
10646 * @param vertical the vertical padding, in pixels
10648 * @note The default values for both padding components is @c 0.
10650 * @see evas_object_box_padding_get()
10652 EAPI void evas_object_box_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
10655 * Get the (space) padding between cells set for a given box object.
10657 * @param o The given box object to get padding from
10658 * @param horizontal Pointer to a variable where to store the
10659 * horizontal padding
10660 * @param vertical Pointer to a variable where to store the vertical
10663 * @see evas_object_box_padding_set()
10665 EAPI void evas_object_box_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
10668 * Append a new @a child object to the given box object @a o.
10670 * @param o The given box object
10671 * @param child A child Evas object to be made a member of @p o
10672 * @return A box option bound to the recently added box item or @c
10675 * On success, the @c "child,added" smart event will take place.
10677 * @note The actual placing of the item relative to @p o's area will
10678 * depend on the layout set to it. For example, on horizontal layouts
10679 * an item in the end of the box's list of children will appear on its
10682 * @note This call will trigger the box's _Evas_Object_Box_Api::append
10685 EAPI Evas_Object_Box_Option *evas_object_box_append (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
10688 * Prepend a new @a child object to the given box object @a o.
10690 * @param o The given box object
10691 * @param child A child Evas object to be made a member of @p o
10692 * @return A box option bound to the recently added box item or @c
10695 * On success, the @c "child,added" smart event will take place.
10697 * @note The actual placing of the item relative to @p o's area will
10698 * depend on the layout set to it. For example, on horizontal layouts
10699 * an item in the beginning of the box's list of children will appear
10702 * @note This call will trigger the box's
10703 * _Evas_Object_Box_Api::prepend smart function.
10705 EAPI Evas_Object_Box_Option *evas_object_box_prepend (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
10708 * Insert a new @a child object <b>before another existing one</b>, in
10709 * a given box object @a o.
10711 * @param o The given box object
10712 * @param child A child Evas object to be made a member of @p o
10713 * @param reference The child object to place this new one before
10714 * @return A box option bound to the recently added box item or @c
10717 * On success, the @c "child,added" smart event will take place.
10719 * @note This function will fail if @p reference is not a member of @p
10722 * @note The actual placing of the item relative to @p o's area will
10723 * depend on the layout set to it.
10725 * @note This call will trigger the box's
10726 * _Evas_Object_Box_Api::insert_before smart function.
10728 EAPI Evas_Object_Box_Option *evas_object_box_insert_before (Evas_Object *o, Evas_Object *child, const Evas_Object *reference) EINA_ARG_NONNULL(1, 2, 3);
10731 * Insert a new @a child object <b>after another existing one</b>, in
10732 * a given box object @a o.
10734 * @param o The given box object
10735 * @param child A child Evas object to be made a member of @p o
10736 * @param reference The child object to place this new one after
10737 * @return A box option bound to the recently added box item or @c
10740 * On success, the @c "child,added" smart event will take place.
10742 * @note This function will fail if @p reference is not a member of @p
10745 * @note The actual placing of the item relative to @p o's area will
10746 * depend on the layout set to it.
10748 * @note This call will trigger the box's
10749 * _Evas_Object_Box_Api::insert_after smart function.
10751 EAPI Evas_Object_Box_Option *evas_object_box_insert_after (Evas_Object *o, Evas_Object *child, const Evas_Object *referente) EINA_ARG_NONNULL(1, 2, 3);
10754 * Insert a new @a child object <b>at a given position</b>, in a given
10757 * @param o The given box object
10758 * @param child A child Evas object to be made a member of @p o
10759 * @param pos The numeric position (starting from @c 0) to place the
10760 * new child object at
10761 * @return A box option bound to the recently added box item or @c
10764 * On success, the @c "child,added" smart event will take place.
10766 * @note This function will fail if the given position is invalid,
10767 * given @p o's internal list of elements.
10769 * @note The actual placing of the item relative to @p o's area will
10770 * depend on the layout set to it.
10772 * @note This call will trigger the box's
10773 * _Evas_Object_Box_Api::insert_at smart function.
10775 EAPI Evas_Object_Box_Option *evas_object_box_insert_at (Evas_Object *o, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1, 2);
10778 * Remove a given object from a box object, unparenting it again.
10780 * @param o The box object to remove a child object from
10781 * @param child The handle to the child object to be removed
10782 * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
10784 * On removal, you'll get an unparented object again, just as it was
10785 * before you inserted it in the box. The
10786 * _Evas_Object_Box_Api::option_free box smart callback will be called
10787 * automatilly for you and, also, the @c "child,removed" smart event
10790 * @note This call will trigger the box's _Evas_Object_Box_Api::remove
10793 EAPI Eina_Bool evas_object_box_remove (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
10796 * Remove an object, <b>bound to a given position</b> in a box object,
10797 * unparenting it again.
10799 * @param o The box object to remove a child object from
10800 * @param in The numeric position (starting from @c 0) of the child
10801 * object to be removed
10802 * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
10804 * On removal, you'll get an unparented object again, just as it was
10805 * before you inserted it in the box. The @c option_free() box smart
10806 * callback will be called automatilly for you and, also, the
10807 * @c "child,removed" smart event will take place.
10809 * @note This function will fail if the given position is invalid,
10810 * given @p o's internal list of elements.
10812 * @note This call will trigger the box's
10813 * _Evas_Object_Box_Api::remove_at smart function.
10815 EAPI Eina_Bool evas_object_box_remove_at (Evas_Object *o, unsigned int pos) EINA_ARG_NONNULL(1);
10818 * Remove @b all child objects from a box object, unparenting them
10821 * @param o The box object to remove a child object from
10822 * @param child The handle to the child object to be removed
10823 * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
10825 * This has the same effect of calling evas_object_box_remove() on
10826 * each of @p o's child objects, in sequence. If, and only if, all
10827 * those calls succeed, so does this one.
10829 EAPI Eina_Bool evas_object_box_remove_all (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
10832 * Get an iterator to walk the list of children of a given box object.
10834 * @param o The box to retrieve an items iterator from
10835 * @return An iterator on @p o's child objects, on success, or @c NULL,
10838 * @note Do @b not remove or delete objects while walking the list.
10840 EAPI Eina_Iterator *evas_object_box_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
10843 * Get an accessor (a structure providing random items access) to the
10844 * list of children of a given box object.
10846 * @param o The box to retrieve an items iterator from
10847 * @return An accessor on @p o's child objects, on success, or @c NULL,
10850 * @note Do not remove or delete objects while walking the list.
10852 EAPI Eina_Accessor *evas_object_box_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
10855 * Get the list of children objects in a given box object.
10857 * @param o The box to retrieve an items list from
10858 * @return A list of @p o's child objects, on success, or @c NULL,
10859 * on errors (or if it has no child objects)
10861 * The returned list should be freed with @c eina_list_free() when you
10862 * no longer need it.
10864 * @note This is a duplicate of the list kept by the box internally.
10865 * It's up to the user to destroy it when it no longer needs it.
10866 * It's possible to remove objects from the box when walking
10867 * this list, but these removals won't be reflected on it.
10869 EAPI Eina_List *evas_object_box_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
10872 * Get the name of the property of the child elements of the box @a o
10873 * which have @a id as identifier
10875 * @param o The box to search child options from
10876 * @param id The numerical identifier of the option being searched, for
10878 * @return The name of the given property or @c NULL, on errors.
10880 * @note This call won't do anything for a canonical Evas box. Only
10881 * users which have @b subclassed it, setting custom box items options
10882 * (see #Evas_Object_Box_Option) on it, would benefit from this
10883 * function. They'd have to implement it and set it to be the
10884 * _Evas_Object_Box_Api::property_name_get smart class function of the
10885 * box, which is originally set to @c NULL.
10887 EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
10890 * Get the numerical identifier of the property of the child elements
10891 * of the box @a o which have @a name as name string
10893 * @param o The box to search child options from
10894 * @param name The name string of the option being searched, for
10896 * @return The numerical ID of the given property or @c -1, on
10899 * @note This call won't do anything for a canonical Evas box. Only
10900 * users which have @b subclassed it, setting custom box items options
10901 * (see #Evas_Object_Box_Option) on it, would benefit from this
10902 * function. They'd have to implement it and set it to be the
10903 * _Evas_Object_Box_Api::property_id_get smart class function of the
10904 * box, which is originally set to @c NULL.
10906 EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
10909 * Set a property value (by its given numerical identifier), on a
10910 * given box child element
10912 * @param o The box parenting the child element
10913 * @param opt The box option structure bound to the child box element
10914 * to set a property on
10915 * @param id The numerical ID of the given property
10916 * @param ... (List of) actual value(s) to be set for this
10917 * property. It (they) @b must be of the same type the user has
10918 * defined for it (them).
10919 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
10921 * @note This call won't do anything for a canonical Evas box. Only
10922 * users which have @b subclassed it, setting custom box items options
10923 * (see #Evas_Object_Box_Option) on it, would benefit from this
10924 * function. They'd have to implement it and set it to be the
10925 * _Evas_Object_Box_Api::property_set smart class function of the box,
10926 * which is originally set to @c NULL.
10928 * @note This function will internally create a variable argument
10929 * list, with the values passed after @p property, and call
10930 * evas_object_box_option_property_vset() with this list and the same
10931 * previous arguments.
10933 EAPI Eina_Bool evas_object_box_option_property_set (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
10936 * Set a property value (by its given numerical identifier), on a
10937 * given box child element -- by a variable argument list
10939 * @param o The box parenting the child element
10940 * @param opt The box option structure bound to the child box element
10941 * to set a property on
10942 * @param id The numerical ID of the given property
10943 * @param va_list The variable argument list implementing the value to
10944 * be set for this property. It @b must be of the same type the user has
10946 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
10948 * This is a variable argument list variant of the
10949 * evas_object_box_option_property_set(). See its documentation for
10952 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);
10955 * Get a property's value (by its given numerical identifier), on a
10956 * given box child element
10958 * @param o The box parenting the child element
10959 * @param opt The box option structure bound to the child box element
10960 * to get a property from
10961 * @param id The numerical ID of the given property
10962 * @param ... (List of) pointer(s) where to store the value(s) set for
10963 * this property. It (they) @b must point to variable(s) of the same
10964 * type the user has defined for it (them).
10965 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
10967 * @note This call won't do anything for a canonical Evas box. Only
10968 * users which have @b subclassed it, getting custom box items options
10969 * (see #Evas_Object_Box_Option) on it, would benefit from this
10970 * function. They'd have to implement it and get it to be the
10971 * _Evas_Object_Box_Api::property_get smart class function of the
10972 * box, which is originally get to @c NULL.
10974 * @note This function will internally create a variable argument
10975 * list, with the values passed after @p property, and call
10976 * evas_object_box_option_property_vget() with this list and the same
10977 * previous arguments.
10979 EAPI Eina_Bool evas_object_box_option_property_get (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
10982 * Get a property's value (by its given numerical identifier), on a
10983 * given box child element -- by a variable argument list
10985 * @param o The box parenting the child element
10986 * @param opt The box option structure bound to the child box element
10987 * to get a property from
10988 * @param id The numerical ID of the given property
10989 * @param va_list The variable argument list with pointers to where to
10990 * store the values of this property. They @b must point to variables
10991 * of the same type the user has defined for them.
10992 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
10994 * This is a variable argument list variant of the
10995 * evas_object_box_option_property_get(). See its documentation for
10998 EAPI Eina_Bool evas_object_box_option_property_vget (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args) EINA_ARG_NONNULL(1, 2);
11005 * @defgroup Evas_Object_Table Table Smart Object.
11007 * Convenience smart object that packs children using a tabular
11008 * layout using children size hints to define their size and
11009 * alignment inside their cell space.
11011 * @ref tutorial_table shows how to use this Evas_Object.
11013 * @see @ref Evas_Object_Group_Size_Hints
11015 * @ingroup Evas_Smart_Object_Group
11021 * @brief Create a new table.
11023 * @param evas Canvas in which table will be added.
11025 EAPI Evas_Object *evas_object_table_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11028 * @brief Create a table that is child of a given element @a parent.
11030 * @see evas_object_table_add()
11032 EAPI Evas_Object *evas_object_table_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11035 * @brief Set how this table should layout children.
11037 * @todo consider aspect hint and respect it.
11039 * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE
11040 * If table does not use homogeneous mode then columns and rows will
11041 * be calculated based on hints of individual cells. This operation
11042 * mode is more flexible, but more complex and heavy to calculate as
11043 * well. @b Weight properties are handled as a boolean expand. Negative
11044 * alignment will be considered as 0.5. This is the default.
11046 * @todo @c EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.
11048 * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE
11049 * When homogeneous is relative to table the own table size is divided
11050 * equally among children, filling the whole table area. That is, if
11051 * table has @c WIDTH and @c COLUMNS, each cell will get <tt>WIDTH /
11052 * COLUMNS</tt> pixels. If children have minimum size that is larger
11053 * than this amount (including padding), then it will overflow and be
11054 * aligned respecting the alignment hint, possible overlapping sibling
11055 * cells. @b Weight hint is used as a boolean, if greater than zero it
11056 * will make the child expand in that axis, taking as much space as
11057 * possible (bounded to maximum size hint). Negative alignment will be
11058 * considered as 0.5.
11060 * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM
11061 * When homogeneous is relative to item it means the greatest minimum
11062 * cell size will be used. That is, if no element is set to expand,
11063 * the table will have its contents to a minimum size, the bounding
11064 * box of all these children will be aligned relatively to the table
11065 * object using evas_object_table_align_get(). If the table area is
11066 * too small to hold this minimum bounding box, then the objects will
11067 * keep their size and the bounding box will overflow the box area,
11068 * still respecting the alignment. @b Weight hint is used as a
11069 * boolean, if greater than zero it will make that cell expand in that
11070 * axis, toggling the <b>expand mode</b>, which makes the table behave
11071 * much like @b EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the
11072 * bounding box will overflow and items will not overlap siblings. If
11073 * no minimum size is provided at all then the table will fallback to
11074 * expand mode as well.
11076 EAPI void evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1);
11079 * Get the current layout homogeneous mode.
11081 * @see evas_object_table_homogeneous_set()
11083 EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
11086 * Set padding between cells.
11088 EAPI void evas_object_table_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
11091 * Get padding between cells.
11093 EAPI void evas_object_table_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
11096 * Set the alignment of the whole bounding box of contents.
11098 EAPI void evas_object_table_align_set (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
11101 * Get alignment of the whole bounding box of contents.
11103 EAPI void evas_object_table_align_get (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
11106 * Sets the mirrored mode of the table. In mirrored mode the table items go
11107 * from right to left instead of left to right. That is, 1,1 is top right, not
11110 * @param obj The table object.
11111 * @param mirrored the mirrored mode to set
11114 EAPI void evas_object_table_mirrored_set (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
11117 * Gets the mirrored mode of the table.
11119 * @param obj The table object.
11120 * @return EINA_TRUE if it's a mirrored table, EINA_FALSE otherwise.
11122 * @see evas_object_table_mirrored_set()
11124 EAPI Eina_Bool evas_object_table_mirrored_get (const Evas_Object *o) EINA_ARG_NONNULL(1);
11127 * Get packing location of a child of table
11129 * @param o The given table object.
11130 * @param child The child object to add.
11131 * @param col pointer to store relative-horizontal position to place child.
11132 * @param row pointer to store relative-vertical position to place child.
11133 * @param colspan pointer to store how many relative-horizontal position to use for this child.
11134 * @param rowspan pointer to store how many relative-vertical position to use for this child.
11136 * @return 1 on success, 0 on failure.
11139 EAPI Eina_Bool evas_object_table_pack_get(Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan);
11142 * Add a new child to a table object or set its current packing.
11144 * @param o The given table object.
11145 * @param child The child object to add.
11146 * @param col relative-horizontal position to place child.
11147 * @param row relative-vertical position to place child.
11148 * @param colspan how many relative-horizontal position to use for this child.
11149 * @param rowspan how many relative-vertical position to use for this child.
11151 * @return 1 on success, 0 on failure.
11153 EAPI Eina_Bool evas_object_table_pack (Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) EINA_ARG_NONNULL(1, 2);
11156 * Remove child from table.
11158 * @note removing a child will immediately call a walk over children in order
11159 * to recalculate numbers of columns and rows. If you plan to remove
11160 * all children, use evas_object_table_clear() instead.
11162 * @return 1 on success, 0 on failure.
11164 EAPI Eina_Bool evas_object_table_unpack (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
11167 * Faster way to remove all child objects from a table object.
11169 * @param o The given table object.
11170 * @param clear if true, it will delete just removed children.
11172 EAPI void evas_object_table_clear (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
11175 * Get the number of columns and rows this table takes.
11177 * @note columns and rows are virtual entities, one can specify a table
11178 * with a single object that takes 4 columns and 5 rows. The only
11179 * difference for a single cell table is that paddings will be
11180 * accounted proportionally.
11182 EAPI void evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) EINA_ARG_NONNULL(1);
11185 * Get an iterator to walk the list of children for the table.
11187 * @note Do not remove or delete objects while walking the list.
11189 EAPI Eina_Iterator *evas_object_table_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11192 * Get an accessor to get random access to the list of children for the table.
11194 * @note Do not remove or delete objects while walking the list.
11196 EAPI Eina_Accessor *evas_object_table_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11199 * Get the list of children for the table.
11201 * @note This is a duplicate of the list kept by the table internally.
11202 * It's up to the user to destroy it when it no longer needs it.
11203 * It's possible to remove objects from the table when walking this
11204 * list, but these removals won't be reflected on it.
11206 EAPI Eina_List *evas_object_table_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11209 * Get the child of the table at the given coordinates
11211 * @note This does not take into account col/row spanning
11213 EAPI Evas_Object *evas_object_table_child_get (const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1);
11219 * @defgroup Evas_Object_Grid Grid Smart Object.
11221 * Convenience smart object that packs children under a regular grid
11222 * layout, using their virtual grid location and size to determine
11223 * children's positions inside the grid object's area.
11225 * @ingroup Evas_Smart_Object_Group
11230 * @addtogroup Evas_Object_Grid
11235 * Create a new grid.
11237 * It's set to a virtual size of 1x1 by default and add children with
11238 * evas_object_grid_pack().
11241 EAPI Evas_Object *evas_object_grid_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11244 * Create a grid that is child of a given element @a parent.
11246 * @see evas_object_grid_add()
11249 EAPI Evas_Object *evas_object_grid_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11252 * Set the virtual resolution for the grid
11254 * @param o The grid object to modify
11255 * @param w The virtual horizontal size (resolution) in integer units
11256 * @param h The virtual vertical size (resolution) in integer units
11259 EAPI void evas_object_grid_size_set (Evas_Object *o, int w, int h) EINA_ARG_NONNULL(1);
11262 * Get the current virtual resolution
11264 * @param o The grid object to query
11265 * @param w A pointer to an integer to store the virtual width
11266 * @param h A pointer to an integer to store the virtual height
11267 * @see evas_object_grid_size_set()
11270 EAPI void evas_object_grid_size_get (const Evas_Object *o, int *w, int *h) EINA_ARG_NONNULL(1) EINA_PURE;
11273 * Sets the mirrored mode of the grid. In mirrored mode the grid items go
11274 * from right to left instead of left to right. That is, 0,0 is top right, not
11277 * @param obj The grid object.
11278 * @param mirrored the mirrored mode to set
11281 EAPI void evas_object_grid_mirrored_set (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
11284 * Gets the mirrored mode of the grid.
11286 * @param obj The grid object.
11287 * @return EINA_TRUE if it's a mirrored grid, EINA_FALSE otherwise.
11288 * @see evas_object_grid_mirrored_set()
11291 EAPI Eina_Bool evas_object_grid_mirrored_get (const Evas_Object *o) EINA_ARG_NONNULL(1);
11294 * Add a new child to a grid object.
11296 * @param o The given grid object.
11297 * @param child The child object to add.
11298 * @param x The virtual x coordinate of the child
11299 * @param y The virtual y coordinate of the child
11300 * @param w The virtual width of the child
11301 * @param h The virtual height of the child
11302 * @return 1 on success, 0 on failure.
11305 EAPI Eina_Bool evas_object_grid_pack (Evas_Object *o, Evas_Object *child, int x, int y, int w, int h) EINA_ARG_NONNULL(1, 2);
11308 * Remove child from grid.
11310 * @note removing a child will immediately call a walk over children in order
11311 * to recalculate numbers of columns and rows. If you plan to remove
11312 * all children, use evas_object_grid_clear() instead.
11314 * @return 1 on success, 0 on failure.
11317 EAPI Eina_Bool evas_object_grid_unpack (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
11320 * Faster way to remove all child objects from a grid object.
11322 * @param o The given grid object.
11323 * @param clear if true, it will delete just removed children.
11326 EAPI void evas_object_grid_clear (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
11329 * Get the pack options for a grid child
11331 * Get the pack x, y, width and height in virtual coordinates set by
11332 * evas_object_grid_pack()
11333 * @param o The grid object
11334 * @param child The grid child to query for coordinates
11335 * @param x The pointer to where the x coordinate will be returned
11336 * @param y The pointer to where the y coordinate will be returned
11337 * @param w The pointer to where the width will be returned
11338 * @param h The pointer to where the height will be returned
11339 * @return 1 on success, 0 on failure.
11342 EAPI Eina_Bool evas_object_grid_pack_get (Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h);
11345 * Get an iterator to walk the list of children for the grid.
11347 * @note Do not remove or delete objects while walking the list.
11350 EAPI Eina_Iterator *evas_object_grid_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11353 * Get an accessor to get random access to the list of children for the grid.
11355 * @note Do not remove or delete objects while walking the list.
11358 EAPI Eina_Accessor *evas_object_grid_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11361 * Get the list of children for the grid.
11363 * @note This is a duplicate of the list kept by the grid internally.
11364 * It's up to the user to destroy it when it no longer needs it.
11365 * It's possible to remove objects from the grid when walking this
11366 * list, but these removals won't be reflected on it.
11369 EAPI Eina_List *evas_object_grid_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11376 * @defgroup Evas_Cserve Shared Image Cache Server
11378 * Evas has an (optional) module which provides client-server
11379 * infrastructure to <b>share bitmaps across multiple processes</b>,
11380 * saving data and processing power.
11382 * Be warned that it @b doesn't work when <b>threaded image
11383 * preloading</b> is enabled for Evas, though.
11385 typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats;
11386 typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache;
11387 typedef struct _Evas_Cserve_Image Evas_Cserve_Image;
11388 typedef struct _Evas_Cserve_Config Evas_Cserve_Config;
11391 * Statistics about the server that shares cached bitmaps.
11392 * @ingroup Evas_Cserve
11394 struct _Evas_Cserve_Stats
11396 int saved_memory; /**< current amount of saved memory, in bytes */
11397 int wasted_memory; /**< current amount of wasted memory, in bytes */
11398 int saved_memory_peak; /**< peak ammount of saved memory, in bytes */
11399 int wasted_memory_peak; /**< peak ammount of wasted memory, in bytes */
11400 double saved_time_image_header_load; /**< time, in seconds, saved in header loads by sharing cached loads instead */
11401 double saved_time_image_data_load; /**< time, in seconds, saved in data loads by sharing cached loads instead */
11405 * A handle of a cache of images shared by a server.
11406 * @ingroup Evas_Cserve
11408 struct _Evas_Cserve_Image_Cache
11418 * A handle to an image shared by a server.
11419 * @ingroup Evas_Cserve
11421 struct _Evas_Cserve_Image
11423 const char *file, *key;
11425 time_t file_mod_time;
11426 time_t file_checked_time;
11427 time_t cached_time;
11430 int memory_footprint;
11431 double head_load_time;
11432 double data_load_time;
11433 Eina_Bool alpha : 1;
11434 Eina_Bool data_loaded : 1;
11435 Eina_Bool active : 1;
11436 Eina_Bool dead : 1;
11437 Eina_Bool useless : 1;
11441 * Configuration that controls the server that shares cached bitmaps.
11442 * @ingroup Evas_Cserve
11444 struct _Evas_Cserve_Config
11446 int cache_max_usage;
11447 int cache_item_timeout;
11448 int cache_item_timeout_check;
11453 * Retrieves if the system wants to share bitmaps using the server.
11454 * @return @c EINA_TRUE if it wants, @c EINA_FALSE otherwise.
11455 * @ingroup Evas_Cserve
11457 EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
11460 * Retrieves if the system is connected to the server used to share
11463 * @return @c EINA_TRUE if it's connected, @c EINA_FALSE otherwise.
11464 * @ingroup Evas_Cserve
11466 EAPI Eina_Bool evas_cserve_connected_get (void) EINA_WARN_UNUSED_RESULT;
11469 * Retrieves statistics from a running bitmap sharing server.
11470 * @param stats pointer to structure to fill with statistics about the
11471 * bitmap cache server.
11473 * @return @c EINA_TRUE if @p stats were filled with data,
11474 * @c EINA_FALSE otherwise (when @p stats is untouched)
11475 * @ingroup Evas_Cserve
11477 EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT;
11480 * Completely discard/clean a given images cache, thus re-setting it.
11482 * @param cache A handle to the given images cache.
11484 EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE;
11487 * Retrieves the current configuration of the Evas image caching
11490 * @param config where to store current image caching server's
11493 * @return @c EINA_TRUE if @p config was filled with data,
11494 * @c EINA_FALSE otherwise (when @p config is untouched)
11496 * The fields of @p config will be altered to reflect the current
11497 * configuration's values.
11499 * @see evas_cserve_config_set()
11501 * @ingroup Evas_Cserve
11503 EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
11506 * Changes the configurations of the Evas image caching server.
11508 * @param config A bitmap cache configuration handle with fields set
11509 * to desired configuration values.
11510 * @return @c EINA_TRUE if @p config was successfully applied,
11511 * @c EINA_FALSE otherwise.
11513 * @see evas_cserve_config_get()
11515 * @ingroup Evas_Cserve
11517 EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
11520 * Force the system to disconnect from the bitmap caching server.
11522 * @ingroup Evas_Cserve
11524 EAPI void evas_cserve_disconnect (void);
11527 * @defgroup Evas_Utils General Utilities
11529 * Some functions that are handy but are not specific of canvas or
11534 * Converts the given Evas image load error code into a string
11535 * describing it in english.
11537 * @param error the error code, a value in ::Evas_Load_Error.
11538 * @return Always returns a valid string. If the given @p error is not
11539 * supported, <code>"Unknown error"</code> is returned.
11541 * Mostly evas_object_image_file_set() would be the function setting
11542 * that error value afterwards, but also evas_object_image_load(),
11543 * evas_object_image_save(), evas_object_image_data_get(),
11544 * evas_object_image_data_convert(), evas_object_image_pixels_import()
11545 * and evas_object_image_is_inside(). This function is meant to be
11546 * used in conjunction with evas_object_image_load_error_get(), as in:
11549 * @dontinclude evas-load-error-str.c
11551 * @until ecore_main_loop_begin(
11553 * Here, being @c valid_path the path to a valid image and @c
11554 * bogus_path a path to a file which does not exist, the two outputs
11555 * of evas_load_error_str() would be (if no other errors occur):
11556 * <code>"No error on load"</code> and <code>"File (or file path) does
11557 * not exist"</code>, respectively. See the full @ref
11558 * Example_Evas_Images "example".
11560 * @ingroup Evas_Utils
11562 EAPI const char *evas_load_error_str (Evas_Load_Error error);
11564 /* Evas utility routines for color space conversions */
11565 /* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */
11566 /* rgb color space has r,g,b in the range 0 to 255 */
11569 * Convert a given color from HSV to RGB format.
11571 * @param h The Hue component of the color.
11572 * @param s The Saturation component of the color.
11573 * @param v The Value component of the color.
11574 * @param r The Red component of the color.
11575 * @param g The Green component of the color.
11576 * @param b The Blue component of the color.
11578 * This function converts a given color in HSV color format to RGB
11581 * @ingroup Evas_Utils
11583 EAPI void evas_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b);
11586 * Convert a given color from RGB to HSV format.
11588 * @param r The Red component of the color.
11589 * @param g The Green component of the color.
11590 * @param b The Blue component of the color.
11591 * @param h The Hue component of the color.
11592 * @param s The Saturation component of the color.
11593 * @param v The Value component of the color.
11595 * This function converts a given color in RGB color format to HSV
11598 * @ingroup Evas_Utils
11600 EAPI void evas_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v);
11602 /* argb color space has a,r,g,b in the range 0 to 255 */
11605 * Pre-multiplies a rgb triplet by an alpha factor.
11607 * @param a The alpha factor.
11608 * @param r The Red component of the color.
11609 * @param g The Green component of the color.
11610 * @param b The Blue component of the color.
11612 * This function pre-multiplies a given rbg triplet by an alpha
11613 * factor. Alpha factor is used to define transparency.
11615 * @ingroup Evas_Utils
11617 EAPI void evas_color_argb_premul (int a, int *r, int *g, int *b);
11620 * Undo pre-multiplication of a rgb triplet by an alpha factor.
11622 * @param a The alpha factor.
11623 * @param r The Red component of the color.
11624 * @param g The Green component of the color.
11625 * @param b The Blue component of the color.
11627 * This function undoes pre-multiplication a given rbg triplet by an
11628 * alpha factor. Alpha factor is used to define transparency.
11630 * @see evas_color_argb_premul().
11632 * @ingroup Evas_Utils
11634 EAPI void evas_color_argb_unpremul (int a, int *r, int *g, int *b);
11638 * Pre-multiplies data by an alpha factor.
11640 * @param data The data value.
11641 * @param len The length value.
11643 * This function pre-multiplies a given data by an alpha
11644 * factor. Alpha factor is used to define transparency.
11646 * @ingroup Evas_Utils
11648 EAPI void evas_data_argb_premul (unsigned int *data, unsigned int len);
11651 * Undo pre-multiplication data by an alpha factor.
11653 * @param data The data value.
11654 * @param len The length value.
11656 * This function undoes pre-multiplication of a given data by an alpha
11657 * factor. Alpha factor is used to define transparency.
11659 * @ingroup Evas_Utils
11661 EAPI void evas_data_argb_unpremul (unsigned int *data, unsigned int len);
11663 /* string and font handling */
11666 * Gets the next character in the string
11668 * Given the UTF-8 string in @p str, and starting byte position in @p pos,
11669 * this function will place in @p decoded the decoded code point at @p pos
11670 * and return the byte index for the next character in the string.
11672 * The only boundary check done is that @p pos must be >= 0. Other than that,
11673 * no checks are performed, so passing an index value that's not within the
11674 * length of the string will result in undefined behavior.
11676 * @param str The UTF-8 string
11677 * @param pos The byte index where to start
11678 * @param decoded Address where to store the decoded code point. Optional.
11680 * @return The byte index of the next character
11682 * @ingroup Evas_Utils
11684 EAPI int evas_string_char_next_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
11687 * Gets the previous character in the string
11689 * Given the UTF-8 string in @p str, and starting byte position in @p pos,
11690 * this function will place in @p decoded the decoded code point at @p pos
11691 * and return the byte index for the previous character in the string.
11693 * The only boundary check done is that @p pos must be >= 1. Other than that,
11694 * no checks are performed, so passing an index value that's not within the
11695 * length of the string will result in undefined behavior.
11697 * @param str The UTF-8 string
11698 * @param pos The byte index where to start
11699 * @param decoded Address where to store the decoded code point. Optional.
11701 * @return The byte index of the previous character
11703 * @ingroup Evas_Utils
11705 EAPI int evas_string_char_prev_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
11708 * Get the length in characters of the string.
11709 * @param str The string to get the length of.
11710 * @return The length in characters (not bytes)
11711 * @ingroup Evas_Utils
11713 EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
11716 * @defgroup Evas_Keys Key Input Functions
11718 * Functions which feed key events to the canvas.
11720 * As explained in @ref intro_not_evas, Evas is @b not aware of input
11721 * systems at all. Then, the user, if using it crudely (evas_new()),
11722 * will have to feed it with input events, so that it can react
11723 * somehow. If, however, the user creates a canvas by means of the
11724 * Ecore_Evas wrapper, it will automatically bind the chosen display
11725 * engine's input events to the canvas, for you.
11727 * This group presents the functions dealing with the feeding of key
11728 * events to the canvas. On most of them, one has to reference a given
11729 * key by a name (<code>keyname</code> argument). Those are
11730 * <b>platform dependent</b> symbolic names for the keys. Sometimes
11731 * you'll get the right <code>keyname</code> by simply using an ASCII
11732 * value of the key name, but it won't be like that always.
11734 * Typical platforms are Linux frame buffer (Ecore_FB) and X server
11735 * (Ecore_X) when using Evas with Ecore and Ecore_Evas. Please refer
11736 * to your display engine's documentation when using evas through an
11737 * Ecore helper wrapper when you need the <code>keyname</code>s.
11740 * @dontinclude evas-events.c
11741 * @skip mods = evas_key_modifier_get(evas);
11744 * All the other @c evas_key functions behave on the same manner. See
11745 * the full @ref Example_Evas_Events "example".
11747 * @ingroup Evas_Canvas
11751 * @addtogroup Evas_Keys
11756 * Returns a handle to the list of modifier keys registered in the
11757 * canvas @p e. This is required to check for which modifiers are set
11758 * at a given time with the evas_key_modifier_is_set() function.
11760 * @param e The pointer to the Evas canvas
11762 * @see evas_key_modifier_add
11763 * @see evas_key_modifier_del
11764 * @see evas_key_modifier_on
11765 * @see evas_key_modifier_off
11766 * @see evas_key_modifier_is_set
11768 * @return An ::Evas_Modifier handle to query Evas' keys subsystem
11769 * with evas_key_modifier_is_set(), or @c NULL on error.
11771 EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
11774 * Returns a handle to the list of lock keys registered in the canvas
11775 * @p e. This is required to check for which locks are set at a given
11776 * time with the evas_key_lock_is_set() function.
11778 * @param e The pointer to the Evas canvas
11780 * @see evas_key_lock_add
11781 * @see evas_key_lock_del
11782 * @see evas_key_lock_on
11783 * @see evas_key_lock_off
11784 * @see evas_key_lock_is_set
11786 * @return An ::Evas_Lock handle to query Evas' keys subsystem with
11787 * evas_key_lock_is_set(), or @c NULL on error.
11789 EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
11793 * Checks the state of a given modifier key, at the time of the
11794 * call. If the modifier is set, such as shift being pressed, this
11795 * function returns @c Eina_True.
11797 * @param m The current modifiers set, as returned by
11798 * evas_key_modifier_get().
11799 * @param keyname The name of the modifier key to check status for.
11801 * @return @c Eina_True if the modifier key named @p keyname is on, @c
11802 * Eina_False otherwise.
11804 * @see evas_key_modifier_add
11805 * @see evas_key_modifier_del
11806 * @see evas_key_modifier_get
11807 * @see evas_key_modifier_on
11808 * @see evas_key_modifier_off
11810 EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
11814 * Checks the state of a given lock key, at the time of the call. If
11815 * the lock is set, such as caps lock, this function returns @c
11818 * @param l The current locks set, as returned by evas_key_lock_get().
11819 * @param keyname The name of the lock key to check status for.
11821 * @return @c Eina_True if the @p keyname lock key is set, @c
11822 * Eina_False otherwise.
11824 * @see evas_key_lock_get
11825 * @see evas_key_lock_add
11826 * @see evas_key_lock_del
11827 * @see evas_key_lock_on
11828 * @see evas_key_lock_off
11830 EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
11834 * Adds the @p keyname key to the current list of modifier keys.
11836 * @param e The pointer to the Evas canvas
11837 * @param keyname The name of the modifier key to add to the list of
11840 * Modifiers are keys like shift, alt and ctrl, i.e., keys which are
11841 * meant to be pressed together with others, altering the behavior of
11842 * the secondly pressed keys somehow. Evas is so that these keys can
11845 * This call allows custom modifiers to be added to the Evas system at
11846 * run time. It is then possible to set and unset modifier keys
11847 * programmatically for other parts of the program to check and act
11848 * on. Programmers using Evas would check for modifier keys on key
11849 * event callbacks using evas_key_modifier_is_set().
11851 * @see evas_key_modifier_del
11852 * @see evas_key_modifier_get
11853 * @see evas_key_modifier_on
11854 * @see evas_key_modifier_off
11855 * @see evas_key_modifier_is_set
11857 * @note If the programmer instantiates the canvas by means of the
11858 * ecore_evas_new() family of helper functions, Ecore will take
11859 * care of registering on it all standard modifiers: "Shift",
11860 * "Control", "Alt", "Meta", "Hyper", "Super".
11862 EAPI void evas_key_modifier_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
11865 * Removes the @p keyname key from the current list of modifier keys
11868 * @param e The pointer to the Evas canvas
11869 * @param keyname The name of the key to remove from the modifiers list.
11871 * @see evas_key_modifier_add
11872 * @see evas_key_modifier_get
11873 * @see evas_key_modifier_on
11874 * @see evas_key_modifier_off
11875 * @see evas_key_modifier_is_set
11877 EAPI void evas_key_modifier_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
11880 * Adds the @p keyname key to the current list of lock keys.
11882 * @param e The pointer to the Evas canvas
11883 * @param keyname The name of the key to add to the locks list.
11885 * Locks are keys like caps lock, num lock or scroll lock, i.e., keys
11886 * which are meant to be pressed once -- toggling a binary state which
11887 * is bound to it -- and thus altering the behavior of all
11888 * subsequently pressed keys somehow, depending on its state. Evas is
11889 * so that these keys can be defined by the user.
11891 * This allows custom locks to be added to the evas system at run
11892 * time. It is then possible to set and unset lock keys
11893 * programmatically for other parts of the program to check and act
11894 * on. Programmers using Evas would check for lock keys on key event
11895 * callbacks using evas_key_lock_is_set().
11897 * @see evas_key_lock_get
11898 * @see evas_key_lock_del
11899 * @see evas_key_lock_on
11900 * @see evas_key_lock_off
11901 * @see evas_key_lock_is_set
11903 * @note If the programmer instantiates the canvas by means of the
11904 * ecore_evas_new() family of helper functions, Ecore will take
11905 * care of registering on it all standard lock keys: "Caps_Lock",
11906 * "Num_Lock", "Scroll_Lock".
11908 EAPI void evas_key_lock_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
11911 * Removes the @p keyname key from the current list of lock keys on
11914 * @param e The pointer to the Evas canvas
11915 * @param keyname The name of the key to remove from the locks list.
11917 * @see evas_key_lock_get
11918 * @see evas_key_lock_add
11919 * @see evas_key_lock_on
11920 * @see evas_key_lock_off
11922 EAPI void evas_key_lock_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
11926 * Enables or turns on programmatically the modifier key with name @p
11929 * @param e The pointer to the Evas canvas
11930 * @param keyname The name of the modifier to enable.
11932 * The effect will be as if the key was pressed for the whole time
11933 * between this call and a matching evas_key_modifier_off().
11935 * @see evas_key_modifier_add
11936 * @see evas_key_modifier_get
11937 * @see evas_key_modifier_off
11938 * @see evas_key_modifier_is_set
11940 EAPI void evas_key_modifier_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
11943 * Disables or turns off programmatically the modifier key with name
11946 * @param e The pointer to the Evas canvas
11947 * @param keyname The name of the modifier to disable.
11949 * @see evas_key_modifier_add
11950 * @see evas_key_modifier_get
11951 * @see evas_key_modifier_on
11952 * @see evas_key_modifier_is_set
11954 EAPI void evas_key_modifier_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
11957 * Enables or turns on programmatically the lock key with name @p
11960 * @param e The pointer to the Evas canvas
11961 * @param keyname The name of the lock to enable.
11963 * The effect will be as if the key was put on its active state after
11966 * @see evas_key_lock_get
11967 * @see evas_key_lock_add
11968 * @see evas_key_lock_del
11969 * @see evas_key_lock_off
11971 EAPI void evas_key_lock_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
11974 * Disables or turns off programmatically the lock key with name @p
11977 * @param e The pointer to the Evas canvas
11978 * @param keyname The name of the lock to disable.
11980 * The effect will be as if the key was put on its inactive state
11983 * @see evas_key_lock_get
11984 * @see evas_key_lock_add
11985 * @see evas_key_lock_del
11986 * @see evas_key_lock_on
11988 EAPI void evas_key_lock_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
11992 * Creates a bit mask from the @p keyname @b modifier key. Values
11993 * returned from different calls to it may be ORed together,
11996 * @param e The canvas whom to query the bit mask from.
11997 * @param keyname The name of the modifier key to create the mask for.
11999 * @returns the bit mask or 0 if the @p keyname key wasn't registered as a
12000 * modifier for canvas @p e.
12002 * This function is meant to be using in conjunction with
12003 * evas_object_key_grab()/evas_object_key_ungrab(). Go check their
12004 * documentation for more information.
12006 * @see evas_key_modifier_add
12007 * @see evas_key_modifier_get
12008 * @see evas_key_modifier_on
12009 * @see evas_key_modifier_off
12010 * @see evas_key_modifier_is_set
12011 * @see evas_object_key_grab
12012 * @see evas_object_key_ungrab
12014 EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
12018 * Requests @p keyname key events be directed to @p obj.
12020 * @param obj the object to direct @p keyname events to.
12021 * @param keyname the key to request events for.
12022 * @param modifiers a mask of modifiers that must be present to
12023 * trigger the event.
12024 * @param not_modifiers a mask of modifiers that must @b not be present
12025 * to trigger the event.
12026 * @param exclusive request that the @p obj is the only object
12027 * receiving the @p keyname events.
12028 * @return @c EINA_TRUE, if the call succeeded, @c EINA_FALSE otherwise.
12030 * Key grabs allow one or more objects to receive key events for
12031 * specific key strokes even if other objects have focus. Whenever a
12032 * key is grabbed, only the objects grabbing it will get the events
12033 * for the given keys.
12035 * @p keyname is a platform dependent symbolic name for the key
12036 * pressed (see @ref Evas_Keys for more information).
12038 * @p modifiers and @p not_modifiers are bit masks of all the
12039 * modifiers that must and mustn't, respectively, be pressed along
12040 * with @p keyname key in order to trigger this new key
12041 * grab. Modifiers can be things such as Shift and Ctrl as well as
12042 * user defigned types via evas_key_modifier_add(). Retrieve them with
12043 * evas_key_modifier_mask_get() or use @c 0 for empty masks.
12045 * @p exclusive will make the given object the only one permitted to
12046 * grab the given key. If given @c EINA_TRUE, subsequent calls on this
12047 * function with different @p obj arguments will fail, unless the key
12048 * is ungrabbed again.
12050 * Example code follows.
12051 * @dontinclude evas-events.c
12052 * @skip if (d.focus)
12055 * See the full example @ref Example_Evas_Events "here".
12057 * @see evas_object_key_ungrab
12058 * @see evas_object_focus_set
12059 * @see evas_object_focus_get
12060 * @see evas_focus_get
12061 * @see evas_key_modifier_add
12063 EAPI Eina_Bool evas_object_key_grab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
12066 * Removes the grab on @p keyname key events by @p obj.
12068 * @param obj the object that has an existing key grab.
12069 * @param keyname the key the grab is set for.
12070 * @param modifiers a mask of modifiers that must be present to
12071 * trigger the event.
12072 * @param not_modifiers a mask of modifiers that must not not be
12073 * present to trigger the event.
12075 * Removes a key grab on @p obj if @p keyname, @p modifiers, and @p
12076 * not_modifiers match.
12078 * Example code follows.
12079 * @dontinclude evas-events.c
12080 * @skip got here by key grabs
12083 * See the full example @ref Example_Evas_Events "here".
12085 * @see evas_object_key_grab
12086 * @see evas_object_focus_set
12087 * @see evas_object_focus_get
12088 * @see evas_focus_get
12090 EAPI void evas_object_key_ungrab (Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers) EINA_ARG_NONNULL(1, 2);
12097 * @defgroup Evas_Touch_Point_List Touch Point List Functions
12099 * Functions to get information of touched points in the Evas.
12101 * Evas maintains list of touched points on the canvas. Each point has
12102 * its co-ordinates, id and state. You can get the number of touched
12103 * points and information of each point using evas_touch_point_list
12106 * @ingroup Evas_Canvas
12110 * @addtogroup Evas_Touch_Point_List
12115 * Get the number of touched point in the evas.
12117 * @param e The pointer to the Evas canvas.
12118 * @return The number of touched point on the evas.
12120 * New touched point is added to the list whenever touching the evas
12121 * and point is removed whenever removing touched point from the evas.
12125 * extern Evas *evas;
12128 * count = evas_touch_point_list_count(evas);
12129 * printf("The count of touch points: %i\n", count);
12132 * @see evas_touch_point_list_nth_xy_get()
12133 * @see evas_touch_point_list_nth_id_get()
12134 * @see evas_touch_point_list_nth_state_get()
12136 EAPI unsigned int evas_touch_point_list_count(Evas *e) EINA_ARG_NONNULL(1);
12139 * This function returns the nth touch point's co-ordinates.
12141 * @param e The pointer to the Evas canvas.
12142 * @param n The number of the touched point (0 being the first).
12143 * @param x The pointer to a Evas_Coord to be filled in.
12144 * @param y The pointer to a Evas_Coord to be filled in.
12146 * Touch point's co-ordinates is updated whenever moving that point
12151 * extern Evas *evas;
12154 * if (evas_touch_point_list_count(evas))
12156 * evas_touch_point_nth_xy_get(evas, 0, &x, &y);
12157 * printf("The first touch point's co-ordinate: (%i, %i)\n", x, y);
12161 * @see evas_touch_point_list_count()
12162 * @see evas_touch_point_list_nth_id_get()
12163 * @see evas_touch_point_list_nth_state_get()
12165 EAPI void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1);
12168 * This function returns the @p id of nth touch point.
12170 * @param e The pointer to the Evas canvas.
12171 * @param n The number of the touched point (0 being the first).
12172 * @return id of nth touch point, if the call succeeded, -1 otherwise.
12174 * The point which comes from Mouse Event has @p id 0 and The point
12175 * which comes from Multi Event has @p id that is same as Multi
12176 * Event's device id.
12180 * extern Evas *evas;
12183 * if (evas_touch_point_list_count(evas))
12185 * id = evas_touch_point_nth_id_get(evas, 0);
12186 * printf("The first touch point's id: %i\n", id);
12190 * @see evas_touch_point_list_count()
12191 * @see evas_touch_point_list_nth_xy_get()
12192 * @see evas_touch_point_list_nth_state_get()
12194 EAPI int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1);
12197 * This function returns the @p state of nth touch point.
12199 * @param e The pointer to the Evas canvas.
12200 * @param n The number of the touched point (0 being the first).
12201 * @return @p state of nth touch point, if the call succeeded,
12202 * EVAS_TOUCH_POINT_CANCEL otherwise.
12204 * The point's @p state is EVAS_TOUCH_POINT_DOWN when pressed,
12205 * EVAS_TOUCH_POINT_STILL when the point is not moved after pressed,
12206 * EVAS_TOUCH_POINT_MOVE when moved at least once after pressed and
12207 * EVAS_TOUCH_POINT_UP when released.
12211 * extern Evas *evas;
12212 * Evas_Touch_Point_State state;
12214 * if (evas_touch_point_list_count(evas))
12216 * state = evas_touch_point_nth_state_get(evas, 0);
12217 * printf("The first touch point's state: %i\n", state);
12221 * @see evas_touch_point_list_count()
12222 * @see evas_touch_point_list_nth_xy_get()
12223 * @see evas_touch_point_list_nth_id_get()
12225 EAPI Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1);