From ec6e66d8f3760f840cac2051e5cb6f8dc56c2669 Mon Sep 17 00:00:00 2001 From: tscholb Date: Mon, 8 Jul 2019 15:31:15 +0900 Subject: [PATCH] [NUI] Add API for GetWindowList() (#927) * [NUI] Add API for GetWindowList() After apply MultiWindow, Developer need to know list of window. * [NUI] change API for GetWindowList() change API for using native API. --- src/Tizen.NUI/src/internal/Application.cs | 14 ++++++++++++++ src/Tizen.NUI/src/internal/Interop/Interop.Application.cs | 12 +++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index f10567d..af1f535 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -1354,6 +1354,20 @@ namespace Tizen.NUI return ret; } + internal List GetWindowList() + { + uint ListSize = Interop.Application.Application_GetWindowsListSize(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + List WindowList = new List(); + for( uint i = 0; i < ListSize; ++i ) + { + Window currWin = new Window(Interop.Application.Application_GetWindowsFromList(i), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + WindowList.Add(currWin); + } + return WindowList; + } internal ApplicationSignal InitSignal() { diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Application.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Application.cs index 007c2d5..6f13447 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Application.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Application.cs @@ -63,7 +63,14 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_GetWindow")] public static extern global::System.IntPtr Application_GetWindow(global::System.Runtime.InteropServices.HandleRef jarg1); - + + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_GetWindowsListSize")] + public static extern uint Application_GetWindowsListSize(); + + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_GetWindowsFromList")] + public static extern global::System.IntPtr Application_GetWindowsFromList(uint jarg1); //window handle test [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_GetWindowHandleFromNUI")] @@ -85,12 +92,11 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_GetRegion")] public static extern string Application_GetRegion(global::System.Runtime.InteropServices.HandleRef jarg1); - + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New__SWIG_4")] public static extern global::System.IntPtr Application_New__SWIG_4(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5); - } } } -- 2.7.4