diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 36 |
1 files changed, 17 insertions, 19 deletions
@@ -18,7 +18,6 @@ #include <Elementary.h> #include <Ecore_X.h> #include <utilX.h> -#include <dlog.h> #include <ui-gadget.h> #include "dbg.h" #include "def.h" @@ -35,7 +34,7 @@ struct _appdata { struct setting_mgr *mgr; const char *name; char *item; - unsigned int service; + unsigned int app_control; }; /** @@ -129,7 +128,7 @@ static bool _create(void *data) } ad->win = win; - ad->service = 0; + ad->app_control = 0; return true; } @@ -199,9 +198,9 @@ static void _resume(void *data) * @param data [in] The function specific data passed by app_efl_main. * @return void. */ -static void _service(service_h service, void *data) +static void _app_control(app_control_h app_control, void *data) { - _DBG("############################# START _service #############################"); + _DBG("############################# START _app_control #############################"); struct _appdata *ad; struct setting_mgr *mgr; int r; @@ -214,8 +213,8 @@ static void _service(service_h service, void *data) ad = data; param = NULL; - if (ad->service) { - service_get_extra_data(service, PARAM_SETTINGS_ITEM, ¶m); + if (ad->app_control) { + app_control_get_extra_data(app_control, PARAM_SETTINGS_ITEM, ¶m); if ((!param && !ad->item) || (param && ad->item && !strcmp(ad->item, param))) { @@ -240,8 +239,8 @@ static void _service(service_h service, void *data) if (!mgr) app_efl_exit(); - r = service_get_extra_data(service, PARAM_SETTINGS_ITEM, ¶m); - if (r == SERVICE_ERROR_NONE && param) { + r = app_control_get_extra_data(app_control, PARAM_SETTINGS_ITEM, ¶m); + if (r == APP_CONTROL_ERROR_NONE && param) { r = settingmgr_launch_item(mgr, param); if (r != 0) { _ERR("the item is not exist."); @@ -252,11 +251,11 @@ static void _service(service_h service, void *data) } ad->mgr = mgr; - ad->service = 1; + ad->app_control = 1; free(ad->item); ad->item = param; - _DBG("############################# END _service #############################"); + _DBG("############################# END _app_control #############################"); } /** @@ -305,17 +304,12 @@ static void _region_changed(void *data) int main(int argc, char **argv) { struct _appdata ad; - app_event_callback_s cbs = { + ui_app_lifecycle_callback_s cbs = { .create = _create, .terminate = _terminate, .pause = _pause, .resume = _resume, - .service = _service, - .low_memory = NULL, - .low_battery = NULL, - .device_orientation = NULL, - .language_changed = _lang_changed, - .region_format_changed = _region_changed, + .app_control = _app_control, }; memset(&ad, 0x00, sizeof(ad)); @@ -323,7 +317,11 @@ int main(int argc, char **argv) i18n_init(); - app_efl_main(&argc, &argv, &cbs, &ad); + /* TODO : _lang_changed, _region_changed callback will be registerd + * Use BaseApp in application-common. + */ + + ui_app_main(argc, argv, &cbs, &ad); return 0; } |