Remove efl extension code 44/103744/2
authorseolheui,kim <s414.kim@samsung.com>
Fri, 9 Dec 2016 09:11:31 +0000 (18:11 +0900)
committerseolheui,kim <s414.kim@samsung.com>
Wed, 14 Dec 2016 06:10:34 +0000 (15:10 +0900)
Change-Id: Ia8b625d6860696da0f0437aa936e806a4a21b3a9
Signed-off-by: seolheui,kim <s414.kim@samsung.com>
packaging/krate.spec
tools/apps/CMakeLists.txt
tools/apps/kaskit/include/kaskit.h
tools/apps/kaskit/include/widget.h
tools/apps/kaskit/src/ui.c
tools/apps/keyguard/include/keyguard.h
tools/apps/keyguard/include/widget.h
tools/apps/keyguard/src/widget.c
tools/apps/setup-wizard/include/krate-setup.h
tools/apps/setup-wizard/include/widget.h
tools/apps/setup-wizard/src/ui.c

index 1050b89..fb5e983 100644 (file)
@@ -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)
index 6b27cd9..cb80623 100755 (executable)
@@ -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
index 1b55224..7aaa2a9 100644 (file)
@@ -28,7 +28,6 @@
 #include <bundle.h>
 #include <dlog.h>
 #include <Elementary.h>
-#include <efl_extension.h>
 
 #ifdef  LOG_TAG
 #undef  LOG_TAG
index 6faf1b4..96acbdc 100644 (file)
@@ -23,7 +23,6 @@
 #include <app.h>
 #include <dlog.h>
 #include <Elementary.h>
-#include <efl_extension.h>
 
 Evas_Object *_create_win(const char *package);
 Evas_Object *_create_conformant(Evas_Object *parent);
index 700062d..a7236f0 100644 (file)
@@ -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);
 }
index 6ae44a0..ca99996 100644 (file)
@@ -28,7 +28,6 @@
 #include <bundle.h>
 #include <dlog.h>
 #include <Elementary.h>
-#include <efl_extension.h>
 #include <shortcut_manager.h>
 #include <auth-passwd.h>
 #include <krate/krate.h>
index 4d6237b..603570e 100644 (file)
 #include <app.h>
 #include <dlog.h>
 #include <Elementary.h>
-#include <efl_extension.h>
 
 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_ */
index 0bc0c09..a54f301 100644 (file)
 #include <efl_util.h>
 #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;
index 870fa89..69f95d6 100644 (file)
@@ -28,7 +28,6 @@
 #include <bundle.h>
 #include <dlog.h>
 #include <Elementary.h>
-#include <efl_extension.h>
 #include <system_settings.h>
 
 #include <krate/krate.h>
index febca3c..0e5c61c 100644 (file)
@@ -23,7 +23,6 @@
 #include <app.h>
 #include <dlog.h>
 #include <Elementary.h>
-#include <efl_extension.h>
 
 Evas_Object *_create_win(const char *package);
 Evas_Object *_create_conformant(Evas_Object *parent);
index 8e0b681..2494873 100644 (file)
@@ -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");