Skip to content

Commit

Permalink
[AppKit] Xcode 12.0 Beta 1 (#9106)
Browse files Browse the repository at this point in the history
* [AppKit] Xcode 12.0 Beta 1

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
Co-authored-by: Alex Soto <[email protected]>

* More code review changes

* Apply suggestions from code review

Co-authored-by: Alex Soto <[email protected]>

* Code review changes

* Apply suggestions from code review

Co-authored-by: Whitney Schmidt <[email protected]>

* Remove unnecessary 10.7 mac attribute

Co-authored-by: Rolf Bjarne Kvinge <[email protected]>
Co-authored-by: Alex Soto <[email protected]>
Co-authored-by: Whitney Schmidt <[email protected]>
  • Loading branch information
4 people authored Jul 17, 2020
1 parent 6e3e087 commit fbcbdcd
Show file tree
Hide file tree
Showing 6 changed files with 410 additions and 133 deletions.
54 changes: 51 additions & 3 deletions src/AppKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,11 @@ public enum NSControlTint : ulong {

[Native]
public enum NSControlSize : ulong {
Regular,
Small,
Mini
Regular = 0,
Small = 1,
Mini = 2,
[Mac (10,16)]
Large = 3,
}

[Native]
Expand Down Expand Up @@ -1514,6 +1516,7 @@ public enum NSFontSymbolicTraits : int { // uint32_t NSFontSymbolicTraits
TraitTightLeading = 1 << 15,
[Mac (10,13)]
TraitLooseLeading = 1 << 16,
TraitEmphasized = BoldTrait,
UnknownClass = 0 << 28,
OldStyleSerifsClass = 1 << 28,
TransitionalSerifsClass = 2 << 28,
Expand Down Expand Up @@ -1737,6 +1740,7 @@ public enum NSTokenStyle : ulong {

[Flags]
[Native]
[Deprecated (PlatformName.MacOSX, 10, 16)]
public enum NSWorkspaceLaunchOptions : ulong {
Print = 2,
InhibitingBackgroundOnly = 0x80,
Expand Down Expand Up @@ -3009,4 +3013,48 @@ public enum NSWorkspaceAuthorizationType : long {
SetAttributes,
ReplaceFile,
}

[Mac (10,16)]
[Native]
public enum NSTableViewStyle : long
{
Automatic,
FullWidth,
Inset,
SourceList,
}

[Mac (10,16)]
[Native]
public enum NSTitlebarSeparatorStyle : long
{
Automatic,
None,
Line,
Shadow,
}

[Mac (10,16)]
[Native]
public enum NSWindowToolbarStyle : long
{
Automatic,
Expanded,
Preference,
Unified,
UnifiedCompact,
}

[Flags]
[Native]
public enum NSTableViewAnimationOptions : ulong
{
EffectNone = 0x0,
EffectFade = 0x1,
EffectGap = 0x2,
SlideUp = 0x10,
SlideDown = 0x20,
SlideLeft = 0x30,
SlideRight = 0x40,
}
}
4 changes: 4 additions & 0 deletions src/AppKit/NSWorkspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ namespace AppKit {

public partial class NSWorkspace {

[Deprecated (PlatformName.MacOSX, 10, 16, message: "Use 'NSWorkspace.OpenUrls' with completion handler.")]
public virtual bool OpenUrls (NSUrl[] urls, string bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor, string[] identifiers)
{
// Ignore the passed in argument, because if you pass it in we will crash on cleanup.
return _OpenUrls (urls, bundleIdentifier, options, descriptor, null);
}

[Deprecated (PlatformName.MacOSX, 10, 16, message: "Use 'NSWorkspace.OpenUrls' with completion handler.")]
public virtual bool OpenUrls (NSUrl[] urls, string bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor)
{
return _OpenUrls (urls, bundleIdentifier, options, descriptor, null);
}

[Advice ("Use 'NSWorkSpace.IconForContentType' instead.")]
public virtual NSImage IconForFileType (string fileType)
{
var nsFileType = NSString.CreateNative (fileType);
Expand All @@ -31,6 +34,7 @@ public virtual NSImage IconForFileType (string fileType)
}
}

[Advice ("Use 'NSWorkSpace.IconForContentType' instead.")]
public virtual NSImage IconForFileType (HfsTypeCode typeCode)
{
var nsFileType = GetNSFileType ((uint) typeCode);
Expand Down
Loading

1 comment on commit fbcbdcd

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

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

Build was (probably) aborted

🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Running XM tests on '10.16'' 🔥 : hudson.AbortException: Xamarin.Mac tests on macOS 10.16 failed (dontlink, apitest, introspection, linksdk, linkall, xammac_tests, dontlink (system))

Build succeeded
✅ Packages:

API Diff (from stable)
⚠️ API Diff (from PR only) (🔥 breaking changes 🔥)
ℹ️ Generator Diff (please review changes)
🔥 Xamarin.Mac tests on 10.16 failed: Xamarin.Mac tests on macOS 10.16 failed (dontlink, apitest, introspection, linksdk, linkall, xammac_tests, dontlink (system)) 🔥
Test run succeeded

Please sign in to comment.