Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/canvas
Modified Files:
evas_events.c evas_layer.c evas_object_main.c
evas_object_smart.c evas_render.c evas_smart.c evas_stack.c
Log Message:
the first wave of evas smart object modes. commit hell #1. :) other things
still need updating in cvs - but i am sure others can do that :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_events.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- evas_events.c 24 Sep 2005 10:22:55 -0000 1.40
+++ evas_events.c 27 Oct 2005 02:44:36 -0000 1.41
@@ -19,6 +19,61 @@
return 0;
}
+static Evas_List *
+_evas_event_object_list_in_get(Evas *e, Evas_List *in, Evas_Object_List *list,
Evas_Object *stop, int x, int y, int *no_rep)
+{
+ Evas_Object_List *l;
+
+ if (!list) return in;
+ for (l = list->last; l; l = l->prev)
+ {
+ Evas_Object *obj;
+
+ obj = (Evas_Object *)l;
+ if (obj == stop)
+ {
+ *no_rep = 1;
+ return in;
+ }
+ if (!evas_event_passes_through(obj))
+ {
+ if ((obj->cur.visible) && (obj->delete_me == 0) &&
+ (!obj->clip.clipees) &&
+ (evas_object_clippers_is_visible(obj)))
+ {
+ if (obj->smart.smart)
+ {
+ int norep;
+
+ norep = 0;
+ in = _evas_event_object_list_in_get(e, in,
+ obj->smart.contained,
+ stop, x, y, &norep);
+ if (norep)
+ {
+ *no_rep = 1;
+ return in;
+ }
+ }
+ else
+ {
+ if (evas_object_is_in_output_rect(obj, x, y, 1, 1))
+ {
+ in = evas_list_append(in, obj);
+ if (!obj->repeat_events)
+ {
+ *no_rep = 1;
+ return in;
+ }
+ }
+ }
+ }
+ }
+ }
+ *no_rep = 0;
+ return in;
+}
+
Evas_List *
evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
{
@@ -28,33 +83,15 @@
if (!e->layers) return NULL;
for (l = ((Evas_Object_List *)(e->layers))->last; l; l = l->prev)
{
- Evas_Object_List *l2;
Evas_Layer *lay;
+ int norep;
lay = (Evas_Layer *)l;
- for (l2 = ((Evas_Object_List *)(lay->objects))->last; l2; l2 = l2->prev)
- {
- Evas_Object *obj;
-
- obj = (Evas_Object *)l2;
- if (obj == stop) goto done;
- if ((!evas_event_passes_through(obj)) && (!obj->smart.smart))
- {
-// FIXME: i don't think we need this
-// evas_object_clip_recalc(obj);
- if ((evas_object_is_in_output_rect(obj, x, y, 1, 1)) &&
- (obj->cur.visible) &&
- (obj->delete_me == 0) &&
- (evas_object_clippers_is_visible(obj)) &&
- (!obj->clip.clipees))
- {
- in = evas_list_append(in, obj);
- if (!obj->repeat_events) goto done;
- }
- }
- }
+ norep = 0;
+ in = _evas_event_object_list_in_get(e, in, lay->objects, stop,
+ x, y, &norep);
+ if (norep) return in;
}
- done:
return in;
}
@@ -431,7 +468,6 @@
if ((obj->cur.visible) &&
(evas_object_clippers_is_visible(obj)) &&
(!evas_event_passes_through(obj)) &&
- (!obj->smart.smart) &&
(!obj->clip.clipees))
{
if ((px != x) || (py != y))
@@ -510,7 +546,6 @@
(evas_object_clippers_is_visible(obj)) &&
(evas_list_find(ins, obj)) &&
(!evas_event_passes_through(obj)) &&
- (!obj->smart.smart) &&
(!obj->clip.clipees))
{
if ((px != x) || (py != y))
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_layer.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- evas_layer.c 25 Jul 2005 09:55:47 -0000 1.12
+++ evas_layer.c 27 Oct 2005 02:44:36 -0000 1.13
@@ -6,6 +6,7 @@
{
Evas_Layer *lay;
+ if (obj->in_layer) return;
lay = evas_layer_find(e, obj->cur.layer);
if (!lay)
{
@@ -15,11 +16,13 @@
}
lay->objects = evas_object_list_append(lay->objects, obj);
obj->layer = lay;
+ obj->in_layer = 1;
}
void
evas_object_release(Evas_Object *obj, int clean_layer)
{
+ if (!obj->in_layer) return;
obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj);
if (clean_layer)
{
@@ -30,6 +33,7 @@
}
}
obj->layer = NULL;
+ obj->in_layer = 0;
}
Evas_Layer *
@@ -140,16 +144,12 @@
return;
MAGIC_CHECK_END();
if (evas_object_intercept_call_layer_set(obj, l)) return;
+ if (obj->smart.parent) return;
if (obj->cur.layer == l)
{
evas_object_raise(obj);
return;
}
- if (obj->smart.smart)
- {
- if (obj->smart.smart->smart_class->layer_set)
- obj->smart.smart->smart_class->layer_set(obj, l);
- }
e = obj->layer->evas;
evas_object_release(obj, 1);
obj->cur.layer = l;
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_main.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- evas_object_main.c 23 Sep 2005 14:41:10 -0000 1.36
+++ evas_object_main.c 27 Oct 2005 02:44:36 -0000 1.37
@@ -18,13 +18,15 @@
void
evas_object_free(Evas_Object *obj, int clean_layer)
{
+ int was_smart_child = 0;
+
evas_object_grabs_cleanup(obj);
evas_object_intercept_cleanup(obj);
+ if (obj->smart.parent) was_smart_child = 1;
evas_object_smart_cleanup(obj);
obj->func->free(obj);
- if (obj->name)
- evas_object_name_set(obj, NULL);
- evas_object_release(obj, clean_layer);
+ if (obj->name) evas_object_name_set(obj, NULL);
+ if (!was_smart_child) evas_object_release(obj, clean_layer);
if (obj->name)
{
free(obj->name);
@@ -59,12 +61,9 @@
{
Evas_List *l;
- if (obj->smart.smart) return;
- if (!((obj->cur.visible != obj->prev.visible) || (obj->cur.visible)))
- return;
+ obj->layer->evas->changed = 1;
if (obj->changed) return;
obj->changed = 1;
- obj->layer->evas->changed = 1;
/* set changed flag on all objects this one clips too */
for (l = obj->clip.clipees; l; l = l->next)
{
@@ -73,6 +72,7 @@
o = (Evas_Object *)l->data;
evas_object_change(o);
}
+ if (obj->smart.parent) evas_object_change(obj->smart.parent);
}
Evas_List *
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_smart.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- evas_object_smart.c 22 Jul 2005 10:28:10 -0000 1.15
+++ evas_object_smart.c 27 Oct 2005 02:44:36 -0000 1.16
@@ -132,11 +132,18 @@
return;
MAGIC_CHECK_END();
+ if (obj->smart.parent == smart_obj) return;
+
if (obj->smart.parent) evas_object_smart_member_del(obj);
-
+
+ evas_object_release(obj, 1);
+ obj->layer = smart_obj->layer;
+ obj->cur.layer = obj->layer->layer;
obj->smart.parent = smart_obj;
- smart_obj->smart.contained = evas_list_append(smart_obj->smart.contained,
obj);
+ smart_obj->smart.contained =
evas_object_list_append(smart_obj->smart.contained, obj);
evas_object_smart_member_cache_invalidate(obj);
+ obj->restack = 1;
+ evas_object_change(obj);
}
/**
@@ -153,10 +160,13 @@
MAGIC_CHECK_END();
if (!obj->smart.parent) return;
-
- obj->smart.parent->smart.contained =
evas_list_remove(obj->smart.parent->smart.contained, obj);
+ obj->smart.parent->smart.contained =
evas_object_list_remove(obj->smart.parent->smart.contained, obj);
obj->smart.parent = NULL;
evas_object_smart_member_cache_invalidate(obj);
+ obj->cur.layer = obj->layer->layer;
+ evas_object_inject(obj, obj->layer->evas);
+ obj->restack = 1;
+ evas_object_change(obj);
}
/**
@@ -340,11 +350,7 @@
if (obj->smart.parent)
evas_object_smart_member_del(obj);
while (obj->smart.contained)
- {
- /* null out smart parent object - maybe a hole to creep through? */
- ((Evas_Object *)obj->smart.contained->data)->smart.parent = NULL;
- obj->smart.contained = evas_list_remove(obj->smart.contained,
obj->smart.contained->data);
- }
+ evas_object_smart_member_del((Evas_Object *)obj->smart.contained);
while (obj->smart.callbacks)
{
Evas_Smart_Callback *cb;
@@ -362,14 +368,14 @@
void
evas_object_smart_member_cache_invalidate(Evas_Object *obj)
{
- Evas_List *l;
+ Evas_Object_List *l;
obj->parent_cache_valid = 0;
for (l = obj->smart.contained; l; l = l->next)
{
Evas_Object *obj2;
- obj2 = l->data;
+ obj2 = (Evas_Object *)l;
evas_object_smart_member_cache_invalidate(obj2);
}
}
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_render.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- evas_render.c 18 Jun 2005 01:00:30 -0000 1.9
+++ evas_render.c 27 Oct 2005 02:44:36 -0000 1.10
@@ -64,6 +64,103 @@
}
}
+
+static void
+_evas_render_phase1_object_process(Evas *e, Evas_Object *obj, Evas_List
**active_objects, Evas_List **restack_objects, int restack)
+{
+/* if (obj->cur.cache.clip.dirty) */
+ evas_object_clip_recalc(obj);
+ /* build active object list */
+ if (evas_object_is_active(obj))
+ *active_objects = evas_list_append(*active_objects, obj);
+ /* something changed... maybe... */
+ if (restack)
+ {
+ obj->restack = 1;
+ obj->changed = 1;
+ }
+ if (obj->changed)
+ {
+ if (obj->smart.smart)
+ {
+ Evas_Object_List *l;
+
+ for (l = obj->smart.contained; l; l = l->next)
+ {
+ Evas_Object *obj2;
+
+ obj2 = (Evas_Object *)l;
+ _evas_render_phase1_object_process(e, obj2,
+ active_objects,
+ restack_objects,
obj->restack);
+ }
+
+ }
+ else
+ {
+ if ((obj->restack) && (!obj->clip.clipees) &&
+ evas_object_is_active(obj))
+ *restack_objects = evas_list_append(*restack_objects, obj);
+ else
+ obj->func->render_pre(obj);
+ }
+ }
+ /* nothing changed at all */
+ else
+ {
+ if ((!obj->clip.clipees) && (obj->delete_me == 0))
+ {
+ if (obj->smart.smart)
+ {
+ Evas_Object_List *l;
+
+ for (l = obj->smart.contained; l; l = l->next)
+ {
+ Evas_Object *obj2;
+
+ obj2 = (Evas_Object *)l;
+ _evas_render_phase1_object_process(e, obj2,
+ active_objects,
+ restack_objects,
+ restack);
+ }
+ }
+ else
+ {
+ if (evas_object_is_opaque(obj) &&
+ evas_object_is_visible(obj))
+
e->engine.func->output_redraws_rect_del(e->engine.data.output,
+
obj->cur.cache.clip.x,
+
obj->cur.cache.clip.y,
+
obj->cur.cache.clip.w,
+
obj->cur.cache.clip.h);
+ }
+ }
+ }
+ obj->restack = 0;
+}
+
+static void
+_evas_render_phase1_process(Evas *e, Evas_List **active_objects, Evas_List
**restack_objects)
+{
+ Evas_Object_List *l;
+
+ for (l = (Evas_Object_List *)e->layers; l; l = l->next)
+ {
+ Evas_Object_List *l2;
+ Evas_Layer *lay;
+
+ lay = (Evas_Layer *)l;
+ for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
+ {
+ Evas_Object *obj;
+
+ obj = (Evas_Object *)l2;
+ _evas_render_phase1_object_process(e, obj, active_objects,
restack_objects, 0);
+ }
+ }
+}
+
/**
* To be documented.
*
@@ -91,49 +188,7 @@
if (!e->changed) return NULL;
/* phase 1. add extra updates for changed objects */
- for (l = (Evas_Object_List *)e->layers; l; l = l->next)
- {
- Evas_Object_List *l2;
- Evas_Layer *lay;
-
- lay = (Evas_Layer *)l;
- for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
- {
- Evas_Object *obj;
-
- obj = (Evas_Object *)l2;
-// if (obj->cur.cache.clip.dirty)
- evas_object_clip_recalc(obj);
- /* build active object list */
- if (evas_object_is_active(obj))
- active_objects = evas_list_append(active_objects, obj);
- /* something changed... maybe... */
- if (obj->changed)
- {
- if ((obj->restack) &&
- (!obj->clip.clipees) &&
- (!obj->smart.smart) &&
- evas_object_is_active(obj))
- restack_objects = evas_list_append(restack_objects, obj);
- else
- obj->func->render_pre(obj);
- }
- /* nothing changed at all */
- else
- {
- if (evas_object_is_opaque(obj) &&
- evas_object_is_visible(obj) &&
- (!obj->smart.smart) &&
- (!obj->clip.clipees) &&
- (!obj->delete_me))
-
e->engine.func->output_redraws_rect_del(e->engine.data.output,
-
obj->cur.cache.clip.x,
-
obj->cur.cache.clip.y,
-
obj->cur.cache.clip.w,
-
obj->cur.cache.clip.h);
- }
- }
- }
+ _evas_render_phase1_process(e, &active_objects, &restack_objects);
/* phase 2. force updates for restacks */
while (restack_objects)
{
@@ -299,29 +354,22 @@
/* clear redraws */
e->engine.func->output_redraws_clear(e->engine.data.output);
/* and do a post render pass */
- for (l = (Evas_Object_List *)e->layers; l; l = l->next)
+ for (ll = active_objects; ll; ll = ll->next)
{
- Evas_Object_List *l2;
- Evas_Layer *lay;
-
- lay = (Evas_Layer *)l;
- for (l2 = (Evas_Object_List *)lay->objects; l2; l2 = l2->next)
+ Evas_Object *obj;
+
+ obj = (Evas_Object *)(ll->data);
+ obj->pre_render_done = 0;
+ if (obj->changed)
{
- Evas_Object *obj;
-
- obj = (Evas_Object *)l2;
- obj->pre_render_done = 0;
- if (obj->changed)
- {
- obj->func->render_post(obj);
- obj->restack = 0;
- obj->changed = 0;
- }
- /* if the object is flagged for deletion - note it */
- if (obj->delete_me == 2)
- delete_objects = evas_list_append(delete_objects, obj);
- if (obj->delete_me) obj->delete_me ++;
+ obj->func->render_post(obj);
+ obj->restack = 0;
+ obj->changed = 0;
}
+ /* if the object is flagged for deletion - note it */
+ if (obj->delete_me == 2)
+ delete_objects = evas_list_append(delete_objects, obj);
+ if (obj->delete_me) obj->delete_me ++;
}
/* delete all objects flagged for deletion now */
while (delete_objects)
@@ -333,9 +381,9 @@
evas_object_free(obj, 1);
}
/* free our obscuring object list */
- obscuring_objects_orig = evas_list_free(obscuring_objects_orig);
+ evas_list_free(obscuring_objects_orig);
/* free our active object list */
- active_objects = evas_list_free(active_objects);
+ evas_list_free(active_objects);
e->changed = 0;
e->viewport.changed = 0;
e->output.changed = 0;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_smart.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- evas_smart.c 26 Aug 2005 06:53:37 -0000 1.10
+++ evas_smart.c 27 Oct 2005 02:44:36 -0000 1.11
@@ -47,11 +47,6 @@
s->smart_class->name = name;
s->smart_class->add = func_add;
s->smart_class->del = func_del;
- s->smart_class->layer_set = func_layer_set;
- s->smart_class->raise = func_raise;
- s->smart_class->lower = func_lower;
- s->smart_class->stack_above = func_stack_above;
- s->smart_class->stack_below = func_stack_below;
s->smart_class->move = func_move;
s->smart_class->resize = func_resize;
s->smart_class->show = func_show;
@@ -88,38 +83,6 @@
* FIXME: To be fixed.
*
*/
-void
-evas_smart_above_get_set(Evas_Smart *s, Evas_Object *(*func_above_get)
(Evas_Object *o))
-{
- Evas_Smart_Class *sc;
-
- if (!(sc = evas_smart_class_get(s)))
- return;
- sc->above_get = func_above_get;
-}
-
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
-void
-evas_smart_below_get_set(Evas_Smart *s, Evas_Object *(*func_below_get)
(Evas_Object *o))
-{
- Evas_Smart_Class *sc;
-
- if (!(sc = evas_smart_class_get(s)))
- return;
- sc->below_get = func_below_get;
-}
-
-/**
- * To be documented.
- *
- * FIXME: To be fixed.
- *
- */
Evas_Smart *
evas_smart_class_new(Evas_Smart_Class *sc)
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_stack.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- evas_stack.c 22 Sep 2005 02:52:53 -0000 1.18
+++ evas_stack.c 27 Oct 2005 02:44:36 -0000 1.19
@@ -58,12 +58,18 @@
evas_object_inform_call_restack(obj);
return;
}
- obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj);
- obj->layer->objects = evas_object_list_append(obj->layer->objects, obj);
- if (obj->smart.smart)
+ if (obj->smart.parent)
{
- if (obj->smart.smart->smart_class->raise)
- obj->smart.smart->smart_class->raise(obj);
+ obj->smart.parent->smart.contained =
evas_object_list_remove(obj->smart.parent->smart.contained, obj);
+ obj->smart.parent->smart.contained =
evas_object_list_append(obj->smart.parent->smart.contained, obj);
+ }
+ else
+ {
+ if (obj->in_layer)
+ {
+ obj->layer->objects = evas_object_list_remove(obj->layer->objects,
obj);
+ obj->layer->objects = evas_object_list_append(obj->layer->objects,
obj);
+ }
}
if (obj->clip.clipees)
{
@@ -106,18 +112,24 @@
return;
MAGIC_CHECK_END();
if (evas_object_intercept_call_lower(obj)) return;
- if (obj->smart.smart)
- {
- if (obj->smart.smart->smart_class->lower)
- obj->smart.smart->smart_class->lower(obj);
- }
if (!(((Evas_Object_List *)obj)->prev))
{
evas_object_inform_call_restack(obj);
return;
}
- obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj);
- obj->layer->objects = evas_object_list_prepend(obj->layer->objects, obj);
+ if (obj->smart.parent)
+ {
+ obj->smart.parent->smart.contained =
evas_object_list_remove(obj->smart.parent->smart.contained, obj);
+ obj->smart.parent->smart.contained =
evas_object_list_prepend(obj->smart.parent->smart.contained, obj);
+ }
+ else
+ {
+ if (obj->in_layer)
+ {
+ obj->layer->objects = evas_object_list_remove(obj->layer->objects,
obj);
+ obj->layer->objects =
evas_object_list_prepend(obj->layer->objects, obj);
+ }
+ }
if (obj->clip.clipees)
{
evas_object_inform_call_restack(obj);
@@ -162,19 +174,9 @@
return;
MAGIC_CHECK_END();
if (evas_object_intercept_call_stack_above(obj, above)) return;
- if (above->smart.smart)
- {
- if (above->smart.smart->smart_class->above_get)
- above = above->smart.smart->smart_class->above_get(above);
- }
- if (obj->smart.smart)
- {
- if (obj->smart.smart->smart_class->stack_above)
- obj->smart.smart->smart_class->stack_above(obj, above);
- }
- if (above->layer != obj->layer)
+ if (!above)
{
- evas_object_inform_call_restack(obj);
+ evas_object_raise(obj);
return;
}
if (((Evas_Object_List *)obj)->prev == (Evas_Object_List *)above)
@@ -182,8 +184,28 @@
evas_object_inform_call_restack(obj);
return;
}
- obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj);
- obj->layer->objects = evas_object_list_append_relative(obj->layer->objects,
obj, above);
+ if (obj->smart.parent)
+ {
+ if (obj->smart.parent != above->smart.parent)
+ {
+// printf("BITCH! evas_object_stack_above(), %p not inside same smart
as %p!\n", obj, above);
+ return;
+ }
+ obj->smart.parent->smart.contained =
evas_object_list_remove(obj->smart.parent->smart.contained, obj);
+ obj->smart.parent->smart.contained =
evas_object_list_append_relative(obj->smart.parent->smart.contained, obj,
above);
+ }
+ else
+ {
+ if (obj->layer != above->layer)
+ {
+ return;
+ }
+ if (obj->in_layer)
+ {
+ obj->layer->objects = evas_object_list_remove(obj->layer->objects,
obj);
+ obj->layer->objects =
evas_object_list_append_relative(obj->layer->objects, obj, above);
+ }
+ }
if (obj->clip.clipees)
{
evas_object_inform_call_restack(obj);
@@ -228,19 +250,9 @@
return;
MAGIC_CHECK_END();
if (evas_object_intercept_call_stack_below(obj, below)) return;
- if (below->smart.smart)
- {
- if (below->smart.smart->smart_class->below_get)
- below = below->smart.smart->smart_class->below_get(below);
- }
- if (obj->smart.smart)
+ if (!below)
{
- if (obj->smart.smart->smart_class->stack_below)
- obj->smart.smart->smart_class->stack_below(obj, below);
- }
- if (below->layer != obj->layer)
- {
- evas_object_inform_call_restack(obj);
+ evas_object_lower(obj);
return;
}
if (((Evas_Object_List *)obj)->next == (Evas_Object_List *)below)
@@ -248,8 +260,28 @@
evas_object_inform_call_restack(obj);
return;
}
- obj->layer->objects = evas_object_list_remove(obj->layer->objects, obj);
- obj->layer->objects =
evas_object_list_prepend_relative(obj->layer->objects, obj, below);
+ if (obj->smart.parent)
+ {
+ if (obj->smart.parent != below->smart.parent)
+ {
+// printf("BITCH! evas_object_stack_below(), %p not inside same smart
as %p!\n", obj, below);
+ return;
+ }
+ obj->smart.parent->smart.contained =
evas_object_list_remove(obj->smart.parent->smart.contained, obj);
+ obj->smart.parent->smart.contained =
evas_object_list_prepend_relative(obj->smart.parent->smart.contained, obj,
below);
+ }
+ else
+ {
+ if (obj->layer != below->layer)
+ {
+ return;
+ }
+ if (obj->in_layer)
+ {
+ obj->layer->objects = evas_object_list_remove(obj->layer->objects,
obj);
+ obj->layer->objects =
evas_object_list_prepend_relative(obj->layer->objects, obj, below);
+ }
+ }
if (obj->clip.clipees)
{
evas_object_inform_call_restack(obj);
@@ -287,16 +319,12 @@
Evas_Object *
evas_object_above_get(Evas_Object *obj)
{
- Evas_Object *obj2;
-
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
- obj2 = evas_object_above_get_internal(obj);
- while (((obj2) && (obj2->smart.parent)) ||
- ((obj2) && (obj2->delete_me)))
- obj2 = evas_object_above_get_internal(obj2);
- return obj2;
+ if (obj->smart.parent)
+ return (Evas_Object *)(((Evas_Object_List *)(obj))->next);
+ return evas_object_above_get_internal(obj);
}
/**
@@ -308,16 +336,12 @@
Evas_Object *
evas_object_below_get(Evas_Object *obj)
{
- Evas_Object *obj2;
-
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
return NULL;
MAGIC_CHECK_END();
- obj2 = evas_object_below_get_internal(obj);
- while (((obj2) && (obj2->smart.parent)) ||
- ((obj2) && (obj2->delete_me)))
- obj2 = evas_object_below_get_internal(obj2);
- return obj2;
+ if (obj->smart.parent)
+ return (Evas_Object *)(((Evas_Object_List *)(obj))->prev);
+ return evas_object_below_get_internal(obj);
}
/**
@@ -329,17 +353,12 @@
Evas_Object *
evas_object_bottom_get(Evas *e)
{
- Evas_Object *obj2 = NULL;
-
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
if (e->layers)
- obj2 = e->layers->objects;
- while (((obj2) && (obj2->smart.parent)) ||
- ((obj2) && (obj2->delete_me)))
- obj2 = evas_object_above_get_internal(obj2);
- return obj2;
+ return e->layers->objects;
+ return NULL;
}
/**
@@ -371,10 +390,5 @@
obj2 = (Evas_Object *) list->last;
if (!obj2) return NULL;
- while (((obj2) && (obj2->smart.parent)) ||
- ((obj2) && (obj2->delete_me))) {
- obj2 = evas_object_below_get_internal(obj2);
- }
-
return obj2;
}
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs