*
*/
+#define MAP_ACROSS 1
static void
-evas_object_child_map_across_mark(Evas_Object *obj, Eina_List *clippers,
- Eina_Bool map)
+evas_object_child_map_across_mark(Evas_Object *obj, Evas_Object *map_obj, Eina_Bool force)
{
-#if 0
- if (map)
- {
- // if obj->cur.clipper is in clippers list, then set
- // obj->cur.clip_across_map to 1
- }
- else
+#ifdef MAP_ACROSS
+ if ((obj->cur.map_parent != map_obj) || force)
{
+ obj->cur.map_parent = map_obj;
+ obj->cur.cache.clip.dirty = 1;
+ evas_object_clip_recalc(obj);
+ if (obj->smart.smart)
+ {
+ Evas_Object *obj2;
+
+ EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
+ {
+ // if obj has its own map - skip it. already done
+ if ((obj2->cur.map) && (obj2->cur.usemap)) continue;
+ evas_object_child_map_across_mark(obj2, map_obj, force);
+ }
+ }
}
#endif
}
+static void
+evas_object_clip_across_check(Evas_Object *obj)
+{
+ if (!obj->cur.clipper) return;
+ if (obj->cur.clipper->cur.map_parent != obj->cur.map_parent)
+ evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1);
+}
+
+// this function is called on an object when map is enabled or disabled on it
+// thus creating a "map boundary" at that point.
+//
+// FIXME: smart member add/del and clip set/unset needs to check the new
+// smart parent (if any)
void
evas_object_mapped_clip_across_mark(Evas_Object *obj)
{
- return;
-#if 0
+#ifdef MAP_ACROSS
Eina_Bool map = 0;
if ((obj->cur.map) && (obj->cur.usemap)) map = 1;
+
if (map)
{
- Eina_List *list = NULL;
-
- // FIXME: list = build list of all clippers that are children of obj
- // up until any obj that has map applied to it. if map is applied
- // tghen we must assume this has been run before o9n that obj and
- // its children etc.
- evas_object_child_map_across_mark(obj, list, map);
+ evas_object_child_map_across_mark(obj, obj, 0);
}
else
- evas_object_child_map_across_mark(obj, NULL, map);
+ {
+ if (obj->smart.parent)
+ evas_object_child_map_across_mark
+ (obj, obj->smart.parent->cur.map_parent, 0);
+ else
+ evas_object_child_map_across_mark(obj, NULL, 0);
+ }
#endif
}
obj->layer->evas->last_timestamp,
NULL);
}
+ evas_object_clip_across_check(obj);
}
/**
obj->layer->evas->last_timestamp,
NULL);
}
+ evas_object_clip_across_check(obj);
}
/**
int cx, cy, cw, ch, cvis, cr, cg, cb, ca;
int nx, ny, nw, nh, nvis, nr, ng, nb, na;
- if ((!obj->cur.cache.clip.dirty &&
- !(!obj->cur.clipper || obj->cur.clipper->cur.cache.clip.dirty)) ||
- (obj->cur.clip_across_map))
+ if ((!obj->cur.cache.clip.dirty) &&
+ !(!obj->cur.clipper || obj->cur.clipper->cur.cache.clip.dirty))
return;
if (obj->layer->evas->events_frozen > 0) return;
evas_object_coords_recalc(obj);
else cvis = obj->cur.visible;
cr = obj->cur.color.r; cg = obj->cur.color.g;
cb = obj->cur.color.b; ca = obj->cur.color.a;
- if ((obj->cur.clipper) && (!obj->cur.clip_across_map))
+ if ((obj->cur.clipper) &&
+ (obj->cur.clipper->cur.map_parent == obj->cur.map_parent))
{
// this causes problems... hmmm
if (obj->cur.clipper->cur.cache.clip.dirty)