-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
PlatformPointerEventArgs.cs
65 lines (55 loc) · 1.67 KB
/
PlatformPointerEventArgs.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
using System;
namespace Microsoft.Maui.Controls;
/// <summary>
/// Platform-specific arguments associated with the PointerEventArgs.
/// </summary>
public class PlatformPointerEventArgs
{
#if IOS || MACCATALYST
/// <summary>
/// Gets the native view attached to the event.
/// </summary>
public UIKit.UIView Sender { get; }
/// <summary>
/// Gets the native event or handler attached to the view.
/// </summary>
public UIKit.UIGestureRecognizer GestureRecognizer { get; }
internal PlatformPointerEventArgs(UIKit.UIView sender, UIKit.UIGestureRecognizer gestureRecognizer)
{
Sender = sender;
GestureRecognizer = gestureRecognizer;
}
#elif ANDROID
/// <summary>
/// Gets the native view attached to the event.
/// </summary>
public Android.Views.View Sender { get; }
/// <summary>
/// Gets the native event or handler attached to the view.
/// </summary>
public Android.Views.MotionEvent MotionEvent { get; }
internal PlatformPointerEventArgs(Android.Views.View sender, Android.Views.MotionEvent motionEvent)
{
Sender = sender;
MotionEvent = motionEvent;
}
#elif WINDOWS
/// <summary>
/// Gets the native view attached to the event.
/// </summary>
public Microsoft.UI.Xaml.FrameworkElement Sender { get; }
/// <summary>
/// Gets the native event or handler attached to the view.
/// </summary>
public Microsoft.UI.Xaml.Input.PointerRoutedEventArgs PointerRoutedEventArgs { get; }
internal PlatformPointerEventArgs(Microsoft.UI.Xaml.FrameworkElement sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs pointerRoutedEventArgs)
{
Sender = sender;
PointerRoutedEventArgs = pointerRoutedEventArgs;
}
#else
internal PlatformPointerEventArgs()
{
}
#endif
}