Skip to content

Commit

Permalink
[NUI][API10] Add a WebView API for notifying orientation change.
Browse files Browse the repository at this point in the history
  • Loading branch information
huayongxu authored and dongsug-song committed Feb 5, 2024
1 parent b1ce036 commit 557d07f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Tizen.NUI/src/internal/Interop/Interop.WebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ internal static partial class WebView
[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);
Expand Down
10 changes: 10 additions & 0 deletions src/Tizen.NUI/src/public/WebView/WebView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,16 @@ public void ResumeNetworkLoading()
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>
Expand Down

0 comments on commit 557d07f

Please sign in to comment.