-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
GestureRecognizer.cs
37 lines (31 loc) · 1.09 KB
/
GestureRecognizer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
namespace Avalonia.Input.GestureRecognizers
{
public abstract class GestureRecognizer : StyledElement
{
protected internal IInputElement? Target { get; internal set; }
protected abstract void PointerPressed(PointerPressedEventArgs e);
protected abstract void PointerReleased(PointerReleasedEventArgs e);
protected abstract void PointerMoved(PointerEventArgs e);
protected abstract void PointerCaptureLost(IPointer pointer);
internal void PointerPressedInternal(PointerPressedEventArgs e)
{
PointerPressed(e);
}
internal void PointerReleasedInternal(PointerReleasedEventArgs e)
{
PointerReleased(e);
}
internal void PointerMovedInternal(PointerEventArgs e)
{
PointerMoved(e);
}
internal void PointerCaptureLostInternal(IPointer pointer)
{
PointerCaptureLost(pointer);
}
protected void Capture(IPointer pointer)
{
(pointer as Pointer)?.CaptureGestureRecognizer(this);
}
}
}