summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyungdeuk Kim <hd3.kim@samsung.com>2013-08-19 06:09:03 (GMT)
committerHyungdeuk Kim <hd3.kim@samsung.com>2013-08-19 06:11:25 (GMT)
commit4a1e153397f33d71a8e3178a9c88205f99b0193e (patch)
treed5f0507e1bd96e3fbd79e29debc0c597c9160ef1
parentc263cfb5be4194ab0e3600337180ba90df1e67f9 (diff)
downloadui-gadget-1-4a1e153397f33d71a8e3178a9c88205f99b0193e.zip
ui-gadget-1-4a1e153397f33d71a8e3178a9c88205f99b0193e.tar.gz
ui-gadget-1-4a1e153397f33d71a8e3178a9c88205f99b0193e.tar.bz2
merge latest code / fix prevent issues
Change-Id: I644d827593a43cc5308150bbd7546557a1ea27bb
-rwxr-xr-xclient/ug-client.c10
-rwxr-xr-xpackaging/ui-gadget-1.spec2
-rwxr-xr-xsrc/manager.c55
-rwxr-xr-xug-efl-engine/ug-efl-engine.c14
4 files changed, 57 insertions, 24 deletions
diff --git a/client/ug-client.c b/client/ug-client.c
index 11da8df..18adf88 100755
--- a/client/ug-client.c
+++ b/client/ug-client.c
@@ -229,6 +229,8 @@ static Evas_Object *create_win(const char *name)
ecore_x_window_size_get(ecore_x_window_root_first_get(),
&w, &h);
evas_object_resize(eo, w, h);
+
+ elm_win_indicator_mode_set(eo,ELM_WIN_INDICATOR_SHOW);
}
return eo;
@@ -279,6 +281,11 @@ static int lang_changed(void *data)
return ug_send_event(UG_EVENT_LANG_CHANGE);
}
+static int region_changed(void *data)
+{
+ return ug_send_event(UG_EVENT_REGION_CHANGE);
+}
+
static void _home_screen_top_cb(keynode_t* node, void *data)
{
struct appdata *ad = data;
@@ -352,6 +359,7 @@ static int app_create(void *data)
appcore_set_event_callback(APPCORE_EVENT_LOW_MEMORY, low_memory, ad);
appcore_set_event_callback(APPCORE_EVENT_LOW_BATTERY, low_battery, ad);
appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE, lang_changed, ad);
+ appcore_set_event_callback(APPCORE_EVENT_REGION_CHANGE, region_changed, ad);
return 0;
}
@@ -478,8 +486,6 @@ static int update_argument(const char *optarg, struct appdata *ad)
return -1;
val = optarg + strlen(key) + 1;
- if (!val)
- return -1;
if (!ad->data)
ad->data = bundle_create();
diff --git a/packaging/ui-gadget-1.spec b/packaging/ui-gadget-1.spec
index 7bf3c77..2e73d89 100755
--- a/packaging/ui-gadget-1.spec
+++ b/packaging/ui-gadget-1.spec
@@ -1,7 +1,7 @@
Name: ui-gadget-1
Summary: UI Gadget Library
-Version: 0.1.28
+Version: 0.1.29
Release: 1
Group: System/Libraries
License: Apache License, Version 2.0
diff --git a/src/manager.c b/src/manager.c
index babfe7f..c0a13a3 100755
--- a/src/manager.c
+++ b/src/manager.c
@@ -35,6 +35,11 @@
#include "ug-engine.h"
#include "ug-dbg.h"
+#define Idle_Cb Ecore_Cb
+
+#define ugman_idler_add(func, data) \
+ ecore_job_add((Ecore_Cb) func, (void *)data);
+
struct ug_manager {
ui_gadget_h root;
ui_gadget_h fv_top;
@@ -276,7 +281,7 @@ static void ugman_ug_start(void *data)
_ERR("ug is null");
return;
} else if (ug->state != UG_STATE_CREATED) {
- _ERR("ug(%p) state(%d) is error", ug, ug->state);
+ _DBG("start cb will be not invoked because ug(%p) state(%d) is not created", ug, ug->state);
return;
}
@@ -396,6 +401,9 @@ static int ugman_indicator_update(enum ug_option opt, enum ug_event event)
_DBG("indicator update opt(%d) cur_state(%d)", opt, cur_state);
+#ifndef ENABLE_UG_HANDLE_INDICATOR_HIDE
+ enable = 1;
+#else
switch (GET_OPT_INDICATOR_VAL(opt)) {
case UG_OPT_INDICATOR_ENABLE:
if (event == UG_EVENT_NONE)
@@ -418,11 +426,13 @@ static int ugman_indicator_update(enum ug_option opt, enum ug_event event)
_ERR("update failed: Invalid opt(%d)", opt);
return -1;
}
+#endif
if(cur_state != enable) {
_DBG("set indicator status as %d", enable);
utilx_enable_indicator(ug_man.disp, ug_man.win_id, enable);
}
+
return 0;
}
@@ -495,6 +505,7 @@ static int ugman_ug_destroy(void *data)
ug->state = UG_STATE_DESTROYED;
if((ug != ug_man.root) && (ug->layout) &&
+ (ug->mode == UG_MODE_FULLVIEW) &&
(ug->layout_state != UG_LAYOUT_DESTROY)) {
/* ug_destroy_all case */
struct ug_engine_ops *eng_ops = NULL;
@@ -523,7 +534,7 @@ static int ugman_ug_destroy(void *data)
if((ug->parent) && (ug->parent->state == UG_STATE_PENDING_DESTROY)) {
if((ug->parent->children) && (g_slist_length(ug->parent->children) == 1)) {
_WRN("pended parent ug(%p) destroy job is added to loop", ug->parent);
- ecore_idler_add((Ecore_Task_Cb)ugman_ug_destroy, ug->parent);
+ ugman_idler_add((Idle_Cb)ugman_ug_destroy, ug->parent);
} else {
_WRN("pended parent ug(%p) will be destroyed after another children is destroyed", ug->parent);
}
@@ -562,7 +573,7 @@ static void ug_hide_end_cb(void *data)
_WRN("child ug is still destroying. parent ug(%p) will be destroyed later", ug);
ug->state = UG_STATE_PENDING_DESTROY;
} else {
- ecore_idler_add((Ecore_Task_Cb)ugman_ug_destroy, (void *)ug);
+ ugman_idler_add((Idle_Cb)ugman_ug_destroy, (void *)ug);
}
}
@@ -596,6 +607,8 @@ static int ugman_ug_create(void *data)
if (ug->mode == UG_MODE_FULLVIEW) {
if (eng_ops && eng_ops->create) {
ug_man.conform = eng_ops->create(ug_man.win, ug, ugman_ug_start);
+ if(!ug_man.conform)
+ return -1;
}
}
cbs = &ug->cbs;
@@ -653,6 +666,7 @@ int ugman_ug_add(ui_gadget_h parent, ui_gadget_h ug)
case UG_STATE_DESTROYED:
_WRN("parent(%p) state(%d) error", parent, parent->state);
return -1;
+ default:;
}
}
@@ -718,7 +732,8 @@ ui_gadget_h ugman_ug_load(ui_gadget_h parent,
int ugman_ug_destroying(ui_gadget_h ug)
{
struct ug_module_ops *ops = NULL;
- GSList *child, *trail;
+
+ _DBG("ugman_ug_destroying");
ug->destroy_me = 1;
ug->state = UG_STATE_DESTROYING;
@@ -790,6 +805,7 @@ int ugman_ug_del(ui_gadget_h ug)
}
}
}
+
if((is_update)&&(t)) {
ugman_ug_getopt(t);
}
@@ -797,14 +813,17 @@ int ugman_ug_del(ui_gadget_h ug)
if (ug_man.engine)
eng_ops = &ug_man.engine->ops;
- if (eng_ops && eng_ops->destroy)
- if (ug->mode == UG_MODE_FULLVIEW)
+ if (ug->mode == UG_MODE_FULLVIEW) {
+ if (eng_ops && eng_ops->destroy)
eng_ops->destroy(ug, ug_man.fv_top, ug_hide_end_cb);
- else {
- eng_ops->destroy(ug, NULL, ug_hide_end_cb);
- }
- else
- ecore_idler_add((Ecore_Task_Cb)ugman_ug_destroy, ug);
+ else
+ ugman_idler_add((Idle_Cb)ugman_ug_destroy, ug);
+ } else {
+ _DBG("ug(%p) mode is frameview", ug);
+ ug_hide_end_cb(ug);
+ }
+
+ _DBG("ugman_ug_del(%p) end", ug);
return 0;
}
@@ -855,13 +874,17 @@ int ugman_ug_del_all(void)
int ugman_init(Display *disp, Window xid, void *win, enum ug_option opt)
{
- ug_man.is_initted = 1;
ug_man.win = win;
ug_man.disp = disp;
ug_man.win_id = xid;
ug_man.base_opt = opt;
ug_man.last_rotate_evt = UG_EVENT_NONE;
- ug_man.engine = ug_engine_load();
+
+ if (!ug_man.is_initted) {
+ ug_man.engine = ug_engine_load();
+ }
+
+ ug_man.is_initted = 1;
return 0;
}
@@ -881,7 +904,7 @@ int ugman_resume(void)
_DBG("ugman_resume called");
- ecore_idler_add((Ecore_Task_Cb)ugman_ug_resume, ug_man.root);
+ ugman_idler_add((Idle_Cb)ugman_ug_resume, ug_man.root);
return 0;
}
@@ -901,7 +924,7 @@ int ugman_pause(void)
_DBG("ugman_pause called");
- ecore_idler_add((Ecore_Task_Cb)ugman_ug_pause, ug_man.root);
+ ugman_idler_add((Idle_Cb)ugman_ug_pause, ug_man.root);
return 0;
}
@@ -948,7 +971,7 @@ int ugman_send_event(enum ug_event event)
is_rotation = 0;
}
- ecore_idler_add((Ecore_Task_Cb)ugman_send_event_pre, (void *)event);
+ ugman_idler_add((Idle_Cb)ugman_send_event_pre, (void *)event);
if (is_rotation && ug_man.fv_top)
ugman_indicator_update(ug_man.fv_top->opt, event);
diff --git a/ug-efl-engine/ug-efl-engine.c b/ug-efl-engine/ug-efl-engine.c
index 0721c4b..88ff163 100755
--- a/ug-efl-engine/ug-efl-engine.c
+++ b/ug-efl-engine/ug-efl-engine.c
@@ -36,7 +36,7 @@ static Evas_Object *conform = NULL;
static void on_show_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void (*show_end_cb)(void* data) = NULL;
static void (*hide_end_cb)(void* data) = NULL;
-
+static void __show_finished(void *data, Evas_Object *obj, void *event_info);
static Evas_Object *_get_win_conformant(Evas_Object *win)
{
@@ -239,9 +239,12 @@ static void on_destroy(ui_gadget_h ug, ui_gadget_h t_ug,
if(ug->layout_state == UG_LAYOUT_SHOW) {
__del_effect_top_layout(ug);
+ } else if (ug->layout_state == UG_LAYOUT_SHOWEFFECT) {
+ evas_object_smart_callback_del(navi, "transition,finished",
+ __show_finished);
+ __del_effect_top_layout(ug);
} else if (ug->layout_state == UG_LAYOUT_HIDE
- || ug->layout_state == UG_LAYOUT_NOEFFECT
- || ug->layout_state == UG_LAYOUT_SHOWEFFECT) {
+ || ug->layout_state == UG_LAYOUT_NOEFFECT) {
__del_effect_layout(ug, t_ug);
} else if (ug->layout_state == UG_LAYOUT_HIDEEFFECT) {
;
@@ -330,9 +333,10 @@ static void *on_create(void *win, ui_gadget_h ug,
if (con) {
conform = con;
_DBG("\t There is conformant");
+ } else {
+ _ERR("\t There is no conformant");
+ return NULL;
}
- else
- _DBG("\t There is NO conformant");
if (!navi) {
navi = elm_naviframe_add(conform);