summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile_Evas.am4
-rw-r--r--src/lib/edje/edje_calc.c6
-rw-r--r--src/lib/evas/Evas_Eo.h2
-rw-r--r--src/lib/evas/Evas_Legacy.h2
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c (renamed from src/lib/evas/canvas/efl_canvas_vg.c)100
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.eo (renamed from src/lib/evas/canvas/efl_canvas_vg.eo)2
-rw-r--r--src/lib/evas/canvas/evas_main.c2
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c4
-rw-r--r--src/lib/evas/canvas/evas_vg_private.h7
9 files changed, 66 insertions, 63 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 670fcd5e35..b583c19ad5 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -19,7 +19,7 @@ evas_canvas_eolian_pub_files = \
19 lib/evas/canvas/evas_canvas3d_node.eo\ 19 lib/evas/canvas/evas_canvas3d_node.eo\
20 lib/evas/canvas/evas_canvas3d_scene.eo\ 20 lib/evas/canvas/evas_canvas3d_scene.eo\
21 lib/evas/canvas/evas_canvas3d_object.eo \ 21 lib/evas/canvas/evas_canvas3d_object.eo \
22 lib/evas/canvas/efl_canvas_vg.eo \ 22 lib/evas/canvas/efl_canvas_vg_object.eo \
23 lib/evas/canvas/efl_canvas_vg_node.eo \ 23 lib/evas/canvas/efl_canvas_vg_node.eo \
24 lib/evas/canvas/efl_canvas_vg_container.eo \ 24 lib/evas/canvas/efl_canvas_vg_container.eo \
25 lib/evas/canvas/efl_canvas_vg_shape.eo \ 25 lib/evas/canvas/efl_canvas_vg_shape.eo \
@@ -359,7 +359,7 @@ lib/evas/common3d/primitives/primitive_common.c
359 359
360# Evas_VG 360# Evas_VG
361lib_evas_libevas_la_SOURCES += \ 361lib_evas_libevas_la_SOURCES += \
362lib/evas/canvas/efl_canvas_vg.c \ 362lib/evas/canvas/efl_canvas_vg_object.c \
363lib/evas/canvas/evas_vg_node.c \ 363lib/evas/canvas/evas_vg_node.c \
364lib/evas/canvas/evas_vg_container.c \ 364lib/evas/canvas/evas_vg_container.c \
365lib/evas/canvas/evas_vg_gradient.c \ 365lib/evas/canvas/evas_vg_gradient.c \
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index ef89169f4b..86c7aafd19 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -3186,11 +3186,11 @@ _edje_svg_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3 EINA_U
3186 snprintf(dest_key, sizeof(dest_key), "edje/vectors/%i", new_svg); 3186 snprintf(dest_key, sizeof(dest_key), "edje/vectors/%i", new_svg);
3187 3187
3188 efl_file_set(ep->object, ed->file->path, src_key); 3188 efl_file_set(ep->object, ed->file->path, src_key);
3189 src_root = efl_canvas_vg_root_node_get(ep->object); 3189 src_root = efl_canvas_vg_object_root_node_get(ep->object);
3190 efl_ref(src_root); 3190 efl_ref(src_root);
3191 3191
3192 efl_file_set(ep->object, ed->file->path, dest_key); 3192 efl_file_set(ep->object, ed->file->path, dest_key);
3193 dest_root = efl_canvas_vg_root_node_get(ep->object); 3193 dest_root = efl_canvas_vg_object_root_node_get(ep->object);
3194 efl_ref(dest_root); 3194 efl_ref(dest_root);
3195 3195
3196 root = efl_duplicate(src_root); 3196 root = efl_duplicate(src_root);
@@ -3199,7 +3199,7 @@ _edje_svg_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3 EINA_U
3199 { 3199 {
3200 ERR("Can't interpolate check the svg file"); 3200 ERR("Can't interpolate check the svg file");
3201 } 3201 }
3202 efl_canvas_vg_root_node_set(ep->object, root); 3202 efl_canvas_vg_object_root_node_set(ep->object, root);
3203 efl_unref(src_root); 3203 efl_unref(src_root);
3204 efl_unref(dest_root); 3204 efl_unref(dest_root);
3205 } 3205 }
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index 2106acff8f..9cea6ddc77 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -434,7 +434,7 @@ typedef void (Evas_Canvas3D_Surface_Func)(Evas_Real *out_x,
434 * 434 *
435 * @{ 435 * @{
436 */ 436 */
437#include "canvas/efl_canvas_vg.eo.h" 437#include "canvas/efl_canvas_vg_object.eo.h"
438/** 438/**
439 * @} 439 * @}
440 */ 440 */
diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 4237988d58..380e21a1a8 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -3603,7 +3603,7 @@ EAPI Evas_Object *evas_object_rectangle_add(Evas *e) EINA_WARN_UNUSED_RESULT EIN
3603EAPI Evas_Object *evas_object_vg_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC; 3603EAPI Evas_Object *evas_object_vg_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
3604 3604
3605#include "canvas/efl_canvas_vg_node.eo.legacy.h" 3605#include "canvas/efl_canvas_vg_node.eo.legacy.h"
3606#include "canvas/efl_canvas_vg.eo.legacy.h" 3606#include "canvas/efl_canvas_vg_object.eo.legacy.h"
3607#include "canvas/efl_canvas_vg_container.eo.legacy.h" 3607#include "canvas/efl_canvas_vg_container.eo.legacy.h"
3608/** 3608/**
3609 * Creates a new vector shape object \. 3609 * Creates a new vector shape object \.
diff --git a/src/lib/evas/canvas/efl_canvas_vg.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 143f968452..99284d80bf 100644
--- a/src/lib/evas/canvas/efl_canvas_vg.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -3,7 +3,7 @@
3 3
4#include "evas_vg_private.h" 4#include "evas_vg_private.h"
5 5
6#define MY_CLASS EFL_CANVAS_VG_CLASS 6#define MY_CLASS EFL_CANVAS_VG_OBJECT_CLASS
7 7
8/* private magic number for rectangle objects */ 8/* private magic number for rectangle objects */
9static const char o_type[] = "vectors"; 9static const char o_type[] = "vectors";
@@ -62,7 +62,7 @@ static void
62_evas_vg_tree_changed(void *data, const Efl_Event *event EINA_UNUSED) 62_evas_vg_tree_changed(void *data, const Efl_Event *event EINA_UNUSED)
63{ 63{
64 Evas_Object_Protected_Data *obj = data; 64 Evas_Object_Protected_Data *obj = data;
65 Efl_Canvas_Vg_Data *pd = efl_data_scope_get(obj->object, MY_CLASS); 65 Efl_Canvas_Vg_Object_Data *pd = efl_data_scope_get(obj->object, MY_CLASS);
66 66
67 if (pd->changed) return; 67 if (pd->changed) return;
68 68
@@ -72,7 +72,7 @@ _evas_vg_tree_changed(void *data, const Efl_Event *event EINA_UNUSED)
72} 72}
73 73
74static void 74static void
75_update_vgtree_viewport(Eo *obj, Efl_Canvas_Vg_Data *pd) 75_update_vgtree_viewport(Eo *obj, Efl_Canvas_Vg_Object_Data *pd)
76{ 76{
77 double vb_w, vb_h, vp_w, vp_h, scale_w, scale_h, scale; 77 double vb_w, vb_h, vp_w, vp_h, scale_w, scale_h, scale;
78 Eina_Size2D sz = efl_gfx_entity_size_get(obj); 78 Eina_Size2D sz = efl_gfx_entity_size_get(obj);
@@ -110,7 +110,7 @@ _update_vgtree_viewport(Eo *obj, Efl_Canvas_Vg_Data *pd)
110static void 110static void
111_evas_vg_resize(void *data, const Efl_Event *ev) 111_evas_vg_resize(void *data, const Efl_Event *ev)
112{ 112{
113 Efl_Canvas_Vg_Data *pd = data; 113 Efl_Canvas_Vg_Object_Data *pd = data;
114 114
115 if (eina_rectangle_is_empty(&pd->viewbox.rect)) 115 if (eina_rectangle_is_empty(&pd->viewbox.rect))
116 return; 116 return;
@@ -128,7 +128,7 @@ evas_object_vg_add(Evas *e)
128} 128}
129 129
130EOLIAN static Efl_VG * 130EOLIAN static Efl_VG *
131_efl_canvas_vg_root_node_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd) 131_efl_canvas_vg_object_root_node_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Object_Data *pd)
132{ 132{
133 Efl_VG *root = NULL; 133 Efl_VG *root = NULL;
134 134
@@ -141,7 +141,7 @@ _efl_canvas_vg_root_node_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd)
141} 141}
142 142
143EOLIAN static void 143EOLIAN static void
144_efl_canvas_vg_root_node_set(Eo *obj, Efl_Canvas_Vg_Data *pd, Efl_VG *root_node) 144_efl_canvas_vg_object_root_node_set(Eo *obj, Efl_Canvas_Vg_Object_Data *pd, Efl_VG *root_node)
145{ 145{
146 // if the same root is already set 146 // if the same root is already set
147 if (pd->user_entry && pd->user_entry->root == root_node) 147 if (pd->user_entry && pd->user_entry->root == root_node)
@@ -188,19 +188,19 @@ _efl_canvas_vg_root_node_set(Eo *obj, Efl_Canvas_Vg_Data *pd, Efl_VG *root_node)
188} 188}
189 189
190EOLIAN static void 190EOLIAN static void
191_efl_canvas_vg_fill_mode_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd, Efl_Canvas_Vg_Fill_Mode fill_mode) 191_efl_canvas_vg_object_fill_mode_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Object_Data *pd, Efl_Canvas_Vg_Fill_Mode fill_mode)
192{ 192{
193 pd->fill_mode = fill_mode; 193 pd->fill_mode = fill_mode;
194} 194}
195 195
196EOLIAN static Efl_Canvas_Vg_Fill_Mode 196EOLIAN static Efl_Canvas_Vg_Fill_Mode
197_efl_canvas_vg_fill_mode_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd) 197_efl_canvas_vg_object_fill_mode_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Object_Data *pd)
198{ 198{
199 return pd->fill_mode; 199 return pd->fill_mode;
200} 200}
201 201
202EOLIAN static void 202EOLIAN static void
203_efl_canvas_vg_viewbox_set(Eo *obj, Efl_Canvas_Vg_Data *pd, Eina_Rect viewbox) 203_efl_canvas_vg_object_viewbox_set(Eo *obj, Efl_Canvas_Vg_Object_Data *pd, Eina_Rect viewbox)
204{ 204{
205 // viewbox should be a valid rectangle 205 // viewbox should be a valid rectangle
206 if (eina_rectangle_is_empty(&viewbox.rect)) 206 if (eina_rectangle_is_empty(&viewbox.rect))
@@ -227,13 +227,13 @@ _efl_canvas_vg_viewbox_set(Eo *obj, Efl_Canvas_Vg_Data *pd, Eina_Rect viewbox)
227} 227}
228 228
229EOLIAN static Eina_Rect 229EOLIAN static Eina_Rect
230_efl_canvas_vg_viewbox_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd) 230_efl_canvas_vg_object_viewbox_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Object_Data *pd)
231{ 231{
232 return pd->viewbox; 232 return pd->viewbox;
233} 233}
234 234
235EOLIAN static void 235EOLIAN static void
236_efl_canvas_vg_viewbox_align_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd, double align_x, double align_y) 236_efl_canvas_vg_object_viewbox_align_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Object_Data *pd, double align_x, double align_y)
237{ 237{
238 align_x = align_x < 0 ? 0 : align_x; 238 align_x = align_x < 0 ? 0 : align_x;
239 align_x = align_x > 1 ? 1 : align_x; 239 align_x = align_x > 1 ? 1 : align_x;
@@ -246,7 +246,7 @@ _efl_canvas_vg_viewbox_align_set(Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd, do
246} 246}
247 247
248EOLIAN static void 248EOLIAN static void
249_efl_canvas_vg_viewbox_align_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd, double *align_x, double *align_y) 249_efl_canvas_vg_object_viewbox_align_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Object_Data *pd, double *align_x, double *align_y)
250{ 250{
251 if (align_x) *align_x = pd->align_x; 251 if (align_x) *align_x = pd->align_x;
252 if (align_y) *align_y = pd->align_y; 252 if (align_y) *align_y = pd->align_y;
@@ -255,7 +255,7 @@ _efl_canvas_vg_viewbox_align_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *
255// file set and save api implementation 255// file set and save api implementation
256 256
257EOLIAN static Eina_Bool 257EOLIAN static Eina_Bool
258_efl_canvas_vg_efl_file_file_set(Eo *eo_obj, Efl_Canvas_Vg_Data *pd, const char *file, const char *key) 258_efl_canvas_vg_object_efl_file_file_set(Eo *obj, Efl_Canvas_Vg_Object_Data *pd, const char *file, const char *key)
259{ 259{
260 Evas_Cache_Vg_Entry *old_entry; 260 Evas_Cache_Vg_Entry *old_entry;
261 int w, h; 261 int w, h;
@@ -263,17 +263,17 @@ _efl_canvas_vg_efl_file_file_set(Eo *eo_obj, Efl_Canvas_Vg_Data *pd, const char
263 if (!file) return EINA_FALSE; 263 if (!file) return EINA_FALSE;
264 264
265 old_entry = pd->vg_entry; 265 old_entry = pd->vg_entry;
266 evas_object_geometry_get(eo_obj, NULL, NULL, &w, &h); 266 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
267 pd->vg_entry = evas_cache_vg_entry_find(file, key, w, h); 267 pd->vg_entry = evas_cache_vg_entry_find(file, key, w, h);
268 if (pd->vg_entry != old_entry) 268 if (pd->vg_entry != old_entry)
269 evas_object_change(eo_obj, efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS)); 269 evas_object_change(obj, efl_data_scope_get(obj, EFL_CANVAS_OBJECT_CLASS));
270 evas_cache_vg_entry_del(old_entry); 270 evas_cache_vg_entry_del(old_entry);
271 271
272 return EINA_TRUE; 272 return EINA_TRUE;
273} 273}
274 274
275EOLIAN static void 275EOLIAN static void
276_efl_canvas_vg_efl_file_file_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd, const char **file, const char **key) 276_efl_canvas_vg_object_efl_file_file_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Object_Data *pd, const char **file, const char **key)
277{ 277{
278 if (pd->vg_entry) 278 if (pd->vg_entry)
279 { 279 {
@@ -283,7 +283,7 @@ _efl_canvas_vg_efl_file_file_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *
283} 283}
284 284
285EOLIAN static Eina_Bool 285EOLIAN static Eina_Bool
286_efl_canvas_vg_efl_file_save(const Eo *obj, Efl_Canvas_Vg_Data *pd, const char *file, const char *key, const char *flags) 286_efl_canvas_vg_object_efl_file_save(const Eo *obj, Efl_Canvas_Vg_Object_Data *pd, const char *file, const char *key, const char *flags)
287{ 287{
288 Vg_File_Data tmp = {}; 288 Vg_File_Data tmp = {};
289 Vg_File_Data *info = &tmp; 289 Vg_File_Data *info = &tmp;
@@ -306,7 +306,7 @@ _efl_canvas_vg_efl_file_save(const Eo *obj, Efl_Canvas_Vg_Data *pd, const char *
306static void 306static void
307_cleanup_reference(void *data, const Efl_Event *event EINA_UNUSED) 307_cleanup_reference(void *data, const Efl_Event *event EINA_UNUSED)
308{ 308{
309 Efl_Canvas_Vg_Data *pd = data; 309 Efl_Canvas_Vg_Object_Data *pd = data;
310 Eo *renderer; 310 Eo *renderer;
311 311
312 /* unref all renderer and may also destroy them async */ 312 /* unref all renderer and may also destroy them async */
@@ -315,7 +315,7 @@ _cleanup_reference(void *data, const Efl_Event *event EINA_UNUSED)
315} 315}
316 316
317EOLIAN static void 317EOLIAN static void
318_efl_canvas_vg_efl_object_destructor(Eo *eo_obj, Efl_Canvas_Vg_Data *pd) 318_efl_canvas_vg_object_efl_object_destructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Data *pd)
319{ 319{
320 Evas *e = evas_object_evas_get(eo_obj); 320 Evas *e = evas_object_evas_get(eo_obj);
321 321
@@ -332,7 +332,7 @@ _efl_canvas_vg_efl_object_destructor(Eo *eo_obj, Efl_Canvas_Vg_Data *pd)
332} 332}
333 333
334EOLIAN static Eo * 334EOLIAN static Eo *
335_efl_canvas_vg_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Data *pd) 335_efl_canvas_vg_object_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Data *pd)
336{ 336{
337 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS); 337 Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
338 338
@@ -355,7 +355,7 @@ _efl_canvas_vg_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Data *pd)
355} 355}
356 356
357static Efl_Object * 357static Efl_Object *
358_efl_canvas_vg_efl_object_finalize(Eo *obj, Efl_Canvas_Vg_Data *pd) 358_efl_canvas_vg_object_efl_object_finalize(Eo *obj, Efl_Canvas_Vg_Object_Data *pd)
359{ 359{
360 Evas *e = evas_object_evas_get(obj); 360 Evas *e = evas_object_evas_get(obj);
361 361
@@ -367,7 +367,7 @@ _efl_canvas_vg_efl_object_finalize(Eo *obj, Efl_Canvas_Vg_Data *pd)
367} 367}
368 368
369static void 369static void
370_evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Data *pd, 370_evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *vd,
371 void *engine, void *output, void *context, void *surface, Efl_VG *n, 371 void *engine, void *output, void *context, void *surface, Efl_VG *n,
372 Eina_Array *clips, Eina_Bool do_async) 372 Eina_Array *clips, Eina_Bool do_async)
373{ 373{
@@ -380,7 +380,7 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Data *pd,
380 vc = efl_data_scope_get(n, EFL_CANVAS_VG_CONTAINER_CLASS); 380 vc = efl_data_scope_get(n, EFL_CANVAS_VG_CONTAINER_CLASS);
381 381
382 EINA_LIST_FOREACH(vc->children, l, child) 382 EINA_LIST_FOREACH(vc->children, l, child)
383 _evas_vg_render(obj, pd, 383 _evas_vg_render(obj, vd,
384 engine, output, context, surface, child, 384 engine, output, context, surface, child,
385 clips, do_async); 385 clips, do_async);
386 } 386 }
@@ -390,14 +390,14 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Data *pd,
390 nd = efl_data_scope_get(n, EFL_CANVAS_VG_NODE_CLASS); 390 nd = efl_data_scope_get(n, EFL_CANVAS_VG_NODE_CLASS);
391 obj->layer->evas->engine.func->ector_renderer_draw(engine, output, context, surface, nd->renderer, clips, do_async); 391 obj->layer->evas->engine.func->ector_renderer_draw(engine, output, context, surface, nd->renderer, clips, do_async);
392 if (do_async) 392 if (do_async)
393 eina_array_push(&pd->cleanup, efl_ref(nd->renderer)); 393 eina_array_push(&vd->cleanup, efl_ref(nd->renderer));
394 } 394 }
395} 395}
396 396
397// renders a vg_tree to an offscreen buffer 397// renders a vg_tree to an offscreen buffer
398// and push it to the cache. 398// and push it to the cache.
399static void * 399static void *
400_render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Data *pd, 400_render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *vd,
401 void *engine, void *surface, 401 void *engine, void *surface,
402 Efl_VG *root, int w, int h, void *key, 402 Efl_VG *root, int w, int h, void *key,
403 void *buffer, Eina_Bool do_async) 403 void *buffer, Eina_Bool do_async)
@@ -434,7 +434,7 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Data *pd,
434 ector, 434 ector,
435 0, 0, 435 0, 0,
436 do_async); 436 do_async);
437 _evas_vg_render(obj, pd, 437 _evas_vg_render(obj, vd,
438 engine, buffer, 438 engine, buffer,
439 context, surface, 439 context, surface,
440 root, NULL, 440 root, NULL,
@@ -477,11 +477,11 @@ _render_buffer_to_screen(Evas_Object_Protected_Data *obj,
477 477
478static void 478static void
479_cache_vg_entry_render(Evas_Object_Protected_Data *obj, 479_cache_vg_entry_render(Evas_Object_Protected_Data *obj,
480 Efl_Canvas_Vg_Data *pd, 480 Efl_Canvas_Vg_Object_Data *vd,
481 void *engine, void *output, void *context, void *surface, 481 void *engine, void *output, void *context, void *surface,
482 int x, int y, int w, int h, Eina_Bool do_async) 482 int x, int y, int w, int h, Eina_Bool do_async)
483{ 483{
484 Evas_Cache_Vg_Entry *vg_entry = pd->vg_entry; 484 Evas_Cache_Vg_Entry *vg_entry = vd->vg_entry;
485 Efl_VG *root, *dupe_root; 485 Efl_VG *root, *dupe_root;
486 void *buffer; 486 void *buffer;
487 487
@@ -492,7 +492,7 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
492 evas_cache_vg_entry_del(vg_entry); 492 evas_cache_vg_entry_del(vg_entry);
493 vg_entry = evas_cache_vg_entry_find(vg_entry->file, vg_entry->key, 493 vg_entry = evas_cache_vg_entry_find(vg_entry->file, vg_entry->key,
494 w, h); 494 w, h);
495 pd->vg_entry = vg_entry; 495 vd->vg_entry = vg_entry;
496 } 496 }
497 root = evas_cache_vg_tree_get(vg_entry); 497 root = evas_cache_vg_tree_get(vg_entry);
498 if (!root) return; 498 if (!root) return;
@@ -503,7 +503,7 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
503 { 503 {
504 dupe_root = efl_duplicate(root); 504 dupe_root = efl_duplicate(root);
505 // render to the buffer 505 // render to the buffer
506 buffer = _render_to_buffer(obj, pd, 506 buffer = _render_to_buffer(obj, vd,
507 engine, surface, 507 engine, surface,
508 dupe_root, 508 dupe_root,
509 w, h, 509 w, h,
@@ -526,11 +526,11 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
526 526
527static void 527static void
528_user_vg_entry_render(Evas_Object_Protected_Data *obj, 528_user_vg_entry_render(Evas_Object_Protected_Data *obj,
529 Efl_Canvas_Vg_Data *pd, 529 Efl_Canvas_Vg_Object_Data *vd,
530 void *engine, void *output, void *context, void *surface, 530 void *engine, void *output, void *context, void *surface,
531 int x, int y, int w, int h, Eina_Bool do_async) 531 int x, int y, int w, int h, Eina_Bool do_async)
532{ 532{
533 User_Vg_Entry *user_entry = pd->user_entry; 533 User_Vg_Entry *user_entry = vd->user_entry;
534 void *buffer; 534 void *buffer;
535 535
536 // if the size dosen't match 536 // if the size dosen't match
@@ -540,14 +540,14 @@ _user_vg_entry_render(Evas_Object_Protected_Data *obj,
540 obj->layer->evas->engine.func->ector_surface_cache_drop(engine, user_entry); 540 obj->layer->evas->engine.func->ector_surface_cache_drop(engine, user_entry);
541 user_entry->w = w; 541 user_entry->w = w;
542 user_entry->h = h; 542 user_entry->h = h;
543 pd->user_entry = user_entry; 543 vd->user_entry = user_entry;
544 } 544 }
545 // if the buffer is not created yet 545 // if the buffer is not created yet
546 buffer = obj->layer->evas->engine.func->ector_surface_cache_get(engine, user_entry); 546 buffer = obj->layer->evas->engine.func->ector_surface_cache_get(engine, user_entry);
547 if (!buffer) 547 if (!buffer)
548 { 548 {
549 // render to the buffer 549 // render to the buffer
550 buffer = _render_to_buffer(obj, pd, 550 buffer = _render_to_buffer(obj, vd,
551 engine, surface, 551 engine, surface,
552 user_entry->root, 552 user_entry->root,
553 w, h, 553 w, h,
@@ -558,8 +558,8 @@ _user_vg_entry_render(Evas_Object_Protected_Data *obj,
558 else 558 else
559 { 559 {
560 // render to the buffer 560 // render to the buffer
561 if (pd->changed) 561 if (vd->changed)
562 buffer = _render_to_buffer(obj, pd, 562 buffer = _render_to_buffer(obj, vd,
563 engine, surface, 563 engine, surface,
564 user_entry->root, 564 user_entry->root,
565 w, h, 565 w, h,
@@ -583,7 +583,7 @@ _efl_canvas_vg_render(Evas_Object *eo_obj EINA_UNUSED,
583 void *engine, void *output, void *context, void *surface, 583 void *engine, void *output, void *context, void *surface,
584 int x, int y, Eina_Bool do_async) 584 int x, int y, Eina_Bool do_async)
585{ 585{
586 Efl_Canvas_Vg_Data *pd = type_private_data; 586 Efl_Canvas_Vg_Object_Data *vd = type_private_data;
587 587
588 /* render object to surface with context, and offxet by x,y */ 588 /* render object to surface with context, and offxet by x,y */
589 obj->layer->evas->engine.func->context_color_set(engine, 589 obj->layer->evas->engine.func->context_color_set(engine,
@@ -602,21 +602,21 @@ _efl_canvas_vg_render(Evas_Object *eo_obj EINA_UNUSED,
602 obj->cur->anti_alias); 602 obj->cur->anti_alias);
603 obj->layer->evas->engine.func->context_render_op_set(engine, context, 603 obj->layer->evas->engine.func->context_render_op_set(engine, context,
604 obj->cur->render_op); 604 obj->cur->render_op);
605 if (pd->vg_entry) 605 if (vd->vg_entry)
606 { 606 {
607 _cache_vg_entry_render(obj, pd, 607 _cache_vg_entry_render(obj, vd,
608 engine, output, context, surface, 608 engine, output, context, surface,
609 obj->cur->geometry.x + x, obj->cur->geometry.y + y, 609 obj->cur->geometry.x + x, obj->cur->geometry.y + y,
610 obj->cur->geometry.w, obj->cur->geometry.h, do_async); 610 obj->cur->geometry.w, obj->cur->geometry.h, do_async);
611 } 611 }
612 if (pd->user_entry) 612 if (vd->user_entry)
613 { 613 {
614 _user_vg_entry_render(obj, pd, 614 _user_vg_entry_render(obj, vd,
615 engine, output, context, surface, 615 engine, output, context, surface,
616 obj->cur->geometry.x + x, obj->cur->geometry.y + y, 616 obj->cur->geometry.x + x, obj->cur->geometry.y + y,
617 obj->cur->geometry.w, obj->cur->geometry.h, do_async); 617 obj->cur->geometry.w, obj->cur->geometry.h, do_async);
618 } 618 }
619 pd->changed = EINA_FALSE; 619 vd->changed = EINA_FALSE;
620} 620}
621 621
622static void 622static void
@@ -624,7 +624,7 @@ _efl_canvas_vg_render_pre(Evas_Object *eo_obj,
624 Evas_Object_Protected_Data *obj, 624 Evas_Object_Protected_Data *obj,
625 void *type_private_data) 625 void *type_private_data)
626{ 626{
627 Efl_Canvas_Vg_Data *pd = type_private_data; 627 Efl_Canvas_Vg_Object_Data *vd = type_private_data;
628 int is_v, was_v; 628 int is_v, was_v;
629 Ector_Surface *s; 629 Ector_Surface *s;
630 630
@@ -649,8 +649,8 @@ _efl_canvas_vg_render_pre(Evas_Object *eo_obj,
649 649
650 // FIXME: handle damage only on changed renderer. 650 // FIXME: handle damage only on changed renderer.
651 s = evas_ector_get(obj->layer->evas); 651 s = evas_ector_get(obj->layer->evas);
652 if (pd->root && s) 652 if (vd->root && s)
653 _evas_vg_render_pre(pd->root, s, NULL); 653 _evas_vg_render_pre(vd->root, s, NULL);
654 654
655 /* now figure what changed and add draw rects */ 655 /* now figure what changed and add draw rects */
656 /* if it just became visible or invisible */ 656 /* if it just became visible or invisible */
@@ -658,7 +658,7 @@ _efl_canvas_vg_render_pre(Evas_Object *eo_obj,
658 was_v = evas_object_was_visible(eo_obj,obj); 658 was_v = evas_object_was_visible(eo_obj,obj);
659 if (!(is_v | was_v)) goto done; 659 if (!(is_v | was_v)) goto done;
660 660
661 if (pd->changed) 661 if (vd->changed)
662 { 662 {
663 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj); 663 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, eo_obj, obj);
664 goto done; 664 goto done;
@@ -757,7 +757,7 @@ _efl_canvas_vg_render_post(Evas_Object *eo_obj EINA_UNUSED,
757static unsigned int 757static unsigned int
758_efl_canvas_vg_id_get(Evas_Object *eo_obj) 758_efl_canvas_vg_id_get(Evas_Object *eo_obj)
759{ 759{
760 Efl_Canvas_Vg_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); 760 Efl_Canvas_Vg_Object_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
761 if (!o) return 0; 761 if (!o) return 0;
762 return MAGIC_OBJ_VG; 762 return MAGIC_OBJ_VG;
763} 763}
@@ -765,7 +765,7 @@ _efl_canvas_vg_id_get(Evas_Object *eo_obj)
765static unsigned int 765static unsigned int
766_efl_canvas_vg_visual_id_get(Evas_Object *eo_obj) 766_efl_canvas_vg_visual_id_get(Evas_Object *eo_obj)
767{ 767{
768 Efl_Canvas_Vg_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); 768 Efl_Canvas_Vg_Object_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
769 if (!o) return 0; 769 if (!o) return 0;
770 return MAGIC_OBJ_SHAPE; 770 return MAGIC_OBJ_SHAPE;
771} 771}
@@ -773,7 +773,7 @@ _efl_canvas_vg_visual_id_get(Evas_Object *eo_obj)
773static void * 773static void *
774_efl_canvas_vg_engine_data_get(Evas_Object *eo_obj) 774_efl_canvas_vg_engine_data_get(Evas_Object *eo_obj)
775{ 775{
776 Efl_Canvas_Vg_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); 776 Efl_Canvas_Vg_Object_Data *o = efl_data_scope_get(eo_obj, MY_CLASS);
777 return o->engine_data; 777 return o->engine_data;
778} 778}
779 779
@@ -793,4 +793,4 @@ _efl_canvas_vg_was_opaque(Evas_Object *eo_obj EINA_UNUSED,
793 return 0; 793 return 0;
794} 794}
795 795
796#include "efl_canvas_vg.eo.c" 796#include "efl_canvas_vg_object.eo.c"
diff --git a/src/lib/evas/canvas/efl_canvas_vg.eo b/src/lib/evas/canvas/efl_canvas_vg_object.eo
index 3fe331516c..971c977daf 100644
--- a/src/lib/evas/canvas/efl_canvas_vg.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.eo
@@ -21,7 +21,7 @@ enum Efl.Canvas.Vg.Fill_Mode
21 dimension of the viewport.]] 21 dimension of the viewport.]]
22} 22}
23 23
24class Efl.Canvas.Vg (Efl.Canvas.Object, Efl.File) 24class Efl.Canvas.Vg.Object (Efl.Canvas.Object, Efl.File)
25{ 25{
26 [[Efl vector graphics class]] 26 [[Efl vector graphics class]]
27 legacy_prefix: evas_object_vg; 27 legacy_prefix: evas_object_vg;
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 826f9b5e3b..12c57e360d 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -1025,7 +1025,7 @@ _image_data_regenerate(Evas_Object *eo_obj)
1025 CHECK(EFL_CANVAS_IMAGE_INTERNAL_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data)) 1025 CHECK(EFL_CANVAS_IMAGE_INTERNAL_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
1026 else CHECK(EFL_CANVAS_IMAGE_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data)) 1026 else CHECK(EFL_CANVAS_IMAGE_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
1027 else CHECK(EFL_CANVAS_SCENE3D_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data)) 1027 else CHECK(EFL_CANVAS_SCENE3D_CLASS, Evas_Image_Data, _image_image_data_regenerate(eo_obj, obj, data))
1028 //else CHECK(EFL_CANVAS_VG_OBJECT_CLASS, Efl_Canvas_Vg_Data,) 1028 //else CHECK(EFL_CANVAS_VG_OBJECT_CLASS, Efl_Canvas_Vg_Object_Data,)
1029 //else CHECK(EFL_CANVAS_POLYGON_CLASS, Efl_Canvas_Polygon_Data,) 1029 //else CHECK(EFL_CANVAS_POLYGON_CLASS, Efl_Canvas_Polygon_Data,)
1030 //else CHECK(EVAS_CANVAS3D_TEXTURE_CLASS, Evas_Canvas3D_Texture_Data, 1030 //else CHECK(EVAS_CANVAS3D_TEXTURE_CLASS, Evas_Canvas3D_Texture_Data,
1031} 1031}
diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c
index c17697d4f6..e7ef736528 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -214,7 +214,7 @@ _efl_canvas_vg_node_parent_checked_get(Eo *obj,
214 214
215 if (efl_isa(*parent, EFL_CANVAS_VG_CONTAINER_CLASS)) 215 if (efl_isa(*parent, EFL_CANVAS_VG_CONTAINER_CLASS))
216 *cd = efl_data_scope_get(*parent, EFL_CANVAS_VG_CONTAINER_CLASS); 216 *cd = efl_data_scope_get(*parent, EFL_CANVAS_VG_CONTAINER_CLASS);
217 else if (efl_isa(*parent, EFL_CANVAS_VG_CLASS)) 217 else if (efl_isa(*parent, EFL_CANVAS_VG_OBJECT_CLASS))
218 *parent = NULL; 218 *parent = NULL;
219 else if (*parent) 219 else if (*parent)
220 { 220 {
@@ -343,7 +343,7 @@ _efl_canvas_vg_node_efl_object_parent_set(Eo *obj,
343 343
344 if (efl_isa(parent, EFL_CANVAS_VG_CONTAINER_CLASS)) 344 if (efl_isa(parent, EFL_CANVAS_VG_CONTAINER_CLASS))
345 cd = efl_data_scope_get(parent, EFL_CANVAS_VG_CONTAINER_CLASS); 345 cd = efl_data_scope_get(parent, EFL_CANVAS_VG_CONTAINER_CLASS);
346 else if (efl_isa(parent, EFL_CANVAS_VG_CLASS)) 346 else if (efl_isa(parent, EFL_CANVAS_VG_OBJECT_CLASS))
347 parent_container = EINA_FALSE; 347 parent_container = EINA_FALSE;
348 else if (parent) 348 else if (parent)
349 { 349 {
diff --git a/src/lib/evas/canvas/evas_vg_private.h b/src/lib/evas/canvas/evas_vg_private.h
index 1305a8b478..cc43fb03ab 100644
--- a/src/lib/evas/canvas/evas_vg_private.h
+++ b/src/lib/evas/canvas/evas_vg_private.h
@@ -7,7 +7,10 @@ typedef struct _Efl_Canvas_Vg_Node_Data Efl_Canvas_Vg_Node_Data;
7typedef struct _Efl_Canvas_Vg_Container_Data Efl_Canvas_Vg_Container_Data; 7typedef struct _Efl_Canvas_Vg_Container_Data Efl_Canvas_Vg_Container_Data;
8typedef struct _Efl_Canvas_Vg_Gradient_Data Efl_Canvas_Vg_Gradient_Data; 8typedef struct _Efl_Canvas_Vg_Gradient_Data Efl_Canvas_Vg_Gradient_Data;
9typedef struct _Efl_Canvas_Vg_Interpolation Efl_Canvas_Vg_Interpolation; 9typedef struct _Efl_Canvas_Vg_Interpolation Efl_Canvas_Vg_Interpolation;
10typedef struct _Efl_Canvas_Vg_Data Efl_Canvas_Vg_Data; 10
11
12typedef struct _Efl_Canvas_Vg_Object_Data Efl_Canvas_Vg_Object_Data;
13
11typedef struct _Evas_Cache_Vg_Entry Evas_Cache_Vg_Entry; 14typedef struct _Evas_Cache_Vg_Entry Evas_Cache_Vg_Entry;
12typedef struct _Evas_Cache_Vg Evas_Cache_Vg; 15typedef struct _Evas_Cache_Vg Evas_Cache_Vg;
13 16
@@ -36,7 +39,7 @@ typedef struct _User_Vg_Entry
36 Efl_VG *root; 39 Efl_VG *root;
37}User_Vg_Entry; // holds the vg tree info set by the user 40}User_Vg_Entry; // holds the vg tree info set by the user
38 41
39struct _Efl_Canvas_Vg_Data 42struct _Efl_Canvas_Vg_Object_Data
40{ 43{
41 void *engine_data; 44 void *engine_data;
42 Efl_VG *root; 45 Efl_VG *root;