This is similar to MouseButton in TouchEvent.
Now, you can see from which input the gesture was made.
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-core/+/283368/
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-csharp-binder/+/283369/
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gesture_time_get")]
public static extern uint TimeGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gesture_sourceType_get")]
+ public static extern int SourceTypeGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gesture_sourceData_get")]
+ public static extern int SourceDataGet(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Gesture_SWIGUpcast")]
public static extern global::System.IntPtr Upcast(global::System.IntPtr jarg1);
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TapGesture_localPoint_get")]
public static extern global::System.IntPtr LocalPointGet(global::System.Runtime.InteropServices.HandleRef jarg1);
- [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TapGesture_sourceType_get")]
- public static extern int SourceTypeGet(global::System.Runtime.InteropServices.HandleRef jarg1);
}
}
}
}
/// <summary>
+ /// This is the value of which source the gesture was started with. (ex : mouse)
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum SourceType
+ {
+ /// <summary>
+ /// invalid data.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Invalid,
+ /// <summary>
+ /// Mouse.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Mouse,
+ }
+
+ /// <summary>
+ /// This is the data of source type
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum SourceDataType
+ {
+ /// <summary>
+ /// invalid data.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Invalid = -1,
+ /// <summary>
+ /// Primary(Left) mouse button.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ MousePrimary = 1,
+ /// <summary>
+ /// Secondary(Right) mouse button.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ MouseSecondary = 3,
+ /// <summary>
+ /// Tertiary(Third) mouse button.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ MouseTertiary = 2,
+ }
+
+ /// <summary>
/// The gesture type.
/// </summary>
/// <since_tizen> 3 </since_tizen>
}
}
+ /// <summary>
+ /// This is the property of which source type the gesture (read-only).
+ /// If you started the gesture with the mouse, it will tell you what type of mouse it is.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Gesture.SourceType Source
+ {
+ get
+ {
+ return sourceType;
+ }
+ }
+
+ /// <summary>
+ /// This is a property of the source type data (read-only).
+ /// If you started the gesture with the mouse, it will tell you which mouse button you started the gesture with.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Gesture.SourceDataType SourceData
+ {
+ get
+ {
+ return sourceDataType;
+ }
+ }
+
private Gesture.GestureType type
{
set
}
}
+ private Gesture.SourceType sourceType
+ {
+ get
+ {
+ Gesture.SourceType ret = (Gesture.SourceType)Interop.Gesture.SourceTypeGet(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
+ private Gesture.SourceDataType sourceDataType
+ {
+ get
+ {
+ Gesture.SourceDataType ret = (Gesture.SourceDataType)Interop.Gesture.SourceDataGet(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+
internal static Gesture GetGestureFromPtr(global::System.IntPtr cPtr)
{
Gesture ret = new Gesture(cPtr, false);
Interop.Gesture.DeleteGesture(swigCPtr);
}
}
+
}
* limitations under the License.
*
*/
+using System;
using System.ComponentModel;
namespace Tizen.NUI
/// <summary>
/// The gesture source type of touches property (read-only).
- /// If you tap with a mouse button, this will tell you which mouse input you tapped.
+ /// If you touch with a mouse button, this will tell you which mouse input you touched.
/// Primary(Left), Secondary(Right). Tertiary(Wheel).
+ /// Deprecated. This api will be deleted without notice. Please do not use it.
/// </summary>
+ [Obsolete("This property will be deleted without notice. Please do not use it. Use Gesture.SourceData instead.")]
[EditorBrowsable(EditorBrowsableState.Never)]
- public GestureSourceType SourceType
+ public new GestureSourceType SourceType
{
get
{
- return sourceType;
+ return (GestureSourceType)SourceData;
}
}
}
}
- private GestureSourceType sourceType
- {
- get
- {
- GestureSourceType ret = (GestureSourceType)Interop.TapGesture.SourceTypeGet(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
/// <summary>
/// Gets the TapGesture from the pointer.
/// </summary>
/// <summary>
/// Gesture source type.
+ /// Deprecated. This value will be deleted without notice. Please do not use it.
/// </summary>
+ [Obsolete("This enum will be deleted without notice. Please do not use it.")]
[EditorBrowsable(EditorBrowsableState.Never)]
public enum GestureSourceType
{
[EditorBrowsable(EditorBrowsableState.Never)]
Tertiary = 2,
}
+
}