move around - flatter.
[profile/ivi/evas.git] / src / lib / include / evas_private.h
1 #ifndef EVAS_PRIVATE_H
2 #define EVAS_PRIVATE_H
3
4 #ifndef _GNU_SOURCE
5 #define _GNU_SOURCE
6 #endif
7
8 #include "Evas.h"
9
10 #include "../file/evas_module.h"
11 #include "../file/evas_path.h"
12
13
14 /* complain when peole pass in wrong object types etc. */
15 #define MAGIC_DEBUG
16
17 #define RENDER_METHOD_INVALID            0x00000000
18
19 typedef struct _Evas_Layer                  Evas_Layer;
20 typedef struct _Evas_Size                   Evas_Size;
21 typedef struct _Evas_Aspect                 Evas_Aspect;
22 typedef struct _Evas_Size_Hints             Evas_Size_Hints;
23 typedef struct _Evas_Font_Dir               Evas_Font_Dir;
24 typedef struct _Evas_Font                   Evas_Font;
25 typedef struct _Evas_Font_Alias             Evas_Font_Alias;
26 typedef struct _Evas_Data_Node              Evas_Data_Node;
27 typedef struct _Evas_Func_Node              Evas_Func_Node;
28 typedef RGBA_Image_Loadopts                 Evas_Image_Load_Opts;
29 typedef struct _Evas_Func                   Evas_Func;
30 typedef struct _Evas_Image_Load_Func        Evas_Image_Load_Func;
31 typedef struct _Evas_Image_Save_Func        Evas_Image_Save_Func;
32 typedef struct _Evas_Object_Func            Evas_Object_Func;
33 typedef struct _Evas_Intercept_Func         Evas_Intercept_Func;
34 typedef struct _Evas_Intercept_Func_Basic   Evas_Intercept_Func_Basic;
35 typedef struct _Evas_Intercept_Func_SizePos Evas_Intercept_Func_SizePos;
36 typedef struct _Evas_Intercept_Func_Obj     Evas_Intercept_Func_Obj;
37 typedef struct _Evas_Intercept_Func_Int     Evas_Intercept_Func_Int;
38 typedef struct _Evas_Intercept_Func_Color   Evas_Intercept_Func_Color;
39 typedef struct _Evas_Key_Grab               Evas_Key_Grab;
40 typedef struct _Evas_Callbacks              Evas_Callbacks;
41 typedef struct _Evas_Format                 Evas_Format;
42 typedef struct _Evas_Rectangles             Evas_Rectangles;
43
44 #define MAGIC_EVAS          0x70777770
45 #define MAGIC_OBJ           0x71777770
46 #define MAGIC_OBJ_RECTANGLE 0x71777771
47 #define MAGIC_OBJ_LINE      0x71777772
48 #define MAGIC_OBJ_GRADIENT  0x71777773
49 #define MAGIC_OBJ_POLYGON   0x71777774
50 #define MAGIC_OBJ_IMAGE     0x71777775
51 #define MAGIC_OBJ_TEXT      0x71777776
52 #define MAGIC_OBJ_SMART     0x71777777
53 #define MAGIC_OBJ_TEXTBLOCK 0x71777778
54 #define MAGIC_SMART         0x72777770
55
56 #ifdef MAGIC_DEBUG
57 #define MAGIC_CHECK_FAILED(o, t, m) \
58 {evas_debug_error(); \
59  if (!o) evas_debug_input_null(); \
60  else if (((t *)o)->magic == 0) evas_debug_magic_null(); \
61  else evas_debug_magic_wrong((m), ((t *)o)->magic); \
62 }
63 #else
64 #define MAGIC_CHECK_FAILED(o, t, m)
65 #endif
66 #define MAGIC_CHECK(o, t, m) \
67 {if ((!o) || (!(((t *)o)->magic == (m)))) { \
68 MAGIC_CHECK_FAILED(o, t, m)
69 #define MAGIC_CHECK_END() \
70 }}
71
72 #define NEW_RECT(_r, _x, _y, _w, _h) \
73 {(_r) = malloc(sizeof(Evas_Rectangle)); \
74 if (_r) \
75 { \
76    (_r)->x = (_x); (_r)->y = (_y); \
77    (_r)->w = (_w); (_r)->h = (_h); \
78 }}
79
80 #define MERR_NONE() _evas_alloc_error = EVAS_ALLOC_ERROR_NONE
81 #define MERR_FATAL() _evas_alloc_error = EVAS_ALLOC_ERROR_FATAL
82 #define MERR_BAD() _evas_alloc_error = EVAS_ALLOC_ERROR_RECOVERED
83
84 #define EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o)                              \
85    if ((o)->cur.file)                                                       \
86      {                                                                      \
87          evas_stringshare_del((o)->cur.file);                               \
88          if ((o)->prev.file == (o)->cur.file)                               \
89                (o)->prev.file = NULL;                                       \
90          (o)->cur.file = NULL;                                              \
91      }                                                                      \
92    if ((o)->cur.key)                                                        \
93      {                                                                      \
94          evas_stringshare_del((o)->cur.key);                                \
95          if ((o)->prev.key == (o)->cur.key)                                 \
96                (o)->prev.key = NULL;                                        \
97          (o)->cur.key = NULL;                                               \
98      }                                                                      \
99    if ((o)->prev.file)                                                      \
100      {                                                                      \
101          evas_stringshare_del((o)->prev.file);                              \
102          (o)->prev.file = NULL;                                             \
103      }                                                                      \
104    if ((o)->prev.key)                                                       \
105      {                                                                      \
106          evas_stringshare_del((o)->prev.key);                               \
107          (o)->prev.key = NULL;                                              \
108      }
109
110 struct _Evas_Intercept_Func_Basic
111 {
112    void (*func) (void *data, Evas_Object *obj);
113    void *data;
114 };
115
116 struct _Evas_Intercept_Func_SizePos
117 {
118    void (*func) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y);
119    void *data;
120 };
121
122 struct _Evas_Intercept_Func_Obj
123 {
124    void (*func) (void *data, Evas_Object *obj, Evas_Object *obj2);
125    void *data;
126 };
127
128 struct _Evas_Intercept_Func_Int
129 {
130    void (*func) (void *data, Evas_Object *obj, int n);
131    void *data;
132 };
133
134 struct _Evas_Intercept_Func_Color
135 {
136    void (*func) (void *data, Evas_Object *obj, int r, int g, int b, int a);
137    void *data;
138 };
139
140 struct _Evas_Key_Grab
141 {
142    char               *keyname;
143    Evas_Modifier_Mask  modifiers;
144    Evas_Modifier_Mask  not_modifiers;
145    Evas_Object        *object;
146    unsigned char       exclusive : 1;
147    unsigned char       just_added : 1;
148    unsigned char       delete_me : 1;
149 };
150
151 struct _Evas_Intercept_Func
152 {
153    Evas_Intercept_Func_Basic   show;
154    Evas_Intercept_Func_Basic   hide;
155    Evas_Intercept_Func_SizePos move;
156    Evas_Intercept_Func_SizePos resize;
157    Evas_Intercept_Func_Basic   raise;
158    Evas_Intercept_Func_Basic   lower;
159    Evas_Intercept_Func_Obj     stack_above;
160    Evas_Intercept_Func_Obj     stack_below;
161    Evas_Intercept_Func_Int     layer_set;
162    Evas_Intercept_Func_Color   color_set;
163    Evas_Intercept_Func_Obj     clip_set;
164    Evas_Intercept_Func_Basic   clip_unset;
165 };
166
167 struct _Evas_Smart
168 {
169    DATA32            magic;
170
171    int               usage;
172
173    const Evas_Smart_Class *smart_class;
174
175    unsigned char     delete_me : 1;
176    unsigned char     class_allocated : 1;
177
178 };
179
180 struct _Evas_Modifier
181 {
182    struct {
183       int       count;
184       char    **list;
185    } mod;
186    Evas_Modifier_Mask mask; /* ok we have a max of 64 modifiers */
187 };
188
189 struct _Evas_Lock
190 {
191    struct {
192       int       count;
193       char    **list;
194    } lock;
195    Evas_Modifier_Mask mask; /* we have a max of 64 locks */
196 };
197
198 struct _Evas_Callbacks
199 {
200    Evas_Object_List *callbacks;
201    int               walking_list;
202    unsigned char     deletions_waiting : 1;
203 /*
204    Evas_Object_List *down;
205    Evas_Object_List *up;
206    Evas_Object_List *move;
207    Evas_Object_List *in;
208    Evas_Object_List *out;
209    Evas_Object_List *wheel;
210    Evas_Object_List *key_down;
211    Evas_Object_List *key_up;
212    Evas_Object_List *free;
213    Evas_Object_List *obj_focus_in;
214    Evas_Object_List *obj_focus_out;
215    Evas_Object_List *obj_show;
216    Evas_Object_List *obj_hide;
217    Evas_Object_List *obj_move;
218    Evas_Object_List *obj_resize;
219    Evas_Object_List *obj_restack;
220  */
221 };
222
223 struct _Evas
224 {
225    Evas_Object_List  _list_data;
226
227    DATA32            magic;
228
229    struct {
230       unsigned char  inside : 1;
231       int            mouse_grabbed;
232       DATA32         button;
233       Evas_Coord     x, y;
234
235 ////      Evas_Coord         canvas_x, canvas_y;
236
237       struct {
238          Evas_List *in;
239       } object;
240
241    } pointer;
242
243    struct  {
244       Evas_Coord     x, y, w, h;
245       unsigned char  changed : 1;
246    } viewport;
247
248    struct {
249       int            w, h;
250       DATA32         render_method;
251       unsigned char  changed : 1;
252    } output;
253
254    Evas_List        *damages;
255    Evas_List        *obscures;
256
257    Evas_Layer       *layers;
258
259    Evas_Hash        *name_hash;
260
261    int               output_validity;
262
263    int               walking_list;
264    int               events_frozen;
265
266    struct {
267       Evas_Module *module;
268       Evas_Func *func;
269       struct {
270          void *output;
271
272          void *context;
273       } data;
274
275       void *info;
276       int   info_magic;
277    } engine;
278
279    Evas_Array     delete_objects;
280    Evas_Array     active_objects;
281    Evas_Array     restack_objects;
282    Evas_Array     render_objects;
283    Evas_Array     pending_objects;
284    Evas_Array     obscuring_objects;
285    Evas_Array     temporary_objects;
286
287    int            delete_grabs;
288    int            walking_grabs;
289    Evas_List     *grabs;
290
291    Evas_List     *font_path;
292
293    Evas_Object   *focused;
294    void          *attach_data;
295    Evas_Modifier  modifiers;
296    Evas_Lock      locks;
297    unsigned int   last_timestamp;
298    int            last_mouse_down_counter;
299    int            last_mouse_up_counter;
300    Evas_Font_Hinting_Flags hinting;
301    unsigned char  changed : 1;
302    unsigned char  delete_me : 1;
303    unsigned char  invalidate : 1;
304    unsigned char  cleanup : 1;
305 };
306
307 struct _Evas_Layer
308 {
309    Evas_Object_List  _list_data;
310
311    short             layer;
312    Evas_Object      *objects;
313
314    Evas             *evas;
315
316    void             *engine_data;
317    int               usage;
318    unsigned char     delete_me : 1;
319 };
320
321 struct _Evas_Rectangles
322 {
323    unsigned int    total;
324    unsigned int    count;
325    Evas_Rectangle *array;
326 };
327
328 struct _Evas_Size
329 {
330    Evas_Coord w, h;
331 };
332
333 struct _Evas_Aspect
334 {
335    Evas_Aspect_Control mode;
336    Evas_Size size;
337 };
338
339 struct _Evas_Size_Hints
340 {
341    Evas_Size min, max, request;
342    Evas_Aspect aspect;
343 };
344
345 struct _Evas_Object
346 {
347    Evas_Object_List  _list_data;
348
349    DATA32            magic;
350
351    const char       *type;
352    Evas_Layer       *layer;
353
354    struct {
355       struct {
356 /*
357          struct {
358             int            x, y, w, h;
359             int            validity;
360          } geometry;
361  */
362          struct {
363             int            x, y, w, h;
364             unsigned char  r, g, b, a;
365             Evas_Bool      visible : 1;
366             Evas_Bool      dirty : 1;
367          } clip;
368       } cache;
369       Evas_Coord_Rectangle geometry;
370       struct {
371          unsigned char  r, g, b, a;
372       } color;
373       Evas_Object      *clipper;
374       short             layer;
375       Evas_Bool         visible : 1;
376       Evas_Bool         have_clipees : 1;
377       Evas_Bool         anti_alias : 1;
378       unsigned char     interpolation_color_space : 1;
379       Evas_Render_Op    render_op : 4;
380    } cur, prev;
381
382    char                       *name;
383
384    Evas_Intercept_Func *interceptors;
385
386    struct {
387       Evas_List *elements;
388    } data;
389
390    Evas_List *grabs;
391
392    Evas_Callbacks *callbacks;
393
394    struct {
395       Evas_List   *clipees;
396       Evas_List   *changes;
397    } clip;
398
399    const Evas_Object_Func *func;
400
401    void             *object_data;
402
403    struct {
404       Evas_Smart       *smart;
405       Evas_Object      *parent;
406    } smart;
407
408    Evas_Size_Hints            *size_hints;
409
410    int                         last_mouse_down_counter;
411    int                         last_mouse_up_counter;
412    int                         mouse_grabbed;
413
414    Evas_Object_Pointer_Mode    pointer_mode : 1;
415
416    Evas_Bool                   store : 1;
417    Evas_Bool                   pass_events : 1;
418    Evas_Bool                   parent_pass_events : 1;
419    Evas_Bool                   parent_cache_valid : 1;
420    Evas_Bool                   repeat_events : 1;
421    Evas_Bool                   restack : 1;
422    Evas_Bool                   changed : 1;
423    Evas_Bool                   is_active : 1;
424    Evas_Bool                   render_pre : 1;
425    Evas_Bool                   rect_del : 1;
426    Evas_Bool                   mouse_in : 1;
427    Evas_Bool                   pre_render_done : 1;
428    Evas_Bool                   intercepted : 1;
429    Evas_Bool                   focused : 1;
430    Evas_Bool                   in_layer : 1;
431    Evas_Bool                   no_propagate : 1;
432    Evas_Bool                   precise_is_inside : 1;
433
434    unsigned char               delete_me;
435 };
436
437 struct _Evas_Func_Node
438 {
439    Evas_Object_List  _list_data;
440    void (*func) (void *data, Evas *e, Evas_Object *obj, void *event_info);
441    void *data;
442    Evas_Callback_Type type;
443    unsigned char delete_me : 1;
444 };
445
446 struct _Evas_Data_Node
447 {
448    char *key;
449    void *data;
450 };
451
452 struct _Evas_Font_Dir
453 {
454    Evas_Hash *lookup;
455    Evas_List *fonts;
456    Evas_List *aliases;
457    DATA64     dir_mod_time;
458    DATA64     fonts_dir_mod_time;
459    DATA64     fonts_alias_mod_time;
460 };
461
462 struct _Evas_Font
463 {
464    struct {
465       const char *prop[14];
466    } x;
467    struct {
468       const char *name;
469    } simple;
470    const char *path;
471    char     type;
472 };
473
474 struct _Evas_Font_Alias
475 {
476    const char *alias;
477    Evas_Font  *fn;
478 };
479
480 struct _Evas_Object_Func
481 {
482    void (*free) (Evas_Object *obj);
483    void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
484    void (*render_pre) (Evas_Object *obj);
485    void (*render_post) (Evas_Object *obj);
486
487    void (*store) (Evas_Object *obj);
488    void (*unstore) (Evas_Object *obj);
489
490    int  (*is_visible) (Evas_Object *obj);
491    int  (*was_visible) (Evas_Object *obj);
492
493    int  (*is_opaque) (Evas_Object *obj);
494    int  (*was_opaque) (Evas_Object *obj);
495
496    int  (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
497    int  (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
498
499    void (*coords_recalc) (Evas_Object *obj);
500 };
501
502 struct _Evas_Func
503 {
504    void *(*info)                           (Evas *e);
505    void (*info_free)                       (Evas *e, void *info);
506    void (*setup)                           (Evas *e, void *info);
507
508    void (*output_free)                     (void *data);
509    void (*output_resize)                   (void *data, int w, int h);
510    void (*output_tile_size_set)            (void *data, int w, int h);
511    void (*output_redraws_rect_add)         (void *data, int x, int y, int w, int h);
512    void (*output_redraws_rect_del)         (void *data, int x, int y, int w, int h);
513    void (*output_redraws_clear)            (void *data);
514    void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
515    void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
516    void (*output_flush)                    (void *data);
517    void (*output_idle_flush)               (void *data);
518
519    void *(*context_new)                    (void *data);
520    void (*context_free)                    (void *data, void *context);
521    void (*context_clip_set)                (void *data, void *context, int x, int y, int w, int h);
522    void (*context_clip_clip)               (void *data, void *context, int x, int y, int w, int h);
523    void (*context_clip_unset)              (void *data, void *context);
524    int  (*context_clip_get)                (void *data, void *context, int *x, int *y, int *w, int *h);
525    void (*context_color_set)               (void *data, void *context, int r, int g, int b, int a);
526    int  (*context_color_get)               (void *data, void *context, int *r, int *g, int *b, int *a);
527    void (*context_multiplier_set)          (void *data, void *context, int r, int g, int b, int a);
528    void (*context_multiplier_unset)        (void *data, void *context);
529    int  (*context_multiplier_get)          (void *data, void *context, int *r, int *g, int *b, int *a);
530    void (*context_cutout_add)              (void *data, void *context, int x, int y, int w, int h);
531    void (*context_cutout_clear)            (void *data, void *context);
532    void (*context_anti_alias_set)          (void *data, void *context, unsigned char aa);
533    unsigned char (*context_anti_alias_get) (void *data, void *context);
534    void (*context_color_interpolation_set) (void *data, void *context, int color_space);
535    int  (*context_color_interpolation_get) (void *data, void *context);
536    void (*context_render_op_set)           (void *data, void *context, int render_op);
537    int  (*context_render_op_get)           (void *data, void *context);
538
539    void (*rectangle_draw)                  (void *data, void *context, void *surface, int x, int y, int w, int h);
540
541    void (*line_draw)                       (void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
542
543    void *(*polygon_point_add)              (void *data, void *context, void *polygon, int x, int y);
544    void *(*polygon_points_clear)           (void *data, void *context, void *polygon);
545    void (*polygon_draw)                    (void *data, void *context, void *surface, void *polygon);
546
547    void *(*gradient_new)                   (void *data);
548    void (*gradient_free)                   (void *data, void *gradient);
549    void (*gradient_color_stop_add)         (void *data, void *gradient, int r, int g, int b, int a, int delta);
550    void (*gradient_alpha_stop_add)         (void *data, void *gradient, int a, int delta);
551    void (*gradient_color_data_set)         (void *data, void *gradient, void *map, int len, int alpha_flag);
552    void (*gradient_alpha_data_set)         (void *data, void *gradient, void *alpha_map, int len);
553    void (*gradient_clear)                  (void *data, void *gradient);
554    void (*gradient_fill_set)               (void *data, void *gradient, int x, int y, int w, int h);
555    void (*gradient_fill_angle_set)         (void *data, void *gradient, double fill_angle);
556    void (*gradient_fill_spread_set)        (void *data, void *gradient, int spread);
557    void (*gradient_angle_set)              (void *data, void *gradient, double angle);
558    void (*gradient_offset_set)             (void *data, void *gradient, float offset);
559    void (*gradient_direction_set)          (void *data, void *gradient, int direction);
560    void (*gradient_type_set)               (void *data, void *gradient, char *name, char *params);
561    int  (*gradient_is_opaque)              (void *data, void *context, void *gradient, int x, int y, int w, int h);
562    int  (*gradient_is_visible)             (void *data, void *context, void *gradient, int x, int y, int w, int h);
563    void (*gradient_render_pre)             (void *data, void *context, void *gradient);
564    void (*gradient_render_post)            (void *data, void *gradient);
565    void (*gradient_draw)                   (void *data, void *context, void *surface, void *gradient, int x, int y, int w, int h);
566
567    void *(*image_load)                     (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo);
568    void *(*image_new_from_data)            (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
569    void *(*image_new_from_copied_data)     (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
570    void (*image_free)                      (void *data, void *image);
571    void (*image_size_get)                  (void *data, void *image, int *w, int *h);
572    void *(*image_size_set)                 (void *data, void *image, int w, int h);
573    void (*image_stride_get)                (void *data, void *image, int *stride);
574    void *(*image_dirty_region)             (void *data, void *image, int x, int y, int w, int h);
575    void *(*image_data_get)                 (void *data, void *image, int to_write, DATA32 **image_data);
576    void *(*image_data_put)                 (void *data, void *image, DATA32 *image_data);
577    void *(*image_alpha_set)                (void *data, void *image, int has_alpha);
578    int  (*image_alpha_get)                 (void *data, void *image);
579    void *(*image_border_set)               (void *data, void *image, int l, int r, int t, int b);
580    void  (*image_border_get)               (void *data, void *image, int *l, int *r, int *t, int *b);
581    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);
582    char *(*image_comment_get)              (void *data, void *image, char *key);
583    char *(*image_format_get)               (void *data, void *image);
584    void (*image_colorspace_set)            (void *data, void *image, int cspace);
585    int  (*image_colorspace_get)            (void *data, void *image);
586    void (*image_native_set)                (void *data, void *image, void *native);
587    void *(*image_native_get)               (void *data, void *image);
588
589    void (*image_cache_flush)               (void *data);
590    void (*image_cache_set)                 (void *data, int bytes);
591    int  (*image_cache_get)                 (void *data);
592
593    void *(*font_load)                      (void *data, const char *name, int size);
594    void *(*font_memory_load)               (void *data, char *name, int size, const void *fdata, int fdata_size);
595    void *(*font_add)                       (void *data, void *font, const char *name, int size);
596    void *(*font_memory_add)                (void *data, void *font, char *name, int size, const void *fdata, int fdata_size);
597    void (*font_free)                       (void *data, void *font);
598    int  (*font_ascent_get)                 (void *data, void *font);
599    int  (*font_descent_get)                (void *data, void *font);
600    int  (*font_max_ascent_get)             (void *data, void *font);
601    int  (*font_max_descent_get)            (void *data, void *font);
602    void (*font_string_size_get)            (void *data, void *font, const char *text, int *w, int *h);
603    int  (*font_inset_get)                  (void *data, void *font, const char *text);
604    int  (*font_h_advance_get)              (void *data, void *font, const char *text);
605    int  (*font_v_advance_get)              (void *data, void *font, const char *text);
606    int  (*font_char_coords_get)            (void *data, void *font, const char *text, int pos, int *cx, int *cy, int *cw, int *ch);
607    int  (*font_char_at_coords_get)         (void *data, void *font, const char *text, int x, int y, int *cx, int *cy, int *cw, int *ch);
608    void (*font_draw)                       (void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const char *text);
609
610    void (*font_cache_flush)                (void *data);
611    void (*font_cache_set)                  (void *data, int bytes);
612    int  (*font_cache_get)                  (void *data);
613
614    /* Engine functions will over time expand from here */
615
616    void (*font_hinting_set)                (void *data, void *font, int hinting);
617    int  (*font_hinting_can_hint)           (void *data, int hinting);
618
619 /*    void (*image_rotation_set)              (void *data, void *image); */
620
621 };
622
623 struct _Evas_Image_Load_Func
624 {
625   int (*file_head) (Image_Entry *ie, const char *file, const char *key);
626   int (*file_data) (Image_Entry *ie, const char *file, const char *key);
627 };
628
629 struct _Evas_Image_Save_Func
630 {
631   int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
632 };
633
634 #ifdef __cplusplus
635 extern "C" {
636 #endif
637
638 Evas_Object *evas_object_new(void);
639 void evas_object_free(Evas_Object *obj, int clean_layer);
640 void evas_object_inject(Evas_Object *obj, Evas *e);
641 void evas_object_release(Evas_Object *obj, int clean_layer);
642 void evas_object_change(Evas_Object *obj);
643 void evas_object_render_pre_visible_change(Evas_Rectangles *rects, Evas_Object *obj, int is_v, int was_v);
644 void evas_object_render_pre_clipper_change(Evas_Rectangles *rects, Evas_Object *obj);
645 void evas_object_render_pre_prev_cur_add(Evas_Rectangles *rects, Evas_Object *obj);
646 void evas_object_render_pre_effect_updates(Evas_Rectangles *rects, Evas_Object *obj, int is_v, int was_v);
647 void evas_rects_return_difference_rects(Evas_Rectangles *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
648
649 void evas_object_clip_dirty(Evas_Object *obj);
650 void evas_object_recalc_clippees(Evas_Object *obj);
651 Evas_Layer *evas_layer_new(Evas *e);
652 void evas_layer_pre_free(Evas_Layer *lay);
653 void evas_layer_free(Evas_Layer *lay);
654 Evas_Layer *evas_layer_find(Evas *e, short layer_num);
655 void evas_layer_add(Evas_Layer *lay);
656 void evas_layer_del(Evas_Layer *lay);
657
658 int evas_object_was_visible(Evas_Object *obj);
659 int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h);
660
661 int evas_object_was_opaque(Evas_Object *obj);
662 int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
663 int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
664 int evas_object_clippers_was_visible(Evas_Object *obj);
665 void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info);
666 Evas_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
667 int evas_mem_free(int mem_required);
668 int evas_mem_degrade(int mem_required);
669 void evas_debug_error(void);
670 void evas_debug_input_null(void);
671 void evas_debug_magic_null(void);
672 void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied);
673 void evas_debug_generic(const char *str);
674 const char *evas_debug_magic_string_get(DATA32 magic);
675 void evas_object_smart_use(Evas_Smart *s);
676 void evas_object_smart_unuse(Evas_Smart *s);
677 void evas_object_smart_del(Evas_Object *obj);
678 void evas_object_smart_cleanup(Evas_Object *obj);
679 void evas_object_smart_member_raise(Evas_Object *member);
680 void evas_object_smart_member_lower(Evas_Object *member);
681 void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other);
682 void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other);
683 const Evas_Object_List *evas_object_smart_members_get_direct(const Evas_Object *obj);
684 void *evas_mem_calloc(int size);
685 void evas_object_event_callback_all_del(Evas_Object *obj);
686 void evas_object_event_callback_cleanup(Evas_Object *obj);
687 void evas_object_inform_call_show(Evas_Object *obj);
688 void evas_object_inform_call_hide(Evas_Object *obj);
689 void evas_object_inform_call_move(Evas_Object *obj);
690 void evas_object_inform_call_resize(Evas_Object *obj);
691 void evas_object_inform_call_restack(Evas_Object *obj);
692 void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
693 void evas_object_intercept_cleanup(Evas_Object *obj);
694 int evas_object_intercept_call_show(Evas_Object *obj);
695 int evas_object_intercept_call_hide(Evas_Object *obj);
696 int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
697 int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
698 int evas_object_intercept_call_raise(Evas_Object *obj);
699 int evas_object_intercept_call_lower(Evas_Object *obj);
700 int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above);
701 int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below);
702 int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
703 int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a);
704 int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip);
705 int evas_object_intercept_call_clip_unset(Evas_Object *obj);
706 void evas_object_grabs_cleanup(Evas_Object *obj);
707 void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
708 void evas_font_dir_cache_free(void);
709 const char *evas_font_dir_cache_find(char *dir, char *font);
710 Evas_List *evas_font_dir_available_list(const Evas* evas);
711 void evas_font_dir_available_list_free(Evas_List *available);
712 void evas_font_free(Evas *evas, void *font);
713 void *evas_font_load(Evas *evas, const char *name, const char *source, int size);
714 void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);
715 void evas_object_smart_member_cache_invalidate(Evas_Object *obj);
716 void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b);
717 void _evas_object_text_rehint(Evas_Object *obj);
718 void _evas_object_textblock_rehint(Evas_Object *obj);
719
720 extern int _evas_alloc_error;
721
722 struct _Evas_Imaging_Image
723 {
724    RGBA_Image *image;
725 };
726
727 struct _Evas_Imaging_Font
728 {
729    RGBA_Font *font;
730 };
731
732 int evas_async_events_init(void);
733 int evas_async_events_shutdown(void);
734
735 void _evas_walk(Evas *e);
736 void _evas_unwalk(Evas *e);
737
738 EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
739
740 void evas_render_invalidate(Evas *e);
741 void evas_render_object_recalc(Evas_Object *obj);
742
743 #define EVAS_API_OVERRIDE(func, api, prefix) \
744      (api)->func = prefix##func
745
746 #include "evas_inline.x"
747
748 #ifdef __cplusplus
749 }
750 #endif
751 #endif