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/UIKit] Implement Xcode 16.0 beta 1-6 changes. #21130

Merged
merged 15 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ INCLUDE_TVOS=1
INCLUDE_MACCATALYST=1
INCLUDE_DEVICE=1
INCLUDE_DOTNET_WATCHOS=
INCLUDE_XAMARIN_LEGACY=1
INCLUDE_XAMARIN_LEGACY=
Copy link
Member Author

@rolfbjarne rolfbjarne Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is already in the xcode16 branch, so it will disappear when the PR is merged.

INCLUDE_HOTRESTART=1

ENABLE_DOTNET=1
Expand Down
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