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-18 01:19:27 +0300
committerGitHub <noreply@github.com>2022-02-18 01:19:27 +0300
commit411c1f2abf675fd8bae1a8000ec8538514ae8596 (patch)
tree4b56e9368e42b26d7a262895480e0b812ff76c4f
parent36c89b26f75bf820c831b684a5cc82498f646025 (diff)
parent47b1c704ef64cdce1b0b148540d292aaa11582fb (diff)
Merge pull request #1082 from mono/dev/sandy/macos-workload-bump
Build: Use a 6.0.200 SDK and macos workload P13
-rw-r--r--Xwt.XamMac/Xwt.Mac/AlertDialogBackend.cs2
-rw-r--r--Xwt.XamMac/Xwt.Mac/ContextBackendHandler.cs2
-rw-r--r--Xwt.XamMac/Xwt.Mac/ListViewBackend.cs6
-rw-r--r--Xwt.XamMac/Xwt.Mac/OutlineViewBackend.cs2
-rw-r--r--Xwt.XamMac/Xwt.Mac/PopoverBackend.cs4
-rw-r--r--Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs2
-rw-r--r--Xwt.XamMac/Xwt.Mac/TextLayoutBackendHandler.cs21
-rw-r--r--Xwt.XamMac/Xwt.Mac/TreeViewBackend.cs8
-rw-r--r--Xwt.XamMac/Xwt.Mac/Util.cs2
-rw-r--r--Xwt.XamMac/Xwt.Mac/ViewBackend.cs10
-rw-r--r--Xwt.XamMac/Xwt.Mac/WindowBackend.cs2
-rw-r--r--Xwt.XamMac/Xwt.XamMac.csproj2
12 files changed, 33 insertions, 30 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/AlertDialogBackend.cs b/Xwt.XamMac/Xwt.Mac/AlertDialogBackend.cs
index 99efaaaa..7c2b2e56 100644
--- a/Xwt.XamMac/Xwt.Mac/AlertDialogBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/AlertDialogBackend.cs
@@ -117,7 +117,7 @@ namespace Xwt.Mac
public bool ApplyToAll { get; set; }
#endregion
- public override bool ConformsToProtocol (IntPtr protocol)
+ public override bool ConformsToProtocol (NativeHandle protocol)
{
// HACK: for some reason on systems with a TouchBar this might be called
// after the window has been closed and released, resulting in
diff --git a/Xwt.XamMac/Xwt.Mac/ContextBackendHandler.cs b/Xwt.XamMac/Xwt.Mac/ContextBackendHandler.cs
index 9627b32f..b0533309 100644
--- a/Xwt.XamMac/Xwt.Mac/ContextBackendHandler.cs
+++ b/Xwt.XamMac/Xwt.Mac/ContextBackendHandler.cs
@@ -361,7 +361,7 @@ namespace Xwt.Mac
public override Matrix GetCTM (object backend)
{
CGAffineTransform t = GetContextTransform ((CGContextBackend)backend);
- Matrix ctm = new Matrix (t.xx, t.yx, t.xy, t.yy, t.x0, t.y0);
+ Matrix ctm = new Matrix (t.A, t.B, t.C, t.D, t.Tx, t.Ty);
return ctm;
}
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/OutlineViewBackend.cs b/Xwt.XamMac/Xwt.Mac/OutlineViewBackend.cs
index d424dec6..d24917aa 100644
--- a/Xwt.XamMac/Xwt.Mac/OutlineViewBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/OutlineViewBackend.cs
@@ -26,6 +26,8 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
+global using ObjCRuntime;
+
using System;
using System.Linq;
using AppKit;
diff --git a/Xwt.XamMac/Xwt.Mac/PopoverBackend.cs b/Xwt.XamMac/Xwt.Mac/PopoverBackend.cs
index 395fdd39..c0c1c7ef 100644
--- a/Xwt.XamMac/Xwt.Mac/PopoverBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/PopoverBackend.cs
@@ -259,7 +259,7 @@ namespace Xwt.Mac
controller.EffectiveAppearanceName = refView.EffectiveAppearance.Name;
if (popover is INSAppearanceCustomization)
- ((INSAppearanceCustomization)popover).SetAppearance (refView.EffectiveAppearance);
+ ((INSAppearanceCustomization)popover).Appearance = refView.EffectiveAppearance;
}
popover.Show (positionRect.ToCGRect (),
@@ -305,7 +305,7 @@ namespace Xwt.Mac
public NSAppearanceCustomizationPopover ()
{ }
- protected NSAppearanceCustomizationPopover (IntPtr handle) : base (handle)
+ protected NSAppearanceCustomizationPopover (NativeHandle handle) : base (handle)
{ }
}
}
diff --git a/Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs b/Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs
index e539eb7f..d5495168 100644
--- a/Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs
@@ -326,7 +326,7 @@ namespace Xwt.Mac
TextStorage.EnumerateAttributes (new NSRange (0, TextStorage.Length), NSAttributedStringEnumeration.None, (NSDictionary attrs, NSRange range, ref bool stop) => {
stop = false;
if (attrs.ContainsKey (NSStringAttributeKey.Link)) {
- var rects = RectsForCharacterRange (range);
+ var rects = GetRects (range);
for (nuint i = 0; i < rects.Count; i++)
AddCursorRect (rects.GetItem<NSValue> (i).CGRectValue, NSCursor.PointingHandCursor);
}
diff --git a/Xwt.XamMac/Xwt.Mac/TextLayoutBackendHandler.cs b/Xwt.XamMac/Xwt.Mac/TextLayoutBackendHandler.cs
index 39700067..c8fb79a8 100644
--- a/Xwt.XamMac/Xwt.Mac/TextLayoutBackendHandler.cs
+++ b/Xwt.XamMac/Xwt.Mac/TextLayoutBackendHandler.cs
@@ -147,7 +147,7 @@ namespace Xwt.Mac
// paragraph style
TextContainer.LineBreakMode = TextTrimming == TextTrimming.WordElipsis ? NSLineBreakMode.TruncatingTail : NSLineBreakMode.ByWordWrapping;
- var pstyle = NSParagraphStyle.DefaultParagraphStyle.MutableCopy () as NSMutableParagraphStyle;
+ var pstyle = NSParagraphStyle.Default.MutableCopy () as NSMutableParagraphStyle;
pstyle.Alignment = TextAlignment.ToNSTextAlignment ();
if (TextTrimming == TextTrimming.WordElipsis)
pstyle.LineBreakMode = NSLineBreakMode.TruncatingTail;
@@ -260,8 +260,8 @@ namespace Xwt.Mac
TextLayout.AddTextContainer (TextContainer);
TextStorage.AddLayoutManager (TextLayout);
- TextLayout.DrawBackgroundForGlyphRange (new NSRange(0, Text.Length), new CGPoint (x, y));
- TextLayout.DrawGlyphsForGlyphRange (new NSRange(0, Text.Length), new CGPoint (x, y));
+ TextLayout.DrawBackground (new NSRange(0, Text.Length), new CGPoint (x, y));
+ TextLayout.DrawGlyphs (new NSRange(0, Text.Length), new CGPoint (x, y));
TextStorage.RemoveLayoutManager (TextLayout);
TextLayout.RemoveTextContainer (0);
}
@@ -280,8 +280,8 @@ namespace Xwt.Mac
{
TextLayout.AddTextContainer (TextContainer);
TextStorage.AddLayoutManager (TextLayout);
- TextLayout.GlyphRangeForBoundingRect (new CGRect (CGPoint.Empty, TextContainer.Size), TextContainer);
- var s = TextLayout.GetUsedRectForTextContainer (TextContainer);
+ TextLayout.GetGlyphRangeForBoundingRect (new CGRect (CGPoint.Empty, TextContainer.Size), TextContainer);
+ var s = TextLayout.GetUsedRect (TextContainer);
TextStorage.RemoveLayoutManager (TextLayout);
TextLayout.RemoveTextContainer (0);
return s.Size;
@@ -304,9 +304,8 @@ namespace Xwt.Mac
{
TextLayout.AddTextContainer (TextContainer);
TextStorage.AddLayoutManager (TextLayout);
- TextLayout.GlyphRangeForBoundingRect (new CGRect (CGPoint.Empty, TextContainer.Size), TextContainer);
- nfloat fraction = 0;
- var index = TextLayout.CharacterIndexForPoint (new CGPoint (x, y), TextContainer, ref fraction);
+ TextLayout.GetGlyphRangeForBoundingRect (new CGRect (CGPoint.Empty, TextContainer.Size), TextContainer);
+ var index = TextLayout.GetCharacterIndex (new CGPoint (x, y), TextContainer, out var fraction);
TextStorage.RemoveLayoutManager (TextLayout);
TextLayout.RemoveTextContainer (0);
return index;
@@ -319,9 +318,9 @@ namespace Xwt.Mac
{
TextLayout.AddTextContainer (TextContainer);
TextStorage.AddLayoutManager (TextLayout);
- TextLayout.GlyphRangeForBoundingRect (new CGRect (CGPoint.Empty, TextContainer.Size), TextContainer);
- var glyphIndex = TextLayout.GlyphIndexForCharacterAtIndex (index);
- var p = TextLayout.LocationForGlyphAtIndex ((nint)glyphIndex);
+ TextLayout.GetGlyphRangeForBoundingRect (new CGRect (CGPoint.Empty, TextContainer.Size), TextContainer);
+ var glyphIndex = TextLayout.GetGlyphIndex ((nuint)index);
+ var p = TextLayout.GetLocationForGlyph ((nuint)glyphIndex);
TextStorage.RemoveLayoutManager (TextLayout);
TextLayout.RemoveTextContainer (0);
return p;
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/Util.cs b/Xwt.XamMac/Xwt.Mac/Util.cs
index 9d7799cb..3f6f75dd 100644
--- a/Xwt.XamMac/Xwt.Mac/Util.cs
+++ b/Xwt.XamMac/Xwt.Mac/Util.cs
@@ -438,7 +438,7 @@ namespace Xwt.Mac
ns.BeginEditing ();
var r = new NSRange (0, ns.Length);
ns.RemoveAttribute (NSStringAttributeKey.ParagraphStyle, r);
- var pstyle = NSParagraphStyle.DefaultParagraphStyle.MutableCopy () as NSMutableParagraphStyle;
+ var pstyle = NSParagraphStyle.Default.MutableCopy () as NSMutableParagraphStyle;
pstyle.Alignment = alignment;
ns.AddAttribute (NSStringAttributeKey.ParagraphStyle, pstyle, r);
ns.EndEditing ();
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);
diff --git a/Xwt.XamMac/Xwt.Mac/WindowBackend.cs b/Xwt.XamMac/Xwt.Mac/WindowBackend.cs
index 2d874eb1..709b689c 100644
--- a/Xwt.XamMac/Xwt.Mac/WindowBackend.cs
+++ b/Xwt.XamMac/Xwt.Mac/WindowBackend.cs
@@ -567,7 +567,7 @@ namespace Xwt.Mac
}
}
- public override bool ConformsToProtocol (IntPtr protocol)
+ public override bool ConformsToProtocol (NativeHandle protocol)
{
// HACK: for some reason on systems with a TouchBar this might be called
// after the window has been closed and released, resulting in
diff --git a/Xwt.XamMac/Xwt.XamMac.csproj b/Xwt.XamMac/Xwt.XamMac.csproj
index b790f931..5da321c0 100644
--- a/Xwt.XamMac/Xwt.XamMac.csproj
+++ b/Xwt.XamMac/Xwt.XamMac.csproj
@@ -22,7 +22,6 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
- <LangVersion>6</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -32,7 +31,6 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<DebugSymbols>true</DebugSymbols>
- <LangVersion>6</LangVersion>
</PropertyGroup>
<PropertyGroup Condition="!$(Net6)">
<XamMacPath>\Library\Frameworks\Xamarin.Mac.framework\Versions\Current\lib\x86_64\full\Xamarin.Mac.dll</XamMacPath>