}
static void
+_map_loaded(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ printf("loaded\n");
+}
+
+static void
_map_tile_load(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
printf("tile,load\n");
evas_object_smart_callback_add(map, "zoom,start", _map_zoom_start, map);
evas_object_smart_callback_add(map, "zoom,stop", _map_zoom_stop, map);
evas_object_smart_callback_add(map, "zoom,change", _map_zoom_change, map);
+ evas_object_smart_callback_add(map, "loaded", _map_loaded, map);
evas_object_smart_callback_add(map, "tile,load", _map_tile_load, map);
evas_object_smart_callback_add(map, "tile,loaded", _map_tile_loaded, map);
evas_object_smart_callback_add(map, "tile,loaded,fail", _map_tile_loaded_fail, map);
Ecore_Timer *zoom_timer;
Ecore_Animator *zoom_animator;
+ Ecore_Timer *loaded_timer;
+
int try_num;
int finish_num;
int download_num;
static const char SIG_ZOOM_START[] = "zoom,start";
static const char SIG_ZOOM_STOP[] = "zoom,stop";
static const char SIG_ZOOM_CHANGE[] = "zoom,change";
+static const char SIG_LOADED[] = "loaded";
static const char SIG_TILE_LOAD[] = "tile,load";
static const char SIG_TILE_LOADED[] = "tile,loaded";
static const char SIG_TILE_LOADED_FAIL[] = "tile,loaded,fail";
{SIG_ZOOM_START, ""},
{SIG_ZOOM_STOP, ""},
{SIG_ZOOM_CHANGE, ""},
+ {SIG_LOADED, ""},
{SIG_TILE_LOAD, ""},
{SIG_TILE_LOADED, ""},
{SIG_TILE_LOADED_FAIL, ""},
return ELM_RECTS_INTERSECT(x, y, w, h, vx, vy, vw, vh);
}
+static Eina_Bool
+_loaded_timeout(void *data)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(data, EINA_FALSE);
+ Widget_Data *wd = data;
+
+ wd->loaded_timer = NULL;
+ if (!(wd->download_num) && !(wd->download_idler))
+ evas_object_smart_callback_call(wd->obj, SIG_LOADED, NULL);
+ return ECORE_CALLBACK_CANCEL;
+}
+
static void
_grid_item_update(Grid_Item *gi)
{
_obj_rotate(gi->wd, gi->img);
gi->file_have = EINA_TRUE;
}
+
+ if (gi->wd->loaded_timer) ecore_timer_del(gi->wd->loaded_timer);
+ gi->wd->loaded_timer = ecore_timer_add(0.25, _loaded_timeout, gi->wd);
}
static void
Widget_Data *wd = elm_widget_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN(wd);
+ if (wd->loaded_timer)
+ {
+ ecore_timer_del(wd->loaded_timer);
+ wd->loaded_timer = NULL;
+ }
if (wd->map) evas_map_free(wd->map);
free(wd);
}