merged evas image masking code from brett
[framework/uifw/evas.git] / src / lib / Evas.h
1 #ifndef _EVAS_H
2 #define _EVAS_H
3
4 #include <time.h>
5
6 #include <Eina.h>
7
8 #ifdef EAPI
9 # undef EAPI
10 #endif
11
12 #ifdef _WIN32
13 # ifdef EFL_EVAS_BUILD
14 #  ifdef DLL_EXPORT
15 #   define EAPI __declspec(dllexport)
16 #  else
17 #   define EAPI
18 #  endif /* ! DLL_EXPORT */
19 # else
20 #  define EAPI __declspec(dllimport)
21 # endif /* ! EFL_EVAS_BUILD */
22 #else
23 # ifdef __GNUC__
24 #  if __GNUC__ >= 4
25 #   define EAPI __attribute__ ((visibility("default")))
26 #  else
27 #   define EAPI
28 #  endif
29 # else
30 #  define EAPI
31 # endif
32 #endif /* ! _WIN32 */
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #define EVAS_VERSION_MAJOR 1
39 #define EVAS_VERSION_MINOR 0
40
41 typedef struct _Evas_Version
42 {
43    int major;
44    int minor;
45    int micro;
46    int revision;
47 } Evas_Version;
48
49 EAPI extern Evas_Version *evas_version;
50
51 /**
52  * @file
53  * @brief These routines are used for Evas library interaction.
54  *
55  * @todo check boolean return values and convert to Eina_Bool
56  * @todo change all api to use EINA_SAFETY_*
57  * @todo finish api documentation
58  */
59
60 /* BiDi exposed stuff */
61    /*FIXME: document */
62 typedef enum _Evas_BiDi_Direction
63 {
64    EVAS_BIDI_DIRECTION_NATURAL,
65    EVAS_BIDI_DIRECTION_LTR,
66    EVAS_BIDI_DIRECTION_RTL
67 } Evas_BiDi_Direction;
68
69 /**
70  * Identifier of callbacks to be used with object or canvas.
71  *
72  * @see evas_object_event_callback_add()
73  * @see evas_event_callback_add()
74  */
75 typedef enum _Evas_Callback_Type
76 {
77    /*
78     * The following events are only for use with objects
79     * evas_object_event_callback_add():
80     */
81    EVAS_CALLBACK_MOUSE_IN, /**< Mouse In Event */
82    EVAS_CALLBACK_MOUSE_OUT, /**< Mouse Out Event */
83    EVAS_CALLBACK_MOUSE_DOWN, /**< Mouse Button Down Event */
84    EVAS_CALLBACK_MOUSE_UP, /**< Mouse Button Up Event */
85    EVAS_CALLBACK_MOUSE_MOVE, /**< Mouse Move Event */
86    EVAS_CALLBACK_MOUSE_WHEEL, /**< Mouse Wheel Event */
87    EVAS_CALLBACK_MULTI_DOWN, /**< Multi-touch Down Event */
88    EVAS_CALLBACK_MULTI_UP, /**< Multi-touch Up Event */
89    EVAS_CALLBACK_MULTI_MOVE, /**< Multi-touch Move Event */
90    EVAS_CALLBACK_FREE, /**< Object Being Freed (Called after Del) */
91    EVAS_CALLBACK_KEY_DOWN, /**< Key Press Event */
92    EVAS_CALLBACK_KEY_UP, /**< Key Release Event */
93    EVAS_CALLBACK_FOCUS_IN, /**< Focus In Event */
94    EVAS_CALLBACK_FOCUS_OUT, /**< Focus Out Event */
95    EVAS_CALLBACK_SHOW, /**< Show Event */
96    EVAS_CALLBACK_HIDE, /**< Hide Event */
97    EVAS_CALLBACK_MOVE, /**< Move Event */
98    EVAS_CALLBACK_RESIZE, /**< Resize Event */
99    EVAS_CALLBACK_RESTACK, /**< Restack Event */
100    EVAS_CALLBACK_DEL, /**< Object Being Deleted (called before Free) */
101    EVAS_CALLBACK_HOLD, /**< Events go on/off hold */
102    EVAS_CALLBACK_CHANGED_SIZE_HINTS, /**< Size hints changed event */
103    EVAS_CALLBACK_IMAGE_PRELOADED, /**< Image as been preloaded */
104
105
106    /*
107     * The following events are only for use with canvas
108     * evas_event_callback_add():
109     */
110
111    EVAS_CALLBACK_CANVAS_FOCUS_IN, /**< Canvas got focus as a whole */
112    EVAS_CALLBACK_CANVAS_FOCUS_OUT, /**< Canvas lost focus as a whole */
113    EVAS_CALLBACK_RENDER_FLUSH_PRE, /**< Called just before rendering is updated on the canvas target */
114    EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */
115
116    EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */
117    EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */
118
119    /* the following id no event number, but a sentinel: */
120    EVAS_CALLBACK_LAST /**< keep as last element/sentinel -- not really an event */
121 } Evas_Callback_Type; /**< The type of event to trigger the callback */
122
123 /**
124  * Flags for Mouse Button events
125  */
126 typedef enum _Evas_Button_Flags
127 {
128    EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */
129    EVAS_BUTTON_DOUBLE_CLICK = (1 << 0), /**< This mouse button press was the 2nd press of a double click */
130    EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */
131 } Evas_Button_Flags; /**< Flags for Mouse Button events */
132
133 /**
134  * Flags for Events
135  */
136 typedef enum _Evas_Event_Flags
137 {
138    EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */
139    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 */
140    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 */
141 } Evas_Event_Flags; /**< Flags for Events */
142
143 /**
144  * Flags for Font Hinting
145  * @ingroup Evas_Font_Group
146  */
147 typedef enum _Evas_Font_Hinting_Flags
148 {
149    EVAS_FONT_HINTING_NONE, /**< No font hinting */
150    EVAS_FONT_HINTING_AUTO, /**< Automatic font hinting */
151    EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */
152 } Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */
153
154 /**
155  * Colorspaces for pixel data supported by Evas
156  * @ingroup Evas_Object_Image
157  */
158 typedef enum _Evas_Colorspace
159 {
160    EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */
161      /* these are not currently supported - but planned for the future */
162    EVAS_COLORSPACE_YCBCR422P601_PL, /**< YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data poitned to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
163    EVAS_COLORSPACE_YCBCR422P709_PL,/**< YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data poitned to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
164    EVAS_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */
165    EVAS_COLORSPACE_GRY8, /**< 8bit grayscale */
166 } Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */
167
168 /**
169  * How to pack items into cells in a table.
170  * @ingroup Evas_Object_Table
171  */
172 typedef enum _Evas_Object_Table_Homogeneous_Mode
173 {
174   EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0,
175   EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1,
176   EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2
177 } Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */
178
179 typedef struct _Evas_Coord_Rectangle  Evas_Coord_Rectangle; /**< A generic rectangle handle */
180 typedef struct _Evas_Point                   Evas_Point; /**< integer point */
181
182 typedef struct _Evas_Coord_Point             Evas_Coord_Point;  /**< Evas_Coord point */
183 typedef struct _Evas_Coord_Precision_Point   Evas_Coord_Precision_Point; /**< Evas_Coord point with sub-pixel precision */
184
185 typedef struct _Evas_Position                Evas_Position; /**< associates given point in Canvas and Output */
186 typedef struct _Evas_Precision_Position      Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */
187
188 /**
189  * @typedef Evas_Smart_Class
190  * A smart object base class
191  * @ingroup Evas_Smart_Group
192  */
193 typedef struct _Evas_Smart_Class             Evas_Smart_Class;
194
195 /**
196  * @typedef Evas_Smart_Cb_Description
197  * A smart object callback description, used to provide introspection
198  * @ingroup Evas_Smart_Group
199  */
200 typedef struct _Evas_Smart_Cb_Description    Evas_Smart_Cb_Description;
201
202 /**
203  * @typedef Evas_Map
204  * An opaque handle to map points
205  * @see evas_map_new()
206  * @see evas_map_free()
207  * @see evas_map_dup()
208  * @ingroup Evas_Object_Group_Map
209  */
210 typedef struct _Evas_Map            Evas_Map;
211
212 /**
213  * @typedef Evas
214  * An Evas canvas handle.
215  * @see evas_new()
216  * @see evas_free()
217  * @ingroup Evas_Canvas
218  */
219 typedef struct _Evas                Evas;
220
221 /**
222  * @typedef Evas_Object
223  * An Evas Object handle.
224  * @ingroup Evas_Object_Group
225  */
226 typedef struct _Evas_Object         Evas_Object;
227
228 typedef void                        Evas_Performance; /**< An Evas Performance handle */
229 typedef struct _Evas_Modifier       Evas_Modifier; /**< An Evas Modifier */
230 typedef struct _Evas_Lock           Evas_Lock; /**< An Evas Lock */
231 typedef struct _Evas_Smart          Evas_Smart; /**< An Evas Smart Object handle */
232 typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic datatype for engine specific native surface information */
233 typedef unsigned long long          Evas_Modifier_Mask; /**< An Evas modifier mask type */
234
235 typedef int                         Evas_Coord;
236 typedef int                         Evas_Font_Size;
237 typedef int                         Evas_Angle;
238
239 struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */
240 {
241    Evas_Coord x; /**< top-left x co-ordinate of rectangle */
242    Evas_Coord y; /**< top-left y co-ordinate of rectangle */
243    Evas_Coord w; /**< width of rectangle */
244    Evas_Coord h; /**< height of rectangle */
245 };
246
247 struct _Evas_Point
248 {
249    int x, y;
250 };
251
252 struct _Evas_Coord_Point
253 {
254    Evas_Coord x, y;
255 };
256
257 struct _Evas_Coord_Precision_Point
258 {
259    Evas_Coord x, y;
260    double xsub, ysub;
261 };
262
263 struct _Evas_Position
264 {
265     Evas_Point output;
266     Evas_Coord_Point canvas;
267 };
268
269 struct _Evas_Precision_Position
270 {
271     Evas_Point output;
272     Evas_Coord_Precision_Point canvas;
273 };
274
275 typedef enum _Evas_Aspect_Control
276 {
277    EVAS_ASPECT_CONTROL_NONE = 0,
278    EVAS_ASPECT_CONTROL_NEITHER = 1,
279    EVAS_ASPECT_CONTROL_HORIZONTAL = 2,
280    EVAS_ASPECT_CONTROL_VERTICAL = 3,
281    EVAS_ASPECT_CONTROL_BOTH = 4
282 } Evas_Aspect_Control;
283
284 typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */
285 typedef struct _Evas_Engine_Info      Evas_Engine_Info; /**< A generic Evas Engine information structure */
286 typedef struct _Evas_Device           Evas_Device; /**< A source device handle - where the event came from */
287 typedef struct _Evas_Event_Mouse_Down Evas_Event_Mouse_Down; /**< Event structure for #EVAS_CALLBACK_MOUSE_DOWN event callbacks */
288 typedef struct _Evas_Event_Mouse_Up   Evas_Event_Mouse_Up; /**< Event structure for #EVAS_CALLBACK_MOUSE_UP event callbacks */
289 typedef struct _Evas_Event_Mouse_In   Evas_Event_Mouse_In; /**< Event structure for #EVAS_CALLBACK_MOUSE_IN event callbacks */
290 typedef struct _Evas_Event_Mouse_Out  Evas_Event_Mouse_Out; /**< Event structure for #EVAS_CALLBACK_MOUSE_OUT event callbacks */
291 typedef struct _Evas_Event_Mouse_Move Evas_Event_Mouse_Move; /**< Event structure for #EVAS_CALLBACK_MOUSE_MOVE event callbacks */
292 typedef struct _Evas_Event_Mouse_Wheel Evas_Event_Mouse_Wheel; /**< Event structure for #EVAS_CALLBACK_MOUSE_WHEEL event callbacks */
293 typedef struct _Evas_Event_Multi_Down Evas_Event_Multi_Down; /**< Event structure for #EVAS_CALLBACK_MULTI_DOWN event callbacks */
294 typedef struct _Evas_Event_Multi_Up   Evas_Event_Multi_Up; /**< Event structure for #EVAS_CALLBACK_MULTI_UP event callbacks */
295 typedef struct _Evas_Event_Multi_Move Evas_Event_Multi_Move; /**< Event structure for #EVAS_CALLBACK_MULTI_MOVE event callbacks */
296 typedef struct _Evas_Event_Key_Down   Evas_Event_Key_Down; /**< Event structure for #EVAS_CALLBACK_KEY_DOWN event callbacks */
297 typedef struct _Evas_Event_Key_Up     Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */
298 typedef struct _Evas_Event_Hold       Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */
299
300 typedef enum _Evas_Load_Error
301 {
302    EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */
303    EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */
304    EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */
305    EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission deinied to an existing file (or path) */
306    EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */
307    EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */
308    EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */
309 } Evas_Load_Error; /**< Load error you can get from loading of files - see evas_load_error_str() too */
310
311 typedef enum _Evas_Alloc_Error
312 {
313    EVAS_ALLOC_ERROR_NONE = 0, /**< No allocation error */
314    EVAS_ALLOC_ERROR_FATAL = 1, /**< Allocation failed despite attempts to free up memory */
315    EVAS_ALLOC_ERROR_RECOVERED = 2 /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */
316 } Evas_Alloc_Error; /**< Possible allocation errors returned by evas_alloc_error() */
317    
318 typedef enum _Evas_Fill_Spread
319 {
320    EVAS_TEXTURE_REFLECT = 0, /**< image fill tiling mode - tiling reflects */
321    EVAS_TEXTURE_REPEAT = 1, /**< tiling repeats */
322    EVAS_TEXTURE_RESTRICT = 2, /**< tiling clamps - range offset ignored */
323    EVAS_TEXTURE_RESTRICT_REFLECT = 3, /**< tiling clamps and any range offset reflects */
324    EVAS_TEXTURE_RESTRICT_REPEAT = 4, /**< tiling clamps and any range offset repeats */
325    EVAS_TEXTURE_PAD = 5 /**< tiling extends with end values */
326 } Evas_Fill_Spread; /**< Fill types used for evas_object_image_fill_spread_set() */
327
328 typedef enum _Evas_Pixel_Import_Pixel_Format
329 {
330    EVAS_PIXEL_FORMAT_NONE = 0, /**< No pixel format */
331    EVAS_PIXEL_FORMAT_ARGB32 = 1, /**< ARGB 32bit pixel format with A in the high byte per 32bit pixel word */
332    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 */
333 } Evas_Pixel_Import_Pixel_Format; /**< Pixel format for import call. See evas_object_image_pixels_import() */
334
335 struct _Evas_Pixel_Import_Source
336 {
337    Evas_Pixel_Import_Pixel_Format format; /**< pixel format type ie ARGB32, YUV420P_601 etc. */
338    int w, h; /**< width and height of source in pixels */
339    void **rows; /**< an array of pointers (size depends on format) pointing to left edge of each scanline */
340 };
341
342 struct _Evas_Native_Surface
343 {
344    union {
345       struct {
346          void *visual;
347          unsigned long  pixmap;
348       } x11;
349       struct { /* padding data for future use - have space for 8 pointers */
350          void *d[8];
351       } padding;
352    } data;
353 };
354
355 #define EVAS_LAYER_MIN -32768 /**< bottom-most layer number */
356 #define EVAS_LAYER_MAX 32767  /**< top-most layer number */
357
358 #define EVAS_COLOR_SPACE_ARGB 0 /**< Not used for anything */
359 #define EVAS_COLOR_SPACE_AHSV 1 /**< Not used for anything */
360 #define EVAS_TEXT_INVALID -1 /**< Not used for anything */
361 #define EVAS_TEXT_SPECIAL -2 /**< Not used for anything */
362
363 #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() */
364 #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() */
365 #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) */
366 #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) */
367 #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 */
368 #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 */
369
370 /**
371  * How the object should be rendered to output.
372  * @ingroup Evas_Object_Group_Extras
373  */
374 typedef enum _Evas_Render_Op
375 {
376    EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */
377    EVAS_RENDER_BLEND_REL = 1, /**< d = d*(1 - sa) + s*da */
378    EVAS_RENDER_COPY = 2, /**< d = s */
379    EVAS_RENDER_COPY_REL = 3, /**< d = s*da */
380    EVAS_RENDER_ADD = 4, /**< d = d + s */
381    EVAS_RENDER_ADD_REL = 5, /**< d = d + s*da */
382    EVAS_RENDER_SUB = 6, /**< d = d - s */
383    EVAS_RENDER_SUB_REL = 7, /**< d = d - s*da */
384    EVAS_RENDER_TINT = 8, /**< d = d*s + d*(1 - sa) + s*(1 - da) */
385    EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */
386    EVAS_RENDER_MASK = 10, /**< d = d*sa */
387    EVAS_RENDER_MUL = 11 /**< d = d*s */
388 } Evas_Render_Op; /**< How the object should be rendered to output. */
389
390 typedef enum _Evas_Border_Fill_Mode
391 {
392    EVAS_BORDER_FILL_NONE = 0,
393    EVAS_BORDER_FILL_DEFAULT = 1,
394    EVAS_BORDER_FILL_SOLID = 2
395 } Evas_Border_Fill_Mode;
396
397 typedef enum _Evas_Image_Scale_Hint
398 {
399    EVAS_IMAGE_SCALE_HINT_NONE = 0,
400    EVAS_IMAGE_SCALE_HINT_DYNAMIC = 1,
401    EVAS_IMAGE_SCALE_HINT_STATIC = 2
402 } Evas_Image_Scale_Hint;
403
404 typedef enum _Evas_Engine_Render_Mode
405 {
406    EVAS_RENDER_MODE_BLOCKING = 0,
407    EVAS_RENDER_MODE_NONBLOCKING = 1,
408 } Evas_Engine_Render_Mode;
409
410 typedef enum _Evas_Image_Content_Hint
411 {
412    EVAS_IMAGE_CONTENT_HINT_NONE = 0,
413    EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1,
414    EVAS_IMAGE_CONTENT_HINT_STATIC = 2
415 } Evas_Image_Content_Hint;
416
417 struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */
418 {
419    int magic; /**< Magic number */
420 };
421
422 struct _Evas_Event_Mouse_Down /** Mouse button press event */
423 {
424    int button; /**< Mouse button number that went down (1 - 32) */
425
426    Evas_Point output;
427    Evas_Coord_Point canvas;
428
429    void          *data;
430    Evas_Modifier *modifiers;
431    Evas_Lock     *locks;
432
433    Evas_Button_Flags flags;
434    unsigned int      timestamp;
435    Evas_Event_Flags  event_flags;
436    Evas_Device      *dev;
437 };
438
439 struct _Evas_Event_Mouse_Up /** Mouse button release event */
440 {
441    int button; /**< Mouse button number that was raised (1 - 32) */
442
443    Evas_Point output;
444    Evas_Coord_Point canvas;
445
446    void          *data;
447    Evas_Modifier *modifiers;
448    Evas_Lock     *locks;
449
450    Evas_Button_Flags flags;
451    unsigned int      timestamp;
452    Evas_Event_Flags  event_flags;
453    Evas_Device      *dev;
454 };
455
456 struct _Evas_Event_Mouse_In /** Mouse enter event */
457 {
458    int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
459
460    Evas_Point output;
461    Evas_Coord_Point canvas;
462
463    void          *data;
464    Evas_Modifier *modifiers;
465    Evas_Lock     *locks;
466    unsigned int   timestamp;
467    Evas_Event_Flags  event_flags;
468    Evas_Device      *dev;
469 };
470
471 struct _Evas_Event_Mouse_Out /** Mouse leave event */
472 {
473    int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
474
475
476    Evas_Point output;
477    Evas_Coord_Point canvas;
478
479    void          *data;
480    Evas_Modifier *modifiers;
481    Evas_Lock     *locks;
482    unsigned int   timestamp;
483    Evas_Event_Flags  event_flags;
484    Evas_Device      *dev;
485 };
486
487 struct _Evas_Event_Mouse_Move /** Mouse button down event */
488 {
489    int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
490
491    Evas_Position cur, prev;
492
493    void          *data;
494    Evas_Modifier *modifiers;
495    Evas_Lock     *locks;
496    unsigned int   timestamp;
497    Evas_Event_Flags  event_flags;
498    Evas_Device      *dev;
499 };
500
501 struct _Evas_Event_Mouse_Wheel /** Wheel event */
502 {
503    int direction; /* 0 = default up/down wheel FIXME: more wheel types */
504    int z; /* ...,-2,-1 = down, 1,2,... = up */
505
506    Evas_Point output;
507    Evas_Coord_Point canvas;
508
509    void          *data;
510    Evas_Modifier *modifiers;
511    Evas_Lock     *locks;
512    unsigned int   timestamp;
513    Evas_Event_Flags  event_flags;
514    Evas_Device      *dev;
515 };
516
517 struct _Evas_Event_Multi_Down /** Multi button press event */
518 {
519    int device; /**< Multi device number that went down (1 or more for extra touches) */
520    double radius, radius_x, radius_y;
521    double pressure, angle;
522
523    Evas_Point output;
524    Evas_Coord_Precision_Point canvas;
525
526    void          *data;
527    Evas_Modifier *modifiers;
528    Evas_Lock     *locks;
529
530    Evas_Button_Flags flags;
531    unsigned int      timestamp;
532    Evas_Event_Flags  event_flags;
533    Evas_Device      *dev;
534 };
535
536 struct _Evas_Event_Multi_Up /** Multi button release event */
537 {
538    int device; /**< Multi device number that went up (1 or more for extra touches) */
539    double radius, radius_x, radius_y;
540    double pressure, angle;
541
542    Evas_Point output;
543    Evas_Coord_Precision_Point canvas;
544
545    void          *data;
546    Evas_Modifier *modifiers;
547    Evas_Lock     *locks;
548
549    Evas_Button_Flags flags;
550    unsigned int      timestamp;
551    Evas_Event_Flags  event_flags;
552    Evas_Device      *dev;
553 };
554
555 struct _Evas_Event_Multi_Move /** Multi button down event */
556 {
557    int device; /**< Multi device number that moved (1 or more for extra touches) */
558    double radius, radius_x, radius_y;
559    double pressure, angle;
560
561    Evas_Precision_Position cur;
562
563    void          *data;
564    Evas_Modifier *modifiers;
565    Evas_Lock     *locks;
566    unsigned int   timestamp;
567    Evas_Event_Flags  event_flags;
568    Evas_Device      *dev;
569 };
570
571 struct _Evas_Event_Key_Down /** Key press event */
572 {
573    char          *keyname; /**< The string name of the key pressed */
574    void          *data;
575    Evas_Modifier *modifiers;
576    Evas_Lock     *locks;
577
578    const char    *key; /**< The logical key : (eg shift+1 == exclamation) */
579    const char    *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
580    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 */
581    unsigned int   timestamp;
582    Evas_Event_Flags  event_flags;
583    Evas_Device      *dev;
584 };
585
586 struct _Evas_Event_Key_Up /** Key release event */
587 {
588    char          *keyname; /**< The string name of the key released */
589    void          *data;
590    Evas_Modifier *modifiers;
591    Evas_Lock     *locks;
592
593    const char    *key; /**< The logical key : (eg shift+1 == exclamation) */
594    const char    *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
595    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 */
596    unsigned int   timestamp;
597    Evas_Event_Flags  event_flags;
598    Evas_Device      *dev;
599 };
600
601 struct _Evas_Event_Hold /** Hold change event */
602 {
603    int            hold; /**< The hold flag */
604    void          *data;
605
606    unsigned int   timestamp;
607    Evas_Event_Flags  event_flags;
608    Evas_Device      *dev;
609 };
610
611 /**
612  * How mouse pointer should be handled by Evas.
613  *
614  * If #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse is down an
615  * object, then moves outside of it, the pointer still behaves as
616  * being bound to the object, albeit out of its drawing region. On
617  * mouse up, the event will be feed to the object, that may check if
618  * the final position is over or not and do something about it.
619  *
620  * @ingroup Evas_Object_Group_Extras
621  */
622 typedef enum _Evas_Object_Pointer_Mode
623 {
624    EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */
625    EVAS_OBJECT_POINTER_MODE_NOGRAB
626 } Evas_Object_Pointer_Mode; /**< How mouse pointer should be handled by Evas. */
627
628 typedef void      (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info);
629 typedef void      (*Evas_Event_Cb) (void *data, Evas *e, void *event_info);
630 typedef Eina_Bool (*Evas_Object_Event_Post_Cb) (void *data, Evas *e);
631 typedef void      (*Evas_Object_Event_Cb) (void *data, Evas *e, Evas_Object *obj, void *event_info);
632 typedef void      (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type type, void *event_info);
633
634 /**
635  * @defgroup Evas_Group Top Level Functions
636  *
637  * Functions that affect Evas as a whole.
638  */
639    EAPI int               evas_init                         (void);
640    EAPI int               evas_shutdown                     (void);
641
642    EAPI Evas_Alloc_Error  evas_alloc_error                  (void);
643
644    EAPI int               evas_async_events_fd_get          (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
645    EAPI int               evas_async_events_process         (void);
646    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);
647
648 /**
649  * @defgroup Evas_Canvas Canvas Functions
650  *
651  * Functions that deal with the basic evas object.  They are the
652  * functions you need to use at a minimum to get a working evas, and
653  * to destroy it.
654  *
655  */
656
657    EAPI Evas             *evas_new                          (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
658    EAPI void              evas_free                         (Evas *e)  EINA_ARG_NONNULL(1);
659
660    EAPI void              evas_focus_in                     (Evas *e);
661    EAPI void              evas_focus_out                    (Evas *e);
662    EAPI Eina_Bool         evas_focus_state_get              (const Evas *e) EINA_PURE;
663    EAPI void              evas_nochange_push                (Evas *e);
664    EAPI void              evas_nochange_pop                 (Evas *e);
665          
666    EAPI void              evas_data_attach_set              (Evas *e, void *data) EINA_ARG_NONNULL(1);
667    EAPI void             *evas_data_attach_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
668
669    EAPI void              evas_damage_rectangle_add         (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
670    EAPI void              evas_obscured_rectangle_add       (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
671    EAPI void              evas_obscured_clear               (Evas *e) EINA_ARG_NONNULL(1);
672    EAPI Eina_List        *evas_render_updates               (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
673    EAPI void              evas_render_updates_free          (Eina_List *updates);
674    EAPI void              evas_render                       (Evas *e) EINA_ARG_NONNULL(1);
675    EAPI void              evas_norender                     (Evas *e) EINA_ARG_NONNULL(1);
676    EAPI void              evas_render_idle_flush            (Evas *e) EINA_ARG_NONNULL(1);
677    EAPI void              evas_render_dump                  (Evas *e) EINA_ARG_NONNULL(1);
678
679 /**
680  * @defgroup Evas_Output_Method Render Engine Functions
681  *
682  * Functions that are used to set the render engine for a given
683  * function, and then get that engine working.
684  *
685  * The following code snippet shows how they can be used to
686  * initialise an evas that uses the X11 software engine:
687  * @code
688  * Evas *evas;
689  * Evas_Engine_Info_Software_X11 *einfo;
690  * extern Display *display;
691  * extern Window win;
692  *
693  * evas_init();
694  *
695  * evas = evas_new();
696  * evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
697  * evas_output_size_set(evas, 640, 480);
698  * evas_output_viewport_set(evas, 0, 0, 640, 480);
699  * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
700  * einfo->info.display = display;
701  * einfo->info.visual = DefaultVisual(display, DefaultScreen(display));
702  * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display));
703  * einfo->info.drawable = win;
704  * einfo->info.depth = DefaultDepth(display, DefaultScreen(display));
705  * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
706  * @endcode
707  *
708  * @ingroup Evas_Canvas
709  */
710    EAPI int               evas_render_method_lookup         (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
711    EAPI Eina_List        *evas_render_method_list           (void) EINA_WARN_UNUSED_RESULT;
712    EAPI void              evas_render_method_list_free      (Eina_List *list);
713
714    EAPI void              evas_output_method_set            (Evas *e, int render_method) EINA_ARG_NONNULL(1);
715    EAPI int               evas_output_method_get            (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
716
717    EAPI Evas_Engine_Info *evas_engine_info_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
718    EAPI Eina_Bool         evas_engine_info_set              (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1);
719
720 /**
721  * @defgroup Evas_Output_Size Output and Viewport Resizing Functions
722  *
723  * Functions that set and retrieve the output and viewport size of an
724  * evas.
725  *
726  * @ingroup Evas_Canvas
727  */
728    EAPI void              evas_output_size_set              (Evas *e, int w, int h) EINA_ARG_NONNULL(1);
729    EAPI void              evas_output_size_get              (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1);
730    EAPI void              evas_output_viewport_set          (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
731    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);
732
733 /**
734  * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions
735  *
736  * Functions that are used to map coordinates from the canvas to the
737  * screen or the screen to the canvas.
738  *
739  * @ingroup Evas_Canvas
740  */
741    EAPI Evas_Coord        evas_coord_screen_x_to_world      (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
742    EAPI Evas_Coord        evas_coord_screen_y_to_world      (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
743    EAPI int               evas_coord_world_x_to_screen      (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
744    EAPI int               evas_coord_world_y_to_screen      (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
745
746 /**
747  * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions
748  *
749  * Functions that deal with the status of the pointer (mouse cursor).
750  *
751  * @ingroup Evas_Canvas
752  */
753    EAPI void              evas_pointer_output_xy_get        (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1);
754    EAPI void              evas_pointer_canvas_xy_get        (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1);
755    EAPI int               evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
756    EAPI Eina_Bool         evas_pointer_inside_get           (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
757    EAPI void              evas_sync(Evas *e) EINA_ARG_NONNULL(1);
758
759 /**
760  * @defgroup Evas_Event_Freezing_Group Event Freezing Functions
761  *
762  * Functions that deal with the freezing of event processing of an
763  * evas.
764  *
765  * @ingroup Evas_Canvas
766  */
767    EAPI void              evas_event_freeze                 (Evas *e) EINA_ARG_NONNULL(1);
768    EAPI void              evas_event_thaw                   (Evas *e) EINA_ARG_NONNULL(1);
769    EAPI int               evas_event_freeze_get             (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
770
771 /**
772  * @defgroup Evas_Event_Feeding_Group Event Feeding Functions
773  *
774  * Functions to tell Evas that events happened and should be
775  * processed.
776  *
777  * As explained in @ref intro_not_evas, Evas does not know how to poll
778  * for events, so the developer should do it and then feed such events
779  * to the canvas to be processed. This is only required if operating
780  * Evas directly as modules such as Ecore_Evas does that for you.
781  *
782  * @ingroup Evas_Canvas
783  */
784    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);
785    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);
786    EAPI void              evas_event_feed_mouse_move        (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
787    EAPI void              evas_event_feed_mouse_in          (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
788    EAPI void              evas_event_feed_mouse_out         (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
789    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);
790    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);
791    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);
792    EAPI void              evas_event_feed_mouse_cancel      (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
793    EAPI void              evas_event_feed_mouse_wheel       (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
794    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);
795    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);
796    EAPI void              evas_event_feed_hold              (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
797
798 /**
799  * @defgroup Evas_Canvas_Events Canvas Events
800  *
801  * Canvas generates some events
802  *
803  * @ingroup Evas_Canvas
804  */
805
806    EAPI void              evas_event_callback_add              (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
807    EAPI void             *evas_event_callback_del              (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
808    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);
809    EAPI void              evas_post_event_callback_push        (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
810    EAPI void              evas_post_event_callback_remove      (Evas *e, Evas_Object_Event_Post_Cb func);
811    EAPI void              evas_post_event_callback_remove_full (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
812        
813 /**
814  * @defgroup Evas_Image_Group Image Functions
815  *
816  * Functions that deals with images at canvas level.
817  *
818  * @ingroup Evas_Canvas
819  */
820    EAPI void              evas_image_cache_flush            (Evas *e) EINA_ARG_NONNULL(1);
821    EAPI void              evas_image_cache_reload           (Evas *e) EINA_ARG_NONNULL(1);
822    EAPI void              evas_image_cache_set              (Evas *e, int size) EINA_ARG_NONNULL(1);
823    EAPI int               evas_image_cache_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
824
825 /**
826  * @defgroup Evas_Font_Group Font Functions
827  *
828  * Functions that deals with fonts.
829  *
830  * @ingroup Evas_Canvas
831  */
832    EAPI void                     evas_font_hinting_set        (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1);
833    EAPI Evas_Font_Hinting_Flags  evas_font_hinting_get        (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
834    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;
835
836    EAPI void                     evas_font_cache_flush        (Evas *e) EINA_ARG_NONNULL(1);
837    EAPI void                     evas_font_cache_set          (Evas *e, int size) EINA_ARG_NONNULL(1);
838    EAPI int                      evas_font_cache_get          (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
839
840    EAPI Eina_List               *evas_font_available_list     (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
841    EAPI void                     evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
842
843 /**
844  * @defgroup Evas_Font_Path_Group Font Path Functions
845  *
846  * Functions that edit the paths being used to load fonts.
847  *
848  * @ingroup Evas_Font_Group
849  */
850    EAPI void              evas_font_path_clear              (Evas *e) EINA_ARG_NONNULL(1);
851    EAPI void              evas_font_path_append             (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
852    EAPI void              evas_font_path_prepend            (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
853    EAPI const Eina_List  *evas_font_path_list               (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
854
855 /**
856  * @defgroup Evas_Object_Group Generic Object Functions
857  *
858  * Functions that manipulate generic evas objects.
859  */
860
861 /**
862  * @defgroup Evas_Object_Group_Basic Basic Object Manipulation
863  *
864  * Methods that are often used, like those that change the color,
865  * clippers and geometry of the object.
866  *
867  * @ingroup Evas_Object_Group
868  */
869    EAPI void              evas_object_clip_set              (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2);
870    EAPI Evas_Object      *evas_object_clip_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
871    EAPI void              evas_object_clip_unset            (Evas_Object *obj);
872    EAPI const Eina_List  *evas_object_clipees_get           (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
873
874    EAPI void              evas_object_focus_set             (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1);
875    EAPI Eina_Bool         evas_object_focus_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
876
877    EAPI void              evas_object_layer_set             (Evas_Object *obj, short l) EINA_ARG_NONNULL(1);
878    EAPI short             evas_object_layer_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
879
880    EAPI void              evas_object_name_set              (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1);
881    EAPI const char       *evas_object_name_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
882
883    EAPI void              evas_object_del                   (Evas_Object *obj) EINA_ARG_NONNULL(1);
884    EAPI void              evas_object_move                  (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
885    EAPI void              evas_object_resize                (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
886    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);
887
888    EAPI void              evas_object_show                  (Evas_Object *obj) EINA_ARG_NONNULL(1);
889    EAPI void              evas_object_hide                  (Evas_Object *obj) EINA_ARG_NONNULL(1);
890    EAPI Eina_Bool         evas_object_visible_get           (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
891
892    EAPI void              evas_object_color_set             (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
893    EAPI void              evas_object_color_get             (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
894
895    EAPI Evas             *evas_object_evas_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
896
897    EAPI const char       *evas_object_type_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
898
899    EAPI void              evas_object_raise                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
900    EAPI void              evas_object_lower                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
901    EAPI void              evas_object_stack_above           (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2);
902    EAPI void              evas_object_stack_below           (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2);
903    EAPI Evas_Object      *evas_object_above_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
904    EAPI Evas_Object      *evas_object_below_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
905
906 /**
907  * @defgroup Evas_Object_Group_Events Object Events
908  *
909  * Objects generates events when they are moved, resized, when their
910  * visibility change, when they are deleted and so on. These methods
911  * will allow one to handle such events.
912  *
913  * The events can be those from keyboard and mouse, if the object
914  * accepts these events.
915  *
916  * @ingroup Evas_Object_Group
917  */
918    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);
919    EAPI void             *evas_object_event_callback_del     (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3);
920    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);
921
922    EAPI void              evas_object_pass_events_set        (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1);
923    EAPI Eina_Bool         evas_object_pass_events_get        (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
924    EAPI void              evas_object_repeat_events_set      (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
925    EAPI Eina_Bool         evas_object_repeat_events_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
926    EAPI void              evas_object_propagate_events_set   (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1);
927    EAPI Eina_Bool         evas_object_propagate_events_get   (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
928
929 /**
930  * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspecitve, 3D...)
931  *
932  * Evas allows different transformations to be applied to all kinds of
933  * objects. These are applied by means of UV mapping.
934  *
935  * With UV mapping, one maps points in the source object to a 3D space
936  * positioning at target. This allows rotation, perspective, scale and
937  * lots of other effects, depending on the map that is used.
938  *
939  * Each map point may carry a multiplier color. If properly
940  * calculated, these can do shading effects on the object, producing
941  * 3D effects.
942  *
943  * As usual, Evas provides both the raw and easy to use methods. The
944  * raw methods allow developer to create its maps somewhere else,
945  * maybe load them from some file format. The easy to use methods,
946  * calculate the points given some high-level parameters, such as
947  * rotation angle, ambient light and so on.
948  *
949  * @note applying mapping will reduce performance, so use with
950  *       care. The impact on performance depends on engine in
951  *       use. Software is quite optimized, but not as fast as OpenGL.
952  *
953  * @ingroup Evas_Object_Group
954  */
955    EAPI void              evas_object_map_enable_set        (Evas_Object *obj, Eina_Bool enabled);
956    EAPI Eina_Bool         evas_object_map_enable_get        (const Evas_Object *obj);
957    EAPI void              evas_object_map_source_set        (Evas_Object *obj, Evas_Object *src);
958    EAPI Evas_Object      *evas_object_map_source_get        (const Evas_Object *obj);
959    EAPI void              evas_object_map_set               (Evas_Object *obj, const Evas_Map *map);
960    EAPI const Evas_Map   *evas_object_map_get               (const Evas_Object *obj);
961
962    EAPI void              evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z);
963    EAPI void              evas_map_util_points_populate_from_object     (Evas_Map *m, const Evas_Object *obj);
964    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);
965    EAPI void              evas_map_util_points_color_set                (Evas_Map *m, int r, int g, int b, int a);
966    EAPI void              evas_map_util_rotate                          (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy);
967    EAPI void              evas_map_util_zoom                            (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy);
968    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);
969    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);
970    EAPI void              evas_map_util_3d_perspective                  (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
971    EAPI Eina_Bool         evas_map_util_clockwise_get                   (Evas_Map *m);
972
973    EAPI Evas_Map         *evas_map_new                      (int count);
974    EAPI void              evas_map_smooth_set               (Evas_Map *m, Eina_Bool enabled);
975    EAPI Eina_Bool         evas_map_smooth_get               (const Evas_Map *m);
976    EAPI void              evas_map_alpha_set                (Evas_Map *m, Eina_Bool enabled);
977    EAPI Eina_Bool         evas_map_alpha_get                (const Evas_Map *m);
978    EAPI Evas_Map         *evas_map_dup                      (const Evas_Map *m);
979    EAPI void              evas_map_free                     (Evas_Map *m);
980    EAPI int               evas_map_count_get               (const Evas_Map *m) EINA_CONST;
981    EAPI void              evas_map_point_coord_set          (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z);
982    EAPI void              evas_map_point_coord_get          (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z);
983    EAPI void              evas_map_point_image_uv_set       (Evas_Map *m, int idx, double u, double v);
984    EAPI void              evas_map_point_image_uv_get       (const Evas_Map *m, int idx, double *u, double *v);
985    EAPI void              evas_map_point_color_set          (Evas_Map *m, int idx, int r, int g, int b, int a);
986    EAPI void              evas_map_point_color_get          (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a);
987
988 /**
989  * @defgroup Evas_Object_Group_Size_Hints Size Hints
990  *
991  * Objects may carry hints so another object that acts as a manager
992  * (see @ref Evas_Smart_Object_Group) may know how to properly position
993  * and resize the object. The Size Hints provide a common interface
994  * that is recommended as the protocol for such information.
995  *
996  * @ingroup Evas_Object_Group
997  */
998    EAPI void              evas_object_size_hint_min_get     (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
999    EAPI void              evas_object_size_hint_min_set     (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
1000    EAPI void              evas_object_size_hint_max_get     (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1001    EAPI void              evas_object_size_hint_max_set     (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
1002    EAPI void              evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1003    EAPI void              evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
1004    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);
1005    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);
1006    EAPI void              evas_object_size_hint_align_get   (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
1007    EAPI void              evas_object_size_hint_align_set   (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
1008    EAPI void              evas_object_size_hint_weight_get  (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
1009    EAPI void              evas_object_size_hint_weight_set  (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
1010    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);
1011    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);
1012
1013 /**
1014  * @defgroup Evas_Object_Group_Extras Extra Object Manipulation
1015  *
1016  * Miscellaneous functions that also apply to any object, but are less
1017  * used or not implemented by all objects.
1018  *
1019  * @ingroup Evas_Object_Group
1020  */
1021    EAPI void                      evas_object_data_set             (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2);
1022    EAPI void                     *evas_object_data_get             (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_PURE;
1023    EAPI void                     *evas_object_data_del             (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
1024
1025    EAPI void                      evas_object_pointer_mode_set     (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1);
1026    EAPI Evas_Object_Pointer_Mode  evas_object_pointer_mode_get     (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1027
1028    EAPI void                      evas_object_anti_alias_set       (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1);
1029    EAPI Eina_Bool                 evas_object_anti_alias_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1030
1031    EAPI void                      evas_object_scale_set            (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1);
1032    EAPI double                    evas_object_scale_get            (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1033
1034    EAPI void                      evas_object_render_op_set        (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1);
1035    EAPI Evas_Render_Op            evas_object_render_op_get        (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1036
1037    EAPI void                      evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1);
1038    EAPI Eina_Bool                 evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1039
1040    EAPI void                      evas_object_static_clip_set      (Evas_Object *obj, Eina_Bool is_static_clip) EINA_ARG_NONNULL(1);
1041    EAPI Eina_Bool                 evas_object_static_clip_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1042          
1043 /**
1044  * @defgroup Evas_Object_Group_Find Finding Objects
1045  *
1046  * Functions that allows finding objects by their position, name or
1047  * other properties.
1048  *
1049  * @ingroup Evas_Object_Group
1050  */
1051    EAPI Evas_Object      *evas_focus_get                    (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1052
1053    EAPI Evas_Object      *evas_object_name_find             (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1054
1055    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;
1056    EAPI Evas_Object      *evas_object_top_at_pointer_get    (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1057    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;
1058
1059    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;
1060    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;
1061
1062    EAPI Evas_Object      *evas_object_bottom_get            (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1063    EAPI Evas_Object      *evas_object_top_get               (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1064
1065 /**
1066  * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors
1067  *
1068  * Evas provides a way to intercept method calls. The interceptor
1069  * callback may opt to completely deny the call, or may check and
1070  * change the parameters before continuing. The continuation of an
1071  * intercepted call is done by calling the intercepted call again,
1072  * from inside the interceptor callback.
1073  *
1074  * @ingroup Evas_Object_Group
1075  */
1076 typedef void (*Evas_Object_Intercept_Show_Cb) (void *data, Evas_Object *obj);
1077 typedef void (*Evas_Object_Intercept_Hide_Cb) (void *data, Evas_Object *obj);
1078 typedef void (*Evas_Object_Intercept_Move_Cb) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y);
1079 typedef void (*Evas_Object_Intercept_Resize_Cb) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h);
1080 typedef void (*Evas_Object_Intercept_Raise_Cb) (void *data, Evas_Object *obj);
1081 typedef void (*Evas_Object_Intercept_Lower_Cb) (void *data, Evas_Object *obj);
1082 typedef void (*Evas_Object_Intercept_Stack_Above_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
1083 typedef void (*Evas_Object_Intercept_Stack_Below_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
1084 typedef void (*Evas_Object_Intercept_Layer_Set_Cb) (void *data, Evas_Object *obj, int l);
1085 typedef void (*Evas_Object_Intercept_Color_Set_Cb) (void *data, Evas_Object *obj, int r, int g, int b, int a);
1086 typedef void (*Evas_Object_Intercept_Clip_Set_Cb) (void *data, Evas_Object *obj, Evas_Object *clip);
1087 typedef void (*Evas_Object_Intercept_Clip_Unset_Cb) (void *data, Evas_Object *obj);
1088    
1089    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);
1090    EAPI void             *evas_object_intercept_show_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2);
1091    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);
1092    EAPI void             *evas_object_intercept_hide_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2);
1093    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);
1094    EAPI void             *evas_object_intercept_move_callback_del        (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2);
1095    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);
1096    EAPI void             *evas_object_intercept_resize_callback_del      (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2);
1097    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);
1098    EAPI void             *evas_object_intercept_raise_callback_del       (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2);
1099    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);
1100    EAPI void             *evas_object_intercept_lower_callback_del       (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2);
1101    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);
1102    EAPI void             *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) EINA_ARG_NONNULL(1, 2);
1103    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);
1104    EAPI void             *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) EINA_ARG_NONNULL(1, 2);
1105    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);
1106    EAPI void             *evas_object_intercept_layer_set_callback_del   (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) EINA_ARG_NONNULL(1, 2);
1107    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);
1108    EAPI void             *evas_object_intercept_color_set_callback_del   (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) EINA_ARG_NONNULL(1, 2);
1109    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);
1110    EAPI void             *evas_object_intercept_clip_set_callback_del    (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) EINA_ARG_NONNULL(1, 2);
1111    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);
1112    EAPI void             *evas_object_intercept_clip_unset_callback_del  (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) EINA_ARG_NONNULL(1, 2);
1113
1114
1115
1116 /**
1117  * @defgroup Evas_Object_Specific Specific Object Functions
1118  *
1119  * Functions that work on specific objects.
1120  *
1121  */
1122
1123 /**
1124  * @defgroup Evas_Object_Rectangle Rectangle Object Functions
1125  *
1126  * Functions that operate on evas rectangle objects.
1127  *
1128  * @ingroup Evas_Object_Specific
1129  */
1130    EAPI Evas_Object      *evas_object_rectangle_add         (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1131
1132 /**
1133  * @defgroup Evas_Object_Image Image Object Functions
1134  *
1135  * Functions used to create and manipulate image objects.
1136  *
1137  * Note - Image objects may return or accept "image data" in multiple
1138  * formats.  This is based on the colorspace of an object. Here is a
1139  * rundown on formats:
1140  *
1141  * EVAS_COLORSPACE_ARGB8888:
1142  *
1143  * This pixel format is a linear block of pixels, starting at the
1144  * top-left row by row until the bottom right of the image or pixel
1145  * region. All pixels are 32-bit unsigned int's with the high-byte
1146  * being alpha and the low byte being blue in the format ARGB. Alpha
1147  * may or may not be used by evas depending on the alpha flag of the
1148  * image, but if not used, should be set to 0xff anyway.
1149  *
1150  * This colorspace uses premultiplied alpha. That means that R, G and
1151  * B cannot exceed A in value. The conversion from non-premultiplied
1152  * colorspace is:
1153  *
1154  * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255;
1155  *
1156  * So 50% transparent blue will be: 0x80000080. This will not be
1157  * "dark" - just 50% transparent. Values are 0 == black, 255 == solid
1158  * or full red, green or blue.
1159  *
1160  * EVAS_COLORSPACE_YCBCR422P601_PL:
1161  *
1162  * This is a pointer-list indirected set of YUV (YCbCr) pixel
1163  * data. This means that the data returned or set is not actual pixel
1164  * data, but pointers TO lines of pixel data. The list of pointers
1165  * will first be N rows of pointers to the Y plane - pointing to the
1166  * first pixel at the start of each row in the Y plane. N is the
1167  * height of the image data in pixels. Each pixel in the Y, U and V
1168  * planes is 1 byte exactly, packed. The next N / 2 pointers will
1169  * point to rows in the U plane, and the next N / 2 pointers will
1170  * point to the V plane rows. U and V planes are half the horizontal
1171  * and vertical resolution of the Y plane.
1172  *
1173  * Row order is top to bottom and row pixels are stored left to right.
1174  *
1175  * There is a limitation that these images MUST be a multiple of 2
1176  * pixels in size horizontally or vertically. This is due to the U and
1177  * V planes being half resolution. Also note that this assumes the
1178  * itu601 YUV colorspace specification. This is defined for standard
1179  * television and mpeg streams.  HDTV may use the itu709
1180  * specification.
1181  *
1182  * Values are 0 to 255, indicating full or no signal in that plane
1183  * respectively.
1184  *
1185  * EVAS_COLORSPACE_YCBCR422P709_PL:
1186  *
1187  * Not implemented yet.
1188  *
1189  * EVAS_COLORSPACE_RGB565_A5P:
1190  *
1191  * In the process of being implemented in 1 engine only. This may change.
1192  *
1193  * This is a pointer to image data for 16-bit half-word pixel data in
1194  * 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with
1195  * the high-byte containing red and the low byte containing blue, per
1196  * pixel. This data is packed row by row from the top-left to the
1197  * bottom right.
1198  *
1199  * If the image has an alpha channel enabled there will be an extra
1200  * alpha plane after the color pixel plane. If not, then this data
1201  * will not exist and should not be accessed in any way. This plane is
1202  * a set of pixels with 1 byte per pixel defining the alpha values of
1203  * all pixels in the image from the top-left to the bottom right of
1204  * the image, row by row. Even though the values of the alpha pixels
1205  * can be 0 to 255, only values 0 through to 32 are used, 32 being
1206  * solid and 0 being transparent.
1207  *
1208  * RGB values can be 0 to 31 for red and blue and 0 to 63 for green,
1209  * with 0 being black and 31 or 63 being full red, green or blue
1210  * respectively. This colorspace is also pre-multiplied like
1211  * EVAS_COLORSPACE_ARGB8888 so:
1212  *
1213  * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32;
1214  *
1215  * EVAS_COLORSPACE_A8:
1216  *
1217  * The image is just a alpha mask (8 bit's per pixel).  This is used for alpha
1218  * masking.
1219  *
1220  * @ingroup Evas_Object_Specific
1221  */
1222 typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o);
1223    
1224    EAPI Evas_Object             *evas_object_image_add                    (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1225    EAPI Evas_Object             *evas_object_image_filled_add             (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1226
1227    EAPI void                     evas_object_image_file_set               (Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1);
1228    EAPI void                     evas_object_image_file_get               (const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2);
1229    EAPI void                     evas_object_image_border_set             (Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1);
1230    EAPI void                     evas_object_image_border_get             (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
1231    EAPI void                     evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill) EINA_ARG_NONNULL(1);
1232    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;
1233    EAPI void                     evas_object_image_filled_set             (Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
1234    EAPI Eina_Bool                evas_object_image_filled_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1235    EAPI void                     evas_object_image_border_scale_set       (Evas_Object *obj, double scale);
1236    EAPI double                   evas_object_image_border_scale_get       (const Evas_Object *obj);
1237    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);
1238    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);
1239    EAPI void                     evas_object_image_fill_spread_set        (Evas_Object *obj, Evas_Fill_Spread spread) EINA_ARG_NONNULL(1);
1240    EAPI Evas_Fill_Spread         evas_object_image_fill_spread_get        (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1241    EAPI void                     evas_object_image_size_set               (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
1242    EAPI void                     evas_object_image_size_get               (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
1243    EAPI int                      evas_object_image_stride_get             (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1244    EAPI Evas_Load_Error          evas_object_image_load_error_get         (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1245    EAPI void                     evas_object_image_data_set               (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
1246    EAPI void                    *evas_object_image_data_convert           (Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1247    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;
1248    EAPI void                     evas_object_image_data_copy_set          (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
1249    EAPI void                     evas_object_image_data_update_add        (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
1250    EAPI void                     evas_object_image_alpha_set              (Evas_Object *obj, Eina_Bool has_alpha) EINA_ARG_NONNULL(1);
1251    EAPI Eina_Bool                evas_object_image_alpha_get              (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1252    EAPI void                     evas_object_image_smooth_scale_set       (Evas_Object *obj, Eina_Bool smooth_scale) EINA_ARG_NONNULL(1);
1253    EAPI Eina_Bool                evas_object_image_smooth_scale_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1254    EAPI void                     evas_object_image_preload                (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
1255    EAPI void                     evas_object_image_reload                 (Evas_Object *obj) EINA_ARG_NONNULL(1);
1256    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);
1257    EAPI Eina_Bool                evas_object_image_pixels_import          (Evas_Object *obj, Evas_Pixel_Import_Source *pixels) EINA_ARG_NONNULL(1, 2);
1258    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);
1259    EAPI void                     evas_object_image_pixels_dirty_set       (Evas_Object *obj, Eina_Bool dirty) EINA_ARG_NONNULL(1);
1260    EAPI Eina_Bool                evas_object_image_pixels_dirty_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1261    EAPI void                     evas_object_image_load_dpi_set           (Evas_Object *obj, double dpi) EINA_ARG_NONNULL(1);
1262    EAPI double                   evas_object_image_load_dpi_get           (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1263    EAPI void                     evas_object_image_load_size_set          (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
1264    EAPI void                     evas_object_image_load_size_get          (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
1265    EAPI void                     evas_object_image_load_scale_down_set    (Evas_Object *obj, int scale_down) EINA_ARG_NONNULL(1);
1266    EAPI int                      evas_object_image_load_scale_down_get    (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1267    EAPI void                     evas_object_image_load_region_set        (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
1268    EAPI void                     evas_object_image_load_region_get        (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
1269    EAPI void                     evas_object_image_colorspace_set         (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1);
1270    EAPI Evas_Colorspace          evas_object_image_colorspace_get         (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1271    EAPI void                     evas_object_image_native_surface_set     (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2);
1272    EAPI Evas_Native_Surface     *evas_object_image_native_surface_get     (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1273    EAPI void                     evas_object_image_scale_hint_set         (Evas_Object *obj, Evas_Image_Scale_Hint hint) EINA_ARG_NONNULL(1);
1274    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;
1275    EAPI void                     evas_object_image_content_hint_set       (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1);
1276    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;
1277
1278 /**
1279  * @defgroup Evas_Object_Text Text Object Functions
1280  *
1281  * Functions that operate on single line, single style text objects.
1282  *
1283  * For multiline and multiple style text, see @ref Evas_Object_Textblock.
1284  *
1285  * @ingroup Evas_Object_Specific
1286  */
1287    typedef enum _Evas_Text_Style_Type
1288      {
1289         EVAS_TEXT_STYLE_PLAIN,
1290         EVAS_TEXT_STYLE_SHADOW,
1291         EVAS_TEXT_STYLE_OUTLINE,
1292         EVAS_TEXT_STYLE_SOFT_OUTLINE,
1293         EVAS_TEXT_STYLE_GLOW,
1294         EVAS_TEXT_STYLE_OUTLINE_SHADOW,
1295         EVAS_TEXT_STYLE_FAR_SHADOW,
1296         EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW,
1297         EVAS_TEXT_STYLE_SOFT_SHADOW,
1298         EVAS_TEXT_STYLE_FAR_SOFT_SHADOW
1299      } Evas_Text_Style_Type;
1300
1301    EAPI Evas_Object      *evas_object_text_add              (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1302    EAPI void              evas_object_text_font_source_set  (Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1);
1303    EAPI const char       *evas_object_text_font_source_get  (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1304    EAPI void              evas_object_text_font_set         (Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1);
1305    EAPI void              evas_object_text_font_get         (const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1, 2);
1306    EAPI void              evas_object_text_text_set         (Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
1307    EAPI const char       *evas_object_text_text_get         (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1308    EAPI Evas_Coord        evas_object_text_ascent_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1309    EAPI Evas_Coord        evas_object_text_descent_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1310    EAPI Evas_Coord        evas_object_text_max_ascent_get   (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1311    EAPI Evas_Coord        evas_object_text_max_descent_get  (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1312    EAPI Evas_Coord        evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1313    EAPI Evas_Coord        evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1314    EAPI Evas_Coord        evas_object_text_inset_get        (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1315    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);
1316    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);
1317    EAPI int               evas_object_text_last_up_to_pos   (const Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
1318    EAPI Evas_Text_Style_Type evas_object_text_style_get     (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1319    EAPI void              evas_object_text_style_set        (Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1);
1320    EAPI void              evas_object_text_shadow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
1321    EAPI void              evas_object_text_shadow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
1322    EAPI void              evas_object_text_glow_color_set   (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
1323    EAPI void              evas_object_text_glow_color_get   (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
1324    EAPI void              evas_object_text_glow2_color_set  (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
1325    EAPI void              evas_object_text_glow2_color_get  (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
1326    EAPI void              evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
1327    EAPI void              evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
1328    EAPI void              evas_object_text_style_pad_get    (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
1329
1330 /**
1331  * @defgroup Evas_Object_Textblock Textblock Object Functions
1332  *
1333  * Functions used to create and manipulate textblock objects. Unlike
1334  * @ref Evas_Object_Text, these handle complex text, doing multiple
1335  * styles and multiline text based on HTML-like tags. Of these extra
1336  * features will be heavier on memory and processing cost.
1337  *
1338  * @todo put here some usage examples
1339  *
1340  * @ingroup Evas_Object_Specific
1341  */
1342    typedef struct _Evas_Textblock_Style                 Evas_Textblock_Style;
1343    typedef struct _Evas_Textblock_Cursor                Evas_Textblock_Cursor;
1344    /**
1345     * @typedef Evas_Object_Textblock_Node_Format
1346     * A format node.
1347     */
1348    typedef struct _Evas_Object_Textblock_Node_Format    Evas_Object_Textblock_Node_Format;
1349    typedef struct _Evas_Textblock_Rectangle             Evas_Textblock_Rectangle;
1350
1351    struct _Evas_Textblock_Rectangle
1352      {
1353         Evas_Coord x, y, w, h;
1354      };
1355
1356    typedef enum _Evas_Textblock_Text_Type
1357      {
1358         EVAS_TEXTBLOCK_TEXT_RAW,
1359         EVAS_TEXTBLOCK_TEXT_PLAIN,
1360         EVAS_TEXTBLOCK_TEXT_MARKUP
1361      } Evas_Textblock_Text_Type;
1362
1363    typedef enum _Evas_Textblock_Cursor_Type
1364      {
1365         EVAS_TEXTBLOCK_CURSOR_UNDER,
1366         EVAS_TEXTBLOCK_CURSOR_BEFORE
1367      } Evas_Textblock_Cursor_Type;
1368
1369    EAPI Evas_Object                 *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1370
1371    EAPI const char                  *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1372    EAPI const char                  *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1373    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;
1374
1375    EAPI Evas_Textblock_Style        *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
1376    EAPI void                         evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
1377    EAPI void                         evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1);
1378    EAPI const char                  *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1379
1380    EAPI void                         evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
1381    EAPI const Evas_Textblock_Style  *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1382    EAPI void                         evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) EINA_ARG_NONNULL(1);
1383    EAPI const char                  *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1384
1385    EAPI void                         evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
1386    EAPI void                         evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
1387    EAPI const char                  *evas_object_textblock_text_markup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
1388
1389    EAPI const Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1390    EAPI Evas_Textblock_Cursor       *evas_object_textblock_cursor_new(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1391
1392    EAPI void                         evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1393
1394    EAPI void                         evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1395    EAPI void                         evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1396    EAPI Eina_Bool                    evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1397    EAPI Eina_Bool                    evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1398    EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
1399    EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
1400    EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
1401    EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
1402    EAPI void                         evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
1403    EAPI void                         evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
1404    EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1405    EAPI const char                  *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1406    EAPI void                         evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2);
1407    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;
1408    EAPI Eina_Bool                    evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1409    EAPI Eina_Bool                    evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1410    EAPI Eina_Bool                    evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1411    EAPI Eina_Bool                    evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1412    EAPI Eina_Bool                    evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1413    EAPI void                         evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1414    EAPI void                         evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1415    EAPI void                         evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1416    EAPI void                         evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1417    EAPI int                          evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1418    EAPI void                         evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos) EINA_ARG_NONNULL(1);
1419    EAPI Eina_Bool                    evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1);
1420    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;
1421    EAPI void                         evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) EINA_ARG_NONNULL(1, 2);
1422
1423    EAPI int                          evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
1424    EAPI int                          evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
1425
1426    EAPI Eina_Bool                    evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
1427    EAPI Eina_Bool                    evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
1428    EAPI void                         evas_textblock_cursor_node_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1429    EAPI void                         evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
1430    EAPI void                         evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2);
1431
1432    EAPI const char                  *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1433    EAPI int                          evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1434    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;
1435    EAPI char                        *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1436
1437    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);
1438    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);
1439    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);
1440    EAPI Eina_Bool                    evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
1441    EAPI int                          evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
1442    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;
1443    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);
1444
1445    EAPI Eina_Bool                    evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1446
1447    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);
1448    EAPI void                         evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
1449    EAPI void                         evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1450    EAPI void                         evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1451    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);
1452
1453 /**
1454  * @defgroup Evas_Line_Group Line Object Functions
1455  *
1456  * Functions used to deal with evas line objects.
1457  *
1458  * @ingroup Evas_Object_Specific
1459  */
1460    EAPI Evas_Object      *evas_object_line_add              (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1461    EAPI void              evas_object_line_xy_set           (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2);
1462    EAPI void              evas_object_line_xy_get           (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2);
1463
1464 /**
1465  * @defgroup Evas_Object_Polygon Polygon Object Functions
1466  *
1467  * Functions that operate on evas polygon objects.
1468  *
1469  * Hint: as evas does not provide ellipse, smooth paths or circle, one
1470  * can calculate points and convert these to a polygon.
1471  *
1472  * @ingroup Evas_Object_Specific
1473  */
1474    EAPI Evas_Object      *evas_object_polygon_add           (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1475    EAPI void              evas_object_polygon_point_add     (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
1476    EAPI void              evas_object_polygon_points_clear  (Evas_Object *obj) EINA_ARG_NONNULL(1);
1477
1478 /**
1479  * @defgroup Evas_Smart_Group Smart Functions
1480  *
1481  * Functions that deal with Evas_Smart's, creating definition
1482  * (classes) of objects that will have customized behavior for methods
1483  * like evas_object_move(), evas_object_resize(),
1484  * evas_object_clip_set() and others.
1485  *
1486  * These objects will accept the generic methods defined in @ref
1487  * Evas_Object_Group and the extensions defined in @ref
1488  * Evas_Smart_Object_Group. There are couple of existent smart objects
1489  * in Evas itself, see @ref Evas_Object_Box, @ref Evas_Object_Table
1490  * and @ref Evas_Smart_Object_Clipped.
1491  */
1492
1493 /**
1494  * @def EVAS_SMART_CLASS_VERSION
1495  * The version you have to put into the version field in the smart
1496  * class struct
1497  * @ingroup Evas_Smart_Group
1498  */
1499 #define EVAS_SMART_CLASS_VERSION 4
1500 /**
1501  * @struct _Evas_Smart_Class
1502  * a smart object class
1503  * @ingroup Evas_Smart_Group
1504  */
1505 struct _Evas_Smart_Class
1506 {
1507    const char *name; /**< the string name of the class */
1508    int         version;
1509    void  (*add)         (Evas_Object *o);
1510    void  (*del)         (Evas_Object *o);
1511    void  (*move)        (Evas_Object *o, Evas_Coord x, Evas_Coord y);
1512    void  (*resize)      (Evas_Object *o, Evas_Coord w, Evas_Coord h);
1513    void  (*show)        (Evas_Object *o);
1514    void  (*hide)        (Evas_Object *o);
1515    void  (*color_set)   (Evas_Object *o, int r, int g, int b, int a);
1516    void  (*clip_set)    (Evas_Object *o, Evas_Object *clip);
1517    void  (*clip_unset)  (Evas_Object *o);
1518    void  (*calculate)   (Evas_Object *o);
1519    void  (*member_add)  (Evas_Object *o, Evas_Object *child);
1520    void  (*member_del)  (Evas_Object *o, Evas_Object *child);
1521
1522    const Evas_Smart_Class          *parent; /**< this class inherits from this parent */
1523    const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, NULL terminated */
1524    void                            *interfaces; /**< to be used in a future near you */
1525    const void                      *data;
1526 };
1527
1528 /**
1529  * @struct _Evas_Smart_Cb_Description
1530  *
1531  * Describes a callback used by a smart class
1532  * evas_object_smart_callback_call(), particularly useful to explain
1533  * to user and its code (ie: introspection) what the parameter @c
1534  * event_info will contain.
1535  *
1536  * @ingroup Evas_Smart_Group
1537  */
1538 struct _Evas_Smart_Cb_Description
1539 {
1540    const char *name; /**< callback name, ie: "changed" */
1541
1542    /**
1543     * @brief Hint type of @c event_info parameter of Evas_Smart_Cb.
1544     *
1545     * The type string uses the pattern similar to
1546     *
1547     * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures
1548     *
1549     * but extended to optionally include variable names within
1550     * brackets preceding types. Example:
1551     *
1552     * @li Structure with two integers:
1553     *     @c "(ii)"
1554     *
1555     * @li Structure called 'x' with two integers named 'a' and 'b':
1556     *     @c "[x]([a]i[b]i)"
1557     *
1558     * @li Array of integers:
1559     *     @c "ai"
1560     *
1561     * @li Array called 'x' of struct with two integers:
1562     *     @c "[x]a(ii)"
1563     *
1564     * @note This type string is used as a hint and is @b not validated
1565     *       or enforced anyhow. Implementors should make the best use
1566     *       of it to help bindings, documentation and other users of
1567     *       introspection features.
1568     */
1569    const char *type;
1570 };
1571
1572 /**
1573  * @def EVAS_SMART_CLASS_INIT_NULL
1574  * Initializer to zero a whole Evas_Smart_Class structure.
1575  *
1576  * @see EVAS_SMART_CLASS_INIT_VERSION
1577  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1578  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1579  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1580  * @ingroup Evas_Smart_Group
1581  */
1582 #define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
1583
1584 /**
1585  * @def EVAS_SMART_CLASS_INIT_VERSION
1586  * Initializer to zero a whole Evas_Smart_Class structure and set version.
1587  *
1588  * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
1589  * latest EVAS_SMART_CLASS_VERSION.
1590  *
1591  * @see EVAS_SMART_CLASS_INIT_NULL
1592  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1593  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1594  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1595  * @ingroup Evas_Smart_Group
1596  */
1597 #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}
1598
1599 /**
1600  * @def EVAS_SMART_CLASS_INIT_NAME_VERSION
1601  * Initializer to zero a whole Evas_Smart_Class structure and set name
1602  * and version.
1603  *
1604  * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
1605  * latest EVAS_SMART_CLASS_VERSION and name to the specified value.
1606  *
1607  * It will keep a reference to name field as a "const char *", that is,
1608  * name must be available while the structure is used (hint: static or global!)
1609  * and will not be modified.
1610  *
1611  * @see EVAS_SMART_CLASS_INIT_NULL
1612  * @see EVAS_SMART_CLASS_INIT_VERSION
1613  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1614  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1615  * @ingroup Evas_Smart_Group
1616  */
1617 #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}
1618
1619 /**
1620  * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1621  * Initializer to zero a whole Evas_Smart_Class structure and set name,
1622  * version and parent class.
1623  *
1624  * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
1625  * latest EVAS_SMART_CLASS_VERSION, name to the specified value and
1626  * parent class.
1627  *
1628  * It will keep a reference to name field as a "const char *", that is,
1629  * name must be available while the structure is used (hint: static or global!)
1630  * and will not be modified. Similarly, parent reference will be kept.
1631  *
1632  * @see EVAS_SMART_CLASS_INIT_NULL
1633  * @see EVAS_SMART_CLASS_INIT_VERSION
1634  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1635  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1636  * @ingroup Evas_Smart_Group
1637  */
1638 #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}
1639
1640 /**
1641  * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
1642  * Initializer to zero a whole Evas_Smart_Class structure and set name,
1643  * version, parent class and callbacks definition.
1644  *
1645  * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
1646  * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent
1647  * class and callbacks at this level.
1648  *
1649  * It will keep a reference to name field as a "const char *", that is,
1650  * name must be available while the structure is used (hint: static or global!)
1651  * and will not be modified. Similarly, parent and callbacks reference
1652  * will be kept.
1653  *
1654  * @see EVAS_SMART_CLASS_INIT_NULL
1655  * @see EVAS_SMART_CLASS_INIT_VERSION
1656  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1657  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
1658  * @ingroup Evas_Smart_Group
1659  */
1660 #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}
1661
1662 /**
1663  * @def EVAS_SMART_SUBCLASS_NEW
1664  *
1665  * Convenience macro to subclass a Smart Class.
1666  *
1667  * This macro saves some typing when writing a Smart Class derived from
1668  * another one. In order to work, the user needs to provide some functions
1669  * adhering to the following guidelines.
1670  *  - @<prefix@>_smart_set_user(): the internal _smart_set function will call
1671  *    this one provided by the user after inheriting everything from the
1672  *    parent, which should take care of setting the right member functions
1673  *    for the class.
1674  *  - @<prefix@>_parent_sc: pointer to the smart class of the parent. When calling
1675  *    parent functions from overloaded ones, use this global variable.
1676  *  - @<prefix@>_smart_class_new(): this function returns the Evas_Smart needed
1677  *    to create smart objects with this class, should be called by the public
1678  *    _add() function.
1679  *  - If this new class should be subclassable as well, a public _smart_set()
1680  *    function is desirable to fill the class used as parent by the children.
1681  *    It's up to the user to provide this interface, which will most likely
1682  *    call @<prefix@>_smart_set() to get the job done.
1683  *
1684  * @param smart_name The name used for the Smart Class. e.g: "Evas_Object_Box".
1685  * @param prefix Prefix used for all variables and functions defined.
1686  * @param api_type Type of the structure used as API for the Smart Class. Either Evas_Smart_Class or something derived from it.
1687  * @param parent_type Type of the parent class API.
1688  * @param parent_func Function that gets the parent class. e.g: evas_object_box_smart_class_get().
1689  * @param cb_desc Array of callback descriptions for this Smart Class.
1690  *
1691  * @ingroup Evas_Smart_Group
1692  */
1693 #define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \
1694   static const parent_type * prefix##_parent_sc = NULL;                 \
1695   static void prefix##_smart_set_user(api_type *api);                   \
1696   static void prefix##_smart_set(api_type *api)                         \
1697   {                                                                     \
1698      Evas_Smart_Class *sc;                                              \
1699      if (!(sc = (Evas_Smart_Class *)api))                               \
1700        return;                                                          \
1701      if (!prefix##_parent_sc)                                           \
1702        prefix##_parent_sc = parent_func();                              \
1703      evas_smart_class_inherit(sc, (const Evas_Smart_Class *)prefix##_parent_sc); \
1704      prefix##_smart_set_user(api);                                      \
1705   }                                                                     \
1706   static Evas_Smart * prefix##_smart_class_new(void)                    \
1707   {                                                                     \
1708      static Evas_Smart *smart = NULL;                                   \
1709      static api_type api;                                               \
1710      if (!smart)                                                        \
1711        {                                                                \
1712           Evas_Smart_Class *sc = (Evas_Smart_Class *)&api;              \
1713           memset(&api, 0, sizeof(api_type));                            \
1714           sc->version = EVAS_SMART_CLASS_VERSION;                       \
1715           sc->name = smart_name;                                        \
1716           sc->callbacks = cb_desc;                                      \
1717           prefix##_smart_set(&api);                                     \
1718           smart = evas_smart_class_new(sc);                             \
1719        }                                                                \
1720      return smart;                                                      \
1721   }
1722
1723 /**
1724  * @def EVAS_SMART_DATA_ALLOC
1725  * Convenience macro to allocate smart data only if needed.
1726  *
1727  * When writing a subclassable smart object, the .add function will need
1728  * to check if the smart private data was already allocated by some child
1729  * object or not. This macro makes it easier to do it.
1730  *
1731  * @param o Evas object passed to the .add function
1732  * @param priv_type The type of the data to allocate
1733  * @ingroup Evas_Smart_Group
1734  */
1735 #define EVAS_SMART_DATA_ALLOC(o, priv_type) \
1736    priv_type *priv; \
1737    priv = evas_object_smart_data_get(o); \
1738    if (!priv) { \
1739       priv = (priv_type *)calloc(1, sizeof(priv_type)); \
1740       if (!priv) return; \
1741       evas_object_smart_data_set(o, priv); \
1742    }
1743
1744    EAPI void                             evas_smart_free                     (Evas_Smart *s) EINA_ARG_NONNULL(1);
1745    EAPI Evas_Smart                      *evas_smart_class_new                (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
1746    EAPI const Evas_Smart_Class          *evas_smart_class_get                (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1747
1748    EAPI void                            *evas_smart_data_get                 (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1749    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;
1750
1751    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);
1752   /**
1753    * @def evas_smart_class_inherit
1754    * Easy to use version of evas_smart_class_inherit_full().
1755    *
1756    * This version will use sizeof(parent_sc), copying everything.
1757    *
1758    * @param sc child class, will have methods copied from @a parent_sc
1759    * @param parent_sc parent class, will provide contents to be copied.
1760    * @return 1 on success, 0 on failure.
1761    * @ingroup Evas_Smart_Group
1762    */
1763 #define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, parent_sc, sizeof(*parent_sc))
1764
1765 /**
1766  * @defgroup Evas_Smart_Object_Group Smart Object Functions
1767  *
1768  * Functions dealing with evas smart objects (instances).
1769  *
1770  * Smart objects are groupings of primitive evas objects that behave as a
1771  * cohesive group. For instance, a file manager icon may be a smart object
1772  * composed of an image object, a text label and two rectangles that appear
1773  * behind the image and text when the icon is selected. As a smart object,
1774  * the normal evas api could be used on the icon object.
1775  *
1776  * @see @ref Evas_Smart_Group for class definitions.
1777  */
1778    EAPI Evas_Object      *evas_object_smart_add             (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
1779    EAPI void              evas_object_smart_member_add      (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2);
1780    EAPI void              evas_object_smart_member_del      (Evas_Object *obj) EINA_ARG_NONNULL(1);
1781    EAPI Evas_Object      *evas_object_smart_parent_get      (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1782    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;
1783    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;
1784    EAPI Eina_List        *evas_object_smart_members_get     (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1785    EAPI Evas_Smart       *evas_object_smart_smart_get       (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1786    EAPI void             *evas_object_smart_data_get        (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1787    EAPI void              evas_object_smart_data_set        (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
1788    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);
1789    EAPI void             *evas_object_smart_callback_del    (Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3);
1790    EAPI void              evas_object_smart_callback_call   (Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2);
1791
1792    EAPI Eina_Bool         evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) EINA_ARG_NONNULL(1);
1793    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);
1794    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);
1795
1796    EAPI void              evas_object_smart_changed         (Evas_Object *obj) EINA_ARG_NONNULL(1);
1797    EAPI void              evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
1798    EAPI Eina_Bool         evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1799    EAPI void              evas_object_smart_calculate       (Evas_Object *obj) EINA_ARG_NONNULL(1);
1800
1801    EAPI void              evas_smart_objects_calculate      (Evas *e);
1802
1803 /**
1804  * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object
1805  *
1806  * Clipped smart object is a base to construct other smart objects
1807  * that based on the concept of having an internal clipper that is
1808  * applied to all its other children. This clipper will control the
1809  * visibility, clipping and color of sibling objects (remember that
1810  * the clipping is recursive, and clipper color modulates the color of
1811  * its clippees). By default, this base will also move children
1812  * relatively to the parent, and delete them when parent is
1813  * deleted. In other words, it is the base for simple object grouping.
1814  *
1815  * @see evas_object_smart_clipped_smart_set()
1816  *
1817  * @ingroup Evas_Smart_Object_Group
1818  */
1819
1820 /**
1821  * Every subclass should provide this at the beginning of their own
1822  * data set with evas_object_smart_data_set().
1823  */
1824   typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data;
1825   struct _Evas_Object_Smart_Clipped_Data
1826   {
1827      Evas_Object *clipper;
1828      Evas        *evas;
1829   };
1830
1831    EAPI Evas_Object            *evas_object_smart_clipped_clipper_get   (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
1832    EAPI void                    evas_object_smart_clipped_smart_set     (Evas_Smart_Class *sc) EINA_ARG_NONNULL(1);
1833    EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get     (void) EINA_CONST;
1834
1835    EAPI void                    evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1);
1836
1837 /**
1838  * @defgroup Evas_Object_Box Box (Sequence) Smart Object.
1839  *
1840  * Convenience smart object that packs children as a sequence using
1841  * a layout function specified by user. There are a couple of helper
1842  * layout functions, all of them using children size hints to define
1843  * their size and alignment inside their cell space.
1844  *
1845  * @see @ref Evas_Object_Group_Size_Hints
1846  *
1847  * @ingroup Evas_Smart_Object_Group
1848  */
1849 /**
1850  * @typedef Evas_Object_Box_Api
1851  * Smart Class extension providing extra box requirements.
1852  * @ingroup Evas_Object_Box
1853  */
1854    typedef struct _Evas_Object_Box_Api        Evas_Object_Box_Api;
1855 /**
1856  * @typedef Evas_Object_Box_Data
1857  * Smart instance data providing box requirements.
1858  * @ingroup Evas_Object_Box
1859  */
1860    typedef struct _Evas_Object_Box_Data       Evas_Object_Box_Data;
1861 /**
1862  * @typedef Evas_Object_Box_Option
1863  * The base structure for a box option.
1864  * @ingroup Evas_Object_Box
1865  */
1866    typedef struct _Evas_Object_Box_Option     Evas_Object_Box_Option;
1867    typedef void (*Evas_Object_Box_Layout) (Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data);
1868
1869 /**
1870  * @def EVAS_OBJECT_BOX_API_VERSION
1871  * @ingroup Evas_Object_Box
1872  */
1873 #define EVAS_OBJECT_BOX_API_VERSION 1
1874 /**
1875  * @struct _Evas_Object_Box_Api
1876  *
1877  * This structure should be used by any class that wants to inherit
1878  * from box to provide custom behavior not allowed only by providing a
1879  * layout function with evas_object_box_layout_set().
1880  *
1881  * @extends Evas_Smart_Class
1882  * @ingroup Evas_Object_Box
1883  */
1884    struct _Evas_Object_Box_Api
1885    {
1886       Evas_Smart_Class          base;
1887       int                       version;
1888       Evas_Object_Box_Option *(*append)           (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
1889       Evas_Object_Box_Option *(*prepend)          (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
1890       Evas_Object_Box_Option *(*insert_before)    (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference);
1891       Evas_Object_Box_Option *(*insert_after)     (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference);
1892       Evas_Object_Box_Option *(*insert_at)        (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos);
1893       Evas_Object            *(*remove)           (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
1894       Evas_Object            *(*remove_at)        (Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos);
1895       Eina_Bool               (*property_set)     (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args);
1896       Eina_Bool               (*property_get)     (Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args);
1897       const char             *(*property_name_get)(Evas_Object *o, int property);
1898       int                     (*property_id_get)  (Evas_Object *o, const char *name);
1899       Evas_Object_Box_Option *(*option_new)       (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child);
1900       void                    (*option_free)      (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt);
1901    };
1902
1903 /**
1904  * @def EVAS_OBJECT_BOX_API_INIT
1905  * Initializer for whole Evas_Object_Box_Api structure.
1906  *
1907  * @param smart_class_init initializer to use for the "base" field
1908  * (Evas_Smart_Class).
1909  *
1910  * @see EVAS_SMART_CLASS_INIT_NULL
1911  * @see EVAS_SMART_CLASS_INIT_VERSION
1912  * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
1913  * @see EVAS_OBJECT_BOX_API_INIT_NULL
1914  * @see EVAS_OBJECT_BOX_API_INIT_VERSION
1915  * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
1916  * @ingroup Evas_Object_Box
1917  */
1918 #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}
1919
1920 /**
1921  * @def EVAS_OBJECT_BOX_API_INIT_NULL
1922  * Initializer to zero a whole Evas_Object_Box_Api structure.
1923  *
1924  * @see EVAS_OBJECT_BOX_API_INIT_VERSION
1925  * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
1926  * @see EVAS_OBJECT_BOX_API_INIT
1927  * @ingroup Evas_Object_Box
1928  */
1929 #define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
1930
1931 /**
1932  * @def EVAS_OBJECT_BOX_API_INIT_VERSION
1933  * Initializer to zero a whole Evas_Object_Box_Api structure and set version.
1934  *
1935  * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of
1936  * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION
1937  *
1938  * @see EVAS_OBJECT_BOX_API_INIT_NULL
1939  * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
1940  * @see EVAS_OBJECT_BOX_API_INIT
1941  * @ingroup Evas_Object_Box
1942  */
1943 #define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
1944
1945 /**
1946  * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
1947  * Initializer to zero a whole Evas_Object_Box_Api structure and set
1948  * name and version.
1949  *
1950  * Similar to EVAS_OBJECT_BOX_API_INIT_NULL, but will set version field of
1951  * Evas_Smart_Class (base field) to latest EVAS_SMART_CLASS_VERSION and name
1952  * to the specific value.
1953  *
1954  * It will keep a reference to name field as a "const char *", that is,
1955  * name must be available while the structure is used (hint: static or global!)
1956  * and will not be modified.
1957  *
1958  * @see EVAS_OBJECT_BOX_API_INIT_NULL
1959  * @see EVAS_OBJECT_BOX_API_INIT_VERSION
1960  * @see EVAS_OBJECT_BOX_API_INIT
1961  * @ingroup Evas_Object_Box
1962  */
1963 #define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
1964
1965 /**
1966  * @struct _Evas_Object_Box_Data
1967  *
1968  * This structure augments clipped smart object's instance data,
1969  * providing extra members required by generic box implementation. If
1970  * a subclass inherits from #Evas_Object_Box_Api then it may augment
1971  * #Evas_Object_Box_Data to fit its own needs.
1972  *
1973  * @extends Evas_Object_Smart_Clipped_Data
1974  * @ingroup Evas_Object_Box
1975  */
1976    struct _Evas_Object_Box_Data
1977    {
1978       Evas_Object_Smart_Clipped_Data   base;
1979       const Evas_Object_Box_Api       *api;
1980       struct {
1981          double                        h, v;
1982       } align;
1983       struct {
1984          Evas_Coord                    h, v;
1985       } pad;
1986       Eina_List                       *children;
1987       struct {
1988          Evas_Object_Box_Layout        cb;
1989          void                         *data;
1990          void                        (*free_data)(void *data);
1991       } layout;
1992       Eina_Bool                        layouting : 1;
1993       Eina_Bool                        children_changed : 1;
1994    };
1995
1996    struct _Evas_Object_Box_Option
1997    {
1998       Evas_Object *obj;
1999       Eina_Bool    max_reached:1;
2000       Eina_Bool    min_reached:1;
2001       Evas_Coord   alloc_size;
2002    };
2003
2004    EAPI void                       evas_object_box_smart_set                             (Evas_Object_Box_Api *api) EINA_ARG_NONNULL(1);
2005    EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get                       (void) EINA_CONST;
2006    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);
2007
2008    EAPI Evas_Object               *evas_object_box_add                                   (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2009    EAPI Evas_Object               *evas_object_box_add_to                                (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2010
2011    EAPI void                       evas_object_box_layout_horizontal                     (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
2012    EAPI void                       evas_object_box_layout_vertical                       (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
2013    EAPI void                       evas_object_box_layout_homogeneous_vertical           (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
2014    EAPI void                       evas_object_box_layout_homogeneous_horizontal         (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
2015    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);
2016    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);
2017    EAPI void                       evas_object_box_layout_flow_horizontal                (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
2018    EAPI void                       evas_object_box_layout_flow_vertical                  (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
2019    EAPI void                       evas_object_box_layout_stack                          (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
2020
2021    EAPI void                       evas_object_box_align_set                             (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
2022    EAPI void                       evas_object_box_align_get                             (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
2023    EAPI void                       evas_object_box_padding_set                           (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
2024    EAPI void                       evas_object_box_padding_get                           (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
2025
2026    EAPI Evas_Object_Box_Option    *evas_object_box_append                                (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
2027    EAPI Evas_Object_Box_Option    *evas_object_box_prepend                               (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
2028    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);
2029    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);
2030    EAPI Evas_Object_Box_Option    *evas_object_box_insert_at                             (Evas_Object *o, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1, 2);
2031    EAPI Eina_Bool                  evas_object_box_remove                                (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
2032    EAPI Eina_Bool                  evas_object_box_remove_at                             (Evas_Object *o, unsigned int pos) EINA_ARG_NONNULL(1);
2033    EAPI Eina_Bool                  evas_object_box_remove_all                            (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
2034    EAPI Eina_Iterator             *evas_object_box_iterator_new                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2035    EAPI Eina_Accessor             *evas_object_box_accessor_new                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2036    EAPI Eina_List                 *evas_object_box_children_get                          (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2037
2038    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;
2039    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;
2040    EAPI Eina_Bool                  evas_object_box_option_property_set                   (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
2041    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);
2042    EAPI Eina_Bool                  evas_object_box_option_property_get                   (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
2043    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);
2044
2045 /**
2046  * @defgroup Evas_Object_Table Table Smart Object.
2047  *
2048  * Convenience smart object that packs children using a tabular
2049  * layout using children size hints to define their size and
2050  * alignment inside their cell space.
2051  *
2052  * @see @ref Evas_Object_Group_Size_Hints
2053  *
2054  * @ingroup Evas_Smart_Object_Group
2055  */
2056    EAPI Evas_Object                        *evas_object_table_add             (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2057    EAPI Evas_Object                        *evas_object_table_add_to          (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2058    EAPI void                                evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1);
2059    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;
2060    EAPI void                                evas_object_table_padding_set     (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
2061    EAPI void                                evas_object_table_padding_get     (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
2062    EAPI void                                evas_object_table_align_set       (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
2063    EAPI void                                evas_object_table_align_get       (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
2064
2065    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);
2066    EAPI Eina_Bool                           evas_object_table_unpack          (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
2067    EAPI void                                evas_object_table_clear           (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
2068
2069    EAPI void                                evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) EINA_ARG_NONNULL(1);
2070    EAPI Eina_Iterator                      *evas_object_table_iterator_new    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2071    EAPI Eina_Accessor                      *evas_object_table_accessor_new    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2072    EAPI Eina_List                          *evas_object_table_children_get    (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
2073    EAPI Evas_Object                        *evas_object_table_child_get       (const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1);
2074
2075    EAPI Eina_Bool                            evas_object_image_source_set     (Evas_Object *o, Evas_Object *source);
2076    EAPI Evas_Object                         *evas_object_image_source_get     (Evas_Object *o);
2077    EAPI Eina_Bool                            evas_object_image_source_unset   (Evas_Object *o);
2078
2079 /**
2080  * @defgroup Evas_Cserve Shared Image Cache Server
2081  *
2082  * Provides client-server infrastructure to share bitmaps across
2083  * multiple processes, saving data and processing power.
2084  */
2085    typedef struct _Evas_Cserve_Stats       Evas_Cserve_Stats;
2086    typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache;
2087    typedef struct _Evas_Cserve_Image       Evas_Cserve_Image;
2088    typedef struct _Evas_Cserve_Config      Evas_Cserve_Config;
2089
2090 /**
2091  * Statistics about server that shares cached bitmaps.
2092  * @ingroup Evas_Cserve
2093  */
2094    struct _Evas_Cserve_Stats
2095      {
2096         int    saved_memory; /**< current saved memory, in bytes */
2097         int    wasted_memory; /**< current wasted memory, in bytes */
2098         int    saved_memory_peak; /**< peak of saved memory, in bytes */
2099         int    wasted_memory_peak; /**< peak of wasted memory, in bytes */
2100         double saved_time_image_header_load; /**< time, in seconds, saved in header loads by sharing cached loads instead */
2101         double saved_time_image_data_load; /**< time, in seconds, saved in data loads by sharing cached loads instead */
2102      };
2103
2104 /**
2105  * Cache of images shared by server.
2106  * @ingroup Evas_Cserve
2107  */
2108    struct _Evas_Cserve_Image_Cache
2109      {
2110         struct {
2111            int     mem_total;
2112            int     count;
2113         } active, cached;
2114         Eina_List *images;
2115      };
2116
2117 /**
2118  * An image shared by the server.
2119  * @ingroup Evas_Cserve
2120  */
2121    struct _Evas_Cserve_Image
2122      {
2123         const char *file, *key;
2124         int         w, h;
2125         time_t      file_mod_time;
2126         time_t      file_checked_time;
2127         time_t      cached_time;
2128         int         refcount;
2129         int         data_refcount;
2130         int         memory_footprint;
2131         double      head_load_time;
2132         double      data_load_time;
2133         Eina_Bool   alpha : 1;
2134         Eina_Bool   data_loaded : 1;
2135         Eina_Bool   active : 1;
2136         Eina_Bool   dead : 1;
2137         Eina_Bool   useless : 1;
2138      };
2139
2140 /**
2141  * Configuration that controls the server that shares cached bitmaps.
2142  * @ingroup Evas_Cserve
2143  */
2144     struct _Evas_Cserve_Config
2145      {
2146         int cache_max_usage;
2147         int cache_item_timeout;
2148         int cache_item_timeout_check;
2149      };
2150
2151    EAPI Eina_Bool         evas_cserve_want_get                   (void) EINA_WARN_UNUSED_RESULT EINA_PURE;
2152    EAPI Eina_Bool         evas_cserve_connected_get              (void) EINA_WARN_UNUSED_RESULT;
2153    EAPI Eina_Bool         evas_cserve_stats_get                  (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT;
2154    EAPI void              evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache) EINA_PURE;
2155    EAPI Eina_Bool         evas_cserve_config_get                 (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
2156    EAPI Eina_Bool         evas_cserve_config_set                 (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT EINA_PURE;
2157    EAPI void              evas_cserve_disconnect                 (void);
2158
2159 /**
2160  * @defgroup Evas_Utils General Utilities
2161  *
2162  * Some functions that are handy but are not specific of canvas or
2163  * objects.
2164  */
2165    EAPI const char       *evas_load_error_str               (Evas_Load_Error error);
2166
2167 /* Evas utility routines for color space conversions */
2168 /* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */
2169 /* rgb color space has r,g,b in the range 0 to 255 */
2170    EAPI void              evas_color_hsv_to_rgb             (float h, float s, float v, int *r, int *g, int *b);
2171    EAPI void              evas_color_rgb_to_hsv             (int r, int g, int b, float *h, float *s, float *v);
2172
2173 /* argb color space has a,r,g,b in the range 0 to 255 */
2174    EAPI void              evas_color_argb_premul            (int a, int *r, int *g, int *b);
2175    EAPI void              evas_color_argb_unpremul          (int a, int *r, int *g, int *b);
2176
2177    EAPI void              evas_data_argb_premul             (unsigned int *data, unsigned int len);
2178    EAPI void              evas_data_argb_unpremul           (unsigned int *data, unsigned int len);
2179
2180 /* string and font handling */
2181    EAPI int               evas_string_char_next_get         (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
2182    EAPI int               evas_string_char_prev_get         (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
2183    EAPI int               evas_string_char_len_get          (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2184
2185 /**
2186  * TO BE DOCUMENTED:
2187  * @todo document key modifiers.
2188  */
2189    EAPI const Evas_Modifier *evas_key_modifier_get          (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2190    EAPI const Evas_Lock     *evas_key_lock_get              (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
2191    
2192    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;
2193    
2194    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;
2195    
2196    EAPI void                 evas_key_modifier_add          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2197    EAPI void                 evas_key_modifier_del          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2198    EAPI void                 evas_key_lock_add              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2199    EAPI void                 evas_key_lock_del              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2200    
2201    EAPI void                 evas_key_modifier_on           (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2202    EAPI void                 evas_key_modifier_off          (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2203    EAPI void                 evas_key_lock_on               (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2204    EAPI void                 evas_key_lock_off              (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
2205    
2206    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;
2207    
2208    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);
2209    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);
2210
2211 #ifdef __cplusplus
2212 }
2213 #endif
2214
2215 #endif