[NUI] Flush action implement for LottieAnimationView
authorEunki, Hong <eunkiki.hong@samsung.com>
Tue, 24 Oct 2023 02:55:19 +0000 (11:55 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Wed, 25 Oct 2023 12:48:44 +0000 (21:48 +0900)
Implement Flush action. It will be used when user
want to ensure the Lottie property changed applied sequencly.

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

index 89c0a50..f249c1a 100755 (executable)
@@ -33,7 +33,10 @@ namespace Tizen.NUI
             public static extern int AnimatedVectorImageVisualActionJumpToGet();
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_AnimatedVectorImageVisual_Actions_SET_DYNAMIC_PROPERTY_get")]
-            public static extern int AnimatedVectorImageVisualActionSetDynamicProperty();
+            public static extern int AnimatedVectorImageVisualActionSetDynamicPropertyGet();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_AnimatedVectorImageVisual_Actions_FLUSH_get")]
+            public static extern int AnimatedVectorImageVisualActionFlushGet();
         }
     }
 }
index 91ec912..a4447f2 100755 (executable)
@@ -970,7 +970,8 @@ namespace Tizen.NUI.BaseComponents
         internal static readonly int ActionJumpTo = Interop.LottieAnimationView.AnimatedVectorImageVisualActionJumpToGet();
 
         // This is used for internal purpose.
-        internal static readonly int ActionSetDynamicProperty = Interop.LottieAnimationView.AnimatedVectorImageVisualActionSetDynamicProperty();
+        internal static readonly int ActionSetDynamicProperty = Interop.LottieAnimationView.AnimatedVectorImageVisualActionSetDynamicPropertyGet();
+        internal static readonly int ActionFlush = Interop.LottieAnimationView.AnimatedVectorImageVisualActionFlushGet();
 
         internal class VisualEventSignalArgs : EventArgs
         {
@@ -1110,6 +1111,13 @@ namespace Tizen.NUI.BaseComponents
             }
             ret?.Dispose();
         }
+
+        internal void FlushLottieMessages()
+        {
+            NUILog.Debug($"<[{GetId()}]FLUSH>");
+
+            Interop.View.DoActionWithEmptyAttributes(this.SwigCPtr, ImageView.Property.IMAGE, ActionFlush);
+        }
         #endregion Internal