[NUI] Binds GetCurrentProperty to Animatable class
authorseungho baek <sbsh.baek@samsung.com>
Mon, 15 May 2023 06:47:06 +0000 (15:47 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 22 May 2023 10:12:20 +0000 (19:12 +0900)
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
src/Tizen.NUI/src/internal/Common/Object.cs
src/Tizen.NUI/src/internal/Interop/Interop.Handle.cs
src/Tizen.NUI/src/public/Animation/Animatable.cs

index 86cc9b9..81a5078 100755 (executable)
@@ -37,6 +37,17 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
+        public static PropertyValue GetCurrentProperty(global::System.Runtime.InteropServices.HandleRef handle, int index)
+        {
+            if (handle.Handle == System.IntPtr.Zero)
+            {
+                throw new System.InvalidOperationException("Error! NUI's native dali object is already disposed. OR the native dali object handle of NUI becomes null!");
+            }
+
+            PropertyValue ret = new PropertyValue(Interop.Handle.GetCurrentProperty(handle, index), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
 
         public static void SetProperty(global::System.Runtime.InteropServices.HandleRef handle, int index, PropertyValue propertyValue)
         {
index 2d1104e..c00568c 100755 (executable)
@@ -68,6 +68,9 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Handle_GetProperty")]
             public static extern global::System.IntPtr GetProperty(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Handle_GetCurrentProperty")]
+            public static extern global::System.IntPtr GetCurrentProperty(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Handle_AddPropertyNotification__SWIG_0")]
             public static extern global::System.IntPtr AddPropertyNotification(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
index e77f667..91233e6 100755 (executable)
@@ -200,6 +200,18 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Retrieves the latest rendered frame value of the property.
+        /// </summary>
+        /// <param name="index">The index of the property.</param>
+        /// <returns>The property value.</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public PropertyValue GetCurrentProperty(int index)
+        {
+            PropertyValue ret = Tizen.NUI.Object.GetCurrentProperty(SwigCPtr, index);
+            return ret;
+        }
+
+        /// <summary>
         /// Adds a property notification to this object.
         /// </summary>
         /// <param name="property">The name of the property.</param>