本文整理汇总了C++中ecore_main_loop_begin函数的典型用法代码示例。如果您正苦于以下问题:C++ ecore_main_loop_begin函数的具体用法?C++ ecore_main_loop_begin怎么用?C++ ecore_main_loop_begin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ecore_main_loop_begin函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: 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
示例2: main
int
main(void)
{
double start;
Eina_Hash *headers;
eina_init();
ecore_init();
ecore_file_init();
if (ecore_file_exists(DST))
ecore_file_unlink(DST);
start = ecore_time_get();
if (ecore_file_download(URL, DST, completion_cb, progress_cb, NULL, NULL))
{
printf("Download started successfully:\n URL: %s\n DEST: %s\n", URL, DST);
ecore_main_loop_begin();
printf("\nTime elapsed: %f seconds\n", ecore_time_get() - start);
printf("Downloaded %lld bytes\n", ecore_file_size(DST));
}
else
{
printf("Error, can't start download\n");
goto done;
}
headers = eina_hash_string_small_new(NULL);
eina_hash_add(headers, "Content-type", "application/x-gzip");
if (ecore_file_download_full(URL, DST_MIME, completion_cb, progress_cb, NULL, NULL, headers))
{
printf("Download started successfully:\n URL: %s\n DEST: %s\n", URL, DST_MIME);
ecore_main_loop_begin();
printf("\nTime elapsed: %f seconds\n", ecore_time_get() - start);
printf("Downloaded %lld bytes\n", ecore_file_size(DST));
}
else
{
printf("Error, can't start download\n");
goto done;
}
done:
if (headers) eina_hash_free(headers);
ecore_file_shutdown();
ecore_shutdown();
eina_shutdown();
return 0;
}
开发者ID:Limsik,项目名称:e17,代码行数:51,代码来源:ecore_file_download_example.c
示例3: main
int
main(int argc, char **argv)
{
double interval = 0.3; // tick each 0.3 seconds
Ecore_Poller *poller1, *poller2, *poller3;
char *str1 = "poller1";
char *str2 = "poller2";
char *str3 = "poller3";
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);
// poller3 = ecore_poller_add(ECORE_POLLER_CORE, 30, _poller_quit_cb, str3);
poller1 = eo_add_custom(ECORE_POLLER_CLASS, NULL,
ecore_poller_constructor(ECORE_POLLER_CORE, 4, _poller_print_cb, str1));
poller2 = eo_add_custom(ECORE_POLLER_CLASS, NULL,
ecore_poller_constructor(ECORE_POLLER_CORE, 8, _poller_print_cb, str2));
poller3 = eo_add_custom(ECORE_POLLER_CLASS, NULL,
ecore_poller_constructor(ECORE_POLLER_CORE, 20, _poller_quit_cb, str3));
ecore_main_loop_begin();
printf("changing poller2 interval to 16\n");
// ecore_poller_poller_interval_set(poller2, 16);
eo_do(poller2, ecore_poller_interval_set(16, NULL));
ecore_main_loop_begin();
eo_unref(poller1);
eo_unref(poller2);
eo_unref(poller3);
// ecore_poller_del(poller1);
// ecore_poller_del(poller2);
// ecore_poller_del(poller3);
ecore_shutdown();
}
开发者ID:TetragrammatonHermit,项目名称:enlightenment,代码行数:48,代码来源:ecore_poller_example.c
示例4: 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
示例5: 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
示例6: 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
示例7: main
int
main(void)
{
Ecore_Evas *ee;
ecore_evas_init();
ee = ecore_evas_new(NULL, 0, 0, 200, 100, NULL);
ecore_evas_title_set(ee, "Ecore Evas Callbacks Example");
ecore_evas_show(ee);
//callbacks
ecore_evas_callback_delete_request_set(ee, _delete);
ecore_evas_callback_destroy_set(ee, _destroy);
ecore_evas_callback_focus_in_set(ee, _focus_in);
ecore_evas_callback_focus_out_set(ee, _focus_out);
ecore_evas_callback_hide_set(ee, _hide);
ecore_evas_callback_mouse_in_set(ee, _mouse_in);
ecore_evas_callback_mouse_out_set(ee, _mouse_out);
ecore_evas_callback_move_set(ee, _move);
ecore_evas_callback_post_render_set(ee, _post_render);
ecore_evas_callback_pre_free_set(ee, _pre_free);
ecore_evas_callback_pre_render_set(ee, _pre_render);
ecore_evas_callback_resize_set(ee, _resize);
ecore_evas_callback_show_set (ee, _show);
ecore_main_loop_begin();
ecore_evas_free(ee);
ecore_evas_shutdown();
return 0;
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:33,代码来源:ecore_evas_callbacks.c
示例8: 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
示例9: 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
示例10: main
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;
}
开发者ID:yang-bo,项目名称:webkit,代码行数:27,代码来源:main.c
示例11: 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
示例12: main
int main(int argc, char *argv[])
{
Ecore_Evas *window;
Evas *canvas;
Evas_Object *edje;
const char *text;
ecore_evas_init();
edje_init();
window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
if (!window)
{
EINA_LOG_CRIT("could not create window.");
return -1;
}
canvas = ecore_evas_get(window);
text = (argc > 1) ? argv[1] : NULL;
edje = create_my_group(canvas, text);
if (!edje)
return -2;
ecore_evas_show(window);
ecore_main_loop_begin();
evas_object_del(edje);
ecore_evas_free(window);
edje_shutdown();
ecore_evas_shutdown();
return 0;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:35,代码来源:edje_example.c
示例13: main
int main(int argc, char **argv) {
init_efl();
char *theme = find_theme();
if (!theme)
fatal("Could not find theme");
Ecore_Evas *ee = ecore_evas_software_x11_new(NULL, 0, 0, 0, 400, 400);
if (!ee) {
fprintf(stderr, "FATAL: Could not get an ee...\n");
exit(1);
}
Ecore_X_Screen_Size sz = get_screen_size(ee);
ecore_evas_resize(ee, sz.width, sz.height);
ecore_evas_title_set(ee, "Launcher");
ecore_evas_borderless_set(ee, 1);
ecore_evas_fullscreen_set(ee, 1);
Evas *evas = ecore_evas_get(ee);
Evas_Object *edje = edje_object_add(evas);
edje_object_file_set(edje, theme, "main");
evas_object_move(edje, 0, 0);
evas_object_resize(edje, sz.width, sz.height);
evas_object_show(edje);
ecore_evas_show(ee);
ecore_main_loop_begin();
shutdown_efl();
return 0;
}
开发者ID:derobert,项目名称:DebianLINK,代码行数:34,代码来源:nl-launcher.c
示例14: 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
示例15: 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
示例16: 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
示例17: 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
示例18: 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
示例19: main
int
main(int argc, char **argv)
{
ecore_init();
ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, _quitter, NULL);
ecore_main_loop_begin();
return 0;
}
开发者ID:jigpu,项目名称:efl,代码行数:10,代码来源:ecore_event_example_01.c
示例20: ewl_main
/**
* @return Returns no value.
* @brief The main execution loop of EWL
*
* This is the main execution loop of ewl. It dispatches
* incoming events and renders updates to the evas's used by ewl.
*/
void
ewl_main(void)
{
DENTER_FUNCTION(DLEVEL_STABLE);
ecore_main_loop_begin();
ewl_shutdown();
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
开发者ID:playya,项目名称:Enlightenment,代码行数:17,代码来源:ewl_misc.c
注:本文中的ecore_main_loop_begin函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论