[NUI] Partial update feature enable/disable for window
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 4 Jul 2023 04:13:37 +0000 (13:13 +0900)
committerBowon Ryu <wonrst22@naver.com>
Wed, 5 Jul 2023 07:42:04 +0000 (16:42 +0900)
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.Window.cs
src/Tizen.NUI/src/public/Window/Window.cs

index a453cc670af2d8d88b4033e973454dde45d5a7d5..26cf90fa44318cc47d93113c28f0611612a4849c 100755 (executable)
@@ -176,6 +176,13 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetPosition")]
             public static extern global::System.IntPtr GetPosition(global::System.Runtime.InteropServices.HandleRef jarg1);
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetPartialUpdateEnabled")]
+            public static extern void SetPartialUpdateEnabled(global::System.Runtime.InteropServices.HandleRef window, bool enabled);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_IsPartialUpdateEnabled")]
+            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+            public static extern bool IsPartialUpdateEnabled(global::System.Runtime.InteropServices.HandleRef window);
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetTransparency")]
             public static extern global::System.IntPtr SetTransparency(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
 
index a6c6c42dceed520346c7f39cb4204a871fe9363c..96e2950d70967df38daef9b63836d09804b9f555 100755 (executable)
@@ -566,6 +566,24 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Gets or sets whether the window will update partial area or full area.
+        /// If this value is true, window will update and render partial area.
+        /// If false, full area updated.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool PartialUpdate
+        {
+            get
+            {
+                return IsPartialUpdate();
+            }
+            set
+            {
+                SetPartialUpdate(value);
+            }
+        }
+
         internal static Vector4 DEFAULT_BACKGROUND_COLOR
         {
             get
@@ -1632,6 +1650,27 @@ namespace Tizen.NUI
             // Setting Position of the window should request a relayout of the tree.
         }
 
+        /// <summary>
+        /// Set the window use partial update or not.
+        /// </summary>
+        /// <param name="enabled">If window enable partial update or disable.</param>
+        internal void SetPartialUpdate(bool enabled)
+        {
+            Interop.Window.SetPartialUpdateEnabled(SwigCPtr, enabled);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Returns whether the window is enabled partial update or not.
+        /// </summary>
+        /// <returns>True if the window is enabled partial update, false otherwise.</returns>
+        internal bool IsPartialUpdate()
+        {
+            bool ret = Interop.Window.IsPartialUpdateEnabled(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
         /// <summary>
         /// Enables the floating mode of window.
         /// The floating mode is to support window is moved or resized by display server.