From 1642d00f112fd7855800b723e0098a1707eef408 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Sat, 28 Jan 2023 23:13:24 -0500 Subject: [PATCH] Make public some more missed events --- src/Avalonia.Base/Input/PointerEventArgs.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Avalonia.Base/Input/PointerEventArgs.cs b/src/Avalonia.Base/Input/PointerEventArgs.cs index 502da52597..50d7cc5dc5 100644 --- a/src/Avalonia.Base/Input/PointerEventArgs.cs +++ b/src/Avalonia.Base/Input/PointerEventArgs.cs @@ -127,7 +127,9 @@ namespace Avalonia.Input public class PointerPressedEventArgs : PointerEventArgs { - internal PointerPressedEventArgs( + [Unstable] + [Obsolete("This constructor might be removed in 12.0. For unit testing, consider using IHeadlessWindow mouse methods.")] + public PointerPressedEventArgs( object source, IPointer pointer, Visual rootVisual, Point rootVisualPosition, @@ -146,7 +148,9 @@ namespace Avalonia.Input public class PointerReleasedEventArgs : PointerEventArgs { - internal PointerReleasedEventArgs( + [Unstable] + [Obsolete("This constructor might be removed in 12.0. For unit testing, consider using IHeadlessWindow mouse methods.")] + public PointerReleasedEventArgs( object source, IPointer pointer, Visual rootVisual, Point rootVisualPosition, ulong timestamp, PointerPointProperties properties, KeyModifiers modifiers, @@ -167,7 +171,9 @@ namespace Avalonia.Input { public IPointer Pointer { get; } - internal PointerCaptureLostEventArgs(object source, IPointer pointer) : base(InputElement.PointerCaptureLostEvent) + [Unstable] + [Obsolete("This constructor might be removed in 12.0. If you need to remove capture, use stable methods on the IPointer instance.,")] + public PointerCaptureLostEventArgs(object source, IPointer pointer) : base(InputElement.PointerCaptureLostEvent) { Pointer = pointer; Source = source;