These determine whether to send touch and hover motion events or not.
This is used when the user does not want to receive motion events.
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_Property_UPDATE_AREA_HINT_get")]
public static extern int UpdateAreaHintGet();
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Actor_Property_DISPATCH_TOUCH_MOTION_get")]
+ public static extern int DispatchTouchMotionGet();
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Actor_Property_DISPATCH_HOVER_MOTION_get")]
+ public static extern int DispatchHoverMotionGet();
}
}
}
});
/// <summary>
+ /// DispatchTouchMotionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty DispatchTouchMotionProperty = BindableProperty.Create(nameof(DispatchTouchMotion), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalDispatchTouchMotion = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalDispatchTouchMotion;
+ });
+
+ /// <summary>
+ /// DispatchHoverMotionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty DispatchHoverMotionProperty = BindableProperty.Create(nameof(DispatchHoverMotion), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalDispatchHoverMotion = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalDispatchHoverMotion;
+ });
+
+ /// <summary>
/// Gets View's Size2D set by user.
/// </summary>
internal Size2D GetUserSize2D()
internal static readonly int AccessibilityHidden = Interop.ViewProperty.AccessibilityHiddenGet();
internal static readonly int AutomationId = Interop.ViewProperty.AutomationIdGet();
internal static readonly int UpdateAreaHint = Interop.ActorProperty.UpdateAreaHintGet();
+ internal static readonly int DispatchTouchMotion = Interop.ActorProperty.DispatchTouchMotionGet();
+ internal static readonly int DispatchHoverMotion = Interop.ActorProperty.DispatchHoverMotionGet();
}
}
}
private bool dispatchParentHoverEvents = true;
private bool dispatchGestureEvents = true;
private bool dispatchParentGestureEvents = true;
- private bool dispatchTouchMotion = true;
- private bool dispatchHoverMotion = true;
/// <summary>
TouchEventArgs e = new TouchEventArgs();
e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
- // If DispatchTouchMotion is false, Motion event is not dispatched.
- if (DispatchTouchMotion == false && e.Touch.GetState(0) == PointStateType.Motion)
- {
- return true;
- }
-
bool consumed = false;
if (interceptTouchDataEventHandler != null)
TouchEventArgs e = new TouchEventArgs();
e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
- // If DispatchTouchMotion is false, Motion event is not dispatched.
- if (DispatchTouchMotion == false && e.Touch.GetState(0) == PointStateType.Motion)
- {
- return true;
- }
-
-
bool consumed = false;
if (touchDataEventHandler != null)
HoverEventArgs e = new HoverEventArgs();
e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
- // If DispatchHoverMotion is false, Motion event is not dispatched.
- if (DispatchHoverMotion == false && e.Hover.GetState(0) == PointStateType.Motion)
- {
- return true;
- }
-
bool consumed = false;
if (hoverEventHandler != null)
{
get
{
- return dispatchTouchMotion;
+ return (bool)GetValue(DispatchTouchMotionProperty);
+ }
+ set
+ {
+ SetValue(DispatchTouchMotionProperty, value);
+ }
+ }
+
+ private bool InternalDispatchTouchMotion
+ {
+ get
+ {
+ return Object.InternalGetPropertyBool(SwigCPtr, View.Property.DispatchTouchMotion);
}
set
{
- dispatchTouchMotion = value;
+ Object.InternalSetPropertyBool(SwigCPtr, View.Property.DispatchTouchMotion, value);
+ NotifyPropertyChanged();
}
}
{
get
{
- return dispatchHoverMotion;
+ return (bool)GetValue(DispatchHoverMotionProperty);
}
set
{
- dispatchHoverMotion = value;
+ SetValue(DispatchHoverMotionProperty, value);
}
}
+ private bool InternalDispatchHoverMotion
+ {
+ get
+ {
+ return Object.InternalGetPropertyBool(SwigCPtr, View.Property.DispatchHoverMotion);
+ }
+ set
+ {
+ Object.InternalSetPropertyBool(SwigCPtr, View.Property.DispatchHoverMotion, value);
+ NotifyPropertyChanged();
+ }
+ }
}
}
}
}
+ /// <summary>
+ /// Gets or sets the status of whether motion event of Touch can be dispatched.
+ /// If a Window's DispatchTouchMotion is set to false, then it's can not will receive motion event of TouchEvent.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool DispatchTouchMotion
+ {
+ get
+ {
+ return Object.InternalGetPropertyBool(Layer.getCPtr(GetRootLayer()), View.Property.DispatchTouchMotion);
+ }
+ set
+ {
+ Object.InternalSetPropertyBool(Layer.getCPtr(GetRootLayer()), View.Property.DispatchTouchMotion, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
+ /// Gets or sets the status of whether motion event of Hover can be dispatched.
+ /// If a Window's DispatchHoverMotion is set to false, then it's can not will receive motion event of HoverEvent.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool DispatchHoverMotion
+ {
+ get
+ {
+ return Object.InternalGetPropertyBool(Layer.getCPtr(GetRootLayer()), View.Property.DispatchHoverMotion);
+ }
+ set
+ {
+ Object.InternalSetPropertyBool(Layer.getCPtr(GetRootLayer()), View.Property.DispatchHoverMotion, value);
+ NotifyPropertyChanged();
+ }
+ }
+
private event EventHandler<FocusChangedEventArgs> windowFocusChangedEventHandler;
private event EventHandler<TouchEventArgs> rootLayerTouchDataEventHandler;
private ReturnTypeEventHandler<object, TouchEventArgs, bool> rootLayerInterceptTouchDataEventHandler;