summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.c60
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.eo2
-rw-r--r--src/lib/evas/canvas/efl_canvas_object.eo6
-rw-r--r--src/lib/evas/canvas/efl_canvas_scene3d.c310
-rw-r--r--src/lib/evas/canvas/efl_canvas_scene3d.eo20
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock.eo69
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container.c4
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c6
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h32
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient.c14
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_eo.legacy.h21
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c12
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c16
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_image.c1
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_node.c20
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c10
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h31
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c35
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c12
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h29
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape.c84
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h54
-rw-r--r--src/lib/evas/canvas/efl_gfx_mapping.c1
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.c8
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.eo2
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.h2
-rw-r--r--src/lib/evas/canvas/efl_input_types.eot17
-rw-r--r--src/lib/evas/canvas/efl_text_cursor.eo21
-rw-r--r--src/lib/evas/canvas/efl_text_formatter.eo7
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_camera.c203
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_camera.eo89
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_eet.c211
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_light.c309
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_light.eo249
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_material.c206
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_material.eo116
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.c1172
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_mesh.eo421
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node.c1695
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node.eo368
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_node_callback.h36
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_object.c101
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_object.eo77
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_primitive.c152
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_primitive.eo130
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.c839
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_scene.eo168
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.c606
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_texture.eo159
-rw-r--r--src/lib/evas/canvas/evas_canvas3d_types.eot293
-rw-r--r--src/lib/evas/canvas/evas_canvas_eo.h2
-rw-r--r--src/lib/evas/canvas/evas_canvas_eo.legacy.h15
-rw-r--r--src/lib/evas/canvas/evas_events.c44
-rw-r--r--src/lib/evas/canvas/evas_events_legacy.c9
-rw-r--r--src/lib/evas/canvas/evas_grid_eo.c2
-rw-r--r--src/lib/evas/canvas/evas_image_eo.c2
-rw-r--r--src/lib/evas/canvas/evas_image_legacy.c35
-rw-r--r--src/lib/evas/canvas/evas_image_private.h8
-rw-r--r--src/lib/evas/canvas/evas_main.c25
-rw-r--r--src/lib/evas/canvas/evas_object_box.c4
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c23
-rw-r--r--src/lib/evas/canvas/evas_object_image.c53
-rw-r--r--src/lib/evas/canvas/evas_object_intercept.c25
-rw-r--r--src/lib/evas/canvas/evas_object_main.c43
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c4
-rw-r--r--src/lib/evas/canvas/evas_object_text.c2
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c1181
-rw-r--r--src/lib/evas/canvas/evas_render.c102
-rw-r--r--src/lib/evas/canvas/evas_table_eo.c2
-rw-r--r--src/lib/evas/canvas/evas_textblock_legacy.h6
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h1
-rw-r--r--src/lib/evas/canvas/meson.build24
72 files changed, 1298 insertions, 8820 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c
index 1bdd5329ec..822c94600e 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -19,19 +19,33 @@ _evas_image_file_unload(Eo *eo_obj)
19 _evas_image_done_set(eo_obj, obj, o); 19 _evas_image_done_set(eo_obj, obj, o);
20 o->load_error = EFL_GFX_IMAGE_LOAD_ERROR_NONE; 20 o->load_error = EFL_GFX_IMAGE_LOAD_ERROR_NONE;
21} 21}
22
23void
24_evas_image_preload_update(Eo *eo_obj, Eina_File *f)
25{
26 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
27 if (o->cur->f) return;
28 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, cur)
29 {
30 cur->f = eina_file_dup(f);
31 }
32 EINA_COW_IMAGE_STATE_WRITE_END(o, cur)
33}
34
22Eina_Bool 35Eina_Bool
23_evas_image_file_load(Eo *eo_obj) 36_evas_image_file_load(Eo *eo_obj, Evas_Image_Data *o)
24{ 37{
25 Evas_Object_Protected_Data *obj; 38 Evas_Object_Protected_Data *obj;
26 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
27 Evas_Image_Load_Opts lo; 39 Evas_Image_Load_Opts lo;
28 const Eina_File *f = efl_file_mmap_get(eo_obj); 40 const Eina_File *f = efl_file_mmap_get(eo_obj);
29 const char *key = efl_file_key_get(eo_obj); 41 const char *key = efl_file_key_get(eo_obj);
30 int load_error; 42 int load_error;
43 int frame_index;
31 44
32 EINA_SAFETY_ON_NULL_RETURN_VAL(f, EINA_FALSE); 45 if (!o->skip_head)
46 EINA_SAFETY_ON_NULL_RETURN_VAL(f, EINA_FALSE);
33 47
34 if (o->cur->f == f) 48 if (f && (o->cur->f == f))
35 { 49 {
36 if ((!o->cur->key) && (!key)) 50 if ((!o->cur->key) && (!key))
37 return EINA_TRUE; 51 return EINA_TRUE;
@@ -42,7 +56,17 @@ _evas_image_file_load(Eo *eo_obj)
42 obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 56 obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
43 evas_object_async_block(obj); 57 evas_object_async_block(obj);
44 _evas_image_init_set(f, key, eo_obj, obj, o, &lo); 58 _evas_image_init_set(f, key, eo_obj, obj, o, &lo);
45 o->engine_data = ENFN->image_mmap(ENC, o->cur->f, o->cur->key, &load_error, &lo); 59 if (f)
60 o->engine_data = ENFN->image_mmap(ENC, o->cur->f, o->cur->key, &load_error, &lo);
61 else
62 o->engine_data = ENFN->image_load(ENC, efl_file_get(eo_obj), o->cur->key, &load_error, &lo);
63
64 if (_evas_image_animated_get(eo_obj))
65 {
66 frame_index = ENFN->image_animated_frame_get(ENC, o->engine_data);
67 _evas_image_animated_frame_set(eo_obj, frame_index);
68 }
69
46 o->load_error = _evas_load_error_to_efl_gfx_image_load_error(load_error); 70 o->load_error = _evas_load_error_to_efl_gfx_image_load_error(load_error);
47 o->buffer_data_set = EINA_FALSE; 71 o->buffer_data_set = EINA_FALSE;
48 _evas_image_done_set(eo_obj, obj, o); 72 _evas_image_done_set(eo_obj, obj, o);
@@ -52,13 +76,35 @@ _evas_image_file_load(Eo *eo_obj)
52 return EINA_TRUE; 76 return EINA_TRUE;
53} 77}
54 78
79EOLIAN static Eina_Bool
80_efl_canvas_image_efl_file_loaded_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
81{
82 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
83 if (!o->skip_head)
84 return efl_file_loaded_get(efl_super(eo_obj, MY_CLASS));
85 return !!o->cur->f;
86}
87
88EOLIAN static const Eina_File *
89_efl_canvas_image_efl_file_mmap_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
90{
91 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
92 if (!o->skip_head)
93 return efl_file_mmap_get(efl_super(eo_obj, MY_CLASS));
94 return o->cur->f;
95}
96
55EOLIAN static Eina_Error 97EOLIAN static Eina_Error
56_efl_canvas_image_efl_file_load(Eo *eo_obj, void *_pd EINA_UNUSED) 98_efl_canvas_image_efl_file_load(Eo *eo_obj, void *_pd EINA_UNUSED)
57{ 99{
58 if (efl_file_loaded_get(eo_obj)) return 0; 100 if (efl_file_loaded_get(eo_obj)) return 0;
59 Eina_Error err = efl_file_load(efl_super(eo_obj, MY_CLASS)); 101 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
102 Eina_Error err = 0;
103
104 if (!o->skip_head)
105 err = efl_file_load(efl_super(eo_obj, MY_CLASS));
60 if (err) return err; 106 if (err) return err;
61 if (_evas_image_file_load(eo_obj)) 107 if (_evas_image_file_load(eo_obj, o))
62 return 0; 108 return 0;
63 return EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST; 109 return EFL_GFX_IMAGE_LOAD_ERROR_DOES_NOT_EXIST;
64} 110}
diff --git a/src/lib/evas/canvas/efl_canvas_image.eo b/src/lib/evas/canvas/efl_canvas_image.eo
index 72e1894f61..230b84a9bc 100644
--- a/src/lib/evas/canvas/efl_canvas_image.eo
+++ b/src/lib/evas/canvas/efl_canvas_image.eo
@@ -16,6 +16,8 @@ class @beta Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements
16 Efl.Gfx.Buffer.buffer_size { get; } 16 Efl.Gfx.Buffer.buffer_size { get; }
17 Efl.Gfx.Buffer.buffer_map; 17 Efl.Gfx.Buffer.buffer_map;
18 Efl.Gfx.Buffer.buffer_unmap; 18 Efl.Gfx.Buffer.buffer_unmap;
19 Efl.File.loaded { get; }
20 Efl.File.mmap { get; }
19 Efl.File.load; 21 Efl.File.load;
20 Efl.File.unload; 22 Efl.File.unload;
21 Efl.Gfx.Frame_Controller.animated { get; } 23 Efl.Gfx.Frame_Controller.animated { get; }
diff --git a/src/lib/evas/canvas/efl_canvas_object.eo b/src/lib/evas/canvas/efl_canvas_object.eo
index bc02e56197..890462ca7f 100644
--- a/src/lib/evas/canvas/efl_canvas_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_object.eo
@@ -11,7 +11,7 @@ struct Efl.Event_Animator_Tick {
11 11
12abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack, 12abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity, Efl.Gfx.Color, Efl.Gfx.Stack,
13 Efl.Input.Interface, Efl.Gfx.Hint, 13 Efl.Input.Interface, Efl.Gfx.Hint,
14 Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Canvas.Gesture_Events, Efl.Canvas.Object_Animation 14 Efl.Gfx.Mapping, Efl.Canvas.Pointer, Efl.Canvas.Object_Animation
15{ 15{
16 [[Efl canvas object abstract class 16 [[Efl canvas object abstract class
17 17
@@ -483,10 +483,6 @@ abstract Efl.Canvas.Object extends Efl.Loop_Consumer implements Efl.Gfx.Entity,
483 return: bool; [[$true if the coordinates are inside the object, $false otherwise]] 483 return: bool; [[$true if the coordinates are inside the object, $false otherwise]]
484 } 484 }
485 } 485 }
486 gesture_manager_get @beta {
487 [[Returns current canvas's gesture manager]]
488 return: const(Efl.Canvas.Gesture_Manager); [[The gesture manager]]
489 }
490 } 486 }
491 implements { 487 implements {
492 Efl.Object.constructor; 488 Efl.Object.constructor;
diff --git a/src/lib/evas/canvas/efl_canvas_scene3d.c b/src/lib/evas/canvas/efl_canvas_scene3d.c
deleted file mode 100644
index 513a68ba94..0000000000
--- a/src/lib/evas/canvas/efl_canvas_scene3d.c
+++ /dev/null
@@ -1,310 +0,0 @@
1#include "evas_image_private.h"
2#include "efl_canvas_scene3d.eo.h"
3
4#define MY_CLASS EFL_CANVAS_SCENE3D_CLASS
5
6EOLIAN static void
7_efl_canvas_scene3d_scene3d_set(Eo *eo_obj, void *pd EINA_UNUSED, Evas_Canvas3D_Scene *scene)
8{
9 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
10 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
11 Evas_Image_Load_Opts lo;
12 int load_error;
13
14 if (o->cur->scene == scene) return;
15
16 evas_object_async_block(obj);
17 _evas_image_init_set(NULL, NULL, eo_obj, obj, o, &lo);
18 o->engine_data = ENFN->image_mmap(ENC, o->cur->f, o->cur->key, &load_error, &lo);
19 o->load_error = _evas_load_error_to_efl_gfx_image_load_error(load_error);
20 _evas_image_done_set(eo_obj, obj, o);
21
22 if (scene) _evas_image_3d_set(eo_obj, scene);
23 else _evas_image_3d_unset(eo_obj, obj, o);
24}
25
26EOLIAN static Evas_Canvas3D_Scene *
27_efl_canvas_scene3d_scene3d_get(const Eo *eo_obj, void *pd EINA_UNUSED)
28{
29 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
30 return o->cur->scene;
31}
32
33void
34_evas_image_3d_render(Evas *eo_e, Evas_Object *eo_obj,
35 Evas_Object_Protected_Data *obj, Evas_Image_Data *o EINA_UNUSED,
36 Evas_Canvas3D_Scene *scene, void *engine, void *output)
37{
38 Evas_Public_Data *e;
39 Eina_Bool need_native_set = EINA_FALSE;
40 Evas_Canvas3D_Scene_Public_Data scene_data;
41 Evas_Canvas3D_Scene_Data *pd_scene = NULL;
42
43 pd_scene = efl_data_scope_get(scene, EVAS_CANVAS3D_SCENE_CLASS);
44
45 if ((pd_scene->w == 0) || (pd_scene->h == 0)) return;
46 if (!pd_scene->camera_node)
47 {
48 WRN("Camera has not been set to scene(%p)", scene);
49 return;
50 }
51
52 e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
53
54 if (pd_scene->surface)
55 {
56 int w = 0;
57 int h = 0;
58
59 if (e->engine.func->drawable_size_get)
60 {
61 e->engine.func->drawable_size_get(engine,
62 pd_scene->surface, &w, &h);
63 }
64 if ((w != pd_scene->w) || (h != pd_scene->h))
65 {
66 if (e->engine.func->drawable_free)
67 {
68 e->engine.func->drawable_free(engine,
69 pd_scene->surface);
70 }
71 pd_scene->surface = NULL;
72 need_native_set = EINA_TRUE;
73 }
74 }
75 else
76 {
77 /* TODO: Hard-coded alpha on. */
78 if (e->engine.func->drawable_new)
79 {
80 pd_scene->surface =
81 e->engine.func->drawable_new(engine,
82 pd_scene->w, pd_scene->h, 1);
83 }
84 need_native_set = EINA_TRUE;
85 }
86
87 EINA_COW_WRITE_BEGIN(evas_object_3d_cow, obj->data_3d, Evas_Object_3D_Data,
88 data)
89 {
90 if (need_native_set)
91 {
92 if (e->engine.func->image_drawable_set)
93 {
94 data->surface =
95 e->engine.func->image_drawable_set(engine,
96 data->surface,
97 pd_scene->surface);
98 }
99 }
100 data->w = pd_scene->w;
101 data->h = pd_scene->h;
102 }
103 EINA_COW_WRITE_END(evas_object_3d_cow, obj->data_3d, data);
104
105 evas_canvas3d_scene_data_init(&scene_data);
106
107 scene_data.bg_color = pd_scene->bg_color;
108 scene_data.shadows_enabled = pd_scene->shadows_enabled;
109 scene_data.camera_node = pd_scene->camera_node;
110 scene_data.depth_offset = pd_scene->depth_offset;
111 scene_data.depth_constant = pd_scene->depth_constant;
112 if (evas_object_anti_alias_get(eo_obj))
113 {
114 /*Use post processing render*/
115 scene_data.post_processing = EINA_TRUE;
116 scene_data.color_pick_enabled = EINA_FALSE;
117 scene_data.render_to_texture = EINA_TRUE;
118 scene_data.post_processing_type = EVAS_CANVAS3D_SHADER_MODE_POST_PROCESSING_FXAA;
119 }
120 /* Phase 1 - Update scene graph tree. */
121 evas_canvas3d_object_update(scene);
122
123 /* Phase 2 - Do frustum culling and get visible model nodes. */
124 evas_canvas3d_node_tree_traverse(pd_scene->root_node,
125 EVAS_CANVAS3D_TREE_TRAVERSE_LEVEL_ORDER, EINA_TRUE,
126 evas_canvas3d_node_mesh_collect, &scene_data);
127
128 /* Phase 3 - Collect active light nodes in the scene graph tree. */
129 evas_canvas3d_node_tree_traverse(pd_scene->root_node,
130 EVAS_CANVAS3D_TREE_TRAVERSE_ANY_ORDER, EINA_FALSE,
131 evas_canvas3d_node_light_collect, &scene_data);
132
133 /* Phase 5 - Draw the scene. */
134 if (e->engine.func->drawable_scene_render)
135 {
136 e->engine.func->drawable_scene_render(engine, output,
137 pd_scene->surface, &scene_data);
138 }
139 /* Clean up temporary resources. */
140 evas_canvas3d_scene_data_fini(&scene_data);
141}
142
143void
144_evas_image_3d_set(Evas_Object *eo_obj, Evas_Canvas3D_Scene *scene)
145{
146 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
147 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
148 Evas_Canvas3D_Scene_Data *pd_scene = efl_data_scope_get(scene,
149 EVAS_CANVAS3D_SCENE_CLASS);
150 EINA_COW_WRITE_BEGIN(evas_object_3d_cow, obj->data_3d, Evas_Object_3D_Data,
151 data)
152 {
153 data->surface = NULL;
154 data->w = 0;
155 data->h = 0;
156 efl_ref(scene);
157 }
158 EINA_COW_WRITE_END(evas_object_3d_cow, obj->data_3d, data);
159
160 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
161 {
162 state_write->scene = scene;
163 }
164 EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
165
166 pd_scene->images = eina_list_append(pd_scene->images, eo_obj);
167}
168
169void
170_evas_image_3d_unset(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj,
171 Evas_Image_Data *o)
172{
173 Evas_Public_Data *e;
174
175 if (!o->cur->scene) return;
176
177 Evas_Canvas3D_Scene_Data *pd_scene =
178 efl_data_scope_get(o->cur->scene, EVAS_CANVAS3D_SCENE_CLASS);
179
180 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
181 {
182 pd_scene->images = eina_list_remove(pd_scene->images, eo_obj);
183 efl_unref(state_write->scene);
184 state_write->scene = NULL;
185 }
186 EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
187
188 if (o->cur->defmap)
189 {
190 EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
191 {
192 evas_map_free(state_write->defmap);
193 state_write->defmap = NULL;
194 }
195 EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
196 }
197
198 EINA_COW_WRITE_BEGIN(evas_object_3d_cow, obj->data_3d, Evas_Object_3D_Data,
199 data)
200 {
201 e = obj->layer->evas;
202
203 if (data->surface)
204 e->engine.func->image_free(_evas_engine_context(e), data->surface);
205
206 data->surface = NULL;
207 data->w = 0;
208 data->h = 0;
209 }
210 EINA_COW_WRITE_END(evas_object_3d_cow, obj->data_3d, data);
211}
212
213EOLIAN static Eina_Rw_Slice
214_efl_canvas_scene3d_efl_gfx_buffer_buffer_map(Eo *eo_obj, void *_pd EINA_UNUSED,
215 Efl_Gfx_Buffer_Access_Mode mode,
216 const Eina_Rect *region,
217 Efl_Gfx_Colorspace cspace, int plane,
218 int *stride)
219{
220 Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
221 Evas_Public_Data *e;
222 Evas_Canvas3D_Object_Data *pd_parent;
223 Evas_Canvas3D_Scene_Data *pd_scene;
224 int width = -1, height = -1, ntex = -1;
225 unsigned char *pixels = NULL;
226 Eina_Rw_Slice slice = {};
227 int x, y, w, h;
228 size_t len = 0;
229
230 if (!o->cur->scene)
231 {
232 ERR("invalid scene data");
233 return slice;
234 }
235 if (mode & EFL_GFX_BUFFER_ACCESS_MODE_WRITE)
236 {
237 ERR("invalid map access mode");
238 return slice;
239 }
240 if (cspace != EFL_GFX_COLORSPACE_ARGB8888)
241 {
242 ERR("invalid map colorspace. Only ARGB is supported");
243 return slice;
244 }
245
246 pd_parent = efl_data_scope_get(o->cur->scene, EVAS_CANVAS3D_OBJECT_CLASS);
247 e = efl_data_scope_get(pd_parent->evas, EVAS_CANVAS_CLASS);
248 pd_scene = efl_data_scope_get(o->cur->scene, EVAS_CANVAS3D_SCENE_CLASS);
249
250 if (e->engine.func->drawable_size_get)
251 {
252 e->engine.func->drawable_size_get(_evas_engine_context(e),
253 pd_scene->surface, &width, &height);
254 }
255
256 if (region)
257 {
258 x = region->x;
259 y = region->y;
260 w = region->w;
261 h = region->h;
262 }
263 else
264 {
265 x = y = 0;
266 w = width;
267 h = height;
268 }
269
270 if ((x < 0) || (y < 0) || (w <= 0) || (h <= 0) || ((x + w) > width) || ((y + h) > height))
271 {
272 ERR("Invalid map dimensions : %dx%d +%d,%d. Image is %dx%d.",
273 w, h, x, y, width, height);
274 return slice;
275 }
276
277 if (e->engine.func->drawable_texture_target_id_get)
278 {
279 ntex = e->engine.func->drawable_texture_target_id_get(pd_scene->surface);
280
281 if (e->engine.func->drawable_texture_rendered_pixels_get)
282 {
283 len = w * h * sizeof(DATA32); //four component texture
284 pixels = malloc(len + sizeof(slice) + 8);
285 e->engine.func->drawable_texture_rendered_pixels_get(ntex, x, y, w, h,
286 pd_scene->surface, pixels);
287 }
288 else
289 return slice;
290 }
291 else
292 return slice;
293
294 if (stride) *stride = w * sizeof(DATA32);
295 slice.mem = pixels;
296 slice.len = len;
297 DBG("map(%p, %d,%d %dx%d plane:%d) -> " EINA_SLICE_FMT,
298 eo_obj, x, y, w, h, plane, EINA_SLICE_PRINT(slice));
299
300 return slice;
301}
302EOLIAN static Eina_Bool
303_efl_canvas_scene3d_efl_gfx_buffer_buffer_unmap(Eo *eo_obj EINA_UNUSED, void *_pd EINA_UNUSED,
304 const Eina_Rw_Slice slice)
305{
306 free(slice.mem);
307 return EINA_TRUE;
308}
309
310#include "efl_canvas_scene3d.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_scene3d.eo b/src/lib/evas/canvas/efl_canvas_scene3d.eo
deleted file mode 100644
index 8d506be64c..0000000000
--- a/src/lib/evas/canvas/efl_canvas_scene3d.eo
+++ /dev/null
@@ -1,20 +0,0 @@
1class @beta Efl.Canvas.Scene3d extends Efl.Canvas.Image_Internal
2{
3 [[A UI view for EFL Canvas 3D.]]
4 data: null;
5 methods {
6 @property scene3d {
7 [[The 3d scene to display in this view.
8 ]]
9 set {}
10 get {}
11 values {
12 scene: Evas.Canvas3D.Scene; [[3D scene.]]
13 }
14 }
15 }
16 implements {
17 Efl.Gfx.Buffer.buffer_map;
18 Efl.Gfx.Buffer.buffer_unmap;
19 }
20}
diff --git a/src/lib/evas/canvas/efl_canvas_textblock.eo b/src/lib/evas/canvas/efl_canvas_textblock.eo
index 2ecfd7bd8d..ca3d218e34 100644
--- a/src/lib/evas/canvas/efl_canvas_textblock.eo
+++ b/src/lib/evas/canvas/efl_canvas_textblock.eo
@@ -1,6 +1,6 @@
1import efl_text_types; 1import efl_text_types;
2 2
3class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text, 3class Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
4 Efl.Canvas.Filter.Internal, Efl.Text_Font_Properties, 4 Efl.Canvas.Filter.Internal, Efl.Text_Font_Properties,
5 Efl.Text_Style, Efl.Text_Format, 5 Efl.Text_Style, Efl.Text_Format,
6 Efl.Text_Markup, Efl.Ui.I18n 6 Efl.Text_Markup, Efl.Ui.I18n
@@ -12,6 +12,8 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
12 This can be accomplished using @Efl.Text_Font_Properties.font_family, @Efl.Text_Font_Properties.font_size and 12 This can be accomplished using @Efl.Text_Font_Properties.font_family, @Efl.Text_Font_Properties.font_size and
13 @Efl.Text_Style.text_color. 13 @Efl.Text_Style.text_color.
14 Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color. 14 Alternatively, @.style_apply can be used providing the attributes $font, $font_size and $color.
15
16 @since 1.24
15 ]] 17 ]]
16 methods { 18 methods {
17 @property is_empty { 19 @property is_empty {
@@ -137,47 +139,47 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
137 139
138 - $underline_color: Color code for the text underline (See bottom for the complete list of supported codes). 140 - $underline_color: Color code for the text underline (See bottom for the complete list of supported codes).
139 Default value is $[rgba(0,0,0,0)] meaning that no underline will be rendered. 141 Default value is $[rgba(0,0,0,0)] meaning that no underline will be rendered.
140 Requires $underline. 142 Requires $underline_type.
141 See @Efl.Text_Style.text_underline_color. 143 See @Efl.Text_Style.text_underline_color.
142 144
143 - $secondary_underline_color: Color code for the secondary text underline (See bottom for the complete list 145 - $secondary_underline_color: Color code for the secondary text underline (See bottom for the complete list
144 of supported codes). Only valid when $[underline=double]. 146 of supported codes). Only valid when $[underline_type=double].
145 Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered. 147 Default value is $[rgba(0,0,0,0)] meaning that secondary underline will not be rendered.
146 See @Efl.Text_Style.text_secondary_underline_color. 148 See @Efl.Text_Style.text_secondary_underline_color.
147 149
148 - $underline_dash_color: Color code for the dashed underline (See bottom for the complete list of supported 150 - $underline_dashed_color: Color code for the dashed underline (See bottom for the complete list of supported
149 codes). Only valid when $[underline=dashed]. 151 codes). Only valid when $[underline_type=dashed].
150 Default value is $[rgba(0,0,0,0)] meaning that dashed underline will not be rendered. 152 Default value is $[rgba(0,0,0,0)] meaning that dashed underline will not be rendered.
151 See @Efl.Text_Style.text_underline_dashed_color. 153 See @Efl.Text_Style.text_underline_dashed_color.
152 154
153 - $outline_color: Color code for the text outline (See bottom for the complete list of supported codes). 155 - $outline_color: Color code for the text outline (See bottom for the complete list of supported codes).
154 Only valid when the $style attribute includes an outline. 156 Only valid when the $effect_type attribute includes an outline.
155 Default value is $[rgba(0,0,0,0)] meaning that no outline will be rendered. 157 Default value is $[rgba(0,0,0,0)] meaning that no outline will be rendered.
156 See @Efl.Text_Style.text_outline_color. 158 See @Efl.Text_Style.text_outline_color.
157 159
158 - $shadow_color: Color code for the text shadow (See bottom for the complete list of supported codes). 160 - $shadow_color: Color code for the text shadow (See bottom for the complete list of supported codes).
159 Only valid when the $style attribute includes a shadow. 161 Only valid when the $effect_type attribute includes a shadow.
160 Default value is $[rgba(0,0,0,0)] meaning that no shadow will be rendered. 162 Default value is $[rgba(0,0,0,0)] meaning that no shadow will be rendered.
161 See @Efl.Text_Style.text_shadow_color. 163 See @Efl.Text_Style.text_shadow_color.
162 164
163 - $glow_color: Color code for the glow component of the text (See bottom for the complete list of supported 165 - $glow_color: Color code for the glow component of the text (See bottom for the complete list of supported
164 codes). Only valid when the $style attribute includes a glow. 166 codes). Only valid when the $effect_type attribute includes a glow.
165 Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered. 167 Default value is $[rgba(0,0,0,0)] meaning that no glow will be rendered.
166 See @Efl.Text_Style.text_glow_color. 168 See @Efl.Text_Style.text_glow_color.
167 169
168 - $secondary_glow_color: Color code for the secondary (inner) glow component of the text (See bottom for 170 - $secondary_glow_color: Color code for the secondary (inner) glow component of the text (See bottom for
169 the complete list of supported codes). Only valid when the $style attribute includes a glow. 171 the complete list of supported codes). Only valid when the $effect_type attribute includes a glow.
170 Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used. 172 Default value is $[rgba(0,0,0,0)] meaning that only the primary $glow_color will be used.
171 See @Efl.Text_Style.text_secondary_glow_color. 173 See @Efl.Text_Style.text_secondary_glow_color.
172 174
173 - $backing_color: Color code for the background of the text (See bottom for the complete list of supported 175 - $background_color: Color code for the background of the text (See bottom for the complete list of supported
174 codes). Use a fully transparent color to disable the background. 176 codes). Use a fully transparent color to disable the background.
175 Default value is $[rgba(0,0,0,0)] meaning that no backing will be rendered. 177 Default value is $[rgba(0,0,0,0)] meaning that no background will be rendered.
176 Requires $backing. 178 Requires $background_type.
177 See @Efl.Text_Style.text_background_color. 179 See @Efl.Text_Style.text_background_color.
178 180
179 - $strikethrough_color: Color code for the line striking through the text (See bottom for the complete list 181 - $strikethrough_color: Color code for the line striking through the text (See bottom for the complete list
180 of supported codes). Only valid when $[strikethrough=on] 182 of supported codes). Only valid when $[strikethrough_type=single]
181 Default value is $[rgba(0,0,0,0)] meaning that no strike-through line will be rendered. 183 Default value is $[rgba(0,0,0,0)] meaning that no strike-through line will be rendered.
182 See @Efl.Text_Style.text_strikethrough_color. 184 See @Efl.Text_Style.text_strikethrough_color.
183 185
@@ -219,34 +221,35 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
219 Default value is $[0]. 221 Default value is $[0].
220 Examples: $[right_margin=10], $[right_margin=+10], $[right_margin=reset]. 222 Examples: $[right_margin=10], $[right_margin=+10], $[right_margin=reset].
221 223
222 - $underline: Style of the underline. The value must be one of $off (No underlining), 224 - $underline_type: Style of the underline. The value must be one of $none (No underlining),
223 $single (A single line under the text), $on (Alias for $single), $double (Two lines under the text), 225 $single (A single line under the text) , $double (Two lines under the text),
224 $dashed (A dashed line under the text). 226 $dashed (A dashed line under the text).
225 Default value is $off. 227 Default value is $none.
226 Requires either $underline_color, $secondary_underline_color or $underline_dash_color. 228 Requires either $underline_color, $secondary_underline_color or $underline_dashed_color.
227 See @Efl.Text_Style.text_underline_type. 229 See @Efl.Text_Style.text_underline_type.
228 230
229 - $strikethrough: Enables crossed-out text. Possible values are $on and $off. 231 - $strikethrough_type: Enables crossed-out text. Possible values are $single and $none.
230 Default value is $off. 232 Default value is $none.
231 Requires $strikethrough_color. 233 Requires $strikethrough_color.
232 See @Efl.Text_Style.text_strikethrough_type. 234 See @Efl.Text_Style.text_strikethrough_type.
233 235
234 - $backing: Enables background color for the text. Possible values are $on and $off. 236 - $background_type: Enables background color for the text. Possible values are $solid and $none.
235 Default value is $off. 237 Default value is $none.
236 Requires $backing_color. 238 Requires $background_color.
237 See @Efl.Text_Style.text_background_type. 239 See @Efl.Text_Style.text_background_type.
238 240
239 - $style: Controls a number of decorations around the text, like shadow, outline and glow, including 241 - $effect_type: Controls a number of decorations around the text, like shadow, outline and glow, including
240 combinations of them. Possible values are $plain (No decoration, alias for $off and $none), 242 combinations of them. Possible values are $none (No decoration),
241 $shadow, $outline, $soft_outline, $outline_shadow, $outline_soft_shadow, $glow (alias for $soft_outline), 243 $shadow, $outline, $soft_outline, $outline_shadow, $outline_soft_shadow, $glow (alias for $soft_outline),
242 $far_shadow, $soft_shadow and $far_soft_shadow. 244 $far_shadow, $soft_shadow and $far_soft_shadow.
243 All values involving a shadow accept a second parameter, separated by a comma, to indicate the shadow 245 Default value is $none.
244 direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right
245 and $right.
246 Default value is $plain.
247 Requires either $shadow_color, $glow_color or $outline_color. 246 Requires either $shadow_color, $glow_color or $outline_color.
248 Examples: $[style=outline], $[style=shadow,bottom_right], $[style=outline_shadow,bottom]. 247 See @Efl.Text_Style.text_effect_type
249 See @Efl.Text_Style.text_effect_type and @Efl.Text_Style.text_shadow_direction. 248
249 - $shadow_direction: Indicate the shadow direction. Valid positions are $bottom_right, $bottom, $bottom_left, $left, $top_left, $top, $top_right
250 and $right.
251 Requires either $effect_type.
252 See @Efl.Text_Style.text_shadow_direction.
250 253
251 - $tab_stops: Size (in pixels) of the tab character. The value must be a number greater than one. 254 - $tab_stops: Size (in pixels) of the tab character. The value must be a number greater than one.
252 Default value is $[32]. 255 Default value is $[32].
@@ -303,15 +306,15 @@ class @beta Efl.Canvas.Textblock extends Efl.Canvas.Object implements Efl.Text,
303 Examples: $[replacement_char=*]. 306 Examples: $[replacement_char=*].
304 See @Efl.Text_Format.replacement_char. 307 See @Efl.Text_Format.replacement_char.
305 308
306 - $underline_dash_width: Length (in pixels) of the dashes when $underline is $dashed. 309 - $underline_dashed_width: Length (in pixels) of the dashes when $underline_type is $dashed.
307 Default value is $[6]. 310 Default value is $[6].
308 See @Efl.Text_Style.text_underline_dashed_width. 311 See @Efl.Text_Style.text_underline_dashed_width.
309 312
310 - $underline_dash_gap: Length (in pixels) of the gaps between the dashes when $underline is $dashed. 313 - $underline_dashed_gap: Length (in pixels) of the gaps between the dashes when $underline_type is $dashed.
311 Default value is $[2]. 314 Default value is $[2].
312 See @Efl.Text_Style.text_underline_dashed_gap. 315 See @Efl.Text_Style.text_underline_dashed_gap.
313 316
314 - $underline_height: Width (in pixels) of the single underline when $underline is $single. 317 - $underline_height: Width (in pixels) of the single underline when $underline_type is $single.
315 Default value is $[1]. 318 Default value is $[1].
316 See @Efl.Text_Style.text_underline_height. 319 See @Efl.Text_Style.text_underline_height.
317 320
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container.c b/src/lib/evas/canvas/efl_canvas_vg_container.c
index dfa5b1ec74..f791f8160a 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container.c
@@ -481,8 +481,8 @@ efl_canvas_vg_container_blend_buffer_clear(Efl_VG *obj EINA_UNUSED, Efl_Canvas_V
481 cd->blend.buffer = NULL; 481 cd->blend.buffer = NULL;
482} 482}
483 483
484EAPI Efl_VG* 484EAPI Evas_Vg_Container *
485evas_vg_container_add(Efl_VG *parent) 485evas_vg_container_add(Evas_Object *parent)
486{ 486{
487 /* Warn it because the usage has been changed. 487 /* Warn it because the usage has been changed.
488 We can remove this message after v1.21. */ 488 We can remove this message after v1.21. */
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c
index a31fc33d44..170a6668f0 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.c
@@ -1,12 +1,12 @@
1 1
2EAPI Efl_Canvas_Vg_Node * 2EAPI Evas_Vg_Node *
3evas_vg_container_child_get(Efl_Canvas_Vg_Container *obj, const char *name) 3evas_vg_container_child_get(Evas_Vg_Container *obj, const char *name)
4{ 4{
5 return efl_canvas_vg_container_child_get(obj, name); 5 return efl_canvas_vg_container_child_get(obj, name);
6} 6}
7 7
8EAPI Eina_Iterator * 8EAPI Eina_Iterator *
9evas_vg_container_children_get(Efl_Canvas_Vg_Container *obj) 9evas_vg_container_children_get(Evas_Vg_Container *obj)
10{ 10{
11 return efl_canvas_vg_container_children_get(obj); 11 return efl_canvas_vg_container_children_get(obj);
12} 12}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h
index 691a93b3c4..8a4cde36d6 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_vg_container_eo.legacy.h
@@ -1,40 +1,44 @@
1#ifndef _EFL_CANVAS_VG_CONTAINER_EO_LEGACY_H_ 1#ifndef _EVAS_VG_CONTAINER_EO_LEGACY_H_
2#define _EFL_CANVAS_VG_CONTAINER_EO_LEGACY_H_ 2#define _EVAS_VG_CONTAINER_EO_LEGACY_H_
3 3
4#ifndef _EFL_CANVAS_VG_CONTAINER_EO_CLASS_TYPE 4#ifndef _EVAS_VG_CONTAINER_EO_CLASS_TYPE
5#define _EFL_CANVAS_VG_CONTAINER_EO_CLASS_TYPE 5#define _EVAS_VG_CONTAINER_EO_CLASS_TYPE
6 6
7typedef Eo Efl_Canvas_Vg_Container; 7typedef Eo Evas_Vg_Container;
8 8
9#endif 9#endif
10 10
11#ifndef _EFL_CANVAS_VG_CONTAINER_EO_TYPES 11#ifndef _EVAS_VG_CONTAINER_EO_TYPES
12#define _EFL_CANVAS_VG_CONTAINER_EO_TYPES 12#define _EVAS_VG_CONTAINER_EO_TYPES
13 13
14 14
15#endif 15#endif
16 16
17/** 17/**
18 * @brief Get child of container 18 * @brief Get child of container.
19 * 19 *
20 * @param[in] obj The object. 20 * @param[in] obj The object.
21 * @param[in] name Child node name 21 * @param[in] name The Child node name.
22 * 22 *
23 * @return Child object 23 * @return The child object.
24 *
25 * @since 1.24
24 * 26 *
25 * @ingroup Evas_Vg_Container_Group 27 * @ingroup Evas_Vg_Container_Group
26 */ 28 */
27EAPI Efl_Canvas_Vg_Node *evas_vg_container_child_get(Efl_Canvas_Vg_Container *obj, const char *name); 29EAPI Evas_Vg_Node *evas_vg_container_child_get(Evas_Vg_Container *obj, const char *name);
28 30
29/** 31/**
30 * @brief Get all children of container 32 * @brief Get all children of container.
31 * 33 *
32 * @param[in] obj The object. 34 * @param[in] obj The object.
33 * 35 *
34 * @return Iterator to children 36 * @return The iterator to children.
37 *
38 * @since 1.24
35 * 39 *
36 * @ingroup Evas_Vg_Container_Group 40 * @ingroup Evas_Vg_Container_Group
37 */ 41 */
38EAPI Eina_Iterator *evas_vg_container_children_get(Efl_Canvas_Vg_Container *obj) EINA_WARN_UNUSED_RESULT; 42EAPI Eina_Iterator *evas_vg_container_children_get(Evas_Vg_Container *obj) EINA_WARN_UNUSED_RESULT;
39 43
40#endif 44#endif
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient.c b/src/lib/evas/canvas/efl_canvas_vg_gradient.c
index 3bc4ec80a8..2f6f2eb604 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient.c
@@ -118,25 +118,25 @@ _efl_canvas_vg_gradient_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Gra
118} 118}
119 119
120EAPI void 120EAPI void
121evas_vg_gradient_stop_set(Eo *obj, const Efl_Gfx_Gradient_Stop *colors, unsigned int length) 121evas_vg_gradient_stop_set(Evas_Vg_Gradient *obj, const Evas_Vg_Gradient_Stop *colors, unsigned int length)
122{ 122{
123 efl_gfx_gradient_stop_set(obj, colors, length); 123 efl_gfx_gradient_stop_set(obj, (const Efl_Gfx_Gradient_Stop *)colors, length);
124} 124}
125 125
126EAPI void 126EAPI void
127evas_vg_gradient_stop_get(Eo *obj, const Efl_Gfx_Gradient_Stop **colors, unsigned int *length) 127evas_vg_gradient_stop_get(Evas_Vg_Gradient *obj, const Evas_Vg_Gradient_Stop **colors, unsigned int *length)
128{ 128{
129 efl_gfx_gradient_stop_get(obj, colors, length); 129 efl_gfx_gradient_stop_get(obj, (const Efl_Gfx_Gradient_Stop **)colors, length);
130} 130}
131 131
132EAPI void 132EAPI void
133evas_vg_gradient_spread_set(Eo *obj, Efl_Gfx_Gradient_Spread s) 133evas_vg_gradient_spread_set(Evas_Vg_Gradient *obj, Evas_Vg_Gradient_Spread s)
134{ 134{
135 efl_gfx_gradient_spread_set(obj, s); 135 efl_gfx_gradient_spread_set(obj, s);
136} 136}
137 137
138EAPI Efl_Gfx_Gradient_Spread 138EAPI Evas_Vg_Gradient_Spread
139evas_vg_gradient_spread_get(Eo *obj) 139evas_vg_gradient_spread_get(Evas_Vg_Gradient *obj)
140{ 140{
141 return efl_gfx_gradient_spread_get(obj); 141 return efl_gfx_gradient_spread_get(obj);
142} 142}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_gradient_eo.legacy.h
new file mode 100644
index 0000000000..01ebdc32cb
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_eo.legacy.h
@@ -0,0 +1,21 @@
1#ifndef _EVAS_VG_GRADIENT_EO_LEGACY_H_
2#define _EVAS_VG_GRADIENT_EO_LEGACY_H_
3
4typedef Eo Evas_Vg_Gradient;
5
6#endif
7
8#ifndef _EVAS_VG_GRADIENT_LINEAR_EO_LEGACY_H_
9#define _EVAS_VG_GRADIENT_LINEAR_EO_LEGACY_H_
10
11typedef Eo Evas_Vg_Gradient_Linear;
12
13#endif
14
15#ifndef _EVAS_VG_GRADIENT_RADIAL_EO_LEGACY_H_
16#define _EVAS_VG_GRADIENT_RADIAL_EO_LEGACY_H_
17
18typedef Eo Evas_Vg_Gradient_Radial;
19
20#endif
21
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
index fd681eda38..bd8ccebf36 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_linear.c
@@ -172,31 +172,31 @@ _efl_canvas_vg_gradient_linear_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas
172} 172}
173 173
174EAPI void 174EAPI void
175evas_vg_gradient_linear_start_set(Eo *obj, double x, double y) 175evas_vg_gradient_linear_start_set(Evas_Vg_Gradient_Linear *obj, double x, double y)
176{ 176{
177 efl_gfx_gradient_linear_start_set(obj, x, y); 177 efl_gfx_gradient_linear_start_set(obj, x, y);
178} 178}
179 179
180EAPI void 180EAPI void
181evas_vg_gradient_linear_start_get(Eo *obj, double *x, double *y) 181evas_vg_gradient_linear_start_get(Evas_Vg_Gradient_Linear *obj, double *x, double *y)
182{ 182{
183 efl_gfx_gradient_linear_start_get(obj, x, y); 183 efl_gfx_gradient_linear_start_get(obj, x, y);
184} 184}
185 185
186EAPI void 186EAPI void
187evas_vg_gradient_linear_end_set(Eo *obj, double x, double y) 187evas_vg_gradient_linear_end_set(Evas_Vg_Gradient_Linear *obj, double x, double y)
188{ 188{
189 efl_gfx_gradient_linear_end_set(obj, x, y); 189 efl_gfx_gradient_linear_end_set(obj, x, y);
190} 190}
191 191
192EAPI void 192EAPI void
193evas_vg_gradient_linear_end_get(Eo *obj, double *x, double *y) 193evas_vg_gradient_linear_end_get(Evas_Vg_Gradient_Linear *obj, double *x, double *y)
194{ 194{
195 efl_gfx_gradient_linear_end_get(obj, x, y); 195 efl_gfx_gradient_linear_end_get(obj, x, y);
196} 196}
197 197
198EAPI Efl_VG* 198EAPI Evas_Vg_Gradient_Linear *
199evas_vg_gradient_linear_add(Efl_VG *parent) 199evas_vg_gradient_linear_add(Evas_Vg_Container *parent)
200{ 200{
201 return efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, parent); 201 return efl_add(EFL_CANVAS_VG_GRADIENT_LINEAR_CLASS, parent);
202} 202}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
index 8cbffa6e66..263428630b 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_gradient_radial.c
@@ -194,43 +194,43 @@ _efl_canvas_vg_gradient_radial_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas
194} 194}
195 195
196EAPI void 196EAPI void
197evas_vg_gradient_radial_center_set(Eo *obj, double x, double y) 197evas_vg_gradient_radial_center_set(Evas_Vg_Gradient_Radial *obj, double x, double y)
198{ 198{
199 efl_gfx_gradient_radial_center_set(obj, x, y); 199 efl_gfx_gradient_radial_center_set(obj, x, y);
200} 200}
201 201
202EAPI void 202EAPI void
203evas_vg_gradient_radial_center_get(Eo *obj, double *x, double *y) 203evas_vg_gradient_radial_center_get(Evas_Vg_Gradient_Radial *obj, double *x, double *y)
204{ 204{
205 efl_gfx_gradient_radial_center_get(obj, x, y); 205 efl_gfx_gradient_radial_center_get(obj, x, y);
206} 206}
207 207
208EAPI void 208EAPI void
209evas_vg_gradient_radial_radius_set(Eo *obj, double r) 209evas_vg_gradient_radial_radius_set(Evas_Vg_Gradient_Radial *obj, double r)
210{ 210{
211 efl_gfx_gradient_radial_radius_set(obj, r); 211 efl_gfx_gradient_radial_radius_set(obj, r);
212} 212}
213 213
214EAPI double 214EAPI double
215evas_vg_gradient_radial_radius_get(Eo *obj) 215evas_vg_gradient_radial_radius_get(Evas_Vg_Gradient_Radial *obj)
216{ 216{
217 return efl_gfx_gradient_radial_radius_get(obj); 217 return efl_gfx_gradient_radial_radius_get(obj);
218} 218}
219 219
220EAPI void 220EAPI void
221evas_vg_gradient_radial_focal_set(Eo *obj, double x, double y) 221evas_vg_gradient_radial_focal_set(Evas_Vg_Gradient_Radial *obj, double x, double y)
222{ 222{
223 efl_gfx_gradient_radial_focal_set(obj, x, y); 223 efl_gfx_gradient_radial_focal_set(obj, x, y);
224} 224}
225 225
226EAPI void 226EAPI void
227evas_vg_gradient_radial_focal_get(Eo *obj, double *x, double *y) 227evas_vg_gradient_radial_focal_get(Evas_Vg_Gradient_Radial *obj, double *x, double *y)
228{ 228{
229 efl_gfx_gradient_radial_focal_get(obj, x, y); 229 efl_gfx_gradient_radial_focal_get(obj, x, y);
230} 230}
231 231
232EAPI Efl_VG* 232EAPI Evas_Vg_Gradient_Radial*
233evas_vg_gradient_radial_add(Efl_VG *parent) 233evas_vg_gradient_radial_add(Evas_Vg_Container *parent)
234{ 234{
235 return efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, parent); 235 return efl_add(EFL_CANVAS_VG_GRADIENT_RADIAL_CLASS, parent);
236} 236}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_image.c b/src/lib/evas/canvas/efl_canvas_vg_image.c
index 1d0ba1772a..eb5c306ba3 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_image.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_image.c
@@ -49,7 +49,6 @@ _efl_canvas_vg_image_render_pre(Evas_Object_Protected_Data *vg_pd,
49 if (!pd->buffer && pd->image) 49 if (!pd->buffer && pd->image)
50 { 50 {
51 Evas_Object_Protected_Data *obj = vg_pd; 51 Evas_Object_Protected_Data *obj = vg_pd;
52 if (pd->buffer) efl_unref(pd->buffer);
53 pd->buffer = ENFN->ector_buffer_new(ENC, obj->layer->evas->evas, 52 pd->buffer = ENFN->ector_buffer_new(ENC, obj->layer->evas->evas,
54 pd->w, pd->h, 53 pd->w, pd->h,
55 EFL_GFX_COLORSPACE_ARGB8888, 54 EFL_GFX_COLORSPACE_ARGB8888,
diff --git a/src/lib/evas/canvas/efl_canvas_vg_node.c b/src/lib/evas/canvas/efl_canvas_vg_node.c
index 1f7975a937..865107639b 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_node.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_node.c
@@ -753,31 +753,31 @@ _efl_canvas_vg_node_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Node_Da
753} 753}
754 754
755EAPI Eina_Bool 755EAPI Eina_Bool
756evas_vg_node_visible_get(Eo *obj) 756evas_vg_node_visible_get(Evas_Vg_Node *obj)
757{ 757{
758 return efl_gfx_entity_visible_get(obj); 758 return efl_gfx_entity_visible_get(obj);
759} 759}
760 760
761EAPI void 761EAPI void
762evas_vg_node_visible_set(Eo *obj, Eina_Bool v) 762evas_vg_node_visible_set(Evas_Vg_Node *obj, Eina_Bool v)
763{ 763{
764 efl_gfx_entity_visible_set(obj, v); 764 efl_gfx_entity_visible_set(obj, v);
765} 765}
766 766
767EAPI void 767EAPI void
768evas_vg_node_color_get(Eo *obj, int *r, int *g, int *b, int *a) 768evas_vg_node_color_get(Evas_Vg_Node *obj, int *r, int *g, int *b, int *a)
769{ 769{
770 efl_gfx_color_get(obj, r, g, b, a); 770 efl_gfx_color_get(obj, r, g, b, a);
771} 771}
772 772
773EAPI void 773EAPI void
774evas_vg_node_color_set(Eo *obj, int r, int g, int b, int a) 774evas_vg_node_color_set(Evas_Vg_Node *obj, int r, int g, int b, int a)
775{ 775{
776 efl_gfx_color_set(obj, r, g, b, a); 776 efl_gfx_color_set(obj, r, g, b, a);
777} 777}
778 778
779EAPI void 779EAPI void
780evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h) 780evas_vg_node_geometry_get(Evas_Vg_Node *obj, int *x, int *y, int *w, int *h)
781{ 781{
782 Eina_Rect r; 782 Eina_Rect r;
783 r.pos = efl_gfx_entity_position_get(obj); 783 r.pos = efl_gfx_entity_position_get(obj);
@@ -789,32 +789,32 @@ evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h)
789} 789}
790 790
791EAPI void 791EAPI void
792evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h) 792evas_vg_node_geometry_set(Evas_Vg_Node *obj, int x, int y, int w, int h)
793{ 793{
794 efl_gfx_entity_position_set(obj, EINA_POSITION2D(x, y)); 794 efl_gfx_entity_position_set(obj, EINA_POSITION2D(x, y));
795 efl_gfx_entity_size_set(obj, EINA_SIZE2D(w, h)); 795 efl_gfx_entity_size_set(obj, EINA_SIZE2D(w, h));
796} 796}
797 797
798EAPI void 798EAPI void
799evas_vg_node_stack_below(Eo *obj, Eo *below) 799evas_vg_node_stack_below(Evas_Vg_Node *obj, Eo *below)
800{ 800{
801 efl_gfx_stack_below(obj, below); 801 efl_gfx_stack_below(obj, below);
802} 802}
803 803
804EAPI void 804EAPI void
805evas_vg_node_stack_above(Eo *obj, Eo *above) 805evas_vg_node_stack_above(Evas_Vg_Node *obj, Eo *above)
806{ 806{
807 efl_gfx_stack_above(obj, above); 807 efl_gfx_stack_above(obj, above);
808} 808}
809 809
810EAPI void 810EAPI void
811evas_vg_node_raise(Eo *obj) 811evas_vg_node_raise(Evas_Vg_Node *obj)
812{ 812{
813 efl_gfx_stack_raise_to_top(obj); 813 efl_gfx_stack_raise_to_top(obj);
814} 814}
815 815
816EAPI void 816EAPI void
817evas_vg_node_lower(Eo *obj) 817evas_vg_node_lower(Evas_Vg_Node *obj)
818{ 818{
819 efl_gfx_stack_lower_to_bottom(obj); 819 efl_gfx_stack_lower_to_bottom(obj);
820} 820}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c
index 559434b294..e6d520ca44 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.c
@@ -1,30 +1,30 @@
1 1
2EAPI void 2EAPI void
3evas_vg_node_transformation_set(Efl_Canvas_Vg_Node *obj, const Eina_Matrix3 *m) 3evas_vg_node_transformation_set(Evas_Vg_Node *obj, const Eina_Matrix3 *m)
4{ 4{
5 efl_canvas_vg_node_transformation_set(obj, m); 5 efl_canvas_vg_node_transformation_set(obj, m);
6} 6}
7 7
8EAPI const Eina_Matrix3 * 8EAPI const Eina_Matrix3 *
9evas_vg_node_transformation_get(const Efl_Canvas_Vg_Node *obj) 9evas_vg_node_transformation_get(const Evas_Vg_Node *obj)
10{ 10{
11 return efl_canvas_vg_node_transformation_get(obj); 11 return efl_canvas_vg_node_transformation_get(obj);
12} 12}
13 13
14EAPI void 14EAPI void
15evas_vg_node_origin_set(Efl_Canvas_Vg_Node *obj, double x, double y) 15evas_vg_node_origin_set(Evas_Vg_Node *obj, double x, double y)
16{ 16{
17 efl_canvas_vg_node_origin_set(obj, x, y); 17 efl_canvas_vg_node_origin_set(obj, x, y);
18} 18}
19 19
20EAPI void 20EAPI void
21evas_vg_node_origin_get(const Efl_Canvas_Vg_Node *obj, double *x, double *y) 21evas_vg_node_origin_get(const Evas_Vg_Node *obj, double *x, double *y)
22{ 22{
23 efl_canvas_vg_node_origin_get(obj, x, y); 23 efl_canvas_vg_node_origin_get(obj, x, y);
24} 24}
25 25
26EAPI void 26EAPI void
27evas_vg_node_mask_set(Efl_Canvas_Vg_Node *obj, Efl_Canvas_Vg_Node *mask, int op EINA_UNUSED) 27evas_vg_node_mask_set(Evas_Vg_Node *obj, Evas_Vg_Node *mask, int op EINA_UNUSED)
28{ 28{
29 efl_canvas_vg_node_comp_method_set(obj, mask, 0); 29 efl_canvas_vg_node_comp_method_set(obj, mask, 0);
30} 30}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h
index ee3b407331..d2d358cad5 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_vg_node_eo.legacy.h
@@ -1,15 +1,15 @@
1#ifndef _EFL_CANVAS_VG_NODE_EO_LEGACY_H_ 1#ifndef _EVAS_VG_NODE_EO_LEGACY_H_
2#define _EFL_CANVAS_VG_NODE_EO_LEGACY_H_ 2#define _EVAS_VG_NODE_EO_LEGACY_H_
3 3
4#ifndef _EFL_CANVAS_VG_NODE_EO_CLASS_TYPE 4#ifndef _EVAS_VG_NODE_EO_CLASS_TYPE
5#define _EFL_CANVAS_VG_NODE_EO_CLASS_TYPE 5#define _EVAS_VG_NODE_EO_CLASS_TYPE
6 6
7typedef Eo Efl_Canvas_Vg_Node; 7typedef Eo Evas_Vg_Node;
8 8
9#endif 9#endif
10 10
11#ifndef _EFL_CANVAS_VG_NODE_EO_TYPES 11#ifndef _EVAS_VG_NODE_EO_TYPES
12#define _EFL_CANVAS_VG_NODE_EO_TYPES 12#define _EVAS_VG_NODE_EO_TYPES
13 13
14 14
15#endif 15#endif
@@ -20,26 +20,25 @@ typedef Eo Efl_Canvas_Vg_Node;
20 * @note Pass @c null to cancel the applied transformation. 20 * @note Pass @c null to cancel the applied transformation.
21 * 21 *
22 * @param[in] obj The object. 22 * @param[in] obj The object.
23 * @param[in] m Transformation matrix. 23 * @param[in] m The transformation matrix.
24 * 24 *
25 * @since 1.14 25 * @since 1.14
26 * 26 *
27 * @ingroup Evas_Vg_Node_Group 27 * @ingroup Evas_Vg_Node_Group
28 */ 28 */
29EAPI void evas_vg_node_transformation_set(Efl_Canvas_Vg_Node *obj, const Eina_Matrix3 *m); 29EAPI void evas_vg_node_transformation_set(Evas_Vg_Node *obj, const Eina_Matrix3 *m);
30 30
31/** 31/**
32 * @brief Gets the transformation matrix used for this node object. 32 * @brief Gets the transformation matrix used for this node object.
33 * 33 *
34 * @param[in] obj The object. 34 * @param[in] obj The object.
35 * 35 * @return The transformation matrix.
36 * @return Transformation matrix.
37 * 36 *
38 * @since 1.14 37 * @since 1.14
39 * 38 *
40 * @ingroup Evas_Vg_Node_Group 39 * @ingroup Evas_Vg_Node_Group
41 */ 40 */
42EAPI const Eina_Matrix3 *evas_vg_node_transformation_get(const Efl_Canvas_Vg_Node *obj); 41EAPI const Eina_Matrix3 *evas_vg_node_transformation_get(const Evas_Vg_Node *obj);
43 42
44/** 43/**
45 * @brief Sets the origin position of the node object. 44 * @brief Sets the origin position of the node object.
@@ -54,7 +53,7 @@ EAPI const Eina_Matrix3 *evas_vg_node_transformation_get(const Efl_Canvas_Vg_Nod
54 * 53 *
55 * @ingroup Evas_Vg_Node_Group 54 * @ingroup Evas_Vg_Node_Group
56 */ 55 */
57EAPI void evas_vg_node_origin_set(Efl_Canvas_Vg_Node *obj, double x, double y); 56EAPI void evas_vg_node_origin_set(Evas_Vg_Node *obj, double x, double y);
58 57
59/** 58/**
60 * @brief Gets the origin position of the node object. 59 * @brief Gets the origin position of the node object.
@@ -67,7 +66,7 @@ EAPI void evas_vg_node_origin_set(Efl_Canvas_Vg_Node *obj, double x, double y);
67 * 66 *
68 * @ingroup Evas_Vg_Node_Group 67 * @ingroup Evas_Vg_Node_Group
69 */ 68 */
70EAPI void evas_vg_node_origin_get(const Efl_Canvas_Vg_Node *obj, double *x, double *y); 69EAPI void evas_vg_node_origin_get(const Evas_Vg_Node *obj, double *x, double *y);
71 70
72/** 71/**
73 * @brief Set Mask Node to this renderer 72 * @brief Set Mask Node to this renderer
@@ -76,8 +75,10 @@ EAPI void evas_vg_node_origin_get(const Efl_Canvas_Vg_Node *obj, double *x, doub
76 * @param[in] mask Mask object 75 * @param[in] mask Mask object
77 * @param[in] op Masking Option. Reserved 76 * @param[in] op Masking Option. Reserved
78 * 77 *
78 * @since 1.24
79 *
79 * @ingroup Evas_Vg_Node_Group 80 * @ingroup Evas_Vg_Node_Group
80 */ 81 */
81EAPI void evas_vg_node_mask_set(Efl_Canvas_Vg_Node *obj, Efl_Canvas_Vg_Node *mask, int op); 82EAPI void evas_vg_node_mask_set(Evas_Vg_Node *obj, Evas_Vg_Node *mask, int op);
82 83
83#endif 84#endif
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index cccd9e2c6b..bd43b7c0de 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -352,6 +352,15 @@ _efl_canvas_vg_object_efl_object_invalidate(Eo *eo_obj, Efl_Canvas_Vg_Object_Dat
352 free(pd->user_entry); 352 free(pd->user_entry);
353 } 353 }
354 pd->user_entry = NULL; 354 pd->user_entry = NULL;
355
356 //Drop cache buffers
357 if (pd->vg_entry)
358 {
359 if (pd->ckeys[0])
360 ENFN->ector_surface_cache_drop(_evas_engine_context(obj->layer->evas), pd->ckeys[0]);
361 if (pd->ckeys[1])
362 ENFN->ector_surface_cache_drop(_evas_engine_context(obj->layer->evas), pd->ckeys[1]);
363 }
355 evas_cache_vg_entry_del(pd->vg_entry); 364 evas_cache_vg_entry_del(pd->vg_entry);
356 365
357 efl_invalidate(efl_super(eo_obj, MY_CLASS)); 366 efl_invalidate(efl_super(eo_obj, MY_CLASS));
@@ -451,7 +460,7 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
451 //For recovery context 460 //For recovery context
452 //FIXME: It may occur async issue? 461 //FIXME: It may occur async issue?
453 int px, py, pw, ph, pstride; 462 int px, py, pw, ph, pstride;
454 void *ppixels; 463 void *ppixels = NULL;
455 ector_buffer_size_get(ector, &pw, &ph); 464 ector_buffer_size_get(ector, &pw, &ph);
456 ector_buffer_pixels_get(ector, &ppixels, &px, &ph, &pstride); 465 ector_buffer_pixels_get(ector, &ppixels, &px, &ph, &pstride);
457 Efl_Gfx_Colorspace pcspace = ector_buffer_cspace_get(ector); 466 Efl_Gfx_Colorspace pcspace = ector_buffer_cspace_get(ector);
@@ -541,7 +550,23 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd
541 evas_common_draw_context_free(context); 550 evas_common_draw_context_free(context);
542 551
543 if (buffer_created && ckey) 552 if (buffer_created && ckey)
544 ENFN->ector_surface_cache_set(engine, ckey, buffer); 553 {
554 //Drop ex invalid cache buffers.
555 if (pd->frame_idx == 0 && ckey != pd->ckeys[0])
556 {
557 if (pd->ckeys[0])
558 ENFN->ector_surface_cache_drop(engine, pd->ckeys[0]);
559 pd->ckeys[0] = ckey;
560 }
561 else if (pd->frame_idx == (int) (evas_cache_vg_anim_frame_count_get(pd->vg_entry) - 1)
562 && ckey != pd->ckeys[1])
563 {
564 if (pd->ckeys[1])
565 ENFN->ector_surface_cache_drop(engine, pd->ckeys[1]);
566 pd->ckeys[1] = ckey;
567 }
568 ENFN->ector_surface_cache_set(engine, ckey, buffer);
569 }
545 570
546 return buffer; 571 return buffer;
547} 572}
@@ -1018,7 +1043,7 @@ _efl_canvas_vg_object_default_size_get(const Eo *eo_obj EINA_UNUSED,
1018} 1043}
1019 1044
1020/* the actual api call to add a vector graphic object */ 1045/* the actual api call to add a vector graphic object */
1021EAPI Evas_Object * 1046EAPI Eo *
1022evas_object_vg_add(Evas *e) 1047evas_object_vg_add(Evas *e)
1023{ 1048{
1024 e = evas_find(e); 1049 e = evas_find(e);
@@ -1090,13 +1115,13 @@ _efl_ui_canvas_object_vg_fill_mode_to_evas_object_vg_fill_mode(Efl_Canvas_Vg_Fil
1090} 1115}
1091 1116
1092EAPI void 1117EAPI void
1093evas_object_vg_fill_mode_set(Efl_VG *obj, Evas_Object_Vg_Fill_Mode fill_mode) 1118evas_object_vg_fill_mode_set(Evas_Object *obj, Evas_Object_Vg_Fill_Mode fill_mode)
1094{ 1119{
1095 efl_canvas_vg_object_fill_mode_set(obj, _evas_object_vg_fill_mode_to_efl_ui_canvas_object_vg_fill_mode(fill_mode)); 1120 efl_canvas_vg_object_fill_mode_set(obj, _evas_object_vg_fill_mode_to_efl_ui_canvas_object_vg_fill_mode(fill_mode));
1096} 1121}
1097 1122
1098EAPI Evas_Object_Vg_Fill_Mode 1123EAPI Evas_Object_Vg_Fill_Mode
1099evas_object_vg_fill_mode_get(const Efl_VG *obj) 1124evas_object_vg_fill_mode_get(const Evas_Object *obj)
1100{ 1125{
1101 return _efl_ui_canvas_object_vg_fill_mode_to_evas_object_vg_fill_mode(efl_canvas_vg_object_fill_mode_get(obj)); 1126 return _efl_ui_canvas_object_vg_fill_mode_to_evas_object_vg_fill_mode(efl_canvas_vg_object_fill_mode_get(obj));
1102} 1127}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c b/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c
index 936ae0b512..14a9595c12 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.c
@@ -1,36 +1,36 @@
1 1
2EAPI void 2EAPI void
3evas_object_vg_viewbox_set(Efl_VG *obj, Eina_Rect viewbox) 3evas_object_vg_viewbox_set(Evas_Object *obj, Eina_Rect viewbox)
4{ 4{
5 efl_canvas_vg_object_viewbox_set(obj, viewbox); 5 efl_canvas_vg_object_viewbox_set(obj, viewbox);
6} 6}
7 7
8EAPI Eina_Rect 8EAPI Eina_Rect
9evas_object_vg_viewbox_get(const Efl_VG *obj) 9evas_object_vg_viewbox_get(const Evas_Object *obj)
10{ 10{
11 return efl_canvas_vg_object_viewbox_get(obj); 11 return efl_canvas_vg_object_viewbox_get(obj);
12} 12}
13 13
14EAPI void 14EAPI void
15evas_object_vg_viewbox_align_set(Efl_VG *obj, double align_x, double align_y) 15evas_object_vg_viewbox_align_set(Evas_Object *obj, double align_x, double align_y)
16{ 16{
17 efl_canvas_vg_object_viewbox_align_set(obj, align_x, align_y); 17 efl_canvas_vg_object_viewbox_align_set(obj, align_x, align_y);
18} 18}
19 19
20EAPI void 20EAPI void
21evas_object_vg_viewbox_align_get(const Efl_VG *obj, double *align_x, double *align_y) 21evas_object_vg_viewbox_align_get(const Evas_Object *obj, double *align_x, double *align_y)
22{ 22{
23 efl_canvas_vg_object_viewbox_align_get(obj, align_x, align_y); 23 efl_canvas_vg_object_viewbox_align_get(obj, align_x, align_y);
24} 24}
25 25
26EAPI void 26EAPI void
27evas_object_vg_root_node_set(Efl_VG *obj, Efl_Canvas_Vg_Node *root) 27evas_object_vg_root_node_set(Evas_Object *obj, Efl_Canvas_Vg_Node *root)
28{ 28{
29 efl_canvas_vg_object_root_node_set(obj, root); 29 efl_canvas_vg_object_root_node_set(obj, root);
30} 30}
31 31
32EAPI Efl_Canvas_Vg_Node * 32EAPI Efl_Canvas_Vg_Node *
33evas_object_vg_root_node_get(const Efl_VG *obj) 33evas_object_vg_root_node_get(const Evas_Object *obj)
34{ 34{
35 return efl_canvas_vg_object_root_node_get(obj); 35 return efl_canvas_vg_object_root_node_get(obj);
36} 36}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h
index 319305f8c6..40f49af66e 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_vg_object_eo.legacy.h
@@ -4,9 +4,11 @@
4#ifndef _EVAS_OBJECT_VG_EO_LEGACY_TYPES 4#ifndef _EVAS_OBJECT_VG_EO_LEGACY_TYPES
5#define _EVAS_OBJECT_VG_EO_LEGACY_TYPES 5#define _EVAS_OBJECT_VG_EO_LEGACY_TYPES
6 6
7/** Enumeration that defines how viewbox will be filled int the vg canvs's 7/**
8 * @brief Enumeration that defines how viewbox will be filled int the vg canvs's
8 * viewport. default Fill_Mode is @c none 9 * viewport. default Fill_Mode is @c none
9 * 10 *
11 * @since 1.24
10 * @ingroup Evas_Object_Vg_Group 12 * @ingroup Evas_Object_Vg_Group
11 */ 13 */
12typedef enum 14typedef enum
@@ -38,9 +40,10 @@ typedef enum
38 * @param[in] obj The object. 40 * @param[in] obj The object.
39 * @param[in] fill_mode Fill mode type 41 * @param[in] fill_mode Fill mode type
40 * 42 *
43 * @since 1.24
41 * @ingroup Evas_Object_Vg_Group 44 * @ingroup Evas_Object_Vg_Group
42 */ 45 */
43EAPI void evas_object_vg_fill_mode_set(Efl_VG *obj, Evas_Object_Vg_Fill_Mode fill_mode); 46EAPI void evas_object_vg_fill_mode_set(Evas_Object *obj, Evas_Object_Vg_Fill_Mode fill_mode);
44 47
45/** 48/**
46 * @brief Control how the viewbox is mapped to the vg canvas's viewport. 49 * @brief Control how the viewbox is mapped to the vg canvas's viewport.
@@ -49,9 +52,10 @@ EAPI void evas_object_vg_fill_mode_set(Efl_VG *obj, Evas_Object_Vg_Fill_Mode fil
49 * 52 *
50 * @return Fill mode type 53 * @return Fill mode type
51 * 54 *
55 * @since 1.24
52 * @ingroup Evas_Object_Vg_Group 56 * @ingroup Evas_Object_Vg_Group
53 */ 57 */
54EAPI Evas_Object_Vg_Fill_Mode evas_object_vg_fill_mode_get(const Efl_VG *obj); 58EAPI Evas_Object_Vg_Fill_Mode evas_object_vg_fill_mode_get(const Evas_Object *obj);
55 59
56/** 60/**
57 * @brief Sets the viewbox for the evas vg canvas. viewbox if set should be 61 * @brief Sets the viewbox for the evas vg canvas. viewbox if set should be
@@ -60,9 +64,10 @@ EAPI Evas_Object_Vg_Fill_Mode evas_object_vg_fill_mode_get(const Efl_VG *obj);
60 * @param[in] obj The object. 64 * @param[in] obj The object.
61 * @param[in] viewbox viewbox for the vg canvas 65 * @param[in] viewbox viewbox for the vg canvas
62 * 66 *
67 * @since 1.24
63 * @ingroup Evas_Object_Vg_Group 68 * @ingroup Evas_Object_Vg_Group
64 */ 69 */
65EAPI void evas_object_vg_viewbox_set(Efl_VG *obj, Eina_Rect viewbox); 70EAPI void evas_object_vg_viewbox_set(Evas_Object *obj, Eina_Rect viewbox);
66 71
67/** 72/**
68 * @brief Get the current viewbox from the evas_object_vg 73 * @brief Get the current viewbox from the evas_object_vg
@@ -71,9 +76,10 @@ EAPI void evas_object_vg_viewbox_set(Efl_VG *obj, Eina_Rect viewbox);
71 * 76 *
72 * @return viewbox for the vg canvas 77 * @return viewbox for the vg canvas
73 * 78 *
79 * @since 1.24
74 * @ingroup Evas_Object_Vg_Group 80 * @ingroup Evas_Object_Vg_Group
75 */ 81 */
76EAPI Eina_Rect evas_object_vg_viewbox_get(const Efl_VG *obj); 82EAPI Eina_Rect evas_object_vg_viewbox_get(const Evas_Object *obj);
77 83
78/** 84/**
79 * @brief Control how the viewbox is positioned inside the viewport. 85 * @brief Control how the viewbox is positioned inside the viewport.
@@ -82,9 +88,10 @@ EAPI Eina_Rect evas_object_vg_viewbox_get(const Efl_VG *obj);
82 * @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1). 88 * @param[in] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
83 * @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1). 89 * @param[in] align_y Alignment in the vertical axis (0 <= align_y <= 1).
84 * 90 *
91 * @since 1.24
85 * @ingroup Evas_Object_Vg_Group 92 * @ingroup Evas_Object_Vg_Group
86 */ 93 */
87EAPI void evas_object_vg_viewbox_align_set(Efl_VG *obj, double align_x, double align_y); 94EAPI void evas_object_vg_viewbox_align_set(Evas_Object *obj, double align_x, double align_y);
88 95
89/** 96/**
90 * @brief Control how the viewbox is positioned inside the viewport. 97 * @brief Control how the viewbox is positioned inside the viewport.
@@ -93,9 +100,10 @@ EAPI void evas_object_vg_viewbox_align_set(Efl_VG *obj, double align_x, double a
93 * @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1). 100 * @param[out] align_x Alignment in the horizontal axis (0 <= align_x <= 1).
94 * @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1). 101 * @param[out] align_y Alignment in the vertical axis (0 <= align_y <= 1).
95 * 102 *
103 * @since 1.24
96 * @ingroup Evas_Object_Vg_Group 104 * @ingroup Evas_Object_Vg_Group
97 */ 105 */
98EAPI void evas_object_vg_viewbox_align_get(const Efl_VG *obj, double *align_x, double *align_y); 106EAPI void evas_object_vg_viewbox_align_get(const Evas_Object *obj, double *align_x, double *align_y);
99 107
100/** 108/**
101 * @brief Set the root node of the evas_object_vg. 109 * @brief Set the root node of the evas_object_vg.
@@ -106,11 +114,12 @@ EAPI void evas_object_vg_viewbox_align_get(const Efl_VG *obj, double *align_x, d
106 * It takes the ownership of the root node. 114 * It takes the ownership of the root node.
107 * 115 *
108 * @param[in] obj The object. 116 * @param[in] obj The object.
109 * @param[in] root Root node(Efl_Canvas_Vg_Container) of the VG canvas. 117 * @param[in] root Root node(Evas_Vg_Container) of the VG canvas.
110 * 118 *
119 * @since 1.24
111 * @ingroup Evas_Object_Vg_Group 120 * @ingroup Evas_Object_Vg_Group
112 */ 121 */
113EAPI void evas_object_vg_root_node_set(Efl_VG *obj, Efl_Canvas_Vg_Node *root); 122EAPI void evas_object_vg_root_node_set(Evas_Object *obj, Evas_Vg_Node *root);
114 123
115/** 124/**
116 * @brief Get the root node of the evas_object_vg. 125 * @brief Get the root node of the evas_object_vg.
@@ -123,6 +132,6 @@ EAPI void evas_object_vg_root_node_set(Efl_VG *obj, Efl_Canvas_Vg_Node *root);
123 * 132 *
124 * @ingroup Evas_Object_Vg_Group 133 * @ingroup Evas_Object_Vg_Group
125 */ 134 */
126EAPI Efl_Canvas_Vg_Node *evas_object_vg_root_node_get(const Efl_VG *obj); 135EAPI Evas_Vg_Node *evas_object_vg_root_node_get(const Evas_Object *obj);
127 136
128#endif 137#endif
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c b/src/lib/evas/canvas/efl_canvas_vg_shape.c
index 5ddff89350..fb886d55df 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c
@@ -236,227 +236,227 @@ _efl_canvas_vg_shape_efl_duplicate_duplicate(const Eo *obj, Efl_Canvas_Vg_Shape_
236} 236}
237 237
238EAPI double 238EAPI double
239evas_vg_shape_stroke_scale_get(Eo *obj) 239evas_vg_shape_stroke_scale_get(Evas_Vg_Shape *obj)
240{ 240{
241 return efl_gfx_shape_stroke_scale_get(obj); 241 return efl_gfx_shape_stroke_scale_get(obj);
242} 242}
243 243
244EAPI void 244EAPI void
245evas_vg_shape_stroke_scale_set(Eo *obj, double s) 245evas_vg_shape_stroke_scale_set(Evas_Vg_Shape *obj, double s)
246{ 246{
247 efl_gfx_shape_stroke_scale_set(obj, s); 247 efl_gfx_shape_stroke_scale_set(obj, s);
248 efl_canvas_vg_node_change(obj); 248 efl_canvas_vg_node_change(obj);
249} 249}
250 250
251EAPI void 251EAPI void
252evas_vg_shape_stroke_color_get(Eo *obj, int *r, int *g, int *b, int *a) 252evas_vg_shape_stroke_color_get(Evas_Vg_Shape *obj, int *r, int *g, int *b, int *a)
253{ 253{
254 efl_gfx_shape_stroke_color_get(obj, r, g, b, a); 254 efl_gfx_shape_stroke_color_get(obj, r, g, b, a);
255} 255}
256 256
257EAPI void 257EAPI void
258evas_vg_shape_stroke_color_set(Eo *obj, int r, int g, int b, int a) 258evas_vg_shape_stroke_color_set(Evas_Vg_Shape *obj, int r, int g, int b, int a)
259{ 259{
260 efl_gfx_shape_stroke_color_set(obj, r, g, b, a); 260 efl_gfx_shape_stroke_color_set(obj, r, g, b, a);
261 efl_canvas_vg_node_change(obj); 261 efl_canvas_vg_node_change(obj);
262} 262}
263 263
264EAPI double 264EAPI double
265evas_vg_shape_stroke_width_get(Eo *obj) 265evas_vg_shape_stroke_width_get(Evas_Vg_Shape *obj)
266{ 266{
267 return efl_gfx_shape_stroke_width_get(obj); 267 return efl_gfx_shape_stroke_width_get(obj);
268} 268}
269 269
270EAPI void 270EAPI void
271evas_vg_shape_stroke_width_set(Eo *obj, double w) 271evas_vg_shape_stroke_width_set(Evas_Vg_Shape *obj, double w)
272{ 272{
273 efl_gfx_shape_stroke_width_set(obj, w); 273 efl_gfx_shape_stroke_width_set(obj, w);
274 efl_canvas_vg_node_change(obj); 274 efl_canvas_vg_node_change(obj);
275} 275}
276 276
277EAPI double 277EAPI double
278evas_vg_shape_stroke_location_get(Eo *obj) 278evas_vg_shape_stroke_location_get(Evas_Vg_Shape *obj)
279{ 279{
280 return efl_gfx_shape_stroke_location_get(obj); 280 return efl_gfx_shape_stroke_location_get(obj);
281} 281}
282 282
283EAPI void 283EAPI void
284evas_vg_shape_stroke_location_set(Eo *obj, double centered) 284evas_vg_shape_stroke_location_set(Evas_Vg_Shape *obj, double centered)
285{ 285{
286 efl_gfx_shape_stroke_location_set(obj, centered); 286 efl_gfx_shape_stroke_location_set(obj, centered);
287 efl_canvas_vg_node_change(obj); 287 efl_canvas_vg_node_change(obj);
288} 288}
289 289
290EAPI void 290EAPI void
291evas_vg_shape_stroke_dash_get(Eo *obj, const Efl_Gfx_Dash **dash, unsigned int *length) 291evas_vg_shape_stroke_dash_get(Evas_Vg_Shape *obj, const Evas_Vg_Dash **dash, unsigned int *length)
292{ 292{
293 efl_gfx_shape_stroke_dash_get(obj, dash, length); 293 efl_gfx_shape_stroke_dash_get(obj, (const Efl_Gfx_Dash **)dash, length);
294} 294}
295 295
296EAPI void 296EAPI void
297evas_vg_shape_stroke_dash_set(Eo *obj, const Efl_Gfx_Dash *dash, unsigned int length) 297evas_vg_shape_stroke_dash_set(Evas_Vg_Shape *obj, const Evas_Vg_Dash *dash, unsigned int length)
298{ 298{
299 efl_gfx_shape_stroke_dash_set(obj, dash, length); 299 efl_gfx_shape_stroke_dash_set(obj, (const Efl_Gfx_Dash *)dash, length);
300 efl_canvas_vg_node_change(obj); 300 efl_canvas_vg_node_change(obj);
301} 301}
302 302
303EAPI Efl_Gfx_Cap 303EAPI Evas_Vg_Cap
304evas_vg_shape_stroke_cap_get(Eo *obj) 304evas_vg_shape_stroke_cap_get(Evas_Vg_Shape *obj)
305{ 305{
306 return efl_gfx_shape_stroke_cap_get(obj); 306 return efl_gfx_shape_stroke_cap_get(obj);
307} 307}
308 308
309EAPI void 309EAPI void
310evas_vg_shape_stroke_cap_set(Eo *obj, Efl_Gfx_Cap c) 310evas_vg_shape_stroke_cap_set(Evas_Vg_Shape *obj, Evas_Vg_Cap c)
311{ 311{
312 efl_gfx_shape_stroke_cap_set(obj, c); 312 efl_gfx_shape_stroke_cap_set(obj, c);
313 efl_canvas_vg_node_change(obj); 313 efl_canvas_vg_node_change(obj);
314} 314}
315 315
316EAPI Efl_Gfx_Join 316EAPI Evas_Vg_Join
317evas_vg_shape_stroke_join_get(Eo *obj) 317evas_vg_shape_stroke_join_get(Evas_Vg_Shape *obj)
318{ 318{
319 return efl_gfx_shape_stroke_join_get(obj); 319 return efl_gfx_shape_stroke_join_get(obj);
320} 320}
321 321
322EAPI void 322EAPI void
323evas_vg_shape_stroke_join_set(Eo *obj, Efl_Gfx_Join j) 323evas_vg_shape_stroke_join_set(Evas_Vg_Shape *obj, Evas_Vg_Join j)
324{ 324{
325 efl_gfx_shape_stroke_join_set(obj, j); 325 efl_gfx_shape_stroke_join_set(obj, j);
326 efl_canvas_vg_node_change(obj); 326 efl_canvas_vg_node_change(obj);
327} 327}
328 328
329EAPI void 329EAPI void
330evas_vg_shape_path_set(Eo *obj, const Efl_Gfx_Path_Command *op, const double *points) 330evas_vg_shape_path_set(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command *op, const double *points)
331{ 331{
332 efl_gfx_path_set(obj, op, points); 332 efl_gfx_path_set(obj, (const Efl_Gfx_Path_Command *)op, points);
333 efl_canvas_vg_node_change(obj); 333 efl_canvas_vg_node_change(obj);
334} 334}
335 335
336EAPI void 336EAPI void
337evas_vg_shape_path_get(Eo *obj, const Efl_Gfx_Path_Command **op, const double **points) 337evas_vg_shape_path_get(Evas_Vg_Shape *obj, const Evas_Vg_Path_Command **op, const double **points)
338{ 338{
339 efl_gfx_path_get(obj, op, points); 339 efl_gfx_path_get(obj, (const Efl_Gfx_Path_Command **)op, points);
340} 340}
341 341
342EAPI void 342EAPI void
343evas_vg_shape_path_length_get(Eo *obj, unsigned int *commands, unsigned int *points) 343evas_vg_shape_path_length_get(Evas_Vg_Shape *obj, unsigned int *commands, unsigned int *points)
344{ 344{
345 efl_gfx_path_length_get(obj, commands, points); 345 efl_gfx_path_length_get(obj, commands, points);
346} 346}
347 347
348EAPI void 348EAPI void
349evas_vg_shape_current_get(Eo *obj, double *x, double *y) 349evas_vg_shape_current_get(Evas_Vg_Shape *obj, double *x, double *y)
350{ 350{
351 efl_gfx_path_current_get(obj, x, y); 351 efl_gfx_path_current_get(obj, x, y);
352} 352}
353 353
354EAPI void 354EAPI void
355evas_vg_shape_current_ctrl_get(Eo *obj, double *x, double *y) 355evas_vg_shape_current_ctrl_get(Evas_Vg_Shape *obj, double *x, double *y)
356{ 356{
357 efl_gfx_path_current_ctrl_get(obj, x, y); 357 efl_gfx_path_current_ctrl_get(obj, x, y);
358} 358}
359 359
360EAPI void 360EAPI void
361evas_vg_shape_dup(Eo *obj, Eo *dup_from) 361evas_vg_shape_dup(Evas_Vg_Shape *obj, Evas_Vg_Shape *dup_from)
362{ 362{
363 efl_gfx_path_copy_from(obj, dup_from); 363 efl_gfx_path_copy_from(obj, dup_from);
364 efl_canvas_vg_node_change(obj); 364 efl_canvas_vg_node_change(obj);
365} 365}
366 366
367EAPI void 367EAPI void
368evas_vg_shape_reset(Eo *obj) 368evas_vg_shape_reset(Evas_Vg_Shape *obj)
369{ 369{
370 efl_gfx_path_reset(obj); 370 efl_gfx_path_reset(obj);
371 efl_canvas_vg_node_change(obj); 371 efl_canvas_vg_node_change(obj);
372} 372}
373 373
374EAPI void 374EAPI void
375evas_vg_shape_append_move_to(Eo *obj, double x, double y) 375evas_vg_shape_append_move_to(Evas_Vg_Shape *obj, double x, double y)
376{ 376{
377 efl_gfx_path_append_move_to(obj, x, y); 377 efl_gfx_path_append_move_to(obj, x, y);
378 efl_canvas_vg_node_change(obj); 378 efl_canvas_vg_node_change(obj);
379} 379}
380 380
381EAPI void 381EAPI void
382evas_vg_shape_append_line_to(Eo *obj, double x, double y) 382evas_vg_shape_append_line_to(Evas_Vg_Shape *obj, double x, double y)
383{ 383{
384 efl_gfx_path_append_line_to(obj, x, y); 384 efl_gfx_path_append_line_to(obj, x, y);
385 efl_canvas_vg_node_change(obj); 385 efl_canvas_vg_node_change(obj);
386} 386}
387 387
388EAPI void 388EAPI void
389evas_vg_shape_append_quadratic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y) 389evas_vg_shape_append_quadratic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x, double ctrl_y)
390{ 390{
391 efl_gfx_path_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y); 391 efl_gfx_path_append_quadratic_to(obj, x, y, ctrl_x, ctrl_y);
392 efl_canvas_vg_node_change(obj); 392 efl_canvas_vg_node_change(obj);
393} 393}
394 394
395EAPI void 395EAPI void
396evas_vg_shape_append_squadratic_to(Eo *obj, double x, double y) 396evas_vg_shape_append_squadratic_to(Evas_Vg_Shape *obj, double x, double y)
397{ 397{
398 efl_gfx_path_append_squadratic_to(obj, x, y); 398 efl_gfx_path_append_squadratic_to(obj, x, y);
399 efl_canvas_vg_node_change(obj); 399 efl_canvas_vg_node_change(obj);
400} 400}
401 401
402EAPI void 402EAPI void
403evas_vg_shape_append_cubic_to(Eo *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1) 403evas_vg_shape_append_cubic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x0, double ctrl_y0, double ctrl_x1, double ctrl_y1)
404{ 404{
405 efl_gfx_path_append_cubic_to(obj, x, y, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1); 405 efl_gfx_path_append_cubic_to(obj, ctrl_x0, ctrl_y0, ctrl_x1, ctrl_y1, x, y);
406 efl_canvas_vg_node_change(obj); 406 efl_canvas_vg_node_change(obj);
407} 407}
408 408
409EAPI void 409EAPI void
410evas_vg_shape_append_scubic_to(Eo *obj, double x, double y, double ctrl_x, double ctrl_y) 410evas_vg_shape_append_scubic_to(Evas_Vg_Shape *obj, double x, double y, double ctrl_x, double ctrl_y)
411{ 411{
412 efl_gfx_path_append_scubic_to(obj, x, y, ctrl_x, ctrl_y); 412 efl_gfx_path_append_scubic_to(obj, x, y, ctrl_x, ctrl_y);
413 efl_canvas_vg_node_change(obj); 413 efl_canvas_vg_node_change(obj);
414} 414}
415 415
416EAPI void 416EAPI void
417evas_vg_shape_append_arc_to(Eo *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep) 417evas_vg_shape_append_arc_to(Evas_Vg_Shape *obj, double x, double y, double rx, double ry, double angle, Eina_Bool large_arc, Eina_Bool sweep)
418{ 418{
419 efl_gfx_path_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep); 419 efl_gfx_path_append_arc_to(obj, x, y, rx, ry, angle, large_arc, sweep);
420 efl_canvas_vg_node_change(obj); 420 efl_canvas_vg_node_change(obj);
421} 421}
422 422
423EAPI void 423EAPI void
424evas_vg_shape_append_arc(Eo *obj, double x, double y, double w, double h, double start_angle, double sweep_length) 424evas_vg_shape_append_arc(Evas_Vg_Shape *obj, double x, double y, double w, double h, double start_angle, double sweep_length)
425{ 425{
426 efl_gfx_path_append_arc(obj, x, y, w, h, start_angle, sweep_length); 426 efl_gfx_path_append_arc(obj, x, y, w, h, start_angle, sweep_length);
427 efl_canvas_vg_node_change(obj); 427 efl_canvas_vg_node_change(obj);
428} 428}
429 429
430EAPI void 430EAPI void
431evas_vg_shape_append_close(Eo *obj) 431evas_vg_shape_append_close(Evas_Vg_Shape *obj)
432{ 432{
433 efl_gfx_path_append_close(obj); 433 efl_gfx_path_append_close(obj);
434 efl_canvas_vg_node_change(obj); 434 efl_canvas_vg_node_change(obj);
435} 435}
436 436
437EAPI void 437EAPI void
438evas_vg_shape_append_circle(Eo *obj, double x, double y, double radius) 438evas_vg_shape_append_circle(Evas_Vg_Shape *obj, double x, double y, double radius)
439{ 439{
440 efl_gfx_path_append_circle(obj, x, y, radius); 440 efl_gfx_path_append_circle(obj, x, y, radius);
441 efl_canvas_vg_node_change(obj); 441 efl_canvas_vg_node_change(obj);
442} 442}
443 443
444EAPI void 444EAPI void
445evas_vg_shape_append_rect(Eo *obj, double x, double y, double w, double h, double rx, double ry) 445evas_vg_shape_append_rect(Evas_Vg_Shape *obj, double x, double y, double w, double h, double rx, double ry)
446{ 446{
447 efl_gfx_path_append_rect(obj, x, y, w, h, rx, ry); 447 efl_gfx_path_append_rect(obj, x, y, w, h, rx, ry);
448 efl_canvas_vg_node_change(obj); 448 efl_canvas_vg_node_change(obj);
449} 449}
450 450
451EAPI void 451EAPI void
452evas_vg_shape_append_svg_path(Eo *obj, const char *svg_path_data) 452evas_vg_shape_append_svg_path(Evas_Vg_Shape *obj, const char *svg_path_data)
453{ 453{
454 efl_gfx_path_append_svg_path(obj, svg_path_data); 454 efl_gfx_path_append_svg_path(obj, svg_path_data);
455 efl_canvas_vg_node_change(obj); 455 efl_canvas_vg_node_change(obj);
456} 456}
457 457
458EAPI Eina_Bool 458EAPI Eina_Bool
459evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map) 459evas_vg_shape_interpolate(Evas_Vg_Shape *obj, const Evas_Vg_Shape *from, const Evas_Vg_Shape *to, double pos_map)
460{ 460{
461 Eina_Bool ret = efl_gfx_path_interpolate(obj, from, to, pos_map); 461 Eina_Bool ret = efl_gfx_path_interpolate(obj, from, to, pos_map);
462 efl_canvas_vg_node_change(obj); 462 efl_canvas_vg_node_change(obj);
@@ -464,7 +464,7 @@ evas_vg_shape_interpolate(Eo *obj, const Eo *from, const Eo *to, double pos_map)
464} 464}
465 465
466EAPI Eina_Bool 466EAPI Eina_Bool
467evas_vg_shape_equal_commands(Eo *obj, const Eo *with) 467evas_vg_shape_equal_commands(Evas_Vg_Shape *obj, const Evas_Vg_Shape *with)
468{ 468{
469 return efl_gfx_path_equal_commands(obj, with); 469 return efl_gfx_path_equal_commands(obj, with);
470} 470}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h b/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h
index 444acd2334..da9de73795 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape_eo.legacy.h
@@ -1,60 +1,65 @@
1#ifndef _EFL_CANVAS_VG_SHAPE_EO_LEGACY_H_ 1#ifndef _EVAS_VG_SHAPE_EO_LEGACY_H_
2#define _EFL_CANVAS_VG_SHAPE_EO_LEGACY_H_ 2#define _EVAS_VG_SHAPE_EO_LEGACY_H_
3 3
4#ifndef _EFL_CANVAS_VG_SHAPE_EO_CLASS_TYPE 4#ifndef _EVAS_VG_SHAPE_EO_CLASS_TYPE
5#define _EFL_CANVAS_VG_SHAPE_EO_CLASS_TYPE 5#define _EVAS_VG_SHAPE_EO_CLASS_TYPE
6 6
7typedef Eo Efl_Canvas_Vg_Shape; 7typedef Eo Evas_Vg_Shape;
8 8
9#endif 9#endif
10 10
11#ifndef _EFL_CANVAS_VG_SHAPE_EO_TYPES 11#ifndef _EVAS_VG_SHAPE_EO_TYPES
12#define _EFL_CANVAS_VG_SHAPE_EO_TYPES 12#define _EVAS_VG_SHAPE_EO_TYPES
13
14 13
15#endif 14#endif
16 15
17/** 16/**
18 * @brief Fill of the shape object 17 * @brief Fill of the shape object.
19 * 18 *
20 * @param[in] obj The object. 19 * @param[in] obj The object.
21 * @param[in] f Fill object 20 * @param[in] f The fill object.
21 *
22 * @since 1.24
22 * 23 *
23 * @ingroup Evas_Vg_Shape_Group 24 * @ingroup Evas_Vg_Shape_Group
24 */ 25 */
25EAPI void evas_vg_shape_fill_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *f); 26EAPI void evas_vg_shape_fill_set(Evas_Vg_Shape *obj, Evas_Vg_Node *f);
26 27
27/** 28/**
28 * @brief Fill of the shape object 29 * @brief Fill of the shape object.
29 * 30 *
30 * @param[in] obj The object. 31 * @param[in] obj The object.
32 * @return The fill object.
31 * 33 *
32 * @return Fill object 34 * @since 1.24
33 * 35 *
34 * @ingroup Evas_Vg_Shape_Group 36 * @ingroup Evas_Vg_Shape_Group
35 */ 37 */
36EAPI Efl_Canvas_Vg_Node *evas_vg_shape_fill_get(const Efl_Canvas_Vg_Shape *obj); 38EAPI Evas_Vg_Node *evas_vg_shape_fill_get(const Evas_Vg_Shape *obj);
37 39
38/** 40/**
39 * @brief Stroke fill of the shape object 41 * @brief Stroke fill of the shape object.
40 * 42 *
41 * @param[in] obj The object. 43 * @param[in] obj The object.
42 * @param[in] f Stroke fill object 44 * @param[in] f The stroke fill object.
45 *
46 * @since 1.24
43 * 47 *
44 * @ingroup Evas_Vg_Shape_Group 48 * @ingroup Evas_Vg_Shape_Group
45 */ 49 */
46EAPI void evas_vg_shape_stroke_fill_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *f); 50EAPI void evas_vg_shape_stroke_fill_set(Evas_Vg_Shape *obj, Evas_Vg_Node *f);
47 51
48/** 52/**
49 * @brief Stroke fill of the shape object 53 * @brief Stroke fill of the shape object.
50 * 54 *
51 * @param[in] obj The object. 55 * @param[in] obj The object.
56 * @return The stroke fill object.
52 * 57 *
53 * @return Stroke fill object 58 * @since 1.24
54 * 59 *
55 * @ingroup Evas_Vg_Shape_Group 60 * @ingroup Evas_Vg_Shape_Group
56 */ 61 */
57EAPI Efl_Canvas_Vg_Node *evas_vg_shape_stroke_fill_get(const Efl_Canvas_Vg_Shape *obj); 62EAPI Evas_Vg_Node *evas_vg_shape_stroke_fill_get(const Evas_Vg_Shape *obj);
58 63
59/** 64/**
60 * @brief Stroke marker of the shape object 65 * @brief Stroke marker of the shape object
@@ -62,19 +67,22 @@ EAPI Efl_Canvas_Vg_Node *evas_vg_shape_stroke_fill_get(const Efl_Canvas_Vg_Shape
62 * @param[in] obj The object. 67 * @param[in] obj The object.
63 * @param[in] m Stroke marker object 68 * @param[in] m Stroke marker object
64 * 69 *
70 * @since 1.24
71 *
65 * @ingroup Evas_Vg_Shape_Group 72 * @ingroup Evas_Vg_Shape_Group
66 */ 73 */
67EAPI void evas_vg_shape_stroke_marker_set(Efl_Canvas_Vg_Shape *obj, Efl_Canvas_Vg_Node *m); 74EAPI void evas_vg_shape_stroke_marker_set(Evas_Vg_Shape *obj, Evas_Vg_Node *m);
68 75
69/** 76/**
70 * @brief Stroke marker of the shape object 77 * @brief Stroke marker of the shape object
71 * 78 *
72 * @param[in] obj The object. 79 * @param[in] obj The object.
73 *
74 * @return Stroke marker object 80 * @return Stroke marker object
75 * 81 *
82 * @since 1.24
83 *
76 * @ingroup Evas_Vg_Shape_Group 84 * @ingroup Evas_Vg_Shape_Group
77 */ 85 */
78EAPI Efl_Canvas_Vg_Node *evas_vg_shape_stroke_marker_get(const Efl_Canvas_Vg_Shape *obj); 86EAPI Evas_Vg_Node *evas_vg_shape_stroke_marker_get(const Evas_Vg_Shape *obj);
79 87
80#endif 88#endif
diff --git a/src/lib/evas/canvas/efl_gfx_mapping.c b/src/lib/evas/canvas/efl_gfx_mapping.c
index b05239b369..49b450ede4 100644
--- a/src/lib/evas/canvas/efl_gfx_mapping.c
+++ b/src/lib/evas/canvas/efl_gfx_mapping.c
@@ -305,6 +305,7 @@ _map_calc(const Eo *eo_obj, Evas_Object_Protected_Data *obj, Efl_Gfx_Mapping_Dat
305 if (!m) 305 if (!m)
306 { 306 {
307 m = evas_map_new(count); 307 m = evas_map_new(count);
308 if (!m) return NULL;
308 map_alloc = EINA_TRUE; 309 map_alloc = EINA_TRUE;
309 } 310 }
310 else _evas_map_reset(m); 311 else _evas_map_reset(m);
diff --git a/src/lib/evas/canvas/efl_gfx_vg_value_provider.c b/src/lib/evas/canvas/efl_gfx_vg_value_provider.c
index ccf334924f..3f49a8ddc0 100644
--- a/src/lib/evas/canvas/efl_gfx_vg_value_provider.c
+++ b/src/lib/evas/canvas/efl_gfx_vg_value_provider.c
@@ -35,17 +35,17 @@ _efl_gfx_vg_value_provider_keypath_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Val
35} 35}
36 36
37EOLIAN void 37EOLIAN void
38_efl_gfx_vg_value_provider_transform_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, Eina_Matrix3 *m) 38_efl_gfx_vg_value_provider_transform_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd, Eina_Matrix4 *m)
39{ 39{
40 if (m) 40 if (m)
41 { 41 {
42 if (!pd->m) 42 if (!pd->m)
43 { 43 {
44 pd->m = malloc(sizeof (Eina_Matrix3)); 44 pd->m = malloc(sizeof (Eina_Matrix4));
45 if (!pd->m) return; 45 if (!pd->m) return;
46 } 46 }
47 pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_TRANSFORM_MATRIX; 47 pd->flag = pd->flag | EFL_GFX_VG_VALUE_PROVIDER_CHANGE_FLAG_TRANSFORM_MATRIX;
48 memcpy(pd->m, m, sizeof (Eina_Matrix3)); 48 memcpy(pd->m, m, sizeof (Eina_Matrix4));
49 } 49 }
50 else 50 else
51 { 51 {
@@ -54,7 +54,7 @@ _efl_gfx_vg_value_provider_transform_set(Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_P
54 } 54 }
55} 55}
56 56
57EOLIAN Eina_Matrix3* 57EOLIAN Eina_Matrix4*
58_efl_gfx_vg_value_provider_transform_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd) 58_efl_gfx_vg_value_provider_transform_get(const Eo *obj EINA_UNUSED, Efl_Gfx_Vg_Value_Provider_Data *pd)
59{ 59{
60 return pd->m; 60 return pd->m;
diff --git a/src/lib/evas/canvas/efl_gfx_vg_value_provider.eo b/src/lib/evas/canvas/efl_gfx_vg_value_provider.eo
index 2e21774a2f..43eb555a45 100644
--- a/src/lib/evas/canvas/efl_gfx_vg_value_provider.eo
+++ b/src/lib/evas/canvas/efl_gfx_vg_value_provider.eo
@@ -25,7 +25,7 @@ class @beta Efl.Gfx.Vg.Value_Provider extends Efl.Object
25 get { 25 get {
26 } 26 }
27 values { 27 values {
28 m: ptr(Eina.Matrix3); [[ Matrix Value. ]] 28 m: ptr(Eina.Matrix4); [[ Matrix Value. ]]
29 } 29 }
30 } 30 }
31 @property fill_color { 31 @property fill_color {
diff --git a/src/lib/evas/canvas/efl_gfx_vg_value_provider.h b/src/lib/evas/canvas/efl_gfx_vg_value_provider.h
index 5b4b806000..cab00fc23d 100644
--- a/src/lib/evas/canvas/efl_gfx_vg_value_provider.h
+++ b/src/lib/evas/canvas/efl_gfx_vg_value_provider.h
@@ -12,7 +12,7 @@ struct _Efl_Gfx_Vg_Value_Provider_Data
12 12
13 Eina_Stringshare *keypath; 13 Eina_Stringshare *keypath;
14 14
15 Eina_Matrix3 *m; 15 Eina_Matrix4 *m;
16 struct { 16 struct {
17 int r; 17 int r;
18 int g; 18 int g;
diff --git a/src/lib/evas/canvas/efl_input_types.eot b/src/lib/evas/canvas/efl_input_types.eot
index a716686528..ccd4b1e484 100644
--- a/src/lib/evas/canvas/efl_input_types.eot
+++ b/src/lib/evas/canvas/efl_input_types.eot
@@ -2,7 +2,7 @@ enum Efl.Pointer.Action
2{ 2{
3 [[Pointer event type. Represents which kind of event this is. 3 [[Pointer event type. Represents which kind of event this is.
4 4
5 @since 1.19 5 @since 1.24
6 ]] 6 ]]
7 none, [[Not a valid event, or nothing new happened (eg. when querying 7 none, [[Not a valid event, or nothing new happened (eg. when querying
8 current state of touch points).]] 8 current state of touch points).]]
@@ -22,7 +22,7 @@ enum Efl.Pointer.Flags
22{ 22{
23 [[Pointer flags indicating whether a double or triple click is under way. 23 [[Pointer flags indicating whether a double or triple click is under way.
24 24
25 @since 1.19 25 @since 1.22
26 ]] 26 ]]
27 none = 0, [[No extra mouse button data]] 27 none = 0, [[No extra mouse button data]]
28 double_click = (1 << 0), [[This mouse button press was the 2nd press of a double click]] 28 double_click = (1 << 0), [[This mouse button press was the 2nd press of a double click]]
@@ -33,7 +33,7 @@ enum Efl.Input.Flags
33{ 33{
34 [[Special flags set during an input event propagation. 34 [[Special flags set during an input event propagation.
35 35
36 @since 1.19 36 @since 1.22
37 ]] 37 ]]
38 none = 0, [[No fancy flags set]] 38 none = 0, [[No fancy flags set]]
39 processed = (1 << 0), [[This event is being delivered and has been processed, 39 processed = (1 << 0), [[This event is being delivered and has been processed,
@@ -60,8 +60,7 @@ enum @beta Efl.Input.Object_Pointer_Mode {
60 60
61 In the mode $nograb, the pointer will always be bound to the object 61 In the mode $nograb, the pointer will always be bound to the object
62 right below it. 62 right below it.
63 63 @since 1.22
64 @since 1.19
65 ]] 64 ]]
66 auto_grab, [[Default, X11-like.]] 65 auto_grab, [[Default, X11-like.]]
67 no_grab, [[Pointer always bound to the object right below it.]] 66 no_grab, [[Pointer always bound to the object right below it.]]
@@ -69,15 +68,13 @@ enum @beta Efl.Input.Object_Pointer_Mode {
69 where mouse/touch up and down events WON'T be 68 where mouse/touch up and down events WON'T be
70 repeated to objects and these objects wont be 69 repeated to objects and these objects wont be
71 auto-grabbed. 70 auto-grabbed.
72
73 @since 1.2
74 ]] 71 ]]
75} 72}
76 73
77enum @beta Efl.Input.Value { 74enum @beta Efl.Input.Value {
78 [[Keys for the generic values of all events. 75 [[Keys for the generic values of all events.
79 76
80 @since 1.19 77 @since 1.22
81 ]] 78 ]]
82 none, [[Not a valid value type.]] 79 none, [[Not a valid value type.]]
83 timestamp, [[Timestamp of this event in seconds.]] 80 timestamp, [[Timestamp of this event in seconds.]]
@@ -147,7 +144,7 @@ enum Efl.Input.Modifier {
147 The available keys may vary depending on the physical keyboard layout, or 144 The available keys may vary depending on the physical keyboard layout, or
148 language and keyboard settings, or depending on the platform. 145 language and keyboard settings, or depending on the platform.
149 146
150 @since 1.20 147 @since 1.22
151 ]] 148 ]]
152 none = 0, [[No key modifier]] 149 none = 0, [[No key modifier]]
153 alt = 1 << 0, [[Alt key modifier]] 150 alt = 1 << 0, [[Alt key modifier]]
@@ -168,7 +165,7 @@ enum Efl.Input.Lock {
168 The available keys may vary depending on the physical keyboard layout, or 165 The available keys may vary depending on the physical keyboard layout, or
169 language and keyboard settings, or depending on the platform. 166 language and keyboard settings, or depending on the platform.
170 167
171 @since 1.20 168 @since 1.22
172 ]] 169 ]]
173 none = 0, [[No key modifier]] 170 none = 0, [[No key modifier]]
174 num = 1 << 0, [[Num Lock for numeric key pad use]] 171 num = 1 << 0, [[Num Lock for numeric key pad use]]
diff --git a/src/lib/evas/canvas/efl_text_cursor.eo b/src/lib/evas/canvas/efl_text_cursor.eo
index 2c77f84a14..4337185001 100644
--- a/src/lib/evas/canvas/efl_text_cursor.eo
+++ b/src/lib/evas/canvas/efl_text_cursor.eo
@@ -1,15 +1,19 @@
1enum @beta Efl.Text.Cursor_Type 1enum Efl.Text.Cursor_Type
2{ 2{
3 [[Shape of the text cursor. 3 [[Shape of the text cursor.
4 This is normally used in @Efl.Text.Cursor methods to retrieve the cursor's geometry. 4 This is normally used in @Efl.Text.Cursor methods to retrieve the cursor's geometry.
5 @since 1.24
5 ]] 6 ]]
6 before, [[Cursor is a vertical bar (I-beam) placed before the selected character.]] 7 before, [[Cursor is a vertical bar (I-beam) placed before the selected character.]]
7 under [[Cursor is an horizontal line (underscore) placed under the selected character.]] 8 under [[Cursor is an horizontal line (underscore) placed under the selected character.]]
8} 9}
9 10
10enum @beta Efl.Text.Cursor_Move_Type 11enum Efl.Text.Cursor_Move_Type
11{ 12{
12 [[Text cursor movement types.]] 13 [[Text cursor movement types.
14
15 @since 1.24
16 ]]
13 character_next, [[Advances to the next character.]] 17 character_next, [[Advances to the next character.]]
14 character_previous, [[Advances to the previous character.]] 18 character_previous, [[Advances to the previous character.]]
15 cluster_next, [[Advances to the next grapheme cluster 19 cluster_next, [[Advances to the next grapheme cluster
@@ -28,8 +32,11 @@ enum @beta Efl.Text.Cursor_Move_Type
28 paragraph_previous [[Advances to the end of the previous paragraph.]] 32 paragraph_previous [[Advances to the end of the previous paragraph.]]
29} 33}
30 34
31abstract @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{ 35abstract Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
32 [[Cursor API.]] 36 [[Cursor API.
37
38 @since 1.24
39 ]]
33 c_prefix: efl_text_cursor; 40 c_prefix: efl_text_cursor;
34 methods { 41 methods {
35 42
@@ -69,8 +76,8 @@ abstract @beta Efl.Text.Cursor extends Efl.Object implements Efl.Duplicate{
69 } 76 }
70 77
71 @property cursor_geometry { 78 @property cursor_geometry {
72 [[Returns the geometry of cursor, if cursor is shown for the text 79 [[Returns the geometry of cursor, if cursor is shown for the text
73 of the same direction as paragraph,else ("split cursor") will return 80 of the same direction as paragraph,else ("split cursor") will return
74 and you need to consider the lower ("split cursor") @.lower_cursor_geometry 81 and you need to consider the lower ("split cursor") @.lower_cursor_geometry
75 82
76 Split cursor geometry is valid only in @Efl.Text.Cursor_Type.before cursor mode.]] 83 Split cursor geometry is valid only in @Efl.Text.Cursor_Type.before cursor mode.]]
diff --git a/src/lib/evas/canvas/efl_text_formatter.eo b/src/lib/evas/canvas/efl_text_formatter.eo
index fca4e84b3b..139b9ba1a7 100644
--- a/src/lib/evas/canvas/efl_text_formatter.eo
+++ b/src/lib/evas/canvas/efl_text_formatter.eo
@@ -1,6 +1,6 @@
1import efl_text_types; 1import efl_text_types;
2 2
3abstract @beta Efl.Text.Formatter extends Efl.Object { 3abstract Efl.Text.Formatter extends Efl.Object {
4 [[Text Formatter API to manage text formatting(attributes). 4 [[Text Formatter API to manage text formatting(attributes).
5 Use it to insert and remove style attributes (font, size, color, ...) using @Efl.Text.Cursor on EFL Widgets. 5 Use it to insert and remove style attributes (font, size, color, ...) using @Efl.Text.Cursor on EFL Widgets.
6 6
@@ -8,7 +8,10 @@ abstract @beta Efl.Text.Formatter extends Efl.Object {
8 Cursor instances are already bound to a text object so there's no need to provide it to this class. 8 Cursor instances are already bound to a text object so there's no need to provide it to this class.
9 Style is specified using format strings as described in @Efl.Canvas.Textblock.style_apply. 9 Style is specified using format strings as described in @Efl.Canvas.Textblock.style_apply.
10 10
11 There is no need to instantiate this class. Use directly the @.attribute_insert and @.attribute_clear static methods.]] 11 There is no need to instantiate this class. Use directly the @.attribute_insert and @.attribute_clear static methods.
12
13 @since 1.24
14 ]]
12 methods { 15 methods {
13 attribute_insert @static { 16 attribute_insert @static {
14 [[Inserts an attribute format in a specified range [$start, $end - 1]. 17 [[Inserts an attribute format in a specified range [$start, $end - 1].
diff --git a/src/lib/evas/canvas/evas_canvas3d_camera.c b/src/lib/evas/canvas/evas_canvas3d_camera.c
deleted file mode 100644
index 97f0576431..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_camera.c
+++ /dev/null
@@ -1,203 +0,0 @@
1#include "evas_common_private.h"
2#include "evas_private.h"
3
4#define MY_CLASS EVAS_CANVAS3D_CAMERA_CLASS
5
6static Eina_Bool
7_camera_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
8 void *data EINA_UNUSED, void *fdata)
9{
10 Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
11 evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_CAMERA, (Evas_Canvas3D_Object *)fdata);
12 return EINA_TRUE;
13}
14
15EOLIAN static void
16_evas_canvas3d_camera_evas_canvas3d_object_change_notify(Eo *obj,Evas_Canvas3D_Camera_Data *pd, Evas_Canvas3D_State state EINA_UNUSED, Evas_Canvas3D_Object *ref EINA_UNUSED)
17{
18 if (pd->nodes) eina_hash_foreach(pd->nodes, _camera_node_change_notify, obj);
19}
20
21EOLIAN static void
22_evas_canvas3d_camera_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED,
23 Evas_Canvas3D_Camera_Data *pd EINA_UNUSED)
24{
25
26}
27
28void
29evas_canvas3d_camera_node_add(Evas_Canvas3D_Camera *camera, Evas_Canvas3D_Node *node)
30{
31 Evas_Canvas3D_Camera_Data *pd = efl_data_scope_get(camera, MY_CLASS);
32 int count = 0;
33
34 if (!pd->nodes)
35 {
36 pd->nodes = eina_hash_pointer_new(NULL);
37
38 if (!pd->nodes)
39 {
40 ERR("Failed to create hash table. camera(%p)", camera);
41 return;
42 }
43 }
44 else count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
45 eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count + 1));
46}
47
48void
49evas_canvas3d_camera_node_del(Evas_Canvas3D_Camera *camera, Evas_Canvas3D_Node *node)
50{
51 Evas_Canvas3D_Camera_Data *pd = efl_data_scope_get(camera, MY_CLASS);
52 int count = 0;
53
54 if (!pd->nodes)
55 {
56 ERR("No node to delete.");
57 return;
58 }
59
60 count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
61 if (count == 1) eina_hash_del(pd->nodes, &node, NULL);
62 else eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count - 1));
63}
64
65EOLIAN static Eo *
66_evas_canvas3d_camera_efl_object_constructor(Eo *obj,
67 Evas_Canvas3D_Camera_Data *pd EINA_UNUSED)
68{
69 obj = efl_constructor(efl_super(obj, MY_CLASS));
70 evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_CAMERA);
71
72 return obj;
73}
74
75EOLIAN static void
76_evas_canvas3d_camera_efl_object_destructor(Eo *obj,
77 Evas_Canvas3D_Camera_Data *pd)
78{
79 Eina_Iterator *it = NULL;
80 void *data = NULL;
81 Evas_Canvas3D_Node_Data *node = NULL;
82
83 if (pd->nodes)
84 {
85 it = eina_hash_iterator_key_new(pd->nodes);
86 while (eina_iterator_next(it, &data))
87 {
88 node = efl_data_scope_get(data, EVAS_CANVAS3D_NODE_CLASS);
89 node->data.camera.camera = NULL;
90 }
91
92 eina_hash_free(pd->nodes);
93 }
94
95 efl_destructor(efl_super(obj, MY_CLASS));
96}
97
98EAPI Evas_Canvas3D_Camera *
99evas_canvas3d_camera_add(Evas *e)
100{
101 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
102 return NULL;
103 MAGIC_CHECK_END();
104 return efl_add(MY_CLASS, e);
105}
106
107EOLIAN static void
108_evas_canvas3d_camera_projection_matrix_set(Eo *obj, Evas_Canvas3D_Camera_Data *pd,
109 const Evas_Real *matrix)
110{
111 eina_matrix4_array_set(&pd->projection, matrix);
112 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
113}
114
115EOLIAN static void
116_evas_canvas3d_camera_projection_matrix_get(const Eo *obj EINA_UNUSED,
117 Evas_Canvas3D_Camera_Data *pd,
118 Evas_Real *matrix)
119{
120 memcpy(matrix, &pd->projection.xx, sizeof(Evas_Real) * 16);
121}
122
123EOLIAN static void
124_evas_canvas3d_camera_projection_perspective_set(Eo *obj, Evas_Canvas3D_Camera_Data *pd,
125 Evas_Real fovy, Evas_Real aspect,
126 Evas_Real dnear, Evas_Real dfar)
127{
128 Evas_Real xmax;
129 Evas_Real ymax;
130
131 ymax = dnear * (Evas_Real)tan((double)fovy * M_PI / 360.0);
132 xmax = ymax * aspect;
133
134 evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
135 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
136}
137
138EOLIAN static void
139_evas_canvas3d_camera_projection_frustum_set(Eo *obj, Evas_Canvas3D_Camera_Data *pd,
140 Evas_Real left, Evas_Real right,
141 Evas_Real bottom, Evas_Real top,
142 Evas_Real dnear, Evas_Real dfar)
143{
144 evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
145 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
146}
147
148EOLIAN static void
149_evas_canvas3d_camera_projection_ortho_set(Eo *obj, Evas_Canvas3D_Camera_Data *pd,
150 Evas_Real left, Evas_Real right,
151 Evas_Real bottom, Evas_Real top,
152 Evas_Real dnear, Evas_Real dfar)
153{
154 eina_matrix4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
155 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL);
156}
157
158EOLIAN static Eina_Bool
159_evas_canvas3d_camera_node_visible_get(Eo *obj EINA_UNUSED, Evas_Canvas3D_Camera_Data *pd, Evas_Canvas3D_Node *camera_node, Evas_Canvas3D_Node *node, Evas_Canvas3D_Frustum_Mode key)
160{
161 Eina_Matrix4 matrix_vp;
162 Eina_Quaternion planes[6];
163 Evas_Canvas3D_Node_Data *pd_node = efl_data_scope_get(node, EVAS_CANVAS3D_NODE_CLASS);
164 Evas_Canvas3D_Node_Data *pd_camera = efl_data_scope_get(camera_node, EVAS_CANVAS3D_NODE_CLASS);
165 Eina_Vector3 central_point;
166
167 if (!node || pd_node->type != EVAS_CANVAS3D_NODE_TYPE_MESH)
168 {
169 ERR("Mesh node %p type mismatch.", node);
170 return EINA_FALSE;
171 }
172
173 if (!camera_node || pd_camera->type != EVAS_CANVAS3D_NODE_TYPE_CAMERA)
174 {
175 ERR("Camera node %p type mismatch.", camera_node);
176 return EINA_FALSE;
177 }
178
179 /*get need matrix like multiply projection matrix with view matrix*/
180 eina_matrix4_multiply(&matrix_vp, &pd->projection, &pd_camera->data.camera.matrix_world_to_eye);
181
182 evas_frustum_calculate(planes, &matrix_vp);
183
184 if (key == EVAS_CANVAS3D_FRUSTUM_MODE_BSPHERE)
185 return evas_is_sphere_in_frustum(&pd_node->bsphere, planes);
186 else if (key == EVAS_CANVAS3D_FRUSTUM_MODE_AABB)
187 return evas_is_box_in_frustum(&pd_node->aabb, planes);
188 else if (key == EVAS_CANVAS3D_FRUSTUM_MODE_CENTRAL_POINT)
189 {
190 central_point.x = (pd_node->aabb.p0.x + pd_node->aabb.p1.x) / 2;
191 central_point.y = (pd_node->aabb.p0.y + pd_node->aabb.p1.y) / 2;
192 central_point.z = (pd_node->aabb.p0.z + pd_node->aabb.p1.z) / 2;
193 return evas_is_point_in_frustum(&central_point, planes);
194 }
195 else
196 {
197 ERR("Unknown frustun mode.");
198 return EINA_TRUE;
199 }
200}
201
202#include "canvas/evas_canvas3d_camera.eo.c"
203
diff --git a/src/lib/evas/canvas/evas_canvas3d_camera.eo b/src/lib/evas/canvas/evas_canvas3d_camera.eo
deleted file mode 100644
index 9cd98007f2..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_camera.eo
+++ /dev/null
@@ -1,89 +0,0 @@
1import evas_canvas3d_types;
2
3class @beta Evas.Canvas3D.Camera extends Evas.Canvas3D.Object
4{
5 [[Evas 3D canvas camera class]]
6 data: Evas_Canvas3D_Camera_Data;
7 methods {
8 projection_matrix_set {
9 [[Set the projection matrix of the given camera.
10
11 Default projection matrix is identity matrix.
12
13 See also @.projection_perspective_set, @.projection_ortho_set and @.projection_frustum_set.]]
14 params {
15 @in matrix: ptr(const(Evas.Real)); [[Projection Matrix]]
16 }
17 }
18
19 projection_matrix_get @const {
20 [[Get the projection matrix of the given camera.
21
22 See also @.projection_matrix_set.]]
23 params {
24 @out matrix: Evas.Real; [[Projection Matrix]]
25 }
26 }
27
28 projection_perspective_set {
29 [[Set the projection matrix of the given camera with perspective projection.
30
31 See also @.projection_matrix_set.]]
32
33 params {
34 fovy: Evas.Real; [[Field of view angle in Y direction.]]
35 aspect: Evas.Real; [[Aspect ratio.]]
36 dnear: Evas.Real; [[Distance to near clipping plane.]]
37 dfar: Evas.Real; [[Distance to far clipping plane.]]
38 }
39 }
40
41 projection_frustum_set {
42 [[Set the projection matrix of the given camera with frustum projection.
43
44 See also @.projection_matrix_set.]]
45 params {
46 left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
47 right: Evas.Real; [[Right X coordinate of the near clipping plane..]]
48 bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
49 top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
50 dnear: Evas.Real; [[Distance to near clipping plane.]]
51 dfar: Evas.Real; [[Distance to far clipping plane.]]
52 }
53 }
54 projection_ortho_set {
55 [[Set the projection matrix of the given camera with orthogonal projection.
56
57 See also @.projection_matrix_set.]]
58 params {
59 left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
60 right: Evas.Real; [[Right X coordinate of the near clipping plane..]]
61 bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
62 top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
63 dnear: Evas.Real; [[Distance to near clipping plane.]]
64 dfar: Evas.Real; [[Distance to far clipping plane.]]
65 }
66 }
67 node_visible_get {
68 [[Check is bounding sphere of given node inside frustum of camera node.
69
70 If the nodes are $null or nodes type mismatch error wrong type of nodes will be generated and returned $false.]]
71 return: bool; [[$true in frustum, $false otherwise]]
72 params {
73 @in camera_node: Evas.Canvas3D.Node; [[The given camera node.]]
74 @in node: Evas.Canvas3D.Node; [[The given node.]]
75 @in key: Evas.Canvas3D.Frustum_Mode; [[The given key]]
76 }
77 }
78 }
79
80 implements {
81 Efl.Object.constructor;
82 Efl.Object.destructor;
83 Evas.Canvas3D.Object.update_notify;
84 Evas.Canvas3D.Object.change_notify;
85 @empty Evas.Canvas3D.Object.callback_register;
86 @empty Evas.Canvas3D.Object.callback_unregister;
87 }
88
89}
diff --git a/src/lib/evas/canvas/evas_canvas3d_eet.c b/src/lib/evas/canvas/evas_canvas3d_eet.c
deleted file mode 100644
index ca24450626..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_eet.c
+++ /dev/null
@@ -1,211 +0,0 @@
1#include "evas_common_private.h"
2#include "evas_private.h"
3
4static Eet_Data_Descriptor *_vec2_descriptor = NULL;
5static Eet_Data_Descriptor *_vec3_descriptor = NULL;
6static Eet_Data_Descriptor *_vertex_descriptor = NULL;
7static Eet_Data_Descriptor *_geometry_descriptor = NULL;
8static Eet_Data_Descriptor *_color_descriptor = NULL;
9static Eet_Data_Descriptor *_material_descriptor = NULL;
10static Eet_Data_Descriptor *_frame_descriptor = NULL;
11static Eet_Data_Descriptor *_mesh_descriptor = NULL;
12static Eet_Data_Descriptor *_header_descriptor = NULL;
13static Eet_Data_Descriptor *_file_descriptor = NULL;
14
15Evas_Canvas3D_File_Eet *
16_evas_canvas3d_eet_file_new(void)
17{
18 Evas_Canvas3D_File_Eet *creating_file = calloc(1, sizeof(Evas_Canvas3D_File_Eet));
19
20 if (!creating_file)
21 {
22 ERR("Could not calloc Evas_Canvas3D_File_Eet");
23 return NULL;
24 }
25
26 return creating_file;
27}
28
29Eet_Data_Descriptor*
30_evas_canvas3d_eet_file_get(void)
31{
32 if(_file_descriptor == NULL)
33 _evas_canvas3d_eet_file_init();
34
35 return _file_descriptor;
36}
37void
38_evas_canvas3d_eet_file_init(void)
39{
40/* initialization of bonding between structure units in eet file */
41 Eet_Data_Descriptor_Class eddc;
42 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Vec2_Eet);
43 _vec2_descriptor = eet_data_descriptor_file_new(&eddc);
44 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Vec3_Eet);
45 _vec3_descriptor = eet_data_descriptor_file_new(&eddc);
46 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Vertex_Eet);
47 _vertex_descriptor = eet_data_descriptor_file_new(&eddc);
48 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Geometry_Eet);
49 _geometry_descriptor = eet_data_descriptor_file_new(&eddc);
50 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Color_Eet);
51 _color_descriptor = eet_data_descriptor_file_new(&eddc);
52 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Frame_Eet);
53 _frame_descriptor = eet_data_descriptor_file_new(&eddc);
54 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Material_Eet);
55 _material_descriptor = eet_data_descriptor_file_new(&eddc);
56 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Mesh_Eet);
57 _mesh_descriptor = eet_data_descriptor_file_new(&eddc);
58 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_Header_Eet);
59 _header_descriptor = eet_data_descriptor_file_new(&eddc);
60 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Evas_Canvas3D_File_Eet);
61 _file_descriptor = eet_data_descriptor_file_new(&eddc);
62
63/* Vec_2 */
64#define ADD_BASIC(member, eet_type) EET_DATA_DESCRIPTOR_ADD_BASIC \
65 (_vec2_descriptor, Evas_Canvas3D_Vec3_Eet, # member, member, eet_type);
66 ADD_BASIC(x, EET_T_FLOAT);
67 ADD_BASIC(y, EET_T_FLOAT);
68#undef ADD_BASIC
69
70/* Vec_3 */
71#define ADD_BASIC(member, eet_type) EET_DATA_DESCRIPTOR_ADD_BASIC \
72 (_vec3_descriptor, Evas_Canvas3D_Vec3_Eet, # member, member, eet_type);
73 ADD_BASIC(x, EET_T_FLOAT);
74 ADD_BASIC(y, EET_T_FLOAT);
75 ADD_BASIC(z, EET_T_FLOAT);
76#undef ADD_BASIC
77
78/* Vertex */
79 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_vertex_descriptor, Evas_Canvas3D_Vertex_Eet,
80 "position", position, _vec3_descriptor);
81 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_vertex_descriptor, Evas_Canvas3D_Vertex_Eet,
82 "normal", normal, _vec3_descriptor);
83 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_vertex_descriptor, Evas_Canvas3D_Vertex_Eet,
84 "texcoord", texcoord, _vec2_descriptor);
85
86/* Geometry */
87 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_geometry_descriptor, Evas_Canvas3D_Geometry_Eet,
88 "vertices", vertices, _vertex_descriptor);
89#define ADD_BASIC(member, eet_type) \
90 EET_DATA_DESCRIPTOR_ADD_BASIC \
91 (_geometry_descriptor, Evas_Canvas3D_Geometry_Eet, # member, member, eet_type);
92 ADD_BASIC(vertices_count, EET_T_UINT);
93 ADD_BASIC(id, EET_T_UINT);
94#undef ADD_BASIC
95
96/* Color */
97#define ADD_BASIC(member, eet_type) EET_DATA_DESCRIPTOR_ADD_BASIC \
98 (_color_descriptor, Evas_Canvas3D_Color_Eet, # member, member, eet_type);
99 ADD_BASIC(r, EET_T_FLOAT);
100 ADD_BASIC(g, EET_T_FLOAT);
101 ADD_BASIC(b, EET_T_FLOAT);
102 ADD_BASIC(a, EET_T_FLOAT);
103#undef ADD_BASIC
104
105/* Material */
106 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_material_descriptor, Evas_Canvas3D_Material_Eet,
107 "colors", colors, _color_descriptor);
108#define ADD_BASIC(member, eet_type) \
109 EET_DATA_DESCRIPTOR_ADD_BASIC \
110 (_material_descriptor, Evas_Canvas3D_Material_Eet, # member, member, eet_type);
111 ADD_BASIC(id, EET_T_UINT);
112 ADD_BASIC(colors_count, EET_T_UINT);
113 ADD_BASIC(shininess, EET_T_FLOAT);
114#undef ADD_BASIC
115
116/* Frame */
117#define ADD_BASIC(member, eet_type) EET_DATA_DESCRIPTOR_ADD_BASIC \
118 (_frame_descriptor, Evas_Canvas3D_Frame_Eet, # member, member, eet_type);
119 ADD_BASIC(id, EET_T_UINT);
120 ADD_BASIC(geometry_id, EET_T_UINT);
121 ADD_BASIC(material_id, EET_T_UINT);
122#undef ADD_BASIC
123
124/* Mesh */
125 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_mesh_descriptor, Evas_Canvas3D_Mesh_Eet,
126 "frames", frames, _frame_descriptor);
127 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_mesh_descriptor, Evas_Canvas3D_Mesh_Eet,
128 "geometries", geometries, _geometry_descriptor);
129 EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_mesh_descriptor, Evas_Canvas3D_Mesh_Eet,
130 "materials", materials, _material_descriptor);
131#define ADD_BASIC(member, eet_type) \
132 EET_DATA_DESCRIPTOR_ADD_BASIC \
133 (_mesh_descriptor, Evas_Canvas3D_Mesh_Eet, # member, member, eet_type);
134 ADD_BASIC(materials_count, EET_T_UINT);
135 ADD_BASIC(frames_count, EET_T_UINT);
136 ADD_BASIC(geometries_count, EET_T_UINT);
137#undef ADD_BASIC
138
139/* Header */
140 EET_DATA_DESCRIPTOR_ADD_BASIC_VAR_ARRAY(_header_descriptor, Evas_Canvas3D_Header_Eet,
141 "materials", materials, EET_T_UINT);
142 EET_DATA_DESCRIPTOR_ADD_BASIC_VAR_ARRAY(_header_descriptor, Evas_Canvas3D_Header_Eet,
143 "geometries", geometries, EET_T_UINT);
144#define ADD_BASIC(member, eet_type) \
145 EET_DATA_DESCRIPTOR_ADD_BASIC \
146 (_header_descriptor, Evas_Canvas3D_Header_Eet, # member, member, eet_type);
147 ADD_BASIC(version, EET_T_UINT);
148 ADD_BASIC(materials_count, EET_T_UINT);
149 ADD_BASIC(frames, EET_T_UINT);
150 ADD_BASIC(geometries_count, EET_T_UINT);
151#undef ADD_BASIC
152
153/* File */
154 EET_DATA_DESCRIPTOR_ADD_SUB(_file_descriptor, Evas_Canvas3D_File_Eet,
155 "mesh", mesh, _mesh_descriptor);
156 EET_DATA_DESCRIPTOR_ADD_SUB(_file_descriptor, Evas_Canvas3D_File_Eet,
157 "header", header, _header_descriptor);
158}
159
160void
161_evas_canvas3d_eet_descriptor_shutdown(void)
162{
163 eet_data_descriptor_free(_geometry_descriptor);
164 _geometry_descriptor = NULL;
165 eet_data_descriptor_free(_vertex_descriptor);
166 _vertex_descriptor = NULL;
167 eet_data_descriptor_free(_vec2_descriptor);
168 _vec2_descriptor = NULL;
169 eet_data_descriptor_free(_vec3_descriptor);
170 _vec3_descriptor = NULL;
171 eet_data_descriptor_free(_color_descriptor);
172 _color_descriptor = NULL;
173 eet_data_descriptor_free(_material_descriptor);
174 _material_descriptor = NULL;
175 eet_data_descriptor_free(_frame_descriptor);
176 _frame_descriptor = NULL;
177 eet_data_descriptor_free(_mesh_descriptor);
178 _mesh_descriptor = NULL;
179 eet_data_descriptor_free(_header_descriptor);
180 _header_descriptor = NULL;
181 eet_data_descriptor_free(_file_descriptor);
182 _file_descriptor = NULL;
183}
184
185void
186_evas_canvas3d_eet_file_free(Evas_Canvas3D_File_Eet* eet_file)
187{
188 if (eet_file)
189 {
190 if (eet_file->mesh)
191 {
192 free(eet_file->mesh->geometries[0].vertices);
193 free(eet_file->mesh->geometries);
194 free(eet_file->mesh->frames);
195 free(eet_file->mesh->materials[0].colors);
196 free(eet_file->mesh->materials);
197 free(eet_file->mesh);
198 }
199
200 if (eet_file->header)
201 {
202 free(eet_file->header->materials);
203 free(eet_file->header->geometries);
204 free(eet_file->header);
205 }
206
207 free(eet_file);
208 }
209
210 _evas_canvas3d_eet_descriptor_shutdown();
211}
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.c b/src/lib/evas/canvas/evas_canvas3d_light.c
deleted file mode 100644
index 887f3abb6c..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_light.c
+++ /dev/null
@@ -1,309 +0,0 @@
1#include "evas_common_private.h"
2#include "evas_private.h"
3
4#define MY_CLASS EVAS_CANVAS3D_LIGHT_CLASS
5
6static Eina_Bool
7_light_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
8 void *data EINA_UNUSED, void *fdata)
9{
10 Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
11 evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_LIGHT, (Evas_Canvas3D_Object *)fdata);
12 return EINA_TRUE;
13}
14
15EOLIAN static void
16_evas_canvas3d_light_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Canvas3D_State state EINA_UNUSED, Evas_Canvas3D_Object *ref EINA_UNUSED)
17{
18 if (pd->nodes)
19 eina_hash_foreach(pd->nodes, _light_node_change_notify, obj);
20}
21
22EOLIAN static void
23_evas_canvas3d_light_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd EINA_UNUSED)
24{
25
26}
27
28void
29evas_canvas3d_light_node_add(Evas_Canvas3D_Light *light, Evas_Canvas3D_Node *node)
30{
31 int count = 0;
32 Evas_Canvas3D_Light_Data *pd = efl_data_scope_get(light, MY_CLASS);
33 if (pd->nodes == NULL)
34 {
35 pd->nodes = eina_hash_pointer_new(NULL);
36
37 if (pd->nodes == NULL)
38 {
39 ERR("Failed to create hash table.");
40 return;
41 }
42 }
43 else
44 count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
45
46 eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count + 1));
47}
48
49void
50evas_canvas3d_light_node_del(Evas_Canvas3D_Light *light, Evas_Canvas3D_Node *node)
51{
52 int count = 0;
53 Evas_Canvas3D_Light_Data *pd = efl_data_scope_get(light, MY_CLASS);
54 if (pd->nodes == NULL)
55 {
56 ERR("No node to delete.");
57 return;
58 }
59
60 count = (int)(uintptr_t)eina_hash_find(pd->nodes, &node);
61
62 if (count == 1)
63 eina_hash_del(pd->nodes, &node, NULL);
64 else
65 eina_hash_set(pd->nodes, &node, (const void *)(uintptr_t)(count - 1));
66}
67
68
69EAPI Evas_Canvas3D_Light *
70evas_canvas3d_light_add(Evas *e)
71{
72 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
73 return NULL;
74 MAGIC_CHECK_END();
75 return efl_add(MY_CLASS, e);
76}
77
78EOLIAN static Eo *
79_evas_canvas3d_light_efl_object_constructor(Eo *obj, Evas_Canvas3D_Light_Data *pd)
80{
81 obj = efl_constructor(efl_super(obj, MY_CLASS));
82 evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_LIGHT);
83 evas_color_set(&pd->ambient, 0.0, 0.0, 0.0, 1.0);
84 evas_color_set(&pd->diffuse, 1.0, 1.0, 1.0, 1.0);
85 evas_color_set(&pd->specular, 1.0, 1.0, 1.0, 1.0);
86
87 pd->spot_exp = 0.0;
88 pd->spot_cutoff = 180.0;
89 pd->spot_cutoff_cos = -1.0;
90
91 pd->atten_const = 1.0;
92 pd->atten_linear = 0.0;
93 pd->atten_quad = 0.0;
94
95 return obj;
96}
97
98EOLIAN static void
99_evas_canvas3d_light_efl_object_destructor(Eo *obj, Evas_Canvas3D_Light_Data *pd)
100{
101 Eina_Iterator *it = NULL;
102 void *data = NULL;
103 Evas_Canvas3D_Node_Data *node = NULL;
104
105 if (pd->nodes)
106 {
107 it = eina_hash_iterator_key_new(pd->nodes);
108 while (eina_iterator_next(it, &data))
109 {
110 node = efl_data_scope_get(data, EVAS_CANVAS3D_NODE_CLASS);
111 node->data.light.light = NULL;
112 }
113
114 eina_hash_free(pd->nodes);
115 }
116
117 efl_destructor(efl_super(obj, MY_CLASS));
118}
119
120
121EOLIAN static void
122_evas_canvas3d_light_directional_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Eina_Bool directional)
123{
124 if (pd->directional != directional)
125 {
126 pd->directional = directional;
127 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_ANY, NULL);
128 }
129}
130
131EOLIAN static Eina_Bool
132_evas_canvas3d_light_directional_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd)
133{
134 return pd->directional;
135}
136
137EOLIAN static void
138_evas_canvas3d_light_ambient_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
139{
140 pd->ambient.r = r;
141 pd->ambient.g = g;
142 pd->ambient.b = b;
143 pd->ambient.a = a;
144
145 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_AMBIENT, NULL);
146}
147
148EOLIAN static void
149_evas_canvas3d_light_ambient_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
150{
151 if (r) *r = pd->ambient.r;
152 if (g) *g = pd->ambient.g;
153 if (b) *b = pd->ambient.b;
154 if (a) *a = pd->ambient.a;
155}
156
157EOLIAN static void
158_evas_canvas3d_light_diffuse_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
159{
160 pd->diffuse.r = r;
161 pd->diffuse.g = g;
162 pd->diffuse.b = b;
163 pd->diffuse.a = a;
164
165 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_DIFFUSE, NULL);
166}
167
168EOLIAN static void
169_evas_canvas3d_light_diffuse_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
170{
171 if (r) *r = pd->diffuse.r;
172 if (g) *g = pd->diffuse.g;
173 if (b) *b = pd->diffuse.b;
174 if (a) *a = pd->diffuse.a;
175}
176
177EOLIAN static void
178_evas_canvas3d_light_specular_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
179{
180 pd->specular.r = r;
181 pd->specular.g = g;
182 pd->specular.b = b;
183 pd->specular.a = a;
184
185 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPECULAR, NULL);
186}
187
188EOLIAN static void
189_evas_canvas3d_light_specular_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd, Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
190{
191 if (r) *r = pd->specular.r;
192 if (g) *g = pd->specular.g;
193 if (b) *b = pd->specular.b;
194 if (a) *a = pd->specular.a;
195}
196
197EOLIAN static void
198_evas_canvas3d_light_spot_exponent_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real exponent)
199{
200 pd->spot_exp = exponent;
201 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPOT_EXP, NULL);
202}
203
204EOLIAN static Evas_Real
205_evas_canvas3d_light_spot_exponent_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd)
206{
207 return pd->spot_exp;
208}
209
210EOLIAN static void
211_evas_canvas3d_light_spot_cutoff_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real cutoff)
212{
213 pd->spot_cutoff = cutoff;
214 pd->spot_cutoff_cos = cos(cutoff * M_PI / 180.0);
215 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_SPOT_CUTOFF, NULL);
216}
217
218EOLIAN static Evas_Real
219_evas_canvas3d_light_spot_cutoff_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd)
220{
221 return pd->spot_cutoff;
222}
223
224EOLIAN static void
225_evas_canvas3d_light_attenuation_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Evas_Real constant, Evas_Real linear, Evas_Real quadratic)
226{
227 pd->atten_const = constant;
228 pd->atten_linear = linear;
229 pd->atten_quad = quadratic;
230 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_ATTENUATION, NULL);
231}
232
233EOLIAN static void
234_evas_canvas3d_light_attenuation_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd, Evas_Real *constant, Evas_Real *linear, Evas_Real *quadratic)
235{
236 if (constant) *constant = pd->atten_const;
237 if (linear) *linear = pd->atten_linear;
238 if (quadratic) *quadratic = pd->atten_quad;
239}
240
241EOLIAN static void
242_evas_canvas3d_light_attenuation_enable_set(Eo *obj, Evas_Canvas3D_Light_Data *pd, Eina_Bool enable)
243{
244 if (pd->enable_attenuation != enable)
245 {
246 pd->enable_attenuation = enable;
247 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_ATTENUATION, NULL);
248 }
249}
250
251EOLIAN static Eina_Bool
252_evas_canvas3d_light_attenuation_enable_get(const Eo *obj EINA_UNUSED, Evas_Canvas3D_Light_Data *pd)
253{
254 return pd->enable_attenuation;
255}
256
257EOLIAN static void
258_evas_canvas3d_light_projection_matrix_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
259 const Evas_Real *matrix)
260{
261 eina_matrix4_array_set(&pd->projection, matrix);
262 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
263}
264
265EOLIAN static void
266_evas_canvas3d_light_projection_matrix_get(const Eo *obj EINA_UNUSED,
267 Evas_Canvas3D_Light_Data *pd,
268 Evas_Real *matrix)
269{
270 memcpy(matrix, &pd->projection.xx, sizeof(Evas_Real) * 16);
271}
272
273EOLIAN static void
274_evas_canvas3d_light_projection_perspective_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
275 Evas_Real fovy, Evas_Real aspect,
276 Evas_Real dnear, Evas_Real dfar)
277{
278 Evas_Real xmax;
279 Evas_Real ymax;
280
281 ymax = dnear * (Evas_Real)tan((double)fovy * M_PI / 360.0);
282 xmax = ymax * aspect;
283
284 evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
285 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
286}
287
288EOLIAN static void
289_evas_canvas3d_light_projection_frustum_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
290 Evas_Real left, Evas_Real right,
291 Evas_Real bottom, Evas_Real top,
292 Evas_Real dnear, Evas_Real dfar)
293{
294 evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
295 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
296}
297
298EOLIAN static void
299_evas_canvas3d_light_projection_ortho_set(Eo *obj, Evas_Canvas3D_Light_Data *pd,
300 Evas_Real left, Evas_Real right,
301 Evas_Real bottom, Evas_Real top,
302 Evas_Real dnear, Evas_Real dfar)
303{
304 eina_matrix4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
305 evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_LIGHT_PROJECTION, NULL);
306}
307
308
309#include "canvas/evas_canvas3d_light.eo.c"
diff --git a/src/lib/evas/canvas/evas_canvas3d_light.eo b/src/lib/evas/canvas/evas_canvas3d_light.eo
deleted file mode 100644
index f15a088f17..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_light.eo
+++ /dev/null
@@ -1,249 +0,0 @@
1import evas_canvas3d_types;
2
3class @beta Evas.Canvas3D.Light extends Evas.Canvas3D.Object
4{
5 [[Evas 3D canvas light class]]
6
7 data: Evas_Canvas3D_Light_Data;
8
9 methods {
10 @property directional {
11 [[The directional flag of the given light.
12
13 Directional light is a type of light which is infinitely far away with no
14 attenuation. The light direction is determined by the containing node's
15 forward vector (negative Z-axis).
16
17 By default, directional is not enabled.
18
19 \@ref evas_canvas3d_node_look_at_set]]
20 set {
21 }
22 get {
23 }
24 values {
25 directional: bool; [[Whether the light is directional ($true), or not ($false).]]
26 }
27 }
28
29 @property spot_exponent {
30 [[The spot exponent of the given light.
31
32 Higher spot exponent means intensity at the center of the cone is relatively
33 stronger. Zero exponent means the light intensity is evenly distributed. The
34 spot exponent has no effect when the light is not spot light (spot cutoff
35 angle is less than 180 degree).
36
37 Default spot exponent is 0.
38
39 See also @.spot_cutoff.set]]
40 set {
41 }
42 get {
43 }
44 values {
45 exponent: Evas.Real; [[Spot exponent value.]]
46 }
47 }
48
49 @property spot_cutoff {
50 [[The spot cutoff angle of the given light.
51
52 Only angle less than 180 degree will make it spot light, so that other spot
53 light attribute will take effect.
54
55 Default spot cutoff angle is 180.]]
56 set {
57 }
58 get {
59 }
60 values {
61 cutoff: Evas.Real; [[Cutoff angle in degree..]]
62 }
63 }
64
65 @property attenuation_enable {
66 [[The attenuation enable flag of the given light.
67
68 By default, light attenuation is not enabled.
69
70 See also @.attenuation_set]]
71 set {
72 }
73 get {
74 }
75 values {
76 enable: bool; [[Whether to enable attenuation ($true), or not ($false)..]]
77 }
78 }
79
80 ambient_set {
81 [[Set the ambient color of the given light.
82
83 Default ambient color is (0.0, 0.0, 0.0, 1.0).]]
84 params {
85 @in r: Evas.Real; [[Red component of the ambient color between [0.0, 1.0].]]
86 @in g: Evas.Real; [[Green component of the ambient color between [0.0, 1.0].]]
87 @in b: Evas.Real; [[Blue component of the ambient color between [0.0, 1.0].]]
88 @in a: Evas.Real; [[Alpha component of the ambient color between [0.0, 1.0].]]
89 }
90 }
91 ambient_get @const {
92 [[Get the ambient color of the given light.
93
94 See also @.ambient_set]]
95 params {
96 @out r: Evas.Real; [[Red component of the ambient color between [0.0, 1.0].]]
97 @out g: Evas.Real; [[Green component of the ambient color between [0.0, 1.0].]]
98 @out b: Evas.Real; [[Blue component of the ambient color between [0.0, 1.0].]]
99 @out a: Evas.Real; [[Alpha component of the ambient color between [0.0, 1.0].]]
100 }
101 }
102
103 diffuse_set {
104 [[Set the diffuse color of the given light.
105
106 Default diffuse color is (1.0, 1.0, 1.0, 1.0).]]
107 params {
108 @in r: Evas.Real; [[Red component of the diffuse color between [0.0, 1.0].]]
109 @in g: Evas.Real; [[Green component of the diffuse color between [0.0, 1.0].]]
110 @in b: Evas.Real; [[Blue component of the diffuse color between [0.0, 1.0].]]
111 @in a: Evas.Real; [[Alpha component of the diffuse color between [0.0, 1.0].]]
112 }
113 }
114 diffuse_get @const {
115 [[Get the diffuse color of the given light.
116
117 See also @.diffuse_set]]
118 params {
119 @out r: Evas.Real; [[Red component of the diffuse color between [0.0, 1.0].]]
120 @out g: Evas.Real; [[Green component of the diffuse color between [0.0, 1.0].]]
121 @out b: Evas.Real; [[Blue component of the diffuse color between [0.0, 1.0].]]
122 @out a: Evas.Real; [[Alpha component of the diffuse color between [0.0, 1.0].]]
123 }
124 }
125
126 specular_set {
127 [[Set the specular color of the given light.
128
129 Default specular color is (1.0, 1.0, 1.0, 1.0).]]
130 params {
131 @in r: Evas.Real; [[Red component of the specular color between [0.0, 1.0].]]
132 @in g: Evas.Real; [[Green component of the specular color between [0.0, 1.0].]]
133 @in b: Evas.Real; [[Blue component of the specular color between [0.0, 1.0].]]
134 @in a: Evas.Real; [[Alpha component of the specular color between [0.0, 1.0].]]
135 }
136 }
137 specular_get @const {
138 [[Get the specular color of the given light.
139
140 See also @.specular_set]]
141 params {
142 @out r: Evas.Real; [[Red component of the specular color between [0.0, 1.0].]]
143 @out g: Evas.Real; [[Green component of the specular color between [0.0, 1.0].]]
144 @out b: Evas.Real; [[Blue component of the specular color between [0.0, 1.0].]]
145 @out a: Evas.Real; [[Alpha component of the specular color between [0.0, 1.0].]]
146 }
147 }
148
149 attenuation_set {
150 [[Set the attenuation of the given light.
151
152 Light attenuation has no effect with directional light. And the attenuation
153 should be enabled first to take effect. The attenuation factor is calculated
154 as follows.
155
156 atten = 1.0 / constant + linear * distance + quadratic * distance * distance
157
158 Default attenuation is constant = 1.0, linear = 0.0, quadratic = 0.0.
159
160 See also @.attenuation_enable.set]]
161 params {
162 @in constant: Evas.Real; [[Constant attenuation term..]]
163 @in linear: Evas.Real; [[Linear attenuation term..]]
164 @in quadratic: Evas.Real; [[Quadratic attenuation term..]]
165 }
166 }
167
168 attenuation_get @const {
169 [[Get the attenuation of the given light.
170
171 See also @.attenuation_set]]
172 params {
173 @out constant: Evas.Real; [[Constant attenuation term..]]
174 @out linear: Evas.Real; [[Linear attenuation term..]]
175 @out quadratic: Evas.Real; [[Quadratic attenuation term..]]
176 }
177 }
178
179 projection_matrix_set {
180 [[Set the projection matrix of the given light source.
181
182 Default projection matrix is identity matrix.
183
184 See also @.projection_perspective_set, @.projection_ortho_set and @.projection_frustum_set]]
185 params {
186 @in matrix: ptr(const(Evas.Real)); [[Projection Matrix. Pointer to the array of 16 Evas.Real values in column major order.]]
187 }
188 }
189
190 projection_matrix_get @const {
191 [[Get the projection matrix of the given light source.
192
193 See also @.projection_matrix_set]]
194 params {
195 @out matrix: Evas.Real; [[Projection Matrix]]
196 }
197 }
198
199 projection_perspective_set {
200 [[Set the projection matrix of the given light source with perspective projection.
201
202 See also @.projection_matrix_set]]
203
204 params {
205 fovy: Evas.Real; [[Field of view angle in Y direction.]]
206 aspect: Evas.Real; [[Aspect ratio.]]
207 dnear: Evas.Real; [[Distance to near clipping plane.]]
208 dfar: Evas.Real; [[Distance to far clipping plane.]]
209 }
210 }
211
212 projection_frustum_set {
213 [[Set the projection matrix of the given light source with frustum projection.
214
215 @Evas.Canvas3D.Light.projection_matrix_set]]
216 params {
217 left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
218 right: Evas.Real; [[Right X coordinate of the near clipping plane.]]
219 bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
220 top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
221 dnear: Evas.Real; [[Distance to near clipping plane.]]
222 dfar: Evas.Real; [[Distance to far clipping plane.]]
223 }
224 }
225 projection_ortho_set {
226 [[Set the projection matrix of the given light source with orthogonal projection.
227
228 See also @.projection_matrix_set]]
229 params {
230 left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
231 right: Evas.Real; [[Right X coordinate of the near clipping plane.]]
232 bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
233 top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
234 dnear: Evas.Real; [[Distance to near clipping plane.]]
235 dfar: Evas.Real; [[Distance to far clipping plane.]]
236 }
237 }
238 }
239
240 implements {
241 Efl.Object.constructor;
242 Efl.Object.destructor;
243 Evas.Canvas3D.Object.update_notify;
244 Evas.Canvas3D.Object.change_notify;
245 @empty Evas.Canvas3D.Object.callback_register;
246 @empty Evas.Canvas3D.Object.callback_unregister;
247 }
248
249}
diff --git a/src/lib/evas/canvas/evas_canvas3d_material.c b/src/lib/evas/canvas/evas_canvas3d_material.c
deleted file mode 100644
index 48f6ce1e5a..0000000000
--- a/src/lib/evas/canvas/evas_canvas3d_material.c
+++ /dev/null
@@ -1,206 +0,0 @@
1#include "evas_common_private.h"
2#include "evas_private.h"
3
4#define MY_CLASS EVAS_CANVAS3D_MATERIAL_CLASS
5
6static Eina_Bool
7_material_mesh_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
8 void *data EINA_UNUSED, void *fdata)
9{
10 Evas_Canvas3D_Mesh *m = *(Evas_Canvas3D_Mesh **)key;
11 evas_canvas3d_object_change(m, EVAS_CANVAS3D_STATE_MESH_MATERIAL, (Evas_Canvas3D_Object *)fdata);
12 return EINA_TRUE;
13}
14
15EOLIAN static void
16_evas_canvas3d_material_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D_Material_Data *pd, Evas_Canvas3D_State state EINA_UNUSED, Evas_Canvas3D_Object *ref EINA_UNUSED)
17{
18 if (pd->meshes)
19 eina_hash_foreach(pd->meshes, _material_mesh_change_notify, obj);
20}
21
22EOLIAN static void
23_evas_canvas3d_material_evas_canvas3d_object_update_notify(Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd)
24{
25 int i;
26 for (i = 0; i < EVAS_CANVAS3D_MATERIAL_ATTRIB_COUNT; i++)
27 {
28 if (pd->attribs[i].enable)
29 {
30 if (pd->attribs[i].texture)
31 {
32 evas_canvas3d_object_update(pd->attribs[i].texture);
33 }
34 }
35 }
36}
37
38void
39evas_canvas3d_material_mesh_add(Evas_Canvas3D_Material *material, Evas_Canvas3D_Mesh *mesh)
40{
41 int count = 0;
42 Evas_Canvas3D_Material_Data *pd = efl_data_scope_get(material, MY_CLASS);
43
44 if (pd->meshes == NULL)
45 {
46 pd->meshes = eina_hash_pointer_new(NULL);
47
48 if (pd->meshes == NULL)
49 {
50 ERR("Failed to create hash table.");
51 return;
52 }
53 }
54 else
55 count = (int)(uintptr_t)eina_hash_find(pd->meshes, &mesh);
56
57 eina_hash_set(pd->meshes, &mesh, (const void *)(uintptr_t)(count + 1));
58}
59
60void
61evas_canvas3d_material_mesh_del(Evas_Canvas3D_Material *material, Evas_Canvas3D_Mesh *mesh)
62{
63 int count = 0;
64 Evas_Canvas3D_Material_Data *pd = efl_data_scope_get(material, MY_CLASS);
65
66 if (pd->meshes == NULL)
67 {
68 ERR("No mesh to delete.");
69 return;
70 }
71
72 count = (int)(uintptr_t)eina_hash_find(pd->meshes, &mesh);
73
74 if (count == 1)
75 eina_hash_del(pd->meshes, &mesh, NULL);
76 else
77 eina_hash_set(pd->meshes, &mesh, (const void *)(uintptr_t)(count - 1));
78}
79
80
81EAPI Evas_Canvas3D_Material *
82evas_canvas3d_material_add(Evas *e)
83{
84 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
85 return NULL;
86 MAGIC_CHECK_END();
87 return efl_add(MY_CLASS, e);
88}
89
90EOLIAN static Eo *
91_evas_canvas3d_material_efl_object_constructor(Eo *obj EINA_UNUSED, Evas_Canvas3D_Material_Data *pd)
92{
93 obj = efl_constructor(efl_super(obj, MY_CLASS));
94 evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_MATERIAL);
95
96 evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT].color, 0.2, 0.2, 0.2, 1.0);
97 evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE].color, 0.8, 0.8, 0.8, 1.0);
98 evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR].color, 1.0, 1.0, 1.0, 1.0);
99 evas_color_set(&pd->attribs[EVAS_CANVAS3D_MATERIAL_ATTRIB_EMISSION].color, 0.0, 0.0, 0.0, 1.0);
100 pd->shininess = 150.0;
101
102 return obj;
103}
104
105EOLIAN static void
106_evas_canvas3d_material_efl_object_destructor(Eo *obj, Evas_Canvas3D_Material_Data *pd)
107{
108 int i = 0;
109 Eina_Iterator *it = NULL;
110 void *data = NULL;
111 Evas_Canvas3D_Mesh_Data *mesh = NULL;
112 Eina_List *l = NULL;
113 Evas_Canvas3D_Mesh_Frame *f = NULL;
114
115 if (pd->meshes)
116 {
117 it = eina_hash_iterator_key_new(pd->meshes);
118 while (eina_iterator_next(it, &data))
119 {