From e7ba0a85bb27098b2f68b7ce8aa17955f3ee7974 Mon Sep 17 00:00:00 2001 From: "seolheui,kim" Date: Fri, 9 Dec 2016 18:11:31 +0900 Subject: [PATCH] Remove efl extension code Change-Id: Ia8b625d6860696da0f0437aa936e806a4a21b3a9 Signed-off-by: seolheui,kim --- packaging/krate.spec | 3 --- tools/apps/CMakeLists.txt | 1 - tools/apps/kaskit/include/kaskit.h | 1 - tools/apps/kaskit/include/widget.h | 1 - tools/apps/kaskit/src/ui.c | 28 ++++++++++++-------- tools/apps/keyguard/include/keyguard.h | 1 - tools/apps/keyguard/include/widget.h | 2 -- tools/apps/keyguard/src/widget.c | 37 ++++++++++++++++++++++----- tools/apps/setup-wizard/include/krate-setup.h | 1 - tools/apps/setup-wizard/include/widget.h | 1 - tools/apps/setup-wizard/src/ui.c | 17 ++++++++++-- 11 files changed, 63 insertions(+), 30 deletions(-) diff --git a/packaging/krate.spec b/packaging/krate.spec index 1050b89..fb5e983 100644 --- a/packaging/krate.spec +++ b/packaging/krate.spec @@ -133,7 +133,6 @@ developing the krate client program. Summary: Tizen Krate setup wizard Interface Group: Security/Other Requires: libkrate = %{version}-%{release} -BuildRequires: pkgconfig(efl-extension) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: pkgconfig(evas) @@ -155,7 +154,6 @@ Tizen Krate setup wizard interface %package -n org.tizen.kaskit Summary: Tizen Krate launcher Interface Group: Security/Other -BuildRequires: pkgconfig(efl-extension) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(evas) BuildRequires: pkgconfig(capi-appfw-application) @@ -180,7 +178,6 @@ Tizen Krate launcher interface Summary: Tizen Krate keyguard Interface Group: Security/Other Requires: libkrate = %{version}-%{release} -BuildRequires: pkgconfig(efl-extension) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: pkgconfig(evas) diff --git a/tools/apps/CMakeLists.txt b/tools/apps/CMakeLists.txt index 6b27cd9..cb80623 100755 --- a/tools/apps/CMakeLists.txt +++ b/tools/apps/CMakeLists.txt @@ -19,7 +19,6 @@ PKG_CHECK_MODULES(EFL_APP REQUIRED dlog glib-2.0 bundle - efl-extension elementary capi-appfw-application capi-ui-efl-util diff --git a/tools/apps/kaskit/include/kaskit.h b/tools/apps/kaskit/include/kaskit.h index 1b55224..7aaa2a9 100644 --- a/tools/apps/kaskit/include/kaskit.h +++ b/tools/apps/kaskit/include/kaskit.h @@ -28,7 +28,6 @@ #include #include #include -#include #ifdef LOG_TAG #undef LOG_TAG diff --git a/tools/apps/kaskit/include/widget.h b/tools/apps/kaskit/include/widget.h index 6faf1b4..96acbdc 100644 --- a/tools/apps/kaskit/include/widget.h +++ b/tools/apps/kaskit/include/widget.h @@ -23,7 +23,6 @@ #include #include #include -#include Evas_Object *_create_win(const char *package); Evas_Object *_create_conformant(Evas_Object *parent); diff --git a/tools/apps/kaskit/src/ui.c b/tools/apps/kaskit/src/ui.c index 700062d..a7236f0 100644 --- a/tools/apps/kaskit/src/ui.c +++ b/tools/apps/kaskit/src/ui.c @@ -73,21 +73,27 @@ static char* __get_res_path(const char* file) return strdup(edj_path); } -static void __back_key_cb(void *data , Evas_Object *obj , void *event_info) +static Eina_Bool key_event_cb(void *data, int type, void *event) { - Evas_Object* icon; - Eina_List* i; + Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event; - if (__is_edit_mode) { - __is_edit_mode = false; + if (!strcmp(ev->keyname, "XF86Back")) { + Evas_Object* icon; + Eina_List* i; - EINA_LIST_FOREACH(ud.app_icon_list, i, icon) { - elm_object_signal_emit(icon, "uninstall_button_hide", "source"); - elm_object_signal_emit(icon, "icon_sub_badge_show", "source"); + if (__is_edit_mode) { + __is_edit_mode = false; + + EINA_LIST_FOREACH(ud.app_icon_list, i, icon) { + elm_object_signal_emit(icon, "uninstall_button_hide", "source"); + elm_object_signal_emit(icon, "icon_sub_badge_show", "source"); + } + } else { + ui_app_exit(); } - } else { - ui_app_exit(); } + + return EINA_TRUE; } void _create_kaskit_window() @@ -107,7 +113,7 @@ void _create_kaskit_window() void _set_kaskit_window_exit_cb() { - eext_object_event_callback_add(ud.win, EEXT_CALLBACK_BACK, __back_key_cb, NULL); + ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, key_event_cb, NULL); elm_object_signal_callback_add(ud.layout, "bg_clicked", "layout", __block_clicked_cb, NULL); } diff --git a/tools/apps/keyguard/include/keyguard.h b/tools/apps/keyguard/include/keyguard.h index 6ae44a0..ca99996 100644 --- a/tools/apps/keyguard/include/keyguard.h +++ b/tools/apps/keyguard/include/keyguard.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/tools/apps/keyguard/include/widget.h b/tools/apps/keyguard/include/widget.h index 4d6237b..603570e 100644 --- a/tools/apps/keyguard/include/widget.h +++ b/tools/apps/keyguard/include/widget.h @@ -23,13 +23,11 @@ #include #include #include -#include Evas_Object *_create_win(const char *package); Evas_Object *_create_conformant(Evas_Object *parent); Evas_Object *_create_layout(Evas_Object *parent, char *file, const char *group); Evas_Object *_create_entry(Evas_Object *parent); Evas_Object *_create_popup(Evas_Object *parent, const char *title, const char *content, char *style); -//Evas_Object *_create_button(Evas_Object *parent, const char *text, const char *style); #endif /* WIDGET_H_ */ diff --git a/tools/apps/keyguard/src/widget.c b/tools/apps/keyguard/src/widget.c index 0bc0c09..a54f301 100644 --- a/tools/apps/keyguard/src/widget.c +++ b/tools/apps/keyguard/src/widget.c @@ -19,11 +19,24 @@ #include #include "widget.h" -static void __win_delete_request_cb(void *data , Evas_Object *obj , void *event_info) +Ecore_Event_Handler *ecore_handler = NULL; + +static void __win_delete_request_cb(void *data, Evas_Object *obj, void *event_info) { ui_app_exit(); } +static Eina_Bool key_event_cb(void *data, int type, void *event) +{ + Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event; + + if (!strcmp(ev->keyname, "XF86Back")) { + ui_app_exit(); + } + + return EINA_TRUE; +} + Evas_Object *_create_win(const char *package) { Evas_Object *win; @@ -31,17 +44,16 @@ Evas_Object *_create_win(const char *package) win = elm_win_add(NULL, package, ELM_WIN_NOTIFICATION); efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT); - /* [TBD] enable : eext_win_keygrab_set(win, "XF86Home"); */ elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW); elm_win_indicator_opacity_set(win, ELM_WIN_INDICATOR_BG_TRANSPARENT); + elm_win_autodel_set(win, EINA_TRUE); elm_win_alpha_set(win, EINA_TRUE); elm_win_conformant_set(win, EINA_TRUE); evas_object_smart_callback_add(win, "delete,request", __win_delete_request_cb, NULL); - - eext_object_event_callback_add(win, EEXT_CALLBACK_BACK, __win_delete_request_cb, NULL); + ecore_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, key_event_cb, NULL); return win; } @@ -116,6 +128,18 @@ static void __popup_btn_clicked_cb(void *data, Evas_Object *obj, void *event_inf evas_object_del(popup); } +static void popup_key_event_cb(void *data, Evas *e, Evas_Object *obj, void *event) +{ + Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event; + + if (!strcmp(ev->keyname, "XF86Back")) { + ecore_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, key_event_cb, NULL); + evas_object_del(obj); + } + + return; +} + Evas_Object *_create_popup(Evas_Object *parent, const char *title, const char *content, char *style) { Evas_Object *popup = elm_popup_add(parent); @@ -124,7 +148,9 @@ Evas_Object *_create_popup(Evas_Object *parent, const char *title, const char *c elm_object_style_set(popup, style); elm_object_text_set(popup, content); - eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_popup_back_cb, parent); + ecore_event_handler_del(ecore_handler); + evas_object_event_callback_add(popup, EVAS_CALLBACK_KEY_UP, popup_key_event_cb, NULL); + if (!strcmp(style, "toast")) { elm_popup_timeout_set(popup, 3.0); evas_object_smart_callback_add(popup, "timeout", __popup_timeout_cb, NULL); @@ -136,7 +162,6 @@ Evas_Object *_create_popup(Evas_Object *parent, const char *title, const char *c Evas_Object *btn = _create_button(popup, "OK"); elm_object_part_content_set(popup, "button1", btn); evas_object_smart_callback_add(btn, "clicked", __popup_btn_clicked_cb, popup); - eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_popup_back_cb, NULL); } return popup; diff --git a/tools/apps/setup-wizard/include/krate-setup.h b/tools/apps/setup-wizard/include/krate-setup.h index 870fa89..69f95d6 100644 --- a/tools/apps/setup-wizard/include/krate-setup.h +++ b/tools/apps/setup-wizard/include/krate-setup.h @@ -28,7 +28,6 @@ #include #include #include -#include #include #include diff --git a/tools/apps/setup-wizard/include/widget.h b/tools/apps/setup-wizard/include/widget.h index febca3c..0e5c61c 100644 --- a/tools/apps/setup-wizard/include/widget.h +++ b/tools/apps/setup-wizard/include/widget.h @@ -23,7 +23,6 @@ #include #include #include -#include Evas_Object *_create_win(const char *package); Evas_Object *_create_conformant(Evas_Object *parent); diff --git a/tools/apps/setup-wizard/src/ui.c b/tools/apps/setup-wizard/src/ui.c index 8e0b681..2494873 100644 --- a/tools/apps/setup-wizard/src/ui.c +++ b/tools/apps/setup-wizard/src/ui.c @@ -19,6 +19,7 @@ #include "krate-setup.h" #include "widget.h" +static Ecore_Event_Handler *ecore_handler = NULL; static void __create_welcome_view(appdata_s *ad); uidata_s ud = {0, }; @@ -33,6 +34,17 @@ static Eina_Bool __naviframe_pop_cb(void *data, Elm_Object_Item *it) return EINA_FALSE; } +static Eina_Bool naviframe_key_event_cb(void *data, int type, void *event) +{ + Evas_Event_Key_Down *ev = (Evas_Event_Key_Down *)event; + + if (!strcmp(ev->keyname, "XF86Back")) { + elm_naviframe_item_pop(ud.nf); + } + + return EINA_TRUE; +} + static void setup_wizard_cancel_cb(void *data, Evas_Object *obj, void *event_info) { appdata_s *ad = (appdata_s *)data; @@ -149,7 +161,7 @@ void _create_base_window(appdata_s *ad) __create_welcome_view(ad); elm_object_part_content_set(layout, "elm.swallow.content", ud.nf); - eext_object_event_callback_add(ud.nf, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL); + ecore_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, naviframe_key_event_cb, NULL); evas_object_show(ud.win); return; @@ -226,7 +238,8 @@ void _create_setup_view(appdata_s *ad) else text = setup_text[1]; - eext_object_event_callback_del(ud.nf, EEXT_CALLBACK_BACK, eext_naviframe_back_cb); + if (ecore_handler) + ecore_event_handler_del(ecore_handler); setup_layout = _create_layout(ud.nf, ud.edj_path, "setup_layout"); -- 2.7.4