From: Eunki, Hong Date: Wed, 26 Apr 2023 05:45:11 +0000 (+0900) Subject: [NUI] LoopingMode enum for Animation class X-Git-Tag: submit/tizen/20230502.074904~1^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bed814c84c1e1b9c2c1de1654010cf6844d722bb;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] LoopingMode enum for Animation class Let we allow to animation auto_reversed Signed-off-by: Eunki, Hong --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs index 5e1249506..7e94a96cb 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs @@ -116,6 +116,12 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_Clear")] public static extern void Clear(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_SetLoopingMode")] + public static extern void SetLoopingMode(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_GetLoopingMode")] + public static extern int GetLoopingMode(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Animation_SetProgressNotification")] public static extern void SetProgressNotification(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2); diff --git a/src/Tizen.NUI/src/public/Animation/Animation.cs b/src/Tizen.NUI/src/public/Animation/Animation.cs index 07f95a68f..017177c74 100755 --- a/src/Tizen.NUI/src/public/Animation/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation/Animation.cs @@ -209,6 +209,28 @@ namespace Tizen.NUI Paused } + /// + /// Enumeration for what looping mode is in. + /// + /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names")] + public enum LoopingModes + { + /// + /// When the animation arrives at the end in looping mode, the animation restarts from the beginning. (Default) + /// + /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + Restart, + /// + /// When the animation arrives at the end in looping mode, the animation reverses direction and runs backwards again. + /// + /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + AutoReverse + } + /// /// Gets or sets the duration in milliseconds of the animation. /// This duration is applied to the animations are added after the Duration is set. @@ -457,6 +479,26 @@ namespace Tizen.NUI } } + /// + /// Enumeration for what looping mode is in. + /// + /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public LoopingModes LoopingMode + { + set + { + Interop.Animation.SetLoopingMode(SwigCPtr, (int)value); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + get + { + Animation.LoopingModes ret = (Animation.LoopingModes)Interop.Animation.GetLoopingMode(SwigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve()); + return ret; + } + } + /// /// Gets or sets the properties of the animation. ///