From: seungho baek Date: Mon, 15 May 2023 06:47:06 +0000 (+0900) Subject: [NUI] Binds GetCurrentProperty to Animatable class X-Git-Tag: accepted/tizen/unified/20231205.024657~315 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb7a86bbf081579b98a92177822ea0ecf8f744eb;hp=99b10bed236d6813acdf488d334009b104640d6c;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Binds GetCurrentProperty to Animatable class Signed-off-by: seungho baek --- diff --git a/src/Tizen.NUI/src/internal/Common/Object.cs b/src/Tizen.NUI/src/internal/Common/Object.cs index 86cc9b9..81a5078 100755 --- a/src/Tizen.NUI/src/internal/Common/Object.cs +++ b/src/Tizen.NUI/src/internal/Common/Object.cs @@ -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) { diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Handle.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Handle.cs index 2d1104e..c00568c 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Handle.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Handle.cs @@ -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); diff --git a/src/Tizen.NUI/src/public/Animation/Animatable.cs b/src/Tizen.NUI/src/public/Animation/Animatable.cs index e77f667..91233e6 100755 --- a/src/Tizen.NUI/src/public/Animation/Animatable.cs +++ b/src/Tizen.NUI/src/public/Animation/Animatable.cs @@ -200,6 +200,18 @@ namespace Tizen.NUI } /// + /// Retrieves the latest rendered frame value of the property. + /// + /// The index of the property. + /// The property value. + [EditorBrowsable(EditorBrowsableState.Never)] + public PropertyValue GetCurrentProperty(int index) + { + PropertyValue ret = Tizen.NUI.Object.GetCurrentProperty(SwigCPtr, index); + return ret; + } + + /// /// Adds a property notification to this object. /// /// The name of the property.