[NUI] Add API for GetWindowList() (#927)
authortscholb <scholb.kim@samsung.com>
Mon, 8 Jul 2019 06:31:15 +0000 (15:31 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 8 Jul 2019 06:31:15 +0000 (15:31 +0900)
* [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
src/Tizen.NUI/src/internal/Interop/Interop.Application.cs

index f10567d..af1f535 100755 (executable)
@@ -1354,6 +1354,20 @@ namespace Tizen.NUI
             return ret;
         }
 
+        internal List<Window> GetWindowList()
+        {
+            uint ListSize = Interop.Application.Application_GetWindowsListSize();
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+            List<Window> WindowList = new List<Window>();
+            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()
         {
index 007c2d5..6f13447 100755 (executable)
@@ -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);
 
-
         }
     }
 }