From: huayong.xu Date: Fri, 2 Feb 2024 11:32:06 +0000 (+0800) Subject: [NUI][API11] Add a WebView API for notifying orientation change. X-Git-Tag: submit/tizen_8.0/20240205.012351~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87a371a8b5cb201971b102c603bf44cd2978b51f;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI][API11] Add a WebView API for notifying orientation change. --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs index 01c7d1076..c0f356789 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs @@ -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); diff --git a/src/Tizen.NUI/src/public/WebView/WebView.cs b/src/Tizen.NUI/src/public/WebView/WebView.cs index 8057256c4..0d9f11b8f 100755 --- a/src/Tizen.NUI/src/public/WebView/WebView.cs +++ b/src/Tizen.NUI/src/public/WebView/WebView.cs @@ -1765,6 +1765,16 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Change orientation. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public void ChangeOrientation(Window.WindowOrientation orientation) + { + Interop.WebView.ChangeOrientation(SwigCPtr, (int)orientation); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// Adds custom header. ///