ad6785a719b3258002cfbbfc59f9fbfb628a926d
[profile/ivi/evas.git] / src / lib / include / evas_private.h
1 #ifndef EVAS_PRIVATE_H
2 #define EVAS_PRIVATE_H
3
4 #ifdef HAVE_CONFIG_H
5 # include <config.h>
6 #endif
7
8 #include <Eina.h>
9 #include <eina_safety_checks.h>
10 #include "Evas.h"
11
12 #include "../file/evas_module.h"
13 #include "../file/evas_path.h"
14 #include "../engines/common/evas_text_utils.h"
15 #include "../engines/common/language/evas_bidi_utils.h"
16 #include "../engines/common/language/evas_language_utils.h"
17
18 #ifdef EVAS_MAGIC_DEBUG
19 /* complain when peole pass in wrong object types etc. */
20 # define MAGIC_DEBUG
21 #endif
22
23 #define RENDER_METHOD_INVALID            0x00000000
24
25 typedef struct _Evas_Layer                  Evas_Layer;
26 typedef struct _Evas_Size                   Evas_Size;
27 typedef struct _Evas_Aspect                 Evas_Aspect;
28 typedef struct _Evas_Border                 Evas_Border;
29 typedef struct _Evas_Double_Pair            Evas_Double_Pair;
30 typedef struct _Evas_Size_Hints             Evas_Size_Hints;
31 typedef struct _Evas_Font_Dir               Evas_Font_Dir;
32 typedef struct _Evas_Font                   Evas_Font;
33 typedef struct _Evas_Font_Alias             Evas_Font_Alias;
34 typedef struct _Evas_Font_Description       Evas_Font_Description;
35 typedef struct _Evas_Data_Node              Evas_Data_Node;
36 typedef struct _Evas_Func_Node              Evas_Func_Node;
37 typedef RGBA_Image_Loadopts                 Evas_Image_Load_Opts;
38 typedef struct _Evas_Func                   Evas_Func;
39 typedef struct _Evas_Image_Load_Func        Evas_Image_Load_Func;
40 typedef struct _Evas_Image_Save_Func        Evas_Image_Save_Func;
41 typedef struct _Evas_Object_Func            Evas_Object_Func;
42 typedef struct _Evas_Intercept_Func         Evas_Intercept_Func;
43 typedef struct _Evas_Key_Grab               Evas_Key_Grab;
44 typedef struct _Evas_Callbacks              Evas_Callbacks;
45 typedef struct _Evas_Format                 Evas_Format;
46 typedef struct _Evas_Map_Point              Evas_Map_Point;
47 typedef struct _Evas_Smart_Cb_Description_Array Evas_Smart_Cb_Description_Array;
48 typedef struct _Evas_Smart_Interfaces_Array Evas_Smart_Interfaces_Array;
49 typedef struct _Evas_Post_Callback          Evas_Post_Callback;
50 typedef struct _Evas_Coord_Touch_Point      Evas_Coord_Touch_Point;
51
52 enum _Evas_Font_Style
53 {
54    EVAS_FONT_STYLE_SLANT,
55    EVAS_FONT_STYLE_WEIGHT,
56    EVAS_FONT_STYLE_WIDTH
57 };
58
59 enum _Evas_Font_Slant
60 {
61    EVAS_FONT_SLANT_NORMAL,
62    EVAS_FONT_SLANT_OBLIQUE,
63    EVAS_FONT_SLANT_ITALIC
64 };
65
66 enum _Evas_Font_Weight
67 {
68    EVAS_FONT_WEIGHT_NORMAL,
69    EVAS_FONT_WEIGHT_THIN,
70    EVAS_FONT_WEIGHT_ULTRALIGHT,
71    EVAS_FONT_WEIGHT_LIGHT,
72    EVAS_FONT_WEIGHT_BOOK,
73    EVAS_FONT_WEIGHT_MEDIUM,
74    EVAS_FONT_WEIGHT_SEMIBOLD,
75    EVAS_FONT_WEIGHT_BOLD,
76    EVAS_FONT_WEIGHT_ULTRABOLD,
77    EVAS_FONT_WEIGHT_BLACK,
78    EVAS_FONT_WEIGHT_EXTRABLACK
79 };
80
81 enum _Evas_Font_Width
82 {
83    EVAS_FONT_WIDTH_NORMAL,
84    EVAS_FONT_WIDTH_ULTRACONDENSED,
85    EVAS_FONT_WIDTH_EXTRACONDENSED,
86    EVAS_FONT_WIDTH_CONDENSED,
87    EVAS_FONT_WIDTH_SEMICONDENSED,
88    EVAS_FONT_WIDTH_SEMIEXPANDED,
89    EVAS_FONT_WIDTH_EXPANDED,
90    EVAS_FONT_WIDTH_EXTRAEXPANDED,
91    EVAS_FONT_WIDTH_ULTRAEXPANDED
92 };
93
94 typedef enum _Evas_Font_Style               Evas_Font_Style;
95 typedef enum _Evas_Font_Slant               Evas_Font_Slant;
96 typedef enum _Evas_Font_Weight              Evas_Font_Weight;
97 typedef enum _Evas_Font_Width               Evas_Font_Width;
98
99 /* General types - used for script type chceking */
100 #define OPAQUE_TYPE(type) struct __##type { int a; }; \
101    typedef struct __##type type
102
103 OPAQUE_TYPE(Evas_Font_Set); /* General type for RGBA_Font */
104 OPAQUE_TYPE(Evas_Font_Instance); /* General type for RGBA_Font_Int */
105 /* End of general types */
106
107 #define MAGIC_EVAS                 0x70777770
108 #define MAGIC_OBJ                  0x71777770
109 #define MAGIC_OBJ_RECTANGLE        0x71777771
110 #define MAGIC_OBJ_LINE             0x71777772
111 #define MAGIC_OBJ_POLYGON          0x71777774
112 #define MAGIC_OBJ_IMAGE            0x71777775
113 #define MAGIC_OBJ_TEXT             0x71777776
114 #define MAGIC_OBJ_SMART            0x71777777
115 #define MAGIC_OBJ_TEXTBLOCK        0x71777778
116 #define MAGIC_OBJ_TEXTGRID         0x7177777A
117 #define MAGIC_SMART                0x72777770
118 #define MAGIC_OBJ_SHAPE            0x72777773
119 #define MAGIC_OBJ_CONTAINER        0x72777774
120 #define MAGIC_OBJ_CUSTOM           0x72777775
121 #define MAGIC_EVAS_GL              0x72777776
122 #define MAGIC_MAP                  0x72777777
123
124 #ifdef MAGIC_DEBUG
125 # define MAGIC_CHECK_FAILED(o, t, m) \
126 {evas_debug_error(); \
127  if (!o) evas_debug_input_null(); \
128  else if (((t *)o)->magic == 0) evas_debug_magic_null(); \
129  else evas_debug_magic_wrong((m), ((t *)o)->magic); \
130 }
131 # define MAGIC_CHECK(o, t, m) \
132 {if ((!o) || (!(((t *)o)->magic == (m)))) { \
133 MAGIC_CHECK_FAILED(o, t, m)
134 # define MAGIC_CHECK_END() }}
135 #else
136 # define MAGIC_CHECK_FAILED(o, t, m)
137 # define MAGIC_CHECK(o, t, m)  { if (!o) {
138 # define MAGIC_CHECK_END() }}
139 #endif
140
141 #define NEW_RECT(_r, _x, _y, _w, _h) (_r) = eina_rectangle_new(_x, _y, _w, _h);
142
143 #define MERR_NONE() _evas_alloc_error = EVAS_ALLOC_ERROR_NONE
144 #define MERR_FATAL() _evas_alloc_error = EVAS_ALLOC_ERROR_FATAL
145 #define MERR_BAD() _evas_alloc_error = EVAS_ALLOC_ERROR_RECOVERED
146
147 #define EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o)                              \
148    if ((o)->cur.file)                                                       \
149      {                                                                      \
150         eina_stringshare_del((o)->cur.file);                                \
151         if ((o)->prev.file == (o)->cur.file)                                \
152           (o)->prev.file = NULL;                                            \
153         (o)->cur.file = NULL;                                               \
154      }                                                                      \
155    if ((o)->cur.key)                                                        \
156      {                                                                      \
157         eina_stringshare_del((o)->cur.key);                                 \
158         if ((o)->prev.key == (o)->cur.key)                                  \
159           (o)->prev.key = NULL;                                             \
160         (o)->cur.key = NULL;                                                \
161      }                                                                      \
162    if ((o)->prev.file)                                                      \
163      {                                                                      \
164         eina_stringshare_del((o)->prev.file);                               \
165         (o)->prev.file = NULL;                                              \
166      }                                                                      \
167    if ((o)->prev.key)                                                       \
168      {                                                                      \
169         eina_stringshare_del((o)->prev.key);                                \
170         (o)->prev.key = NULL;                                               \
171      }
172
173 struct _Evas_Coord_Touch_Point
174 {
175    Evas_Coord x, y; // point's x, y position
176    int id; // id in order to distinguish each point
177    Evas_Touch_Point_State state;
178 };
179
180 struct _Evas_Key_Grab
181 {
182    char               *keyname;
183    Evas_Modifier_Mask  modifiers;
184    Evas_Modifier_Mask  not_modifiers;
185    Evas_Object        *object;
186    Eina_Bool           exclusive : 1;
187    Eina_Bool           just_added : 1;
188    Eina_Bool           delete_me : 1;
189 };
190
191 struct _Evas_Intercept_Func
192 {
193    struct {
194       Evas_Object_Intercept_Show_Cb func;
195       void *data;
196    } show;
197    struct {
198       Evas_Object_Intercept_Hide_Cb func;
199       void *data;
200    } hide;
201    struct {
202       Evas_Object_Intercept_Move_Cb func;
203       void *data;
204    } move;
205    struct {
206       Evas_Object_Intercept_Resize_Cb func;
207       void *data;
208    } resize;
209    struct {
210       Evas_Object_Intercept_Raise_Cb func;
211       void *data;
212    } raise;
213    struct {
214       Evas_Object_Intercept_Lower_Cb func;
215       void *data;
216    } lower;
217    struct {
218       Evas_Object_Intercept_Stack_Above_Cb func;
219       void *data;
220    } stack_above;
221    struct {
222       Evas_Object_Intercept_Stack_Below_Cb func;
223       void *data;
224    } stack_below;
225    struct {
226       Evas_Object_Intercept_Layer_Set_Cb func;
227       void *data;
228    } layer_set;
229    struct {
230       Evas_Object_Intercept_Color_Set_Cb func;
231       void *data;
232    } color_set;
233    struct {
234       Evas_Object_Intercept_Clip_Set_Cb func;
235       void *data;
236    } clip_set;
237    struct {
238       Evas_Object_Intercept_Clip_Unset_Cb func;
239       void *data;
240    } clip_unset;
241 };
242
243 struct _Evas_Smart_Cb_Description_Array
244 {
245    unsigned int                      size;
246    const Evas_Smart_Cb_Description **array;
247 };
248
249 struct _Evas_Smart_Interfaces_Array
250 {
251    unsigned int                 size;
252    const Evas_Smart_Interface **array;
253 };
254
255 struct _Evas_Smart
256 {
257    DATA32            magic;
258
259    int               usage;
260
261    const Evas_Smart_Class *smart_class;
262
263    Evas_Smart_Cb_Description_Array callbacks;
264    Evas_Smart_Interfaces_Array interfaces;
265
266    unsigned char     delete_me : 1;
267    unsigned char     class_allocated : 1;
268
269 };
270
271 struct _Evas_Modifier
272 {
273    struct {
274       int       count;
275       char    **list;
276    } mod;
277    Evas_Modifier_Mask mask; /* ok we have a max of 64 modifiers */
278 };
279
280 struct _Evas_Lock
281 {
282    struct {
283       int       count;
284       char    **list;
285    } lock;
286    Evas_Modifier_Mask mask; /* we have a max of 64 locks */
287 };
288
289 struct _Evas_Post_Callback
290 {
291    Evas_Object               *obj;
292    Evas_Object_Event_Post_Cb  func;
293    const void                *data;
294    unsigned char              delete_me : 1;
295 };
296
297 struct _Evas_Callbacks
298 {
299    Eina_Inlist *callbacks;
300    int               walking_list;
301    unsigned char     deletions_waiting : 1;
302 };
303
304 struct _Evas
305 {
306    EINA_INLIST;
307
308    DATA32            magic;
309
310    struct {
311       unsigned char  inside : 1;
312       int            mouse_grabbed;
313       int            downs;
314       DATA32         button;
315       Evas_Coord     x, y;
316       int            nogrep;
317       struct {
318           Eina_List *in;
319       } object;
320    } pointer;
321
322    struct  {
323       Evas_Coord     x, y, w, h;
324       unsigned char  changed : 1;
325    } viewport;
326
327    struct {
328       int            w, h;
329       DATA32         render_method;
330       unsigned char  changed : 1;
331    } output;
332
333    struct 
334      {
335         Evas_Coord x, y, w, h;
336         Eina_Bool changed : 1;
337         Evas_Object *clip;
338      } framespace;
339
340    Eina_List        *damages;
341    Eina_List        *obscures;
342
343    Evas_Layer       *layers;
344
345    Eina_Hash        *name_hash;
346
347    int               output_validity;
348
349    int               walking_list;
350    int               events_frozen;
351    Evas_Event_Flags  default_event_flags;
352
353    struct {
354       Evas_Module *module;
355       Evas_Func *func;
356       struct {
357          void *output;
358
359          void *context;
360       } data;
361
362       void *info;
363       int   info_magic;
364    } engine;
365
366    Eina_Array     delete_objects;
367    Eina_Array     active_objects;
368    Eina_Array     restack_objects;
369    Eina_Array     render_objects;
370    Eina_Array     pending_objects;
371    Eina_Array     obscuring_objects;
372    Eina_Array     temporary_objects;
373    Eina_Array     calculate_objects;
374    Eina_Array     clip_changes;
375
376    Eina_Clist     calc_list;
377    Eina_Clist     calc_done;
378    Eina_List     *video_objects;
379
380    Eina_List     *post_events; // free me on evas_free
381
382    Evas_Callbacks *callbacks;
383
384    int            delete_grabs;
385    int            walking_grabs;
386    Eina_List     *grabs;
387
388    Eina_List     *font_path;
389
390    int            in_smart_calc;
391    int            smart_calc_count;
392
393    Evas_Object   *focused;
394    void          *attach_data;
395    Evas_Modifier  modifiers;
396    Evas_Lock      locks;
397    unsigned int   last_timestamp;
398    int            last_mouse_down_counter;
399    int            last_mouse_up_counter;
400    int            nochange;
401    Evas_Font_Hinting_Flags hinting;
402    unsigned char  changed : 1;
403    unsigned char  delete_me : 1;
404    unsigned char  invalidate : 1;
405    unsigned char  cleanup : 1;
406    unsigned char  focus : 1;
407
408    Eina_List     *touch_points;
409 };
410
411 struct _Evas_Layer
412 {
413    EINA_INLIST;
414
415    short             layer;
416    Evas_Object      *objects;
417
418    Evas             *evas;
419
420    void             *engine_data;
421    int               usage;
422    unsigned char     delete_me : 1;
423 };
424
425 struct _Evas_Size
426 {
427    Evas_Coord w, h;
428 };
429
430 struct _Evas_Aspect
431 {
432    Evas_Aspect_Control mode;
433    Evas_Size size;
434 };
435
436 struct _Evas_Border
437 {
438    Evas_Coord l, r, t, b;
439 };
440
441 struct _Evas_Double_Pair
442 {
443    double x, y;
444 };
445
446 struct _Evas_Size_Hints
447 {
448    Evas_Size min, max, request;
449    Evas_Aspect aspect;
450    Evas_Double_Pair align, weight;
451    Evas_Border padding;
452 };
453
454 struct _Evas_Map_Point
455 {
456    double x, y, z, px, py;
457    double u, v;
458    unsigned char r, g, b, a;
459 };
460
461 struct _Evas_Map
462 {
463    DATA32                magic;
464    int                   count; // num of points
465    Evas_Coord_Rectangle  normal_geometry; // bounding box of map geom actually
466    void                 *surface; // surface holding map if needed
467    int                   surface_w, surface_h; // current surface w & h alloc
468    Evas_Coord            mx, my; // mouse x, y after conversion to map space
469    struct {
470       Evas_Coord         px, py, z0, foc;
471    } persp;
472    Eina_Bool             alpha : 1;
473    Eina_Bool             smooth : 1;
474    Evas_Map_Point        points[]; // actual points
475 };
476
477 #if 0 // filtering disabled
478 /* nash: Split into two bits */
479 typedef struct Evas_Filter_Info
480 {
481    Evas_Filter filter;
482    Evas_Filter_Mode mode;
483
484    Eina_Bool dirty : 1;
485
486    int datalen;
487    void *data;
488    void (*data_free)(void *);
489
490    uint8_t *key;
491    uint32_t len;
492    Filtered_Image *cached;
493 } Evas_Filter_Info;
494
495 typedef Eina_Bool (*Evas_Software_Filter_Fn)(Evas_Filter_Info *, RGBA_Image *, RGBA_Image *);
496
497 int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh,
498                      int *outw, int *outh, Eina_Bool inv);
499 Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info);
500 uint8_t *evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp);
501 // expose for use in engines
502 EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info);
503 void evas_filter_free(Evas_Object *o);
504 #endif
505
506 struct _Evas_Object
507 {
508    EINA_INLIST;
509
510    DATA32                   magic;
511
512    const char              *type;
513    Evas_Layer              *layer;
514
515    struct {
516       Evas_Map             *map;
517       Evas_Object          *clipper;
518       Evas_Object          *mask;
519       Evas_Object          *map_parent;
520       double                scale;
521       Evas_Coord_Rectangle  geometry;
522       Evas_Coord_Rectangle  bounding_box;
523       struct {
524          struct {
525             Evas_Coord      x, y, w, h;
526             unsigned char   r, g, b, a;
527             Eina_Bool       visible : 1;
528             Eina_Bool       dirty : 1;
529          } clip;
530       } cache;
531       short                 layer;
532       struct {
533          unsigned char      r, g, b, a;
534       } color;
535       Eina_Bool             usemap : 1;
536       Eina_Bool             visible : 1;
537       Eina_Bool             have_clipees : 1;
538       Eina_Bool             anti_alias : 1;
539       Evas_Render_Op        render_op : 4;
540
541       Eina_Bool             valid_bounding_box : 1;
542       Eina_Bool             cached_surface : 1;
543       Eina_Bool             parent_cached_surface : 1;
544    } cur, prev;
545
546    Evas_Map                   *cache_map;
547    char                       *name;
548
549    Evas_Intercept_Func        *interceptors;
550
551    struct {
552       Eina_List               *elements;
553    } data;
554
555    Eina_List                  *grabs;
556
557    Evas_Callbacks             *callbacks;
558
559    struct {
560       Eina_List               *clipees;
561       Eina_List               *changes;
562    } clip;
563
564    const Evas_Object_Func     *func;
565
566    void                       *object_data;
567
568    struct {
569       Evas_Smart              *smart;
570       Evas_Object             *parent;
571    } smart;
572
573    struct {
574       Eina_List               *proxies;
575       void                    *surface;
576       int                      w,h;
577       Eina_Bool                redraw;
578    } proxy;
579
580 #if 0 // filtering disabled
581    Evas_Filter_Info           *filter;
582 #endif
583
584    Evas_Size_Hints            *size_hints;
585
586    RGBA_Map                   *spans;
587
588    int                         last_mouse_down_counter;
589    int                         last_mouse_up_counter;
590    int                         mouse_grabbed;
591
592    int                         last_event;
593    Evas_Callback_Type          last_event_type;
594
595    struct {
596         int                      in_move, in_resize;
597    } doing;
598
599   /* ptr array + data blob holding all interfaces private data for
600    * this object */
601    void                      **interface_privates;
602
603    unsigned int                ref;
604
605    unsigned char               delete_me;
606
607    unsigned char               recalculate_cycle;
608    Eina_Clist                  calc_entry;
609
610    Evas_Object_Pointer_Mode    pointer_mode : 2;
611
612    Eina_Bool                   store : 1;
613    Eina_Bool                   pass_events : 1;
614    Eina_Bool                   freeze_events : 1;
615    Eina_Bool                   repeat_events : 1;
616    struct  {
617       Eina_Bool                pass_events : 1;
618       Eina_Bool                pass_events_valid : 1;
619       Eina_Bool                freeze_events : 1;
620       Eina_Bool                freeze_events_valid : 1;
621    } parent_cache;
622    Eina_Bool                   restack : 1;
623    Eina_Bool                   is_active : 1;
624    Eina_Bool                   precise_is_inside : 1;
625    Eina_Bool                   is_static_clip : 1;
626
627    Eina_Bool                   render_pre : 1;
628    Eina_Bool                   rect_del : 1;
629    Eina_Bool                   mouse_in : 1;
630    Eina_Bool                   pre_render_done : 1;
631    Eina_Bool                   intercepted : 1;
632    Eina_Bool                   focused : 1;
633    Eina_Bool                   in_layer : 1;
634    Eina_Bool                   no_propagate : 1;
635
636    Eina_Bool                   changed : 1;
637    Eina_Bool                   changed_move : 1;
638    Eina_Bool                   changed_color : 1;
639    Eina_Bool                   changed_map : 1;
640    Eina_Bool                   changed_pchange : 1;
641    Eina_Bool                   del_ref : 1;
642
643    Eina_Bool                   is_frame : 1;
644    Eina_Bool                   child_has_map : 1;
645 };
646
647 struct _Evas_Func_Node
648 {
649    EINA_INLIST;
650    void (*func) ();
651    void *data;
652    Evas_Callback_Type type;
653    Evas_Callback_Priority priority;
654    unsigned char delete_me : 1;
655 };
656
657 struct _Evas_Data_Node
658 {
659    char *key;
660    void *data;
661 };
662
663 struct _Evas_Font_Dir
664 {
665    Eina_Hash *lookup;
666    Eina_List *fonts;
667    Eina_List *aliases;
668    DATA64     dir_mod_time;
669    DATA64     fonts_dir_mod_time;
670    DATA64     fonts_alias_mod_time;
671 };
672
673 struct _Evas_Font
674 {
675    struct {
676       const char *prop[14];
677    } x;
678    struct {
679       const char *name;
680    } simple;
681    const char *path;
682    char     type;
683 };
684
685 struct _Evas_Font_Alias
686 {
687    const char *alias;
688    Evas_Font  *fn;
689 };
690
691 struct _Evas_Font_Description
692 {
693    int ref;
694    /* We assume everywhere this is stringshared */
695    const char *name;
696    const char *fallbacks;
697    const char *lang;
698
699    Evas_Font_Slant slant;
700    Evas_Font_Weight weight;
701    Evas_Font_Width width;
702
703    Eina_Bool is_new : 1;
704 };
705
706 struct _Evas_Object_Func
707 {
708    void (*free) (Evas_Object *obj);
709    void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
710    void (*render_pre) (Evas_Object *obj);
711    void (*render_post) (Evas_Object *obj);
712
713    unsigned int  (*type_id_get) (Evas_Object *obj);
714    unsigned int  (*visual_id_get) (Evas_Object *obj);
715    void *(*engine_data_get) (Evas_Object *obj);
716
717    void (*store) (Evas_Object *obj);
718    void (*unstore) (Evas_Object *obj);
719
720    int  (*is_visible) (Evas_Object *obj);
721    int  (*was_visible) (Evas_Object *obj);
722
723    int  (*is_opaque) (Evas_Object *obj);
724    int  (*was_opaque) (Evas_Object *obj);
725
726    int  (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
727    int  (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
728
729    void (*coords_recalc) (Evas_Object *obj);
730
731    void (*scale_update) (Evas_Object *obj);
732
733    int (*has_opaque_rect) (Evas_Object *obj);
734    int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
735
736    int (*can_map) (Evas_Object *obj);
737 };
738
739 struct _Evas_Func
740 {
741    void *(*info)                           (Evas *e);
742    void (*info_free)                       (Evas *e, void *info);
743    int  (*setup)                           (Evas *e, void *info);
744
745    void (*output_free)                     (void *data);
746    void (*output_resize)                   (void *data, int w, int h);
747    void (*output_tile_size_set)            (void *data, int w, int h);
748    void (*output_redraws_rect_add)         (void *data, int x, int y, int w, int h);
749    void (*output_redraws_rect_del)         (void *data, int x, int y, int w, int h);
750    void (*output_redraws_clear)            (void *data);
751    void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
752    void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
753    void (*output_flush)                    (void *data);
754    void (*output_idle_flush)               (void *data);
755    void (*output_dump)                     (void *data);
756
757    void *(*context_new)                    (void *data);
758    Eina_Bool (*canvas_alpha_get)           (void *data, void *context);
759    void (*context_free)                    (void *data, void *context);
760    void (*context_clip_set)                (void *data, void *context, int x, int y, int w, int h);
761    void (*context_clip_clip)               (void *data, void *context, int x, int y, int w, int h);
762    void (*context_clip_unset)              (void *data, void *context);
763    int  (*context_clip_get)                (void *data, void *context, int *x, int *y, int *w, int *h);
764    void (*context_mask_set)                (void *data, void *context, void *mask, int x, int y, int w, int h);
765    void (*context_mask_unset)              (void *data, void *context);
766    void (*context_color_set)               (void *data, void *context, int r, int g, int b, int a);
767    int  (*context_color_get)               (void *data, void *context, int *r, int *g, int *b, int *a);
768    void (*context_multiplier_set)          (void *data, void *context, int r, int g, int b, int a);
769    void (*context_multiplier_unset)        (void *data, void *context);
770    int  (*context_multiplier_get)          (void *data, void *context, int *r, int *g, int *b, int *a);
771    void (*context_cutout_add)              (void *data, void *context, int x, int y, int w, int h);
772    void (*context_cutout_clear)            (void *data, void *context);
773    void (*context_anti_alias_set)          (void *data, void *context, unsigned char aa);
774    unsigned char (*context_anti_alias_get) (void *data, void *context);
775    void (*context_color_interpolation_set) (void *data, void *context, int color_space);
776    int  (*context_color_interpolation_get) (void *data, void *context);
777    void (*context_render_op_set)           (void *data, void *context, int render_op);
778    int  (*context_render_op_get)           (void *data, void *context);
779
780    void (*rectangle_draw)                  (void *data, void *context, void *surface, int x, int y, int w, int h);
781
782    void (*line_draw)                       (void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
783
784    void *(*polygon_point_add)              (void *data, void *context, void *polygon, int x, int y);
785    void *(*polygon_points_clear)           (void *data, void *context, void *polygon);
786    void (*polygon_draw)                    (void *data, void *context, void *surface, void *polygon, int x, int y);
787
788    void *(*image_load)                     (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo);
789    void *(*image_new_from_data)            (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
790    void *(*image_new_from_copied_data)     (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
791    void (*image_free)                      (void *data, void *image);
792    void (*image_size_get)                  (void *data, void *image, int *w, int *h);
793    void *(*image_size_set)                 (void *data, void *image, int w, int h);
794    void (*image_stride_get)                (void *data, void *image, int *stride);
795    void *(*image_dirty_region)             (void *data, void *image, int x, int y, int w, int h);
796    void *(*image_data_get)                 (void *data, void *image, int to_write, DATA32 **image_data, int *err);
797    void *(*image_data_put)                 (void *data, void *image, DATA32 *image_data);
798    void  (*image_data_preload_request)     (void *data, void *image, const void *target);
799    void  (*image_data_preload_cancel)      (void *data, void *image, const void *target);
800    void *(*image_alpha_set)                (void *data, void *image, int has_alpha);
801    int  (*image_alpha_get)                 (void *data, void *image);
802    void *(*image_border_set)               (void *data, void *image, int l, int r, int t, int b);
803    void  (*image_border_get)               (void *data, void *image, int *l, int *r, int *t, int *b);
804    void (*image_draw)                      (void *data, void *context, void *surface, void *image, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth);
805    char *(*image_comment_get)              (void *data, void *image, char *key);
806    char *(*image_format_get)               (void *data, void *image);
807    void (*image_colorspace_set)            (void *data, void *image, int cspace);
808    int  (*image_colorspace_get)            (void *data, void *image);
809    Eina_Bool (*image_can_region_get)       (void *data, void *image);
810    void (*image_mask_create)               (void *data, void *image);
811    void *(*image_native_set)               (void *data, void *image, void *native);
812    void *(*image_native_get)               (void *data, void *image);
813
814    void (*image_cache_flush)               (void *data);
815    void (*image_cache_set)                 (void *data, int bytes);
816    int  (*image_cache_get)                 (void *data);
817
818    Evas_Font_Set *(*font_load)             (void *data, const char *name, int size, Font_Rend_Flags wanted_rend);
819    Evas_Font_Set *(*font_memory_load)      (void *data, const char *source, const char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend);
820    Evas_Font_Set *(*font_add)              (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend);
821    Evas_Font_Set *(*font_memory_add)       (void *data, Evas_Font_Set *font, const char *source, const char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend);
822    void (*font_free)                       (void *data, Evas_Font_Set *font);
823    int  (*font_ascent_get)                 (void *data, Evas_Font_Set *font);
824    int  (*font_descent_get)                (void *data, Evas_Font_Set *font);
825    int  (*font_max_ascent_get)             (void *data, Evas_Font_Set *font);
826    int  (*font_max_descent_get)            (void *data, Evas_Font_Set *font);
827    void (*font_string_size_get)            (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h);
828    int  (*font_inset_get)                  (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
829    int  (*font_h_advance_get)              (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
830    int  (*font_v_advance_get)              (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
831    int  (*font_char_coords_get)            (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch);
832    int  (*font_char_at_coords_get)         (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch);
833    void (*font_draw)                       (void *data, void *context, void *surface, Evas_Font_Set *font, int x, int y, int w, int h, int ow, int oh, Evas_Text_Props *intl_props);
834
835    void (*font_cache_flush)                (void *data);
836    void (*font_cache_set)                  (void *data, int bytes);
837    int  (*font_cache_get)                  (void *data);
838
839    /* Engine functions will over time expand from here */
840
841    void (*font_hinting_set)                (void *data, Evas_Font_Set *font, int hinting);
842    int  (*font_hinting_can_hint)           (void *data, int hinting);
843
844 /*    void (*image_rotation_set)              (void *data, void *image); */
845
846    void (*image_scale_hint_set)            (void *data, void *image, int hint);
847    int  (*image_scale_hint_get)            (void *data, void *image);
848    int  (*font_last_up_to_pos)             (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y);
849
850    void (*image_map_draw)                  (void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level);
851    void *(*image_map_surface_new)          (void *data, int w, int h, int alpha);
852    void (*image_map_surface_free)          (void *data, void *surface);
853    void (*image_map_clean)                 (void *data, RGBA_Map *m);
854
855    void (*image_content_hint_set)          (void *data, void *surface, int hint);
856    int  (*image_content_hint_get)          (void *data, void *surface);
857    int  (*font_pen_coords_get)             (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch);
858    Eina_Bool (*font_text_props_info_create) (void *data __UNUSED__, Evas_Font_Instance *fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len, Evas_Text_Props_Mode mode);
859    int  (*font_right_inset_get)            (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
860
861 #if 0 // filtering disabled
862    void (*image_draw_filtered)             (void *data, void *context, void *surface, void *image, Evas_Filter_Info *filter);
863    Filtered_Image *(*image_filtered_get)   (void *image, uint8_t *key, size_t len);
864    Filtered_Image *(*image_filtered_save)  (void *image, void *filtered, uint8_t *key, size_t len);
865    void (*image_filtered_free)             (void *image, Filtered_Image *);
866 #endif
867
868    /* EFL-GL Glue Layer */
869    void *(*gl_surface_create)            (void *data, void *config, int w, int h);
870    int  (*gl_surface_destroy)            (void *data, void *surface);
871    void *(*gl_context_create)            (void *data, void *share_context);
872    int  (*gl_context_destroy)            (void *data, void *context);
873    int  (*gl_make_current)               (void *data, void *surface, void *context);
874    void *(*gl_string_query)              (void *data, int name);
875    void *(*gl_proc_address_get)          (void *data, const char *name);
876    int  (*gl_native_surface_get)         (void *data, void *surface, void *native_surface);
877    void *(*gl_api_get)                   (void *data);
878    void (*gl_img_obj_set)                (void *data, void *image, int has_alpha);
879
880    int  (*image_load_error_get)          (void *data, void *image);
881    int  (*font_run_end_get)              (void *data, Evas_Font_Set *font, Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type script, const Eina_Unicode *text, int run_len);
882
883    /* animated feature */
884    Eina_Bool (*image_animated_get)       (void *data, void *image);
885    int (*image_animated_frame_count_get) (void *data, void *image);
886    Evas_Image_Animated_Loop_Hint  (*image_animated_loop_type_get) (void *data, void *image);
887    int (*image_animated_loop_count_get)  (void *data, void *image);
888    double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num);
889    Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index);
890
891    /* max size query */
892    void (*image_max_size_get)            (void *data, int *maxw, int *maxh);
893 };
894
895 struct _Evas_Image_Load_Func
896 {
897   Eina_Bool threadable;
898   Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error);
899   Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error);
900   double    (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num);
901   Eina_Bool do_region;
902 };
903
904 struct _Evas_Image_Save_Func
905 {
906   int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
907 };
908
909 #ifdef __cplusplus
910 extern "C" {
911 #endif
912
913 Evas_Object *evas_object_new(Evas *e);
914 void evas_object_change_reset(Evas_Object *obj);
915 void evas_object_cur_prev(Evas_Object *obj);
916 void evas_object_free(Evas_Object *obj, int clean_layer);
917 void evas_object_update_bounding_box(Evas_Object *obj);
918 void evas_object_inject(Evas_Object *obj, Evas *e);
919 void evas_object_release(Evas_Object *obj, int clean_layer);
920 void evas_object_change(Evas_Object *obj);
921 void evas_object_clip_changes_clean(Evas_Object *obj);
922 void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
923 void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj);
924 void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj);
925 void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
926 void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
927
928 void evas_object_clip_dirty(Evas_Object *obj);
929 void evas_object_recalc_clippees(Evas_Object *obj);
930 Evas_Layer *evas_layer_new(Evas *e);
931 void evas_layer_pre_free(Evas_Layer *lay);
932 void evas_layer_free_objects(Evas_Layer *lay);
933 void evas_layer_clean(Evas *e);
934 Evas_Layer *evas_layer_find(Evas *e, short layer_num);
935 void evas_layer_add(Evas_Layer *lay);
936 void evas_layer_del(Evas_Layer *lay);
937
938 int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h);
939
940 int evas_object_was_opaque(Evas_Object *obj);
941 int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
942 int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
943 int evas_object_clippers_was_visible(Evas_Object *obj);
944 void evas_object_clip_across_check(Evas_Object *obj);
945 void evas_object_clip_across_clippees_check(Evas_Object *obj);
946 void evas_object_mapped_clip_across_mark(Evas_Object *obj);
947 void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
948 void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id);
949 Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
950 int evas_mem_free(int mem_required);
951 int evas_mem_degrade(int mem_required);
952 void evas_debug_error(void);
953 void evas_debug_input_null(void);
954 void evas_debug_magic_null(void);
955 void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied);
956 void evas_debug_generic(const char *str);
957 const char *evas_debug_magic_string_get(DATA32 magic);
958 void evas_object_smart_use(Evas_Smart *s);
959 void evas_object_smart_unuse(Evas_Smart *s);
960 void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) EINA_ARG_NONNULL(1);
961 Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1);
962 const Evas_Smart_Cb_Description *evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name) EINA_ARG_NONNULL(1, 2) EINA_PURE;
963
964 Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj);
965 void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading);
966 void _evas_object_image_preloading_check(Evas_Object *obj);
967 Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj);
968 void _evas_object_image_video_overlay_show(Evas_Object *obj);
969 void _evas_object_image_video_overlay_hide(Evas_Object *obj);
970 void evas_object_smart_del(Evas_Object *obj);
971 void evas_object_smart_cleanup(Evas_Object *obj);
972 void evas_object_smart_member_raise(Evas_Object *member);
973 void evas_object_smart_member_lower(Evas_Object *member);
974 void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other);
975 void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other);
976 const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj);
977 void _evas_object_smart_members_all_del(Evas_Object *obj);
978 void evas_call_smarts_calculate(Evas *e);
979 void evas_object_smart_bouding_box_update(Evas_Object *obj);
980 void evas_object_smart_need_bounding_box_update(Evas_Object *obj);
981 void *evas_mem_calloc(int size);
982 void _evas_post_event_callback_call(Evas *e);
983 void _evas_post_event_callback_free(Evas *e);
984 void evas_event_callback_list_post_free(Eina_Inlist **list);
985 void evas_object_event_callback_all_del(Evas_Object *obj);
986 void evas_object_event_callback_cleanup(Evas_Object *obj);
987 void evas_event_callback_all_del(Evas *e);
988 void evas_event_callback_cleanup(Evas *e);
989 void evas_object_inform_call_show(Evas_Object *obj);
990 void evas_object_inform_call_hide(Evas_Object *obj);
991 void evas_object_inform_call_move(Evas_Object *obj);
992 void evas_object_inform_call_resize(Evas_Object *obj);
993 void evas_object_inform_call_restack(Evas_Object *obj);
994 void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
995 void evas_object_inform_call_image_preloaded(Evas_Object *obj);
996 void evas_object_inform_call_image_unloaded(Evas_Object *obj);
997 void evas_object_intercept_cleanup(Evas_Object *obj);
998 int evas_object_intercept_call_show(Evas_Object *obj);
999 int evas_object_intercept_call_hide(Evas_Object *obj);
1000 int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
1001 int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
1002 int evas_object_intercept_call_raise(Evas_Object *obj);
1003 int evas_object_intercept_call_lower(Evas_Object *obj);
1004 int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above);
1005 int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below);
1006 int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
1007 int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a);
1008 int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip);
1009 int evas_object_intercept_call_clip_unset(Evas_Object *obj);
1010 void evas_object_grabs_cleanup(Evas_Object *obj);
1011 void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
1012 void evas_font_dir_cache_free(void);
1013 const char *evas_font_dir_cache_find(char *dir, char *font);
1014 Eina_List *evas_font_dir_available_list(const Evas* evas);
1015 void evas_font_dir_available_list_free(Eina_List *available);
1016 void evas_font_free(Evas *evas, void *font);
1017 void evas_fonts_zero_free(Evas *evas);
1018 void evas_fonts_zero_presure(Evas *evas);
1019 void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name);
1020 int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style);
1021 Evas_Font_Description *evas_font_desc_new(void);
1022 Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc);
1023 void evas_font_desc_unref(Evas_Font_Description *fdesc);
1024 int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b);
1025 Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc);
1026 void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size);
1027 void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);
1028 void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events);
1029 void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b);
1030 void _evas_object_text_rehint(Evas_Object *obj);
1031 void _evas_object_textblock_rehint(Evas_Object *obj);
1032
1033 extern int _evas_alloc_error;
1034 extern int _evas_event_counter;
1035
1036 struct _Evas_Imaging_Image
1037 {
1038    RGBA_Image *image;
1039 };
1040
1041 struct _Evas_Imaging_Font
1042 {
1043    RGBA_Font *font;
1044 };
1045
1046 int evas_async_events_init(void);
1047 int evas_async_events_shutdown(void);
1048 int evas_async_target_del(const void *target);
1049
1050 void _evas_preload_thread_init(void);
1051 void _evas_preload_thread_shutdown(void);
1052 Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data),
1053                                               void (*func_end)(void *data),
1054                                               void (*func_cancel)(void *data),
1055                                               const void *data);
1056 Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
1057
1058 void _evas_walk(Evas *e);
1059 void _evas_unwalk(Evas *e);
1060
1061 // expose for use in engines
1062 EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
1063 EAPI const char *_evas_module_libdir_get(void);
1064          
1065 Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj, 
1066                              void *context, void *surface,
1067                              int off_x, int off_y, int mapped,
1068                              int ecx, int ecy, int ecw, int ech);
1069 void evas_render_invalidate(Evas *e);
1070 void evas_render_object_recalc(Evas_Object *obj);
1071
1072 Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
1073 Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab);
1074 void evas_object_map_update(Evas_Object *obj, int x, int y, int imagew, int imageh, int uvw, int uvh);
1075
1076 Eina_List *evas_module_engine_list(void);
1077
1078 /* for updating touch point list */
1079 void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y);
1080 void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state);
1081 void _evas_touch_point_remove(Evas *e, int id);
1082
1083 /****************************************************************************/
1084 /*****************************************/
1085 /********************/
1086 #define MPOOL 1
1087
1088 #ifdef MPOOL 
1089 typedef struct _Evas_Mempool Evas_Mempool;
1090
1091 struct _Evas_Mempool
1092 {
1093   int           count;
1094   int           num_allocs;
1095   int           num_frees;
1096   Eina_Mempool *mp;
1097 };
1098 # define EVAS_MEMPOOL(x) \
1099    static Evas_Mempool x = {0, 0, 0, NULL}
1100 # define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \
1101    do { \
1102      if (!x.mp) { \
1103        x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \
1104        if (!x.mp) { \
1105          return ret; \
1106        } \
1107      } \
1108    } while (0)
1109 # define EVAS_MEMPOOL_ALLOC(x, siz) \
1110    eina_mempool_malloc(x.mp, sizeof(siz))
1111 # define EVAS_MEMPOOL_PREP(x, p, siz) \
1112    do { \
1113      x.count++; \
1114      x.num_allocs++; \
1115      memset(p, 0, sizeof(siz)); \
1116    } while (0)
1117 # define EVAS_MEMPOOL_FREE(x, p) \
1118    do { \
1119      eina_mempool_free(x.mp, p); \
1120      x.count--; \
1121      x.num_frees++; \
1122      if (x.count <= 0) { \
1123        eina_mempool_del(x.mp); \
1124        x.mp = NULL; \
1125        x.count = 0; \
1126      } \
1127    } while (0)
1128 #else
1129 # define EVAS_MEMPOOL(x)
1130 # define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret)
1131 # define EVAS_MEMPOOL_PREP(x, p, siz)
1132 # define EVAS_MEMPOOL_ALLOC(x, siz) \
1133    calloc(1, sizeof(siz))
1134 # define EVAS_MEMPOOL_FREE(x, p) \
1135    free(p)
1136 #endif
1137 /********************/
1138 /*****************************************/
1139 /****************************************************************************/
1140
1141 #define EVAS_API_OVERRIDE(func, api, prefix) \
1142      (api)->func = prefix##func
1143 #define EVAS_API_RESET(func, api) \
1144      (api)->func = NULL
1145
1146 #include "evas_inline.x"
1147
1148 #ifdef __cplusplus
1149 }
1150 #endif
1151 #endif