[NUI] Add NUIApplicaion.GetScreenSize
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 17 Jan 2023 06:05:24 +0000 (15:05 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Wed, 25 Jan 2023 09:22:01 +0000 (18:22 +0900)
To provide the screen size, NUIApplication.GetScreenSize is added.

src/Tizen.NUI/src/internal/Interop/Interop.Application.cs
src/Tizen.NUI/src/public/Application/NUIApplication.cs

index a258523..866f891 100755 (executable)
@@ -94,6 +94,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New__SWIG_6")]
             public static extern global::System.IntPtr New(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5, bool jarg7);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetScreenSize")]
+            public static extern global::System.IntPtr GetScreenSize();
         }
     }
 }
index e83d75c..3d635d2 100755 (executable)
@@ -475,6 +475,18 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Gets the screen size
+        /// </summary>
+        /// <returns>Screen size</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        static public Size GetScreenSize()
+        {
+            var ret = new Size(Interop.Application.GetScreenSize(), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
         /// Overrides this method if you want to handle behavior.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>