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)
%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)
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)
dlog
glib-2.0
bundle
- efl-extension
elementary
capi-appfw-application
capi-ui-efl-util
#include <bundle.h>
#include <dlog.h>
#include <Elementary.h>
-#include <efl_extension.h>
#ifdef LOG_TAG
#undef LOG_TAG
#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);
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()
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);
}
#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>
#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_ */
#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;
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;
}
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);
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);
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;
#include <bundle.h>
#include <dlog.h>
#include <Elementary.h>
-#include <efl_extension.h>
#include <system_settings.h>
#include <krate/krate.h>
#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);
#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, };
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;
__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;
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");