From a38c037953d64325543d116714b94e8ca081ece1 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 3 Apr 2015 16:23:23 +0200 Subject: [PATCH] evas: make Evas.VG_Node inherit from Efl.Gfx.Stack. --- src/lib/evas/canvas/evas_vg_node.c | 30 ++++++++---- src/lib/evas/canvas/evas_vg_node.eo | 71 +++-------------------------- 2 files changed, 29 insertions(+), 72 deletions(-) diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c index fbe0a60a9f..86b70f363c 100644 --- a/src/lib/evas/canvas/evas_vg_node.c +++ b/src/lib/evas/canvas/evas_vg_node.c @@ -222,7 +222,7 @@ _evas_vg_node_eo_base_parent_set(Eo *obj, } void -_evas_vg_node_raise(Eo *obj, Evas_VG_Node_Data *pd EINA_UNUSED) +_evas_vg_node_efl_gfx_stack_raise(Eo *obj, Evas_VG_Node_Data *pd EINA_UNUSED) { Evas_VG_Container_Data *cd; Eina_List *lookup, *next; @@ -249,9 +249,9 @@ _evas_vg_node_raise(Eo *obj, Evas_VG_Node_Data *pd EINA_UNUSED) } void -_evas_vg_node_stack_above(Eo *obj, - Evas_VG_Node_Data *pd EINA_UNUSED, - Evas_VG_Node *above) +_evas_vg_node_efl_gfx_stack_stack_above(Eo *obj, + Evas_VG_Node_Data *pd EINA_UNUSED, + Efl_Gfx_Stack *above) { Evas_VG_Container_Data *cd; Eina_List *lookup, *ref; @@ -278,9 +278,9 @@ _evas_vg_node_stack_above(Eo *obj, } void -_evas_vg_node_stack_below(Eo *obj, - Evas_VG_Node_Data *pd EINA_UNUSED, - Evas_Object *below) +_evas_vg_node_efl_gfx_stack_stack_below(Eo *obj, + Evas_VG_Node_Data *pd EINA_UNUSED, + Efl_Gfx_Stack *below) { Evas_VG_Container_Data *cd; Eina_List *lookup, *ref; @@ -307,7 +307,7 @@ _evas_vg_node_stack_below(Eo *obj, } void -_evas_vg_node_lower(Eo *obj, Evas_VG_Node_Data *pd EINA_UNUSED) +_evas_vg_node_efl_gfx_stack_lower(Eo *obj, Evas_VG_Node_Data *pd EINA_UNUSED) { Evas_VG_Container_Data *cd; Eina_List *lookup, *prev; @@ -333,6 +333,20 @@ _evas_vg_node_lower(Eo *obj, Evas_VG_Node_Data *pd EINA_UNUSED) eo_error_set(obj); } +Efl_Gfx_Stack * +_evas_vg_node_efl_gfx_stack_below_get(Eo *obj, Evas_VG_Node_Data *pd) +{ + // FIXME: need to implement bound_get + return NULL; +} + +Efl_Gfx_Stack * +_evas_vg_node_efl_gfx_stack_above_get(Eo *obj, Evas_VG_Node_Data *pd) +{ + // FIXME: need to implement bound_get + return NULL; +} + Eina_Bool _evas_vg_node_original_bound_get(Eo *obj, Evas_VG_Node_Data *pd, diff --git a/src/lib/evas/canvas/evas_vg_node.eo b/src/lib/evas/canvas/evas_vg_node.eo index 108c2eb2c7..d89a1cd7af 100644 --- a/src/lib/evas/canvas/evas_vg_node.eo +++ b/src/lib/evas/canvas/evas_vg_node.eo @@ -1,4 +1,4 @@ -abstract Evas.VG_Node (Eo.Base, Efl.Gfx.Base) +abstract Evas.VG_Node (Eo.Base, Efl.Gfx.Base, Efl.Gfx.Stack) { eo_prefix: evas_vg_node; legacy_prefix: null; @@ -63,69 +63,6 @@ abstract Evas.VG_Node (Eo.Base, Efl.Gfx.Base) @out Eina_Rectangle r; } } - - raise { - /*@ - Raise @p obj to the top of its layer. - - @p obj will, then, be the highest one in the layer it belongs - to. Object on other layers won't get touched. - - @see evas_vg_node_stack_above() - @see evas_vg_node_stack_below() - @see evas_vg_node_lower() */ - } - stack_above { - /*@ - Stack @p obj immediately above @p above - - Objects, in a given Evas_VG_Container, are stacked in the order they get added - to it. This means that, if they overlap, the highest ones will - cover the lowest ones, in that order. This function is a way to - change the stacking order for the objects. - - This function is intended to be used with objects belonging to - the same container, otherwise it will fail (and - accomplish nothing). - - @see evas_vg_node_stack_below() */ - - params { - @in Evas_VG_Node *above @nonull; /*@ the object above which to stack */ - } - } - stack_below { - /*@ - Stack @p obj immediately below @p below - - Objects, in a given container, are stacked in the order they get added - to it. This means that, if they overlap, the highest ones will - cover the lowest ones, in that order. This function is a way to - change the stacking order for the objects. - - This function is intended to be used with objects belonging to - the same container, otherwise it will fail (and - accomplish nothing). - - @see evas_vg_node_layer_get() - @see evas_vg_node_layer_set() - @see evas_vg_node_stack_below() */ - - params { - @in Evas_Object *below @nonull; /*@ the object below which to stack */ - } - } - lower { - /*@ - Lower @p obj to the bottom of its layer. - - @p obj will, then, be the lowest one in the layer it belongs - to. Objects on other layers won't get touched. - - @see evas_vg_node_stack_above() - @see evas_vg_node_stack_below() - @see evas_vg_node_raise() */ - } } implements { Eo.Base.parent.set; @@ -137,6 +74,12 @@ abstract Evas.VG_Node (Eo.Base, Efl.Gfx.Base) Efl.Gfx.Base.size.get; Efl.Gfx.Base.position.set; Efl.Gfx.Base.position.get; + Efl.Gfx.Stack.below.get; + Efl.Gfx.Stack.above.get; + Efl.Gfx.Stack.stack_below; + Efl.Gfx.Stack.stack_above; + Efl.Gfx.Stack.raise; + Efl.Gfx.Stack.lower; @virtual .bound_get; } } \ No newline at end of file