From: Wonsik Jung Date: Thu, 29 Aug 2019 02:09:31 +0000 (+0900) Subject: Add SetParent interface (#992) X-Git-Tag: submit/tizen/20190830.005159~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff607138dfabd4cfa5ab3ffe1af249f807b70cae;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Add SetParent interface (#992) Add SetParent, GetParent and Unparent interface. It is to support transient_for function. --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index 1d2ec2b7d..049568979 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -191,6 +191,18 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetNativeWindowHandler")] public static extern System.IntPtr GetNativeWindowHandler(System.IntPtr Window); + + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetParent")] + public static extern void SetParent(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_Unparent")] + public static extern void Unparent(global::System.Runtime.InteropServices.HandleRef jarg1); + + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetParent")] + public static extern global::System.IntPtr GetParent(global::System.Runtime.InteropServices.HandleRef jarg1); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 20d3a574a..7da98b043 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -1458,6 +1458,46 @@ namespace Tizen.NUI } + /// + /// Sets parent window of the window. + /// After setting that, these windows do together when raise-up, lower and iconified/deiconified. + /// Initially, the window is located on top of the parent. The window can go below parent by calling Lower(). + /// If parent's window stack is changed by calling Raise() or Lower(), child windows are located on top of the parent again. + /// + /// The parent window. + /// 6 + /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetParent(Window parent) { + Interop.Window.SetParent(swigCPtr, Window.getCPtr(parent)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Unsets parent window of the window. + /// After unsetting, the window is disconnected his parent window. + /// + /// 6 + /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public void Unparent() { + Interop.Window.Unparent(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets parent window of the window. + /// + /// The parent window of the window. + /// 6 + /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public Window GetParent() { + Window ret = new Window(Interop.Window.GetParent(swigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + /// /// Dispose for Window ///