[NUI][API11] Add a WebView API for notifying orientation change.
authorhuayong.xu <huayong.xu@samsung.com>
Fri, 2 Feb 2024 11:32:06 +0000 (19:32 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 5 Feb 2024 01:19:52 +0000 (10:19 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs
src/Tizen.NUI/src/public/WebView/WebView.cs

index 01c7d107672b02f24543d2af4017d72b5db19ed0..c0f3567890463a67e0a8d6d66407cc36347c6c9f 100755 (executable)
@@ -150,6 +150,9 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_ResumeNetworkLoading")]
             public static extern void ResumeNetworkLoading(global::System.Runtime.InteropServices.HandleRef jarg1);
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_ChangeOrientation")]
+            public static extern void ChangeOrientation(global::System.Runtime.InteropServices.HandleRef jarg1, int orientation);
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebView_AddCustomHeader")]
             [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool AddCustomHeader(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3);
index 8057256c45350dccabd27345d12a166d8f92ffd9..0d9f11b8f45daa11b72085a1768889a336cb3b8e 100755 (executable)
@@ -1765,6 +1765,16 @@ namespace Tizen.NUI.BaseComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Change orientation.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void ChangeOrientation(Window.WindowOrientation orientation)
+        {
+            Interop.WebView.ChangeOrientation(SwigCPtr, (int)orientation);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
         /// <summary>
         /// Adds custom header.
         /// </summary>