Skip to content

Commit

Permalink
Remove 10.7 & 10.8 availability attributes, since they're redundant now.
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Oct 25, 2018
1 parent 2755245 commit 36209e5
Show file tree
Hide file tree
Showing 60 changed files with 506 additions and 877 deletions.
2 changes: 1 addition & 1 deletion src/AVFoundation/AVCaptureVideoPreviewLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class AVCaptureVideoPreviewLayer {

public enum InitMode {
WithConnection,
[iOS (8,0), Mac (10,7)]
[iOS (8,0)]
WithNoConnection,
}

Expand Down
1 change: 0 additions & 1 deletion src/AVFoundation/AVTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ public static class AVUtilities {
[DllImport (Constants.AVFoundationLibrary)]
static extern /* CGRect */ RectangleF AVMakeRectWithAspectRatioInsideRect (/* CGSize */ SizeF aspectRatio, /* CGRect */ RectangleF boundingRect);

[Mac (10,7)]
public static RectangleF WithAspectRatio (this RectangleF self, SizeF aspectRatio)
{
return AVMakeRectWithAspectRatioInsideRect (aspectRatio, self);
Expand Down
3 changes: 0 additions & 3 deletions src/AVFoundation/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,13 @@ public enum AVAssetImageGeneratorResult : long {

#if !XAMCORE_3_0 || MONOMAC
[NoTV]
[Mac (10,7)] // N/A in iOS
[Native]
// NSInteger - AVCaptureDevice.h
public enum AVCaptureDeviceTransportControlsPlaybackMode : long {
NotPlaying, Playing
}

[NoTV, NoWatch]
[Mac (10,7)] // N/A in iOS
[Native]
// NSInteger - AVCaptureSession.h
public enum AVVideoFieldMode : long {
Expand Down Expand Up @@ -694,7 +692,6 @@ public enum AVMovieWritingOptions : ulong
}

[NoiOS][NoTV][NoWatch]
[Mac (10,7)]
[Native]
public enum AVContentAuthorizationStatus : long {
Unknown,
Expand Down
23 changes: 11 additions & 12 deletions src/AppKit/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1995,13 +1995,13 @@ public enum NSOpenGLContextParameter : ulong {
SurfaceOrder = 235,
SurfaceOpacity = 236,

[Mac (10, 7)] SurfaceBackingSize = 304,
[Mac (10, 7)] ReclaimResources = 308,
[Mac (10, 7)] CurrentRendererID = 309,
[Mac (10, 7)] GpuVertexProcessing = 310,
[Mac (10, 7)] GpuFragmentProcessing = 311,
[Mac (10, 7)] HasDrawable = 314,
[Mac (10, 7)] MpsSwapsInFlight = 315
SurfaceBackingSize = 304,
ReclaimResources = 308,
CurrentRendererID = 309,
GpuVertexProcessing = 310,
GpuFragmentProcessing = 311,
HasDrawable = 314,
MpsSwapsInFlight = 315
}

public enum NSSurfaceOrder {
Expand All @@ -2013,10 +2013,10 @@ public enum NSSurfaceOrder {
public enum NSOpenGLPixelFormatAttribute : uint { // uint32_t NSOpenGLPixelFormatAttribute
AllRenderers = 1,
DoubleBuffer = 5,
[Mac (10, 7)] TripleBuffer = 3,
TripleBuffer = 3,
#if !XAMCORE_4_0
[Obsolete ("Use 'TripleBuffer' instead.")]
[Mac (10, 7)] TrippleBuffer = TripleBuffer,
TrippleBuffer = TripleBuffer,
#endif
Stereo = 6,
AuxBuffers = 7,
Expand Down Expand Up @@ -2058,7 +2058,7 @@ public enum NSOpenGLPixelFormatAttribute : uint { // uint32_t NSOpenGLPixelForma
AcceleratedCompute = 97,

// Specify the profile
[Mac (10, 7)] OpenGLProfile = 99,
OpenGLProfile = 99,
VirtualScreenCount = 128,

[Deprecated (PlatformName.MacOSX, 10, 5)]
Expand Down Expand Up @@ -2097,7 +2097,7 @@ public enum NSOpenGLGlobalOption : uint {
FormatCacheSize = 501,
ClearFormatCache = 502,
RetainRenderers = 503,
[Mac (10, 7)] UseBuildCache = 506,
UseBuildCache = 506,
[Deprecated (PlatformName.MacOSX, 10, 4)]
ResetLibrary = 504
}
Expand Down Expand Up @@ -2406,7 +2406,6 @@ public enum NSWindowAnimationBehavior : long {
Default = 0, None = 2, DocumentWindow, UtilityWindow, AlertPanel
}

[Mac (10, 7)]
[Native]
public enum NSTextFinderAction : long {
ShowFindInterface = 1,
Expand Down
1 change: 0 additions & 1 deletion src/AppKit/NSAccessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public static CGPoint GetPointInView (NSView parentView, CGPoint point)
return NSAccessibilityPointInView (parentView, point);
}

[Mac (10,7)]
[DllImport (Constants.AppKitLibrary)]
static extern void NSAccessibilityPostNotificationWithUserInfo (IntPtr element, IntPtr notification, IntPtr userInfo);

Expand Down
2 changes: 1 addition & 1 deletion src/AppKit/NSColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public override string ToString ()
}
}

[Mac (10, 8)][Obsolete ("Use 'UnderPageBackgroundColor' instead.")]
[Obsolete ("Use 'UnderPageBackgroundColor' instead.")]
public static NSColor UnderPageBackground {
get {
return UnderPageBackgroundColor;
Expand Down
4 changes: 0 additions & 4 deletions src/AppKit/NSStringAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,11 @@ public bool? MarkedClauseSegment {
set { Set (NSStringAttributeKey.MarkedClauseSegment, value); }
}

[Mac (10, 7)]
public NSTextLayoutOrientation? VerticalGlyphForm {
get { return (NSTextLayoutOrientation?)GetInt32Value (NSStringAttributeKey.VerticalGlyphForm); }
set { SetNumberValue (NSStringAttributeKey.VerticalGlyphForm, (int?)value); }
}

[Mac (10, 8)]
public NSTextAlternatives TextAlternatives {
get { return Get (NSStringAttributeKey.TextAlternatives, handle => new NSTextAlternatives (handle)); }
set { SetNativeValue (NSStringAttributeKey.TextAlternatives, value); }
Expand Down Expand Up @@ -520,13 +518,11 @@ public bool? MarkedClauseSegment {
set { Set (NSAttributedString.MarkedClauseSegmentAttributeName, value); }
}

[Mac (10, 7)]
public NSTextLayoutOrientation? VerticalGlyphForm {
get { return (NSTextLayoutOrientation?)GetInt32Value (NSAttributedString.VerticalGlyphFormAttributeName); }
set { SetNumberValue (NSAttributedString.VerticalGlyphFormAttributeName, (int?)value); }
}

[Mac (10, 8)]
public NSTextAlternatives TextAlternatives {
get { return Get (NSAttributedString.TextAlternativesAttributeName, handle => new NSTextAlternatives (handle)); }
set { SetNativeValue (NSAttributedString.TextAlternativesAttributeName, value); }
Expand Down
7 changes: 1 addition & 6 deletions src/AppKit/XEnums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@

namespace AppKit {

[Mac (10, 7)]
[Native]
public enum NSTextLayoutOrientation : long {
Horizontal,
Vertical
}

#if !XAMCORE_2_0
[Mac (10, 7), Flags]
[Flags]
[Native]
public enum NSTableViewAnimationOptions : ulong {
EffectFade = 0x1,
Expand All @@ -33,22 +32,19 @@ public enum NSTableViewAnimationOptions : ulong {
}
#endif

[Mac (10, 7)]
[Native]
public enum NSPrintRenderingQuality : long {
Best,
Responsive
}

[Mac (10, 7)]
[Native]
public enum NSCorrectionIndicatorType : long {
Default = 0,
Reversion,
Guesses
}

[Mac (10, 7)]
[Native]
public enum NSCorrectionResponse : long {
None,
Expand All @@ -59,7 +55,6 @@ public enum NSCorrectionResponse : long {
Reverted
}

[Mac (10, 7)]
[Native]
public enum NSTextFinderMatchingType : long {
Contains = 0,
Expand Down
2 changes: 0 additions & 2 deletions src/AudioToolbox/AudioQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1296,11 +1296,9 @@ public AudioQueueStatus GetSourceAudio (uint numberOfFrames, ref AudioTimeStamp
out flags, out parentNumberOfFrames, (IntPtr) data);
}

[Mac (10,8)]
[DllImport (Constants.AudioToolboxLibrary)]
extern static AudioQueueStatus AudioQueueProcessingTapGetQueueTime (IntPtr inAQTap, out double outQueueSampleTime, out uint outQueueFrameCount);

[Mac (10,8)]
public AudioQueueStatus GetQueueTime (out double sampleTime, out uint frameCount)
{
return AudioQueueProcessingTapGetQueueTime (TapHandle, out sampleTime, out frameCount);
Expand Down
1 change: 0 additions & 1 deletion src/CoreFoundation/CFProxySupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public NSObject AutoConfigurationHTTPResponse {
}
#endif

[Mac (10,7)]
public NSString AutoConfigurationJavaScript {
get {
if (AutoConfigurationJavaScriptKey == null)
Expand Down
11 changes: 0 additions & 11 deletions src/CoreGraphics/CGPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public CGPath ()
handle = CGPathCreateMutable ();
}

[Mac(10,7)]
public CGPath (CGPath reference, CGAffineTransform transform)
{
if (reference == null)
Expand Down Expand Up @@ -571,25 +570,21 @@ extern unsafe static IntPtr CGPathCreateCopyByDashingPath (
/* CGFloat */ nfloat [] lengths,
/* size_t */ nint count);

[Mac(10,7)]
public CGPath CopyByDashingPath (CGAffineTransform transform, nfloat [] lengths)
{
return CopyByDashingPath (transform, lengths, 0);
}

[Mac(10,7)]
public unsafe CGPath CopyByDashingPath (CGAffineTransform transform, nfloat [] lengths, nfloat phase)
{
return MakeMutable (CGPathCreateCopyByDashingPath (handle, &transform, phase, lengths, lengths == null ? 0 : lengths.Length));
}

[Mac(10,7)]
public CGPath CopyByDashingPath (nfloat [] lengths)
{
return CopyByDashingPath (lengths, 0);
}

[Mac(10,7)]
public unsafe CGPath CopyByDashingPath (nfloat [] lengths, nfloat phase)
{
var path = CGPathCreateCopyByDashingPath (handle, null, phase, lengths, lengths == null ? 0 : lengths.Length);
Expand All @@ -604,13 +599,11 @@ public unsafe CGPath Copy ()
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static IntPtr CGPathCreateCopyByStrokingPath (/* CGPathRef */ IntPtr path, CGAffineTransform *transform, nfloat lineWidth, CGLineCap lineCap, CGLineJoin lineJoin, /* CGFloat */ nfloat miterLimit);

[Mac(10,7)]
public unsafe CGPath CopyByStrokingPath (CGAffineTransform transform, nfloat lineWidth, CGLineCap lineCap, CGLineJoin lineJoin, nfloat miterLimit)
{
return MakeMutable (CGPathCreateCopyByStrokingPath (handle, &transform, lineWidth, lineCap, lineJoin, miterLimit));
}

[Mac(10,7)]
public unsafe CGPath CopyByStrokingPath (nfloat lineWidth, CGLineCap lineCap, CGLineJoin lineJoin, nfloat miterLimit)
{
return MakeMutable (CGPathCreateCopyByStrokingPath (handle, null, lineWidth, lineCap, lineJoin, miterLimit));
Expand All @@ -630,13 +623,11 @@ public CGPath CopyByTransformingPath (CGAffineTransform transform)
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static IntPtr CGPathCreateWithEllipseInRect (CGRect boundingRect, CGAffineTransform *transform);

[Mac(10,7)]
static public unsafe CGPath EllipseFromRect (CGRect boundingRect, CGAffineTransform transform)
{
return MakeMutable (CGPathCreateWithEllipseInRect (boundingRect, &transform));
}

[Mac(10,7)]
static public unsafe CGPath EllipseFromRect (CGRect boundingRect)
{
return MakeMutable (CGPathCreateWithEllipseInRect (boundingRect, null));
Expand All @@ -645,13 +636,11 @@ static public unsafe CGPath EllipseFromRect (CGRect boundingRect)
[DllImport (Constants.CoreGraphicsLibrary)]
unsafe extern static IntPtr CGPathCreateWithRect (CGRect boundingRect, CGAffineTransform *transform);

[Mac(10,7)]
static public unsafe CGPath FromRect (CGRect rectangle, CGAffineTransform transform)
{
return MakeMutable (CGPathCreateWithRect (rectangle, &transform));
}

[Mac(10,7)]
static public unsafe CGPath FromRect (CGRect rectangle)
{
return MakeMutable (CGPathCreateWithRect (rectangle, null));
Expand Down
1 change: 0 additions & 1 deletion src/CoreMedia/CMBlockBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public enum CMBlockBufferFlags : uint {
PermitEmptyReference = (1<<3)
}

[Mac (10,7)]
public class CMBlockBuffer : ICMAttachmentBearer, IDisposable {
internal IntPtr handle;
internal CMCustomBlockAllocator customAllocator;
Expand Down
2 changes: 1 addition & 1 deletion src/CoreMedia/CMMemoryPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace CoreMedia {

[iOS (6,0)][Mac (10,8)]
[iOS (6,0)]
public partial class CMMemoryPool : IDisposable, INativeObject
{
IntPtr handle;
Expand Down
10 changes: 3 additions & 7 deletions src/CoreMedia/CMSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public enum CMClockError : int
}

// CMSync.h
[iOS (6,0)][Mac (10,8)]
[iOS (6,0)]
public class CMClock : CMClockOrTimebase
{
public CMClock (IntPtr handle) : base (handle)
Expand Down Expand Up @@ -122,7 +122,7 @@ public enum CMTimebaseError : int
ReadOnly = -12757,
}

[iOS (6,0)][Mac (10,8)]
[iOS (6,0)]
public class CMTimebase : CMClockOrTimebase
{
public CMTimebase (IntPtr handle)
Expand Down Expand Up @@ -214,7 +214,6 @@ public double Rate {

[iOS (6, 0)]
[Deprecated (PlatformName.iOS, 9, 0, message : "Use 'CopyMasterTimebase' instead.")]
[Mac (10, 8)]
[Deprecated (PlatformName.MacOSX, 10, 11, message : "Use 'CopyMasterTimebase' instead.")]
public CMTimebase GetMasterTimebase ()
{
Expand All @@ -230,7 +229,6 @@ public CMTimebase GetMasterTimebase ()

[iOS (6, 0)]
[Deprecated (PlatformName.iOS, 9, 0, message : "Use 'CopyMasterClock' instead.")]
[Mac (10, 8)]
[Deprecated (PlatformName.MacOSX, 10, 11, message : "Use 'CopyMasterClock' instead.")]
public CMClock GetMasterClock ()
{
Expand All @@ -246,7 +244,6 @@ public CMClock GetMasterClock ()

[iOS (6, 0)]
[Deprecated (PlatformName.iOS, 9, 0, message : "Use 'CopyMaster' instead.")]
[Mac (10, 8)]
[Deprecated (PlatformName.MacOSX, 10, 11, message : "Use 'CopyMaster' instead.")]
public CMClockOrTimebase GetMaster ()
{
Expand All @@ -262,7 +259,6 @@ public CMClockOrTimebase GetMaster ()

[iOS (6, 0)]
[Deprecated (PlatformName.iOS, 9, 0, message : "Use 'CopyUltimateMasterClock' instead.")]
[Mac (10, 8)]
[Deprecated (PlatformName.MacOSX, 10, 11, message : "Use 'CopyUltimateMasterClock' instead.")]
public CMClock GetUltimateMasterClock ()
{
Expand Down Expand Up @@ -477,7 +473,7 @@ public enum CMSyncError : int {
RateMustBeNonZero = -12755,
}

[iOS (6,0)][Mac (10,8)]
[iOS (6,0)]
public class CMClockOrTimebase : IDisposable, INativeObject
{
internal IntPtr handle;
Expand Down
8 changes: 4 additions & 4 deletions src/CoreText/CTFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1993,11 +1993,11 @@ public CGRect GetBoundingRects (CTFontOrientation orientation, CGGlyph[] glyphs,
return CTFontGetBoundingRectsForGlyphs (handle, orientation, glyphs, boundingRects, count);
}

[iOS (6,0)][Mac (10,8)]
[iOS (6,0)]
[DllImport (Constants.CoreTextLibrary)]
static extern CGRect CTFontGetOpticalBoundsForGlyphs (IntPtr font, [In] CGGlyph[] glyphs, [Out] CGRect[] boundingRects, nint count, nuint options);

[iOS (6,0)][Mac (10,8)]
[iOS (6,0)]
public CGRect GetOpticalBounds (CGGlyph[] glyphs, CGRect[] boundingRects, nint count, CTFontOptions options = 0)
{
AssertCount (count);
Expand Down Expand Up @@ -2199,12 +2199,12 @@ public NSData GetFontTableData (CTFontTable table, CTFontTableOptions options)
#endregion

#region
[iOS (6,0)][Mac (10, 8)]
[iOS (6,0)]
[DllImport (Constants.CoreTextLibrary)]
extern static /* CFArrayRef __nullable */ IntPtr CTFontCopyDefaultCascadeListForLanguages (
/* CTFontRef __nonnull */ IntPtr font, /* CFArrayRef __nullable */ IntPtr languagePrefList);

[iOS (6,0)][Mac (10, 8)]
[iOS (6,0)]
public CTFontDescriptor [] GetDefaultCascadeList (string [] languages)
{
using (var arr = languages == null ? null : NSArray.FromStrings (languages)) {
Expand Down
Loading

0 comments on commit 36209e5

Please sign in to comment.