2013-06-20 03:53:29 -07:00
|
|
|
#include "evas_common_private.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
#include "evas_private.h"
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
static Evas_Object_Protected_Data *
|
|
|
|
evas_object_above_get_internal(const Evas_Object_Protected_Data *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
if ((EINA_INLIST_GET(obj))->next)
|
2012-10-08 18:58:41 -07:00
|
|
|
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->next);
|
2002-11-08 00:02:15 -08:00
|
|
|
else
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((EINA_INLIST_GET(obj->layer))->next)
|
2011-10-31 03:16:18 -07:00
|
|
|
{
|
|
|
|
Evas_Layer *l;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
l = (Evas_Layer *)((EINA_INLIST_GET(obj->layer))->next);
|
2011-10-31 03:16:18 -07:00
|
|
|
return l->objects;
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
static Evas_Object_Protected_Data *
|
|
|
|
evas_object_below_get_internal(const Evas_Object_Protected_Data *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
if ((EINA_INLIST_GET(obj))->prev)
|
2012-10-08 18:58:41 -07:00
|
|
|
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->prev);
|
2002-11-08 00:02:15 -08:00
|
|
|
else
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((EINA_INLIST_GET(obj->layer))->prev)
|
2011-10-31 03:16:18 -07:00
|
|
|
{
|
|
|
|
Evas_Layer *l;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
l = (Evas_Layer *)((EINA_INLIST_GET(obj->layer))->prev);
|
|
|
|
return (Evas_Object_Protected_Data *)((EINA_INLIST_GET((l->objects)))->last);
|
2011-10-31 03:16:18 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_raise(Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_raise());
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_raise(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
|
|
|
{
|
|
|
|
if (evas_object_intercept_call_raise(eo_obj)) return;
|
|
|
|
|
|
|
|
Evas_Object_Protected_Data *obj = _pd;
|
2008-10-17 04:23:18 -07:00
|
|
|
if (!((EINA_INLIST_GET(obj))->next))
|
2002-12-09 22:45:18 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_restack(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2005-10-26 19:44:36 -07:00
|
|
|
if (obj->smart.parent)
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_raise(eo_obj);
|
2005-10-26 19:44:36 -07:00
|
|
|
else
|
|
|
|
{
|
2011-10-31 03:16:18 -07:00
|
|
|
if (obj->in_layer)
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_demote(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj));
|
2005-08-25 23:53:37 -07:00
|
|
|
}
|
2002-12-09 22:45:18 -08:00
|
|
|
if (obj->clip.clipees)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_restack(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->layer) evas_render_invalidate(obj->layer->evas->evas);
|
2011-10-31 03:16:18 -07:00
|
|
|
obj->restack = EINA_TRUE;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_inform_call_restack(eo_obj);
|
|
|
|
if (obj->layer->evas->is_frozen) return;
|
2012-10-21 21:57:32 -07:00
|
|
|
if ((!evas_event_passes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_event_freezes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_object_is_source_invisible(eo_obj, obj)))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->is_smart)
|
2011-10-31 03:16:18 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
2011-10-31 03:16:18 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
2013-03-12 05:58:19 -07:00
|
|
|
1, 1) && obj->cur->visible)
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
2011-11-15 07:10:19 -08:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
2011-10-31 03:16:18 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_lower(Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_lower());
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_lower(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
|
|
|
{
|
|
|
|
if (evas_object_intercept_call_lower(eo_obj)) return;
|
|
|
|
|
|
|
|
Evas_Object_Protected_Data *obj = _pd;
|
2008-10-17 04:23:18 -07:00
|
|
|
if (!((EINA_INLIST_GET(obj))->prev))
|
2002-12-09 22:45:18 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_restack(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2005-10-26 19:44:36 -07:00
|
|
|
if (obj->smart.parent)
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_lower(eo_obj);
|
2005-10-26 19:44:36 -07:00
|
|
|
else
|
|
|
|
{
|
2011-10-31 03:16:18 -07:00
|
|
|
if (obj->in_layer)
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_promote(EINA_INLIST_GET(obj->layer->objects),
|
|
|
|
EINA_INLIST_GET(obj));
|
2005-10-26 19:44:36 -07:00
|
|
|
}
|
2002-12-09 22:45:18 -08:00
|
|
|
if (obj->clip.clipees)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_restack(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->layer) evas_render_invalidate(obj->layer->evas->evas);
|
2011-10-31 03:16:18 -07:00
|
|
|
obj->restack = EINA_TRUE;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_inform_call_restack(eo_obj);
|
|
|
|
if (obj->layer->evas->is_frozen) return;
|
2012-10-21 21:57:32 -07:00
|
|
|
if ((!evas_event_passes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_event_freezes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_object_is_source_invisible(eo_obj, obj)))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->is_smart)
|
2011-10-31 03:16:18 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
2011-10-31 03:16:18 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
2013-03-12 05:58:19 -07:00
|
|
|
1, 1) && obj->cur->visible)
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
2011-11-15 07:10:19 -08:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
2011-10-31 03:16:18 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_stack_above(Evas_Object *eo_obj, Evas_Object *above)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_stack_above(above));
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_stack_above(Eo *eo_obj, void *_pd, va_list *list)
|
|
|
|
{
|
|
|
|
Evas_Object *eo_above = va_arg(*list, Evas_Object *);
|
|
|
|
if (!eo_above) return;
|
|
|
|
if (eo_obj == eo_above) return;
|
|
|
|
if (evas_object_intercept_call_stack_above(eo_obj, eo_above)) return;
|
|
|
|
if (!eo_above)
|
2005-08-25 23:53:37 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_raise(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = _pd;
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *above = eo_data_scope_get(eo_above, EVAS_OBJ_CLASS);
|
2008-10-17 04:23:18 -07:00
|
|
|
if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above))
|
2002-12-09 22:45:18 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_restack(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2005-10-26 19:44:36 -07:00
|
|
|
if (obj->smart.parent)
|
|
|
|
{
|
2011-10-31 03:16:18 -07:00
|
|
|
if (obj->smart.parent != above->smart.parent)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
ERR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", eo_obj, eo_above);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_stack_above(eo_obj, eo_above);
|
2005-10-26 19:44:36 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-10-31 03:16:18 -07:00
|
|
|
if (above->smart.parent)
|
2009-11-15 05:46:20 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not", eo_obj, eo_above);
|
2009-11-15 05:46:20 -08:00
|
|
|
return;
|
|
|
|
}
|
2011-10-31 03:16:18 -07:00
|
|
|
if (obj->layer != above->layer)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers", eo_obj, eo_above);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (obj->in_layer)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
|
|
|
|
EINA_INLIST_GET(obj));
|
|
|
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_append_relative(EINA_INLIST_GET(obj->layer->objects),
|
|
|
|
EINA_INLIST_GET(obj),
|
|
|
|
EINA_INLIST_GET(above));
|
2011-10-31 03:16:18 -07:00
|
|
|
}
|
2005-10-26 19:44:36 -07:00
|
|
|
}
|
2002-12-09 22:45:18 -08:00
|
|
|
if (obj->clip.clipees)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_restack(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->layer) evas_render_invalidate(obj->layer->evas->evas);
|
2011-10-31 03:16:18 -07:00
|
|
|
obj->restack = EINA_TRUE;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_inform_call_restack(eo_obj);
|
|
|
|
if (obj->layer->evas->is_frozen) return;
|
2012-10-21 21:57:32 -07:00
|
|
|
if ((!evas_event_passes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_event_freezes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_object_is_source_invisible(eo_obj, obj)))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->is_smart)
|
2011-10-31 03:16:18 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
2011-10-31 03:16:18 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
2013-03-12 05:58:19 -07:00
|
|
|
1, 1) && obj->cur->visible)
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
2011-11-15 07:10:19 -08:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
2011-10-31 03:16:18 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_stack_below(Evas_Object *eo_obj, Evas_Object *eo_below)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_stack_below(eo_below));
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_stack_below(Eo *eo_obj, void *_pd, va_list *list)
|
|
|
|
{
|
|
|
|
Evas_Object *eo_below = va_arg(*list, Evas_Object *);
|
|
|
|
if (!eo_below) return;
|
|
|
|
if (eo_obj == eo_below) return;
|
|
|
|
if (evas_object_intercept_call_stack_below(eo_obj, eo_below)) return;
|
|
|
|
if (!eo_below)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_lower(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj = _pd;
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *below = eo_data_scope_get(eo_below, EVAS_OBJ_CLASS);
|
2008-10-17 04:23:18 -07:00
|
|
|
if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below))
|
2002-12-09 22:45:18 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_restack(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2005-10-26 19:44:36 -07:00
|
|
|
if (obj->smart.parent)
|
|
|
|
{
|
2011-10-31 03:16:18 -07:00
|
|
|
if (obj->smart.parent != below->smart.parent)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
ERR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", eo_obj, eo_below);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_member_stack_below(eo_obj, eo_below);
|
2005-10-26 19:44:36 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-10-31 03:16:18 -07:00
|
|
|
if (below->smart.parent)
|
2009-11-15 05:46:20 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not", eo_obj, eo_below);
|
2009-11-15 05:46:20 -08:00
|
|
|
return;
|
|
|
|
}
|
2011-10-31 03:16:18 -07:00
|
|
|
if (obj->layer != below->layer)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers", eo_obj, eo_below);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (obj->in_layer)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
|
2011-10-31 03:16:18 -07:00
|
|
|
EINA_INLIST_GET(obj));
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->layer->objects = (Evas_Object_Protected_Data *)eina_inlist_prepend_relative(EINA_INLIST_GET(obj->layer->objects),
|
2011-10-31 03:16:18 -07:00
|
|
|
EINA_INLIST_GET(obj),
|
|
|
|
EINA_INLIST_GET(below));
|
|
|
|
}
|
2005-10-26 19:44:36 -07:00
|
|
|
}
|
2002-12-09 22:45:18 -08:00
|
|
|
if (obj->clip.clipees)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_restack(eo_obj);
|
2011-10-31 03:16:18 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->layer) evas_render_invalidate(obj->layer->evas->evas);
|
2011-10-31 03:16:18 -07:00
|
|
|
obj->restack = EINA_TRUE;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_inform_call_restack(eo_obj);
|
|
|
|
if (obj->layer->evas->is_frozen) return;
|
2012-10-21 21:57:32 -07:00
|
|
|
if ((!evas_event_passes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_event_freezes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_object_is_source_invisible(eo_obj, obj)))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->is_smart)
|
2011-10-31 03:16:18 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
2011-10-31 03:16:18 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
2013-03-12 05:58:19 -07:00
|
|
|
1, 1) && obj->cur->visible)
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
2011-11-15 07:10:19 -08:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
2011-10-31 03:16:18 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI Evas_Object *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_above_get(const Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return NULL;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *ret = NULL;
|
|
|
|
eo_do((Eo *)eo_obj, evas_obj_above_get(&ret));
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_above_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
|
|
|
{
|
|
|
|
const Evas_Object_Protected_Data *obj = _pd;
|
|
|
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
|
|
|
|
2005-10-26 19:44:36 -07:00
|
|
|
if (obj->smart.parent)
|
2006-06-07 16:30:15 -07:00
|
|
|
{
|
2011-10-31 03:16:18 -07:00
|
|
|
do
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
obj = (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->next);
|
|
|
|
if ((obj) && (!obj->delete_me))
|
|
|
|
{
|
|
|
|
*ret = obj->object;
|
|
|
|
return;
|
|
|
|
}
|
2011-10-31 03:16:18 -07:00
|
|
|
}
|
|
|
|
while (obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
*ret = NULL;
|
|
|
|
return;
|
2006-06-07 16:30:15 -07:00
|
|
|
}
|
|
|
|
obj = evas_object_above_get_internal(obj);
|
|
|
|
while (obj)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->delete_me)
|
|
|
|
{
|
|
|
|
*ret = obj->object;
|
|
|
|
return;
|
|
|
|
}
|
2011-10-31 03:16:18 -07:00
|
|
|
obj = evas_object_above_get_internal(obj);
|
2006-06-07 16:30:15 -07:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
*ret = NULL;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI Evas_Object *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_below_get(const Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return NULL;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *ret = NULL;
|
|
|
|
eo_do((Eo *)eo_obj, evas_obj_below_get(&ret));
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_below_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
|
|
|
|
{
|
|
|
|
const Evas_Object_Protected_Data *obj = _pd;
|
|
|
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
|
|
|
*ret = NULL;
|
2005-10-26 19:44:36 -07:00
|
|
|
if (obj->smart.parent)
|
2006-06-07 16:30:15 -07:00
|
|
|
{
|
2011-10-31 03:16:18 -07:00
|
|
|
do
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
obj = (Evas_Object_Protected_Data *)((EINA_INLIST_GET(obj))->prev);
|
|
|
|
if ((obj) && (!obj->delete_me))
|
|
|
|
{
|
|
|
|
*ret = obj->object;
|
|
|
|
return;
|
|
|
|
}
|
2011-10-31 03:16:18 -07:00
|
|
|
}
|
|
|
|
while (obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
return;
|
2006-06-07 16:30:15 -07:00
|
|
|
}
|
|
|
|
obj = evas_object_below_get_internal(obj);
|
|
|
|
while (obj)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->delete_me)
|
|
|
|
{
|
|
|
|
*ret = obj->object;
|
|
|
|
return;
|
|
|
|
}
|
2011-10-31 03:16:18 -07:00
|
|
|
obj = evas_object_below_get_internal(obj);
|
2006-06-07 16:30:15 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2010-03-17 21:57:40 -07:00
|
|
|
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI Evas_Object *
|
2008-02-08 13:42:01 -08:00
|
|
|
evas_object_bottom_get(const Evas *e)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
|
|
|
|
return NULL;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *ret = NULL;
|
|
|
|
eo_do((Eo *)e, evas_canvas_object_bottom_get(&ret));
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_canvas_object_bottom_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
|
|
|
|
{
|
|
|
|
Evas_Object **ret = va_arg(*list, Evas_Object **);
|
|
|
|
const Evas_Public_Data *e = _pd;
|
2002-11-08 00:02:15 -08:00
|
|
|
if (e->layers)
|
2006-06-07 16:30:15 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object_Protected_Data *obj;
|
2009-09-03 22:13:19 -07:00
|
|
|
|
2011-10-31 03:16:18 -07:00
|
|
|
obj = e->layers->objects;
|
|
|
|
while (obj)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->delete_me)
|
|
|
|
{
|
|
|
|
*ret = obj->object;
|
|
|
|
return;
|
|
|
|
}
|
2011-10-31 03:16:18 -07:00
|
|
|
obj = evas_object_above_get_internal(obj);
|
|
|
|
}
|
2006-06-07 16:30:15 -07:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
*ret = NULL;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI Evas_Object *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_top_get(const Evas *eo_e)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
|
2002-11-08 00:02:15 -08:00
|
|
|
return NULL;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *ret = NULL;
|
|
|
|
eo_do((Eo *)eo_e, evas_canvas_object_top_get(&ret));
|
|
|
|
return ret;
|
|
|
|
}
|
2005-05-09 12:40:49 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
void
|
|
|
|
_canvas_object_top_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *params_list)
|
|
|
|
{
|
|
|
|
Evas_Object **ret = va_arg(*params_list, Evas_Object **);
|
|
|
|
*ret = NULL;
|
|
|
|
Evas_Object_Protected_Data *obj = NULL;
|
|
|
|
Eina_Inlist *list;
|
|
|
|
Evas_Layer *layer;
|
|
|
|
|
|
|
|
const Evas_Public_Data *e = _pd;
|
2008-10-17 04:23:18 -07:00
|
|
|
list = EINA_INLIST_GET(e->layers);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!list) return;
|
2005-05-09 12:40:49 -07:00
|
|
|
|
|
|
|
layer = (Evas_Layer *) list->last;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!layer) return;
|
2005-05-09 12:40:49 -07:00
|
|
|
|
2008-10-17 04:23:18 -07:00
|
|
|
list = EINA_INLIST_GET(layer->objects);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!list) return;
|
2005-05-09 12:40:49 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
obj = (Evas_Object_Protected_Data *) list->last;
|
|
|
|
if (!obj) return;
|
2006-06-07 16:30:15 -07:00
|
|
|
|
|
|
|
while (obj)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->delete_me)
|
|
|
|
{
|
|
|
|
*ret = obj->object;
|
|
|
|
return;
|
|
|
|
}
|
2011-10-31 03:16:18 -07:00
|
|
|
obj = evas_object_below_get_internal(obj);
|
2006-06-07 16:30:15 -07:00
|
|
|
}
|
2005-05-09 12:40:49 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
*ret = obj->object;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|