From 557d07f085db6f8ac12621bda74ac47b3c59e10b Mon Sep 17 00:00:00 2001 From: "huayong.xu" Date: Fri, 2 Feb 2024 19:44:55 +0800 Subject: [PATCH] [NUI][API10] Add a WebView API for notifying orientation change. --- src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs | 3 +++ src/Tizen.NUI/src/public/WebView/WebView.cs | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs b/src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs index 0235d7c..c35ad24 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 ee35d7f..ce0a3b6 100755 --- a/src/Tizen.NUI/src/public/WebView/WebView.cs +++ b/src/Tizen.NUI/src/public/WebView/WebView.cs @@ -1902,6 +1902,16 @@ namespace Tizen.NUI.BaseComponents } /// + /// 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. /// /// The name of custom header -- 2.7.4