Skip to content

Commit

Permalink
[AppKit/UIKit] Implement Xcode 16.0 beta 1-6 changes. (#21130)
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne authored Sep 11, 2024
1 parent 0f285bb commit d99f6f8
Show file tree
Hide file tree
Showing 33 changed files with 3,300 additions and 2,453 deletions.
30 changes: 29 additions & 1 deletion src/AppKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.ComponentModel;
using ObjCRuntime;
using Foundation;

Expand Down Expand Up @@ -891,7 +892,10 @@ public enum NSWindowStyle : ulong {
[NoMacCatalyst]
[Native]
public enum NSWindowSharingType : ulong {
None, ReadOnly, ReadWrite
None,
ReadOnly,
[Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'ReadOnly' instead.")]
ReadWrite,
}

[NoMacCatalyst]
Expand Down Expand Up @@ -1983,13 +1987,29 @@ public enum NSFontCollectionOptions : long {
ApplicationOnlyMask = 1
}

#if XAMCORE_5_0
[NoMacCatalyst]
#else
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "This enum doesn't exist on this platform.")]
#if __MACCATALYST__
[EditorBrowsable (EditorBrowsableState.Never)]
#endif
#endif
[Native]
public enum NSCollectionViewDropOperation : long {
On = 0, Before = 1
}

#if XAMCORE_5_0
[NoMacCatalyst]
#else
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "This enum doesn't exist on this platform.")]
#if __MACCATALYST__
[EditorBrowsable (EditorBrowsableState.Never)]
#endif
#endif
[Native]
public enum NSCollectionViewItemHighlightState : long {
None = 0,
Expand All @@ -1998,7 +2018,15 @@ public enum NSCollectionViewItemHighlightState : long {
AsDropTarget = 3
}

#if XAMCORE_5_0
[NoMacCatalyst]
#else
[MacCatalyst (13, 1)]
[Deprecated (PlatformName.MacCatalyst, 13, 1, message: "This enum doesn't exist on this platform.")]
#if __MACCATALYST__
[EditorBrowsable (EditorBrowsableState.Never)]
#endif
#endif
[Native]
[Flags]
public enum NSCollectionViewScrollPosition : ulong {
Expand Down
12 changes: 12 additions & 0 deletions src/AppKit/NSGraphics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,21 @@ public static void FrameRect (CGRect rect, nfloat frameWidth, NSCompositingOpera
NSFrameRectWithWidthUsingOperation (rect, frameWidth, (nuint) (ulong) operation);
}

#if NET
[SupportedOSPlatform ("macos")]
[ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead." )]
#else
[Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'NSCursor.DisappearingItemCursor' instead.")]
#endif
[DllImport (Constants.AppKitLibrary, EntryPoint = "NSShowAnimationEffect")]
extern static void NSShowAnimationEffect (nuint animationEffect, CGPoint centerLocation, CGSize size, NativeHandle animationDelegate, NativeHandle didEndSelector, IntPtr contextInfo);

#if NET
[SupportedOSPlatform ("macos")]
[ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead." )]
#else
[Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'NSCursor.DisappearingItemCursor' instead.")]
#endif
public static void ShowAnimationEffect (NSAnimationEffect animationEffect, CGPoint centerLocation, CGSize size, NSObject animationDelegate, Selector didEndSelector, IntPtr contextInfo)
{
NSShowAnimationEffect ((nuint) (ulong) animationEffect, centerLocation, size, animationDelegate.GetHandle (), didEndSelector.Handle, contextInfo);
Expand Down
2 changes: 1 addition & 1 deletion src/UIKit/UIEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3183,7 +3183,7 @@ public enum UIEventButtonMask : ulong {
Secondary = 1L << 1,
}

[Flags, TV (13, 4), NoWatch, iOS (13, 4)]
[Flags, TV (13, 4), Watch (6, 2), iOS (13, 4)]
[MacCatalyst (13, 1)]
[Native]
public enum UIAxis : ulong {
Expand Down
Loading

14 comments on commit d99f6f8

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

@vs-mobiletools-engineering-service2

This comment was marked as outdated.

Please sign in to comment.