[NUI] Add SetTapMaximumMotionAllowedDistance
authorjoogab.yun <joogab.yun@samsung.com>
Thu, 28 Mar 2024 05:36:13 +0000 (14:36 +0900)
committerJoogabYun <40262755+JoogabYun@users.noreply.github.com>
Mon, 1 Apr 2024 00:11:20 +0000 (09:11 +0900)
refer
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-core/+/308601/
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-csharp-binder/+/308602/

src/Tizen.NUI/src/internal/Interop/Interop.GestureOptions.cs
src/Tizen.NUI/src/public/Events/GestureOptions.cs

index 9579671..56e223f 100644 (file)
@@ -95,6 +95,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GestureOptions_SetTapRecognizerTime")]
             public static extern void SetTapRecognizerTime(uint ms);
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GestureOptions_SetTapMaximumMotionAllowedDistance")]
+            public static extern void SetTapMaximumMotionAllowedDistance(float distance);
         }
     }
 }
index 6ac9977..41158af 100644 (file)
@@ -353,5 +353,19 @@ namespace Tizen.NUI
             Interop.GestureOptions.SetTapRecognizerTime(ms);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
+
+        /// <summary>
+        /// Sets the distance required to be recognized as a tap gesture,
+        /// This distance is from touch down to touch up to recognize the tap gesture.
+        /// If the distance between touch down and touch up is longer than distance, it is not recognized as a tap gesture.
+        /// </summary>
+        /// <remarks>This is a global configuration option. Affects all gestures.</remarks>
+        /// <param name="distance">The distance</param>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SetTapMaximumMotionAllowedDistance(float distance)
+        {
+            Interop.GestureOptions.SetTapMaximumMotionAllowedDistance(distance);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
     }
 }