Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AppKit] Add support for Xcode 15. #19119

Merged
merged 12 commits into from
Oct 24, 2023
90 changes: 88 additions & 2 deletions src/AppKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@ public enum NSButtonType : ulong {
[NoMacCatalyst]
[Native]
public enum NSBezelStyle : ulong {
Automatic = 0,
Rounded = 1,
RegularSquare,
ThickSquare,
Expand Down Expand Up @@ -1206,7 +1207,12 @@ public enum NSWindingRule : ulong {
[NoMacCatalyst]
[Native]
public enum NSBezierPathElement : ulong {
MoveTo, LineTo, CurveTo, ClosePath
MoveTo,
LineTo,
CurveTo,
ClosePath,
[Mac (14, 0)]
QuadraticCurveTo,
}
#endregion

Expand Down Expand Up @@ -1817,7 +1823,9 @@ public enum NSSplitViewDividerStyle : long {
public enum NSSplitViewItemBehavior : long {
Default,
Sidebar,
ContentList
ContentList,
[Mac (14, 0)]
Inspector,
}

[NoMacCatalyst]
Expand Down Expand Up @@ -3151,4 +3159,82 @@ public enum NSComboButtonStyle : long {
Split = 0,
Unified = 1,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
public enum NSImageDynamicRange : long {
Unspecified = -1,
Standard = 0,
ConstrainedHigh = 1,
High = 2,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
public enum NSMenuItemBadgeType : long {
None = 0,
Updates,
NewItems,
Alerts,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
public enum NSMenuPresentationStyle : long {
Regular = 0,
Palette = 1,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
public enum NSMenuSelectionMode : long {
Automatic = 0,
SelectOne = 1,
SelectAny = 2,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
public enum NSPageLayoutResult : long {
Cancelled = 0,
Changed,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
public enum NSPrintPanelResult : long {
Cancelled = 0,
Printed,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
public enum NSTextCursorAccessoryPlacement : long {
Unspecified,
Backward,
Forward,
Invisible,
Center,
OffscreenLeft,
OffscreenTop,
OffscreenRight,
OffscreenBottom,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
[Flags]
public enum NSTextInsertionIndicatorAutomaticModeOptions : long {
EffectsView = 1L << 0,
WhileTracking = 1L << 1,
}

[NoMacCatalyst, Mac (14, 0)]
[Native]
public enum NSTextInsertionIndicatorDisplayMode : long {
Automatic = 0,
Hidden,
Visible,
}

}
11 changes: 9 additions & 2 deletions src/Foundation/NSAttributedStringDocumentAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#if !COREBUILD && HAS_WEBKIT
using WebKit;
#endif
using ObjCRuntime;

#if !COREBUILD
#if __MACOS__
Expand Down Expand Up @@ -211,15 +212,21 @@ public bool ReadOnly {
[SupportedOSPlatform ("ios13.0")]
[SupportedOSPlatform ("maccatalyst")]
[UnsupportedOSPlatform ("tvos")]
[ObsoletedOSPlatform ("ios17.0", message: "Starting with ios17.0 will always return null.")]
[ObsoletedOSPlatform ("maccatalyst17.0", message: "Starting with maccatalyst17.0 will always return null.")]
[ObsoletedOSPlatform ("macos14.0", message: "Starting with macos14.0 will always return null.")]
#else
[Deprecated (PlatformName.iOS, 17, 0, message: "Will always return null.")]
[Deprecated (PlatformName.MacCatalyst, 17, 0, message: "Will always return null.")]
[Deprecated (PlatformName.MacOSX, 14, 0, message: "Will always return null.")]
[iOS (13, 0)]
#endif
public NSUrl? ReadAccessUrl {
get {
return GetNativeValue<NSUrl> (NSAttributedStringDocumentReadingOptionKey.NSReadAccessUrlDocumentOption);
return null;
}
set {
SetNativeValue (NSAttributedStringDocumentReadingOptionKey.NSReadAccessUrlDocumentOption, value);
// do nothing
}
}
#endif // !TVOS && !WATCH
Expand Down
Loading
Loading