Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandy Armstrong <sandy@xamarin.com>2022-02-16 22:03:52 +0300
committerSandy Armstrong <sandy@xamarin.com>2022-02-16 23:14:06 +0300
commit187603c99d4824c8eb477c2ffc88bf29f14daf82 (patch)
tree0194b02a9282ce3838aee061fa9269ce8f7af94b
parent895fc1f76bd4bab49614c82e8ad0037a2703b698 (diff)
Mac: NSDraggingInfo breaks in P13, use INSDraggingInfo
https://github.com/xamarin/xamarin-macios/issues/14170
-rw-r--r--Xwt.XamMac/Xwt.Mac/ListViewBackend.cs6
-rw-r--r--Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs8
-rw-r--r--Xwt.XamMac/Xwt.Mac/ViewBackend.cs10
3 files changed, 14 insertions, 10 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/ListViewBackend.cs b/Xwt.XamMac/Xwt.Mac/ListViewBackend.cs
index c77258ce..6a8a3199 100644
--- a/Xwt.XamMac/Xwt.Mac/ListViewBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/ListViewBackend.cs
@@ -279,7 +279,8 @@ namespace Xwt.Mac
this.source = source;
}
- public override bool AcceptDrop (NSTableView tableView, NSDraggingInfo info, nint row, NSTableViewDropOperation dropOperation)
+ [Export("tableView:acceptDrop:row:dropOperation:")]
+ public bool AcceptDrop (NSTableView tableView, INSDraggingInfo info, nint row, NSTableViewDropOperation dropOperation)
{
return false;
}
@@ -307,7 +308,8 @@ namespace Xwt.Mac
{
}
- public override NSDragOperation ValidateDrop (NSTableView tableView, NSDraggingInfo info, nint row, NSTableViewDropOperation dropOperation)
+ [Export("tableView:validateDrop:proposedRow:proposedDropOperation:")]
+ public NSDragOperation ValidateDrop (NSTableView tableView, INSDraggingInfo info, nint row, NSTableViewDropOperation dropOperation)
{
return NSDragOperation.None;
}
diff --git a/Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs b/Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs
index 710677be..167a241e 100644
--- a/Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs
@@ -449,8 +449,9 @@ namespace Xwt.Mac
items.TryGetValue (pos, out it);
return it;
}
-
- public override bool AcceptDrop (NSOutlineView outlineView, NSDraggingInfo info, NSObject item, nint index)
+
+ [Export("tableView:acceptDrop:row:dropOperation:")]
+ public bool AcceptDrop (NSOutlineView outlineView, INSDraggingInfo info, NSObject item, nint index)
{
return false;
}
@@ -513,7 +514,8 @@ namespace Xwt.Mac
{
}
- public override NSDragOperation ValidateDrop (NSOutlineView outlineView, NSDraggingInfo info, NSObject item, nint index)
+ [Export("tableView:validateDrop:proposedRow:proposedDropOperation:")]
+ public NSDragOperation ValidateDrop (NSOutlineView outlineView, INSDraggingInfo info, NSObject item, nint index)
{
return NSDragOperation.None;
}
diff --git a/Xwt.XamMac/Xwt.Mac/ViewBackend.cs b/Xwt.XamMac/Xwt.Mac/ViewBackend.cs
index 34527b29..68dd61e3 100644
--- a/Xwt.XamMac/Xwt.Mac/ViewBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/ViewBackend.cs
@@ -618,7 +618,7 @@ namespace Xwt.Mac
return NSDragOperation.None;
var backend = ob.Backend;
- NSDraggingInfo di = (NSDraggingInfo) Runtime.GetNSObject (dragInfo);
+ INSDraggingInfo di = (INSDraggingInfo) Runtime.GetNSObject (dragInfo);
var types = di.DraggingPasteboard.Types.Select (ToXwtDragType).ToArray ();
var pos = new Point (di.DraggingLocation.X, di.DraggingLocation.Y);
@@ -664,7 +664,7 @@ namespace Xwt.Mac
var backend = ob.Backend;
- NSDraggingInfo di = (NSDraggingInfo) Runtime.GetNSObject (dragInfo);
+ INSDraggingInfo di = (INSDraggingInfo) Runtime.GetNSObject (dragInfo);
var types = di.DraggingPasteboard.Types.Select (ToXwtDragType).ToArray ();
var pos = new Point (di.DraggingLocation.X, di.DraggingLocation.Y);
@@ -687,7 +687,7 @@ namespace Xwt.Mac
var backend = ob.Backend;
- NSDraggingInfo di = (NSDraggingInfo) Runtime.GetNSObject (dragInfo);
+ INSDraggingInfo di = (INSDraggingInfo) Runtime.GetNSObject (dragInfo);
var pos = new Point (di.DraggingLocation.X, di.DraggingLocation.Y);
if ((backend.currentEvents & WidgetEvent.DragDrop) != 0) {
@@ -707,14 +707,14 @@ namespace Xwt.Mac
Console.WriteLine ("ConcludeDragOperation");
}
- protected virtual void OnDragOverCheck (NSDraggingInfo di, DragOverCheckEventArgs args)
+ protected virtual void OnDragOverCheck (INSDraggingInfo di, DragOverCheckEventArgs args)
{
ApplicationContext.InvokeUserCode (delegate {
eventSink.OnDragOverCheck (args);
});
}
- protected virtual void OnDragOver (NSDraggingInfo di, DragOverEventArgs args)
+ protected virtual void OnDragOver (INSDraggingInfo di, DragOverEventArgs args)
{
ApplicationContext.InvokeUserCode (delegate {
eventSink.OnDragOver (args);