TouchEvent
Represents the event arguments for a touch event.
using AngleSharp.Attributes;
namespace AngleSharp.Dom.Events
{
[DomName("TouchEvent")]
public class TouchEvent : UiEvent
{
[DomName("touches")]
public ITouchList Touches { get; set; }
[DomName("targetTouches")]
public ITouchList TargetTouches { get; set; }
[DomName("changedTouches")]
public ITouchList ChangedTouches { get; set; }
[DomName("altKey")]
public bool IsAltPressed { get; set; }
[DomName("metaKey")]
public bool IsMetaPressed { get; set; }
[DomName("ctrlKey")]
public bool IsCtrlPressed { get; set; }
[DomName("shiftKey")]
public bool IsShiftPressed { get; set; }
public TouchEvent()
{
}
[DomConstructor]
[DomInitDict(1, true)]
public TouchEvent(string type, bool bubbles = false, bool cancelable = false, IWindow view = null, int detail = 0, ITouchList touches = null, ITouchList targetTouches = null, ITouchList changedTouches = null, bool ctrlKey = false, bool altKey = false, bool shiftKey = false, bool metaKey = false)
{
Init(type, bubbles, cancelable, view, detail);
}
[DomName("initTouchEvent")]
public void Init(string type, bool bubbles, bool cancelable, IWindow view, int detail, ITouchList touches, ITouchList targetTouches, ITouchList changedTouches, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
{
Init(type, bubbles, cancelable, view, detail);
Touches = touches;
TargetTouches = targetTouches;
ChangedTouches = changedTouches;
IsCtrlPressed = ctrlKey;
IsShiftPressed = shiftKey;
IsMetaPressed = metaKey;
IsAltPressed = altKey;
}
}
}