sync with private
[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             valid_map : 1;
537       Eina_Bool             visible : 1;
538       Eina_Bool             have_clipees : 1;
539       Eina_Bool             anti_alias : 1;
540       Evas_Render_Op        render_op : 4;
541
542       Eina_Bool             valid_bounding_box : 1;
543       Eina_Bool             cached_surface : 1;
544       Eina_Bool             parent_cached_surface : 1;
545    } cur, prev;
546
547    Evas_Map                   *cache_map;
548    char                       *name;
549
550    Evas_Intercept_Func        *interceptors;
551
552    struct {
553       Eina_List               *elements;
554    } data;
555
556    Eina_List                  *grabs;
557
558    Evas_Callbacks             *callbacks;
559
560    struct {
561       Eina_List               *clipees;
562       Eina_List               *changes;
563    } clip;
564
565    const Evas_Object_Func     *func;
566
567    void                       *object_data;
568
569    struct {
570       Evas_Smart              *smart;
571       Evas_Object             *parent;
572    } smart;
573
574    struct {
575       Eina_List               *proxies;
576       void                    *surface;
577       int                      w,h;
578       Eina_Bool                redraw;
579    } proxy;
580
581 #if 0 // filtering disabled
582    Evas_Filter_Info           *filter;
583 #endif
584
585    Evas_Size_Hints            *size_hints;
586
587    RGBA_Map                   *spans;
588
589    int                         last_mouse_down_counter;
590    int                         last_mouse_up_counter;
591    int                         mouse_grabbed;
592
593    int                         last_event;
594    Evas_Callback_Type          last_event_type;
595
596    struct {
597         int                      in_move, in_resize;
598    } doing;
599
600   /* ptr array + data blob holding all interfaces private data for
601    * this object */
602    void                      **interface_privates;
603
604    unsigned int                ref;
605
606    unsigned char               delete_me;
607
608    unsigned char               recalculate_cycle;
609    Eina_Clist                  calc_entry;
610
611    Evas_Object_Pointer_Mode    pointer_mode : 2;
612
613    Eina_Bool                   store : 1;
614    Eina_Bool                   pass_events : 1;
615    Eina_Bool                   freeze_events : 1;
616    Eina_Bool                   repeat_events : 1;
617    struct  {
618       Eina_Bool                pass_events : 1;
619       Eina_Bool                pass_events_valid : 1;
620       Eina_Bool                freeze_events : 1;
621       Eina_Bool                freeze_events_valid : 1;
622    } parent_cache;
623    Eina_Bool                   restack : 1;
624    Eina_Bool                   is_active : 1;
625    Eina_Bool                   precise_is_inside : 1;
626    Eina_Bool                   is_static_clip : 1;
627
628    Eina_Bool                   render_pre : 1;
629    Eina_Bool                   rect_del : 1;
630    Eina_Bool                   mouse_in : 1;
631    Eina_Bool                   pre_render_done : 1;
632    Eina_Bool                   intercepted : 1;
633    Eina_Bool                   focused : 1;
634    Eina_Bool                   in_layer : 1;
635    Eina_Bool                   no_propagate : 1;
636
637    Eina_Bool                   changed : 1;
638    Eina_Bool                   changed_move : 1;
639    Eina_Bool                   changed_color : 1;
640    Eina_Bool                   changed_map : 1;
641    Eina_Bool                   changed_pchange : 1;
642    Eina_Bool                   del_ref : 1;
643
644    Eina_Bool                   is_frame : 1;
645    Eina_Bool                   child_has_map : 1;
646 };
647
648 struct _Evas_Func_Node
649 {
650    EINA_INLIST;
651    void (*func) ();
652    void *data;
653    Evas_Callback_Type type;
654    Evas_Callback_Priority priority;
655    unsigned char delete_me : 1;
656 };
657
658 struct _Evas_Data_Node
659 {
660    char *key;
661    void *data;
662 };
663
664 struct _Evas_Font_Dir
665 {
666    Eina_Hash *lookup;
667    Eina_List *fonts;
668    Eina_List *aliases;
669    DATA64     dir_mod_time;
670    DATA64     fonts_dir_mod_time;
671    DATA64     fonts_alias_mod_time;
672 };
673
674 struct _Evas_Font
675 {
676    struct {
677       const char *prop[14];
678    } x;
679    struct {
680       const char *name;
681    } simple;
682    const char *path;
683    char     type;
684 };
685
686 struct _Evas_Font_Alias
687 {
688    const char *alias;
689    Evas_Font  *fn;
690 };
691
692 struct _Evas_Font_Description
693 {
694    int ref;
695    /* We assume everywhere this is stringshared */
696    const char *name;
697    const char *fallbacks;
698    const char *lang;
699
700    Evas_Font_Slant slant;
701    Evas_Font_Weight weight;
702    Evas_Font_Width width;
703
704    Eina_Bool is_new : 1;
705 };
706
707 struct _Evas_Object_Func
708 {
709    void (*free) (Evas_Object *obj);
710    void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
711    void (*render_pre) (Evas_Object *obj);
712    void (*render_post) (Evas_Object *obj);
713
714    unsigned int  (*type_id_get) (Evas_Object *obj);
715    unsigned int  (*visual_id_get) (Evas_Object *obj);
716    void *(*engine_data_get) (Evas_Object *obj);
717
718    void (*store) (Evas_Object *obj);
719    void (*unstore) (Evas_Object *obj);
720
721    int  (*is_visible) (Evas_Object *obj);
722    int  (*was_visible) (Evas_Object *obj);
723
724    int  (*is_opaque) (Evas_Object *obj);
725    int  (*was_opaque) (Evas_Object *obj);
726
727    int  (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
728    int  (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
729
730    void (*coords_recalc) (Evas_Object *obj);
731
732    void (*scale_update) (Evas_Object *obj);
733
734    int (*has_opaque_rect) (Evas_Object *obj);
735    int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
736
737    int (*can_map) (Evas_Object *obj);
738 };
739
740 struct _Evas_Func
741 {
742    void *(*info)                           (Evas *e);
743    void (*info_free)                       (Evas *e, void *info);
744    int  (*setup)                           (Evas *e, void *info);
745
746    void (*output_free)                     (void *data);
747    void (*output_resize)                   (void *data, int w, int h);
748    void (*output_tile_size_set)            (void *data, int w, int h);
749    void (*output_redraws_rect_add)         (void *data, int x, int y, int w, int h);
750    void (*output_redraws_rect_del)         (void *data, int x, int y, int w, int h);
751    void (*output_redraws_clear)            (void *data);
752    void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
753    void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
754    void (*output_flush)                    (void *data);
755    void (*output_idle_flush)               (void *data);
756    void (*output_dump)                     (void *data);
757
758    void *(*context_new)                    (void *data);
759    Eina_Bool (*canvas_alpha_get)           (void *data, void *context);
760    void (*context_free)                    (void *data, void *context);
761    void (*context_clip_set)                (void *data, void *context, int x, int y, int w, int h);
762    void (*context_clip_clip)               (void *data, void *context, int x, int y, int w, int h);
763    void (*context_clip_unset)              (void *data, void *context);
764    int  (*context_clip_get)                (void *data, void *context, int *x, int *y, int *w, int *h);
765    void (*context_mask_set)                (void *data, void *context, void *mask, int x, int y, int w, int h);
766    void (*context_mask_unset)              (void *data, void *context);
767    void (*context_color_set)               (void *data, void *context, int r, int g, int b, int a);
768    int  (*context_color_get)               (void *data, void *context, int *r, int *g, int *b, int *a);
769    void (*context_multiplier_set)          (void *data, void *context, int r, int g, int b, int a);
770    void (*context_multiplier_unset)        (void *data, void *context);
771    int  (*context_multiplier_get)          (void *data, void *context, int *r, int *g, int *b, int *a);
772    void (*context_cutout_add)              (void *data, void *context, int x, int y, int w, int h);
773    void (*context_cutout_clear)            (void *data, void *context);
774    void (*context_anti_alias_set)          (void *data, void *context, unsigned char aa);
775    unsigned char (*context_anti_alias_get) (void *data, void *context);
776    void (*context_color_interpolation_set) (void *data, void *context, int color_space);
777    int  (*context_color_interpolation_get) (void *data, void *context);
778    void (*context_render_op_set)           (void *data, void *context, int render_op);
779    int  (*context_render_op_get)           (void *data, void *context);
780
781    void (*rectangle_draw)                  (void *data, void *context, void *surface, int x, int y, int w, int h);
782
783    void (*line_draw)                       (void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
784
785    void *(*polygon_point_add)              (void *data, void *context, void *polygon, int x, int y);
786    void *(*polygon_points_clear)           (void *data, void *context, void *polygon);
787    void (*polygon_draw)                    (void *data, void *context, void *surface, void *polygon, int x, int y);
788
789    void *(*image_load)                     (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo);
790    void *(*image_new_from_data)            (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
791    void *(*image_new_from_copied_data)     (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
792    void (*image_free)                      (void *data, void *image);
793    void (*image_size_get)                  (void *data, void *image, int *w, int *h);
794    void *(*image_size_set)                 (void *data, void *image, int w, int h);
795    void (*image_stride_get)                (void *data, void *image, int *stride);
796    void *(*image_dirty_region)             (void *data, void *image, int x, int y, int w, int h);
797    void *(*image_data_get)                 (void *data, void *image, int to_write, DATA32 **image_data, int *err);
798    void *(*image_data_put)                 (void *data, void *image, DATA32 *image_data);
799    void  (*image_data_preload_request)     (void *data, void *image, const void *target);
800    void  (*image_data_preload_cancel)      (void *data, void *image, const void *target);
801    void *(*image_alpha_set)                (void *data, void *image, int has_alpha);
802    int  (*image_alpha_get)                 (void *data, void *image);
803    void *(*image_border_set)               (void *data, void *image, int l, int r, int t, int b);
804    void  (*image_border_get)               (void *data, void *image, int *l, int *r, int *t, int *b);
805    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);
806    char *(*image_comment_get)              (void *data, void *image, char *key);
807    char *(*image_format_get)               (void *data, void *image);
808    void (*image_colorspace_set)            (void *data, void *image, int cspace);
809    int  (*image_colorspace_get)            (void *data, void *image);
810    Eina_Bool (*image_can_region_get)       (void *data, void *image);
811    void (*image_mask_create)               (void *data, void *image);
812    void *(*image_native_set)               (void *data, void *image, void *native);
813    void *(*image_native_get)               (void *data, void *image);
814
815    void (*image_cache_flush)               (void *data);
816    void (*image_cache_set)                 (void *data, int bytes);
817    int  (*image_cache_get)                 (void *data);
818
819    Evas_Font_Set *(*font_load)             (void *data, const char *name, int size, Font_Rend_Flags wanted_rend);
820    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);
821    Evas_Font_Set *(*font_add)              (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend);
822    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);
823    void (*font_free)                       (void *data, Evas_Font_Set *font);
824    int  (*font_ascent_get)                 (void *data, Evas_Font_Set *font);
825    int  (*font_descent_get)                (void *data, Evas_Font_Set *font);
826    int  (*font_max_ascent_get)             (void *data, Evas_Font_Set *font);
827    int  (*font_max_descent_get)            (void *data, Evas_Font_Set *font);
828    void (*font_string_size_get)            (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h);
829    int  (*font_inset_get)                  (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
830    int  (*font_h_advance_get)              (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
831    int  (*font_v_advance_get)              (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
832    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);
833    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);
834    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);
835
836    void (*font_cache_flush)                (void *data);
837    void (*font_cache_set)                  (void *data, int bytes);
838    int  (*font_cache_get)                  (void *data);
839
840    /* Engine functions will over time expand from here */
841
842    void (*font_hinting_set)                (void *data, Evas_Font_Set *font, int hinting);
843    int  (*font_hinting_can_hint)           (void *data, int hinting);
844
845 /*    void (*image_rotation_set)              (void *data, void *image); */
846
847    void (*image_scale_hint_set)            (void *data, void *image, int hint);
848    int  (*image_scale_hint_get)            (void *data, void *image);
849    int  (*font_last_up_to_pos)             (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y);
850
851    void (*image_map_draw)                  (void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level);
852    void *(*image_map_surface_new)          (void *data, int w, int h, int alpha);
853    void (*image_map_surface_free)          (void *data, void *surface);
854    void (*image_map_clean)                 (void *data, RGBA_Map *m);
855
856    void (*image_content_hint_set)          (void *data, void *surface, int hint);
857    int  (*image_content_hint_get)          (void *data, void *surface);
858    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);
859    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);
860    int  (*font_right_inset_get)            (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
861
862 #if 0 // filtering disabled
863    void (*image_draw_filtered)             (void *data, void *context, void *surface, void *image, Evas_Filter_Info *filter);
864    Filtered_Image *(*image_filtered_get)   (void *image, uint8_t *key, size_t len);
865    Filtered_Image *(*image_filtered_save)  (void *image, void *filtered, uint8_t *key, size_t len);
866    void (*image_filtered_free)             (void *image, Filtered_Image *);
867 #endif
868
869    /* EFL-GL Glue Layer */
870    void *(*gl_surface_create)            (void *data, void *config, int w, int h);
871    int  (*gl_surface_destroy)            (void *data, void *surface);
872    void *(*gl_context_create)            (void *data, void *share_context);
873    int  (*gl_context_destroy)            (void *data, void *context);
874    int  (*gl_make_current)               (void *data, void *surface, void *context);
875    void *(*gl_string_query)              (void *data, int name);
876    void *(*gl_proc_address_get)          (void *data, const char *name);
877    int  (*gl_native_surface_get)         (void *data, void *surface, void *native_surface);
878    void *(*gl_api_get)                   (void *data);
879    void (*gl_img_obj_set)                (void *data, void *image, int has_alpha);
880
881    int  (*image_load_error_get)          (void *data, void *image);
882    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);
883
884    /* animated feature */
885    Eina_Bool (*image_animated_get)       (void *data, void *image);
886    int (*image_animated_frame_count_get) (void *data, void *image);
887    Evas_Image_Animated_Loop_Hint  (*image_animated_loop_type_get) (void *data, void *image);
888    int (*image_animated_loop_count_get)  (void *data, void *image);
889    double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num);
890    Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index);
891
892    /* max size query */
893    void (*image_max_size_get)            (void *data, int *maxw, int *maxh);
894 };
895
896 struct _Evas_Image_Load_Func
897 {
898   Eina_Bool threadable;
899   Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error);
900   Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error);
901   double    (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num);
902   Eina_Bool do_region;
903 };
904
905 struct _Evas_Image_Save_Func
906 {
907   int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
908 };
909
910 #ifdef __cplusplus
911 extern "C" {
912 #endif
913
914 Evas_Object *evas_object_new(Evas *e);
915 void evas_object_change_reset(Evas_Object *obj);
916 void evas_object_cur_prev(Evas_Object *obj);
917 void evas_object_free(Evas_Object *obj, int clean_layer);
918 void evas_object_update_bounding_box(Evas_Object *obj);
919 void evas_object_inject(Evas_Object *obj, Evas *e);
920 void evas_object_release(Evas_Object *obj, int clean_layer);
921 void evas_object_change(Evas_Object *obj);
922 void evas_object_clip_changes_clean(Evas_Object *obj);
923 void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
924 void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj);
925 void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj);
926 void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
927 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);
928
929 void evas_object_clip_dirty(Evas_Object *obj);
930 void evas_object_recalc_clippees(Evas_Object *obj);
931 Evas_Layer *evas_layer_new(Evas *e);
932 void evas_layer_pre_free(Evas_Layer *lay);
933 void evas_layer_free_objects(Evas_Layer *lay);
934 void evas_layer_clean(Evas *e);
935 Evas_Layer *evas_layer_find(Evas *e, short layer_num);
936 void evas_layer_add(Evas_Layer *lay);
937 void evas_layer_del(Evas_Layer *lay);
938
939 int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h);
940
941 int evas_object_was_opaque(Evas_Object *obj);
942 int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
943 int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
944 int evas_object_clippers_was_visible(Evas_Object *obj);
945 void evas_object_clip_across_check(Evas_Object *obj);
946 void evas_object_clip_across_clippees_check(Evas_Object *obj);
947 void evas_object_mapped_clip_across_mark(Evas_Object *obj);
948 void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
949 void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id);
950 Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
951 int evas_mem_free(int mem_required);
952 int evas_mem_degrade(int mem_required);
953 void evas_debug_error(void);
954 void evas_debug_input_null(void);
955 void evas_debug_magic_null(void);
956 void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied);
957 void evas_debug_generic(const char *str);
958 const char *evas_debug_magic_string_get(DATA32 magic);
959 void evas_object_smart_use(Evas_Smart *s);
960 void evas_object_smart_unuse(Evas_Smart *s);
961 void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) EINA_ARG_NONNULL(1);
962 Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1);
963 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;
964
965 Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj);
966 void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading);
967 void _evas_object_image_preloading_check(Evas_Object *obj);
968 Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj);
969 void _evas_object_image_video_overlay_show(Evas_Object *obj);
970 void _evas_object_image_video_overlay_hide(Evas_Object *obj);
971 void evas_object_smart_del(Evas_Object *obj);
972 void evas_object_smart_cleanup(Evas_Object *obj);
973 void evas_object_smart_member_raise(Evas_Object *member);
974 void evas_object_smart_member_lower(Evas_Object *member);
975 void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other);
976 void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other);
977 const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj);
978 void _evas_object_smart_members_all_del(Evas_Object *obj);
979 void evas_call_smarts_calculate(Evas *e);
980 void evas_object_smart_bouding_box_update(Evas_Object *obj);
981 void evas_object_smart_need_bounding_box_update(Evas_Object *obj);
982 void *evas_mem_calloc(int size);
983 void _evas_post_event_callback_call(Evas *e);
984 void _evas_post_event_callback_free(Evas *e);
985 void evas_event_callback_list_post_free(Eina_Inlist **list);
986 void evas_object_event_callback_all_del(Evas_Object *obj);
987 void evas_object_event_callback_cleanup(Evas_Object *obj);
988 void evas_event_callback_all_del(Evas *e);
989 void evas_event_callback_cleanup(Evas *e);
990 void evas_object_inform_call_show(Evas_Object *obj);
991 void evas_object_inform_call_hide(Evas_Object *obj);
992 void evas_object_inform_call_move(Evas_Object *obj);
993 void evas_object_inform_call_resize(Evas_Object *obj);
994 void evas_object_inform_call_restack(Evas_Object *obj);
995 void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
996 void evas_object_inform_call_image_preloaded(Evas_Object *obj);
997 void evas_object_inform_call_image_unloaded(Evas_Object *obj);
998 void evas_object_intercept_cleanup(Evas_Object *obj);
999 int evas_object_intercept_call_show(Evas_Object *obj);
1000 int evas_object_intercept_call_hide(Evas_Object *obj);
1001 int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
1002 int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
1003 int evas_object_intercept_call_raise(Evas_Object *obj);
1004 int evas_object_intercept_call_lower(Evas_Object *obj);
1005 int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above);
1006 int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below);
1007 int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
1008 int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a);
1009 int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip);
1010 int evas_object_intercept_call_clip_unset(Evas_Object *obj);
1011 void evas_object_grabs_cleanup(Evas_Object *obj);
1012 void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
1013 void evas_font_dir_cache_free(void);
1014 const char *evas_font_dir_cache_find(char *dir, char *font);
1015 Eina_List *evas_font_dir_available_list(const Evas* evas);
1016 void evas_font_dir_available_list_free(Eina_List *available);
1017 void evas_font_free(Evas *evas, void *font);
1018 void evas_fonts_zero_free(Evas *evas);
1019 void evas_fonts_zero_presure(Evas *evas);
1020 void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name);
1021 int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style);
1022 Evas_Font_Description *evas_font_desc_new(void);
1023 Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc);
1024 void evas_font_desc_unref(Evas_Font_Description *fdesc);
1025 int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b);
1026 Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc);
1027 void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size);
1028 void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);
1029 void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events);
1030 void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b);
1031 void _evas_object_text_rehint(Evas_Object *obj);
1032 void _evas_object_textblock_rehint(Evas_Object *obj);
1033
1034 extern int _evas_alloc_error;
1035 extern int _evas_event_counter;
1036
1037 struct _Evas_Imaging_Image
1038 {
1039    RGBA_Image *image;
1040 };
1041
1042 struct _Evas_Imaging_Font
1043 {
1044    RGBA_Font *font;
1045 };
1046
1047 int evas_async_events_init(void);
1048 int evas_async_events_shutdown(void);
1049 int evas_async_target_del(const void *target);
1050
1051 void _evas_preload_thread_init(void);
1052 void _evas_preload_thread_shutdown(void);
1053 Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data),
1054                                               void (*func_end)(void *data),
1055                                               void (*func_cancel)(void *data),
1056                                               const void *data);
1057 Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
1058
1059 void _evas_walk(Evas *e);
1060 void _evas_unwalk(Evas *e);
1061
1062 // expose for use in engines
1063 EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
1064 EAPI const char *_evas_module_libdir_get(void);
1065          
1066 Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj, 
1067                              void *context, void *surface,
1068                              int off_x, int off_y, int mapped,
1069                              int ecx, int ecy, int ecw, int ech);
1070 void evas_render_invalidate(Evas *e);
1071 void evas_render_object_recalc(Evas_Object *obj);
1072
1073 Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
1074 Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab);
1075 void evas_object_map_update(Evas_Object *obj, int x, int y, int imagew, int imageh, int uvw, int uvh);
1076
1077 Eina_List *evas_module_engine_list(void);
1078
1079 /* for updating touch point list */
1080 void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y);
1081 void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state);
1082 void _evas_touch_point_remove(Evas *e, int id);
1083
1084 /****************************************************************************/
1085 /*****************************************/
1086 /********************/
1087 #define MPOOL 1
1088
1089 #ifdef MPOOL 
1090 typedef struct _Evas_Mempool Evas_Mempool;
1091
1092 struct _Evas_Mempool
1093 {
1094   int           count;
1095   int           num_allocs;
1096   int           num_frees;
1097   Eina_Mempool *mp;
1098 };
1099 # define EVAS_MEMPOOL(x) \
1100    static Evas_Mempool x = {0, 0, 0, NULL}
1101 # define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \
1102    do { \
1103      if (!x.mp) { \
1104        x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \
1105        if (!x.mp) { \
1106          return ret; \
1107        } \
1108      } \
1109    } while (0)
1110 # define EVAS_MEMPOOL_ALLOC(x, siz) \
1111    eina_mempool_malloc(x.mp, sizeof(siz))
1112 # define EVAS_MEMPOOL_PREP(x, p, siz) \
1113    do { \
1114      x.count++; \
1115      x.num_allocs++; \
1116      memset(p, 0, sizeof(siz)); \
1117    } while (0)
1118 # define EVAS_MEMPOOL_FREE(x, p) \
1119    do { \
1120      eina_mempool_free(x.mp, p); \
1121      x.count--; \
1122      x.num_frees++; \
1123      if (x.count <= 0) { \
1124        eina_mempool_del(x.mp); \
1125        x.mp = NULL; \
1126        x.count = 0; \
1127      } \
1128    } while (0)
1129 #else
1130 # define EVAS_MEMPOOL(x)
1131 # define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret)
1132 # define EVAS_MEMPOOL_PREP(x, p, siz)
1133 # define EVAS_MEMPOOL_ALLOC(x, siz) \
1134    calloc(1, sizeof(siz))
1135 # define EVAS_MEMPOOL_FREE(x, p) \
1136    free(p)
1137 #endif
1138 /********************/
1139 /*****************************************/
1140 /****************************************************************************/
1141
1142 #define EVAS_API_OVERRIDE(func, api, prefix) \
1143      (api)->func = prefix##func
1144 #define EVAS_API_RESET(func, api) \
1145      (api)->func = NULL
1146
1147 #include "evas_inline.x"
1148
1149 #ifdef __cplusplus
1150 }
1151 #endif
1152 #endif