[NUI] Add SetTapMaximumMotionAllowedDistance
authorjoogab.yun <joogab.yun@samsung.com>
Thu, 28 Mar 2024 05:36:13 +0000 (14:36 +0900)
committerhuiyu <35286162+huiyueun@users.noreply.github.com>
Wed, 3 Apr 2024 07:01:49 +0000 (16:01 +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 95796711feed66375081ec008f1c002d0f7c2ade..56e223f8fb4adb608de471312f9dae436c0f9467 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 6ac9977b1b343bc046d1d06a1860a60c5d86cebe..41158af9d8982d248d7860923f3a511bf72c7788 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();
+        }
     }
 }