Browse Source

renamed DragDevice to DragDropDevice

pull/1417/head
boombuler 8 years ago
parent
commit
f57fbdc2da
  1. 4
      src/Avalonia.Controls/DragDrop/DragDropDevice.cs
  2. 2
      src/Avalonia.Controls/DragDrop/Raw/IDragDropDevice.cs
  3. 2
      src/Avalonia.Controls/DragDrop/Raw/RawDragEvent.cs
  4. 4
      src/OSX/Avalonia.MonoMac/TopLevelImpl.cs
  5. 4
      src/Windows/Avalonia.Win32/OleDropTarget.cs

4
src/Avalonia.Controls/DragDrop/DragDevice.cs → src/Avalonia.Controls/DragDrop/DragDropDevice.cs

@ -7,9 +7,9 @@ using Avalonia.Input.Raw;
namespace Avalonia.Controls.DragDrop
{
class DragDevice : IDragDevice
class DragDropDevice : IDragDropDevice
{
public static readonly DragDevice Instance = new DragDevice();
public static readonly DragDropDevice Instance = new DragDropDevice();
private Interactive _lastTarget = null;

2
src/Avalonia.Controls/DragDrop/Raw/IDragDevice.cs → src/Avalonia.Controls/DragDrop/Raw/IDragDropDevice.cs

@ -2,7 +2,7 @@
namespace Avalonia.Controls.DragDrop.Raw
{
public interface IDragDevice : IInputDevice
public interface IDragDropDevice : IInputDevice
{
}
}

2
src/Avalonia.Controls/DragDrop/Raw/RawDragEvent.cs

@ -12,7 +12,7 @@ namespace Avalonia.Controls.DragDrop.Raw
public DragDropEffects Effects { get; set; }
public RawDragEventType Type { get; }
public RawDragEvent(IDragDevice inputDevice, RawDragEventType type,
public RawDragEvent(IDragDropDevice inputDevice, RawDragEventType type,
IInputElement inputRoot, Point location, IDataObject data, DragDropEffects effects)
:base(inputDevice, GetTimeStamp())
{

4
src/OSX/Avalonia.MonoMac/TopLevelImpl.cs

@ -20,7 +20,7 @@ namespace Avalonia.MonoMac
{
public TopLevelView View { get; }
private readonly IMouseDevice _mouse = AvaloniaLocator.Current.GetService<IMouseDevice>();
private readonly IDragDevice _dragDevice = AvaloniaLocator.Current.GetService<IDragDevice>();
private readonly IDragDropDevice _dragDevice = AvaloniaLocator.Current.GetService<IDragDropDevice>();
protected TopLevelImpl()
{
View = new TopLevelView(this);
@ -154,7 +154,7 @@ namespace Avalonia.MonoMac
private NSDragOperation SendRawDragEvent(NSDraggingInfo sender, RawDragEventType type)
{
Action<RawInputEventArgs> input = _tl.Input;
IDragDevice dragDevice = _tl._dragDevice;
IDragDropDevice dragDevice = _tl._dragDevice;
IInputRoot root = _tl?.InputRoot;
if (root == null || dragDevice == null || input == null)
return NSDragOperation.None;

4
src/Windows/Avalonia.Win32/OleDropTarget.cs

@ -12,13 +12,13 @@ namespace Avalonia.Win32
{
private readonly IInputElement _target;
private readonly ITopLevelImpl _tl;
private readonly IDragDevice _dragDevice;
private readonly IDragDropDevice _dragDevice;
private IDataObject _currentDrag = null;
public OleDropTarget(ITopLevelImpl tl, IInputElement target)
{
_dragDevice = AvaloniaLocator.Current.GetService<IDragDevice>();
_dragDevice = AvaloniaLocator.Current.GetService<IDragDropDevice>();
_tl = tl;
_target = target;
}

Loading…
Cancel
Save