/** * Close anything opened by this module */ Eina_Bool uninit(DB *db) { EINA_SAFETY_ON_NULL_RETURN_VAL(db, EINA_FALSE); INF("Uninitializing source 'zrpcdb'"); if (db->config) db_config_free(db->config); if (db->e){ INF("Connection pool teardown for 'zrpcdb'"); esql_free(db->e); INF("Uninitialization of source 'zrpcdb' complete"); } if (--init_count == 0){ ecore_event_handler_del(zrpc_res); zrpc_res = NULL; ecore_event_handler_del(zrpc_err); zrpc_err = NULL; } if (type_cbs) eina_hash_free(type_cbs); type_cbs = NULL; if (db_cbs) eina_hash_free(db_cbs); db_cbs = NULL; if (db_cb_params) eina_hash_free(db_cb_params); db_cb_params = NULL; esql_shutdown(); eina_shutdown(); return EINA_TRUE; }
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); }
/** * Module specific face freeing. * * It is called when a face is freed. * * @param data the pointer you passed to e_gadget_new(). * @param face a pointer to your E_Gadget_Face. * @ingroup Emu_Module_Gadget_Group */ static void _gc_shutdown(E_Gadcon_Client *gcc) { Emu_Face *emu_face; emu_face = gcc->data; if (emu_face) { eina_hash_foreach(emu_face->menus, _emu_menus_hash_cb_free, NULL); eina_hash_free(emu_face->menus); emu_face->menus = NULL; if (emu_face->read) ecore_event_handler_del(emu_face->read); if (emu_face->add) ecore_event_handler_del(emu_face->add); if (emu_face->del) ecore_event_handler_del(emu_face->del); if (emu_face->exe) ecore_exe_terminate(emu_face->exe); if (emu_face->command) eina_stringshare_del(emu_face->command); evas_object_del(emu_face->o_button); E_FREE(emu_face); } }
Eina_Bool alert_command_run(void *data) { Module_Alert_Command *mac = data; #define _EV(_a, _b, _c, _d) _a = ecore_event_handler_add(ECORE_EXE_EVENT_##_b, _c, _d) _EV(mac->ev.data, DATA, _alert_command_data, mac); EINA_SAFETY_ON_NULL_RETURN_VAL(mac->ev.data, EINA_TRUE); _EV(mac->ev.del, DEL, _alert_command_del, mac); EINA_SAFETY_ON_NULL_GOTO(mac->ev.del, del_data); _EV(mac->ev.error, ERROR, _alert_command_error, mac); EINA_SAFETY_ON_NULL_GOTO(mac->ev.error, del_del); #undef _EV mac->buf = eina_strbuf_new(); EINA_SAFETY_ON_NULL_GOTO(mac->buf, del_error); mac->exe = ecore_exe_pipe_run(mac->command->command, ECORE_EXE_PIPE_READ, mac); EINA_SAFETY_ON_NULL_GOTO(mac->exe, free_buf); ecore_exe_data_set(mac->exe, mac); return EINA_TRUE; free_buf: eina_strbuf_free(mac->buf); del_error: ecore_event_handler_del(mac->ev.error); del_del: ecore_event_handler_del(mac->ev.del); del_data: ecore_event_handler_del(mac->ev.data); return EINA_TRUE; }
/** * @brief Free an #Azy_Client * * This function frees a client and ALL associated data. If called * on a connected client, azy_client_close will be called and then the client * will be freed. * @param client The client (NOT NULL) */ void azy_client_free(Azy_Client *client) { DBG("(client=%p)", client); if (!AZY_MAGIC_CHECK(client, AZY_MAGIC_CLIENT)) { AZY_MAGIC_FAIL(client, AZY_MAGIC_CLIENT); return; } if (client->connected) azy_client_close(client); AZY_MAGIC_SET(client, AZY_MAGIC_NONE); if (client->addr) eina_stringshare_del(client->addr); if (client->session_id) eina_stringshare_del(client->session_id); if (client->add) ecore_event_handler_del(client->add); if (client->del) ecore_event_handler_del(client->del); if (client->upgrade) ecore_event_handler_del(client->upgrade); if (client->callbacks) eina_hash_free(client->callbacks); if (client->free_callbacks) eina_hash_free(client->free_callbacks); if (client->conns) client->conns = eina_list_free(client->conns); free(client); }
//Pop down the menu and its childrend void eclair_menu_pop_down(Eclair_Menu *menu) { Eina_List *l; Eclair_Menu_Item *item; if (!menu) return; for (l = menu->items; l; l = l->next) { if (!(item = l->data)) continue; eclair_menu_item_deactivate(item); } ecore_evas_hide(menu->window); if (menu == _eclair_menu_root) { ecore_x_keyboard_ungrab(); ecore_x_pointer_ungrab(); ecore_x_window_hide(_eclair_menu_input_window); ecore_event_handler_del(_eclair_menu_mouse_up_handler); ecore_event_handler_del(_eclair_menu_mouse_move_handler); _eclair_menu_root = NULL; } _eclair_menu_popped_menus = eina_list_remove(_eclair_menu_popped_menus, menu); }
void _alert_command_clean(Module_Alert_Command *mac) { eina_strbuf_free(mac->buf); ecore_event_handler_del(mac->ev.data); ecore_event_handler_del(mac->ev.del); ecore_event_handler_del(mac->ev.error); }
/** * @brief Frees a Store_Add structure. * @param sa Store_Add structure to free. */ void store_add_free(Store_Add *sa) { if (sa->ec) ecore_con_url_free(sa->ec); if (sa->data.buf) eina_strbuf_free(sa->data.buf); if (sa->ev.ed) ecore_event_handler_del(sa->ev.ed); if (sa->ev.ec) ecore_event_handler_del(sa->ev.ec); free(sa); }
static void _backlight_input_win_del(Instance *inst) { e_grabinput_release(0, inst->input_win); ecore_x_window_free(inst->input_win); inst->input_win = 0; ecore_event_handler_del(inst->hand_mouse_down); inst->hand_mouse_down = NULL; ecore_event_handler_del(inst->hand_key_down); inst->hand_key_down = NULL; }
void _command_service_free(Command_Service *cs) { ecore_event_handler_del(cs->ev.error); ecore_event_handler_del(cs->ev.del); ecore_event_handler_del(cs->ev.data); eina_strbuf_free(cs->buf); free((char *)cs->jid); free(cs); }
static void _elm_url_free(Elm_Url *r) { ecore_con_url_free(r->target); eina_binbuf_free(r->download); ecore_event_handler_del(r->handler.progress); ecore_event_handler_del(r->handler.done); ecore_event_handler_del(r->handler.data); eina_stringshare_del(r->url); free(r); }
FileDownloader::~FileDownloader() { cb_connection.disconnect(); cb_connection_user.disconnect(); ecore_event_handler_del(complete_handler); ecore_event_handler_del(progress_handler); Cancel(); ecore_con_url_shutdown(); }
HttpServer::~HttpServer() { ecore_con_server_del(tcp_server); tcp_server = NULL; ecore_event_handler_del(event_handler_client_add); ecore_event_handler_del(event_handler_client_del); ecore_event_handler_del(event_handler_data_get); ecore_event_handler_del(event_handler_client_write); cDebugDom("network"); }
CalaosCameraView::~CalaosCameraView() { if (ecurl) ecore_con_url_free(ecurl); DelMemberObject(clip); evas_object_del(clip); DelMemberObject(camImage); evas_object_del(camImage); ecore_event_handler_del(handler_data); ecore_event_handler_del(handler_complete); }
EAPI int elm_main(int argc, char **argv) { Evas_Object *win, *o, *bg, *box; Ecore_Event_Handler *handle_key_up, *handle_key_down; win = elm_win_add(NULL, "elm_event", ELM_WIN_BASIC); elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); elm_win_autodel_set(win, EINA_TRUE); o = elm_bg_add(win); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, o); evas_object_show(o); box = elm_box_add(win); elm_box_horizontal_set(box, EINA_FALSE); evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_win_resize_object_add(win, box); evas_object_show(box); o = elm_entry_add(win); elm_entry_single_line_set(o, EINA_TRUE); elm_entry_entry_set(o, "123ab456"); elm_box_pack_end(box, o); evas_object_show(o); o = elm_button_add(win); elm_object_text_set(o, "Test"); elm_box_pack_end(box, o); evas_object_show(o); handle_key_up = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _input_event_cb, NULL); handle_key_down = ecore_event_handler_add(ECORE_EVENT_KEY_UP, _input_event_cb, NULL); evas_object_resize(win, 300, 300); evas_object_show(win); elm_run(); if (handle_key_up) ecore_event_handler_del(handle_key_up); if (handle_key_down) ecore_event_handler_del(handle_key_down); elm_shutdown(); return 0; }
void ecore_file_download_shutdown(void) { #ifdef BUILD_ECORE_CON if (_url_complete_handler) ecore_event_handler_del(_url_complete_handler); if (_url_progress_download) ecore_event_handler_del(_url_progress_download); _url_complete_handler = NULL; _url_progress_download = NULL; ecore_file_download_abort_all(); ecore_con_url_shutdown(); #endif /* BUILD_ECORE_CON */ }
void enfeeble_disconnect(Enfeeble *enf) { if (!enf) return; if (enf->ev_add) ecore_event_handler_del(enf->ev_add); if (enf->ev_del) ecore_event_handler_del(enf->ev_del); if (enf->ev_data) ecore_event_handler_del(enf->ev_data); if (enf->ev_error) ecore_event_handler_del(enf->ev_error); if (enf->svr) ecore_con_server_del(enf->svr); enf->ev_add = NULL; enf->ev_del = NULL; enf->ev_data = NULL; enf->ev_error = NULL; enf->svr = NULL; }
int main(int argc, char *argv[]) { const char *url; int args = 1; if (!ecore_evas_init()) return EXIT_FAILURE; if (args < argc) url = argv[args]; else url = DEFAULT_URL; MiniBrowser *browser = browserCreate(url); Ecore_Event_Handler *handle = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, main_signal_exit, 0); ecore_main_loop_begin(); ecore_event_handler_del(handle); ecore_evas_free(browser->ee); free(browser); ecore_evas_shutdown(); return 0; }
int main(int argc, char **argv) { ecore_dbus_init(); svr = ecore_dbus_server_system_connect(NULL); if (!svr) { printf("Couldn't connect to dbus system server!\n"); } else { int i = 0; Ecore_Event_Handler *handler[3]; printf("Connected!\n"); handler[i++] = ecore_event_handler_add(ECORE_DBUS_EVENT_SERVER_ADD, ecore_dbus_event_server_add, NULL); handler[i++] = ecore_event_handler_add(ECORE_DBUS_EVENT_SERVER_DEL, ecore_dbus_event_server_del, NULL); handler[i++] = ecore_event_handler_add(ECORE_DBUS_EVENT_SIGNAL, ecore_dbus_event_server_signal, NULL); ecore_main_loop_begin(); for (i = 0; i < 3; i++) ecore_event_handler_del(handler[i]); if (svr) ecore_dbus_server_del(svr); } ecore_dbus_shutdown(); return 0; }
void sourcedrop_shutdown(void) { ecore_event_handler_del(handler); handler = NULL; ecore_con_shutdown(); ecore_shutdown(); }
void e_syscon_hide(void) { if (!popup) return; if (deftimer) { ecore_timer_del(deftimer); deftimer = NULL; } if (do_defact) eina_stringshare_del(do_defact); do_defact = NULL; while (handlers) { ecore_event_handler_del(handlers->data); handlers = eina_list_remove_list(handlers, handlers); } e_popup_hide(popup); e_object_del(E_OBJECT(popup)); popup = NULL; e_grabinput_release(input_window, input_window); ecore_x_window_free(input_window); input_window = 0; o_selected_flow = o_selected = o_flow_extra = o_flow_main = o_flow_secondary = NULL; }
EINTERN int e_backlight_shutdown(void) { const char *s; if (bl_anim) ecore_animator_del(bl_anim); bl_anim = NULL; if (e_config->backlight.mode != E_BACKLIGHT_MODE_NORMAL) e_backlight_level_set(NULL, e_config->backlight.normal, 0.0); EINA_LIST_FREE(bl_devs, s) eina_stringshare_del(s); #ifdef HAVE_EEZE if (bl_sysval) eina_stringshare_del(bl_sysval); bl_sysval = NULL; if (bl_sys_exit_handler) ecore_event_handler_del(bl_sys_exit_handler); bl_sys_exit_handler = NULL; bl_sys_set_exe = NULL; bl_sys_pending_set = EINA_FALSE; eeze_shutdown(); #endif return 1; }
/** * @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; }
static void _wkb_ibus_shutdown_finish(void) { DBG("Finish"); ecore_event_handler_del(wkb_ibus->add_handle); ecore_event_handler_del(wkb_ibus->data_handle); free(wkb_ibus); wkb_ibus = NULL; ecore_main_loop_quit(); wkb_ibus_config_eet_shutdown(); efreet_shutdown(); eldbus_shutdown(); }
EINTERN int e_msg_shutdown(void) { while (handlers) e_msg_handler_del(eina_list_data_get(handlers)); E_EVENT_MSG = 0; if (hand) ecore_event_handler_del(hand); hand = NULL; return 1; }
static void _shutdown(EWeather *eweather) { Instance *inst = eweather->plugin.data; if (inst->host) eina_stringshare_del(inst->host); if (inst->buffer) free(inst->buffer); 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->err_handler) ecore_event_handler_del(inst->err_handler); if (inst->del_handler) ecore_event_handler_del(inst->del_handler); if (inst->server) ecore_con_server_del(inst->server); ecore_con_shutdown(); free(inst); }
void _ecore_drm_logind_disconnect(Ecore_Drm_Device *dev) { if (active_hdlr) ecore_event_handler_del(active_hdlr); active_hdlr = NULL; _ecore_drm_logind_vt_destroy(dev); _ecore_drm_dbus_session_release(); _ecore_drm_dbus_shutdown(); }
static Eina_Bool _mail_cb_exe_exit (void *data, int type, void *event) { Config_Box *cb; cb = data; if (!cb) return EINA_FALSE; cb->exe = NULL; ecore_event_handler_del (exit_handler); return EINA_FALSE; }
static void _ecore_con_info_slave_free(CB_Data *cbdata) { info_slaves = (CB_Data *)eina_inlist_remove(EINA_INLIST_GET(info_slaves), EINA_INLIST_GET(cbdata)); ecore_main_fd_handler_del(cbdata->fdh); ecore_event_handler_del(cbdata->handler); close(ecore_main_fd_handler_fd_get(cbdata->fdh)); if (cbdata->data) ecore_con_server_infos_del(cbdata->data, cbdata); free(cbdata); }
EINTERN int e_sys_shutdown(void) { if (_e_sys_exe_exit_handler) ecore_event_handler_del(_e_sys_exe_exit_handler); _e_sys_exe_exit_handler = NULL; _e_sys_halt_check_exe = NULL; _e_sys_reboot_check_exe = NULL; _e_sys_suspend_check_exe = NULL; _e_sys_hibernate_check_exe = NULL; return 1; }