static void _gc_shutdown(E_Gadcon_Client *gcc) { Instance *inst; if (!(inst = gcc->data)) return; evas_object_event_callback_del(inst->tclock, EVAS_CALLBACK_MOUSE_DOWN, _tclock_cb_mouse_down); evas_object_event_callback_del(inst->tclock, EVAS_CALLBACK_MOUSE_IN, _tclock_cb_mouse_in); evas_object_event_callback_del(inst->tclock, EVAS_CALLBACK_MOUSE_OUT, _tclock_cb_mouse_out); if (inst->tclock) evas_object_del(inst->tclock); tclock_config->instances = eina_list_remove(tclock_config->instances, inst); if (eina_list_count(tclock_config->instances) <= 0) { if (check_timer) ecore_timer_del(check_timer); check_timer = NULL; } E_FREE(inst); }
static void _gc_shutdown (E_Gadcon_Client * gcc) { Instance *inst; inst = gcc->data; if (inst->cb_player_track_change) e_dbus_signal_handler_del(conn, inst->cb_player_track_change); if (inst->cb_player_status_change) e_dbus_signal_handler_del(conn, inst->cb_player_status_change); empris_config->instances = eina_list_remove (empris_config->instances, inst); evas_object_event_callback_del (inst->empris, EVAS_CALLBACK_MOUSE_DOWN, _empris_cb_mouse_down); evas_object_event_callback_del (inst->empris, EVAS_CALLBACK_MOUSE_IN, _empris_cb_mouse_in); evas_object_event_callback_del (inst->empris, EVAS_CALLBACK_MOUSE_OUT, _empris_cb_mouse_out); _empris_popup_destroy (inst); evas_object_del (inst->empris); free (inst); inst = NULL; }
void url_bar_del(Url_Bar *urlBar) { if (!urlBar) return; evas_object_event_callback_del(urlBar->entry, EVAS_CALLBACK_KEY_DOWN, on_urlbar_key_down); evas_object_event_callback_del(urlBar->entry, EVAS_CALLBACK_MOUSE_DOWN, on_urlbar_mouse_down); evas_object_event_callback_del(urlBar->entry, EVAS_CALLBACK_FOCUS_OUT, on_urlbar_focus_out); evas_object_del(urlBar->area); evas_object_del(urlBar->entry); free(urlBar); }
void elitaire_object_pause(Evas_Object * elitaire) { int i; Evas_Object * card; Elitaire * eli; card_iterator it, it_end; int num_decks; eli = (Elitaire *) evas_object_smart_data_get(elitaire); if (!eli) return; num_decks = eli->game->getNumDecks(); for (i = 0; i < num_decks; i++) { it = eli->game->getDeckBegin(i); it_end = eli->game->getDeckEnd(i); while (it != it_end) { card = (Evas_Object *) (*it)->data; elitaire_card_callback_del(card, EVAS_CALLBACK_MOUSE_DOWN, elitaire_mouse_down_cb); elitaire_card_callback_del(card, EVAS_CALLBACK_MOUSE_UP, elitaire_mouse_up_cb); it++; } } for (i = 0; i < eli->num_stacks; i++) { evas_object_event_callback_del(eli->stacks[i], EVAS_CALLBACK_MOUSE_UP, _elitaire_stack_mouse_up_cb); } }
void page_destroy(Evas_Object *scroller, Evas_Object *page) { Evas_Object *mapbuf; Evas_Object *bg; Evas_Object *item; Evas_Object *box; Evas_Object *index; Evas_Object *tab; Eina_List *pending_list; register unsigned int i; int page_max_app; unsigned int count; evas_object_event_callback_del(page, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints_cb); page_max_app = (int) evas_object_data_get(scroller, "page_max_app"); for (i = 0; i < page_max_app; i ++) { item = page_unpack_item_at(page, i); if (!item) continue; item_destroy(item); } pending_list = evas_object_data_get(page, "pending,list"); eina_list_free(pending_list); bg = evas_object_data_get(page, "bg"); evas_object_del(bg); box = evas_object_data_get(scroller, "box"); ret_if(NULL == box); mapbuf = mapbuf_get_mapbuf(page); if (mapbuf) { elm_box_unpack(box, mapbuf); mapbuf_unbind(mapbuf); } else { elm_box_unpack(box, page); } index = evas_object_data_get(scroller, "index"); if (index) { tab = evas_object_data_get(scroller, "tab"); count = page_scroller_count_page(scroller); index_update(tab, index, count); } evas_object_data_del(page, "win"); evas_object_data_del(page, "layout"); evas_object_data_del(page, "controlbar"); evas_object_data_del(page, "tab"); evas_object_data_del(page, "scroller"); evas_object_data_del(page, "page_edje"); evas_object_data_del(page, "page_max_app"); evas_object_data_del(page, "bg"); evas_object_data_del(page, "pending,list"); evas_object_data_del(page, "dirty"); layout_unload_edj(page); }
/** * @brief Finds an object in the cache according to its filename and its key. If the object is present in the cache, * it will be removed from the cache and returned. Otherwise NULL is returned * @param cache the cache system where to find the object * @param filename the filename of the object to find * @param key the key associated to the object to find (the group for an Edje object, the key for an image from an * Eet file, or NULL otherwise) * @return Returns an object corresponding to the given filename and key, or NULL if no such object is cached */ Evas_Object *etk_cache_find(Etk_Cache *cache, const char *filename, const char *key) { Etk_Cache_Item *item; Eina_List *l; Evas_Object *object; if (!cache || !filename) return NULL; for (l = cache->cached_objects; l; l = l->next) { item = l->data; if (strcmp(item->filename, filename) == 0 && (strcmp(item->key ? item->key : "", key ? key : "") == 0)) { object = item->object; evas_object_data_del(object, "_Etk_Cache::Node"); evas_object_event_callback_del(object, EVAS_CALLBACK_FREE, _etk_cache_object_deleted_cb); free(item->filename); free(item->key); free(item); cache->cached_objects = eina_list_remove(cache->cached_objects, item); return object; } } return NULL; }
static void _gc_shutdown(E_Gadcon_Client *gcc) { Instance *inst; Forecasts *w; inst = gcc->data; w = inst->forecasts; if (inst->popup) _forecasts_popup_destroy(inst); if (inst->check_timer) ecore_timer_del(inst->check_timer); if (inst->add_handler) ecore_event_handler_del(inst->add_handler); if (inst->data_handler) ecore_event_handler_del(inst->data_handler); if (inst->del_handler) ecore_event_handler_del(inst->del_handler); if (inst->server) ecore_con_server_del(inst->server); if (inst->area) eina_stringshare_del(inst->area); eina_strbuf_free(inst->buffer); inst->server = NULL; forecasts_config->instances = eina_list_remove(forecasts_config->instances, inst); evas_object_event_callback_del(w->forecasts_obj, EVAS_CALLBACK_MOUSE_DOWN, _forecasts_cb_mouse_down); _forecasts_free(w); E_FREE(inst); }
static void _gc_shutdown(E_Gadcon_Client *gcc) { Instance *inst; inst = gcc->data; exalt_config->instances = evas_list_remove(exalt_config->instances, inst); if (exalt_config->menu) { e_menu_post_deactivate_callback_set(exalt_config->menu, NULL, NULL); e_menu_pre_activate_callback_set(exalt_config->menu, NULL, NULL); e_object_del(E_OBJECT(exalt_config->menu)); exalt_config->menu = NULL; } if (inst->o_button) { evas_object_event_callback_del(inst->o_button, EVAS_CALLBACK_MOUSE_DOWN, _cb_mouse_down); evas_object_del(inst->o_button); } exalt_dbus_notify_set( exalt_config->conn, NULL, NULL); E_FREE(inst); }
static void _e_wid_del_hook(Evas_Object *obj) { E_Widget_Data *wd; E_Pointer *p; if (!(obj) || (!(wd = e_widget_data_get(obj)))) return; evas_object_event_callback_del(wd->o_inout, EVAS_CALLBACK_MOUSE_IN, _e_wid_in); evas_object_event_callback_del(wd->o_inout, EVAS_CALLBACK_MOUSE_OUT, _e_wid_out); p = e_widget_pointer_get(obj); if (p) e_pointer_type_pop(p, obj, NULL); evas_object_del(wd->o_entry); evas_object_del(wd->o_inout); wd->o_entry = NULL; wd->o_inout = NULL; free(wd); }
static void _gc_shutdown (E_Gadcon_Client * gcc) { Instance *inst; inst = gcc->data; if (inst->update_timer) ecore_timer_del (inst->update_timer); _mpdule_disconnect (inst); mpdule_config->instances = eina_list_remove (mpdule_config->instances, inst); evas_object_event_callback_del (inst->mpdule, EVAS_CALLBACK_MOUSE_DOWN, _mpdule_cb_mouse_down); evas_object_event_callback_del (inst->mpdule, EVAS_CALLBACK_MOUSE_IN, _mpdule_cb_mouse_in); evas_object_event_callback_del (inst->mpdule, EVAS_CALLBACK_MOUSE_OUT, _mpdule_cb_mouse_out); _mpdule_popup_destroy (inst); evas_object_del (inst->mpdule); free (inst); inst = NULL; }
void erss_tooltip_free(Erss_Article *item) { Erss_Tooltip *tt; /* get rid of our callbacks */ evas_object_event_callback_del (item->obj, EVAS_CALLBACK_MOUSE_IN, erss_tooltip_mouse_in); tt = evas_object_event_callback_del (item->obj, EVAS_CALLBACK_MOUSE_OUT, erss_tooltip_mouse_out); if (tt==NULL) { return; } evas_object_event_callback_del (tt->etox, EVAS_CALLBACK_MOUSE_UP, erss_tooltip_mouse_clicked); evas_object_event_callback_del (tt->bg, EVAS_CALLBACK_MOUSE_UP, erss_tooltip_mouse_clicked); /* then lose the ecore_evas */ ecore_evas_free(tt->ee); ecore_x_window_free(tt->win); /* finally free the damn thing */ memset(tt,0,sizeof(Erss_Tooltip)); free(tt); }
static void _gc_shutdown (E_Gadcon_Client * gcc) { Instance *inst; inst = gcc->data; if (inst->check_timer) ecore_timer_del (inst->check_timer); evas_object_event_callback_del (inst->mail_obj, EVAS_CALLBACK_MOUSE_DOWN, _mail_cb_mouse_down); evas_object_event_callback_del (inst->mail_obj, EVAS_CALLBACK_MOUSE_IN, _mail_cb_mouse_in); evas_object_event_callback_del (inst->mail_obj, EVAS_CALLBACK_MOUSE_OUT, _mail_cb_mouse_out); if (inst->popup) e_object_del (E_OBJECT (inst->popup)); mail_config->instances = eina_list_remove (mail_config->instances, inst); _mail_free (inst->mail); free (inst); inst = NULL; }
/** * @brief Adds an Evas image object or an Edje object in the cache system. If the cache is already full, the oldest * object will be removed. The object to cache will also be automatically hidden * @param cache a cache system * @param object the Evas image object or the Edje object to cache * @param filename the filename associated to the object * @param key the key associated to the object (the group for an Edje object, the key for an image from an Eet file, * or NULL otherwise) * @note Once the object is added to the cache, you should keep no reference to it. It may for example be deleted if * there is no more space in the cache system */ void etk_cache_add(Etk_Cache *cache, Evas_Object *object, const char *filename, const char *key) { Etk_Cache_Item *item; Eina_List *l; if (!cache || !object || cache->size <= 0 || !filename) return; /* If the object is already cached, we move it at the end of the cache */ if ((l = evas_object_data_get(object, "_Etk_Cache::Node"))) { item = l->data; if (item->filename != filename) { free(item->filename); item->filename = strdup(filename); } if (item->key != key) { free(item->key); item->key = strdup(key); } cache->cached_objects = eina_list_remove_list(cache->cached_objects, l); cache->cached_objects = eina_list_append(cache->cached_objects, item); evas_object_data_set(item->object, "_Etk_Cache::Node", eina_list_last(cache->cached_objects)); return; } /* If no more space is available, we remove the oldest object of the cache */ if (eina_list_count(cache->cached_objects) >= cache->size) { item = cache->cached_objects->data; //evas_object_event_callback_call(item->object, EVAS_CALLBACK_FREE, NULL); evas_object_event_callback_del(item->object, EVAS_CALLBACK_FREE, _etk_cache_object_deleted_cb); evas_object_del(item->object); } /* We create a new cache-item for the object and we add it to the cache */ item = malloc(sizeof(Etk_Cache_Item)); item->filename = strdup(filename); item->key = key ? strdup(key) : NULL; item->object = object; evas_object_hide(object); evas_object_event_callback_add(object, EVAS_CALLBACK_FREE, _etk_cache_object_deleted_cb, cache); cache->cached_objects = eina_list_append(cache->cached_objects, item); evas_object_data_set(item->object, "_Etk_Cache::Node", eina_list_last(cache->cached_objects)); }
static void destroy_gui_list(app_t *app) { if (!app->evas_items) return; e_box_freeze(app->e_box); while (app->n_evas_items > 0) { Evas_Object *obj; app->n_evas_items--; obj = app->evas_items[app->n_evas_items]; e_box_unpack(obj); evas_object_del(obj); } e_box_thaw(app->e_box); free(app->evas_items); app->evas_items = NULL; evas_object_event_callback_del(app->arrow_up, EVAS_CALLBACK_MOUSE_DOWN, mouse_down_arrow_up); evas_object_event_callback_del(app->arrow_up, EVAS_CALLBACK_MOUSE_UP, mouse_up_arrow_up); evas_object_event_callback_del(app->arrow_down, EVAS_CALLBACK_MOUSE_DOWN, mouse_down_arrow_down); evas_object_event_callback_del(app->arrow_down, EVAS_CALLBACK_MOUSE_UP, mouse_up_arrow_down); }
EAPI void e_scrollframe_child_set(Evas_Object *obj, Evas_Object *child) { Evas_Object *o; API_ENTRY return; if (sd->child_obj) { if (sd->pan_obj) { e_pan_child_set(sd->pan_obj, NULL); evas_object_event_callback_del(sd->child_obj, EVAS_CALLBACK_FREE, _e_smart_child_del_hook); } } sd->child_obj = child; if (!child) return; if (!sd->pan_obj) { o = e_pan_add(evas_object_evas_get(obj)); sd->pan_obj = o; evas_object_smart_callback_add(o, "changed", _e_smart_pan_changed_hook, sd); evas_object_smart_callback_add(o, "pan_changed", _e_smart_pan_pan_changed_hook, sd); evas_object_show(o); edje_object_part_swallow(sd->edje_obj, "e.swallow.content", o); } sd->pan_func.set = e_pan_set; sd->pan_func.get = e_pan_get; sd->pan_func.max_get = e_pan_max_get; sd->pan_func.child_size_get = e_pan_child_size_get; evas_object_event_callback_add(child, EVAS_CALLBACK_FREE, _e_smart_child_del_hook, sd); e_pan_child_set(sd->pan_obj, sd->child_obj); sd->pan_func.child_size_get(sd->pan_obj, &sd->child.w, &sd->child.h); _e_smart_scrollbar_size_adjust(sd); _e_smart_scrollbar_reset(sd); }
static void _e_layout_smart_disown(Evas_Object *obj) { E_Layout_Item *li; li = evas_object_data_get(obj, "e_layout_data"); if (!li) return; if (!li->sd->items) { if (evas_object_visible_get(li->sd->clip)) evas_object_hide(li->sd->clip); } evas_object_event_callback_del(obj, EVAS_CALLBACK_FREE, _e_layout_smart_item_del_hook); evas_object_smart_member_del(obj); evas_object_data_del(obj, "e_layout_data"); free(li); }
static void _gc_shutdown(E_Gadcon_Client *gcc) { Instance *inst; inst = gcc->data; net_cfg->instances = eina_list_remove(net_cfg->instances, inst); if (inst->timer) ecore_timer_del(inst->timer); if (inst->o_net) { evas_object_event_callback_del(inst->o_net, EVAS_CALLBACK_MOUSE_DOWN, _net_cb_mouse_down); edje_object_signal_callback_del(inst->o_net, "e,action,mouse,in", "", _net_cb_mouse_in); edje_object_signal_callback_del(inst->o_net, "e,action,mouse,out", "", _net_cb_mouse_out); evas_object_del(inst->o_net); } E_FREE(inst); }
/** * @brief Removes an object from the cache. The object won't be destroyed. * @param cache a cache system * @param object the object to remove from the cache system */ void etk_cache_remove(Etk_Cache *cache, Evas_Object *object) { Etk_Cache_Item *item; Eina_List *l; if (!cache || !object) return; if ((l = evas_object_data_get(object, "_Etk_Cache::Node"))) { item = l->data; evas_object_data_del(object, "_Etk_Cache::Node"); evas_object_event_callback_del(object, EVAS_CALLBACK_FREE, _etk_cache_object_deleted_cb); free(item->filename); free(item->key); free(item); cache->cached_objects = eina_list_remove_list(cache->cached_objects, l); } }
static void _gc_shutdown (E_Gadcon_Client * gcc) { Instance *inst; Uptime *ut; if (!gcc) return; if (!gcc->data) return; inst = gcc->data; if (!(ut = inst->ut)) return; if (inst->monitor) ecore_timer_del (inst->monitor); ut_config->instances = eina_list_remove (ut_config->instances, inst); evas_object_event_callback_del (ut->ut_obj, EVAS_CALLBACK_MOUSE_DOWN, _ut_cb_mouse_down); _ut_free (ut); free (inst); inst = NULL; }
static void _gc_shutdown(E_Gadcon_Client *gcc) { Instance *inst; inst = gcc->data; inst->ci->inst = NULL; weather_cfg->instances = eina_list_remove(weather_cfg->instances, inst); if (inst->menu) { e_menu_post_deactivate_callback_set(inst->menu, NULL, NULL); e_object_del(E_OBJECT(inst->menu)); inst->menu = NULL; } if (inst->obj) { evas_object_event_callback_del(inst->obj, EVAS_CALLBACK_MOUSE_DOWN, _gc_cb_mouse_down); evas_object_del(inst->obj); } E_FREE(inst); }
void Object::unregisterCallbacks () { evas_object_event_callback_del (o, EVAS_CALLBACK_MOUSE_IN, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_MOUSE_OUT, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_MOUSE_DOWN, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_MOUSE_UP, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_MOUSE_MOVE, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_MOUSE_WHEEL, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_KEY_DOWN, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_KEY_UP, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_FREE, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_SHOW, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_HIDE, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_MOVE, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_RESIZE, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_RESTACK, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_DEL, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_HOLD, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, dispatcher); evas_object_event_callback_del (o, EVAS_CALLBACK_IMAGE_PRELOADED, dispatcher); }