Skip to content

Commit

Permalink
[NUI] Add SetTapMaximumMotionAllowedDistance
Browse files Browse the repository at this point in the history
  • Loading branch information
JoogabYun committed Mar 29, 2024
1 parent 10f1096 commit be78de0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Tizen.NUI/src/internal/Interop/Interop.GestureOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ internal static partial class GestureOptions

[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);
}
}
}
14 changes: 14 additions & 0 deletions src/Tizen.NUI/src/public/Events/GestureOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,5 +353,19 @@ public void SetTapRecognizerTime(uint ms)
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();
}
}
}

0 comments on commit be78de0

Please sign in to comment.