summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunho Kang <hhstark.kang@samsung.com>2016-11-04 09:58:41 (GMT)
committerHyunho Kang <hhstark.kang@samsung.com>2016-11-29 08:37:56 (GMT)
commit7c1c51c1f4134973bf6c7545399c621eb92a2416 (patch)
treebab5111b245dabd1dc4f15f576b0514d7aba62d3
parent564281ad3c394a848de8f43b04d31b2e12d5fd16 (diff)
downloadui-gadget-1-7c1c51c1f4134973bf6c7545399c621eb92a2416.zip
ui-gadget-1-7c1c51c1f4134973bf6c7545399c621eb92a2416.tar.gz
ui-gadget-1-7c1c51c1f4134973bf6c7545399c621eb92a2416.tar.bz2
Add handling orientation change eventrefs/changes/01/100801/1
Change-Id: Idae31c5e483d25487e98d3979e36ea90e67a2747 Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
-rw-r--r--src/manager.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/manager.c b/src/manager.c
index 301f384..0a1a336 100644
--- a/src/manager.c
+++ b/src/manager.c
@@ -231,6 +231,34 @@ func_out:
}
#endif
+static enum ug_event __ug_evas_rotation_get(Evas_Object *win)
+{
+
+ int angle = elm_win_rotation_get(win);
+ enum ug_event func_ret;
+
+ _DBG("win angle : %d", angle);
+
+ switch (angle) {
+ case 0:
+ func_ret = UG_EVENT_ROTATE_PORTRAIT;
+ break;
+ case 90:
+ func_ret = UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN;
+ break;
+ case 180:
+ func_ret = UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN;
+ break;
+ case 270:
+ func_ret = UG_EVENT_ROTATE_LANDSCAPE;
+ break;
+ default:
+ func_ret = UG_EVENT_ROTATE_PORTRAIT;
+ break;
+ }
+ return func_ret;
+}
+
static void ugman_tree_dump(ui_gadget_h ug)
{
static int i;
@@ -583,6 +611,8 @@ static int ugman_ug_create(void *data)
if (ug_man.last_rotate_evt == UG_EVENT_NONE) {
#ifndef UG_WAYLAND
ug_man.last_rotate_evt = __ug_x_rotation_get(ug_man.disp, ug_man.win_id);
+#else
+ ug_man.last_rotate_evt = __ug_evas_rotation_get((Evas_Object *)ug_man.win);
#endif
}
ugman_ug_event(ug, ug_man.last_rotate_evt);