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] Xcode 12.0 Beta 1 #9106

Merged
merged 7 commits into from
Jul 17, 2020
Merged
Show file tree
Hide file tree
Changes from 4 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
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, Mac (10,7)]
[Native]
public enum NSTableViewAnimationOptions : ulong
Copy link
Contributor

Choose a reason for hiding this comment

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

weird, it's not in the diff
it's used but not defined, maybe it's an older type ?

Copy link
Contributor

Choose a reason for hiding this comment

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

{
EffectNone = 0x0,
EffectFade = 0x1,
EffectGap = 0x2,
SlideUp = 0x10,
SlideDown = 0x20,
SlideLeft = 0x30,
Copy link
Contributor

Choose a reason for hiding this comment

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

^ really ?!?
bumpy slide :)

Copy link
Member

Choose a reason for hiding this comment

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

Hm, these are bitfields, so SlideUp | SlideDown | SlideLeft | SlideRight is actually possible...

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 complection handler.")]
chamons marked this conversation as resolved.
Show resolved Hide resolved
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 complection handler.")]
chamons marked this conversation as resolved.
Show resolved Hide resolved
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