diff options
author | Jiwoong Im <jiwoong.im@samsung.com> | 2015-11-06 15:09:13 +0900 |
---|---|---|
committer | Jiwoong Im <jiwoong.im@samsung.com> | 2015-11-06 15:09:13 +0900 |
commit | 30b414f5faebbfaf407ced68783b4987d3ec74e2 (patch) | |
tree | 192966ba6aef1a7407fd21d08bfb5db6b4a0d6dd /src | |
parent | d762357a69f3185955ff427e5f2c443572111604 (diff) | |
download | settings-30b414f5faebbfaf407ced68783b4987d3ec74e2.tar.gz settings-30b414f5faebbfaf407ced68783b4987d3ec74e2.tar.bz2 settings-30b414f5faebbfaf407ced68783b4987d3ec74e2.zip |
replace service to app_controlsubmit/tizen/20151109.102049submit/tizen/20151109.081121accepted/tizen/tv/20151109.233906tizenaccepted/tizen_tv
Change-Id: I467275ba20d7449f03e3539844963a1e119aba22
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 38 | ||||
-rw-r--r-- | src/view_uigadget.c | 2 |
2 files changed, 21 insertions, 19 deletions
@@ -192,11 +192,11 @@ static void _resume(void *data) * This callback is invoked after _create callback (just after app enters main loop) * or after "re-launch". * -* @param service [in] The launching arguments. +* @param app_control [in] The launching arguments. * @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) { struct _appdata *ad; struct setting_mgr *mgr; @@ -211,7 +211,7 @@ static void _service(service_h service, void *data) param = NULL; if (ad->service) { - service_get_extra_data(service, PARAM_SETTINGS_ITEM, ¶m); + app_control_get_extra_data(app_control, PARAM_SETTINGS_ITEM, ¶m); if ((!param && !ad->item) || (param && ad->item && !strcmp(ad->item, param))) { @@ -236,8 +236,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."); @@ -300,25 +300,27 @@ static void _region_changed(void *data) int main(int argc, char **argv) { struct _appdata ad; - app_event_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, - }; + + ui_app_lifecycle_callback_s event_callback = { 0, }; + app_event_handler_h handlers[5] = { NULL, }; + + event_callback.create = _create; + event_callback.terminate = _terminate; + event_callback.pause = _pause; + event_callback.resume = _resume; + event_callback.app_control = _app_control; + + ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], + APP_EVENT_LANGUAGE_CHANGED, _lang_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], + APP_EVENT_REGION_FORMAT_CHANGED, _region_changed, &ad); memset(&ad, 0x00, sizeof(ad)); ad.name = PACKAGE; i18n_init(); - app_efl_main(&argc, &argv, &cbs, &ad); + ui_app_main(argc, argv, &event_callback, &ad); return 0; } diff --git a/src/view_uigadget.c b/src/view_uigadget.c index 7a722a8..bd63cb3 100644 --- a/src/view_uigadget.c +++ b/src/view_uigadget.c @@ -86,7 +86,7 @@ static void _ug_layout_cb(ui_gadget_h ug, enum ug_mode mode, void *priv) * @param priv [in] The function specific data passed by UG caller. * @return void. */ -static void _ug_result_cb(ui_gadget_h ug, service_h result, void *priv) +static void _ug_result_cb(ui_gadget_h ug, app_control_h result, void *priv) { } |