[NUI] LoopingMode enum for Animation class
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 26 Apr 2023 05:45:11 +0000 (14:45 +0900)
committerSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Tue, 2 May 2023 07:43:54 +0000 (16:43 +0900)
Let we allow to animation auto_reversed

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.Animation.cs
src/Tizen.NUI/src/public/Animation/Animation.cs

index 5e12495..7e94a96 100755 (executable)
@@ -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);
 
index 07f95a6..017177c 100755 (executable)
@@ -210,6 +210,28 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Enumeration for what looping mode is in.
+        /// </summary>
+        /// 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
+        {
+            /// <summary>
+            /// When the animation arrives at the end in looping mode, the animation restarts from the beginning. (Default)
+            /// </summary>
+            /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Restart,
+            /// <summary>
+            /// When the animation arrives at the end in looping mode, the animation reverses direction and runs backwards again.
+            /// </summary>
+            /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            AutoReverse
+        }
+
+        /// <summary>
         /// Gets or sets the duration in milliseconds of the animation.
         /// This duration is applied to the animations are added after the Duration is set.
         /// </summary>
@@ -458,6 +480,26 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Enumeration for what looping mode is in.
+        /// </summary>
+        /// 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;
+            }
+        }
+
+        /// <summary>
         /// Gets or sets the properties of the animation.
         /// </summary>
         //ToDo : will raise deprecated-ACR, [Obsolete("Deprecated in API9, will be removed in API11, Use PropertyList instead")]