summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_node.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_node.c65
1 files changed, 30 insertions, 35 deletions
diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c
index e53d295..d9c561b 100644
--- a/src/lib/evas/canvas/evas_vg_node.c
+++ b/src/lib/evas/canvas/evas_vg_node.c
@@ -26,8 +26,8 @@ _efl_vg_base_property_changed(void *data, const Eo_Event *event)
26 if (pd->changed) return EINA_TRUE; 26 if (pd->changed) return EINA_TRUE;
27 pd->changed = EINA_TRUE; 27 pd->changed = EINA_TRUE;
28 28
29 eo_do(event->obj, parent = eo_parent_get()); 29 parent = eo_parent_get(event->obj);
30 eo_do(parent, eo_event_callback_call(event->desc, event->event_info)); 30 eo_event_callback_call(parent, event->desc, event->event_info);
31 return EINA_TRUE; 31 return EINA_TRUE;
32} 32}
33 33
@@ -215,7 +215,7 @@ _efl_vg_base_efl_gfx_base_size_get(Eo *obj,
215{ 215{
216 Eina_Rectangle r = { 0, 0, 0, 0 }; 216 Eina_Rectangle r = { 0, 0, 0, 0 };
217 217
218 eo_do(obj, efl_vg_bounds_get(&r)); 218 efl_vg_bounds_get(obj, &r);
219 if (w) *w = r.w; 219 if (w) *w = r.w;
220 if (h) *h = r.h; 220 if (h) *h = r.h;
221} 221}
@@ -227,7 +227,7 @@ _efl_vg_base_parent_checked_get(Eo *obj,
227 Efl_VG_Container_Data **cd) 227 Efl_VG_Container_Data **cd)
228{ 228{
229 *cd = NULL; 229 *cd = NULL;
230 eo_do(obj, *parent = eo_parent_get()); 230 *parent = eo_parent_get(obj);
231 231
232 if (eo_isa(*parent, EFL_VG_CONTAINER_CLASS)) 232 if (eo_isa(*parent, EFL_VG_CONTAINER_CLASS))
233 { 233 {
@@ -263,14 +263,14 @@ _efl_vg_base_eo_base_constructor(Eo *obj,
263 Efl_VG_Container_Data *cd = NULL; 263 Efl_VG_Container_Data *cd = NULL;
264 Eo *parent; 264 Eo *parent;
265 265
266 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor()); 266 obj = eo_constructor(eo_super(obj, MY_CLASS));
267 267
268 if (!_efl_vg_base_parent_checked_get(obj, &parent, &cd)) { 268 if (!_efl_vg_base_parent_checked_get(obj, &parent, &cd)) {
269 ERR("Failed"); 269 ERR("Failed");
270 return NULL; 270 return NULL;
271 } 271 }
272 272
273 eo_do(obj, eo_event_callback_add(EFL_GFX_CHANGED, _efl_vg_base_property_changed, pd)); 273 eo_event_callback_add(obj, EFL_GFX_CHANGED, _efl_vg_base_property_changed, pd);
274 pd->changed = EINA_TRUE; 274 pd->changed = EINA_TRUE;
275 275
276 return obj; 276 return obj;
@@ -296,7 +296,7 @@ _efl_vg_base_eo_base_destructor(Eo *obj, Efl_VG_Base_Data *pd)
296 pd->intp = NULL; 296 pd->intp = NULL;
297 } 297 }
298 298
299 eo_do_super(obj, MY_CLASS, eo_destructor()); 299 eo_destructor(eo_super(obj, MY_CLASS));
300} 300}
301 301
302static void 302static void
@@ -380,7 +380,7 @@ _efl_vg_base_eo_base_parent_set(Eo *obj,
380 if (pd->name) eina_hash_del(old_cd->names, pd->name, obj); 380 if (pd->name) eina_hash_del(old_cd->names, pd->name, obj);
381 } 381 }
382 382
383 eo_do_super(obj, MY_CLASS, eo_parent_set(parent)); 383 eo_parent_set(eo_super(obj, MY_CLASS), parent);
384 if (cd) 384 if (cd)
385 { 385 {
386 cd->children = eina_list_append(cd->children, obj); 386 cd->children = eina_list_append(cd->children, obj);
@@ -405,7 +405,7 @@ _efl_vg_base_efl_gfx_stack_raise(Eo *obj, Efl_VG_Base_Data *pd EINA_UNUSED)
405 Eina_List *lookup, *next; 405 Eina_List *lookup, *next;
406 Eo *parent; 406 Eo *parent;
407 407
408 eo_do(obj, parent = eo_parent_get()); 408 parent = eo_parent_get(obj);
409 if (!eo_isa(parent, EFL_VG_CONTAINER_CLASS)) goto on_error; 409 if (!eo_isa(parent, EFL_VG_CONTAINER_CLASS)) goto on_error;
410 cd = eo_data_scope_get(parent, EFL_VG_CONTAINER_CLASS); 410 cd = eo_data_scope_get(parent, EFL_VG_CONTAINER_CLASS);
411 411
@@ -435,7 +435,7 @@ _efl_vg_base_efl_gfx_stack_stack_above(Eo *obj,
435 Eina_List *lookup, *ref; 435 Eina_List *lookup, *ref;
436 Eo *parent; 436 Eo *parent;
437 437
438 eo_do(obj, parent = eo_parent_get()); 438 parent = eo_parent_get(obj);
439 if (!eo_isa(parent, EFL_VG_CONTAINER_CLASS)) goto on_error; 439 if (!eo_isa(parent, EFL_VG_CONTAINER_CLASS)) goto on_error;
440 cd = eo_data_scope_get(parent, EFL_VG_CONTAINER_CLASS); 440 cd = eo_data_scope_get(parent, EFL_VG_CONTAINER_CLASS);
441 441
@@ -465,7 +465,7 @@ _efl_vg_base_efl_gfx_stack_stack_below(Eo *obj,
465 Eina_List *lookup, *ref; 465 Eina_List *lookup, *ref;
466 Eo *parent; 466 Eo *parent;
467 467
468 eo_do(obj, parent = eo_parent_get()); 468 parent = eo_parent_get(obj);
469 if (!eo_isa(parent, EFL_VG_CONTAINER_CLASS)) goto on_error; 469 if (!eo_isa(parent, EFL_VG_CONTAINER_CLASS)) goto on_error;
470 cd = eo_data_scope_get(parent, EFL_VG_CONTAINER_CLASS); 470 cd = eo_data_scope_get(parent, EFL_VG_CONTAINER_CLASS);
471 471
@@ -493,7 +493,7 @@ _efl_vg_base_efl_gfx_stack_lower(Eo *obj, Efl_VG_Base_Data *pd EINA_UNUSED)
493 Eina_List *lookup, *prev; 493 Eina_List *lookup, *prev;
494 Eo *parent; 494 Eo *parent;
495 495
496 eo_do(obj, parent = eo_parent_get()); 496 parent = eo_parent_get(obj);
497 if (!eo_isa(parent, EFL_VG_CONTAINER_CLASS)) goto on_error; 497 if (!eo_isa(parent, EFL_VG_CONTAINER_CLASS)) goto on_error;
498 cd = eo_data_scope_get(parent, EFL_VG_CONTAINER_CLASS); 498 cd = eo_data_scope_get(parent, EFL_VG_CONTAINER_CLASS);
499 499
@@ -522,7 +522,7 @@ _efl_vg_base_root_parent_get(Eo *obj)
522 if (eo_isa(obj, EFL_VG_ROOT_NODE_CLASS)) 522 if (eo_isa(obj, EFL_VG_ROOT_NODE_CLASS))
523 return obj; 523 return obj;
524 524
525 eo_do(obj, parent = eo_parent_get()); 525 parent = eo_parent_get(obj);
526 526
527 if (!parent) return NULL; 527 if (!parent) return NULL;
528 return _efl_vg_base_root_parent_get(parent); 528 return _efl_vg_base_root_parent_get(parent);
@@ -533,7 +533,7 @@ _efl_vg_base_walk_down_at(Eo *root, Eina_Array *a, Eina_Rectangle *r)
533{ 533{
534 Eina_Rectangle bounds; 534 Eina_Rectangle bounds;
535 535
536 eo_do(root, efl_vg_bounds_get(&bounds)); 536 efl_vg_bounds_get(root, &bounds);
537 if (!eina_rectangles_intersect(&bounds, r)) return ; 537 if (!eina_rectangles_intersect(&bounds, r)) return ;
538 538
539 eina_array_push(a, root); 539 eina_array_push(a, root);
@@ -571,7 +571,7 @@ _efl_vg_base_efl_gfx_stack_below_get(Eo *obj, Efl_VG_Base_Data *pd EINA_UNUSED)
571 Eina_Array_Iterator iterator; 571 Eina_Array_Iterator iterator;
572 unsigned int i; 572 unsigned int i;
573 573
574 eo_do(obj, efl_vg_bounds_get(&r)); 574 efl_vg_bounds_get(obj, &r);
575 575
576 eina_array_step_set(&a, sizeof (Eina_Array), 8); 576 eina_array_step_set(&a, sizeof (Eina_Array), 8);
577 577
@@ -601,7 +601,7 @@ _efl_vg_base_efl_gfx_stack_above_get(Eo *obj, Efl_VG_Base_Data *pd EINA_UNUSED)
601 Eina_Array_Iterator iterator; 601 Eina_Array_Iterator iterator;
602 unsigned int i; 602 unsigned int i;
603 603
604 eo_do(obj, efl_vg_bounds_get(&r)); 604 efl_vg_bounds_get(obj, &r);
605 605
606 eina_array_step_set(&a, sizeof (Eina_Array), 8); 606 eina_array_step_set(&a, sizeof (Eina_Array), 8);
607 607
@@ -727,8 +727,7 @@ _efl_vg_base_interpolate(Eo *obj,
727 727
728 if (fromd->mask && tod->mask && pd->mask) 728 if (fromd->mask && tod->mask && pd->mask)
729 { 729 {
730 eo_do(pd->mask, 730 r &= efl_vg_interpolate(pd->mask, fromd->mask, tod->mask, pos_map);
731 r &= efl_vg_interpolate(fromd->mask, tod->mask, pos_map));
732 } 731 }
733 732
734 _efl_vg_base_changed(obj); 733 _efl_vg_base_changed(obj);
@@ -779,9 +778,7 @@ _efl_vg_base_dup(Eo *obj, Efl_VG_Base_Data *pd, const Efl_VG_Base *from)
779 _efl_vg_clean_object(&pd->mask); 778 _efl_vg_clean_object(&pd->mask);
780 if (fromd->mask) 779 if (fromd->mask)
781 { 780 {
782 pd->mask = eo_add(eo_class_get(fromd->mask), 781 pd->mask = eo_add(eo_class_get(fromd->mask), obj, efl_vg_dup(eoid, pd->mask));
783 obj,
784 efl_vg_dup(pd->mask));
785 } 782 }
786 783
787 pd->x = fromd->x; 784 pd->x = fromd->x;
@@ -800,65 +797,63 @@ evas_vg_node_visible_get(Eo *obj)
800{ 797{
801 Eina_Bool ret; 798 Eina_Bool ret;
802 799
803 return eo_do_ret(obj, ret, efl_gfx_visible_get()); 800 return efl_gfx_visible_get(obj);
804} 801}
805 802
806EAPI void 803EAPI void
807evas_vg_node_visible_set(Eo *obj, Eina_Bool v) 804evas_vg_node_visible_set(Eo *obj, Eina_Bool v)
808{ 805{
809 eo_do(obj, efl_gfx_visible_set(v)); 806 efl_gfx_visible_set(obj, v);
810} 807}
811 808
812EAPI void 809EAPI void
813evas_vg_node_color_get(Eo *obj, int *r, int *g, int *b, int *a) 810evas_vg_node_color_get(Eo *obj, int *r, int *g, int *b, int *a)
814{ 811{
815 eo_do(obj, efl_gfx_color_get(r, g, b, a)); 812 efl_gfx_color_get(obj, r, g, b, a);
816} 813}
817 814
818EAPI void 815EAPI void
819evas_vg_node_color_set(Eo *obj, int r, int g, int b, int a) 816evas_vg_node_color_set(Eo *obj, int r, int g, int b, int a)
820{ 817{
821 eo_do(obj, efl_gfx_color_set(r, g, b, a)); 818 efl_gfx_color_set(obj, r, g, b, a);
822} 819}
823 820
824EAPI void 821EAPI void
825evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h) 822evas_vg_node_geometry_get(Eo *obj, int *x, int *y, int *w, int *h)
826{ 823{
827 eo_do(obj, 824 efl_gfx_position_get(obj, x, y);
828 efl_gfx_position_get(x, y), 825 efl_gfx_size_get(obj, w, h);
829 efl_gfx_size_get(w, h));
830} 826}
831 827
832EAPI void 828EAPI void
833evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h) 829evas_vg_node_geometry_set(Eo *obj, int x, int y, int w, int h)
834{ 830{
835 eo_do(obj, 831 efl_gfx_position_set(obj, x, y);
836 efl_gfx_position_set(x, y), 832 efl_gfx_size_set(obj, w, h);
837 efl_gfx_size_set(w, h));
838} 833}
839 834
840EAPI void 835EAPI void
841evas_vg_node_stack_below(Eo *obj, Eo *below) 836evas_vg_node_stack_below(Eo *obj, Eo *below)
842{ 837{
843 eo_do(obj, efl_gfx_stack_below(below)); 838 efl_gfx_stack_below(obj, below);
844} 839}
845 840
846EAPI void 841EAPI void
847evas_vg_node_stack_above(Eo *obj, Eo *above) 842evas_vg_node_stack_above(Eo *obj, Eo *above)
848{ 843{
849 eo_do(obj, efl_gfx_stack_above(above)); 844 efl_gfx_stack_above(obj, above);
850} 845}
851 846
852EAPI void 847EAPI void
853evas_vg_node_raise(Eo *obj) 848evas_vg_node_raise(Eo *obj)
854{ 849{
855 eo_do(obj, efl_gfx_stack_raise()); 850 efl_gfx_stack_raise(obj);
856} 851}
857 852
858EAPI void 853EAPI void
859evas_vg_node_lower(Eo *obj) 854evas_vg_node_lower(Eo *obj)
860{ 855{
861 eo_do(obj, efl_gfx_stack_lower()); 856 efl_gfx_stack_lower(obj);
862} 857}
863 858
864#include "efl_vg_base.eo.c" 859#include "efl_vg_base.eo.c"