From: Wonsik Jung Date: Wed, 26 Feb 2020 04:07:22 +0000 (+0900) Subject: [NUI] Add to set Available Orientations (#1258) X-Git-Tag: submit/tizen_5.5_tv/20200227.005159~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e8b20978aa2e8226e346b9aaec6f05f09bf174b;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add to set Available Orientations (#1258) Add to set Available Orientations. This API is for adding serveral orientations one time. --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index 65f646e9e..ecbb5fa00 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -61,6 +61,9 @@ namespace Tizen.NUI [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_SetAvailableOrientations")] + public static extern void Window_SetAvailableOrientations(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); [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); diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 98865e8a7..78fd4d6b7 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -1097,6 +1097,25 @@ namespace Tizen.NUI return ret; } + /// + /// Sets available orientations of the window. + /// This API is for setting several orientations one time. + /// + /// The list of orientations. + /// 6 + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetAvailableOrientations( List orientations ) + { + PropertyArray orientationArray = new PropertyArray(); + for( int i = 0; i < orientations.Count; i++ ) + { + orientationArray.PushBack(new PropertyValue((int)orientations[i])); + } + + Interop.Window.Window_SetAvailableOrientations(swigCPtr, PropertyArray.getCPtr(orientationArray)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + internal Any GetNativeHandle() { Any ret = new Any(Interop.WindowInternal.Window_GetNativeHandle(swigCPtr), true);