From: seungho baek Date: Wed, 25 Jan 2023 05:07:05 +0000 (+0900) Subject: [NUI] Add GetOverlayLayer in NUI window. X-Git-Tag: submit/tizen_7.0/20230125.150845~1^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4477e972f24a5d9335ecd6e6acb51897d4719db;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add GetOverlayLayer in NUI window. - The overlay layer is rendered at the end of rendering order Signed-off-by: seungho baek --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index a85b913..457692f 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -209,6 +209,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetRootLayer")] public static extern global::System.IntPtr GetRootLayer(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetOverlayLayer")] + public static extern global::System.IntPtr GetOverlayLayer(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_KeyEventSignal")] public static extern global::System.IntPtr KeyEventSignal(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/public/Window/Window.cs b/src/Tizen.NUI/src/public/Window/Window.cs index 796b7b9..7d14f9f 100755 --- a/src/Tizen.NUI/src/public/Window/Window.cs +++ b/src/Tizen.NUI/src/public/Window/Window.cs @@ -36,6 +36,7 @@ namespace Tizen.NUI { private HandleRef stageCPtr; private Layer rootLayer; + private Layer overlayLayer; private Layer borderLayer; private string windowTitle; private List childLayers = new List(); @@ -931,6 +932,24 @@ namespace Tizen.NUI } /// + /// Gets the overlay layer. + /// + /// The overlay layer. + [EditorBrowsable(EditorBrowsableState.Never)] + public Layer GetOverlayLayer() + { + // Window.IsInstalled() is actually true only when called from event thread and + // Core has been initialized, not when Stage is ready. + if (overlayLayer == null && Window.IsInstalled()) + { + overlayLayer = new Layer(Interop.Window.GetOverlayLayer(SwigCPtr), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + overlayLayer.SetWindow(this); + } + return overlayLayer; + } + + /// /// Add a child view to window. /// /// the child should be added to the window.