1 #include "../inc/test.h"
2 #if (TEST_MODE == TEST_APP)
4 #include "unit/inc/unit.h"
6 #include "homescreen-efl.h"
7 #include "feature_test/feature_test.h"
10 Ecore_Timer * feature_test_run_timer;
12 .feature_test_run_timer = NULL,
15 static Eina_Bool __run_timer_callback(void * data);
17 static Eina_Bool __run_timer_callback(void * data)
21 s_info.feature_test_run_timer = NULL;
22 return ECORE_CALLBACK_CANCEL;
25 static void __test_app_resume_cb(void *data)
27 __homescreen_efl_app_resume_cb(data);
29 if (s_info.feature_test_run_timer) {
30 ecore_timer_del(s_info.feature_test_run_timer);
31 s_info.feature_test_run_timer = NULL;
36 s_info.feature_test_run_timer = ecore_timer_add(0.2, __run_timer_callback, NULL);
39 int main(int argc, char *argv[])
41 __D("Starting homescreen-efl");
44 ui_app_lifecycle_callback_s event_callback = {0,};
45 app_event_handler_h handlers[5] = {NULL, };
47 event_callback.create = __homescreen_efl_app_create_cb;
48 event_callback.terminate = __homescreen_efl_app_terminate_cb;
49 event_callback.pause = __homescreen_efl_app_pause_cb;
50 event_callback.resume = __test_app_resume_cb;
51 event_callback.app_control = __homescreen_efl_app_control_cb;
53 ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, __homescreen_efl_low_battery_cb, NULL);
54 ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, __homescreen_efl_low_memory_cb, NULL);
55 ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, __homescreen_efl_orient_changed_cb, NULL);
56 ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, __homescreen_efl_lang_changed_cb, NULL);
57 ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, __homescreen_efl_region_changed_cb, NULL);
59 ret = ui_app_main(argc, argv, &event_callback, NULL);
60 if (ret != APP_ERROR_NONE)
61 __E("ui_app_main() is failed. err = %d", ret);