#include "Ecore.h" #include "/usr/local/include/Evas.h" #include "/usr/local/include/Ecore.h" #include "/usr/local/include/Ecore_Evas.h" #include "/usr/local/include/Elementary.h" #include "msg_sender.h" int is_init = 0; double interval = 0.1; double current_time, last_call; void pause_msg_sender() { stop_irc(); } void continue_msg_sender() { run_irc(); } void exit_all() { elm_exit(); ecore_shutdown(); elm_shutdown(); } void continue_gui(void *data) { elm_run(); } void init_ecore_handler(char *from, char *to) { ecore_init(); if (is_init == 0) { is_init = 1; msg_main_loop(from, to); } ecore_idle_exiter_add(continue_msg_sender, NULL); ecore_idle_exiter_add(pause_msg_sender, NULL); ecore_idle_exiter_add(continue_gui, NULL); ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_all, NULL); ecore_main_loop_begin(); } void shutdown_ecore_handler() { ecore_shutdown(); }