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

[CoreAnimation] Implement Xcode 16.0 beta 1-6 changes. #21050

Merged
merged 3 commits into from
Aug 22, 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
124 changes: 105 additions & 19 deletions src/coreanimation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,19 @@ interface CALayer : CAMediaTiming, NSSecureCoding {
[Static]
[Export ("cornerCurveExpansionFactor:")]
nfloat GetCornerCurveExpansionFactor ([BindAs (typeof (CACornerCurve))] NSString curve);

[NoWatch]
[NoTV]
[iOS (17, 0)]
[MacCatalyst (17, 0)]
[Mac (14, 0)]
[Export ("wantsExtendedDynamicRangeContent")]
bool WantsExtendedDynamicRangeContent { get; set; }

[Mac (15, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoWatch]
[Export ("toneMapMode")]
[BindAs (typeof (CAToneMapMode))]
NSString ToneMapMode { get; set; }
}

[NoWatch] // headers not updated
Expand All @@ -683,6 +696,17 @@ enum CACornerCurve {
Continuous,
}

[Mac (15, 0), iOS (18, 0), TV (18, 0), MacCatalyst (18, 0), NoWatch]
enum CAToneMapMode {
[DefaultEnumValue]
[Field ("CAToneMapModeAutomatic")]
Automatic,
[Field ("CAToneMapModeNever")]
Never,
[Field ("CAToneMapModeIfSupported")]
IfSupported,
}

interface ICAMetalDrawable { }

/// <summary>Interface that defines a protocol for a display buffer at the metal layer.</summary>
Expand Down Expand Up @@ -1229,7 +1253,7 @@ interface ICALayerDelegate { }
#elif MONOMAC
[Protocol (FormalSince = "10.12")]
#elif WATCH
[Protocol (FormalSince = "3.0"]
[Protocol (FormalSince = "3.0")]
#else
[Protocol]
#endif
Expand Down Expand Up @@ -1437,7 +1461,7 @@ interface ICAAnimationDelegate { }
#elif MONOMAC
[Protocol (FormalSince = "10.12")]
#elif WATCH
[Protocol (FormalSince = "3.0"]
[Protocol (FormalSince = "3.0")]
#else
[Synthetic]
#endif
Expand Down Expand Up @@ -1530,8 +1554,25 @@ interface CASpringAnimation {
[Export ("initialVelocity")]
nfloat InitialVelocity { get; set; }

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch]
[Export ("settlingDuration")]
double /* CFTimeInterval */ SettlingDuration { get; }

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch]
[Export ("allowsOverdamping")]
bool AllowsOverdamping { get; set; }

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch]
[Export ("initWithPerceptualDuration:bounce:")]
NativeHandle Constructor (double /* CFTimeInterval */ perceptualDuration, nfloat bounce);

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch]
[Export ("perceptualDuration")]
double /* CFTimeInterval */ PerceptualDuration { get; }

[iOS (17, 0), TV (17, 0), MacCatalyst (17, 0), Mac (14, 0), NoWatch]
[Export ("bounce")]
nfloat Bounce { get; }
}

/// <summary>Keyframe-based animation support.</summary>
Expand Down Expand Up @@ -2195,23 +2236,14 @@ interface CAEmitterBehavior : NSSecureCoding {

[Internal]
[Static]
[NoiOS]
[NoTV]
[NoWatch]
[NoMacCatalyst]
partial interface CARendererOptionKeys {
[Field ("kCARendererColorSpace")]
NSString ColorSpace { get; }

[NoMacCatalyst]
[Field ("kCARendererMetalCommandQueue")]
NSString MetalCommandQueue { get; }
}

[NoiOS]
[NoTV]
[NoWatch]
[NoMacCatalyst]
[StrongDictionary ("CARendererOptionKeys")]
interface CARendererOptions {

Expand All @@ -2223,19 +2255,12 @@ interface CARendererOptions {
IMTLCommandQueue MetalCommandQueue { get; set; }
}

// 10.5 on the Mac
[NoiOS]
[NoTV]
[NoWatch]
[NoMacCatalyst]
[BaseType (typeof (NSObject))]
interface CARenderer {
[NoMacCatalyst]
[Static]
[Export ("rendererWithMTLTexture:options:")]
CARenderer Create (IMTLTexture tex, [NullAllowed] NSDictionary dict);

[NoMacCatalyst]
[Static]
[Wrap ("Create (tex, options.GetDictionary ())")]
CARenderer Create (IMTLTexture tex, [NullAllowed] CARendererOptions options);
Expand Down Expand Up @@ -2272,7 +2297,6 @@ interface CARenderer {
[Export ("endFrame")]
void EndFrame ();

[NoMacCatalyst]
[Export ("setDestination:")]
void SetDestination (IMTLTexture tex);
}
Expand Down Expand Up @@ -2302,5 +2326,67 @@ interface CAEdrMetadata : NSCopying, NSSecureCoding {
[Static]
[Export ("available")]
bool Available { [Bind ("isAvailable")] get; }

[Static]
[Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Export ("HLGMetadataWithAmbientViewingEnvironment:")]
CAEdrMetadata GetHlgMetadata (NSData ambientViewingEnvironmentData);
}

[BaseType (typeof (NSObject))]
[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoWatch]
[DisableDefaultCtor]
interface CAMetalDisplayLinkUpdate {
[Export ("drawable")]
ICAMetalDrawable Drawable { get; }

[Export ("targetTimestamp")]
double /* CFTimeInterval */ TargetTimestamp { get; }

[Export ("targetPresentationTimestamp")]
double /* CFTimeInterval */ TargetPresentationTimestamp { get; }
}

[Protocol (BackwardsCompatibleCodeGeneration = false), Model]
[BaseType (typeof (NSObject))]
[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoWatch]
interface CAMetalDisplayLinkDelegate {
[Abstract]
[Export ("metalDisplayLink:needsUpdate:")]
void NeedsUpdate (CAMetalDisplayLink link, CAMetalDisplayLinkUpdate update);
}

interface ICAMetalDisplayLinkDelegate { }

[BaseType (typeof (NSObject))]
[iOS (17, 0), TV (17, 0), Mac (14, 0), MacCatalyst (17, 0), NoWatch]
[DisableDefaultCtor]
interface CAMetalDisplayLink {
[Export ("initWithMetalLayer:")]
NativeHandle Constructor (CAMetalLayer layer);

[Export ("addToRunLoop:forMode:")]
void AddToRunLoop (NSRunLoop runloop, NSRunLoopMode mode);

[Export ("removeFromRunLoop:forMode:")]
void RemoveFromRunLoop (NSRunLoop runloop, NSRunLoopMode mode);

[Export ("invalidate")]
void Invalidate ();

[Export ("delegate", ArgumentSemantic.Weak), NullAllowed]
NSObject WeakDelegate { get; set; }

[Wrap ("WeakDelegate"), NullAllowed]
ICAMetalDisplayLinkDelegate Delegate { get; set; }

[Export ("preferredFrameLatency")]
float PreferredFrameLatency { get; set; }

[Export ("preferredFrameRateRange")]
CAFrameRateRange PreferredFrameRateRange { get; set; }

[Export ("paused")]
bool Paused { [Bind ("isPaused")] get; set; }
}
}
31 changes: 31 additions & 0 deletions tests/cecil-tests/Documentation.KnownFailures.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6179,6 +6179,9 @@ F:CoreAnimation.CATextLayerTruncationMode.End
F:CoreAnimation.CATextLayerTruncationMode.Middle
F:CoreAnimation.CATextLayerTruncationMode.None
F:CoreAnimation.CATextLayerTruncationMode.Start
F:CoreAnimation.CAToneMapMode.Automatic
F:CoreAnimation.CAToneMapMode.IfSupported
F:CoreAnimation.CAToneMapMode.Never
F:CoreAnimation.CATransform3D.Identity
F:CoreAnimation.CATransform3D.M11
F:CoreAnimation.CATransform3D.M12
Expand Down Expand Up @@ -28633,6 +28636,7 @@ M:CoreAnimation.CAEdrMetadata.Copy(Foundation.NSZone)
M:CoreAnimation.CAEdrMetadata.EncodeTo(Foundation.NSCoder)
M:CoreAnimation.CAEdrMetadata.GetHdr10Metadata(Foundation.NSData,Foundation.NSData,System.Single)
M:CoreAnimation.CAEdrMetadata.GetHdr10Metadata(System.Single,System.Single,System.Single)
M:CoreAnimation.CAEdrMetadata.GetHlgMetadata(Foundation.NSData)
M:CoreAnimation.CAEmitterCell.DefaultValueForKey(System.String)
M:CoreAnimation.CAEmitterCell.EmitterCell
M:CoreAnimation.CAEmitterCell.EncodeTo(Foundation.NSCoder)
Expand Down Expand Up @@ -28707,6 +28711,12 @@ M:CoreAnimation.CAMediaTimingFunction.EncodeTo(Foundation.NSCoder)
M:CoreAnimation.CAMediaTimingFunction.FromControlPoints(System.Single,System.Single,System.Single,System.Single)
M:CoreAnimation.CAMediaTimingFunction.FromName(Foundation.NSString)
M:CoreAnimation.CAMediaTimingFunction.GetControlPoint(System.IntPtr)
M:CoreAnimation.CAMetalDisplayLink.#ctor(CoreAnimation.CAMetalLayer)
M:CoreAnimation.CAMetalDisplayLink.AddToRunLoop(Foundation.NSRunLoop,Foundation.NSRunLoopMode)
M:CoreAnimation.CAMetalDisplayLink.Dispose(System.Boolean)
M:CoreAnimation.CAMetalDisplayLink.Invalidate
M:CoreAnimation.CAMetalDisplayLink.RemoveFromRunLoop(Foundation.NSRunLoop,Foundation.NSRunLoopMode)
M:CoreAnimation.CAMetalDisplayLinkDelegate.NeedsUpdate(CoreAnimation.CAMetalDisplayLink,CoreAnimation.CAMetalDisplayLinkUpdate)
M:CoreAnimation.CAMetalLayer.NextDrawable
M:CoreAnimation.CAOpenGLLayer.CanDrawInCGLContext(OpenGL.CGLContext,OpenGL.CGLPixelFormat,System.Double,CoreVideo.CVTimeStamp@)
M:CoreAnimation.CAOpenGLLayer.CopyCGLPixelFormatForDisplayMask(System.UInt32)
Expand All @@ -28718,6 +28728,7 @@ M:CoreAnimation.CAOpenGLLayer.Release(OpenGL.CGLPixelFormat)
M:CoreAnimation.CAPropertyAnimation.FromKeyPath(System.String)
M:CoreAnimation.CARenderer.AddUpdate(CoreGraphics.CGRect)
M:CoreAnimation.CARenderer.BeginFrame(System.Double,CoreVideo.CVTimeStamp@)
M:CoreAnimation.CARenderer.BeginFrame(System.Double,Foundation.NSObject@)
M:CoreAnimation.CARenderer.BeginFrame(System.Double)
M:CoreAnimation.CARenderer.Create(Metal.IMTLTexture,CoreAnimation.CARendererOptions)
M:CoreAnimation.CARenderer.Create(Metal.IMTLTexture,Foundation.NSDictionary)
Expand All @@ -28733,6 +28744,7 @@ M:CoreAnimation.CAScrollLayer.Create
M:CoreAnimation.CAScrollLayer.ScrollToPoint(CoreGraphics.CGPoint)
M:CoreAnimation.CAScrollLayer.ScrollToRect(CoreGraphics.CGRect)
M:CoreAnimation.CAShapeLayer.Create
M:CoreAnimation.CASpringAnimation.#ctor(System.Double,System.Runtime.InteropServices.NFloat)
M:CoreAnimation.CASpringAnimation.FromKeyPath(System.String)
M:CoreAnimation.CATextLayer.Create
M:CoreAnimation.CATextLayer.SetFont(AppKit.NSFont)
Expand Down Expand Up @@ -28775,6 +28787,7 @@ M:CoreAnimation.ICALayerDelegate.DisplayLayer(CoreAnimation.CALayer)
M:CoreAnimation.ICALayerDelegate.DrawLayer(CoreAnimation.CALayer,CoreGraphics.CGContext)
M:CoreAnimation.ICALayerDelegate.LayoutSublayersOfLayer(CoreAnimation.CALayer)
M:CoreAnimation.ICALayerDelegate.WillDrawLayer(CoreAnimation.CALayer)
M:CoreAnimation.ICAMetalDisplayLinkDelegate.NeedsUpdate(CoreAnimation.CAMetalDisplayLink,CoreAnimation.CAMetalDisplayLinkUpdate)
M:CoreAudioKit.AUAudioUnitViewConfiguration.EncodeTo(Foundation.NSCoder)
M:CoreAudioKit.AUAudioUnitViewControllerExtensions.GetSupportedViewConfigurations(AudioUnit.AUAudioUnit,CoreAudioKit.AUAudioUnitViewConfiguration[])
M:CoreAudioKit.AUAudioUnitViewControllerExtensions.SelectViewConfiguration(AudioUnit.AUAudioUnit,CoreAudioKit.AUAudioUnitViewConfiguration)
Expand Down Expand Up @@ -59323,9 +59336,11 @@ P:CoreAnimation.CALayer.Sublayers
P:CoreAnimation.CALayer.SublayerTransform
P:CoreAnimation.CALayer.SuperLayer
P:CoreAnimation.CALayer.TimeOffset
P:CoreAnimation.CALayer.ToneMapMode
P:CoreAnimation.CALayer.Transform
P:CoreAnimation.CALayer.Transition
P:CoreAnimation.CALayer.VisibleRect
P:CoreAnimation.CALayer.WantsExtendedDynamicRangeContent
P:CoreAnimation.CALayer.WeakDelegate
P:CoreAnimation.CALayer.ZPosition
P:CoreAnimation.CAMediaTiming.AutoReverses
Expand All @@ -59341,6 +59356,14 @@ P:CoreAnimation.CAMediaTimingFunction.EaseIn
P:CoreAnimation.CAMediaTimingFunction.EaseInEaseOut
P:CoreAnimation.CAMediaTimingFunction.EaseOut
P:CoreAnimation.CAMediaTimingFunction.Linear
P:CoreAnimation.CAMetalDisplayLink.Delegate
P:CoreAnimation.CAMetalDisplayLink.Paused
P:CoreAnimation.CAMetalDisplayLink.PreferredFrameLatency
P:CoreAnimation.CAMetalDisplayLink.PreferredFrameRateRange
P:CoreAnimation.CAMetalDisplayLink.WeakDelegate
P:CoreAnimation.CAMetalDisplayLinkUpdate.Drawable
P:CoreAnimation.CAMetalDisplayLinkUpdate.TargetPresentationTimestamp
P:CoreAnimation.CAMetalDisplayLinkUpdate.TargetTimestamp
P:CoreAnimation.CAMetalLayer.AllowsNextDrawableTimeout
P:CoreAnimation.CAMetalLayer.ColorSpace
P:CoreAnimation.CAMetalLayer.DeveloperHudProperties
Expand Down Expand Up @@ -59394,9 +59417,12 @@ P:CoreAnimation.CAShapeLayer.Path
P:CoreAnimation.CAShapeLayer.StrokeColor
P:CoreAnimation.CAShapeLayer.StrokeEnd
P:CoreAnimation.CAShapeLayer.StrokeStart
P:CoreAnimation.CASpringAnimation.AllowsOverdamping
P:CoreAnimation.CASpringAnimation.Bounce
P:CoreAnimation.CASpringAnimation.Damping
P:CoreAnimation.CASpringAnimation.InitialVelocity
P:CoreAnimation.CASpringAnimation.Mass
P:CoreAnimation.CASpringAnimation.PerceptualDuration
P:CoreAnimation.CASpringAnimation.SettlingDuration
P:CoreAnimation.CASpringAnimation.Stiffness
P:CoreAnimation.CATextLayer.AllowsFontSubpixelQuantization
Expand Down Expand Up @@ -78512,12 +78538,17 @@ T:CoreAnimation.CACornerMask
T:CoreAnimation.CAEdrMetadata
T:CoreAnimation.CAFrameRateRange
T:CoreAnimation.CAGradientLayerType
T:CoreAnimation.CAMetalDisplayLink
T:CoreAnimation.CAMetalDisplayLinkDelegate
T:CoreAnimation.CAMetalDisplayLinkUpdate
T:CoreAnimation.CAOpenGLLayer
T:CoreAnimation.CARenderer
T:CoreAnimation.CARendererOptions
T:CoreAnimation.CATextLayerAlignmentMode
T:CoreAnimation.CATextLayerTruncationMode
T:CoreAnimation.CAToneMapMode
T:CoreAnimation.CATransform3D
T:CoreAnimation.ICAMetalDisplayLinkDelegate
T:CoreAudioKit.AUAudioUnitViewControllerExtensions
T:CoreAudioKit.AUGenericViewDisplayFlags
T:CoreAudioKit.IAUCustomViewPersistentData
Expand Down

This file was deleted.

Loading
Loading