From 75f1849c084bcc73fa6c170a0eca8d6a2c47e023 Mon Sep 17 00:00:00 2001 From: Chihun Jeong <50663828+ANZ1217@users.noreply.github.com> Date: Fri, 3 Nov 2023 10:41:09 +0900 Subject: [PATCH] [NUI] Add a Window constructor using WindowData (#5708) * [NUI] Add a Window constructor using WindowData * Add Information about WindowData to the summary --------- Co-authored-by: ANZ1217 --- .../src/internal/Interop/Interop.Window.cs | 3 +++ src/Tizen.NUI/src/public/Window/Window.cs | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index 84427a9..28e3c55 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -32,6 +32,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_New__SWIG_3")] public static extern global::System.IntPtr New(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_New__WithWindowData")] + public static extern global::System.IntPtr New(string name, string className, global::System.Runtime.InteropServices.HandleRef windowData); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Window__SWIG_0")] public static extern global::System.IntPtr NewWindow(); diff --git a/src/Tizen.NUI/src/public/Window/Window.cs b/src/Tizen.NUI/src/public/Window/Window.cs index 4772bb9..ef73ba2 100755 --- a/src/Tizen.NUI/src/public/Window/Window.cs +++ b/src/Tizen.NUI/src/public/Window/Window.cs @@ -154,6 +154,28 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Creates a new Window with a specific name using WindowData.
+ /// This creates an extra window in addition to the default main window
+ ///
+ /// The name for extra window. + /// The window data + /// A new Window. + /// http://tizen.org/feature/opengles.surfaceless_context + /// The required feature is not supported. + [EditorBrowsable(EditorBrowsableState.Never)] + public Window(string name, WindowData windowData) : this(Interop.Window.New(name, "", WindowData.getCPtr(windowData)), true) + { + if (IsSupportedMultiWindow() == false) + { + NUILog.Error("This device does not support surfaceless_context. So Window cannot be created. "); + } + this.windowTitle = name; + this.EnableBorder(windowData.BorderInterface); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// /// Enumeration for orientation of the window is the way in which a rectangular page is oriented for normal viewing. -- 2.7.4