elm_win: implement the elm_win_active_win_orientation_get API 40/75640/3
authorDoyoun Kang <doyoun.kang@samsung.com>
Tue, 21 Jun 2016 00:54:33 +0000 (09:54 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Tue, 21 Jun 2016 10:27:21 +0000 (03:27 -0700)
Change-Id: Ib37c4181c7d4610c26aceec450a8ba59344ea85e

src/lib/elm_win.c

index fbf0e98..91383bf 100644 (file)
@@ -6346,9 +6346,19 @@ elm_win_input_rect_subtract(Evas_Object *obj, Eina_Rectangle *input_rect)
 }
 
 EAPI int
-elm_win_active_win_orientation_get(Evas_Object *obj EINA_UNUSED)
+elm_win_active_win_orientation_get(Evas_Object *obj)
 {
-   //TODO
-   return 0;
+   int angle = -1;
+#ifdef HAVE_ELEMENTARY_WAYLAND
+   Ecore_Wl_Window *win = NULL;
+   if (obj)
+     {
+        ELM_WIN_DATA_GET(obj, sd);
+        if (sd)
+          win = sd->wl.win;
+     }
+   angle = ecore_wl_window_active_angle_get(win);
+#endif
+   return angle;
 }
 //////////////////////////////////////////////////////////////////