当前位置: 首页>>代码示例>>C++>>正文


C++ ecore_init函数代码示例

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


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

示例1: START_TEST

END_TEST

/* Basic testing for position API */
START_TEST(elocation_test_api_position)
{
   Eina_Bool ret;
   Elocation_Position *position = NULL;

   ret = ecore_init();
   fail_if(ret != EINA_TRUE);
   ret = edbus_init();
   fail_if(ret != EINA_TRUE);
   ret = elocation_init();
   fail_if(ret != EINA_TRUE);

   position = elocation_position_new();
   fail_if(position == NULL);

   ret = elocation_position_get(position);
   fail_if(ret != EINA_TRUE);

   elocation_position_free(position);

   elocation_shutdown();
   edbus_shutdown();
   ecore_shutdown();
}
开发者ID:caivega,项目名称:enlightenment,代码行数:27,代码来源:elocation_suite.c

示例2: platformInitialize

    bool platformInitialize() override
    {
        if (!ecore_init())
            return false;

        return true;
    }
开发者ID:caiolima,项目名称:webkit,代码行数:7,代码来源:DatabaseProcessMainEfl.cpp

示例3: main

int
main (int argc, char *argv[])
{
   Ecore_Pipe *pipe;
   pid_t child_pid;

   ecore_init();

   pipe = ecore_pipe_add(handler, NULL);

   child_pid = fork();
   if(!child_pid)
     {
        ecore_pipe_read_close(pipe);
        do_lengthy_task(pipe);
     }
   else
     {
        ecore_pipe_write_close(pipe);
        ecore_main_loop_begin();
     }

   ecore_pipe_del(pipe);
   ecore_shutdown();

   return 0;
}
开发者ID:roman5566,项目名称:EFL-PS3,代码行数:27,代码来源:ecore_pipe_simple_example.c

示例4: 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

示例5: emqtt_init

int emqtt_init(void)
{
    if (++_emqtt_init_count != 1)
        return _emqtt_init_count;

    if (!eina_init ())
        return --_emqtt_init_count;

    _emqtt_log_dom_global =
            eina_log_domain_register("emqtt", EMQTT_DEFAULT_LOG_COLOR);
    if (_emqtt_log_dom_global < 0)
    {
        EINA_LOG_ERR("Enna-Server Can not create a general log domain.");
        goto shutdown_eina;
    }
    else
        INF("EMqtt Init");

    if (!ecore_init ())
        goto shutdown_eina;

    return _emqtt_init_count;

shutdown_eina:
    eina_shutdown ();
    return --_emqtt_init_count;
}
开发者ID:Frank-KunLi,项目名称:emqtt,代码行数:27,代码来源:emqtt_main.c

示例6: 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

示例7: main

int
main(int argc, char **argv)
{
   Eio_File *cp;

   if (argc != 3)
     {
	fprintf(stderr, "eio_cp source_file destination_file\n");
	return -1;
     }

   ecore_init();
   eio_init();

   cp = eio_file_copy(argv[1], argv[2],
		      NULL,
		      _test_done_cb,
		      _test_error_cb,
		      NULL);

   ecore_main_loop_begin();

   eio_shutdown();
   ecore_shutdown();

   return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:27,代码来源:eio_cp.c

示例8: 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

示例9: main

int main(void) {
    Evas_Object *o;
    Ecore_Evas *ee;
    int r;

    evas_init();
    ecore_init();
    ecore_evas_init();
    edje_init();

    ee = ecore_evas_new(NULL, 0, 0, 320, 240, NULL);
    if (!ee)
        return -1;

    o = edje_object_add(ecore_evas_get(ee));
    if (!edje_object_file_set(o, "test.edj", "main")) {
        fprintf(stderr, "could not load edje: %d\n",
                edje_object_load_error_get(o));
        return -2;
    }
    evas_object_resize(o, 320, 240);
    evas_object_show(o);

    ecore_evas_alpha_set(ee, 1);
    ecore_evas_borderless_set(ee, 1);
    ecore_evas_show(ee);
    ecore_main_loop_begin();

    return 0;
}
开发者ID:barbieri,项目名称:barbieri-playground,代码行数:30,代码来源:test-transp-bg.c

示例10: main

int
main(int argc, char **argv)
{
   struct context ctxt = {0};

   if (!ecore_init())
     {
        printf("ERROR: Cannot init Ecore!\n");
        return -1;
     }

   _event_type = ecore_event_type_new();

   ctxt.enterer = ecore_idle_enterer_add(_enterer_cb, &ctxt);
   ctxt.exiter = ecore_idle_exiter_add(_exiter_cb, &ctxt);
//   ctxt.idler = ecore_idler_add(_idler_cb, &ctxt);
   ctxt.idler = eo_add_custom(ECORE_IDLER_CLASS, NULL, ecore_idler_constructor(_idler_cb, &ctxt));
   ctxt.handler = ecore_event_handler_add(_event_type,
                                          _event_handler_cb,
                                          &ctxt);
   ctxt.timer = ecore_timer_add(0.0005, _timer_cb, &ctxt);

   ecore_main_loop_begin();
   ecore_shutdown();

   return 0;
}
开发者ID:TetragrammatonHermit,项目名称:enlightenment,代码行数:27,代码来源:ecore_idler_example.c

示例11: main

int main(int argc, char **argv)
{
	Eon_Window *win;
	Ender_Element *layout;
	Eon_Backend *backend;
	Ender_Element *e;
	int i;

	eon_init();
	ecore_init();

	//backend = eon_ecore_remote_new();
	backend = eon_ecore_sdl_new();

	layout = eon_stack_new();

	win = eon_window_new(backend, layout, 320, 240);
	eon_stack_orientation_set(layout, EON_STACK_ORIENTATION_VERTICAL);

	e = eon_color_new();
	eon_layout_child_add(layout, e);
	e = eon_color_new();
	eon_layout_child_add(layout, e);

	ecore_main_loop_begin();
	ecore_shutdown();
	eon_shutdown();

	return 0;
}
开发者ID:turran,项目名称:eon,代码行数:30,代码来源:eon_test_color.c

示例12: ecore_audio_init

EAPI int
ecore_audio_init(void)
{

   if (++_ecore_audio_init_count != 1)
     return _ecore_audio_init_count;

   if (!ecore_init())
     return --_ecore_audio_init_count;

   if (!efl_object_init()) {
     ecore_shutdown();
     return --_ecore_audio_init_count;
   }

   _ecore_audio_log_dom = eina_log_domain_register("ecore_audio", ECORE_AUDIO_DEFAULT_LOG_COLOR);
   if (_ecore_audio_log_dom < 0)
     {
        EINA_LOG_ERR("Impossible to create a log domain for the ecore audio module.");
        return --_ecore_audio_init_count;
     }

   DBG("Ecore_Audio init");
   ecore_audio_modules = NULL;


   eina_log_timing(_ecore_audio_log_dom,
		   EINA_LOG_STATE_STOP,
		   EINA_LOG_STATE_INIT);

   return _ecore_audio_init_count;
}
开发者ID:Stefan-Schmidt,项目名称:efl,代码行数:32,代码来源:ecore_audio.c

示例13: main

int
main(int argc, char **argv)
{
   double interval = 0.3; // tick each 0.3 seconds
   Ecore_Poller *poller1, *poller2;
   char *str1 = "poller1";
   char *str2 = "poller2";

   if (!ecore_init())
     {
        printf("ERROR: Cannot init Ecore!\n");
        return -1;
     }

   _initial_time = ecore_time_get();

   ecore_poller_poll_interval_set(ECORE_POLLER_CORE, interval);

   poller1 = ecore_poller_add(ECORE_POLLER_CORE, 4, _poller_print_cb, str1);
   poller2 = ecore_poller_add(ECORE_POLLER_CORE, 8, _poller_print_cb, str2);

   ecore_main_loop_begin();

   printf("changing poller2 interval to 16\n");

   ecore_poller_poller_interval_set(poller2, 16);
   ecore_main_loop_begin();

   ecore_poller_del(poller1);
   ecore_poller_del(poller2);

   ecore_shutdown();
}
开发者ID:Limsik,项目名称:e17,代码行数:33,代码来源:ecore_poller_example.c

示例14: daemonLoop

// return 0 for normal case
int daemonLoop(void)
{
	int return_value = 0;

	ecore_init();

	if (init_input_events() == -1) {
		return_value = -1;
		goto END_EVENT;
	}

	if (!initialize_events()) {
		return_value = -1;
		goto END_EFD;
	}

	if (launch_timer_start() < 0) {
		LOGE("Launch timer start failed\n");
		return_value = -1;
		goto END_EFD;
	}

	init_prof_session(&prof_session);

	ecore_main_loop_begin();
	ecore_shutdown();

 END_EFD:
	LOGI("close efd\n");
	close(manager.efd);
 END_EVENT:
	return return_value;
}
开发者ID:tizenorg,项目名称:platform.core.system.swap-manager,代码行数:34,代码来源:daemon.c

示例15: ecore_event_init

EAPI int
ecore_event_init(void)
{
   if (++_ecore_event_init_count != 1)
     return _ecore_event_init_count;
   if (!ecore_init())
     {
        _ecore_event_init_count--;
        return 0;
     }

   _ecore_input_log_dom = eina_log_domain_register
     ("ecore_input", ECORE_INPUT_DEFAULT_LOG_COLOR);
   if(_ecore_input_log_dom < 0)
     {
       EINA_LOG_ERR("Impossible to create a log domain for the ecore input module.");
       return --_ecore_event_init_count;
     }

   ECORE_EVENT_KEY_DOWN = ecore_event_type_new();
   ECORE_EVENT_KEY_UP = ecore_event_type_new();
   ECORE_EVENT_MOUSE_BUTTON_DOWN = ecore_event_type_new();
   ECORE_EVENT_MOUSE_BUTTON_UP = ecore_event_type_new();
   ECORE_EVENT_MOUSE_MOVE = ecore_event_type_new();
   ECORE_EVENT_MOUSE_WHEEL = ecore_event_type_new();
   ECORE_EVENT_MOUSE_IN = ecore_event_type_new();
   ECORE_EVENT_MOUSE_OUT = ecore_event_type_new();
   ECORE_EVENT_AXIS_UPDATE = ecore_event_type_new();
   ECORE_EVENT_MOUSE_BUTTON_CANCEL = ecore_event_type_new();
   ECORE_EVENT_JOYSTICK = ecore_event_type_new();

   ecore_input_joystick_init();

   return _ecore_event_init_count;
}
开发者ID:Stefan-Schmidt,项目名称:efl,代码行数:35,代码来源:ecore_input.c


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