{
Evas_Coord x, y, w, h;
Evas_Object *obj;
+ Evas_Object *prev;
int size;
double scale;
Eina_Bool fill_inside : 1;
sd->preloading = EINA_FALSE;
if (sd->show)
evas_object_show(sd->obj);
+ evas_object_del(sd->prev);
+ sd->prev = NULL;
}
Eina_Bool
sd = evas_object_smart_data_get(obj);
if (!sd) return EINA_FALSE;
/* smart code here */
+ if (sd->prev) evas_object_del(sd->prev);
+ if (sd->obj) sd->prev = sd->obj;
+ sd->obj = evas_object_image_add(evas_object_evas_get(obj));
+ evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED,
+ _preloaded, sd);
+ evas_object_smart_member_add(sd->obj, obj);
+ evas_object_image_scale_hint_set(sd->obj, EVAS_IMAGE_SCALE_HINT_STATIC);
+
if (sd->edje)
{
pclip = evas_object_clip_get(sd->obj);
- if (sd->obj) evas_object_del(sd->obj);
- sd->obj = evas_object_image_add(evas_object_evas_get(obj));
- evas_object_image_scale_hint_set(sd->obj, EVAS_IMAGE_SCALE_HINT_STATIC);
- evas_object_smart_member_add(sd->obj, obj);
- evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED,
- _preloaded, sd);
evas_object_clip_set(sd->obj, pclip);
sd->edje = EINA_FALSE;
}
sd->preloading = EINA_TRUE;
sd->show = EINA_TRUE;
evas_object_hide(sd->obj);
+ evas_object_show(sd->obj);
evas_object_image_preload(sd->obj, EINA_FALSE);
if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
{
sd = calloc(1, sizeof(Smart_Data));
if (!sd) return;
sd->obj = evas_object_image_add(evas_object_evas_get(obj));
+ sd->prev = NULL;
evas_object_image_scale_hint_set(sd->obj, EVAS_IMAGE_SCALE_HINT_STATIC);
sd->x = 0;
sd->y = 0;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
evas_object_del(sd->obj);
+ if (sd->prev) evas_object_del(sd->prev);
free(sd);
}
sd->show = EINA_TRUE;
if (!sd->preloading)
evas_object_show(sd->obj);
+ else if (sd->prev)
+ evas_object_show(sd->prev);
}
static void
if (!sd) return;
sd->show = EINA_FALSE;
evas_object_hide(sd->obj);
+ if (sd->prev) evas_object_hide(sd->prev);
}
static void
sd = evas_object_smart_data_get(obj);
if (!sd) return;
evas_object_color_set(sd->obj, r, g, b, a);
+ if (sd->prev) evas_object_color_set(sd->prev, r, g, b, a);
}
static void
sd = evas_object_smart_data_get(obj);
if (!sd) return;
evas_object_clip_set(sd->obj, clip);
+ if (sd->prev) evas_object_clip_set(sd->prev, clip);
}
static void
sd = evas_object_smart_data_get(obj);
if (!sd) return;
evas_object_clip_unset(sd->obj);
+ if (sd->prev) evas_object_clip_unset(sd->prev);
}
static void