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

Prepare for NET6 attribute conversion with hand fixes #13658

Merged
merged 2 commits into from
Jan 7, 2022
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
18 changes: 0 additions & 18 deletions src/AVKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,6 @@ public enum AVPlayerViewControlsStyle : long {
}
#endif

#if MONOMAC
[Mac (10,10)]
[Native]
public enum AVCaptureViewControlsStyle : long {
Inline,
Floating,
InlineDeviceSelection,
Default = Inline,
}

[Mac (10,9)]
[Native]
public enum AVPlayerViewTrimResult : long {
OKButton,
CancelButton
}
#endif

#if !MONOMAC || !XAMCORE_4_0
[iOS (9,0)]
[TV (13,0)]
Expand Down
30 changes: 0 additions & 30 deletions src/Foundation/Enum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -498,25 +498,6 @@ public enum NSEnumerationOptions : ulong {
Reverse = 2
}

#if MONOMAC || __MACCATALYST__
[MacCatalyst(15, 0)]
[Native]
public enum NSNotificationSuspensionBehavior : ulong {
Drop = 1,
Coalesce = 2,
Hold = 3,
DeliverImmediately = 4,
}

[MacCatalyst(15, 0)]
[Flags]
[Native]
public enum NSNotificationFlags : ulong {
DeliverImmediately = (1 << 0),
PostToAllSessions = (1 << 1),
}
#endif

[Flags]
[Native]
public enum NSStreamEvent : ulong {
Expand Down Expand Up @@ -1269,17 +1250,6 @@ public enum NSPersonNameComponentsFormatterStyle : long
Abbreviated
}

#if MONOMAC
[Mac (10,11)][NoWatch][NoTV][NoiOS]
[Native]
[Flags]
public enum NSFileManagerUnmountOptions : ulong
{
AllPartitionsAndEjectDisk = 1 << 0,
WithoutUI = 1 << 1
}
#endif

[iOS (9,0)][Mac (10,11)]
[Native]
public enum NSDecodingFailurePolicy : long {
Expand Down
20 changes: 18 additions & 2 deletions src/avkit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
using OpenGLES;
#endif
#if !MONOMAC
using AVCaptureViewControlsStyle = Foundation.NSObject;
using AVPlayerViewControlsStyle = Foundation.NSObject;
using AVPlayerViewTrimResult = Foundation.NSObject;
using NSColor = UIKit.UIColor;
using NSMenu = Foundation.NSObject;
using NSView = UIKit.UIView;
Expand Down Expand Up @@ -940,4 +938,22 @@ interface AVPlayerViewDelegate
void RestoreUserInterfaceForFullScreenExit (AVPlayerView playerView, Action<bool> completionHandler);
}

[Mac (10,10)]
[NoiOS][NoTV][NoWatch][NoMacCatalyst]
[Native]
public enum AVCaptureViewControlsStyle : long {
Inline,
Floating,
InlineDeviceSelection,
Default = Inline,
}

[Mac (10,9)]
[NoiOS][NoTV][NoWatch][NoMacCatalyst]
[Native]
public enum AVPlayerViewTrimResult : long {
OKButton,
CancelButton,
}

}
28 changes: 28 additions & 0 deletions src/foundation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16473,4 +16473,32 @@ public enum NSUrlSessionTaskMetricsDomainResolutionProtocol : long {
Tls,
Https,
}

[NoiOS][NoTV][NoWatch]
[MacCatalyst(15, 0)]
[Native]
public enum NSNotificationSuspensionBehavior : ulong {
Drop = 1,
Coalesce = 2,
Hold = 3,
DeliverImmediately = 4,
}

[NoiOS][NoTV][NoWatch]
[MacCatalyst(15, 0)]
[Flags]
[Native]
public enum NSNotificationFlags : ulong {
DeliverImmediately = (1 << 0),
PostToAllSessions = (1 << 1),
}

[Mac (10,11)][NoWatch][NoTV][NoiOS][NoMacCatalyst]
[Native]
[Flags]
public enum NSFileManagerUnmountOptions : ulong
{
AllPartitionsAndEjectDisk = 1 << 0,
WithoutUI = 1 << 1,
}
}