• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ecore_event_handler_add函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中ecore_event_handler_add函数的典型用法代码示例。如果您正苦于以下问题:C++ ecore_event_handler_add函数的具体用法?C++ ecore_event_handler_add怎么用?C++ ecore_event_handler_add使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了ecore_event_handler_add函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int
main()
{
   Ecore_Con_Server *svr;
   eina_init();
   ecore_init();
   ecore_con_init();

/* comment if not using gnutls */
   gnutls_global_set_log_level(9);
   gnutls_global_set_log_function(tls_log_func);

/* to use a PEM certificate with TLS and SSL3, uncomment the lines below */
   if (!(svr = ecore_con_server_add(ECORE_CON_REMOTE_TCP | ECORE_CON_USE_TLS | ECORE_CON_USE_SSL3 | ECORE_CON_LOAD_CERT, "127.0.0.1", 8080, NULL)))
/* to use simple tcp with ssl/tls, use this line */
//   if (!ecore_con_server_add(ECORE_CON_REMOTE_TCP | ECORE_CON_USE_SSL3, "127.0.0.1", 8080, NULL))
     exit(1);

   ecore_con_ssl_server_cert_add(svr, "server.pem");
   ecore_con_ssl_server_privkey_add(svr, "server.pem");
/* set event handler for client connect */
   ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_ADD, (Ecore_Event_Handler_Cb)_add, NULL);
/* set event handler for client disconnect */
   ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DEL, (Ecore_Event_Handler_Cb)_del, NULL);
/* set event handler for receiving client data */
   ecore_event_handler_add(ECORE_CON_EVENT_CLIENT_DATA, (Ecore_Event_Handler_Cb)_data, NULL);

/* start server */
   ecore_main_loop_begin();
}
开发者ID:Limsik,项目名称:e17,代码行数:30,代码来源:ecore_con_server_example.c


示例2: document_create

static void * document_create(Eon_Document *d, const char *options)
{
	Ecore_Ipc_Server *srv;

	printf("[REMOTE] Initializing engine\n");

	ecore_init();
	ecore_ipc_init();
	srv = ecore_ipc_server_connect(ECORE_IPC_LOCAL_SYSTEM, "eon-remote", 0, NULL);
	if (!srv)
	{
		/* FIXME add a good way to tell the system that the creation
		 * failed
		 */
		exit(1);
	}
	rdoc = calloc(1, sizeof(Engine_Remote_Document));
	ekeko_event_listener_add(d, EON_DOCUMENT_OBJECT_NEW, _object_new_cb, EINA_FALSE, NULL);

	ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD,
		handler_server_add, NULL);
	ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DEL,
		handler_server_del, NULL);
	ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DATA,
		handler_server_data, NULL);

	rdoc->srv = srv;
	return rdoc;
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:29,代码来源:remote_engine.c


示例3: _init

static void _init(EWeather *eweather)
{
   Instance *inst = calloc(1, sizeof(Instance));
   eweather->plugin.data = inst;
   inst->weather = eweather;
   inst->host = eina_stringshare_add("www.google.com");

   printf("INIT %d\n",ecore_con_init());

   inst->add_handler =
      ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD,
	    _server_add, inst);
   inst->del_handler =
      ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL,
	    _server_del, inst);
   inst->err_handler =
      ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ERROR,
	    _server_error, inst);
   inst->data_handler =
      ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
	    _server_data, inst);

   inst->check_timer =
      ecore_timer_add(0, _weather_cb_check, inst);
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:25,代码来源:google.c


示例4: ref_count

AVReceiver::AVReceiver(Params &p, int default_port, int _connection_type):
    ref_count(0),
    params(p),
    econ(NULL),
    timer_con(NULL),
    isConnected(false),
    volume_main(0),
    volume_zone2(0),
    volume_zone3(0),
    power_main(false),
    power_zone2(false),
    power_zone3(false),
    source_main(0),
    source_zone2(0),
    source_zone3(0),
    connection_type(_connection_type)
{
    cDebugDom("output") << params["id"];

    if (!params.Exists("visible")) params.Add("visible", "false");

    host = params["host"];
    port = default_port;

    if (params.Exists("port"))
        from_string(params["port"], port);

    ehandler_add = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD, (Ecore_Event_Handler_Cb)_con_server_add, this);
    ehandler_del = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL, (Ecore_Event_Handler_Cb)_con_server_del, this);
    ehandler_data = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA, (Ecore_Event_Handler_Cb)_con_server_data, this);

    timerConnReconnect();
    timer_con = new EcoreTimer(AVR_RECONNECT, (sigc::slot<void>)sigc::mem_fun(*this, &AVReceiver::timerConnReconnect));
}
开发者ID:expertisesolutions,项目名称:calaos_base,代码行数:34,代码来源:AVReceiver.cpp


示例5: main

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;
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:34,代码来源:ecore_dbus_hal_test.c


示例6: _backlight_input_win_new

static void
_backlight_input_win_new(Instance *inst)
{
   Ecore_X_Window_Configure_Mask mask;
   Ecore_X_Window w, popup_w;
   E_Manager *man;
   
   man = inst->gcc->gadcon->zone->container->manager;
   
   w = ecore_x_window_input_new(man->root, 0, 0, man->w, man->h);
   mask = (ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE |
           ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING);
   popup_w = inst->popup->win->evas_win;
   ecore_x_window_configure(w, mask, 0, 0, 0, 0, 0, popup_w,
                            ECORE_X_WINDOW_STACK_BELOW);
   ecore_x_window_show(w);
   
   inst->hand_mouse_down =
      ecore_event_handler_add(ECORE_EVENT_MOUSE_BUTTON_DOWN,
                              _backlight_input_win_mouse_down_cb, inst);
   inst->hand_key_down =
      ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
                              _backlight_input_win_key_down_cb, inst);
   inst->input_win = w;
   e_grabinput_get(0, 0, inst->input_win);
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:26,代码来源:e_mod_main.c


示例7: eclair_menu_popup_at_xy

//Popup the menu at the position (x, y)
void eclair_menu_popup_at_xy(Eclair_Menu *menu, int x, int y)
{
   if (!menu)
      return;

   if (!_eclair_menu_input_window)
   {
      Ecore_X_Window root, parent;
      int root_x, root_y, root_w, root_h;

      root = menu->x_window;
      while ((parent = ecore_x_window_parent_get(root)) != 0)
         root = parent;
 
      ecore_x_window_geometry_get(root, &root_x, &root_y, &root_w, &root_h);
      _eclair_menu_input_window = ecore_x_window_input_new(root, root_x, root_y, root_w, root_h);
   }
   if (!_eclair_menu_root)
   {
      _eclair_menu_mouse_up_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, _eclair_menu_mouse_up_cb, menu);
      _eclair_menu_mouse_move_handler = ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, _eclair_menu_mouse_move_cb, menu);
      ecore_x_window_show(_eclair_menu_input_window);
      ecore_x_keyboard_grab(_eclair_menu_input_window);
      ecore_x_pointer_confine_grab(_eclair_menu_input_window);

      _eclair_menu_root = menu;
   }
   ecore_evas_move(menu->window, x, y);
   ecore_evas_show(menu->window);
   evas_event_feed_mouse_move(menu->evas, -100000, -100000, ecore_x_current_time_get(), NULL);
   evas_event_feed_mouse_in(menu->evas, ecore_x_current_time_get(), NULL);
   _eclair_menu_popped_menus = eina_list_append(_eclair_menu_popped_menus, menu);

   _eclair_menu_update_slide_timer(menu);
}
开发者ID:playya,项目名称:Enlightenment,代码行数:36,代码来源:eclair_menu.c


示例8: main

int
main(void)
{
   Esql *e;
   struct ctx ctx = {0, 0, 0};

   ecore_init();
   esql_init();

   eina_log_domain_level_set("esskyuehl", EINA_LOG_LEVEL_DBG);

   e = esql_new(ESQL_TYPE_SQLITE);
   assert(e != NULL);

   ecore_event_handler_add(ESQL_EVENT_CONNECT, on_connect, &ctx);
   ecore_event_handler_add(ESQL_EVENT_ERROR, on_error, &ctx);

   assert(esql_connect(e, ":memory:", NULL, NULL));

   ecore_main_loop_begin();
   esql_disconnect(e);

   esql_shutdown();
   ecore_shutdown();

   assert(ctx.conns == 1);
   assert(ctx.errors == 0);
   assert(ctx.res == 2 + INSERTED_ROWS);

   return 0;
}
开发者ID:carloslack,项目名称:esskyuehl,代码行数:31,代码来源:test_sqlite.c


示例9: main

int
main(void)
{
   double done;
   eina_init();
   ecore_init();
   ecore_con_init();

   eina_log_domain_level_set("ecore_con", EINA_LOG_LEVEL_ERR);
   eina_log_domain_level_set("eina", EINA_LOG_LEVEL_ERR);
   counter = eina_counter_new("client");
   eina_counter_start(counter);
   done = ecore_time_get();

   ecore_job_add(_spawn, NULL);

/* set event handler for server connect */
   ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD, (Ecore_Event_Handler_Cb)_add, NULL);
   ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD, (Ecore_Event_Handler_Cb)_del, NULL);

/* start client */
   ecore_main_loop_begin();
   eina_counter_stop(counter, 1);
   printf("\nTime elapsed for %i connections: %f seconds\n%s", NUM_CLIENTS, ecore_time_get() - done, eina_counter_dump(counter));
   return 0;
}
开发者ID:jigpu,项目名称:efl,代码行数:26,代码来源:ecore_client_bench.c


示例10: _e_fm_ipc_init

/* local subsystem functions */
int
_e_fm_ipc_init(void)
{
   char *sdir;

   sdir = getenv("E_IPC_SOCKET");
   if (!sdir)
     {
        printf("The E_IPC_SOCKET environment variable is not set. This is\n"
               "exported by Enlightenment to all processes it launches.\n"
               "This environment variable must be set and must point to\n"
               "Enlightenment's IPC socket file (minus port number).\n");
        return 0;
     }
   _e_fm_ipc_server = ecore_ipc_server_connect(ECORE_IPC_LOCAL_SYSTEM, sdir, 0, NULL);
   if (!_e_fm_ipc_server)
     {
        printf("Cannot connect to enlightenment (socket '%s') - abort\n", sdir);
        return 0;
     }

   ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_ADD, _e_fm_ipc_cb_server_add, NULL);
   ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DEL, _e_fm_ipc_cb_server_del, NULL);
   ecore_event_handler_add(ECORE_IPC_EVENT_SERVER_DATA, _e_fm_ipc_cb_server_data, NULL);

   return 1;
}
开发者ID:FlorentRevest,项目名称:Enlightenment,代码行数:28,代码来源:e_fm_ipc.c


示例11: efl_egueb_io_request_new

/*============================================================================*
 *                                 Global                                     *
 *============================================================================*/
Efl_Egueb_IO_Request * efl_egueb_io_request_new(Egueb_Dom_String *location,
		const Efl_Egueb_IO_Request_Descriptor *descriptor, void *data)
{
	Efl_Egueb_IO_Request *thiz;
	const char *filename;


	if (!location) return NULL;
	filename = egueb_dom_string_chars_get(location);

	thiz = calloc(1, sizeof(Efl_Egueb_IO_Request));
	thiz->descriptor = descriptor;
	thiz->data = data;

	if (!strncmp(filename, "file://", 7))
	{
		Enesim_Stream *s;

		s = enesim_stream_file_new(filename + 7, "r");
		if (s)
		{
			DBG("Data '%s' loaded correctly", filename);
			thiz->in_event = EINA_TRUE;
			if (thiz->descriptor->completion)
				thiz->descriptor->completion(thiz, s);
			enesim_stream_unref(s);
			thiz->in_event = EINA_FALSE;
		}
	}
	else if (!strncmp(filename, "http://", 7))
	{
		thiz->conn = ecore_con_url_new(filename);
		thiz->binbuf = eina_binbuf_new();

		ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE,
				_efl_egueb_io_request_url_completion_cb,
				thiz);
		ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA,
				_efl_egueb_io_request_url_data_cb,
				thiz);
		ecore_con_url_get(thiz->conn);
	}
	else
	{
		WRN("Unsupported schema '%s'", filename);
		free(thiz);
		thiz = NULL;
		goto done;
	}

	if (thiz->destroy)
	{
		efl_egueb_io_request_free(thiz);
		return NULL;		
	}
done:
	return thiz;
}
开发者ID:turran,项目名称:efl-egueb,代码行数:61,代码来源:efl_egueb_io_request.c


示例12: optional_ews_window_manager_setup

static void
optional_ews_window_manager_setup(void)
{
   ecore_event_handler_add(ECORE_EVAS_EWS_EVENT_ADD, _wm_win_add, NULL);
   ecore_event_handler_add(ECORE_EVAS_EWS_EVENT_MOVE, _wm_win_move, NULL);
   ecore_event_handler_add(ECORE_EVAS_EWS_EVENT_RESIZE, _wm_win_resize, NULL);
   ecore_event_handler_add(ECORE_EVAS_EWS_EVENT_SHOW, _wm_win_show, NULL);

   /* one may use any known unique identifier, like an app function pointer */
   ecore_evas_ews_manager_set(optional_ews_window_manager_setup);
}
开发者ID:roman5566,项目名称:EFL-PS3,代码行数:11,代码来源:ecore_evas_ews_example.c


示例13: _gc_init

/* Gadcon Functions */
static E_Gadcon_Client *
_gc_init(E_Gadcon *gc, const char *name, const char *id, const char *style)
{
   Evas_Object *o;
   E_Gadcon_Client *gcc;
   Forecasts *w;
   Instance *inst;

   inst = E_NEW(Instance, 1);

   inst->ci = _forecasts_config_item_get(id);
   inst->area = eina_stringshare_add(inst->ci->code);
   inst->buffer = eina_strbuf_new();

   w = _forecasts_new(gc->evas);
   w->inst = inst;
   inst->forecasts = w;

   o = w->forecasts_obj;
   gcc = e_gadcon_client_new(gc, name, id, style, o);
   gcc->data = inst;
   inst->gcc = gcc;
   inst->popup = NULL;
   inst->forecasts_obj = o;
   evas_object_event_callback_add(inst->forecasts_obj, EVAS_CALLBACK_MOUSE_DOWN,
                                  _cb_mouse_down, inst);
   evas_object_event_callback_add(inst->forecasts_obj, EVAS_CALLBACK_MOUSE_IN,
                                  _cb_mouse_in, inst);
   evas_object_event_callback_add(inst->forecasts_obj, EVAS_CALLBACK_MOUSE_OUT,
                                  _cb_mouse_out, inst);

   if (!inst->add_handler)
     inst->add_handler =
       ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD,
                               _forecasts_server_add, inst);
   if (!inst->del_handler)
     inst->del_handler =
       ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL,
                               _forecasts_server_del, inst);
   if (!inst->data_handler)
     inst->data_handler =
       ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
                               _forecasts_server_data, inst);

   evas_object_event_callback_add(w->forecasts_obj, EVAS_CALLBACK_MOUSE_DOWN,
                                  _forecasts_cb_mouse_down, inst);
   forecasts_config->instances =
     eina_list_append(forecasts_config->instances, inst);

   _forecasts_cb_check(inst);
   inst->check_timer =
     ecore_timer_add(inst->ci->poll_time, _forecasts_cb_check, inst);
   return gcc;
}
开发者ID:thewaiter,项目名称:moksha-modules-extra,代码行数:55,代码来源:e_mod_main.c


示例14: wkb_ibus_init

int
wkb_ibus_init(void)
{
   if (wkb_ibus && wkb_ibus->refcount)
      goto end;

   if (!eldbus_init())
     {
        ERR("Error initializing Eldbus");
        goto eldbus_err;
     }

   if (!efreet_init())
     {
        ERR("Error initializing Efreet");
        goto efreet_err;
     }

   if (!wkb_ibus_config_eet_init())
     {
        ERR("Error initializing wkb_config_eet");
        goto eet_err;
     }

   if (!wkb_ibus && !(wkb_ibus = calloc(1, sizeof(*wkb_ibus))))
     {
        ERR("Error calloc");
        goto calloc_err;
     }

   WKB_IBUS_CONNECTED = ecore_event_type_new();
   WKB_IBUS_DISCONNECTED = ecore_event_type_new();
   WKB_IBUS_CONFIG_VALUE_CHANGED = ecore_event_type_new();
   WKB_THEME_CHANGED = ecore_event_type_new();

   wkb_ibus->add_handle = ecore_event_handler_add(ECORE_EXE_EVENT_ADD, _wkb_ibus_exe_add_cb, NULL);
   wkb_ibus->data_handle = ecore_event_handler_add(ECORE_EXE_EVENT_DATA, _wkb_ibus_exe_data_cb, NULL);

end:
   return ++wkb_ibus->refcount;

calloc_err:
   wkb_ibus_config_eet_shutdown();

eet_err:
   efreet_shutdown();

efreet_err:
   eldbus_shutdown();

eldbus_err:
   return 0;
}
开发者ID:etrunko,项目名称:weekeyboard,代码行数:53,代码来源:wkb-ibus.c


示例15: elm_main

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;
}
开发者ID:gzorin,项目名称:e17,代码行数:51,代码来源:keybinding_events.c


示例16: url_con

FileDownloader::FileDownloader(string _url, string _dest, bool auto_del):
                url_con(NULL),
                dl_file(NULL),
                auto_destroy(auto_del),
                idler(NULL),
                url(_url),
                dest(_dest),
                user_data(NULL)
{
        ecore_con_url_init();

        complete_handler = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _complete_cb, this);
        progress_handler = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _progress_cb, this);
}
开发者ID:meyerv,项目名称:calaos_base,代码行数:14,代码来源:FileDownloader.cpp


示例17: main

int main(int argc, const char **argv)
{
	Ecore_X_Window win;

	ecore_init();
	ecore_app_args_set(argc, argv);

	if (!ecore_evas_init())
		return -1;

	ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, win_w, win_h);
	if (!ee)
		return 1;
	win = ecore_evas_software_x11_window_get(ee);
	ecore_evas_title_set(ee, "Etox Selection Test");
	ecore_evas_show(ee);

	/* setup callbacks for events */
	ecore_event_handler_add(ECORE_X_EVENT_MOUSE_MOVE, e_mouse_move, NULL);
	ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_DOWN, e_mouse_down,
			NULL);
	ecore_event_handler_add(ECORE_X_EVENT_MOUSE_BUTTON_UP, e_mouse_up,
			NULL);
	ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, sig_exit, NULL);

	evas = ecore_evas_get(ee);
	evas_font_path_append(evas, FONT_DIRECTORY);

	/* program does its data setup here */
	setup();

	ecore_evas_callback_resize_set(ee, window_resize);

	/* and now loop forever handling events */
	ecore_main_loop_begin();

	evas_object_del(e_msg);
	evas_object_del(e_test);

	while (pbuttons) {
		panel_button_free(pbuttons->data);
		pbuttons = eina_list_remove(pbuttons, pbuttons->data);
	}

	evas_free(evas);

	return 0;
	argc = 0;
	argv = NULL;
}
开发者ID:playya,项目名称:Enlightenment,代码行数:50,代码来源:etox_test.c


示例18: _elm_url_download

Elm_Url *
_elm_url_download(const char *url, Elm_Url_Done done_cb, Elm_Url_Cancel cancel_cb, Elm_Url_Progress progress_cb, const void *data)
{
   Ecore_Con_Url *target;
   Elm_Url *r;

   ecore_con_url_init();

   target = ecore_con_url_new(url);
   if (!target) goto on_error;

#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
   if (getuid() == geteuid())
#endif
     {
        if (getenv("http_proxy")) ecore_con_url_proxy_set(target, getenv("http_proxy"));
        if (getenv("https_proxy")) ecore_con_url_proxy_set(target, getenv("https_proxy"));
        if (getenv("ftp_proxy")) ecore_con_url_proxy_set(target, getenv("ftp_proxy"));
     }

   r = malloc(sizeof (Elm_Url));
   if (!r) goto on_error;

   r->url = eina_stringshare_add(url);
   r->cb.done = done_cb;
   r->cb.cancel = cancel_cb;
   r->cb.progress = progress_cb;
   r->data = data;

   r->download = eina_binbuf_new();
   r->target = target;
   r->handler.progress = ecore_event_handler_add(ECORE_CON_EVENT_URL_PROGRESS, _elm_url_progress, r);
   r->handler.done = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _elm_url_done, r);
   r->handler.data = ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA, _elm_url_data, r);

   if (!ecore_con_url_get(r->target))
     {
       _elm_url_free(r);
       cancel_cb((void*) data, NULL, -1);
       return NULL;
     }

   return r;

 on_error:
   ecore_con_url_shutdown();

   cancel_cb((void*) data, NULL, -1);
   return NULL;
}
开发者ID:FlorentRevest,项目名称:Elementary,代码行数:50,代码来源:elm_url.c


示例19: EvasSmart

CalaosCameraView::CalaosCameraView(Evas *evas):
    EvasSmart(evas, "PageContentView")
{
    clip = evas_object_rectangle_add(evas);
    evas_object_color_set(clip, 255, 255, 255, 255);
    AddMemberObject(clip);

    camImage = evas_object_image_add(evas);
    evas_object_clip_set(camImage, clip);
    AddMemberObject(camImage);

    handler_data = ecore_event_handler_add(ECORE_CON_EVENT_URL_DATA, _url_data_cb, this);
    handler_complete = ecore_event_handler_add(ECORE_CON_EVENT_URL_COMPLETE, _url_complete_cb, this);
}
开发者ID:DjMomo,项目名称:calaos_base,代码行数:14,代码来源:CalaosCameraView.cpp


示例20: enfeeble_connect

Eina_Bool
enfeeble_connect(Enfeeble *enf)
{
   int ssl;

   EINA_SAFETY_ON_NULL_RETURN_VAL(enf, EINA_FALSE);
   ssl = enf->ssl * ECORE_CON_USE_MIXED;
   enf->ev_add = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ADD, (Ecore_Event_Handler_Cb)con, enf);
   enf->ev_del = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DEL, (Ecore_Event_Handler_Cb)disc, NULL);
   enf->ev_data = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA, (Ecore_Event_Handler_Cb)data, enf);
   enf->ev_error = ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ERROR, (Ecore_Event_Handler_Cb)error, NULL);
   enf->svr = ecore_con_server_connect(ECORE_CON_REMOTE_NODELAY, enf->svr_name, enf->port, enf);

   return EINA_TRUE;
}
开发者ID:zmike,项目名称:enfeeble,代码行数:15,代码来源:enfeeble.c



注:本文中的ecore_event_handler_add函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ecore_init函数代码示例发布时间:2022-05-30
下一篇:
C++ ecore_event_add函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap