From: Wonsik Jung Date: Fri, 27 Dec 2019 10:00:36 +0000 (+0900) Subject: [NUI] Add to get current window orientation. (#1250) X-Git-Tag: accepted/tizen/5.5/unified/20191230.212157~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8abe184ad9530ec9fa085eba97337ad4d7180dff;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add to get current window orientation. (#1250) Add the API to get current window orientation. It is to return the logical orientation --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index bd225aa..65f646e 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -58,6 +58,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetPreferredOrientation")] public static extern int Window_GetPreferredOrientation(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetCurrentOrientation")] + public static extern int Window_GetCurrentOrientation(global::System.Runtime.InteropServices.HandleRef jarg1); [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetPositionSize")] public static extern void Window_SetPositionSize(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); @@ -217,4 +220,4 @@ namespace Tizen.NUI public static extern global::System.IntPtr GetParent(global::System.Runtime.InteropServices.HandleRef jarg1); } } -} \ No newline at end of file +} diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index cb182bc..37794f4 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -1091,6 +1091,19 @@ namespace Tizen.NUI return ret; } + /// + /// Gets current orientation of the window. + /// + /// 6 + /// The current window orientation if previously set, or none. + [EditorBrowsable(EditorBrowsableState.Never)] + public Window.WindowOrientation GetCurrentOrientation() + { + Window.WindowOrientation ret = (Window.WindowOrientation)Interop.Window.Window_GetCurrentOrientation(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + internal Any GetNativeHandle() { Any ret = new Any(Interop.WindowInternal.Window_GetNativeHandle(swigCPtr), true);