本文整理汇总了C++中ecore_init函数的典型用法代码示例。如果您正苦于以下问题:C++ ecore_init函数的具体用法?C++ ecore_init怎么用?C++ ecore_init使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ecore_init函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: 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
示例17: main
/* externally accessible functions */
int
main(int argc,
char **argv)
{
int i;
for (i = 1; i < argc; i++)
{
if ((!strcmp(argv[i], "-h")) ||
(!strcmp(argv[i], "-help")) ||
(!strcmp(argv[i], "--help")))
{
printf(
"This is an internal tool for Enlightenment.\n"
"do not use it.\n"
);
exit(0);
}
else if (!strncmp(argv[i], "--nice=", 7))
{
const char *val;
int ret = 0;
val = argv[i] + 7;
if (*val)
ret = nice(atoi(val));
}
}
ecore_init();
ecore_app_args_set(argc, (const char **)argv);
eet_init();
evas_init();
ecore_evas_init();
edje_init();
ecore_file_init();
ecore_ipc_init();
e_user_dir_concat_static(_thumbdir, "fileman/thumbnails");
ecore_file_mkpath(_thumbdir);
if (_e_ipc_init()) ecore_main_loop_begin();
if (_e_ipc_server)
{
ecore_ipc_server_del(_e_ipc_server);
_e_ipc_server = NULL;
}
ecore_ipc_shutdown();
ecore_file_shutdown();
ecore_evas_shutdown();
edje_shutdown();
evas_shutdown();
eet_shutdown();
ecore_shutdown();
return 0;
}
开发者ID:tizenorg,项目名称:framework.uifw.e17,代码行数:60,代码来源:e_thumb_main.c
示例18: eio_init
EAPI int
eio_init(void)
{
if (++_eio_init_count != 1)
return _eio_init_count;
if (!eina_init())
{
fprintf(stderr, "Eio can not initialize Eina\n");
return --_eio_init_count;
}
_eio_log_dom_global = eina_log_domain_register("eio", EIO_DEFAULT_LOG_COLOR);
if (_eio_log_dom_global < 0)
{
EINA_LOG_ERR("Eio can not create a general log domain.");
goto shutdown_eina;
}
if (!ecore_init())
{
ERR("Can not initialize Ecore\n");
goto unregister_log_domain;
}
memset(&progress_pool, 0, sizeof(progress_pool));
memset(&direct_info_pool, 0, sizeof(direct_info_pool));
memset(&char_pool, 0, sizeof(char_pool));
memset(&associate_pool, 0, sizeof(associate_pool));
eina_lock_new(&(progress_pool.lock));
progress_pool.mem_size = sizeof (Eio_Progress);
eina_lock_new(&(direct_info_pool.lock));
direct_info_pool.mem_size = sizeof (Eio_File_Direct_Info);
eina_lock_new(&(char_pool.lock));
char_pool.mem_size = sizeof (Eio_File_Char);
eina_lock_new(&(associate_pool.lock));
associate_pool.mem_size = sizeof (Eio_File_Associate);
eina_spinlock_new(&(memory_pool_lock));
eina_lock_new(&(memory_pool_mutex));
eina_condition_new(&(memory_pool_cond), &(memory_pool_mutex));
eio_monitor_init();
eina_log_timing(_eio_log_dom_global,
EINA_LOG_STATE_STOP,
EINA_LOG_STATE_INIT);
return _eio_init_count;
unregister_log_domain:
eina_log_domain_unregister(_eio_log_dom_global);
_eio_log_dom_global = -1;
shutdown_eina:
eina_shutdown();
return --_eio_init_count;
}
开发者ID:tguillem,项目名称:efl,代码行数:58,代码来源:eio_main.c
示例19: main
int
main(int argc, char **argv)
{
const char *tmp;
int i = 0;
for (i = 1; i < argc; i++)
{
if ((!strcmp(argv[i], "-h")) ||
(!strcmp(argv[i], "-help")) ||
(!strcmp(argv[i], "--help")))
{
printf("This is an internal tool for Moksha.\n"
"do not use it.\n");
exit(0);
}
else if (i == 1)
sig = atoi(argv[i]); // signal
else if (i == 2)
pid = atoi(argv[i]); // E's pid
else if (i == 3)
backtrace_str = argv[i];
else if (i == 4)
exit_gdb = atoi(argv[i]);
}
fprintf(stderr, "exit_gdb: %i\n", exit_gdb);
tmp = getenv("E17_TAINTED");
if (tmp && !strcmp(tmp, "NO"))
tainted = EINA_FALSE;
if (!ecore_init()) return EXIT_FAILURE;
ecore_app_args_set(argc, (const char **)argv);
if (!_e_alert_connect())
{
printf("FAILED TO INIT ALERT SYSTEM!!!\n");
ecore_shutdown();
return EXIT_FAILURE;
}
title = "Moksha Error";
str1 = "(F1) Recover";
str2 = "(F12) Logout";
_e_alert_create();
_e_alert_display();
_e_alert_run();
_e_alert_shutdown();
ecore_shutdown();
/* ret == 1 => restart e => exit code 1 */
/* ret == 2 => exit e => any code will do that */
return ret;
}
开发者ID:nuclearcanary,项目名称:moksha,代码行数:57,代码来源:e_alert_main.c
示例20: ecore_con_url_init
EAPI int
ecore_con_url_init(void)
{
if (++_init_count > 1) return _init_count;
if (!ecore_init()) return --_init_count;
ECORE_CON_EVENT_URL_DATA = ecore_event_type_new();
ECORE_CON_EVENT_URL_COMPLETE = ecore_event_type_new();
ECORE_CON_EVENT_URL_PROGRESS = ecore_event_type_new();
return _init_count;
}
开发者ID:craigem,项目名称:efl,代码行数:10,代码来源:ecore_con_url.c
注:本文中的ecore_init函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论