static void _win_scan_job(void *data) { Win *w = data; w->job.scan = NULL; Eina_List *l; const char *path; EINA_LIST_FOREACH(w->scan.add, l, path) libmgr_scanpath_add(w->mgr, path); EINA_LIST_FOREACH(w->scan.del, l, path) printf(" sqlite3 %s \"delete from files where path like '%s%%'\"\n", w->db_path, path); if (w->job.populate) { ecore_job_del(w->job.populate); w->job.populate = NULL; } list_freeze(w->list); libmgr_scan_start(w->mgr, _win_scan_job_finished, w); // TODO // emit delete as sqlite statements // finish thread -> unmark it from Win // notify win (should reload lists) // if (!w->job.populate) // w->job.populate = ecore_job_add(_win_populate_job, w); }
/** * @internal * @returns the number of initializations left for this system * @brief Attempts to shut down the subsystem if nothing else is using it */ void efreet_desktop_shutdown(void) { Efreet_Desktop_Type_Info *info; char *dir; if (efreet_desktop_exe_handler) ecore_event_handler_del(efreet_desktop_exe_handler); IF_RELEASE(desktop_environment); IF_FREE_HASH(efreet_desktop_cache); while (efreet_desktop_types) { info = eina_list_data_get(efreet_desktop_types); efreet_desktop_type_info_free(info); efreet_desktop_types = eina_list_remove_list(efreet_desktop_types, efreet_desktop_types); } EINA_LIST_FREE(efreet_desktop_dirs, dir) eina_stringshare_del(dir); if (cache_monitor) ecore_file_monitor_del(cache_monitor); if (change_monitors) eina_hash_free(change_monitors); if (cache) eet_close(cache); efreet_desktop_edd_shutdown(desktop_edd); ecore_file_shutdown(); eina_log_domain_unregister(_efreet_desktop_log_dom); IF_RELEASE(cache_file); IF_RELEASE(cache_dirs); if (efreet_desktop_job) ecore_job_del(efreet_desktop_job); efreet_desktop_job = NULL; }
void Job::cancel () { if (mJob && !mCalled) { ecore_job_del (mJob); } }
/* private functions */ static void _sizing_eval(Evas_Object *obj) { Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->deferred_recalc_job) ecore_job_del(sd->deferred_recalc_job); sd->deferred_recalc_job = ecore_job_add(_recalc_job, obj); }
static void _smart_del(Evas_Object *obj) { Smart_Data *sd; sd = evas_object_smart_data_get(obj); if (!sd) return; evas_object_del(sd->clip); evas_object_del(sd->bg); evas_object_del(sd->overlay); elexika_result_list_clear(obj); if (sd->deferred_recalc_job) ecore_job_del(sd->deferred_recalc_job); free(sd); }
EAPI void emotion_object_position_set(Evas_Object *obj, double sec) { Smart_Data *sd; E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); DBG("sec=%f", sec); if (!sd->engine_instance) return; if (!sd->open) { sd->remember_jump = sec; return; } sd->remember_jump = 0; sd->seek_pos = sec; sd->seek = 1; sd->pos = sd->seek_pos; if (sd->job) ecore_job_del(sd->job); sd->job = ecore_job_add(_pos_set_job, obj); }
static void _smart_data_free(Smart_Data *sd) { #ifdef HAVE_EIO /* Only cancel the load_xattr or we will loose ref to time_seek stringshare */ if (sd->load_xattr) eio_file_cancel(sd->load_xattr); sd->load_xattr = NULL; if (sd->save_xattr) eio_file_cancel(sd->save_xattr); sd->save_xattr = NULL; #endif if (sd->engine_instance) { emotion_engine_instance_file_close(sd->engine_instance); emotion_engine_instance_del(sd->engine_instance); } sd->engine_instance = NULL; if (sd->obj) evas_object_del(sd->obj); sd->obj = NULL; if (sd->crop.clipper) evas_object_del(sd->crop.clipper); sd->crop.clipper = NULL; if (sd->bg) evas_object_del(sd->bg); sd->bg = NULL; if (sd->file) eina_stringshare_del(sd->file); sd->file = NULL; if (sd->job) ecore_job_del(sd->job); sd->job = NULL; if (sd->anim) ecore_animator_del(sd->anim); sd->anim = NULL; free(sd->progress.info); sd->progress.info = NULL; free(sd->ref.file); sd->ref.file = NULL; free(sd); /* TODO: remove legacy: emotion used to have no shutdown, call automatically */ emotion_shutdown(); }
void dvb_shutdown(void) { if (!o_dvb_bg) return; if (!_hide_timer) { menu_show(); background_show(); mini_pause_set(0); } else { ecore_timer_del(_hide_timer); _hide_timer = NULL; } evas_object_del(o_dvb_bg); evas_object_del(o_dvb); if (dvb_stopped_job) ecore_job_del(dvb_stopped_job); o_dvb = NULL; o_dvb_bg = NULL; dvb_stopped_job = NULL; }
void elexika_result_list_clear(Evas_Object *obj) { Smart_Data *sd; Eina_List *l; sd = evas_object_smart_data_get(obj); if (!sd) return; if (sd->deferred_recalc_job) ecore_job_del(sd->deferred_recalc_job); sd->deferred_recalc_job = NULL; for (l = sd->children; l; l = l->next) { evas_object_del(l->data); sd->children = eina_list_remove(sd->children, l->data); } evas_object_resize(sd->bg, sd->w_view, sd->h_view); evas_object_resize(sd->clip, sd->w_view, sd->h_view); evas_object_size_hint_min_set(sd->obj, 0, 0); evas_object_size_hint_max_set(sd->obj, sd->w_view, sd->h_view); sd->w = 0; sd->h = 0; }
static void _mouse_move_cb(void *data, const Efl_Event *event) { Efl_Input_Pointer *ev = event->info; Eo *obj = data; EFL_UI_PAGER_DATA_GET(obj, pd); Eina_Position2D pos; if (efl_input_event_flags_get(ev) & EFL_INPUT_FLAGS_PROCESSED) return; if (!pd->down.enabled) return; pos = efl_input_pointer_position_get(ev); if (pd->prev_block && (pd->mouse_x < (pos.x - pd->x))) return; if (pd->next_block && (pd->mouse_x > (pos.x - pd->x))) return; pd->mouse_x = pos.x - pd->x; pd->mouse_y = pos.y - pd->y; if (!pd->move_started) { Evas_Coord dx, dy; dx = pd->mouse_x - pd->down.x; dy = pd->mouse_y - pd->down.y; if (((dx * dx) + (dy * dy)) <= (_elm_config->finger_size * _elm_config->finger_size / 4)) return; pd->move_started = EINA_TRUE; } ecore_job_del(pd->job); pd->job = ecore_job_add(_job, obj); }