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