From d385b4b813b7255dbd2a2323cb7768a4ab3a76b0 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 16 Jan 2025 09:18:46 +0100 Subject: [PATCH 1/2] [src] Run 'make format-csproj'. This runs 'dotnet format' on the generated project files, which will format code inside #if blocks (which 'dotnet format --folder ...' doesn't). This is a code formatting update only, no functional changes. --- .../AVAssetDownloadStorageManagementPolicy.cs | 2 +- src/AVFoundation/AVCaptureMetadataOutput.cs | 4 +- .../AVMetadataMachineReadableCodeObject.cs | 4 +- src/AVFoundation/AVOutputSettingsAssistant.cs | 6 +- src/AVRouting/AVCustomDeviceRoute.cs | 2 +- src/Accessibility/AXSettings.cs | 2 +- src/AddressBook/ABAddressBook.cs | 2 +- src/AppKit/Functions.cs | 4 +- src/AppKit/NSGraphics.cs | 4 +- src/AppKit/NSPasteboardReading.cs | 2 +- src/AudioToolbox/AudioConverter.cs | 4 +- src/AudioToolbox/AudioFile.cs | 2 +- src/AudioToolbox/AudioFileStream.cs | 2 +- src/AudioToolbox/AudioQueue.cs | 10 +- src/AudioToolbox/MusicTrack.cs | 2 +- src/AudioToolbox/SystemSound.cs | 2 +- src/AudioUnit/AUEnums.cs | 60 +- src/AudioUnit/AUGraph.cs | 8 +- src/AudioUnit/AudioComponent.cs | 21 +- src/AudioUnit/AudioComponentDescription.cs | 38 +- src/AudioUnit/AudioUnit.cs | 9 +- src/AudioUnit/AudioUnitUtils.cs | 8 +- src/AudioUnit/ExtAudioFile.cs | 8 +- src/BrowserEngineKit/BEStructs.cs | 19 +- src/Compression/CompressionStreamStruct.cs | 8 +- src/Compression/TaskToApm.cs | 180 +- src/CoreAnimation/CATextLayer.cs | 2 +- src/CoreAnimation/CATransform3D.cs | 8 +- src/CoreBluetooth/CBPeer.cs | 2 +- src/CoreFoundation/CFMessagePort.cs | 12 +- src/CoreFoundation/CFProxySupport.cs | 52 +- src/CoreGraphics/CGAffineTransform.cs | 22 +- src/CoreGraphics/CGColorSpace.cs | 2 +- src/CoreGraphics/CGDisplay.cs | 45 +- src/CoreGraphics/CGEvent.cs | 58 +- src/CoreGraphics/CGEventSource.cs | 22 +- src/CoreGraphics/CGEventTypes.cs | 50 +- src/CoreGraphics/CGImage.cs | 22 +- src/CoreGraphics/CGPattern.cs | 3 +- src/CoreGraphics/CGVector.cs | 4 +- src/CoreImage/Enums.cs | 2 +- src/CoreLocation/CLLocationManager.cs | 2 +- src/CoreMedia/CMSampleBuffer.cs | 6 +- src/CoreMidi/MidiBluetoothDriver.cs | 8 +- src/CoreServices/FSEvents.cs | 34 +- src/CoreServices/LaunchServices.cs | 41 +- src/CoreSpotlight/CSSearchableIndex.cs | 2 +- .../CSSearchableItemAttributeSet.cs | 13 +- src/CoreText/CTFontCollection.cs | 2 +- src/CoreText/CTFontManager.cs | 8 +- src/CoreVideo/CVBuffer.cs | 4 +- src/CoreVideo/CVDisplayLink.cs | 56 +- src/CoreVideo/CVImageBuffer.cs | 2 +- src/CoreVideo/CVPixelFormatDescription.cs | 2 +- src/Darwin/KernelNotification.cs | 146 +- src/Darwin/SystemLog.cs | 60 +- src/FileProvider/Structs.cs | 5 +- src/Foundation/Enum.cs | 4 +- src/Foundation/NSAppleEventDescriptor.cs | 6 +- src/Foundation/NSArray.cs | 2 +- src/Foundation/NSAttributedString.cs | 10 +- src/Foundation/NSAttributedString.mac.cs | 10 +- src/Foundation/NSConnection.cs | 8 +- src/Foundation/NSHost.cs | 8 +- src/Foundation/NSIndexSet.cs | 38 +- src/Foundation/NSNumber.mac.cs | 28 +- src/Foundation/NSObject.mac.cs | 2 +- src/Foundation/NSObject2.cs | 14 +- src/Foundation/NSPropertyListSerialization.cs | 6 +- .../NSScriptCommandArgumentDescription.cs | 8 +- src/Foundation/NSScriptCommandDescription.cs | 16 +- .../NSScriptCommandDescriptionDictionary.cs | 20 +- src/Foundation/NSSecureCoding.cs | 3 +- src/Foundation/NSString.cs | 6 +- src/Foundation/NSThread.mac.cs | 13 +- src/Foundation/NSUrlDownload.cs | 2 +- src/Foundation/NSUrlSessionHandler.cs | 17 +- src/GameKit/GKCompat.cs | 5 +- src/ImageIO/CGImageAnimation.cs | 40 +- src/Intents/INBillTypeResolutionResult.cs | 4 +- .../INCallRecordTypeResolutionResult.cs | 4 +- .../INCarSignalOptionsResolutionResult.cs | 4 +- ...MessageAttributeOptionsResolutionResult.cs | 4 +- .../INMessageAttributeResolutionResult.cs | 4 +- .../INPaymentStatusResolutionResult.cs | 4 +- .../INSetClimateSettingsInCarIntent.cs | 2 +- src/Intents/INSpeakableString.cs | 2 +- .../INWorkoutGoalUnitTypeResolutionResult.cs | 4 +- .../INWorkoutLocationTypeResolutionResult.cs | 4 +- src/MapKit/MapKit.cs | 2 +- src/MediaExtension/MEByteSource.cs | 8 +- .../MERawProcessingListParameter.cs | 2 +- src/MediaExtension/MESampleCursor.cs | 2 +- src/MediaToolbox/MTAudioProcessingTap.cs | 64 +- src/Metal/Defs.cs | 3 +- src/Metal/MTLArgumentEncoder.cs | 4 +- src/Metal/MTLArrays.cs | 3 +- src/Metal/MTLComputeCommandEncoder.cs | 4 +- .../MTLRasterizationRateLayerDescriptor.cs | 17 +- src/Metal/MTLResourceStateCommandEncoder.cs | 10 +- .../MPSGraphExecutable.cs | 8 +- src/MetricKit/MXMetaData.cs | 2 +- src/MetricKit/MXMetric.cs | 2 +- src/MetricKit/MXMetricPayload.cs | 2 +- ...IAlgorithmConvergenceStatusReasonValues.cs | 3 +- src/NearbyInteraction/NINearbyObject.cs | 15 +- src/Network/NWConnection.cs | 2 +- src/Network/NWConnectionGroup.cs | 2 +- src/Network/NWEndpoint.cs | 2 +- src/Network/NWEstablishmentReport.cs | 2 +- src/Network/NWEthernetChannel.cs | 22 +- src/Network/NWInterface.cs | 2 +- src/Network/NWParameters.cs | 4 +- src/Network/NWPath.cs | 2 +- src/Network/NWPrivacyContext.cs | 2 +- src/Network/NWProtocolDefinition.cs | 2 +- src/Network/NWProtocolFramerOptions.cs | 2 +- src/Network/NWProtocolMetadata.cs | 2 +- src/Network/NWProtocolOptions.cs | 2 +- src/Network/NWProtocolStack.cs | 2 +- src/Network/NWProxyConfig.cs | 2 +- src/Network/NWRelayHop.cs | 2 +- src/Network/NWResolverConfig.cs | 2 +- src/ObjCRuntime/BackingField.cs | 3 +- src/ObjCRuntime/BindAs.cs | 12 +- src/ObjCRuntime/Blocks.cs | 12 +- src/ObjCRuntime/Class.cs | 2 +- .../DelayedRegistrationAttribute.cs | 3 +- src/ObjCRuntime/Dlfcn.cs | 3 +- src/ObjCRuntime/INativeObject.cs | 2 +- src/ObjCRuntime/NativeHandle.cs | 4 +- src/ObjCRuntime/PlatformAvailability.cs | 2 +- src/ObjCRuntime/RegistrarHelper.cs | 24 +- src/ObjCRuntime/RequiredFrameworkAttribute.cs | 7 +- src/ObjCRuntime/Runtime.CoreCLR.cs | 52 +- src/ObjCRuntime/Runtime.cs | 31 +- src/ObjCRuntime/Runtime.mac.cs | 4 +- src/PassKit/PKCompat.cs | 5 +- src/PdfKit/Enums.cs | 100 +- src/PhotosUI/PHEnums.cs | 4 +- src/QuickLook/Thumbnail.cs | 6 +- src/SceneKit/Defs.cs | 18 +- src/SceneKit/SCNMatrix4_dotnet.cs | 180 +- src/SceneKit/SCNQuaternion.cs | 18 +- src/SceneKit/SCNVector3.cs | 88 +- src/SceneKit/SCNVector4.cs | 50 +- src/Security/Authorization.cs | 80 +- src/Security/Enums.cs | 4 +- src/Security/Items.cs | 130 +- src/Security/SecCertificate2.cs | 2 +- src/Security/SecIdentity2.cs | 2 +- src/Security/SecSharedCredential.cs | 26 +- src/Security/SecTrust2.cs | 2 +- src/Simd/MathHelper.cs | 3 +- src/Simd/MatrixFloat3x3RM.cs | 32 +- src/Simd/MatrixFloat4x3.cs | 2 +- src/Simd/QuaternionDouble.cs | 13 +- src/Simd/VectorDouble2.cs | 8 +- src/Simd/VectorDouble4.cs | 11 +- src/Simd/VectorInt2.cs | 8 +- src/Simd/VectorInt3.cs | 8 +- src/Simd/VectorInt4.cs | 8 +- src/StoreKit/SKOverlayAppClipConfiguration.cs | 7 +- src/StoreKit/SKOverlayAppConfiguration.cs | 7 +- src/System.Net.Http/CFNetworkHandler.cs | 2 +- src/UIKit/NSLayoutManager.cs | 2 +- src/UIKit/UIActionSheet.cs | 10 +- src/UIKit/UIAppearance.cs | 4 +- src/UIKit/UIButton.cs | 2 +- src/UIKit/UIDevice.cs | 2 +- src/UIKit/UIDocumentBrowserViewController.cs | 6 +- src/UIKit/UIImage.cs | 6 +- src/UIKit/UINavigationBar.cs | 4 +- src/UIKit/UIPasteboard.cs | 14 +- src/UIKit/UIPickerView.cs | 2 +- src/UIKit/UIPopoverPresentationController.cs | 2 +- src/UIKit/UIStringDrawing.cs | 2 +- src/UIKit/UITextAttributes.cs | 18 +- src/UIKit/UIToolbar.cs | 8 +- src/UIKit/UIVideo.cs | 12 +- src/VideoToolbox/VTCompressionSession.cs | 2 +- src/VideoToolbox/VTDecompressionSession.cs | 6 +- src/VideoToolbox/VTRawProcessingSession.cs | 4 +- src/WebKit/WKPreferences.cs | 2 +- src/accessorysetupkit.cs | 54 +- src/appkit.cs | 4 +- src/authenticationservices.cs | 9 +- src/avfoundation.cs | 10 +- src/backgroundassets.cs | 3 +- src/browserenginekit.cs | 297 +- src/contactsui.cs | 9 +- src/coreanimation.cs | 5 +- src/coredata.cs | 14 +- src/corehaptics.cs | 2 +- src/coreimage.cs | 6 +- src/corelocation.cs | 4 +- src/corenfc.cs | 8 +- src/coretext.cs | 9 +- src/cryptotokenkit.cs | 249 +- src/eventkit.cs | 2 +- src/foundation.cs | 29 +- src/gamekit.cs | 16 +- src/healthkit.cs | 2 +- src/mapkit.cs | 10 +- src/mediaextension.cs | 225 +- src/mediaplayer.cs | 6 +- src/metal.cs | 2 +- src/metrickit.cs | 2 +- src/networkextension.cs | 4 +- src/quicklook.cs | 6 +- src/scenekit.cs | 2 +- src/sharedwithyou.cs | 12 +- src/soundanalysis.cs | 2 +- src/spritekit.cs | 5100 ++++++++--------- src/storekit.cs | 18 +- src/tvmlkit.cs | 9 +- src/uikit.cs | 4 +- src/webkit.cs | 6 +- src/xkit.cs | 76 +- 219 files changed, 4389 insertions(+), 4539 deletions(-) diff --git a/src/AVFoundation/AVAssetDownloadStorageManagementPolicy.cs b/src/AVFoundation/AVAssetDownloadStorageManagementPolicy.cs index 02331fe8f91a..b4bcb7ff7a81 100644 --- a/src/AVFoundation/AVAssetDownloadStorageManagementPolicy.cs +++ b/src/AVFoundation/AVAssetDownloadStorageManagementPolicy.cs @@ -17,7 +17,7 @@ public virtual AVAssetDownloadedAssetEvictionPriority Priority { } public partial class AVMutableAssetDownloadStorageManagementPolicy { - + public override AVAssetDownloadedAssetEvictionPriority Priority { get { return AVAssetDownloadedAssetEvictionPriorityExtensions.GetValue (_Priority); } set { _Priority = value.GetConstant () ?? throw new ArgumentOutOfRangeException (nameof (Priority)); } diff --git a/src/AVFoundation/AVCaptureMetadataOutput.cs b/src/AVFoundation/AVCaptureMetadataOutput.cs index a4d7564bdeb2..48806d4fdf78 100644 --- a/src/AVFoundation/AVCaptureMetadataOutput.cs +++ b/src/AVFoundation/AVCaptureMetadataOutput.cs @@ -36,12 +36,12 @@ namespace AVFoundation { public partial class AVCaptureMetadataOutput { - + public AVMetadataObjectType AvailableMetadataObjectTypes { get { return AVMetadataObjectTypeExtensions.ToFlags (WeakAvailableMetadataObjectTypes); } } - public AVMetadataObjectType MetadataObjectTypes { + public AVMetadataObjectType MetadataObjectTypes { get { return AVMetadataObjectTypeExtensions.ToFlags (WeakMetadataObjectTypes); } set { WeakMetadataObjectTypes = value.ToArray (); } } diff --git a/src/AVFoundation/AVMetadataMachineReadableCodeObject.cs b/src/AVFoundation/AVMetadataMachineReadableCodeObject.cs index 0d40567dc4df..efa68e1be136 100644 --- a/src/AVFoundation/AVMetadataMachineReadableCodeObject.cs +++ b/src/AVFoundation/AVMetadataMachineReadableCodeObject.cs @@ -36,12 +36,12 @@ namespace AVFoundation { public partial class AVMetadataMachineReadableCodeObject { - public CGPoint[]? Corners { + public CGPoint []? Corners { get { var arr = WeakCorners; if (arr is null) return null; - var rv = new CGPoint[arr.Length]; + var rv = new CGPoint [arr.Length]; for (int i = 0; i < rv.Length; i++) { var dict = arr [i]; CGPoint pnt; diff --git a/src/AVFoundation/AVOutputSettingsAssistant.cs b/src/AVFoundation/AVOutputSettingsAssistant.cs index 0b38d546a4a2..246b8e373345 100644 --- a/src/AVFoundation/AVOutputSettingsAssistant.cs +++ b/src/AVFoundation/AVOutputSettingsAssistant.cs @@ -20,19 +20,19 @@ public AVOutputSettingsAssistant? Preset640x480 { return FromPreset (_Preset640x480); } } - + public AVOutputSettingsAssistant? Preset960x540 { get { return FromPreset (_Preset960x540); } } - + public AVOutputSettingsAssistant? Preset1280x720 { get { return FromPreset (_Preset1280x720); } } - + public AVOutputSettingsAssistant? Preset1920x1080 { get { return FromPreset (_Preset1920x1080); diff --git a/src/AVRouting/AVCustomDeviceRoute.cs b/src/AVRouting/AVCustomDeviceRoute.cs index 0e48913281e2..20a878143495 100644 --- a/src/AVRouting/AVCustomDeviceRoute.cs +++ b/src/AVRouting/AVCustomDeviceRoute.cs @@ -13,7 +13,7 @@ namespace AVRouting { partial class AVCustomDeviceRoute { - public NWEndpoint NetworkEndpoint => new NWEndpoint (_NetworkEndpoint, owns: false); + public NWEndpoint NetworkEndpoint => new NWEndpoint (_NetworkEndpoint, owns: false); } } diff --git a/src/Accessibility/AXSettings.cs b/src/Accessibility/AXSettings.cs index 0d2cd574f394..760988c28a26 100644 --- a/src/Accessibility/AXSettings.cs +++ b/src/Accessibility/AXSettings.cs @@ -51,7 +51,7 @@ public static bool IsAssistiveAccessEnabled { [SupportedOSPlatform ("macos15.0")] [SupportedOSPlatform ("tvos18.0")] [DllImport (Constants.AccessibilityLibrary)] - unsafe static extern void AXOpenSettingsFeature (nint /* AXSettingsFeature */ feature, BlockLiteral *block); + unsafe static extern void AXOpenSettingsFeature (nint /* AXSettingsFeature */ feature, BlockLiteral* block); /// Open the Settings app to the specified section. /// The section to open. diff --git a/src/AddressBook/ABAddressBook.cs b/src/AddressBook/ABAddressBook.cs index cfcee0027fda..fbeeb3e682f1 100644 --- a/src/AddressBook/ABAddressBook.cs +++ b/src/AddressBook/ABAddressBook.cs @@ -85,7 +85,7 @@ static InitConstants () { #if __MACCATALYST__ // avoid TypeLoadException if used before macOS 11.x - if (!SystemVersion.CheckiOS (14,0)) + if (!SystemVersion.CheckiOS (14, 0)) return; #endif // ensure we can init. This is needed before iOS6 (as per doc). diff --git a/src/AppKit/Functions.cs b/src/AppKit/Functions.cs index afe5a2e27b13..4a4299de2950 100644 --- a/src/AppKit/Functions.cs +++ b/src/AppKit/Functions.cs @@ -36,9 +36,9 @@ namespace AppKit { #if MONOMAC // Class to access C functions public partial class AppKitFramework { - + [DllImport (Constants.AppKitLibrary)] - public static extern void NSBeep(); + public static extern void NSBeep (); } #endif } diff --git a/src/AppKit/NSGraphics.cs b/src/AppKit/NSGraphics.cs index 4d8d857e889e..617f034b17ef 100644 --- a/src/AppKit/NSGraphics.cs +++ b/src/AppKit/NSGraphics.cs @@ -181,7 +181,7 @@ public static void FrameRect (CGRect rect, nfloat frameWidth, NSCompositingOpera #if NET [SupportedOSPlatform ("macos")] - [ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead." )] + [ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead.")] #else [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'NSCursor.DisappearingItemCursor' instead.")] #endif @@ -190,7 +190,7 @@ public static void FrameRect (CGRect rect, nfloat frameWidth, NSCompositingOpera #if NET [SupportedOSPlatform ("macos")] - [ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead." )] + [ObsoletedOSPlatform ("macos14.0", "Use 'NSCursor.DisappearingItemCursor' instead.")] #else [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use 'NSCursor.DisappearingItemCursor' instead.")] #endif diff --git a/src/AppKit/NSPasteboardReading.cs b/src/AppKit/NSPasteboardReading.cs index 04e90627818c..a6587fa1a415 100644 --- a/src/AppKit/NSPasteboardReading.cs +++ b/src/AppKit/NSPasteboardReading.cs @@ -11,7 +11,7 @@ namespace AppKit { public partial interface INSPasteboardReading { [BindingImpl (BindingImplOptions.Optimizable)] - public unsafe static T? CreateInstance (NSObject propertyList, NSPasteboardType type) where T: NSObject, INSPasteboardReading + public unsafe static T? CreateInstance (NSObject propertyList, NSPasteboardType type) where T : NSObject, INSPasteboardReading { return CreateInstance (propertyList, type.GetConstant ()!); } diff --git a/src/AudioToolbox/AudioConverter.cs b/src/AudioToolbox/AudioConverter.cs index 4a672adc6b86..b993c9f7208d 100644 --- a/src/AudioToolbox/AudioConverter.cs +++ b/src/AudioToolbox/AudioConverter.cs @@ -583,13 +583,13 @@ AudioConverterError FillComplexBuffer (ref int outputDataPacketSize, var packetSize = outputDataPacketSize; int* packetSizePtr = &packetSize; if (packetDescription is null) { - var returnOne = AudioConverterFillComplexBuffer (Handle, &FillComplexBufferShared, this_ptr, (IntPtr)packetSizePtr, (IntPtr) outputData, IntPtr.Zero); + var returnOne = AudioConverterFillComplexBuffer (Handle, &FillComplexBufferShared, this_ptr, (IntPtr) packetSizePtr, (IntPtr) outputData, IntPtr.Zero); outputDataPacketSize = packetSize; return returnOne; } fixed (AudioStreamPacketDescription* pdesc = packetDescription) { - var returnTwo = AudioConverterFillComplexBuffer (Handle, &FillComplexBufferShared, this_ptr, (IntPtr)packetSizePtr, (IntPtr) outputData, (IntPtr) pdesc); + var returnTwo = AudioConverterFillComplexBuffer (Handle, &FillComplexBufferShared, this_ptr, (IntPtr) packetSizePtr, (IntPtr) outputData, (IntPtr) pdesc); outputDataPacketSize = packetSize; return returnTwo; } diff --git a/src/AudioToolbox/AudioFile.cs b/src/AudioToolbox/AudioFile.cs index 71130c797555..83c5ca7ac299 100644 --- a/src/AudioToolbox/AudioFile.cs +++ b/src/AudioToolbox/AudioFile.cs @@ -1444,7 +1444,7 @@ public IntPtr GetProperty (AudioFileProperty property, out int size) return IntPtr.Zero; } #if NET - unsafe T? GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioFileProperty property) where T : unmanaged + unsafe T? GetProperty<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioFileProperty property) where T : unmanaged #else unsafe T? GetProperty (AudioFileProperty property) where T : unmanaged #endif diff --git a/src/AudioToolbox/AudioFileStream.cs b/src/AudioToolbox/AudioFileStream.cs index 5c6395deb45a..d227efe43049 100644 --- a/src/AudioToolbox/AudioFileStream.cs +++ b/src/AudioToolbox/AudioFileStream.cs @@ -438,7 +438,7 @@ long GetLong (AudioFileStreamProperty property) } #if NET - unsafe T? GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioFileStreamProperty property) where T : unmanaged + unsafe T? GetProperty<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioFileStreamProperty property) where T : unmanaged #else unsafe T? GetProperty (AudioFileStreamProperty property) where T : unmanaged #endif diff --git a/src/AudioToolbox/AudioQueue.cs b/src/AudioToolbox/AudioQueue.cs index 3d2a248651d8..1e7bee989edb 100644 --- a/src/AudioToolbox/AudioQueue.cs +++ b/src/AudioToolbox/AudioQueue.cs @@ -988,7 +988,7 @@ public IntPtr GetProperty (AudioQueueProperty property, out int size) // Should be private #if NET - public unsafe T GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioQueueProperty property) where T : struct + public unsafe T GetProperty<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioQueueProperty property) where T : struct #else public unsafe T GetProperty (AudioQueueProperty property) where T : struct #endif @@ -1016,7 +1016,7 @@ public unsafe T GetProperty (AudioQueueProperty property) where T : struct } #if NET - unsafe T GetProperty<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioConverterPropertyID property) where T : struct + unsafe T GetProperty<[DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T> (AudioConverterPropertyID property) where T : struct #else unsafe T GetProperty (AudioConverterPropertyID property) where T : struct #endif @@ -1189,7 +1189,7 @@ public AudioStreamBasicDescription AudioStreamDescription { #if !MONOMAC return GetProperty (AudioQueueProperty.StreamDescription); #else - return GetProperty (AudioConverterPropertyID.CurrentInputStreamDescription); + return GetProperty (AudioConverterPropertyID.CurrentInputStreamDescription); #endif } } @@ -1296,7 +1296,7 @@ extern static AudioQueueStatus AudioQueueProcessingTapNew (IntPtr inAQ, AudioQue #if NET unsafe { status = AudioQueueProcessingTapNew (handle, &AudioQueueProcessingTap.TapCallback, GCHandle.ToIntPtr (aqpt.Handle), flags, &maxFrames, - &processingFormat, &tapHandle); + &processingFormat, &tapHandle); } #else status = AudioQueueProcessingTapNew (handle, AudioQueueProcessingTap.CreateTapCallback, GCHandle.ToIntPtr (aqpt.Handle), flags, out maxFrames, @@ -1459,7 +1459,7 @@ public class OutputAudioQueue : AudioQueue { #if NET [DllImport (Constants.AudioToolboxLibrary)] extern unsafe static OSStatus AudioQueueNewOutput (AudioStreamBasicDescription* format, delegate* unmanaged callback, - IntPtr userData, IntPtr cfrunLoop_callbackRunloop, IntPtr cfstr_runMode, + IntPtr userData, IntPtr cfrunLoop_callbackRunloop, IntPtr cfstr_runMode, uint flags, IntPtr* audioQueue); #else static readonly AudioQueueOutputCallback dOutputCallback = output_callback; diff --git a/src/AudioToolbox/MusicTrack.cs b/src/AudioToolbox/MusicTrack.cs index 53d36bafc3cf..37866a3a50cc 100644 --- a/src/AudioToolbox/MusicTrack.cs +++ b/src/AudioToolbox/MusicTrack.cs @@ -309,7 +309,7 @@ public MusicPlayerStatus GetDestMidiEndpoint (out MidiEndpoint? outEndpoint) unsafe { result = MusicTrackGetDestMIDIEndpoint (Handle, &midiHandle); } - outEndpoint = (result == MusicPlayerStatus.Success)? new MidiEndpoint (midiHandle): null; + outEndpoint = (result == MusicPlayerStatus.Success) ? new MidiEndpoint (midiHandle) : null; return result; } #endif diff --git a/src/AudioToolbox/SystemSound.cs b/src/AudioToolbox/SystemSound.cs index 70295f4cb8c0..1e3d4be7f3fa 100644 --- a/src/AudioToolbox/SystemSound.cs +++ b/src/AudioToolbox/SystemSound.cs @@ -402,7 +402,7 @@ public AudioServicesError AddSystemSoundCompletion (Action routine, CFRunLoop? r runLoop.GetHandle (), IntPtr.Zero, // runLoopMode should be enum runLoopMode.GetHandle (), #if NET - &SoundCompletionShared, + &SoundCompletionShared, #else SoundCompletionCallback, #endif diff --git a/src/AudioUnit/AUEnums.cs b/src/AudioUnit/AUEnums.cs index 9eb7acba5f32..54a921159598 100644 --- a/src/AudioUnit/AUEnums.cs +++ b/src/AudioUnit/AUEnums.cs @@ -505,16 +505,16 @@ public enum AudioUnitParameterType // UInt32 in AudioUnitParameterInfo Mixer3DGain = 3, Mixer3DPlaybackRate = 4, #if MONOMAC - Mixer3DReverbBlend = 5, - Mixer3DGlobalReverbGain = 6, - Mixer3DOcclusionAttenuation = 7, - Mixer3DObstructionAttenuation = 8, - Mixer3DMinGain = 9, - Mixer3DMaxGain = 10, - Mixer3DPreAveragePower = 1000, - Mixer3DPrePeakHoldLevel = 2000, - Mixer3DPostAveragePower = 3000, - Mixer3DPostPeakHoldLevel = 4000, + Mixer3DReverbBlend = 5, + Mixer3DGlobalReverbGain = 6, + Mixer3DOcclusionAttenuation = 7, + Mixer3DObstructionAttenuation = 8, + Mixer3DMinGain = 9, + Mixer3DMaxGain = 10, + Mixer3DPreAveragePower = 1000, + Mixer3DPrePeakHoldLevel = 2000, + Mixer3DPostAveragePower = 3000, + Mixer3DPostPeakHoldLevel = 4000, #else Mixer3DEnable = 5, Mixer3DMinGain = 6, @@ -563,8 +563,8 @@ public enum AudioUnitParameterType // UInt32 in AudioUnitParameterInfo // AUTimePitch, AUTimePitch (offline), AUPitch units TimePitchRate = 0, #if MONOMAC - TimePitchPitch = 1, - TimePitchEffectBlend = 2, + TimePitchPitch = 1, + TimePitchEffectBlend = 2, #endif // AUNewTimePitch @@ -969,24 +969,24 @@ public enum AudioUnitSubType : uint { AudioFilePlayer = 0x6166706C, // 'afpl' #if MONOMAC - HALOutput = 0x6168616C, // 'ahal' - DefaultOutput = 0x64656620, // 'def ' - SystemOutput = 0x73797320, // 'sys ' - DLSSynth = 0x646C7320, // 'dls ' - TimePitch = 0x746D7074, // 'tmpt' - GraphicEQ = 0x67726571, // 'greq' - MultiBandCompressor = 0x6D636D70, // 'mcmp' - MatrixReverb = 0x6D726576, // 'mrev' - Pitch = 0x746D7074, // 'tmpt' - AUFilter = 0x66696C74, // 'filt - NetSend = 0x6E736E64, // 'nsnd' - RogerBeep = 0x726F6772, // 'rogr' - StereoMixer = 0x736D7872, // 'smxr' - SphericalHeadPanner = 0x73706872, // 'sphr' - VectorPanner = 0x76626173, // 'vbas' - SoundFieldPanner = 0x616D6269, // 'ambi' - HRTFPanner = 0x68727466, // 'hrtf' - NetReceive = 0x6E726376, // 'nrcv' + HALOutput = 0x6168616C, // 'ahal' + DefaultOutput = 0x64656620, // 'def ' + SystemOutput = 0x73797320, // 'sys ' + DLSSynth = 0x646C7320, // 'dls ' + TimePitch = 0x746D7074, // 'tmpt' + GraphicEQ = 0x67726571, // 'greq' + MultiBandCompressor = 0x6D636D70, // 'mcmp' + MatrixReverb = 0x6D726576, // 'mrev' + Pitch = 0x746D7074, // 'tmpt' + AUFilter = 0x66696C74, // 'filt + NetSend = 0x6E736E64, // 'nsnd' + RogerBeep = 0x726F6772, // 'rogr' + StereoMixer = 0x736D7872, // 'smxr' + SphericalHeadPanner = 0x73706872, // 'sphr' + VectorPanner = 0x76626173, // 'vbas' + SoundFieldPanner = 0x616D6269, // 'ambi' + HRTFPanner = 0x68727466, // 'hrtf' + NetReceive = 0x6E726376, // 'nrcv' #endif } diff --git a/src/AudioUnit/AUGraph.cs b/src/AudioUnit/AUGraph.cs index eaed2bec657b..e0637a5c1a94 100644 --- a/src/AudioUnit/AUGraph.cs +++ b/src/AudioUnit/AUGraph.cs @@ -175,7 +175,7 @@ public AudioUnitStatus RemoveRenderNotify (RenderDelegate callback) #if NET unsafe { if (graphUserCallbacks.Count == 0) - error = (AudioUnitStatus)AUGraphRemoveRenderNotify (Handle, &renderCallback, GCHandle.ToIntPtr (gcHandle)); + error = (AudioUnitStatus) AUGraphRemoveRenderNotify (Handle, &renderCallback, GCHandle.ToIntPtr (gcHandle)); } #else if (graphUserCallbacks.Count == 0) @@ -201,7 +201,7 @@ static CallbackShared static_CallbackShared { #if NET [UnmanagedCallersOnly] - static unsafe AudioUnitStatus renderCallback(IntPtr inRefCon, + static unsafe AudioUnitStatus renderCallback (IntPtr inRefCon, AudioUnitRenderActionFlags* _ioActionFlags, AudioTimeStamp* _inTimeStamp, uint _inBusNumber, @@ -530,14 +530,14 @@ protected override void Dispose (bool disposing) [DllImport (Constants.AudioToolboxLibrary)] #if NET - static unsafe extern int AUGraphAddRenderNotify (IntPtr inGraph, delegate* unmanaged inCallback, IntPtr inRefCon ); + static unsafe extern int AUGraphAddRenderNotify (IntPtr inGraph, delegate* unmanaged inCallback, IntPtr inRefCon); #else static extern int AUGraphAddRenderNotify (IntPtr inGraph, CallbackShared inCallback, IntPtr inRefCon); #endif #if NET [DllImport (Constants.AudioToolboxLibrary)] - static unsafe extern int AUGraphRemoveRenderNotify (IntPtr inGraph, delegate* unmanaged inCallback, IntPtr inRefCon ); + static unsafe extern int AUGraphRemoveRenderNotify (IntPtr inGraph, delegate* unmanaged inCallback, IntPtr inRefCon); #else [DllImport (Constants.AudioToolboxLibrary)] static extern int AUGraphRemoveRenderNotify (IntPtr inGraph, CallbackShared inCallback, IntPtr inRefCon); diff --git a/src/AudioUnit/AudioComponent.cs b/src/AudioUnit/AudioComponent.cs index f5a073cc670c..8cdc6261ab28 100644 --- a/src/AudioUnit/AudioComponent.cs +++ b/src/AudioUnit/AudioComponent.cs @@ -43,7 +43,7 @@ #else using AppKit; #if !COREBUILD -using UIImage=AppKit.NSImage; +using UIImage = AppKit.NSImage; #endif #endif @@ -512,7 +512,8 @@ public double LastActiveTime { [Mac (13,0)] [iOS (16,0)] #endif - public NSDictionary? GetConfigurationInfo (out int resultCode) { + public NSDictionary? GetConfigurationInfo (out int resultCode) + { IntPtr dictPtr; unsafe { resultCode = AudioComponentCopyConfigurationInfo (GetCheckedHandle (), &dictPtr); @@ -561,7 +562,8 @@ unsafe static extern int AudioComponentValidate (IntPtr /* AudioComponent* */ in [iOS (16,0)] [MacCatalyst (16,0)] #endif - public AudioComponentValidationResult Validate (NSDictionary? validationParameters, out int resultCode) { + public AudioComponentValidationResult Validate (NSDictionary? validationParameters, out int resultCode) + { AudioComponentValidationResult result; unsafe { resultCode = AudioComponentValidate (GetCheckedHandle (), validationParameters.GetHandle (), &result); @@ -597,7 +599,7 @@ static void TrampolineAction (IntPtr blockPtr, AudioComponentValidationResult re { var del = BlockLiteral.GetTarget> (blockPtr); if (del is not null) - del (result, Runtime.GetNSObject(dictionary)); + del (result, Runtime.GetNSObject (dictionary)); } #if NET @@ -625,10 +627,11 @@ static void TrampolineAction (IntPtr blockPtr, AudioComponentValidationResult re #endif [BindingImpl (BindingImplOptions.Optimizable)] public void ValidateAsync (NSDictionary? validationParameters, - Action onCompletion, out int resultCode) { + Action onCompletion, out int resultCode) + { if (onCompletion is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (onCompletion)); - + unsafe { #if NET delegate* unmanaged trampoline = &TrampolineAction; @@ -696,7 +699,7 @@ public void ValidateAsync (NSDictionary? validationParameters, #else [NoTV] #endif - public AudioComponentInfo[]? ComponentList { + public AudioComponentInfo []? ComponentList { get { var nameHandle = CFString.CreateNative (Name); try { @@ -707,10 +710,10 @@ public AudioComponentInfo[]? ComponentList { if (nsArray is null) return null; // make things easier for developers since we do not know how to have an implicit conversion from NSObject to AudioComponentInfo - var dics = NSArray.FromArray (nsArray); + var dics = NSArray.FromArray (nsArray); var result = new AudioComponentInfo [dics.Length]; for (var i = 0; i < result.Length; i++) { - result [i] = new AudioComponentInfo (dics[i]); + result [i] = new AudioComponentInfo (dics [i]); } return result; } diff --git a/src/AudioUnit/AudioComponentDescription.cs b/src/AudioUnit/AudioComponentDescription.cs index 48b801c68c16..019ee39f512f 100644 --- a/src/AudioUnit/AudioComponentDescription.cs +++ b/src/AudioUnit/AudioComponentDescription.cs @@ -97,9 +97,9 @@ public enum AudioComponentType : uint { // OSType in AudioComponentDescription public enum AudioTypeOutput { // OSType in AudioComponentDescription Generic = 0x67656e72, // 'genr' #if MONOMAC - HAL=0x6168616c, // 'ahal' - Default=0x64656620, // 'def' - System=0x73797320, // 'sys' + HAL = 0x6168616c, // 'ahal' + Default = 0x64656620, // 'def' + System = 0x73797320, // 'sys' #endif #if NET [SupportedOSPlatform ("macos")] @@ -113,7 +113,7 @@ public enum AudioTypeOutput { // OSType in AudioComponentDescription public enum AudioTypeMusicDevice { // OSType in AudioComponentDescription #if MONOMAC - DlsSynth = 0x646c7320, // 'dls ' + DlsSynth = 0x646c7320, // 'dls ' #endif Sampler = 0x73616d70, // 'samp' @@ -137,7 +137,7 @@ public enum AudioTypeConverter { // OSType in AudioComponentDescription RoundTripAAC = 0x72616163, // 'raac' MultiSplitter = 0x6d73706c, // 'mspl' #if MONOMAC - TimePitch=0x746d7074, // 'tmpt' + TimePitch = 0x746d7074, // 'tmpt' #else #if NET [SupportedOSPlatform ("ios")] @@ -188,13 +188,13 @@ public enum AudioTypeEffect { // OSType in AudioComponentDescription Distortion = 0x64697374, // 'dist' BandPassFilter = 0x62706173, // 'bpas' #if MONOMAC - GraphicEQ=0x67726571, // 'greq' - MultiBandCompressor=0x6d636d70, // 'mcmp' - MatrixReverb=0x6d726576, // 'mrev' - Pitch=0x70697463, // 'pitc' - AUFilter=0x66696c74, // 'filt' - NetSend=0x6e736e64, // 'nsnd' - RogerBeep=0x726f6772, // 'rogr' + GraphicEQ = 0x67726571, // 'greq' + MultiBandCompressor = 0x6d636d70, // 'mcmp' + MatrixReverb = 0x6d726576, // 'mrev' + Pitch = 0x70697463, // 'pitc' + AUFilter = 0x66696c74, // 'filt' + NetSend = 0x6e736e64, // 'nsnd' + RogerBeep = 0x726f6772, // 'rogr' #else #if NET [SupportedOSPlatform ("ios")] @@ -227,7 +227,7 @@ public enum AudioTypeMixer { // OSType in AudioComponentDescription Matrix = 0x6d786d78, // 'mxmx' Spacial = 0x3364656d, // Same as Embedded3D #if MONOMAC - Stereo=0x736d7872, // 'smxr' + Stereo = 0x736d7872, // 'smxr' #if NET [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("maccatalyst")] @@ -237,7 +237,7 @@ public enum AudioTypeMixer { // OSType in AudioComponentDescription #else [Deprecated (PlatformName.MacOSX, 10, 10, message : "Use 'Spacial' instead.")] #endif - ThreeD=0x33646d78, // '3dmx' + ThreeD = 0x33646d78, // '3dmx' #else #if NET [SupportedOSPlatform ("ios")] @@ -252,16 +252,16 @@ public enum AudioTypeMixer { // OSType in AudioComponentDescription public enum AudioTypePanner { // OSType in AudioComponentDescription #if MONOMAC - SphericalHead=0x73706872, // 'sphr' - Vector=0x76626173, // 'vbas' - SoundField=0x616d6269, // 'ambi' - rHRTF=0x68727466, // 'hrtf' + SphericalHead = 0x73706872, // 'sphr' + Vector = 0x76626173, // 'vbas' + SoundField = 0x616d6269, // 'ambi' + rHRTF = 0x68727466, // 'hrtf' #endif } public enum AudioTypeGenerator { // OSType in AudioComponentDescription #if MONOMAC - NetReceive=0x6e726376, // 'nrcv' + NetReceive = 0x6e726376, // 'nrcv' #endif ScheduledSoundPlayer = 0x7373706c, // 'sspl' AudioFilePlayer = 0x6166706c, // 'afpl' diff --git a/src/AudioUnit/AudioUnit.cs b/src/AudioUnit/AudioUnit.cs index 332c6302aa1f..ede6350113d9 100644 --- a/src/AudioUnit/AudioUnit.cs +++ b/src/AudioUnit/AudioUnit.cs @@ -131,14 +131,13 @@ internal AudioUnitException (int k) : base (Lookup (k)) #if NET [StructLayout (LayoutKind.Sequential)] - unsafe struct AURenderCallbackStruct - { + unsafe struct AURenderCallbackStruct { #if COREBUILD public delegate* unmanaged Proc; #else public delegate* unmanaged Proc; #endif - public IntPtr ProcRefCon; + public IntPtr ProcRefCon; } #else [StructLayout (LayoutKind.Sequential)] @@ -701,7 +700,7 @@ public AudioUnitStatus SetRenderCallback (RenderDelegate renderDelegate, AudioUn #if NET [UnmanagedCallersOnly] - static unsafe AudioUnitStatus RenderCallbackImpl (IntPtr clientData, AudioUnitRenderActionFlags* actionFlags, AudioTimeStamp* timeStamp, uint busNumber, uint numberFrames, IntPtr data) + static unsafe AudioUnitStatus RenderCallbackImpl (IntPtr clientData, AudioUnitRenderActionFlags* actionFlags, AudioTimeStamp* timeStamp, uint busNumber, uint numberFrames, IntPtr data) #else [MonoPInvokeCallback (typeof (CallbackShared))] static AudioUnitStatus RenderCallbackImpl (IntPtr clientData, ref AudioUnitRenderActionFlags actionFlags, ref AudioTimeStamp timeStamp, uint busNumber, uint numberFrames, IntPtr data) @@ -1173,7 +1172,7 @@ public AudioObjectPropertyAddress (AudioObjectPropertySelector selector, AudioOb #endif public unsafe class AURenderEventEnumerator : INativeObject #if COREBUILD - {} + { } #else , IEnumerator { AURenderEvent* current; diff --git a/src/AudioUnit/AudioUnitUtils.cs b/src/AudioUnit/AudioUnitUtils.cs index 9303de1a98d0..156b07afcda2 100644 --- a/src/AudioUnit/AudioUnitUtils.cs +++ b/src/AudioUnit/AudioUnitUtils.cs @@ -40,10 +40,10 @@ namespace AudioUnit { #if NET - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("ios")] + [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("tvos")] #endif public static class AudioUnitUtils { public const int SampleFractionBits = 24; diff --git a/src/AudioUnit/ExtAudioFile.cs b/src/AudioUnit/ExtAudioFile.cs index 83fab37e4822..06d154f43695 100644 --- a/src/AudioUnit/ExtAudioFile.cs +++ b/src/AudioUnit/ExtAudioFile.cs @@ -70,10 +70,10 @@ public enum ExtAudioFileError // Implictly cast to OSType } #if NET - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("ios")] + [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("tvos")] #endif public class ExtAudioFile : IDisposable { IntPtr _extAudioFile; diff --git a/src/BrowserEngineKit/BEStructs.cs b/src/BrowserEngineKit/BEStructs.cs index b969768b35f7..c6f6a5c1e1dc 100644 --- a/src/BrowserEngineKit/BEStructs.cs +++ b/src/BrowserEngineKit/BEStructs.cs @@ -6,16 +6,15 @@ namespace BrowserEngineKit { #if IOS || MACCATALYST || TVOS - [SupportedOSPlatform ("ios17.4")] - [SupportedOSPlatform ("maccatalyst17.4")] - [SupportedOSPlatform ("tvos17.4")] - [UnsupportedOSPlatform ("macos")] - [StructLayout (LayoutKind.Sequential)] - public struct BEDirectionalTextRange - { - public nint Offset; - public nint Length; - } + [SupportedOSPlatform ("ios17.4")] + [SupportedOSPlatform ("maccatalyst17.4")] + [SupportedOSPlatform ("tvos17.4")] + [UnsupportedOSPlatform ("macos")] + [StructLayout (LayoutKind.Sequential)] + public struct BEDirectionalTextRange { + public nint Offset; + public nint Length; + } #endif // __IOS__ || __MACCATALYST__ } #endif // NET diff --git a/src/Compression/CompressionStreamStruct.cs b/src/Compression/CompressionStreamStruct.cs index 1bc4c1199b06..f50a88783d3d 100644 --- a/src/Compression/CompressionStreamStruct.cs +++ b/src/Compression/CompressionStreamStruct.cs @@ -8,10 +8,10 @@ namespace Compression { #if NET - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("ios")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("tvos")] #endif [StructLayout (LayoutKind.Sequential)] struct CompressionStreamStruct { diff --git a/src/Compression/TaskToApm.cs b/src/Compression/TaskToApm.cs index 4207ccc2c802..643eefcf889b 100644 --- a/src/Compression/TaskToApm.cs +++ b/src/Compression/TaskToApm.cs @@ -22,107 +22,99 @@ #nullable enable using System.Diagnostics; -namespace System.Threading.Tasks -{ - /// - /// Provides support for efficiently using Tasks to implement the APM (Begin/End) pattern. - /// - internal static class TaskToApm - { - /// - /// Marshals the Task as an IAsyncResult, using the supplied callback and state - /// to implement the APM pattern. - /// - /// The Task to be marshaled. - /// The callback to be invoked upon completion. - /// The state to be stored in the IAsyncResult. - /// An IAsyncResult to represent the task's asynchronous operation. - public static IAsyncResult Begin(Task task, AsyncCallback? callback, object? state) => - new TaskAsyncResult(task, state, callback); +namespace System.Threading.Tasks { + /// + /// Provides support for efficiently using Tasks to implement the APM (Begin/End) pattern. + /// + internal static class TaskToApm { + /// + /// Marshals the Task as an IAsyncResult, using the supplied callback and state + /// to implement the APM pattern. + /// + /// The Task to be marshaled. + /// The callback to be invoked upon completion. + /// The state to be stored in the IAsyncResult. + /// An IAsyncResult to represent the task's asynchronous operation. + public static IAsyncResult Begin (Task task, AsyncCallback? callback, object? state) => + new TaskAsyncResult (task, state, callback); - /// Processes an IAsyncResult returned by Begin. - /// The IAsyncResult to unwrap. - public static void End(IAsyncResult asyncResult) - { - if (asyncResult is TaskAsyncResult twar) - { - twar._task.GetAwaiter().GetResult(); - return; - } + /// Processes an IAsyncResult returned by Begin. + /// The IAsyncResult to unwrap. + public static void End (IAsyncResult asyncResult) + { + if (asyncResult is TaskAsyncResult twar) { + twar._task.GetAwaiter ().GetResult (); + return; + } - throw new ArgumentNullException(); - } + throw new ArgumentNullException (); + } - /// Processes an IAsyncResult returned by Begin. - /// The IAsyncResult to unwrap. - public static TResult End(IAsyncResult asyncResult) - { - if (asyncResult is TaskAsyncResult twar && twar._task is Task task) - { - return task.GetAwaiter().GetResult(); - } - throw new ArgumentNullException(); - } + /// Processes an IAsyncResult returned by Begin. + /// The IAsyncResult to unwrap. + public static TResult End (IAsyncResult asyncResult) + { + if (asyncResult is TaskAsyncResult twar && twar._task is Task task) { + return task.GetAwaiter ().GetResult (); + } + throw new ArgumentNullException (); + } - /// Provides a simple IAsyncResult that wraps a Task. - /// - /// We could use the Task as the IAsyncResult if the Task's AsyncState is the same as the object state, - /// but that's very rare, in particular in a situation where someone cares about allocation, and always - /// using TaskAsyncResult simplifies things and enables additional optimizations. - /// - internal sealed class TaskAsyncResult : IAsyncResult - { - /// The wrapped Task. - internal readonly Task _task; - /// Callback to invoke when the wrapped task completes. - private readonly AsyncCallback? _callback; + /// Provides a simple IAsyncResult that wraps a Task. + /// + /// We could use the Task as the IAsyncResult if the Task's AsyncState is the same as the object state, + /// but that's very rare, in particular in a situation where someone cares about allocation, and always + /// using TaskAsyncResult simplifies things and enables additional optimizations. + /// + internal sealed class TaskAsyncResult : IAsyncResult { + /// The wrapped Task. + internal readonly Task _task; + /// Callback to invoke when the wrapped task completes. + private readonly AsyncCallback? _callback; - /// Initializes the IAsyncResult with the Task to wrap and the associated object state. - /// The Task to wrap. - /// The new AsyncState value. - /// Callback to invoke when the wrapped task completes. - internal TaskAsyncResult(Task task, object? state, AsyncCallback? callback) - { - Debug.Assert(task is not null); - _task = task; - AsyncState = state; + /// Initializes the IAsyncResult with the Task to wrap and the associated object state. + /// The Task to wrap. + /// The new AsyncState value. + /// Callback to invoke when the wrapped task completes. + internal TaskAsyncResult (Task task, object? state, AsyncCallback? callback) + { + Debug.Assert (task is not null); + _task = task; + AsyncState = state; - if (task.IsCompleted) - { - // Synchronous completion. Invoke the callback. No need to store it. - CompletedSynchronously = true; - callback?.Invoke(this); - } - else if (callback is not null) - { - // Asynchronous completion, and we have a callback; schedule it. We use OnCompleted rather than ContinueWith in - // order to avoid running synchronously if the task has already completed by the time we get here but still run - // synchronously as part of the task's completion if the task completes after (the more common case). - _callback = callback; - _task.ConfigureAwait(continueOnCapturedContext: false) - .GetAwaiter() - .OnCompleted(InvokeCallback); // allocates a delegate, but avoids a closure - } - } + if (task.IsCompleted) { + // Synchronous completion. Invoke the callback. No need to store it. + CompletedSynchronously = true; + callback?.Invoke (this); + } else if (callback is not null) { + // Asynchronous completion, and we have a callback; schedule it. We use OnCompleted rather than ContinueWith in + // order to avoid running synchronously if the task has already completed by the time we get here but still run + // synchronously as part of the task's completion if the task completes after (the more common case). + _callback = callback; + _task.ConfigureAwait (continueOnCapturedContext: false) + .GetAwaiter () + .OnCompleted (InvokeCallback); // allocates a delegate, but avoids a closure + } + } - /// Invokes the callback. - private void InvokeCallback() - { - Debug.Assert(!CompletedSynchronously); - Debug.Assert(_callback is not null); - _callback.Invoke(this); - } + /// Invokes the callback. + private void InvokeCallback () + { + Debug.Assert (!CompletedSynchronously); + Debug.Assert (_callback is not null); + _callback.Invoke (this); + } - /// Gets a user-defined object that qualifies or contains information about an asynchronous operation. - public object? AsyncState { get; } - /// Gets a value that indicates whether the asynchronous operation completed synchronously. - /// This is set lazily based on whether the has completed by the time this object is created. - public bool CompletedSynchronously { get; } - /// Gets a value that indicates whether the asynchronous operation has completed. - public bool IsCompleted => _task.IsCompleted; - /// Gets a that is used to wait for an asynchronous operation to complete. - public WaitHandle AsyncWaitHandle => ((IAsyncResult)_task).AsyncWaitHandle; - } - } + /// Gets a user-defined object that qualifies or contains information about an asynchronous operation. + public object? AsyncState { get; } + /// Gets a value that indicates whether the asynchronous operation completed synchronously. + /// This is set lazily based on whether the has completed by the time this object is created. + public bool CompletedSynchronously { get; } + /// Gets a value that indicates whether the asynchronous operation has completed. + public bool IsCompleted => _task.IsCompleted; + /// Gets a that is used to wait for an asynchronous operation to complete. + public WaitHandle AsyncWaitHandle => ((IAsyncResult) _task).AsyncWaitHandle; + } + } } #endif diff --git a/src/CoreAnimation/CATextLayer.cs b/src/CoreAnimation/CATextLayer.cs index 135d5879a8cb..40a377a5ef8f 100644 --- a/src/CoreAnimation/CATextLayer.cs +++ b/src/CoreAnimation/CATextLayer.cs @@ -106,7 +106,7 @@ public object? WeakFont { set { #if MONOMAC var ns = value as NSFont; - if (ns is not null){ + if (ns is not null) { _Font = ns.Handle; return; } diff --git a/src/CoreAnimation/CATransform3D.cs b/src/CoreAnimation/CATransform3D.cs index 88845428cbc6..a9608e3f0cfe 100644 --- a/src/CoreAnimation/CATransform3D.cs +++ b/src/CoreAnimation/CATransform3D.cs @@ -267,10 +267,10 @@ public override string ToString () { return String.Format ("[{0} {1} {2} {3}; {4} {5} {6} {7}; {8} {9} {10} {11}; {12} {13} {14} {15}]", #if NET - M11, M12, M13, M14, - M21, M22, M23, M24, - M31, M32, M33, M34, - M41, M42, M43, M44); + M11, M12, M13, M14, + M21, M22, M23, M24, + M31, M32, M33, M34, + M41, M42, M43, M44); #else m11, m12, m13, m14, m21, m22, m23, m24, diff --git a/src/CoreBluetooth/CBPeer.cs b/src/CoreBluetooth/CBPeer.cs index 4d08fc531522..418b3b009123 100644 --- a/src/CoreBluetooth/CBPeer.cs +++ b/src/CoreBluetooth/CBPeer.cs @@ -7,7 +7,7 @@ #nullable enable namespace CoreBluetooth { - public partial class CBPeer { + public partial class CBPeer { #if !NET [Deprecated (PlatformName.iOS, 7, 0)] [Obsoleted (PlatformName.iOS, 9, 0)] diff --git a/src/CoreFoundation/CFMessagePort.cs b/src/CoreFoundation/CFMessagePort.cs index 7c71ba32ec86..741bbbfabf46 100644 --- a/src/CoreFoundation/CFMessagePort.cs +++ b/src/CoreFoundation/CFMessagePort.cs @@ -264,12 +264,12 @@ protected override void Dispose (bool disposing) if (context is not null) { #if NET unsafe { - if (context.Retain is not null) - contextProxy.retain = &RetainProxy; - if (context.Release is not null) - contextProxy.release = &ReleaseProxy; - if (context.CopyDescription is not null) - contextProxy.copyDescription = &CopyDescriptionProxy; + if (context.Retain is not null) + contextProxy.retain = &RetainProxy; + if (context.Release is not null) + contextProxy.release = &ReleaseProxy; + if (context.CopyDescription is not null) + contextProxy.copyDescription = &CopyDescriptionProxy; } #else if (context.Retain is not null) diff --git a/src/CoreFoundation/CFProxySupport.cs b/src/CoreFoundation/CFProxySupport.cs index 24cdf7178f35..3ccd9134be87 100644 --- a/src/CoreFoundation/CFProxySupport.cs +++ b/src/CoreFoundation/CFProxySupport.cs @@ -719,27 +719,27 @@ await Task.Run (() => { #if NET unsafe { - using (var loopSource = new CFRunLoopSource (factory (&ExecutePacCallback, ref clientContext), true)) + using (var loopSource = new CFRunLoopSource (factory (&ExecutePacCallback, ref clientContext), true)) #else using (var loopSource = new CFRunLoopSource (factory (ExecutePacCallback, ref clientContext), true)) #endif - using (var mode = new NSString ("Xamarin.iOS.Proxy")) { - - if (cancellationToken.IsCancellationRequested) - throw new OperationCanceledException ("Operation was cancelled."); - - cancellationToken.Register (() => { - //if user cancels, we invalidte the source, stop the runloop and remove the source - loopSource.Invalidate (); + using (var mode = new NSString ("Xamarin.iOS.Proxy")) { + + if (cancellationToken.IsCancellationRequested) + throw new OperationCanceledException ("Operation was cancelled."); + + cancellationToken.Register (() => { + //if user cancels, we invalidte the source, stop the runloop and remove the source + loopSource.Invalidate (); + runLoop.RemoveSource (loopSource, mode); + runLoop.Stop (); + }); + runLoop.AddSource (loopSource, mode); + // blocks until stop is called, will be done in the cb set previously + runLoop.RunInMode (mode, double.MaxValue, false); + // does not raise an error if source is not longer present, so no need to worry runLoop.RemoveSource (loopSource, mode); - runLoop.Stop (); - }); - runLoop.AddSource (loopSource, mode); - // blocks until stop is called, will be done in the cb set previously - runLoop.RunInMode (mode, double.MaxValue, false); - // does not raise an error if source is not longer present, so no need to worry - runLoop.RemoveSource (loopSource, mode); - } + } #if NET } // matches the unsafe block #endif @@ -783,18 +783,18 @@ await Task.Run (() => { #if NET unsafe { - using (var loopSource = new CFRunLoopSource (factory (&ExecutePacCallback, ref clientContext), true)) + using (var loopSource = new CFRunLoopSource (factory (&ExecutePacCallback, ref clientContext), true)) #else using (var loopSource = new CFRunLoopSource (factory (ExecutePacCallback, ref clientContext), true)) #endif - using (var mode = new NSString ("Xamarin.iOS.Proxy")) { - runLoop.AddSource (loopSource, mode); - runLoop.RunInMode (mode, double.MaxValue, false); - runLoop.RemoveSource (loopSource, mode); - } - pacCbData = Marshal.PtrToStructure (pacDataPtr)!; - // get data from the struct - outError = pacCbData.Error; + using (var mode = new NSString ("Xamarin.iOS.Proxy")) { + runLoop.AddSource (loopSource, mode); + runLoop.RunInMode (mode, double.MaxValue, false); + runLoop.RemoveSource (loopSource, mode); + } + pacCbData = Marshal.PtrToStructure (pacDataPtr)!; + // get data from the struct + outError = pacCbData.Error; #if NET } // unsafe #endif diff --git a/src/CoreGraphics/CGAffineTransform.cs b/src/CoreGraphics/CGAffineTransform.cs index 620b85fdd7d7..fe3f74d41eac 100644 --- a/src/CoreGraphics/CGAffineTransform.cs +++ b/src/CoreGraphics/CGAffineTransform.cs @@ -162,11 +162,11 @@ public static CGAffineTransform Multiply (CGAffineTransform a, CGAffineTransform { #if NET return new CGAffineTransform (a.A * b.A + a.B * b.C, - a.A * b.B + a.B * b.D, - a.C * b.A + a.D * b.C, - a.C * b.B + a.D * b.D, - a.Tx * b.A + a.Ty * b.C + b.Tx, - a.Tx * b.B + a.Ty * b.D + b.Ty); + a.A * b.B + a.B * b.D, + a.C * b.A + a.D * b.C, + a.C * b.B + a.D * b.D, + a.Tx * b.A + a.Ty * b.C + b.Tx, + a.Tx * b.B + a.Ty * b.D + b.Ty); #else #pragma warning disable CS0618 // Type or member is obsolete return new CGAffineTransform (a.xx * b.xx + a.yx * b.xy, @@ -388,11 +388,11 @@ public bool IsIdentity { { #if NET return new CGAffineTransform (a.A * b.A + a.B * b.C, - a.A * b.B + a.B * b.D, - a.C * b.A + a.D * b.C, - a.C * b.B + a.D * b.D, - a.Tx * b.A + a.Ty * b.C + b.Tx, - a.Tx * b.B + a.Ty * b.D + b.Ty); + a.A * b.B + a.B * b.D, + a.C * b.A + a.D * b.C, + a.C * b.B + a.D * b.D, + a.Tx * b.A + a.Ty * b.C + b.Tx, + a.Tx * b.B + a.Ty * b.D + b.Ty); #else return new CGAffineTransform (a.xx * b.xx + a.yx * b.xy, a.xx * b.yx + a.yx * b.yy, @@ -426,7 +426,7 @@ public CGPoint TransformPoint (CGPoint point) { #if NET return new CGPoint (A * point.X + C * point.Y + Tx, - B * point.X + D * point.Y + Ty); + B * point.X + D * point.Y + Ty); #else return new CGPoint (xx * point.X + xy * point.Y + x0, yx * point.X + yy * point.Y + y0); diff --git a/src/CoreGraphics/CGColorSpace.cs b/src/CoreGraphics/CGColorSpace.cs index c0eb87cfa104..54163367aa75 100644 --- a/src/CoreGraphics/CGColorSpace.cs +++ b/src/CoreGraphics/CGColorSpace.cs @@ -512,7 +512,7 @@ public byte [] GetColorTable () /* CGColorSpaceRef __nullable */ IntPtr alternate); #if NET - public static CGColorSpace? CreateIccProfile (nfloat[]? range, CGDataProvider profile, CGColorSpace alternate) + public static CGColorSpace? CreateIccProfile (nfloat []? range, CGDataProvider profile, CGColorSpace alternate) #else public static CGColorSpace? CreateICCProfile (nfloat []? range, CGDataProvider profile, CGColorSpace alternate) #endif diff --git a/src/CoreGraphics/CGDisplay.cs b/src/CoreGraphics/CGDisplay.cs index e526968846e1..d9afcb3d6ae3 100644 --- a/src/CoreGraphics/CGDisplay.cs +++ b/src/CoreGraphics/CGDisplay.cs @@ -6,8 +6,7 @@ using ObjCRuntime; using Foundation; -namespace CoreGraphics -{ +namespace CoreGraphics { #if NET [SupportedOSPlatform ("maccatalyst")] @@ -15,8 +14,7 @@ namespace CoreGraphics #else [MacCatalyst (13,1)] #endif - public enum CGCaptureOptions : uint - { + public enum CGCaptureOptions : uint { None = 0, NoFill = 1 << 0 } @@ -27,19 +25,18 @@ public enum CGCaptureOptions : uint #else [MacCatalyst (13,1)] #endif - public static class CGDisplay - { + public static class CGDisplay { #if !COREBUILD [DllImport (Constants.CoreGraphicsLibrary)] static extern uint CGMainDisplayID (); public static int MainDisplayID { get { - return (int)CGMainDisplayID (); + return (int) CGMainDisplayID (); } } - [DllImport (Constants.CoreGraphicsLibrary, EntryPoint="CGDisplayModeGetTypeID")] + [DllImport (Constants.CoreGraphicsLibrary, EntryPoint = "CGDisplayModeGetTypeID")] public static extern nint GetTypeID (); [DllImport (Constants.CoreGraphicsLibrary)] @@ -47,7 +44,7 @@ public static int MainDisplayID { public static CGRect GetBounds (int display) { - return CGDisplayBounds ((uint)display); + return CGDisplayBounds ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -55,7 +52,7 @@ public static CGRect GetBounds (int display) public static nint GetWidth (int display) { - return (nint)CGDisplayPixelsWide ((uint)display); + return (nint) CGDisplayPixelsWide ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -63,7 +60,7 @@ public static nint GetWidth (int display) public static nint GetHeight (int display) { - return (nint)CGDisplayPixelsHigh ((uint)display); + return (nint) CGDisplayPixelsHigh ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -71,7 +68,7 @@ public static nint GetHeight (int display) public static int SetDisplayTransfer (int display, float redMin, float redMax, float redGamma, float greenMin, float greenMax, float greenGamma, float blueMin, float blueMax, float blueGamma) { - return CGSetDisplayTransferByFormula ((uint)display, redMin, redMax, redGamma, greenMin, greenMax, greenGamma, blueMin, blueMax, blueGamma); + return CGSetDisplayTransferByFormula ((uint) display, redMin, redMax, redGamma, greenMin, greenMax, greenGamma, blueMin, blueMax, blueGamma); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -79,7 +76,7 @@ public static int SetDisplayTransfer (int display, float redMin, float redMax, f public static int GetGammaTableCapacity (int display) { - return (int)CGDisplayGammaTableCapacity ((uint)display); + return (int) CGDisplayGammaTableCapacity ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary, EntryPoint = "CGDisplayRestoreColorSyncSettings")] @@ -98,7 +95,7 @@ public static int GetGammaTableCapacity (int display) public static bool IsCaptured (int display) { - return CGDisplayIsCaptured ((uint)display) != 0; + return CGDisplayIsCaptured ((uint) display) != 0; } [DllImport (Constants.CoreGraphicsLibrary)] @@ -106,7 +103,7 @@ public static bool IsCaptured (int display) public static int Capture (int display) { - return CGDisplayCapture ((uint)display); + return CGDisplayCapture ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -114,7 +111,7 @@ public static int Capture (int display) public static int Capture (int display, CGCaptureOptions options) { - return CGDisplayCaptureWithOptions ((uint)display, options); + return CGDisplayCaptureWithOptions ((uint) display, options); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -122,13 +119,13 @@ public static int Capture (int display, CGCaptureOptions options) public static int Release (int display) { - return CGDisplayRelease ((uint)display); + return CGDisplayRelease ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary, EntryPoint = "CGCaptureAllDisplays")] public static extern int CaptureAllDisplays (); - [DllImport (Constants.CoreGraphicsLibrary, EntryPoint="CGCaptureAllDisplaysWithOptions")] + [DllImport (Constants.CoreGraphicsLibrary, EntryPoint = "CGCaptureAllDisplaysWithOptions")] static extern int CaptureAllDisplays (CGCaptureOptions options); @@ -140,7 +137,7 @@ public static int Release (int display) public static int HideCursor (int display) { - return CGDisplayHideCursor ((uint)display); + return CGDisplayHideCursor ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -148,7 +145,7 @@ public static int HideCursor (int display) public static int ShowCursor (int display) { - return CGDisplayShowCursor ((uint)display); + return CGDisplayShowCursor ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -156,7 +153,7 @@ public static int ShowCursor (int display) public static int MoveCursor (int display, CGPoint point) { - return CGDisplayMoveCursorToPoint ((uint)display, point); + return CGDisplayMoveCursorToPoint ((uint) display, point); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -164,7 +161,7 @@ public static int MoveCursor (int display, CGPoint point) public static int GetOpenGLDisplayMask (int display) { - return (int)CGDisplayIDToOpenGLDisplayMask ((uint)display); + return (int) CGDisplayIDToOpenGLDisplayMask ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -172,7 +169,7 @@ public static int GetOpenGLDisplayMask (int display) public static int GetDisplayID (int displayMask) { - return (int)CGOpenGLDisplayMaskToDisplayID ((uint)displayMask); + return (int) CGOpenGLDisplayMaskToDisplayID ((uint) displayMask); } [DllImport (Constants.CoreGraphicsLibrary)] @@ -180,7 +177,7 @@ public static int GetDisplayID (int displayMask) public static int GetShieldingWindowID (int display) { - return (int)CGShieldingWindowID ((uint)display); + return (int) CGShieldingWindowID ((uint) display); } [DllImport (Constants.CoreGraphicsLibrary)] diff --git a/src/CoreGraphics/CGEvent.cs b/src/CoreGraphics/CGEvent.cs index bdec2da8e97f..e13ead361bdc 100644 --- a/src/CoreGraphics/CGEvent.cs +++ b/src/CoreGraphics/CGEvent.cs @@ -70,10 +70,10 @@ public void Dispose () static IntPtr TapCallback (IntPtr tapProxyEvent, CGEventType eventType, IntPtr eventRef, IntPtr userInfo) { var gch = GCHandle.FromIntPtr (userInfo); - var tapData = (TapData)gch.Target!; + var tapData = (TapData) gch.Target!; return tapData.Callback (tapProxyEvent, eventType, eventRef, tapData.UserInfo); } - + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static unsafe IntPtr CGEventTapCreate (CGEventTapLocation location, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, delegate* unmanaged cback, IntPtr data); #else @@ -126,7 +126,7 @@ static IntPtr TapCallback (IntPtr tapProxyEvent, CGEventType eventType, IntPtr e [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static IntPtr CGEventTapCreateForPSN (IntPtr processSerialNumer, CGEventTapPlacement place, CGEventTapOptions options, CGEventMask mask, CGEventTapCallback cback, IntPtr data); #endif - + #if !XAMCORE_5_0 [Obsolete ("The location parameter is not used. Consider using the overload without the location parameter.", false)] [System.ComponentModel.EditorBrowsable (System.ComponentModel.EditorBrowsableState.Never)] @@ -193,14 +193,14 @@ static IntPtr Create (NSData source) return CGEventCreateFromData (IntPtr.Zero, source.Handle); } - public CGEvent (NSData source) + public CGEvent (NSData source) : base (Create (source), true) { } [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static IntPtr CGEventCreate (IntPtr eventSourceHandle); - + public CGEvent (CGEventSource? eventSource) : base (CGEventCreate (eventSource.GetHandle ()), true) { @@ -220,8 +220,8 @@ internal CGEvent (NativeHandle handle, bool owns) } [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] - extern static IntPtr CGEventCreateMouseEvent(IntPtr source, CGEventType mouseType, CGPoint mouseCursorPosition, CGMouseButton mouseButton); - + extern static IntPtr CGEventCreateMouseEvent (IntPtr source, CGEventType mouseType, CGPoint mouseCursorPosition, CGMouseButton mouseButton); + public CGEvent (CGEventSource? source, CGEventType mouseType, CGPoint mouseCursorPosition, CGMouseButton mouseButton) : base (CGEventCreateMouseEvent (source.GetHandle (), mouseType, mouseCursorPosition, mouseButton), true) { @@ -297,8 +297,8 @@ public CGEvent Copy () return null; return new CGEventSource (esh, true); } - - + + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static CGPoint CGEventGetLocation (IntPtr handle); @@ -325,7 +325,7 @@ public CGPoint UnflippedLocation { // Keep this public, as we want to avoid creating instances of the object // just to peek at the flags - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGEventGetFlags")] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGEventGetFlags")] public extern static CGEventFlags GetFlags (IntPtr eventHandle); [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] @@ -340,16 +340,16 @@ public CGEventFlags Flags { } } - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGEventGetIntegerValueField")] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGEventGetIntegerValueField")] extern static long GetLong (IntPtr eventHandle, CGEventField eventField); - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGEventSetIntegerValueField")] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGEventSetIntegerValueField")] extern static void SetLong (IntPtr eventHandle, CGEventField eventField, long value); - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGEventGetDoubleValueField")] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGEventGetDoubleValueField")] extern static double GetDouble (IntPtr eventHandle, CGEventField eventField); - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGEventSetDoubleValueField")] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGEventSetDoubleValueField")] extern static void SetDouble (IntPtr eventHandle, CGEventField eventField, double value); /// Get the 64-bit integer value of the specified event field. @@ -468,7 +468,7 @@ public long MouseEventSubtype { [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static IntPtr CGEventSetSource (IntPtr handle, IntPtr source); - + public void SetEventSource (CGEventSource eventSource) { if (eventSource is null) @@ -477,11 +477,11 @@ public void SetEventSource (CGEventSource eventSource) } [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] - extern static CGEventType CGEventGetType (IntPtr handle); + extern static CGEventType CGEventGetType (IntPtr handle); [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static void CGEventSetType (IntPtr handle, CGEventType evtType); - + public CGEventType EventType { get { return CGEventGetType (Handle); @@ -497,7 +497,7 @@ public CGEventType EventType { [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static void CGEventSetTimestamp (IntPtr handle, ulong timeStampp); - + #if !NET [Obsolete ("Use 'Timestamp' instead.")] public ulong Timestampe { @@ -547,15 +547,15 @@ public static bool IsTapEnabled (CFMachPort machPort) } [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] - unsafe extern static void CGEventKeyboardGetUnicodeString (IntPtr handle, nuint maxLen, nuint* actualLen, ushort *buffer); + unsafe extern static void CGEventKeyboardGetUnicodeString (IntPtr handle, nuint maxLen, nuint* actualLen, ushort* buffer); public unsafe string GetUnicodeString () { const int bufferLength = 40; - ushort *buffer = stackalloc ushort [bufferLength]; + ushort* buffer = stackalloc ushort [bufferLength]; nuint actual = 0; CGEventKeyboardGetUnicodeString (Handle, bufferLength, &actual, buffer); - return new String ((char *) buffer, 0, (int) actual); + return new String ((char*) buffer, 0, (int) actual); } #if NET @@ -585,10 +585,10 @@ public static void TapPostEven (IntPtr tapProxyEvent, CGEvent evt) { if (evt is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (evt)); - + CGEventTapPostEvent (tapProxyEvent, evt.Handle); } - + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static void CGEventPost (CGEventTapLocation location, IntPtr handle); @@ -596,7 +596,7 @@ public static void Post (CGEvent evt, CGEventTapLocation location) { if (evt is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (evt)); - + CGEventPost (location, evt.Handle); } @@ -609,7 +609,7 @@ public static void PostToPSN (CGEvent evt, IntPtr processSerialNumber) { if (evt is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (evt)); - + CGEventPostToPSN (processSerialNumber, evt.Handle); } @@ -637,11 +637,11 @@ public void PostToPid (int pid) { PostToPid (this, pid); } - + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] unsafe extern static int /* CGError = int32_t */ CGGetEventTapList ( uint /* uint32_t */ maxNumberOfTaps, - CGEventTapInformation *tapList, + CGEventTapInformation* tapList, uint* /* uint32_t* */ eventTapCount); public unsafe CGEventTapInformation []? GetEventTapList () @@ -650,7 +650,7 @@ public void PostToPid (int pid) if (CGGetEventTapList (0, null, &count) != 0) return null; var result = new CGEventTapInformation [count]; - fixed (CGEventTapInformation *p = result){ + fixed (CGEventTapInformation* p = result) { if (CGGetEventTapList (count, p, &count) != 0) return null; } @@ -674,7 +674,7 @@ public void PostToPid (int pid) [SupportedOSPlatform ("macos")] [SupportedOSPlatform ("maccatalyst")] #endif - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGRequestListenEventAccess")] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGRequestListenEventAccess")] static extern byte CGRequestListenEventAccess (); #if NET diff --git a/src/CoreGraphics/CGEventSource.cs b/src/CoreGraphics/CGEventSource.cs index 44e47bbcb81f..e0e6f0e35fcf 100644 --- a/src/CoreGraphics/CGEventSource.cs +++ b/src/CoreGraphics/CGEventSource.cs @@ -50,7 +50,7 @@ public CGEventSource (NativeHandle handle, bool owns) [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static IntPtr CGEventSourceCreate (CGEventSourceStateID stateID); - + public CGEventSource (CGEventSourceStateID stateID) : base (CGEventSourceCreate (stateID), true) { @@ -62,7 +62,7 @@ public CGEventSource (CGEventSourceStateID stateID) [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static void CGEventSourceSetKeyboardType (IntPtr handle, int /* CGEventSourceKeyboardType = uint32_t */ keyboardType); - public int KeyboardType { + public int KeyboardType { get { return CGEventSourceGetKeyboardType (Handle); } @@ -73,7 +73,7 @@ public int KeyboardType { [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static CGEventSourceStateID CGEventSourceGetSourceStateID (IntPtr handle); - + public CGEventSourceStateID StateID { get { return CGEventSourceGetSourceStateID (Handle); @@ -86,7 +86,7 @@ public CGEventSourceStateID StateID { [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static void CGEventSourceSetPixelsPerLine (IntPtr handle, double value); - + public double PixelsPerLine { get { return CGEventSourceGetPixelsPerLine (Handle); @@ -108,13 +108,13 @@ public static bool GetButtonState (CGEventSourceStateID stateID, CGMouseButton b public static bool GetKeyState (CGEventSourceStateID stateID, ushort keycode) => CGEventSourceKeyState (stateID, keycode) != 0; - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGEventSourceFlagsState")] - public extern static CGEventFlags GetFlagsState (CGEventSourceStateID stateID); + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGEventSourceFlagsState")] + public extern static CGEventFlags GetFlagsState (CGEventSourceStateID stateID); - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGEventSourceSecondsSinceLastEventType")] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGEventSourceSecondsSinceLastEventType")] public extern static double GetSecondsSinceLastEventType (CGEventSourceStateID stateID, CGEventType eventType); - [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint="CGEventSourceCounterForEventType")] + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary, EntryPoint = "CGEventSourceCounterForEventType")] public extern static uint /* uint32_t */ GetCounterForEventType (CGEventSourceStateID stateID, CGEventType eventType); [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] @@ -140,7 +140,7 @@ public void SetLocalEventsFilterDuringSupressionState (CGEventFilterMask filter, { CGEventSourceSetLocalEventsFilterDuringSuppressionState (Handle, filter, state); } - + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static CGEventFilterMask CGEventSourceGetLocalEventsFilterDuringSuppressionState (IntPtr handle, CGEventSuppressionState state); @@ -148,7 +148,7 @@ public CGEventFilterMask GetLocalEventsFilterDuringSupressionState (CGEventSuppr { return CGEventSourceGetLocalEventsFilterDuringSuppressionState (Handle, state); } - + [DllImport (Constants.ApplicationServicesCoreGraphicsLibrary)] extern static void CGEventSourceSetLocalEventsSuppressionInterval (IntPtr handle, double seconds); @@ -163,7 +163,7 @@ public double LocalEventsSupressionInterval { CGEventSourceSetLocalEventsSuppressionInterval (Handle, value); } } - + } } diff --git a/src/CoreGraphics/CGEventTypes.cs b/src/CoreGraphics/CGEventTypes.cs index 0dfe9dccc45e..2ccc52411296 100644 --- a/src/CoreGraphics/CGEventTypes.cs +++ b/src/CoreGraphics/CGEventTypes.cs @@ -56,7 +56,7 @@ public enum CGEventTapPlacement : uint { [MacCatalyst (13,1)] #endif public enum CGEventTapOptions : uint { - Default, + Default, ListenOnly, } @@ -94,22 +94,22 @@ public enum CGScrollEventUnit : uint { #endif [Flags] public enum CGEventMask : ulong { - Null = 0x00000001, - LeftMouseDown = 0x00000002, - LeftMouseUp = 0x00000004, - RightMouseDown = 0x00000008, - RightMouseUp = 0x00000010, - MouseMoved = 0x00000020, - LeftMouseDragged = 0x00000040, + Null = 0x00000001, + LeftMouseDown = 0x00000002, + LeftMouseUp = 0x00000004, + RightMouseDown = 0x00000008, + RightMouseUp = 0x00000010, + MouseMoved = 0x00000020, + LeftMouseDragged = 0x00000040, RightMouseDragged = 0x00000080, - KeyDown = 0x00000400, - KeyUp = 0x00000800, - FlagsChanged = 0x00001000, - ScrollWheel = 0x00400000, - TabletPointer = 0x00800000, - TabletProximity = 0x01000000, - OtherMouseDown = 0x02000000, - OtherMouseUp = 0x04000000, + KeyDown = 0x00000400, + KeyUp = 0x00000800, + FlagsChanged = 0x00001000, + ScrollWheel = 0x00400000, + TabletPointer = 0x00800000, + TabletProximity = 0x01000000, + OtherMouseDown = 0x02000000, + OtherMouseUp = 0x04000000, OtherMouseDragged = 0x08000000, } @@ -123,14 +123,14 @@ public enum CGEventMask : ulong { [Flags] public enum CGEventFlags : ulong { NonCoalesced = 0x00000100, - AlphaShift = 0x00010000, - Shift = 0x00020000, - Control = 0x00040000, - Alternate = 0x00080000, - Command = 0x00100000, - NumericPad = 0x00200000, - Help = 0x00400000, - SecondaryFn = 0x00800000, + AlphaShift = 0x00010000, + Shift = 0x00020000, + Control = 0x00040000, + Alternate = 0x00080000, + Command = 0x00100000, + NumericPad = 0x00200000, + Help = 0x00400000, + SecondaryFn = 0x00800000, } // CGEventTypes.h:typedef uint32_t CGEventField; @@ -482,7 +482,7 @@ public enum CGEventSuppressionState : int { RemoteMouseDrag, NumberOfEventSuppressionStates, } - + } #endif // MONOMAC diff --git a/src/CoreGraphics/CGImage.cs b/src/CoreGraphics/CGImage.cs index bb0ce4fde487..9453ae774b20 100644 --- a/src/CoreGraphics/CGImage.cs +++ b/src/CoreGraphics/CGImage.cs @@ -51,12 +51,12 @@ namespace CoreGraphics { #endif [Flags] public enum CGWindowImageOption : uint { - Default = 0, + Default = 0, BoundsIgnoreFraming = (1 << 0), - ShouldBeOpaque = (1 << 1), - OnlyShadows = (1 << 2), - BestResolution = (1 << 3), - NominalResolution = (1 << 4), + ShouldBeOpaque = (1 << 1), + OnlyShadows = (1 << 2), + BestResolution = (1 << 3), + NominalResolution = (1 << 4), } // uint32_t -> CGWindow.h (OSX SDK only) @@ -68,12 +68,12 @@ public enum CGWindowImageOption : uint { #endif [Flags] public enum CGWindowListOption : uint { - All = 0, - OnScreenOnly = (1 << 0), + All = 0, + OnScreenOnly = (1 << 0), OnScreenAboveWindow = (1 << 1), OnScreenBelowWindow = (1 << 2), - IncludingWindow = (1 << 3), - ExcludeDesktopElements = (1 << 4) + IncludingWindow = (1 << 3), + ExcludeDesktopElements = (1 << 4) } #endif @@ -264,8 +264,8 @@ public CGImage (int width, int height, int bitsPerComponent, int bitsPerPixel, i [Deprecated (PlatformName.MacOSX, 14, 0, message: "Use ScreenCaptureKit instead.")] #endif [DllImport (Constants.CoreGraphicsLibrary)] - static extern IntPtr CGWindowListCreateImage(CGRect screenBounds, CGWindowListOption windowOption, uint windowID, CGWindowImageOption imageOption); - + static extern IntPtr CGWindowListCreateImage (CGRect screenBounds, CGWindowListOption windowOption, uint windowID, CGWindowImageOption imageOption); + #if NET [SupportedOSPlatform ("maccatalyst")] [ObsoletedOSPlatform ("maccatalyst18.0", "Use ScreenCaptureKit instead.")] diff --git a/src/CoreGraphics/CGPattern.cs b/src/CoreGraphics/CGPattern.cs index 791131f63a40..07a187fd53f3 100644 --- a/src/CoreGraphics/CGPattern.cs +++ b/src/CoreGraphics/CGPattern.cs @@ -102,7 +102,8 @@ unsafe extern static IntPtr CGPatternCreate (/* void* */ IntPtr info, CGRect bou #if NET static CGPatternCallbacks callbacks; - static CGPattern () { + static CGPattern () + { unsafe { callbacks = new CGPatternCallbacks () { version = 0, diff --git a/src/CoreGraphics/CGVector.cs b/src/CoreGraphics/CGVector.cs index 4972a0fcee7b..45ec779f1ca1 100644 --- a/src/CoreGraphics/CGVector.cs +++ b/src/CoreGraphics/CGVector.cs @@ -93,7 +93,7 @@ public override bool Equals (object? other) #endif [DllImport (Constants.UIKitLibrary)] extern static IntPtr NSStringFromCGVector (CGVector vector); - + #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] @@ -113,7 +113,7 @@ public override bool Equals (object? other) #endif [DllImport (Constants.UIKitLibrary)] extern static CGVector CGVectorFromString (IntPtr str); - + #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] diff --git a/src/CoreImage/Enums.cs b/src/CoreImage/Enums.cs index 60941bb22369..4b5ab1a56943 100644 --- a/src/CoreImage/Enums.cs +++ b/src/CoreImage/Enums.cs @@ -53,7 +53,7 @@ public enum CIFormat { #if MONOMAC RGBA16 = 2, [Obsolete ("This value can not be shared across Mac/iOS binaries, future proof with kRGBAf instead.")] - RGBAf = 3, + RGBAf = 3, // Please, do not add values into MonoMac/iOS without adding an explicit value #endif diff --git a/src/CoreLocation/CLLocationManager.cs b/src/CoreLocation/CLLocationManager.cs index e3e39e3ff36a..930268432daa 100644 --- a/src/CoreLocation/CLLocationManager.cs +++ b/src/CoreLocation/CLLocationManager.cs @@ -45,7 +45,7 @@ public partial class CLLocationManager : NSObject { #if IOS public static bool IsMonitoringAvailable (Type t) { - if (SystemVersion.CheckiOS (7,0)) + if (SystemVersion.CheckiOS (7, 0)) return IsMonitoringAvailable (new Class (t)); return false; } diff --git a/src/CoreMedia/CMSampleBuffer.cs b/src/CoreMedia/CMSampleBuffer.cs index dd2cd47b4d63..c113833aae73 100644 --- a/src/CoreMedia/CMSampleBuffer.cs +++ b/src/CoreMedia/CMSampleBuffer.cs @@ -168,7 +168,7 @@ unsafe static extern OSStatus CMSampleBufferCreateCopyWithNewTiming ( unsafe static extern CMSampleBufferError CMSampleBufferCallForEachSample ( /* CMSampleBufferRef */ IntPtr sbuf, #if NET - delegate* unmanaged callback, + delegate* unmanaged callback, #else CMSampleBufferCallForEachSampleCallback callback, #endif @@ -663,7 +663,7 @@ public CMSampleBufferError SetInvalidateCallback (Action invalid #if NET unsafe { #endif - return CMSampleBufferSetInvalidateCallback (Handle, null, 0); + return CMSampleBufferSetInvalidateCallback (Handle, null, 0); #if NET } #endif @@ -678,7 +678,7 @@ public CMSampleBufferError SetInvalidateCallback (Action invalid invalidate = GCHandle.Alloc (Tuple.Create (invalidateHandler, this)); #if NET unsafe { - return CMSampleBufferSetInvalidateCallback (Handle, &InvalidateHandler, (ulong)(IntPtr)invalidate); + return CMSampleBufferSetInvalidateCallback (Handle, &InvalidateHandler, (ulong) (IntPtr) invalidate); } #else return CMSampleBufferSetInvalidateCallback (Handle, invalidate_handler, (ulong) (IntPtr) invalidate); diff --git a/src/CoreMidi/MidiBluetoothDriver.cs b/src/CoreMidi/MidiBluetoothDriver.cs index f74cc15aa2b7..3bc6de0f656d 100644 --- a/src/CoreMidi/MidiBluetoothDriver.cs +++ b/src/CoreMidi/MidiBluetoothDriver.cs @@ -23,10 +23,10 @@ namespace CoreMidi { #if NET - [SupportedOSPlatform ("ios16.0")] - [SupportedOSPlatform ("maccatalyst16.0")] - [SupportedOSPlatform ("tvos16.0")] - [SupportedOSPlatform ("macos13.0")] + [SupportedOSPlatform ("ios16.0")] + [SupportedOSPlatform ("maccatalyst16.0")] + [SupportedOSPlatform ("tvos16.0")] + [SupportedOSPlatform ("macos13.0")] #else [iOS (16, 0), Mac (13, 0), TV (16, 0), MacCatalyst (16, 0)] #endif // NET diff --git a/src/CoreServices/FSEvents.cs b/src/CoreServices/FSEvents.cs index aed8dc85b289..e0a55724352d 100644 --- a/src/CoreServices/FSEvents.cs +++ b/src/CoreServices/FSEvents.cs @@ -18,12 +18,11 @@ using CoreFoundation; using Foundation; -namespace CoreServices -{ +namespace CoreServices { // FSEvents.h: typedef UInt32 FSEventStreamCreateFlags; [Flags] public enum FSEventStreamCreateFlags : uint { - None = 0x00000000, + None = 0x00000000, /*UseCFTypes = 0x00000001,*/ NoDefer = 0x00000002, WatchRoot = 0x00000004, @@ -66,7 +65,7 @@ public enum FSEventStreamEventFlags : uint { ItemIsFile = 0x00010000, ItemIsDir = 0x00020000, ItemIsSymlink = 0x00040000, - OwnEvent = 0x00080000, + OwnEvent = 0x00080000, ItemIsHardlink = 0x00100000, ItemIsLastHardlink = 0x00200000, #if NET @@ -78,8 +77,7 @@ public enum FSEventStreamEventFlags : uint { #if NET [SupportedOSPlatform ("macos")] #endif - public struct FSEvent - { + public struct FSEvent { public ulong Id { get; internal set; } public string? Path { get; internal set; } public FSEventStreamEventFlags Flags { get; internal set; } @@ -151,8 +149,7 @@ struct FSEventStreamContext { #if NET [SupportedOSPlatform ("macos")] #endif - public sealed class FSEventStreamEventsArgs : EventArgs - { + public sealed class FSEventStreamEventsArgs : EventArgs { public FSEvent [] Events { get; private set; } internal FSEventStreamEventsArgs (FSEvent [] events) @@ -167,8 +164,7 @@ internal FSEventStreamEventsArgs (FSEvent [] events) #if NET [SupportedOSPlatform ("macos")] #endif - public sealed class FSEventStreamCreateOptions - { + public sealed class FSEventStreamCreateOptions { /// /// The allocator to use to allocate memory for the stream. If null, the default /// allocator will be used. @@ -243,8 +239,7 @@ public FSEventStreamCreateOptions (FSEventStreamCreateFlags flags, TimeSpan late #if NET [SupportedOSPlatform ("macos")] #endif - public class FSEventStream : NativeObject - { + public class FSEventStream : NativeObject { [DllImport (Constants.CoreServicesLibrary)] static extern void FSEventStreamRetain (IntPtr handle); @@ -317,7 +312,7 @@ public FSEventStream (FSEventStreamCreateOptions options) var allocator = options.Allocator.GetHandle (); var sinceWhenId = options.SinceWhenId ?? FSEvent.SinceNowId; var latency = options.Latency.TotalSeconds; - var flags = options.Flags |= (FSEventStreamCreateFlags)0x1 /* UseCFTypes */; + var flags = options.Flags |= (FSEventStreamCreateFlags) 0x1 /* UseCFTypes */; IntPtr handle; unsafe { @@ -403,7 +398,7 @@ static void EventsCallback (IntPtr handle, IntPtr userData, nint numEvents, return; } - var events = new FSEvent[numEvents]; + var events = new FSEvent [numEvents]; for (int i = 0; i < events.Length; i++) { string? path = null; @@ -415,7 +410,7 @@ static void EventsCallback (IntPtr handle, IntPtr userData, nint numEvents, if (eventDataType == CFStringTypeID) { path = CFString.FromHandle (eventDataHandle); } else if (eventDataType == CFDictionaryTypeID) { - path = CFString.FromHandle (CFDictionary.GetValue ( + path = CFString.FromHandle (CFDictionary.GetValue ( eventDataHandle, kFSEventStreamEventExtendedDataPathKey.Handle)); @@ -429,12 +424,11 @@ static void EventsCallback (IntPtr handle, IntPtr userData, nint numEvents, } } - events[i] = new FSEvent - { - Id = (ulong)Marshal.ReadInt64 (eventIds, i * 8), + events [i] = new FSEvent { + Id = (ulong) Marshal.ReadInt64 (eventIds, i * 8), Path = path, - Flags = (FSEventStreamEventFlags)(uint)Marshal.ReadInt32 (eventFlags, i * 4), - FileId = (ulong)fileId, + Flags = (FSEventStreamEventFlags) (uint) Marshal.ReadInt32 (eventFlags, i * 4), + FileId = (ulong) fileId, }; } diff --git a/src/CoreServices/LaunchServices.cs b/src/CoreServices/LaunchServices.cs index 8bc434315164..d19a890f7423 100644 --- a/src/CoreServices/LaunchServices.cs +++ b/src/CoreServices/LaunchServices.cs @@ -30,8 +30,7 @@ using Foundation; using ObjCRuntime; -namespace CoreServices -{ +namespace CoreServices { [Flags] public enum LSRoles/*Mask*/ : uint /* always 32-bit uint */ { @@ -49,8 +48,7 @@ public enum LSAcceptanceFlags : uint /* always 32-bit uint */ AllowLoginUI = 2 } - public enum LSResult - { + public enum LSResult { Success = 0, #if NET [SupportedOSPlatform ("macos13.0")] @@ -89,9 +87,8 @@ public enum LSResult #if NET [SupportedOSPlatform ("macos")] #endif - public static class LaunchServices - { -#region Locating an Application + public static class LaunchServices { + #region Locating an Application #if NET [SupportedOSPlatform ("macos")] @@ -221,19 +218,19 @@ public static NSUrl [] GetApplicationUrlsForBundleIdentifier (string bundleIdent ); } -#endregion + #endregion -#region Opening Items + #region Opening Items [DllImport (Constants.CoreServicesLibrary)] - unsafe static extern LSResult LSOpenCFURLRef (IntPtr inUrl, void **outLaunchedUrl); + unsafe static extern LSResult LSOpenCFURLRef (IntPtr inUrl, void** outLaunchedUrl); public unsafe static LSResult Open (NSUrl url) { if (url is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (url)); - return LSOpenCFURLRef (url.Handle, (void **)0); + return LSOpenCFURLRef (url.Handle, (void**) 0); } public unsafe static LSResult Open (NSUrl url, out NSUrl? launchedUrl) @@ -241,15 +238,15 @@ public unsafe static LSResult Open (NSUrl url, out NSUrl? launchedUrl) if (url is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (url)); - void *launchedUrlHandle; + void* launchedUrlHandle; var result = LSOpenCFURLRef (url.Handle, &launchedUrlHandle); launchedUrl = Runtime.GetNSObject (new IntPtr (launchedUrlHandle)); return result; } -#endregion + #endregion -#region Registering an Application + #region Registering an Application [DllImport (Constants.CoreServicesLibrary)] static extern LSResult LSRegisterURL (IntPtr inUrl, byte inUpdate); @@ -259,12 +256,12 @@ public static LSResult Register (NSUrl url, bool update) if (url is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (url)); - return LSRegisterURL (url.Handle, (byte)(update ? 1 : 0)); + return LSRegisterURL (url.Handle, (byte) (update ? 1 : 0)); } -#endregion + #endregion -#region Working with Role Handlers + #region Working with Role Handlers #if NET [SupportedOSPlatform ("macos")] @@ -281,7 +278,7 @@ public static LSResult Register (NSUrl url, bool update) #else [Deprecated (PlatformName.MacOSX, 14, 0)] #endif - public static string?[]? GetAllRoleHandlersForContentType (string contentType, LSRoles roles = LSRoles.All) + public static string? []? GetAllRoleHandlersForContentType (string contentType, LSRoles roles = LSRoles.All) { if (contentType is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (contentType)); @@ -311,7 +308,7 @@ public static string GetDefaultRoleHandlerForContentType (string contentType, LS if (contentType is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (contentType)); - return (string)Runtime.GetNSObject ( + return (string) Runtime.GetNSObject ( LSCopyDefaultRoleHandlerForContentType (new NSString (contentType).Handle, roles) ); } @@ -363,7 +360,7 @@ public static LSResult SetDefaultRoleHandlerForContentType (string contentType, #else [Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'GetApplicationUrlsForUrl' instead.")] #endif - public static string?[]? GetAllHandlersForUrlScheme (string urlScheme) + public static string? []? GetAllHandlersForUrlScheme (string urlScheme) { if (urlScheme is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (urlScheme)); @@ -393,7 +390,7 @@ public static string GetDefaultHandlerForUrlScheme (string urlScheme) if (urlScheme is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (urlScheme)); - return (string)Runtime.GetNSObject ( + return (string) Runtime.GetNSObject ( LSCopyDefaultHandlerForURLScheme (new NSString (urlScheme).Handle) ); } @@ -426,7 +423,7 @@ public static LSResult SetDefaultHandlerForUrlScheme (string urlScheme, string h ); } -#endregion + #endregion } } diff --git a/src/CoreSpotlight/CSSearchableIndex.cs b/src/CoreSpotlight/CSSearchableIndex.cs index 3886817384de..0b0a04696d38 100644 --- a/src/CoreSpotlight/CSSearchableIndex.cs +++ b/src/CoreSpotlight/CSSearchableIndex.cs @@ -21,7 +21,7 @@ public partial class CSSearchableIndex { // Strongly typed version of initWithName:protectionClass: public CSSearchableIndex (string name, CSFileProtection protectionOption = CSFileProtection.None) : this (name, Translate (protectionOption)) - {} + { } static NSString? Translate (CSFileProtection protectionOption) { diff --git a/src/CoreSpotlight/CSSearchableItemAttributeSet.cs b/src/CoreSpotlight/CSSearchableItemAttributeSet.cs index 44fc02577858..5efd455a0e95 100644 --- a/src/CoreSpotlight/CSSearchableItemAttributeSet.cs +++ b/src/CoreSpotlight/CSSearchableItemAttributeSet.cs @@ -28,10 +28,11 @@ public INSSecureCoding? this [CSCustomAttributeKey key] { [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #endif - public bool? IsUserCreated { + public bool? IsUserCreated { get { return _IsUserCreated?.BoolValue; - } set { + } + set { _IsUserCreated = value.HasValue ? new NSNumber (value.Value) : null; } } @@ -45,7 +46,8 @@ public bool? IsUserCreated { public bool? IsUserOwned { get { return _IsUserOwned?.BoolValue; - } set { + } + set { _IsUserOwned = value.HasValue ? new NSNumber (value.Value) : null; } } @@ -56,10 +58,11 @@ public bool? IsUserOwned { [SupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] #endif - public bool? IsUserCurated { + public bool? IsUserCurated { get { return _IsUserCurated?.BoolValue; - } set { + } + set { _IsUserCurated = value.HasValue ? new NSNumber (value.Value) : null; } } diff --git a/src/CoreText/CTFontCollection.cs b/src/CoreText/CTFontCollection.cs index 89154017f8f4..c3e5dfec1c72 100644 --- a/src/CoreText/CTFontCollection.cs +++ b/src/CoreText/CTFontCollection.cs @@ -191,7 +191,7 @@ public CTFontDescriptor [] GetMatchingFontDescriptors (CTFontCollectionOptions? #if NET [DllImport (Constants.CoreTextLibrary)] static unsafe extern IntPtr CTFontCollectionCreateMatchingFontDescriptorsSortedWithCallback ( - IntPtr collection, delegate* unmanaged sortCallback, + IntPtr collection, delegate* unmanaged sortCallback, IntPtr refCon); #else [DllImport (Constants.CoreTextLibrary)] diff --git a/src/CoreText/CTFontManager.cs b/src/CoreText/CTFontManager.cs index e9150b2970d3..7fc1b47f49db 100644 --- a/src/CoreText/CTFontManager.cs +++ b/src/CoreText/CTFontManager.cs @@ -666,7 +666,7 @@ public unsafe static void UnregisterFontDescriptors (CTFontDescriptor [] fontDes [NoTV] [NoMac] #endif - public static CTFontDescriptor[]? GetRegisteredFontDescriptors (CTFontManagerScope scope, bool enabled) + public static CTFontDescriptor []? GetRegisteredFontDescriptors (CTFontManagerScope scope, bool enabled) { var p = CTFontManagerCopyRegisteredFontDescriptors (scope, enabled.AsByte ()); // Copy/Create rule - we must release the CFArrayRef @@ -746,7 +746,7 @@ public unsafe static void UnregisterFontDescriptors (CTFontDescriptor [] fontDes [iOS (13,0)] #endif [BindingImpl (BindingImplOptions.Optimizable)] - public unsafe static void RegisterFonts (string[] assetNames, CFBundle bundle, CTFontManagerScope scope, bool enabled, CTFontRegistrationHandler registrationHandler) + public unsafe static void RegisterFonts (string [] assetNames, CFBundle bundle, CTFontManagerScope scope, bool enabled, CTFontRegistrationHandler registrationHandler) { using (var arr = EnsureNonNullArray (assetNames, nameof (assetNames))) { if (registrationHandler is null) { @@ -774,7 +774,7 @@ public unsafe static void RegisterFonts (string[] assetNames, CFBundle bundle, C [NoMac] [iOS (13,0)] #endif - public delegate void CTFontManagerRequestFontsHandler (CTFontDescriptor[] unresolvedFontDescriptors); + public delegate void CTFontManagerRequestFontsHandler (CTFontDescriptor [] unresolvedFontDescriptors); #if NET [SupportedOSPlatform ("ios13.0")] @@ -817,7 +817,7 @@ static unsafe void TrampolineRequestFonts (IntPtr block, /* CFArray */ IntPtr fo [iOS (13,0)] #endif [BindingImpl (BindingImplOptions.Optimizable)] - public static void RequestFonts (CTFontDescriptor[] fontDescriptors, CTFontManagerRequestFontsHandler completionHandler) + public static void RequestFonts (CTFontDescriptor [] fontDescriptors, CTFontManagerRequestFontsHandler completionHandler) { if (completionHandler is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (completionHandler)); diff --git a/src/CoreVideo/CVBuffer.cs b/src/CoreVideo/CVBuffer.cs index 8eebf4912d78..35284bd03ef8 100644 --- a/src/CoreVideo/CVBuffer.cs +++ b/src/CoreVideo/CVBuffer.cs @@ -148,7 +148,7 @@ unsafe static IntPtr CVBufferCopyAttachment (IntPtr buffer, IntPtr key, out CVAt #if IOS || __MACCATALYST__ || TVOS if (SystemVersion.CheckiOS (15, 0)) #endif - return Runtime.GetINativeObject (CVBufferCopyAttachment (Handle, key.Handle, out attachmentMode), true); + return Runtime.GetINativeObject (CVBufferCopyAttachment (Handle, key.Handle, out attachmentMode), true); return Runtime.GetINativeObject (CVBufferGetAttachment (Handle, key.Handle, out attachmentMode), false); } #else @@ -201,7 +201,7 @@ unsafe static IntPtr CVBufferCopyAttachment (IntPtr buffer, IntPtr key, out CVAt #elif MONOMAC if (SystemVersion.CheckmacOS (12, 0)) #endif - return Runtime.GetINativeObject (CVBufferCopyAttachments (Handle, attachmentMode), true); + return Runtime.GetINativeObject (CVBufferCopyAttachments (Handle, attachmentMode), true); return Runtime.GetNSObject (CVBufferGetAttachments (Handle, attachmentMode), false); } diff --git a/src/CoreVideo/CVDisplayLink.cs b/src/CoreVideo/CVDisplayLink.cs index b8059e928234..a0572e325594 100644 --- a/src/CoreVideo/CVDisplayLink.cs +++ b/src/CoreVideo/CVDisplayLink.cs @@ -47,7 +47,7 @@ namespace CoreVideo { #endif public class CVDisplayLink : NativeObject { GCHandle callbackHandle; - + #if !NET public CVDisplayLink (NativeHandle handle) : base (handle, false, true) @@ -55,7 +55,7 @@ public CVDisplayLink (NativeHandle handle) } #endif - [Preserve (Conditional=true)] + [Preserve (Conditional = true)] internal CVDisplayLink (NativeHandle handle, bool owns) : base (handle, owns) { @@ -140,7 +140,7 @@ internal CVDisplayLink (NativeHandle handle, bool owns) [NoTV] [NoMacCatalyst] #endif - public static CVDisplayLink? CreateFromDisplayIds (uint[] displayIds, out CVReturn error) + public static CVDisplayLink? CreateFromDisplayIds (uint [] displayIds, out CVReturn error) { if (displayIds is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (displayIds)); @@ -168,7 +168,7 @@ internal CVDisplayLink (NativeHandle handle, bool owns) [NoTV] [NoMacCatalyst] #endif - public static CVDisplayLink? CreateFromDisplayIds (uint[] displayIds) + public static CVDisplayLink? CreateFromDisplayIds (uint [] displayIds) => CreateFromDisplayIds (displayIds, out var _); #if NET @@ -230,7 +230,7 @@ internal CVDisplayLink (NativeHandle handle, bool owns) #endif [DllImport (Constants.CoreVideoLibrary)] extern static void CVDisplayLinkRetain (IntPtr handle); - + #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] @@ -239,7 +239,7 @@ internal CVDisplayLink (NativeHandle handle, bool owns) #endif [DllImport (Constants.CoreVideoLibrary)] extern static void CVDisplayLinkRelease (IntPtr handle); - + #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] @@ -265,7 +265,7 @@ protected internal override void Release () protected override void Dispose (bool disposing) { if (callbackHandle.IsAllocated) { - callbackHandle.Free(); + callbackHandle.Free (); } base.Dispose (disposing); @@ -310,7 +310,7 @@ static IntPtr Create () public CVDisplayLink () : base (Create (), true) { - } + } #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] @@ -330,8 +330,8 @@ public CVDisplayLink () public CVReturn SetCurrentDisplay (int displayId) { return CVDisplayLinkSetCurrentCGDisplay (Handle, displayId); - } - + } + #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] @@ -350,7 +350,7 @@ public CVReturn SetCurrentDisplay (int displayId) public CVReturn SetCurrentDisplay (CGLContext cglContext, CGLPixelFormat cglPixelFormat) { return CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext (Handle, cglContext.Handle, cglPixelFormat.Handle); - } + } #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] @@ -371,7 +371,7 @@ public int GetCurrentDisplay () { return CVDisplayLinkGetCurrentCGDisplay (Handle); } - + #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] @@ -390,8 +390,8 @@ public int GetCurrentDisplay () public CVReturn Start () { return CVDisplayLinkStart (Handle); - } - + } + #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] @@ -410,8 +410,8 @@ public CVReturn Start () public CVReturn Stop () { return CVDisplayLinkStop (Handle); - } - + } + #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] @@ -474,7 +474,7 @@ public double ActualOutputVideoRefreshPeriod { return CVDisplayLinkGetActualOutputVideoRefreshPeriod (Handle); } } - + #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] @@ -495,7 +495,7 @@ public bool IsRunning { return CVDisplayLinkIsRunning (Handle) != 0; } } - + #if NET [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] @@ -516,15 +516,15 @@ public CVReturn GetCurrentTime (out CVTimeStamp outTime) CVReturn ret; outTime = default; unsafe { - ret = CVDisplayLinkGetCurrentTime (this.Handle, (CVTimeStamp *) Unsafe.AsPointer (ref outTime)); + ret = CVDisplayLinkGetCurrentTime (this.Handle, (CVTimeStamp*) Unsafe.AsPointer (ref outTime)); } - + return ret; } - - public delegate CVReturn DisplayLinkOutputCallback (CVDisplayLink displayLink, ref CVTimeStamp inNow, ref CVTimeStamp inOutputTime, CVOptionFlags flagsIn, ref CVOptionFlags flagsOut); - delegate CVReturn CVDisplayLinkOutputCallback (IntPtr displayLink, ref CVTimeStamp inNow, ref CVTimeStamp inOutputTime, CVOptionFlags flagsIn, ref CVOptionFlags flagsOut, IntPtr displayLinkContext); - + + public delegate CVReturn DisplayLinkOutputCallback (CVDisplayLink displayLink, ref CVTimeStamp inNow, ref CVTimeStamp inOutputTime, CVOptionFlags flagsIn, ref CVOptionFlags flagsOut); + delegate CVReturn CVDisplayLinkOutputCallback (IntPtr displayLink, ref CVTimeStamp inNow, ref CVTimeStamp inOutputTime, CVOptionFlags flagsIn, ref CVOptionFlags flagsOut, IntPtr displayLinkContext); + #if NET [UnmanagedCallersOnly] static unsafe CVReturn OutputCallback (IntPtr displayLink, CVTimeStamp* inNow, CVTimeStamp* inOutputTime, CVOptionFlags flagsIn, CVOptionFlags* flagsOut, IntPtr displayLinkContext) @@ -538,7 +538,7 @@ static CVReturn OutputCallback (IntPtr displayLink, ref CVTimeStamp inNow, ref C { GCHandle callbackHandle = GCHandle.FromIntPtr (displayLinkContext); DisplayLinkOutputCallback func = (DisplayLinkOutputCallback) callbackHandle.Target!; - CVDisplayLink delegateDisplayLink = new CVDisplayLink(displayLink, false); + CVDisplayLink delegateDisplayLink = new CVDisplayLink (displayLink, false); #if NET return func (delegateDisplayLink, ref System.Runtime.CompilerServices.Unsafe.AsRef (inNow), @@ -553,7 +553,7 @@ ref System.Runtime.CompilerServices.Unsafe.AsRef (inOutputTime), [ObsoletedOSPlatform ("macos15.0", "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [SupportedOSPlatform ("macos")] [DllImport (Constants.CoreVideoLibrary)] - extern static unsafe CVReturn CVDisplayLinkSetOutputCallback (IntPtr displayLink, delegate* unmanaged function, IntPtr userInfo); + extern static unsafe CVReturn CVDisplayLinkSetOutputCallback (IntPtr displayLink, delegate* unmanaged function, IntPtr userInfo); #else [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use 'NSView.GetDisplayLink', 'NSWindow.GetDisplayLink' or 'NSScreen.GetDisplayLink' instead.")] [DllImport (Constants.CoreVideoLibrary)] @@ -578,7 +578,7 @@ public CVReturn SetOutputCallback (DisplayLinkOutputCallback callback) CVReturn ret = CVDisplayLinkSetOutputCallback (this.Handle, static_OutputCallback, GCHandle.ToIntPtr (callbackHandle)); return ret; #endif - + } #if NET @@ -641,7 +641,7 @@ public static nuint GetTypeId () public bool TryTranslateTime (CVTimeStamp inTime, ref CVTimeStamp outTime) { unsafe { - return CVDisplayLinkTranslateTime (this.Handle, inTime, (CVTimeStamp *) Unsafe.AsPointer (ref outTime)) == 0; + return CVDisplayLinkTranslateTime (this.Handle, inTime, (CVTimeStamp*) Unsafe.AsPointer (ref outTime)) == 0; } } } diff --git a/src/CoreVideo/CVImageBuffer.cs b/src/CoreVideo/CVImageBuffer.cs index 063924e77237..1506ee1b39b8 100644 --- a/src/CoreVideo/CVImageBuffer.cs +++ b/src/CoreVideo/CVImageBuffer.cs @@ -95,7 +95,7 @@ public bool IsFlipped { #if MONOMAC [DllImport (Constants.CoreVideoLibrary)] extern static /* CGColorSpaceRef */ IntPtr CVImageBufferGetColorSpace (/* CVImageBufferRef */ IntPtr imageBuffer); - + #if NET [UnsupportedOSPlatform ("maccatalyst")] [UnsupportedOSPlatform ("tvos")] diff --git a/src/CoreVideo/CVPixelFormatDescription.cs b/src/CoreVideo/CVPixelFormatDescription.cs index 2011de0dd91c..3c5b07b6a863 100644 --- a/src/CoreVideo/CVPixelFormatDescription.cs +++ b/src/CoreVideo/CVPixelFormatDescription.cs @@ -329,7 +329,7 @@ public CVFillExtendedPixelsCallBackDataStruct? FillExtendedPixelsCallbackStruct unsafe { if (bytes.Length < sizeof (CVFillExtendedPixelsCallBackDataStruct)) throw new InvalidOperationException ($"The size of the callback data structure is smaller than expected (got {bytes.Length} bytes, expected at least {sizeof (CVFillExtendedPixelsCallBackDataStruct)} bytes)"); - fixed (byte *ptr = bytes) + fixed (byte* ptr = bytes) return Marshal.PtrToStructure ((IntPtr) ptr); } } diff --git a/src/Darwin/KernelNotification.cs b/src/Darwin/KernelNotification.cs index 74234fedb2c9..96ebcc87bc17 100644 --- a/src/Darwin/KernelNotification.cs +++ b/src/Darwin/KernelNotification.cs @@ -57,24 +57,24 @@ public struct KernelEvent { [Flags] public enum EventFlags : ushort { - Add = 0x0001, - Delete = 0x0002, - Enable = 0x0004, - Disable = 0x0008, - OneShot = 0x0010, - Clear = 0x0020, - Receipt = 0x0040, - Dispatch = 0x0080, - - Flag0 = 0x1000, - Flag1 = 0x2000, - SystemFlags = unchecked (0xf000), - + Add = 0x0001, + Delete = 0x0002, + Enable = 0x0004, + Disable = 0x0008, + OneShot = 0x0010, + Clear = 0x0020, + Receipt = 0x0040, + Dispatch = 0x0080, + + Flag0 = 0x1000, + Flag1 = 0x2000, + SystemFlags = unchecked(0xf000), + // Return values. - EOF = 0x8000, - Error = 0x4000, + EOF = 0x8000, + Error = 0x4000, } - + public enum EventFilter : short { Read = -1, Write = -2, @@ -88,60 +88,60 @@ public enum EventFilter : short { User = -10, VM = -11 } - + [Flags] public enum FilterFlags : uint { - ReadPoll = EventFlags.Flag0, - ReadOutOfBand = EventFlags.Flag1, - ReadLowWaterMark = 0x00000001, + ReadPoll = EventFlags.Flag0, + ReadOutOfBand = EventFlags.Flag1, + ReadLowWaterMark = 0x00000001, WriteLowWaterMark = ReadLowWaterMark, - NoteTrigger = 0x01000000, - NoteFFNop = 0x00000000, - NoteFFAnd = 0x40000000, - NoteFFOr = 0x80000000, - NoteFFCopy = 0xc0000000, - NoteFFCtrlMask = 0xc0000000, - NoteFFlagsMask = 0x00ffffff, - - VNodeDelete = 0x00000001, - VNodeWrite = 0x00000002, - VNodeExtend = 0x00000004, - VNodeAttrib = 0x00000008, - VNodeLink = 0x00000010, - VNodeRename = 0x00000020, - VNodeRevoke = 0x00000040, - VNodeNone = 0x00000080, - - ProcExit = 0x80000000, - ProcFork = 0x40000000, - ProcExec = 0x20000000, - ProcReap = 0x10000000, - ProcSignal = 0x08000000, - ProcExitStatus = 0x04000000, - ProcResourceEnd = 0x02000000, + NoteTrigger = 0x01000000, + NoteFFNop = 0x00000000, + NoteFFAnd = 0x40000000, + NoteFFOr = 0x80000000, + NoteFFCopy = 0xc0000000, + NoteFFCtrlMask = 0xc0000000, + NoteFFlagsMask = 0x00ffffff, + + VNodeDelete = 0x00000001, + VNodeWrite = 0x00000002, + VNodeExtend = 0x00000004, + VNodeAttrib = 0x00000008, + VNodeLink = 0x00000010, + VNodeRename = 0x00000020, + VNodeRevoke = 0x00000040, + VNodeNone = 0x00000080, + + ProcExit = 0x80000000, + ProcFork = 0x40000000, + ProcExec = 0x20000000, + ProcReap = 0x10000000, + ProcSignal = 0x08000000, + ProcExitStatus = 0x04000000, + ProcResourceEnd = 0x02000000, // iOS only - ProcAppactive = 0x00800000, + ProcAppactive = 0x00800000, ProcAppBackground = 0x00400000, - ProcAppNonUI = 0x00200000, - ProcAppInactive = 0x00100000, - ProcAppAllStates = 0x00f00000, + ProcAppNonUI = 0x00200000, + ProcAppInactive = 0x00100000, + ProcAppAllStates = 0x00f00000, // Masks - ProcPDataMask = 0x000fffff, - ProcControlMask = 0xfff00000, + ProcPDataMask = 0x000fffff, + ProcControlMask = 0xfff00000, - VMPressure = 0x80000000, + VMPressure = 0x80000000, VMPressureTerminate = 0x40000000, VMPressureSuddenTerminate = 0x20000000, - VMError = 0x10000000, + VMError = 0x10000000, - TimerSeconds = 0x00000001, - TimerMicroSeconds = 0x00000002, - TimerNanoSeconds = 0x00000004, - TimerAbsolute = 0x00000008, + TimerSeconds = 0x00000001, + TimerMicroSeconds = 0x00000002, + TimerNanoSeconds = 0x00000004, + TimerAbsolute = 0x00000008, } public class KernelQueue : IDisposable, INativeObject { @@ -167,19 +167,19 @@ public void Dispose () { Dispose (false); } - + protected virtual void Dispose (bool disposing) { - if (handle != -1){ + if (handle != -1) { DispatchSource.VnodeMonitor.close (handle); handle = -1; } } [DllImport (Constants.SystemLibrary)] - unsafe extern static int /* int */ kevent (int kq, KernelEvent *changeList, int /* int */ nChanges, KernelEvent *eventList, int /* int */ nEvents, TimeSpec* timeout); + unsafe extern static int /* int */ kevent (int kq, KernelEvent* changeList, int /* int */ nChanges, KernelEvent* eventList, int /* int */ nEvents, TimeSpec* timeout); - public int KEvent (KernelEvent[] changeList, KernelEvent[] eventList, TimeSpan? timeout = null) + public int KEvent (KernelEvent [] changeList, KernelEvent [] eventList, TimeSpan? timeout = null) { if (changeList is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (changeList)); @@ -196,7 +196,7 @@ public int KEvent (KernelEvent[] changeList, KernelEvent[] eventList, TimeSpan? return KEvent (changeList, changeList.Length, eventList, eventList.Length, ToTimespec (timeout)); } - public unsafe int KEvent (KernelEvent[] changeList, int nChanges, KernelEvent[] eventList, int nEvents, TimeSpec? timeout = null) + public unsafe int KEvent (KernelEvent [] changeList, int nChanges, KernelEvent [] eventList, int nEvents, TimeSpec? timeout = null) { if (changeList is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (changeList)); @@ -217,15 +217,15 @@ public unsafe int KEvent (KernelEvent[] changeList, int nChanges, KernelEvent[] throw new ArgumentOutOfRangeException ("nEvents is larger than the number of elements in eventList", nameof (nEvents)); unsafe { - fixed (KernelEvent *cp = changeList) - fixed (KernelEvent *ep = eventList) { - if (timeout is null) { - return kevent (handle, cp, nChanges, ep, nEvents, null); - } else { - TimeSpec ts = timeout.Value; - return kevent (handle, cp, nChanges, ep, nEvents, &ts); - } + fixed (KernelEvent* cp = changeList) + fixed (KernelEvent* ep = eventList) { + if (timeout is null) { + return kevent (handle, cp, nChanges, ep, nEvents, null); + } else { + TimeSpec ts = timeout.Value; + return kevent (handle, cp, nChanges, ep, nEvents, &ts); } + } } } @@ -240,7 +240,7 @@ public unsafe int KEvent (KernelEvent[] changeList, int nChanges, KernelEvent[] return rv; } -// Don't worry about nullability for !NET + // Don't worry about nullability for !NET #nullable disable #if !NET [Obsolete ("Use any of the overloads that return an int to get how many events were returned from kevent.")] @@ -295,10 +295,10 @@ public bool KEvent (KernelEvent [] changeList, KernelEvent [] eventList) #endif { unsafe { - fixed (KernelEvent *cp = changeList) - fixed (KernelEvent *ep = eventList) + fixed (KernelEvent* cp = changeList) + fixed (KernelEvent* ep = eventList) #if NET - return kevent (handle, cp, changeList?.Length ?? 0, ep, eventList?.Length ?? 0, null); + return kevent (handle, cp, changeList?.Length ?? 0, ep, eventList?.Length ?? 0, null); #else return kevent (handle, cp, changeList?.Length ?? 0, ep, eventList?.Length ?? 0, null) != -1; #endif diff --git a/src/Darwin/SystemLog.cs b/src/Darwin/SystemLog.cs index 02dcc77443e1..b470534c75d7 100644 --- a/src/Darwin/SystemLog.cs +++ b/src/Darwin/SystemLog.cs @@ -43,7 +43,7 @@ namespace Darwin { public class SystemLog : DisposableObject { static SystemLog? _default; - + public static SystemLog Default { get { if (_default is null) @@ -51,7 +51,7 @@ public static SystemLog Default { return _default!; } } - + [Flags] public enum Option { Stderr, @@ -65,10 +65,10 @@ protected override void Dispose (bool disposing) asl_close (Handle); base.Dispose (disposing); } - + [DllImport (Constants.SystemLibrary)] extern static void asl_close (IntPtr handle); - + [DllImport (Constants.SystemLibrary)] extern static IntPtr asl_open (IntPtr ident, IntPtr facility, Option /* uint32_t */ options); @@ -89,7 +89,7 @@ static IntPtr asl_open (string ident, string facility, Option options) : base (handle, owns) { } - + public SystemLog (string ident, string facility, Option options = 0) : base ( asl_open ( @@ -110,7 +110,7 @@ static IntPtr asl_open_from_file (int /* int */ fd, string ident, string facilit using var facilityStr = new TransientString (facility); return asl_open_from_file (fd, identStr, facilityStr); } - + public SystemLog (int fileDescriptor, string ident, string facility) : base ( asl_open_from_file ( @@ -127,7 +127,7 @@ public SystemLog (int fileDescriptor, string ident, string facility) [DllImport (Constants.SystemLibrary)] extern static IntPtr asl_remove_log_file (IntPtr handle, int /* int */ fd); - + public void AddLogFile (int descriptor) { asl_add_log_file (Handle, descriptor); @@ -159,24 +159,24 @@ public int Log (string text) { if (text is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (text)); - + return asl_log (Handle, IntPtr.Zero, text); } - + [DllImport (Constants.SystemLibrary)] extern static int asl_send (IntPtr handle, IntPtr msgHandle); - + public int Log (Message msg) { if (msg is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (msg)); - + return asl_send (Handle, msg.Handle); } [DllImport (Constants.SystemLibrary)] extern static int asl_set_filter (IntPtr handle, int /* int */ f); - + public int SetFilter (int level) { return asl_set_filter (Handle, level); @@ -187,17 +187,17 @@ public int SetFilter (int level) [DllImport (Constants.SystemLibrary)] extern static IntPtr aslresponse_next (IntPtr handle); - + [DllImport (Constants.SystemLibrary)] extern static void aslresponse_free (IntPtr handle); - + public IEnumerable Search (Message msg) { if (msg is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (msg)); var search = asl_search (Handle, msg.Handle); IntPtr mh; - + while ((mh = aslresponse_next (search)) != IntPtr.Zero) yield return new Message (mh, true); @@ -218,7 +218,7 @@ public enum Op { Suffix = 0x40, Substring = 0x60, Numeric = 0x80, - Regex = 0x100, + Regex = 0x100, Equal = 1, Greater = 2, GreaterEqual = 3, @@ -233,7 +233,7 @@ internal Message (NativeHandle handle, bool owns) : base (handle, owns) { } - + public Message (Kind kind) : base (asl_new (kind), true) { @@ -254,7 +254,7 @@ protected override void Dispose (bool disposing) [DllImport (Constants.SystemLibrary)] extern static IntPtr asl_get (IntPtr handle, IntPtr key); - + [DllImport (Constants.SystemLibrary)] extern static int asl_set (IntPtr handle, IntPtr key, IntPtr value); @@ -276,7 +276,7 @@ public string this [string key] { [DllImport (Constants.SystemLibrary)] extern static int asl_unset (IntPtr handle, IntPtr key); - + public void Remove (string key) { if (key is null) @@ -284,7 +284,7 @@ public void Remove (string key) using var keyStr = new TransientString (key); asl_unset (Handle, keyStr); } - + #if NET [DllImport (Constants.SystemLibrary)] extern static IntPtr asl_key (IntPtr handle, int /* uint32_t */ key); @@ -292,8 +292,8 @@ public void Remove (string key) [DllImport (Constants.SystemLibrary)] extern static string asl_key (IntPtr handle, int /* uint32_t */ key); #endif - - public string this [int key]{ + + public string this [int key] { get { #if NET return Marshal.PtrToStringAuto (asl_key (Handle, key))!; @@ -312,37 +312,37 @@ public string Host { get { return this ["Host"]; } set { this ["Host"] = value; } } - + public string Sender { get { return this ["Sender"]; } set { this ["Sender"] = value; } } - + public string Facility { get { return this ["Facility"]; } set { this ["Facility"] = value; } } - + public string PID { get { return this ["PID"]; } set { this ["PID"] = value; } } - + public string UID { get { return this ["UID"]; } set { this ["UID"] = value; } } - + public string GID { get { return this ["GID"]; } set { this ["GID"] = value; } } - + public string Level { get { return this ["Level"]; } set { this ["Level"] = value; } } - + public string Msg { get { return this ["Message"]; } set { this ["Message"] = value; } @@ -350,7 +350,7 @@ public string Msg { [DllImport (Constants.SystemLibrary)] extern static int asl_set_query (IntPtr handle, IntPtr key, IntPtr value, int /* uint32_t */ op); - + public bool SetQuery (string key, Op op, string value) { using var keyStr = new TransientString (key); diff --git a/src/FileProvider/Structs.cs b/src/FileProvider/Structs.cs index 8fd2a4fa59f2..4a4440fe3f72 100644 --- a/src/FileProvider/Structs.cs +++ b/src/FileProvider/Structs.cs @@ -23,8 +23,7 @@ namespace FileProvider { [NoMacCatalyst] #endif [StructLayout (LayoutKind.Sequential)] - public struct NSFileProviderTypeAndCreator - { + public struct NSFileProviderTypeAndCreator { public uint Type; public uint Creator; @@ -32,7 +31,7 @@ public struct NSFileProviderTypeAndCreator public string GetTypeAsFourCC () => Runtime.ToFourCCString (Type); - public string GetCreatorAsFourCC() + public string GetCreatorAsFourCC () => Runtime.ToFourCCString (Creator); #endif } diff --git a/src/Foundation/Enum.cs b/src/Foundation/Enum.cs index 82ae2939c54f..90f7c2fa9c80 100644 --- a/src/Foundation/Enum.cs +++ b/src/Foundation/Enum.cs @@ -82,7 +82,9 @@ public enum NSUrlCredentialPersistence : ulong { public enum NSBundleExecutableArchitecture : long { #else /// The bundle's architecture. - [NoiOS][NoTV][NoMacCatalyst] + [NoiOS] + [NoTV] + [NoMacCatalyst] public enum NSBundleExecutableArchitecture { #endif I386 = 0x00000007, diff --git a/src/Foundation/NSAppleEventDescriptor.cs b/src/Foundation/NSAppleEventDescriptor.cs index a4d5a8777b23..1943142b53b7 100644 --- a/src/Foundation/NSAppleEventDescriptor.cs +++ b/src/Foundation/NSAppleEventDescriptor.cs @@ -9,15 +9,13 @@ using AppKit; -namespace Foundation -{ +namespace Foundation { public enum NSAppleEventDescriptorType { Record, List, } - public partial class NSAppleEventDescriptor - { + public partial class NSAppleEventDescriptor { public NSAppleEventDescriptor (NSAppleEventDescriptorType type) { switch (type) { diff --git a/src/Foundation/NSArray.cs b/src/Foundation/NSArray.cs index 47e644bbb58f..b276ebb5e63d 100644 --- a/src/Foundation/NSArray.cs +++ b/src/Foundation/NSArray.cs @@ -242,7 +242,7 @@ static internal NSArray FromIntPtrs (IntPtr [] items) throw new ArgumentNullException (nameof (items)); unsafe { - fixed (IntPtr *valuesPtr = items) + fixed (IntPtr* valuesPtr = items) return Runtime.GetNSObject (NSArray.FromObjects ((IntPtr) valuesPtr, items.Length))!; } } diff --git a/src/Foundation/NSAttributedString.cs b/src/Foundation/NSAttributedString.cs index 5c8de4d962f3..63c936ae8ad0 100644 --- a/src/Foundation/NSAttributedString.cs +++ b/src/Foundation/NSAttributedString.cs @@ -181,22 +181,22 @@ public partial class NSAttributedString { [EditorBrowsable (EditorBrowsableState.Never)] [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSUrl url, NSAttributedStringDocumentAttributes documentAttributes, out NSError error) - : this (url, documentAttributes, out var _, out error) {} + : this (url, documentAttributes, out var _, out error) { } [EditorBrowsable (EditorBrowsableState.Never)] [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSData data, NSAttributedStringDocumentAttributes documentAttributes, out NSError error) - : this (data, documentAttributes, out var _, out error) {} + : this (data, documentAttributes, out var _, out error) { } [EditorBrowsable (EditorBrowsableState.Never)] [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSUrl url, out NSError error) - : this (url, new NSDictionary (), out var _, out error) {} + : this (url, new NSDictionary (), out var _, out error) { } [EditorBrowsable (EditorBrowsableState.Never)] [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] public NSAttributedString (NSData data, out NSError error) - : this (data, new NSDictionary (), out var _, out error) {} + : this (data, new NSDictionary (), out var _, out error) { } #else [EditorBrowsable (EditorBrowsableState.Never)] [Obsolete ("Use the 'Create' method instead, because there's no way to return an error from a constructor.")] @@ -241,7 +241,7 @@ public string? Value { public IntPtr LowLevelGetAttributes (nint location, out NSRange effectiveRange) { unsafe { - fixed (NSRange *effectiveRangePtr = &effectiveRange) { + fixed (NSRange* effectiveRangePtr = &effectiveRange) { return LowLevelGetAttributes (location, (IntPtr) effectiveRangePtr); } } diff --git a/src/Foundation/NSAttributedString.mac.cs b/src/Foundation/NSAttributedString.mac.cs index 078f350d5ca5..74abe3b76959 100644 --- a/src/Foundation/NSAttributedString.mac.cs +++ b/src/Foundation/NSAttributedString.mac.cs @@ -16,10 +16,8 @@ using WebKit; //using CoreText; -namespace Foundation -{ - public partial class NSAttributedString - { +namespace Foundation { + public partial class NSAttributedString { public NSAttributedString (string str, NSFont? font = null, NSColor? foregroundColor = null, @@ -97,11 +95,11 @@ internal NSAttributedString (NSData data, NSAttributedStringDataType type, out N Handle = InitWithRtfd (data, out resultDocumentAttributes); break; default: - throw new ArgumentException("Error creating NSAttributedString."); + throw new ArgumentException ("Error creating NSAttributedString."); } if (Handle == IntPtr.Zero) - throw new ArgumentException("Error creating NSAttributedString."); + throw new ArgumentException ("Error creating NSAttributedString."); } public static NSAttributedString CreateWithRTF (NSData rtfData, out NSDictionary resultDocumentAttributes) diff --git a/src/Foundation/NSConnection.cs b/src/Foundation/NSConnection.cs index 6b2c233a2606..e8cc3a5cc2fc 100644 --- a/src/Foundation/NSConnection.cs +++ b/src/Foundation/NSConnection.cs @@ -36,10 +36,8 @@ // Disable until we get around to enable + fix any issues. #nullable disable -namespace Foundation -{ - public partial class NSConnection - { +namespace Foundation { + public partial class NSConnection { public TProxy GetRootProxy () where TProxy : NSObject { @@ -65,7 +63,7 @@ static TProxy GetRootProxy (IntPtr handle) where TProxy : NSObject var result = Runtime.TryGetNSObject (handle) as TProxy; if (result is null) - result = (TProxy)Activator.CreateInstance (typeof (TProxy), new object[] { handle }); + result = (TProxy) Activator.CreateInstance (typeof (TProxy), new object [] { handle }); return result; } diff --git a/src/Foundation/NSHost.cs b/src/Foundation/NSHost.cs index b410c6000d9b..879e2fbf496b 100644 --- a/src/Foundation/NSHost.cs +++ b/src/Foundation/NSHost.cs @@ -17,10 +17,8 @@ using System.Collections; using System.Collections.Generic; -namespace Foundation -{ - public partial class NSHost : IEquatable, IEnumerable - { +namespace Foundation { + public partial class NSHost : IEquatable, IEnumerable { static NSHost? CheckNull (NSHost? host) { if (host is null) @@ -143,7 +141,7 @@ public IPAddress [] Addresses { public override int GetHashCode () { - return (int)_Hash; + return (int) _Hash; } public override bool Equals (object? obj) diff --git a/src/Foundation/NSIndexSet.cs b/src/Foundation/NSIndexSet.cs index b50df0a7b8e5..27f82b5484d5 100644 --- a/src/Foundation/NSIndexSet.cs +++ b/src/Foundation/NSIndexSet.cs @@ -33,7 +33,7 @@ using ObjCRuntime; namespace Foundation { - + public partial class NSIndexSet : IEnumerable, IEnumerable { IEnumerator IEnumerable.GetEnumerator () @@ -59,8 +59,8 @@ public IEnumerator GetEnumerator () i = this.IndexGreaterThan (i); } } - - public nuint[] ToArray () + + public nuint [] ToArray () { nuint [] indexes = new nuint [Count]; @@ -75,54 +75,54 @@ public nuint[] ToArray () return indexes; } - public static NSIndexSet FromArray (nuint[] items) + public static NSIndexSet FromArray (nuint [] items) { if (items is null) return new NSIndexSet (); - - var indexSet = new NSMutableIndexSet(); - foreach (var index in items) - indexSet.Add (index); + + var indexSet = new NSMutableIndexSet (); + foreach (var index in items) + indexSet.Add (index); return indexSet; } - public static NSIndexSet FromArray (uint[] items) + public static NSIndexSet FromArray (uint [] items) { if (items is null) return new NSIndexSet (); - var indexSet = new NSMutableIndexSet(); + var indexSet = new NSMutableIndexSet (); foreach (var index in items) - indexSet.Add ((nuint)index); + indexSet.Add ((nuint) index); return indexSet; } - public static NSIndexSet FromArray (int[] items) + public static NSIndexSet FromArray (int [] items) { if (items is null) return new NSIndexSet (); - - var indexSet = new NSMutableIndexSet(); - foreach (var index in items){ + + var indexSet = new NSMutableIndexSet (); + foreach (var index in items) { if (index < 0) throw new ArgumentException ("One of the items values is negative"); - indexSet.Add ((nuint)(uint) index); + indexSet.Add ((nuint) (uint) index); } return indexSet; } - public NSIndexSet (uint value) : this ((nuint)value) + public NSIndexSet (uint value) : this ((nuint) value) { } - public NSIndexSet (nint value) : this ((nuint)value) + public NSIndexSet (nint value) : this ((nuint) value) { if (value < 0) throw new ArgumentException ("value must be positive"); // init done by the base ctor } - public NSIndexSet (int value) : this ((nuint)(uint)value) + public NSIndexSet (int value) : this ((nuint) (uint) value) { if (value < 0) throw new ArgumentException ("value must be positive"); diff --git a/src/Foundation/NSNumber.mac.cs b/src/Foundation/NSNumber.mac.cs index 1e5f80b1e701..4f22543ec637 100644 --- a/src/Foundation/NSNumber.mac.cs +++ b/src/Foundation/NSNumber.mac.cs @@ -14,35 +14,33 @@ // Disable until we get around to enable + fix any issues. #nullable disable -namespace Foundation -{ - public partial class NSNumber - { +namespace Foundation { + public partial class NSNumber { #if !COREBUILD public static NSNumber FromObject (object value) { if (value is float) { - return FromFloat ((float)value); + return FromFloat ((float) value); } else if (value is double) { - return FromDouble ((double)value); + return FromDouble ((double) value); } else if (value is sbyte) { - return FromSByte ((sbyte)value); + return FromSByte ((sbyte) value); } else if (value is byte) { - return FromByte ((byte)value); + return FromByte ((byte) value); } else if (value is short) { - return FromInt16 ((short)value); + return FromInt16 ((short) value); } else if (value is ushort) { - return FromUInt16 ((ushort)value); + return FromUInt16 ((ushort) value); } else if (value is int) { - return FromInt32 ((int)value); + return FromInt32 ((int) value); } else if (value is uint) { - return FromUInt32 ((uint)value); + return FromUInt32 ((uint) value); } else if (value is long) { - return FromInt64 ((long)value); + return FromInt64 ((long) value); } else if (value is ulong) { - return FromUInt64 ((ulong)value); + return FromUInt64 ((ulong) value); } else if (value is bool) { - return FromBoolean ((bool)value); + return FromBoolean ((bool) value); } else if (value is nint) { return FromNInt ((nint) value); } else if (value is nuint) { diff --git a/src/Foundation/NSObject.mac.cs b/src/Foundation/NSObject.mac.cs index 0f92d00a4f34..0b1fb0266514 100644 --- a/src/Foundation/NSObject.mac.cs +++ b/src/Foundation/NSObject.mac.cs @@ -100,7 +100,7 @@ public partial class NSObject { static IntPtr nl = Dlfcn.dlopen (Constants.NaturalLanguageLibrary, 1); static IntPtr vs = Dlfcn.dlopen (Constants.VideoSubscriberAccountLibrary, 1); static IntPtr un = Dlfcn.dlopen (Constants.UserNotificationsLibrary, 1); - static IntPtr il = Dlfcn.dlopen (Constants.iTunesLibraryLibrary, 1); + static IntPtr il = Dlfcn.dlopen (Constants.iTunesLibraryLibrary, 1); static IntPtr exl = Dlfcn.dlopen (Constants.ExtensionKitLibrary, 1); static IntPtr sw = Dlfcn.dlopen (Constants.SharedWithYouLibrary, 1); static IntPtr swc = Dlfcn.dlopen (Constants.SharedWithYouCoreLibrary, 1); diff --git a/src/Foundation/NSObject2.cs b/src/Foundation/NSObject2.cs index 83e42eb6d954..2d7cb199aa8d 100644 --- a/src/Foundation/NSObject2.cs +++ b/src/Foundation/NSObject2.cs @@ -77,7 +77,7 @@ public class NSObjectFlag { internal interface INSObjectFactory { // The method will be implemented via custom linker step if the managed static registrar is used // for NSObject subclasses which have an (NativeHandle) or (IntPtr) constructor. - [MethodImpl(MethodImplOptions.NoInlining)] + [MethodImpl (MethodImplOptions.NoInlining)] virtual static NSObject _Xamarin_ConstructNSObject (NativeHandle handle) => null; } #endif @@ -256,7 +256,7 @@ public void Dispose () // This method doesn't necessarily work with NativeAOT, but this is covered by the exception, because the managed static registrar is required for NativeAOT. // // IL2072: 'type' argument does not satisfy 'DynamicallyAccessedMemberTypes.PublicConstructors', 'DynamicallyAccessedMemberTypes.NonPublicConstructors' in call to 'System.Runtime.CompilerServices.RuntimeHelpers.GetUninitializedObject(Type)'. The return value of method 'ObjCRuntime.Runtime.GetGCHandleTarget(IntPtr)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to. - [UnconditionalSuppressMessage("", "IL2072", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] + [UnconditionalSuppressMessage ("", "IL2072", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] #endif internal static IntPtr CreateNSObject (IntPtr type_gchandle, IntPtr handle, Flags flags) { @@ -738,7 +738,7 @@ public void BeginInvokeOnMainThread (Action action) var d = new NSAsyncActionDispatcher (action); #if NET Messaging.void_objc_msgSend_NativeHandle_NativeHandle_bool (d.Handle, Selector.GetHandle (Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone), - NSDispatcher.Selector.Handle, d.Handle, 0); + NSDispatcher.Selector.Handle, d.Handle, 0); #else #if MONOMAC Messaging.void_objc_msgSend_IntPtr_IntPtr_bool (d.Handle, Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDoneHandle, @@ -755,7 +755,7 @@ internal void BeginInvokeOnMainThread (System.Threading.SendOrPostCallback cb, o var d = new NSAsyncSynchronizationContextDispatcher (cb, state); #if NET Messaging.void_objc_msgSend_NativeHandle_NativeHandle_bool (d.Handle, Selector.GetHandle (Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone), - Selector.GetHandle (NSDispatcher.SelectorName), d.Handle, 0); + Selector.GetHandle (NSDispatcher.SelectorName), d.Handle, 0); #else #if MONOMAC Messaging.void_objc_msgSend_IntPtr_IntPtr_bool (d.Handle, Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDoneHandle, @@ -771,8 +771,8 @@ public void InvokeOnMainThread (Action action) { using (var d = new NSActionDispatcher (action)) { #if NET - Messaging.void_objc_msgSend_NativeHandle_NativeHandle_bool (d.Handle, Selector.GetHandle (Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone), - Selector.GetHandle (NSDispatcher.SelectorName), d.Handle, 1); + Messaging.void_objc_msgSend_NativeHandle_NativeHandle_bool (d.Handle, Selector.GetHandle (Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone), + Selector.GetHandle (NSDispatcher.SelectorName), d.Handle, 1); #else #if MONOMAC Messaging.void_objc_msgSend_IntPtr_IntPtr_bool (d.Handle, Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDoneHandle, @@ -790,7 +790,7 @@ internal void InvokeOnMainThread (System.Threading.SendOrPostCallback cb, object using (var d = new NSSynchronizationContextDispatcher (cb, state)) { #if NET Messaging.void_objc_msgSend_NativeHandle_NativeHandle_bool (d.Handle, Selector.GetHandle (Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDone), - Selector.GetHandle (NSDispatcher.SelectorName), d.Handle, 1); + Selector.GetHandle (NSDispatcher.SelectorName), d.Handle, 1); #else #if MONOMAC Messaging.void_objc_msgSend_IntPtr_IntPtr_bool (d.Handle, Selector.PerformSelectorOnMainThreadWithObjectWaitUntilDoneHandle, diff --git a/src/Foundation/NSPropertyListSerialization.cs b/src/Foundation/NSPropertyListSerialization.cs index 6b56f3612348..aeb80700fdc3 100644 --- a/src/Foundation/NSPropertyListSerialization.cs +++ b/src/Foundation/NSPropertyListSerialization.cs @@ -30,10 +30,8 @@ using System; -namespace Foundation -{ - public partial class NSPropertyListSerialization - { +namespace Foundation { + public partial class NSPropertyListSerialization { public static NSData DataWithPropertyList (NSObject plist, NSPropertyListFormat format, out NSError error) { return DataWithPropertyList (plist, format, NSPropertyListWriteOptions.Immutable, out error); diff --git a/src/Foundation/NSScriptCommandArgumentDescription.cs b/src/Foundation/NSScriptCommandArgumentDescription.cs index e60a43b7231d..4524945bae73 100644 --- a/src/Foundation/NSScriptCommandArgumentDescription.cs +++ b/src/Foundation/NSScriptCommandArgumentDescription.cs @@ -30,16 +30,16 @@ public static NSString OptionalKey { public partial class NSScriptCommandArgumentDescription { public string Name { get; set; } - public bool IsOptional { + public bool IsOptional { get { return Optional is not null && Optional == "Yes"; } - set { + set { Optional = (value) ? "Yes" : "No"; } } - public NSScriptCommandArgumentDescription (string name, string eventCode, string type, bool isOptional=false) + public NSScriptCommandArgumentDescription (string name, string eventCode, string type, bool isOptional = false) { if (String.IsNullOrEmpty (name)) throw new ArgumentException ("name cannot be null or empty."); @@ -58,7 +58,7 @@ public NSScriptCommandArgumentDescription (string name, string eventCode, string } } - + #endif } diff --git a/src/Foundation/NSScriptCommandDescription.cs b/src/Foundation/NSScriptCommandDescription.cs index 04aaf384c62b..afa41557f905 100644 --- a/src/Foundation/NSScriptCommandDescription.cs +++ b/src/Foundation/NSScriptCommandDescription.cs @@ -14,11 +14,11 @@ namespace Foundation { // The kyes are not found in any of the public headers from apple. That is the reason // to use this technique. static class NSScriptCommonKeys { - private static NSString appEventCode = new NSString ("AppleEventCode"); + private static NSString appEventCode = new NSString ("AppleEventCode"); public static NSString AppleEventCodeKey { get { return appEventCode; } } - + private static NSString typeKey = new NSString ("Type"); public static NSString TypeKey { get { return typeKey; } @@ -36,7 +36,7 @@ static int ToIntValue (string fourCC) int ret = 0; for (int i = 0; i < 4; i++) { ret <<= 8; - ret |= fourCC[i]; + ret |= fourCC [i]; } return ret; } @@ -63,7 +63,7 @@ public static NSScriptCommandDescription Create (string suiteName, string comman throw new ArgumentException ("eventClass must be a four characters string."); if (commandDeclaration.ResultAppleEventCode is not null && commandDeclaration.ResultAppleEventCode.Length != 4) throw new ArgumentException ("resultAppleEvent must be a four characters string."); - + using (var nsSuitName = new NSString (suiteName)) using (var nsCommandName = new NSString (commandName)) { try { @@ -96,8 +96,8 @@ public string GetTypeForArgument (string name) { if (name is null) throw new ArgumentNullException ("name"); - - using (var nsName = new NSString(name)) + + using (var nsName = new NSString (name)) using (var nsType = GetNSTypeForArgument (nsName)) { return nsType?.ToString (); } @@ -112,8 +112,8 @@ public string GetAppleEventCodeForArgument (string name) return Runtime.ToFourCCString (FCCAppleEventCodeForArgument (nsName)); } } - - public bool IsOptionalArgument (string name) + + public bool IsOptionalArgument (string name) { using (var nsName = new NSString (name)) { return NSIsOptionalArgument (nsName); diff --git a/src/Foundation/NSScriptCommandDescriptionDictionary.cs b/src/Foundation/NSScriptCommandDescriptionDictionary.cs index 4f140e4d110c..55c42fd4abfc 100644 --- a/src/Foundation/NSScriptCommandDescriptionDictionary.cs +++ b/src/Foundation/NSScriptCommandDescriptionDictionary.cs @@ -9,28 +9,28 @@ namespace Foundation { public static class NSScriptCommandDescriptionDictionaryKeys { private static NSString cmdClass = new NSString ("CommandClass"); - public static NSString CommandClassKey { + public static NSString CommandClassKey { get { return cmdClass; } } - - public static NSString AppleEventCodeKey { + + public static NSString AppleEventCodeKey { get { return NSScriptCommonKeys.AppleEventCodeKey; } } - + private static NSString codeClass = new NSString ("AppleEventClassCode"); - public static NSString AppleEventClassCodeKey { + public static NSString AppleEventClassCodeKey { get { return codeClass; } } - + public static NSString TypeKey { get { return NSScriptCommonKeys.TypeKey; } } - + private static NSString resultAppEventCode = new NSString ("ResultAppleEventCode"); - public static NSString ResultAppleEventCodeKey { + public static NSString ResultAppleEventCodeKey { get { return resultAppEventCode; } } - + private static NSString args = new NSString ("Arguments"); public static NSString ArgumentsKey { get { return args; } @@ -44,7 +44,7 @@ public void Add (NSScriptCommandArgumentDescription arg) if (arg is null) throw new ArgumentNullException ("arg"); if (Arguments is null) - Arguments = new NSMutableDictionary (); + Arguments = new NSMutableDictionary (); using (var nsName = new NSString (arg.Name)) { Arguments.Add (nsName, arg.Dictionary); } diff --git a/src/Foundation/NSSecureCoding.cs b/src/Foundation/NSSecureCoding.cs index 30c523180085..4d616daff386 100644 --- a/src/Foundation/NSSecureCoding.cs +++ b/src/Foundation/NSSecureCoding.cs @@ -28,8 +28,7 @@ public static bool SupportsSecureCoding (Type type) #if MONOMAC try { return SupportsSecureCoding (new Class (type)); - } - catch (ArgumentException) { + } catch (ArgumentException) { // unlike XI the current registration will throw for protocols // until that's fixed we'll only report correctly properly bound protocol types // the workaround is important since this method is used to validate our bindings diff --git a/src/Foundation/NSString.cs b/src/Foundation/NSString.cs index adde5d390fbf..115081a7e8ae 100644 --- a/src/Foundation/NSString.cs +++ b/src/Foundation/NSString.cs @@ -44,11 +44,11 @@ namespace Foundation { #if COREBUILD [Protocol] - public interface INSCopying {} + public interface INSCopying { } [Protocol] - public interface INSCoding {} + public interface INSCoding { } [Protocol] - public interface INSSecureCoding {} + public interface INSSecureCoding { } #endif public partial class NSString : NSObject diff --git a/src/Foundation/NSThread.mac.cs b/src/Foundation/NSThread.mac.cs index 5bf36a09f0d1..f8b681ccf731 100644 --- a/src/Foundation/NSThread.mac.cs +++ b/src/Foundation/NSThread.mac.cs @@ -10,19 +10,16 @@ using System; -namespace Foundation -{ - public partial class NSThread - { - class ActionThread : NSThread - { +namespace Foundation { + public partial class NSThread { + class ActionThread : NSThread { Action action; - + public ActionThread (Action action) { this.action = action; } - + public override void Main () { action (); diff --git a/src/Foundation/NSUrlDownload.cs b/src/Foundation/NSUrlDownload.cs index 2161b97aa83f..e71e7ebdfcd7 100644 --- a/src/Foundation/NSUrlDownload.cs +++ b/src/Foundation/NSUrlDownload.cs @@ -2,7 +2,7 @@ namespace Foundation { public partial class NSUrlDownload { - + public override string ToString () { return GetType ().ToString (); diff --git a/src/Foundation/NSUrlSessionHandler.cs b/src/Foundation/NSUrlSessionHandler.cs index 571e69c12de9..126bc3b249d4 100644 --- a/src/Foundation/NSUrlSessionHandler.cs +++ b/src/Foundation/NSUrlSessionHandler.cs @@ -603,7 +603,7 @@ public int MaxAutomaticRedirections { set { // I believe it's possible to implement support for MaxAutomaticRedirections (it just has to be done) if (value != int.MaxValue) - ObjCRuntime.ThrowHelper.ThrowArgumentOutOfRangeException (nameof (value), value, "It's not possible to lower the max number of automatic redirections.");; + ObjCRuntime.ThrowHelper.ThrowArgumentOutOfRangeException (nameof (value), value, "It's not possible to lower the max number of automatic redirections."); ; } } @@ -657,7 +657,7 @@ public IWebProxy? Proxy { set { if (value is not null) throw new PlatformNotSupportedException (); - } + } } // There doesn't seem to be a trivial way to specify the protocols to accept (or not) @@ -696,8 +696,7 @@ internal bool TryInvokeServerCertificateCustomValidationCallback (HttpRequestMes return true; } - sealed class ServerCertificateCustomValidationCallbackHelper - { + sealed class ServerCertificateCustomValidationCallbackHelper { public Func Callback { get; private set; } public ServerCertificateCustomValidationCallbackHelper (Func callback) @@ -707,7 +706,7 @@ public ServerCertificateCustomValidationCallbackHelper (Func 0 ? certificates [0] : null; using X509Chain chain = CreateChain (certificates); SslPolicyErrors sslPolicyErrors = EvaluateSslPolicyErrors (certificate, chain, secTrust); @@ -715,7 +714,7 @@ public bool Invoke (HttpRequestMessage request, SecTrust secTrust) return Callback (request, certificate, chain, sslPolicyErrors); } - X509Certificate2[] ConvertCertificates (SecTrust secTrust) + X509Certificate2 [] ConvertCertificates (SecTrust secTrust) { var certificates = new X509Certificate2 [secTrust.Count]; @@ -748,7 +747,7 @@ static bool IsSecTrustGetCertificateChainSupported { } } - X509Chain CreateChain (X509Certificate2[] certificates) + X509Chain CreateChain (X509Certificate2 [] certificates) { // inspired by https://github.com/dotnet/runtime/blob/99d21b9276ebe8f7bea7fb3ba74dca9fca625fe2/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfo.cs#L691-L696 var chain = new X509Chain (); @@ -761,7 +760,7 @@ X509Chain CreateChain (X509Certificate2[] certificates) SslPolicyErrors EvaluateSslPolicyErrors (X509Certificate2? certificate, X509Chain chain, SecTrust secTrust) { var sslPolicyErrors = SslPolicyErrors.None; - + try { if (certificate is null) { sslPolicyErrors |= SslPolicyErrors.RemoteCertificateNotAvailable; @@ -802,7 +801,7 @@ public bool UseProxy { get => true; set { if (!value) - ObjCRuntime.ThrowHelper.ThrowArgumentOutOfRangeException (nameof (value), value, "It's not possible to disable the use of system proxies.");; + ObjCRuntime.ThrowHelper.ThrowArgumentOutOfRangeException (nameof (value), value, "It's not possible to disable the use of system proxies."); ; } } #endif // NET diff --git a/src/GameKit/GKCompat.cs b/src/GameKit/GKCompat.cs index 0f2cadd8d4be..1a70c5f50231 100644 --- a/src/GameKit/GKCompat.cs +++ b/src/GameKit/GKCompat.cs @@ -48,8 +48,7 @@ public static void DidSaveData (GKGameSession session, GKCloudPlayer player, Fou [Unavailable (PlatformName.MacOSX)] [Unavailable (PlatformName.TvOS)] #endif - public interface IGKPeerPickerControllerDelegate : INativeObject, IDisposable - { + public interface IGKPeerPickerControllerDelegate : INativeObject, IDisposable { } [EditorBrowsable (EditorBrowsableState.Never)] @@ -207,7 +206,7 @@ public virtual NSObject? WeakDelegate { protected override void Dispose (bool disposing) { - throw new PlatformNotSupportedException (Constants.TypeUnavailable); + throw new PlatformNotSupportedException (Constants.TypeUnavailable); } } /* class GKPeerPickerController */ #endif // __IOS__ || __MACCATALYST__ diff --git a/src/ImageIO/CGImageAnimation.cs b/src/ImageIO/CGImageAnimation.cs index 954888f9622c..df3743762c81 100644 --- a/src/ImageIO/CGImageAnimation.cs +++ b/src/ImageIO/CGImageAnimation.cs @@ -19,20 +19,20 @@ namespace ImageIO { #if NET - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("ios")] + [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("tvos")] #endif public static class CGImageAnimation { public delegate void CGImageSourceAnimationHandler (nint index, CGImage image, out bool stop); #if NET - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("ios13.0")] - [SupportedOSPlatform ("tvos13.0")] - [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("ios13.0")] + [SupportedOSPlatform ("tvos13.0")] + [SupportedOSPlatform ("maccatalyst")] #else [Introduced (PlatformName.iOS, 13, 0, PlatformArchitecture.All)] [Introduced (PlatformName.TvOS, 13, 0, PlatformArchitecture.All)] @@ -41,10 +41,10 @@ public static class CGImageAnimation { unsafe static extern /* OSStatus */ CGImageAnimationStatus CGAnimateImageAtURLWithBlock ( /* CFURLRef */ IntPtr url, /* CFDictionaryRef _iio_Nullable */ IntPtr options, /* CGImageSourceAnimationHandler */ BlockLiteral* block); #if NET - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("ios13.0")] - [SupportedOSPlatform ("tvos13.0")] - [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("ios13.0")] + [SupportedOSPlatform ("tvos13.0")] + [SupportedOSPlatform ("maccatalyst")] #else [Introduced (PlatformName.iOS, 13, 0, PlatformArchitecture.All)] [Introduced (PlatformName.TvOS, 13, 0, PlatformArchitecture.All)] @@ -53,10 +53,10 @@ public static class CGImageAnimation { unsafe static extern /* OSStatus */ CGImageAnimationStatus CGAnimateImageDataWithBlock ( /* CFDataRef _Nonnull */ IntPtr data, /* CFDictionaryRef _Nullable */ IntPtr options, /* CGImageSourceAnimationHandler _Nonnull */ BlockLiteral* block); #if NET - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("ios13.0")] - [SupportedOSPlatform ("tvos13.0")] - [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("ios13.0")] + [SupportedOSPlatform ("tvos13.0")] + [SupportedOSPlatform ("maccatalyst")] #else [Introduced (PlatformName.iOS, 13, 0, PlatformArchitecture.All)] [Introduced (PlatformName.TvOS, 13, 0, PlatformArchitecture.All)] @@ -82,10 +82,10 @@ public static CGImageAnimationStatus AnimateImage (NSUrl url, CGImageAnimationOp } #if NET - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("ios13.0")] - [SupportedOSPlatform ("tvos13.0")] - [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("ios13.0")] + [SupportedOSPlatform ("tvos13.0")] + [SupportedOSPlatform ("maccatalyst")] #else [Introduced (PlatformName.iOS, 13, 0, PlatformArchitecture.All)] [Introduced (PlatformName.TvOS, 13, 0, PlatformArchitecture.All)] diff --git a/src/Intents/INBillTypeResolutionResult.cs b/src/Intents/INBillTypeResolutionResult.cs index ea6e7a3a7e48..9d33beb35a89 100644 --- a/src/Intents/INBillTypeResolutionResult.cs +++ b/src/Intents/INBillTypeResolutionResult.cs @@ -20,7 +20,7 @@ public static INBillTypeResolutionResult GetSuccess (INBillType resolvedValue) #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedBillType (resolvedValue); + return SuccessWithResolvedBillType (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INBillTypeResolutionResult GetConfirmationRequired (INBillType val #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithBillTypeToConfirm (valueToConfirm); + return ConfirmationRequiredWithBillTypeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INCallRecordTypeResolutionResult.cs b/src/Intents/INCallRecordTypeResolutionResult.cs index 9246df1f7567..a61cc33455e5 100644 --- a/src/Intents/INCallRecordTypeResolutionResult.cs +++ b/src/Intents/INCallRecordTypeResolutionResult.cs @@ -22,7 +22,7 @@ public static INCallRecordTypeResolutionResult GetSuccess (INCallRecordType reso #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return SuccessWithResolvedCallRecordType (resolvedValue); + return SuccessWithResolvedCallRecordType (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -34,7 +34,7 @@ public static INCallRecordTypeResolutionResult GetConfirmationRequired (INCallRe #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return ConfirmationRequiredWithCallRecordTypeToConfirm (valueToConfirm); + return ConfirmationRequiredWithCallRecordTypeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INCarSignalOptionsResolutionResult.cs b/src/Intents/INCarSignalOptionsResolutionResult.cs index bcdc2196ffc8..aa412bd8bdc4 100644 --- a/src/Intents/INCarSignalOptionsResolutionResult.cs +++ b/src/Intents/INCarSignalOptionsResolutionResult.cs @@ -20,7 +20,7 @@ public static INCarSignalOptionsResolutionResult GetSuccess (INCarSignalOptions #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedCarSignalOptions (resolvedValue); + return SuccessWithResolvedCarSignalOptions (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INCarSignalOptionsResolutionResult GetConfirmationRequired (INCarS #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithCarSignalOptionsToConfirm (valueToConfirm); + return ConfirmationRequiredWithCarSignalOptionsToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INMessageAttributeOptionsResolutionResult.cs b/src/Intents/INMessageAttributeOptionsResolutionResult.cs index ff6439b10fbc..68223a697189 100644 --- a/src/Intents/INMessageAttributeOptionsResolutionResult.cs +++ b/src/Intents/INMessageAttributeOptionsResolutionResult.cs @@ -23,7 +23,7 @@ public static INMessageAttributeOptionsResolutionResult GetSuccess (INMessageAtt #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return SuccessWithResolvedMessageAttributeOptions (resolvedValue); + return SuccessWithResolvedMessageAttributeOptions (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -35,7 +35,7 @@ public static INMessageAttributeOptionsResolutionResult GetConfirmationRequired #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return ConfirmationRequiredWithMessageAttributeOptionsToConfirm (valueToConfirm); + return ConfirmationRequiredWithMessageAttributeOptionsToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INMessageAttributeResolutionResult.cs b/src/Intents/INMessageAttributeResolutionResult.cs index 5e8a2b8d8658..3c64ca4e8d65 100644 --- a/src/Intents/INMessageAttributeResolutionResult.cs +++ b/src/Intents/INMessageAttributeResolutionResult.cs @@ -23,7 +23,7 @@ public static INMessageAttributeResolutionResult GetSuccess (INMessageAttribute #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return SuccessWithResolvedMessageAttribute (resolvedValue); + return SuccessWithResolvedMessageAttribute (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -35,7 +35,7 @@ public static INMessageAttributeResolutionResult GetConfirmationRequired (INMess #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return ConfirmationRequiredWithMessageAttributeToConfirm (valueToConfirm); + return ConfirmationRequiredWithMessageAttributeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INPaymentStatusResolutionResult.cs b/src/Intents/INPaymentStatusResolutionResult.cs index 05098efd515c..7c37db737020 100644 --- a/src/Intents/INPaymentStatusResolutionResult.cs +++ b/src/Intents/INPaymentStatusResolutionResult.cs @@ -20,7 +20,7 @@ public static INPaymentStatusResolutionResult GetSuccess (INPaymentStatus resolv #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedPaymentStatus (resolvedValue); + return SuccessWithResolvedPaymentStatus (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INPaymentStatusResolutionResult GetConfirmationRequired (INPayment #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithPaymentStatusToConfirm (valueToConfirm); + return ConfirmationRequiredWithPaymentStatusToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INSetClimateSettingsInCarIntent.cs b/src/Intents/INSetClimateSettingsInCarIntent.cs index dc2f218e2f01..69b72f2f8d6f 100644 --- a/src/Intents/INSetClimateSettingsInCarIntent.cs +++ b/src/Intents/INSetClimateSettingsInCarIntent.cs @@ -18,7 +18,7 @@ public partial class INSetClimateSettingsInCarIntent { [Deprecated (PlatformName.iOS, 12, 0, message: "Use the overload that takes 'INSpeakableString carName'.")] #endif public INSetClimateSettingsInCarIntent (bool? enableFan, bool? enableAirConditioner, bool? enableClimateControl, bool? enableAutoMode, INCarAirCirculationMode airCirculationMode, NSNumber fanSpeedIndex, NSNumber fanSpeedPercentage, INRelativeSetting relativeFanSpeedSetting, NSMeasurement temperature, INRelativeSetting relativeTemperatureSetting, INCarSeat climateZone) : - this (enableFan.HasValue ? new NSNumber (enableFan.Value) : null, enableAirConditioner.HasValue ? new NSNumber (enableAirConditioner.Value) : null, + this (enableFan.HasValue ? new NSNumber (enableFan.Value) : null, enableAirConditioner.HasValue ? new NSNumber (enableAirConditioner.Value) : null, enableClimateControl.HasValue ? new NSNumber (enableClimateControl.Value) : null, enableAutoMode.HasValue ? new NSNumber (enableAutoMode.Value) : null, airCirculationMode, fanSpeedIndex, fanSpeedPercentage, relativeFanSpeedSetting, temperature, relativeTemperatureSetting, climateZone) { diff --git a/src/Intents/INSpeakableString.cs b/src/Intents/INSpeakableString.cs index 7b6ed0e23a73..8ad1f2dab945 100644 --- a/src/Intents/INSpeakableString.cs +++ b/src/Intents/INSpeakableString.cs @@ -21,7 +21,7 @@ public INSpeakableString (string identifier, string spokenPhrase, string pronunc #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - InitializeHandle (InitWithVocabularyIdentifier (identifier, spokenPhrase, pronunciationHint)); + InitializeHandle (InitWithVocabularyIdentifier (identifier, spokenPhrase, pronunciationHint)); #if !TVOS else InitializeHandle (InitWithIdentifier (identifier, spokenPhrase, pronunciationHint)); diff --git a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs index 46020fca83a0..7992a54356d8 100644 --- a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs +++ b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs @@ -20,7 +20,7 @@ public static INWorkoutGoalUnitTypeResolutionResult GetSuccess (INWorkoutGoalUni #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedWorkoutGoalUnitType (resolvedValue); + return SuccessWithResolvedWorkoutGoalUnitType (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INWorkoutGoalUnitTypeResolutionResult GetConfirmationRequired (INW #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm (valueToConfirm); + return ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INWorkoutLocationTypeResolutionResult.cs b/src/Intents/INWorkoutLocationTypeResolutionResult.cs index 0afa363d03e1..1fc4bcef3ba3 100644 --- a/src/Intents/INWorkoutLocationTypeResolutionResult.cs +++ b/src/Intents/INWorkoutLocationTypeResolutionResult.cs @@ -20,7 +20,7 @@ public static INWorkoutLocationTypeResolutionResult GetSuccess (INWorkoutLocatio #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedWorkoutLocationType (resolvedValue); + return SuccessWithResolvedWorkoutLocationType (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INWorkoutLocationTypeResolutionResult GetConfirmationRequired (INW #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithWorkoutLocationTypeToConfirm (valueToConfirm); + return ConfirmationRequiredWithWorkoutLocationTypeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/MapKit/MapKit.cs b/src/MapKit/MapKit.cs index a5ae570ccccf..a0f966bf0919 100644 --- a/src/MapKit/MapKit.cs +++ b/src/MapKit/MapKit.cs @@ -466,7 +466,7 @@ public static class MKGeometry { } #if COREBUILD - public partial class MKMapLaunchOptions :NSObject { + public partial class MKMapLaunchOptions : NSObject { } #endif } diff --git a/src/MediaExtension/MEByteSource.cs b/src/MediaExtension/MEByteSource.cs index 7db378b6fbc1..3a5f1ef2968e 100644 --- a/src/MediaExtension/MEByteSource.cs +++ b/src/MediaExtension/MEByteSource.cs @@ -12,7 +12,7 @@ public partial class MEByteSource { /// The byte array to write the data into. /// The delegate which is called when the read operation has completed. /// This overload will try to fill the byte array with data. - public void ReadData (long offset, byte[] data, MEByteSourceReadBytesCallback completionHandler) + public void ReadData (long offset, byte [] data, MEByteSourceReadBytesCallback completionHandler) { ReadData ((nuint) data.Length, offset, data, completionHandler); } @@ -22,7 +22,7 @@ public void ReadData (long offset, byte[] data, MEByteSourceReadBytesCallback co /// The offset (relative to the start of the ifle) where to start reading. /// The byte array to write the data into. /// The delegate which is called when the read operation has completed. - public void ReadData (nuint length, long offset, byte[] data, MEByteSourceReadBytesCallback completionHandler) + public void ReadData (nuint length, long offset, byte [] data, MEByteSourceReadBytesCallback completionHandler) { if (data is null) ThrowHelper.ThrowArgumentNullException (nameof (data)); @@ -44,7 +44,7 @@ public void ReadData (nuint length, long offset, byte[] data, MEByteSourceReadBy /// Null if an error occurred, otherwise an instance with information about the error. The error will be if the end was reached. /// True if successful, false otherwise. /// This overload will try to fill the byte array with data. - public bool ReadData (long offset, byte[] data, out nuint bytesRead, out NSError? error) + public bool ReadData (long offset, byte [] data, out nuint bytesRead, out NSError? error) { return ReadData ((nuint) data.Length, offset, data, out bytesRead, out error); } @@ -56,7 +56,7 @@ public bool ReadData (long offset, byte[] data, out nuint bytesRead, out NSError /// Upon return, will contain the number of read bytes. /// Null if an error occurred, otherwise an instance with information about the error. The error will be if the end was reached. /// True if successful, false otherwise. - public bool ReadData (nuint length, long offset, byte[] data, out nuint bytesRead, out NSError? error) + public bool ReadData (nuint length, long offset, byte [] data, out nuint bytesRead, out NSError? error) { if (data is null) ThrowHelper.ThrowArgumentNullException (nameof (data)); diff --git a/src/MediaExtension/MERawProcessingListParameter.cs b/src/MediaExtension/MERawProcessingListParameter.cs index 35aaba9a5026..c5642d5487b8 100644 --- a/src/MediaExtension/MERawProcessingListParameter.cs +++ b/src/MediaExtension/MERawProcessingListParameter.cs @@ -23,7 +23,7 @@ public partial class MERawProcessingListParameter { /// The parameter's initial value. /// The parameter's neutral or camera value. /// Specifies whether is a neutral or a camera value. - public MERawProcessingListParameter (string name, string key, string description, MERawProcessingListElementParameter[] listElements, nint initialValue, nint neutralOrCameraValue, MERawProcessingListParameterInitializationOption option) + public MERawProcessingListParameter (string name, string key, string description, MERawProcessingListElementParameter [] listElements, nint initialValue, nint neutralOrCameraValue, MERawProcessingListParameterInitializationOption option) : base (NSObjectFlag.Empty) { switch (option) { diff --git a/src/MediaExtension/MESampleCursor.cs b/src/MediaExtension/MESampleCursor.cs index 340ac8de24fb..2f610ea787a1 100644 --- a/src/MediaExtension/MESampleCursor.cs +++ b/src/MediaExtension/MESampleCursor.cs @@ -14,7 +14,7 @@ public partial interface IMESampleCursor { /// Upon return, the exact location of the sample. /// Upon return, null if successful, otherwise an instance for the error. /// True if successful, false otherwise. - public bool RefineSampleLocation (AVSampleCursorStorageRange estimatedSampleLocation, byte [] refinementData, out AVSampleCursorStorageRange refinedLocation, out NSError? error) + public bool RefineSampleLocation (AVSampleCursorStorageRange estimatedSampleLocation, byte [] refinementData, out AVSampleCursorStorageRange refinedLocation, out NSError? error) { unsafe { fixed (byte* refinementDataPtr = refinementData) { diff --git a/src/MediaToolbox/MTAudioProcessingTap.cs b/src/MediaToolbox/MTAudioProcessingTap.cs index df910cd2e4ac..9bb28c656b6b 100644 --- a/src/MediaToolbox/MTAudioProcessingTap.cs +++ b/src/MediaToolbox/MTAudioProcessingTap.cs @@ -44,19 +44,17 @@ using AudioToolbox; using CoreMedia; -namespace MediaToolbox -{ - public class MTAudioProcessingTap : NativeObject - { +namespace MediaToolbox { + public class MTAudioProcessingTap : NativeObject { #if !COREBUILD delegate void Action_IntPtr (IntPtr arg); // MTAudioProcessingTapCallbacks [StructLayout (LayoutKind.Sequential, Pack = 1)] - unsafe struct Callbacks - { + unsafe struct Callbacks { #pragma warning disable 169 - /* int */ int version; // kMTAudioProcessingTapCallbacksVersion_0 == 0 + /* int */ + int version; // kMTAudioProcessingTapCallbacksVersion_0 == 0 public /* void* */ IntPtr clientInfo; #if NET public /* MTAudioProcessingTapInitCallback */ delegate* unmanaged init; @@ -77,8 +75,8 @@ unsafe struct Callbacks // MTAudioProcessingTapInitCallback unsafe delegate void MTAudioProcessingTapInitCallbackProxy (/* MTAudioProcessingTapRef */ IntPtr tap, /* void* */ IntPtr clientInfo, /* void** */ out void* tapStorageOut); - delegate void MTAudioProcessingTapProcessCallbackProxy (/* MTAudioProcessingTapRef */ IntPtr tap, - IntPtr numberFrames, MTAudioProcessingTapFlags flags, /* AudioBufferList* */ IntPtr bufferListInOut, + delegate void MTAudioProcessingTapProcessCallbackProxy (/* MTAudioProcessingTapRef */ IntPtr tap, + IntPtr numberFrames, MTAudioProcessingTapFlags flags, /* AudioBufferList* */ IntPtr bufferListInOut, out IntPtr numberFramesOut, out MTAudioProcessingTapFlags flagsOut); delegate void MTAudioProcessingTapPrepareCallbackProxy (/* MTAudioProcessingTapRef */ IntPtr tap, IntPtr maxFrames, ref AudioStreamBasicDescription processingFormat); @@ -86,10 +84,10 @@ delegate void MTAudioProcessingTapProcessCallbackProxy (/* MTAudioProcessingTapR static readonly Dictionary handles = new Dictionary (Runtime.IntPtrEqualityComparer); MTAudioProcessingTapCallbacks callbacks; - + internal static MTAudioProcessingTap? FromHandle (IntPtr handle, bool owns) { - lock (handles){ + lock (handles) { if (handles.TryGetValue (handle, out var ret)) return ret; return null; @@ -98,8 +96,8 @@ delegate void MTAudioProcessingTapProcessCallbackProxy (/* MTAudioProcessingTapR [DllImport (Constants.MediaToolboxLibrary)] unsafe extern static /* OSStatus */ MTAudioProcessingTapError MTAudioProcessingTapCreate ( - /* CFAllocatorRef*/ IntPtr allocator, - /* const MTAudioProcessingTapCallbacks* */ Callbacks* callbacks, + /* CFAllocatorRef*/ IntPtr allocator, + /* const MTAudioProcessingTapCallbacks* */ Callbacks* callbacks, MTAudioProcessingTapCreationFlags flags, /* MTAudioProcessingTapRef* */ IntPtr* tapOut); @@ -144,7 +142,7 @@ public MTAudioProcessingTap (MTAudioProcessingTapCallbacks callbacks, MTAudioPro // and that will call the InitializeProxy. So using this (short-lived) GCHandle allow us to find back the // original managed instance var gch = GCHandle.Alloc (this); - c.clientInfo = (IntPtr)gch; + c.clientInfo = (IntPtr) gch; IntPtr handle; MTAudioProcessingTapError res; @@ -183,7 +181,7 @@ protected override void Dispose (bool disposing) [DllImport (Constants.MediaToolboxLibrary)] unsafe extern static /* OSStatus */ MTAudioProcessingTapError MTAudioProcessingTapGetSourceAudio ( - /* MTAudioProcessingTapRef */ IntPtr tap, IntPtr numberFrames, + /* MTAudioProcessingTapRef */ IntPtr tap, IntPtr numberFrames, /* AudioBufferList* */ IntPtr bufferListInOut, MTAudioProcessingTapFlags* flagsOut, CMTimeRange* timeRangeOut, IntPtr* numberFramesOut); @@ -200,14 +198,14 @@ public MTAudioProcessingTapError GetSourceAudio (nint frames, AudioBuffers buffe r = MTAudioProcessingTapGetSourceAudio (Handle, (IntPtr) frames, (IntPtr) bufferList, - (MTAudioProcessingTapFlags *) Unsafe.AsPointer (ref flags), - (CMTimeRange *) Unsafe.AsPointer (ref timeRange), + (MTAudioProcessingTapFlags*) Unsafe.AsPointer (ref flags), + (CMTimeRange*) Unsafe.AsPointer (ref timeRange), &result); } framesProvided = (nint) result; return r; } - + // // Proxy callbacks @@ -222,7 +220,7 @@ unsafe static void InitializeProxy (IntPtr tap, IntPtr /*void**/ clientInfo, out #endif { #if NET - void *tempTapStorage = null; + void* tempTapStorage = null; *tapStorage = tempTapStorage; #else tapStorage = null; @@ -238,7 +236,7 @@ unsafe static void InitializeProxy (IntPtr tap, IntPtr /*void**/ clientInfo, out apt?.callbacks.Initialize (apt, out tapStorage); #endif } - } + } #if NET [UnmanagedCallersOnly] @@ -328,30 +326,26 @@ static void UnprepareProxy (IntPtr tap) // uint32_t -> MTAudioProcessingTap.h [Flags] - public enum MTAudioProcessingTapCreationFlags : uint - { - PreEffects = (1 << 0), - PostEffects = (1 << 1), + public enum MTAudioProcessingTapCreationFlags : uint { + PreEffects = (1 << 0), + PostEffects = (1 << 1), } // uint32_t -> MTAudioProcessingTap.h [Flags] - public enum MTAudioProcessingTapFlags : uint - { - StartOfStream = (1 << 8), - EndOfStream = (1 << 9), + public enum MTAudioProcessingTapFlags : uint { + StartOfStream = (1 << 8), + EndOfStream = (1 << 9), } // used as OSStatus (4 bytes) // Not documented error codes - public enum MTAudioProcessingTapError - { - None = 0, - InvalidArgument = -12780 + public enum MTAudioProcessingTapError { + None = 0, + InvalidArgument = -12780 } - public class MTAudioProcessingTapCallbacks - { + public class MTAudioProcessingTapCallbacks { public MTAudioProcessingTapCallbacks (MTAudioProcessingTapProcessDelegate process) { if (process is null) @@ -374,7 +368,7 @@ public delegate void MTAudioProcessingTapProcessDelegate (MTAudioProcessingTap t AudioBuffers bufferList, out nint numberFramesOut, out MTAudioProcessingTapFlags flagsOut); #if COREBUILD - public class AudioBufferList {} + public class AudioBufferList { } #endif } #endif // HAS_MEDIATOOLBOX diff --git a/src/Metal/Defs.cs b/src/Metal/Defs.cs index e3dfdfec36aa..4d01f7e01b29 100644 --- a/src/Metal/Defs.cs +++ b/src/Metal/Defs.cs @@ -531,8 +531,7 @@ public partial interface IMTLTexture { [NoiOS] [NoTV] #endif - public struct MTLIndirectCommandBufferExecutionRange - { + public struct MTLIndirectCommandBufferExecutionRange { public uint Location; public uint Length; diff --git a/src/Metal/MTLArgumentEncoder.cs b/src/Metal/MTLArgumentEncoder.cs index 021d89204685..19eedb5c37be 100644 --- a/src/Metal/MTLArgumentEncoder.cs +++ b/src/Metal/MTLArgumentEncoder.cs @@ -10,14 +10,14 @@ namespace Metal { public static partial class MTLArgumentEncoder_Extensions { #if NET - public static void SetBuffers (this IMTLArgumentEncoder encoder, IMTLBuffer[] buffers, nuint[] offsets, NSRange range) + public static void SetBuffers (this IMTLArgumentEncoder encoder, IMTLBuffer [] buffers, nuint [] offsets, NSRange range) { if (buffers is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (buffers)); if (offsets is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (offsets)); - var bufferPtrArray = buffers.Length <= 1024 ? stackalloc IntPtr[buffers.Length] : new IntPtr [buffers.Length]; + var bufferPtrArray = buffers.Length <= 1024 ? stackalloc IntPtr [buffers.Length] : new IntPtr [buffers.Length]; // get all intptr from the array to pass to the lower level call for (var i = 0; i < buffers.Length; i++) { bufferPtrArray [i] = buffers [i].Handle; diff --git a/src/Metal/MTLArrays.cs b/src/Metal/MTLArrays.cs index 0152d4b7f357..8d073882b350 100644 --- a/src/Metal/MTLArrays.cs +++ b/src/Metal/MTLArrays.cs @@ -94,8 +94,7 @@ public MTLPipelineBufferDescriptor this [nuint index] { #if IOS public partial class MTLTileRenderPipelineColorAttachmentDescriptorArray { - public MTLTileRenderPipelineColorAttachmentDescriptor this [nuint index] - { + public MTLTileRenderPipelineColorAttachmentDescriptor this [nuint index] { get { return GetObject (index); } diff --git a/src/Metal/MTLComputeCommandEncoder.cs b/src/Metal/MTLComputeCommandEncoder.cs index d8d38c414c1e..ac6351703dbb 100644 --- a/src/Metal/MTLComputeCommandEncoder.cs +++ b/src/Metal/MTLComputeCommandEncoder.cs @@ -12,14 +12,14 @@ namespace Metal { // add some extension methods to make the API of the protocol nicer public static class IMTLComputeCommandEncoderExtensions { - public static void SetBuffers (this IMTLComputeCommandEncoder table, IMTLBuffer[] buffers, nuint[] offsets, NSRange range) + public static void SetBuffers (this IMTLComputeCommandEncoder table, IMTLBuffer [] buffers, nuint [] offsets, NSRange range) { if (buffers is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (buffers)); if (offsets is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (offsets)); - var bufferPtrArray = buffers.Length <= 1024 ? stackalloc IntPtr[buffers.Length] : new IntPtr [buffers.Length]; + var bufferPtrArray = buffers.Length <= 1024 ? stackalloc IntPtr [buffers.Length] : new IntPtr [buffers.Length]; // get all intptr from the array to pass to the lower level call for (var i = 0; i < buffers.Length; i++) { bufferPtrArray [i] = buffers [i].Handle; diff --git a/src/Metal/MTLRasterizationRateLayerDescriptor.cs b/src/Metal/MTLRasterizationRateLayerDescriptor.cs index 1c893a8c2682..ac0fb739b845 100644 --- a/src/Metal/MTLRasterizationRateLayerDescriptor.cs +++ b/src/Metal/MTLRasterizationRateLayerDescriptor.cs @@ -9,8 +9,7 @@ #nullable enable namespace Metal { - public partial class MTLRasterizationRateLayerDescriptor - { + public partial class MTLRasterizationRateLayerDescriptor { #if NET [SupportedOSPlatform ("maccatalyst")] [SupportedOSPlatform ("ios13.0")] @@ -19,10 +18,10 @@ public partial class MTLRasterizationRateLayerDescriptor #else [MacCatalyst (15,0)] #endif - public double[] HorizontalSampleStorage { + public double [] HorizontalSampleStorage { get { - var width = (int)SampleCount.Width; - var floatArray = new double[width]; + var width = (int) SampleCount.Width; + var floatArray = new double [width]; Marshal.Copy (_HorizontalSampleStorage, floatArray, 0, width); return floatArray; } @@ -36,10 +35,10 @@ public double[] HorizontalSampleStorage { #else [MacCatalyst (15,0)] #endif - public double[] VerticalSampleStorage { + public double [] VerticalSampleStorage { get { - var height = (int)SampleCount.Height; - var floatArray = new double[height]; + var height = (int) SampleCount.Height; + var floatArray = new double [height]; Marshal.Copy (_VerticalSampleStorage, floatArray, 0, height); return floatArray; } @@ -53,7 +52,7 @@ public double[] VerticalSampleStorage { #else [MacCatalyst (15,0)] #endif - static public MTLRasterizationRateLayerDescriptor Create (MTLSize sampleCount, float[] horizontal, float[] vertical) + static public MTLRasterizationRateLayerDescriptor Create (MTLSize sampleCount, float [] horizontal, float [] vertical) { if (horizontal is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (horizontal)); diff --git a/src/Metal/MTLResourceStateCommandEncoder.cs b/src/Metal/MTLResourceStateCommandEncoder.cs index 428fc8ba235b..d79726e4ecfa 100644 --- a/src/Metal/MTLResourceStateCommandEncoder.cs +++ b/src/Metal/MTLResourceStateCommandEncoder.cs @@ -32,7 +32,7 @@ public static partial class MTLResourceStateCommandEncoder_Extensions { [NoMac] [NoTV] #endif - public static void Update (this IMTLResourceStateCommandEncoder This, IMTLTexture texture, MTLSparseTextureMappingMode mode, MTLRegion[] regions, nuint[] mipLevels, nuint[] slices) + public static void Update (this IMTLResourceStateCommandEncoder This, IMTLTexture texture, MTLSparseTextureMappingMode mode, MTLRegion [] regions, nuint [] mipLevels, nuint [] slices) { if (texture is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (texture)); @@ -43,14 +43,14 @@ public static void Update (this IMTLResourceStateCommandEncoder This, IMTLTextur if (slices is null) ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (slices)); - var regionsHandle = GCHandle.Alloc (regions, GCHandleType.Pinned); - var mipLevelsHandle = GCHandle.Alloc (mipLevels, GCHandleType.Pinned); - var slicesHandle = GCHandle.Alloc (slices, GCHandleType.Pinned); + var regionsHandle = GCHandle.Alloc (regions, GCHandleType.Pinned); + var mipLevelsHandle = GCHandle.Alloc (mipLevels, GCHandleType.Pinned); + var slicesHandle = GCHandle.Alloc (slices, GCHandleType.Pinned); try { var regionsPtr = regionsHandle.AddrOfPinnedObject (); var mipLevelsPtr = mipLevelsHandle.AddrOfPinnedObject (); var slicesPtr = slicesHandle.AddrOfPinnedObject (); - This.Update (texture, mode, regionsPtr, mipLevelsPtr, slicesPtr, (nuint)regions.Length); + This.Update (texture, mode, regionsPtr, mipLevelsPtr, slicesPtr, (nuint) regions.Length); } finally { regionsHandle.Free (); mipLevelsHandle.Free (); diff --git a/src/MetalPerformanceShadersGraph/MPSGraphExecutable.cs b/src/MetalPerformanceShadersGraph/MPSGraphExecutable.cs index 03409a877687..a350281ee0c4 100644 --- a/src/MetalPerformanceShadersGraph/MPSGraphExecutable.cs +++ b/src/MetalPerformanceShadersGraph/MPSGraphExecutable.cs @@ -12,10 +12,10 @@ namespace MetalPerformanceShadersGraph { /// This enum is used to select how to initialize a new instance of a . #if NET - [SupportedOSPlatform ("ios17.0")] - [SupportedOSPlatform ("maccatalyst17.0")] - [SupportedOSPlatform ("macos14.0")] - [SupportedOSPlatform ("tvos17.0")] + [SupportedOSPlatform ("ios17.0")] + [SupportedOSPlatform ("maccatalyst17.0")] + [SupportedOSPlatform ("macos14.0")] + [SupportedOSPlatform ("tvos17.0")] #else [TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)] #endif diff --git a/src/MetricKit/MXMetaData.cs b/src/MetricKit/MXMetaData.cs index 38ab71eda339..e0df3dcfdecc 100644 --- a/src/MetricKit/MXMetaData.cs +++ b/src/MetricKit/MXMetaData.cs @@ -22,7 +22,7 @@ public partial class MXMetaData { #endif public virtual NSDictionary DictionaryRepresentation { get { - if (SystemVersion.CheckiOS (14,0)) + if (SystemVersion.CheckiOS (14, 0)) return _DictionaryRepresentation14; else return _DictionaryRepresentation13; diff --git a/src/MetricKit/MXMetric.cs b/src/MetricKit/MXMetric.cs index 1aa2230fe4fd..342b2ef0fb04 100644 --- a/src/MetricKit/MXMetric.cs +++ b/src/MetricKit/MXMetric.cs @@ -14,7 +14,7 @@ public partial class MXMetric { public virtual NSDictionary DictionaryRepresentation { get { - if (SystemVersion.CheckiOS (14,0)) + if (SystemVersion.CheckiOS (14, 0)) return _DictionaryRepresentation14; else return _DictionaryRepresentation13; diff --git a/src/MetricKit/MXMetricPayload.cs b/src/MetricKit/MXMetricPayload.cs index 567f5b71f77b..bc4d54a1a0fa 100644 --- a/src/MetricKit/MXMetricPayload.cs +++ b/src/MetricKit/MXMetricPayload.cs @@ -14,7 +14,7 @@ public partial class MXMetricPayload { public virtual NSDictionary DictionaryRepresentation { get { - if (SystemVersion.CheckiOS (14,0)) + if (SystemVersion.CheckiOS (14, 0)) return _DictionaryRepresentation14; else return _DictionaryRepresentation13; diff --git a/src/NearbyInteraction/NIAlgorithmConvergenceStatusReasonValues.cs b/src/NearbyInteraction/NIAlgorithmConvergenceStatusReasonValues.cs index 01d69a593730..a207c9d05efa 100644 --- a/src/NearbyInteraction/NIAlgorithmConvergenceStatusReasonValues.cs +++ b/src/NearbyInteraction/NIAlgorithmConvergenceStatusReasonValues.cs @@ -22,8 +22,7 @@ #endif namespace NearbyInteraction { - public partial class NIAlgorithmConvergenceStatusReasonValues - { + public partial class NIAlgorithmConvergenceStatusReasonValues { #if NET [SupportedOSPlatform ("ios16.0")] [SupportedOSPlatform ("maccatalyst16.0")] diff --git a/src/NearbyInteraction/NINearbyObject.cs b/src/NearbyInteraction/NINearbyObject.cs index 18f691c36940..658e36c83126 100644 --- a/src/NearbyInteraction/NINearbyObject.cs +++ b/src/NearbyInteraction/NINearbyObject.cs @@ -25,22 +25,21 @@ #if __IOS__ namespace NearbyInteraction { - partial class NINearbyObject - { + partial class NINearbyObject { static Vector3? _DirectionNotAvailable; // TODO: https://github.com/xamarin/maccore/issues/2274 // We do not have generator support to trampoline Vector3 -> vector_float3 for Fields - [Field ("NINearbyObjectDirectionNotAvailable", "NearbyInteraction")] + [Field ("NINearbyObjectDirectionNotAvailable", "NearbyInteraction")] public static Vector3 DirectionNotAvailable { get { if (_DirectionNotAvailable is null) { unsafe { - Vector3 *pointer = (Vector3 *) Dlfcn.GetIndirect (Libraries.NearbyInteraction.Handle, "NINearbyObjectDirectionNotAvailable"); + Vector3* pointer = (Vector3*) Dlfcn.GetIndirect (Libraries.NearbyInteraction.Handle, "NINearbyObjectDirectionNotAvailable"); _DirectionNotAvailable = *pointer; } } - return (Vector3)_DirectionNotAvailable; + return (Vector3) _DirectionNotAvailable; } } @@ -55,18 +54,18 @@ public static Vector3 DirectionNotAvailable { [iOS (16,0), MacCatalyst (16,0)] #endif // NET // Following similar strategy found here: https://github.com/xamarin/maccore/issues/2274 - [Field ("NINearbyObjectWorldTransformNotAvailable", "NearbyInteraction")] + [Field ("NINearbyObjectWorldTransformNotAvailable", "NearbyInteraction")] public static MatrixFloat4x4 WorldTransformNotAvailable { get { if (_WorldTransformNotAvailable is null) { unsafe { - MatrixFloat4x4 *pointer = (MatrixFloat4x4 *) Dlfcn.GetIndirect (Libraries.NearbyInteraction.Handle, "NINearbyObjectWorldTransformNotAvailable"); + MatrixFloat4x4* pointer = (MatrixFloat4x4*) Dlfcn.GetIndirect (Libraries.NearbyInteraction.Handle, "NINearbyObjectWorldTransformNotAvailable"); if (pointer is null) throw new PlatformNotSupportedException ("This property is not supported on this version of the OS"); _WorldTransformNotAvailable = *pointer; } } - return (MatrixFloat4x4)_WorldTransformNotAvailable; + return (MatrixFloat4x4) _WorldTransformNotAvailable; } } } diff --git a/src/Network/NWConnection.cs b/src/Network/NWConnection.cs index 5fd4ce6c4ad2..21677dfbdd19 100644 --- a/src/Network/NWConnection.cs +++ b/src/Network/NWConnection.cs @@ -55,7 +55,7 @@ namespace Network { public class NWConnection : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWConnection (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWConnection (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWConnection (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWConnectionGroup.cs b/src/Network/NWConnectionGroup.cs index e2388e91882b..893b191e7af3 100644 --- a/src/Network/NWConnectionGroup.cs +++ b/src/Network/NWConnectionGroup.cs @@ -298,7 +298,7 @@ public void SetStateChangedHandler (NWConnectionGroupStateChangedDelegate handle } #if NET - delegate* unmanaged trampoline= &TrampolineStateChangedHandler; + delegate* unmanaged trampoline = &TrampolineStateChangedHandler; using var block = new BlockLiteral (trampoline, handler, typeof (NWConnectionGroup), nameof (TrampolineStateChangedHandler)); #else using var block = new BlockLiteral (); diff --git a/src/Network/NWEndpoint.cs b/src/Network/NWEndpoint.cs index ccb21c14341a..1f2298edbd08 100644 --- a/src/Network/NWEndpoint.cs +++ b/src/Network/NWEndpoint.cs @@ -35,7 +35,7 @@ namespace Network { public class NWEndpoint : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWEndpoint (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWEndpoint (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWEndpoint (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWEstablishmentReport.cs b/src/Network/NWEstablishmentReport.cs index f04b6fcb2a6d..6fa5da127fec 100644 --- a/src/Network/NWEstablishmentReport.cs +++ b/src/Network/NWEstablishmentReport.cs @@ -98,7 +98,7 @@ public void EnumerateResolutions (Action trampoline = &TrampolineResolutionEnumeratorHandler; - using var block = new BlockLiteral (trampoline, handler, typeof (NWEstablishmentReport),nameof (TrampolineResolutionEnumeratorHandler)); + using var block = new BlockLiteral (trampoline, handler, typeof (NWEstablishmentReport), nameof (TrampolineResolutionEnumeratorHandler)); #else using var block = new BlockLiteral (); block.SetupBlockUnsafe (static_ResolutionEnumeratorHandler, handler); diff --git a/src/Network/NWEthernetChannel.cs b/src/Network/NWEthernetChannel.cs index 1011665380b6..c761c8ea0668 100644 --- a/src/Network/NWEthernetChannel.cs +++ b/src/Network/NWEthernetChannel.cs @@ -18,10 +18,10 @@ using Foundation; using CoreFoundation; -using OS_nw_ethernet_channel=System.IntPtr; -using OS_nw_interface=System.IntPtr; -using OS_dispatch_data=System.IntPtr; -using OS_nw_parameters=System.IntPtr; +using OS_nw_ethernet_channel = System.IntPtr; +using OS_nw_interface = System.IntPtr; +using OS_dispatch_data = System.IntPtr; +using OS_nw_parameters = System.IntPtr; #if !NET @@ -48,7 +48,7 @@ namespace Network { public class NWEthernetChannel : NativeObject { [Preserve (Conditional = true)] - internal NWEthernetChannel (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWEthernetChannel (NativeHandle handle, bool owns) : base (handle, owns) { } [DllImport (Constants.NetworkLibrary)] static extern OS_nw_ethernet_channel nw_ethernet_channel_create (ushort ether_type, OS_nw_interface networkInterface); @@ -89,13 +89,13 @@ public NWEthernetChannel (ushort ethernetType, NWInterface networkInterface) [Mac (13,0)] #endif public NWEthernetChannel (ushort ethernetType, NWInterface networkInterface, NWParameters parameters) => - InitializeHandle (nw_ethernet_channel_create_with_parameters (ethernetType, + InitializeHandle (nw_ethernet_channel_create_with_parameters (ethernetType, networkInterface.GetNonNullHandle (nameof (networkInterface)), parameters.GetNonNullHandle (nameof (parameters)))); [DllImport (Constants.NetworkLibrary)] static extern void nw_ethernet_channel_start (OS_nw_ethernet_channel ethernet_channel); - public void Start () => nw_ethernet_channel_start (GetCheckedHandle ()); + public void Start () => nw_ethernet_channel_start (GetCheckedHandle ()); [DllImport (Constants.NetworkLibrary)] static extern void nw_ethernet_channel_cancel (OS_nw_ethernet_channel ethernet_channel); @@ -160,7 +160,7 @@ public void Send (ReadOnlySpan content, ushort vlanTag, string remoteAddre } [DllImport (Constants.NetworkLibrary)] - unsafe static extern void nw_ethernet_channel_set_receive_handler (OS_nw_ethernet_channel ethernet_channel, /* [NullAllowed] */ BlockLiteral *handler); + unsafe static extern void nw_ethernet_channel_set_receive_handler (OS_nw_ethernet_channel ethernet_channel, /* [NullAllowed] */ BlockLiteral* handler); #if !NET delegate void nw_ethernet_channel_receive_handler_t (IntPtr block, OS_dispatch_data content, ushort vlan_tag, IntPtr local_address, IntPtr remote_address); @@ -206,7 +206,7 @@ public void SetReceiveHandler (NWEthernetChannelReceiveDelegate handler) } [DllImport (Constants.NetworkLibrary)] - unsafe static extern void nw_ethernet_channel_set_state_changed_handler (OS_nw_ethernet_channel ethernet_channel, /* [NullAllowed] */ BlockLiteral *handler); + unsafe static extern void nw_ethernet_channel_set_state_changed_handler (OS_nw_ethernet_channel ethernet_channel, /* [NullAllowed] */ BlockLiteral* handler); #if !NET delegate void nw_ethernet_channel_state_changed_handler_t (IntPtr block, NWEthernetChannelState state, IntPtr error); @@ -243,7 +243,7 @@ public void SetStateChangesHandler (Action handler) #endif nw_ethernet_channel_set_state_changed_handler (GetCheckedHandle (), &block); } - } + } #if NET [SupportedOSPlatform ("macos13.0")] @@ -262,7 +262,7 @@ public void SetStateChangesHandler (Action handler) #else [Mac (13,0)] #endif - public uint MaximumPayloadSize => nw_ethernet_channel_get_maximum_payload_size (GetCheckedHandle ()); + public uint MaximumPayloadSize => nw_ethernet_channel_get_maximum_payload_size (GetCheckedHandle ()); } } #endif diff --git a/src/Network/NWInterface.cs b/src/Network/NWInterface.cs index b37d41851a4d..5edce0ce0f53 100644 --- a/src/Network/NWInterface.cs +++ b/src/Network/NWInterface.cs @@ -33,7 +33,7 @@ namespace Network { public class NWInterface : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWInterface (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWInterface (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWInterface (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWParameters.cs b/src/Network/NWParameters.cs index 5e562febdd81..c12df72e7be5 100644 --- a/src/Network/NWParameters.cs +++ b/src/Network/NWParameters.cs @@ -36,7 +36,7 @@ namespace Network { public class NWParameters : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWParameters (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWParameters (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWParameters (NativeHandle handle, bool owns) : base (handle, owns) { } #endif @@ -222,7 +222,7 @@ public unsafe static NWParameters CreateUdp (Action? configur [NoiOS] #endif [DllImport (Constants.NetworkLibrary)] - unsafe static extern IntPtr nw_parameters_create_custom_ip (byte custom_ip_protocol_number, BlockLiteral *configure_ip); + unsafe static extern IntPtr nw_parameters_create_custom_ip (byte custom_ip_protocol_number, BlockLiteral* configure_ip); #if NET [SupportedOSPlatform ("macos")] diff --git a/src/Network/NWPath.cs b/src/Network/NWPath.cs index 84c4e1f5595c..8e8ccd3026b2 100644 --- a/src/Network/NWPath.cs +++ b/src/Network/NWPath.cs @@ -32,7 +32,7 @@ namespace Network { public class NWPath : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWPath (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWPath (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWPath (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWPrivacyContext.cs b/src/Network/NWPrivacyContext.cs index eef58bb15bfb..8a8eb745d2a9 100644 --- a/src/Network/NWPrivacyContext.cs +++ b/src/Network/NWPrivacyContext.cs @@ -31,7 +31,7 @@ public class NWPrivacyContext : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWPrivacyContext (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWPrivacyContext (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWPrivacyContext (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWProtocolDefinition.cs b/src/Network/NWProtocolDefinition.cs index f96c8cccceb6..95816b3cdda1 100644 --- a/src/Network/NWProtocolDefinition.cs +++ b/src/Network/NWProtocolDefinition.cs @@ -33,7 +33,7 @@ namespace Network { public class NWProtocolDefinition : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWProtocolDefinition (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWProtocolDefinition (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWProtocolDefinition (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWProtocolFramerOptions.cs b/src/Network/NWProtocolFramerOptions.cs index 7b49cca2d57d..eacf836029b3 100644 --- a/src/Network/NWProtocolFramerOptions.cs +++ b/src/Network/NWProtocolFramerOptions.cs @@ -22,7 +22,7 @@ using OS_nw_protocol_options = System.IntPtr; using NativeHandle = System.IntPtr; #else -using OS_nw_protocol_options=ObjCRuntime.NativeHandle; +using OS_nw_protocol_options = ObjCRuntime.NativeHandle; #endif namespace Network { diff --git a/src/Network/NWProtocolMetadata.cs b/src/Network/NWProtocolMetadata.cs index 93dbc81c74d4..e36314084129 100644 --- a/src/Network/NWProtocolMetadata.cs +++ b/src/Network/NWProtocolMetadata.cs @@ -58,7 +58,7 @@ public static NWProtocolMetadata CreateUdpMetadata () [Preserve (Conditional = true)] #if NET - internal NWProtocolMetadata (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWProtocolMetadata (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWProtocolMetadata (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWProtocolOptions.cs b/src/Network/NWProtocolOptions.cs index c3d8267019ca..14c6f2692767 100644 --- a/src/Network/NWProtocolOptions.cs +++ b/src/Network/NWProtocolOptions.cs @@ -34,7 +34,7 @@ namespace Network { public class NWProtocolOptions : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWProtocolOptions (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWProtocolOptions (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWProtocolOptions (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWProtocolStack.cs b/src/Network/NWProtocolStack.cs index d43e247558eb..8aaacdab0041 100644 --- a/src/Network/NWProtocolStack.cs +++ b/src/Network/NWProtocolStack.cs @@ -36,7 +36,7 @@ namespace Network { public class NWProtocolStack : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWProtocolStack (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWProtocolStack (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWProtocolStack (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWProxyConfig.cs b/src/Network/NWProxyConfig.cs index 86c631dd7b37..57a790831af6 100644 --- a/src/Network/NWProxyConfig.cs +++ b/src/Network/NWProxyConfig.cs @@ -29,7 +29,7 @@ namespace Network { public class NWProxyConfig : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWProxyConfig (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWProxyConfig (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWProxyConfig (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWRelayHop.cs b/src/Network/NWRelayHop.cs index d56f895f324a..c2c4018c9bb2 100644 --- a/src/Network/NWRelayHop.cs +++ b/src/Network/NWRelayHop.cs @@ -28,7 +28,7 @@ namespace Network { public class NWRelayHop : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWRelayHop (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWRelayHop (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWRelayHop (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Network/NWResolverConfig.cs b/src/Network/NWResolverConfig.cs index 0f0b69bec429..247554347975 100644 --- a/src/Network/NWResolverConfig.cs +++ b/src/Network/NWResolverConfig.cs @@ -30,7 +30,7 @@ public class NWResolverConfig : NativeObject { [Preserve (Conditional = true)] #if NET - internal NWResolverConfig (NativeHandle handle, bool owns) : base (handle, owns) {} + internal NWResolverConfig (NativeHandle handle, bool owns) : base (handle, owns) { } #else public NWResolverConfig (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/ObjCRuntime/BackingField.cs b/src/ObjCRuntime/BackingField.cs index 8f85291feda5..88fcae65964e 100644 --- a/src/ObjCRuntime/BackingField.cs +++ b/src/ObjCRuntime/BackingField.cs @@ -46,8 +46,7 @@ namespace ObjCRuntime { - static class BackingField - { + static class BackingField { public static T Get (ref T value, IntPtr handle, Converter c) where T : class, INativeObject, IDisposable { diff --git a/src/ObjCRuntime/BindAs.cs b/src/ObjCRuntime/BindAs.cs index 2722caa1cd4a..35b10aede41c 100644 --- a/src/ObjCRuntime/BindAs.cs +++ b/src/ObjCRuntime/BindAs.cs @@ -37,7 +37,7 @@ static T Identity (T obj) return obj; } - unsafe static T[]? ConvertNSArrayToManagedArray (IntPtr nsarray, delegate* convert) where T: struct + unsafe static T []? ConvertNSArrayToManagedArray (IntPtr nsarray, delegate* convert) where T : struct { if (nsarray == IntPtr.Zero) return null; @@ -45,7 +45,7 @@ static T Identity (T obj) return ConvertNSArrayToManagedArray2 (nsarray, convert, &Identity); } - unsafe static IntPtr ConvertManagedArrayToNSArray (T[]? array, delegate* convert) where T: struct + unsafe static IntPtr ConvertManagedArrayToNSArray (T []? array, delegate* convert) where T : struct { if (array is null) return IntPtr.Zero; @@ -53,7 +53,7 @@ unsafe static IntPtr ConvertManagedArrayToNSArray (T[]? array, delegate* (array, &Identity, convert); } - unsafe static T[]? ConvertNSArrayToManagedArray2 (IntPtr nsarray, delegate* convert1, delegate* convert2) where T: struct + unsafe static T []? ConvertNSArrayToManagedArray2 (IntPtr nsarray, delegate* convert1, delegate* convert2) where T : struct { if (nsarray == IntPtr.Zero) return null; @@ -61,7 +61,7 @@ unsafe static IntPtr ConvertManagedArrayToNSArray (T[]? array, delegate* (nsarray, (ptr) => convert2 (convert1 (ptr))); } - unsafe static IntPtr ConvertManagedArrayToNSArray2 (T[]? array, delegate* convert1, delegate* convert2) where T: struct + unsafe static IntPtr ConvertManagedArrayToNSArray2 (T []? array, delegate* convert1, delegate* convert2) where T : struct { if (array is null) return IntPtr.Zero; @@ -90,14 +90,14 @@ unsafe static IntPtr ConvertManagedArrayToNSArray2 (T[]? array, delegate* (IntPtr handle, delegate* convert) where T: struct + unsafe static T? CreateNullable (IntPtr handle, delegate* convert) where T : struct { if (handle == IntPtr.Zero) return null; return convert (handle); } - unsafe static T? CreateNullable2 (IntPtr handle, delegate* convert1, delegate* convert2) where T: struct + unsafe static T? CreateNullable2 (IntPtr handle, delegate* convert1, delegate* convert2) where T : struct { if (handle == IntPtr.Zero) return null; diff --git a/src/ObjCRuntime/Blocks.cs b/src/ObjCRuntime/Blocks.cs index cb3b4091fbe3..2c3389e1c9a9 100644 --- a/src/ObjCRuntime/Blocks.cs +++ b/src/ObjCRuntime/Blocks.cs @@ -410,7 +410,7 @@ public object Target { } #if NET - public T GetDelegateForBlock () where T: System.MulticastDelegate + public T GetDelegateForBlock () where T : System.MulticastDelegate #else public T GetDelegateForBlock () where T : class #endif @@ -419,7 +419,7 @@ public T GetDelegateForBlock () where T : class } #if NET - public unsafe static T GetTarget (IntPtr block) where T: System.MulticastDelegate + public unsafe static T GetTarget (IntPtr block) where T : System.MulticastDelegate #else public unsafe static T GetTarget (IntPtr block) where T : class /* /* requires C# 7.3+: System.MulticastDelegate */ #endif @@ -443,9 +443,9 @@ public static bool IsManagedBlock (IntPtr block) // This method doesn't necessarily work with NativeAOT, but this is covered by the exception, because the managed static registrar is required for NativeAOT. // // IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.Interfaces' in call to 'System.Type.GetInterfaces()'. The return value of method 'System.Reflection.MemberInfo.DeclaringType.get' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to. - [UnconditionalSuppressMessage("", "IL2075", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] + [UnconditionalSuppressMessage ("", "IL2075", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] // IL2062: Value passed to parameter 'interfaceType' of method 'System.Type.GetInterfaceMap(Type)' can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements. - [UnconditionalSuppressMessage("", "IL2062", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] + [UnconditionalSuppressMessage ("", "IL2062", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] #endif static Type GetDelegateProxyType (MethodInfo minfo, uint token_ref, out MethodInfo baseMethod) { @@ -499,7 +499,7 @@ static Type GetDelegateProxyType (MethodInfo minfo, uint token_ref, out MethodIn [BindingImpl (BindingImplOptions.Optimizable)] unsafe static IntPtr GetBlockForFunctionPointer (MethodInfo delegateInvokeMethod, object @delegate, string signature) { - void* invokeFunctionPointer = (void *) delegateInvokeMethod.MethodHandle.GetFunctionPointer (); + void* invokeFunctionPointer = (void*) delegateInvokeMethod.MethodHandle.GetFunctionPointer (); if (signature is null) { if (!Runtime.DynamicRegistrationSupported) throw ErrorHelper.CreateError (8026, $"BlockLiteral.GetBlockForDelegate with a null signature is not supported when the dynamic registrar has been linked away (delegate type: {@delegate.GetType ().FullName})."); @@ -547,7 +547,7 @@ static IntPtr CreateBlockForDelegate (Delegate @delegate, Delegate delegateProxy // // IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicFields' in call to 'System.Type.GetField(String, BindingFlags)'. The return value of method 'ObjCRuntime.BlockLiteral.GetDelegateProxyType(MethodInfo, UInt32, MethodInfo&)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to. // IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.NonPublicMethods' in call to 'System.Type.GetMethod(String, BindingFlags)'. The return value of method 'ObjCRuntime.BlockLiteral.GetDelegateProxyType(MethodInfo, UInt32, MethodInfo&)' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to." - [UnconditionalSuppressMessage("", "IL2075", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] + [UnconditionalSuppressMessage ("", "IL2075", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] #endif internal static IntPtr GetBlockForDelegate (MethodInfo minfo, object @delegate, uint token_ref, string signature) { diff --git a/src/ObjCRuntime/Class.cs b/src/ObjCRuntime/Class.cs index 4135e6d8cb9d..1bfa062aebbb 100644 --- a/src/ObjCRuntime/Class.cs +++ b/src/ObjCRuntime/Class.cs @@ -537,7 +537,7 @@ internal static unsafe int FindMapIndex (Runtime.MTClassMap* array, int lo, int // // IL2026: Using member 'System.Reflection.Module.ResolveMethod(Int32)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Trimming changes metadata tokens. // IL2026: Using member 'System.Reflection.Module.ResolveType(Int32)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code. Trimming changes metadata tokens. - [UnconditionalSuppressMessage("", "IL2026", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] + [UnconditionalSuppressMessage ("", "IL2026", Justification = "The APIs this method tries to access are marked by other means, so this is linker-safe.")] #endif static MemberInfo? ResolveTokenNonManagedStatic (Assembly assembly, Module? module, uint token) { diff --git a/src/ObjCRuntime/DelayedRegistrationAttribute.cs b/src/ObjCRuntime/DelayedRegistrationAttribute.cs index 097d486714f2..c1b57b383a01 100644 --- a/src/ObjCRuntime/DelayedRegistrationAttribute.cs +++ b/src/ObjCRuntime/DelayedRegistrationAttribute.cs @@ -29,8 +29,7 @@ namespace ObjCRuntime { [AttributeUsage (AttributeTargets.Assembly)] - public abstract class DelayedRegistrationAttribute : Attribute - { + public abstract class DelayedRegistrationAttribute : Attribute { public abstract bool Delay { get; } } } diff --git a/src/ObjCRuntime/Dlfcn.cs b/src/ObjCRuntime/Dlfcn.cs index a1b10999b496..725be061da61 100644 --- a/src/ObjCRuntime/Dlfcn.cs +++ b/src/ObjCRuntime/Dlfcn.cs @@ -56,8 +56,7 @@ static public class LibC { static public readonly IntPtr Handle = Dlfcn._dlopen (Constants.libcLibrary, 0); } #if HAS_OPENGLES - static public class OpenGLES - { + static public class OpenGLES { static public readonly IntPtr Handle = Dlfcn._dlopen (Constants.OpenGLESLibrary, 0); } #endif diff --git a/src/ObjCRuntime/INativeObject.cs b/src/ObjCRuntime/INativeObject.cs index f464c21fd741..aa4823b9642f 100644 --- a/src/ObjCRuntime/INativeObject.cs +++ b/src/ObjCRuntime/INativeObject.cs @@ -21,7 +21,7 @@ NativeHandle Handle { // The method will be implemented via custom linker step if the managed static registrar is used // for classes which have an (NativeHandle, bool) or (IntPtr, bool) constructor. // This method will be made public when the managed static registrar is used. - [MethodImpl(MethodImplOptions.NoInlining)] + [MethodImpl (MethodImplOptions.NoInlining)] internal static virtual INativeObject? _Xamarin_ConstructINativeObject (NativeHandle handle, bool owns) => null; #endif } diff --git a/src/ObjCRuntime/NativeHandle.cs b/src/ObjCRuntime/NativeHandle.cs index d9f1453b2e1b..9844e9d25e03 100644 --- a/src/ObjCRuntime/NativeHandle.cs +++ b/src/ObjCRuntime/NativeHandle.cs @@ -72,10 +72,10 @@ public static implicit operator NativeHandle (IntPtr value) public unsafe static explicit operator void* (NativeHandle value) { - return (void *) (IntPtr) value; + return (void*) (IntPtr) value; } - public unsafe static explicit operator NativeHandle (void * value) + public unsafe static explicit operator NativeHandle (void* value) { return new NativeHandle ((IntPtr) value); } diff --git a/src/ObjCRuntime/PlatformAvailability.cs b/src/ObjCRuntime/PlatformAvailability.cs index 41887c7773b8..9f455bfdcd26 100644 --- a/src/ObjCRuntime/PlatformAvailability.cs +++ b/src/ObjCRuntime/PlatformAvailability.cs @@ -568,7 +568,7 @@ public MacAttribute (byte major, byte minor, PlatformArchitecture arch) public MacAttribute (byte major, byte minor, byte subminor) #if NET - : base ((Platform)((ulong)major << 48 | (ulong)minor << 40 | (ulong)subminor << 32)) + : base ((Platform) ((ulong) major << 48 | (ulong) minor << 40 | (ulong) subminor << 32)) #else : this (major, minor, subminor, false) #endif diff --git a/src/ObjCRuntime/RegistrarHelper.cs b/src/ObjCRuntime/RegistrarHelper.cs index f5ba5b46b689..c145d6e8f844 100644 --- a/src/ObjCRuntime/RegistrarHelper.cs +++ b/src/ObjCRuntime/RegistrarHelper.cs @@ -69,7 +69,7 @@ internal static void Initialize () wrapper_types = new Dictionary (RuntimeTypeHandleEqualityComparer); } - static NativeHandle CreateCFArray (params string[]? values) + static NativeHandle CreateCFArray (params string []? values) { if (values is null) return NativeHandle.Zero; @@ -252,9 +252,9 @@ static NativeHandle ManagedArrayToNSArray (object array, bool retain) return NativeHandle.Zero; NSObject rv; - if (array is NSObject[] nsobjs) { + if (array is NSObject [] nsobjs) { rv = NSArray.FromNSObjects (nsobjs); - } else if (array is INativeObject[] inativeobjs) { + } else if (array is INativeObject [] inativeobjs) { rv = NSArray.FromNSObjects (inativeobjs); } else { throw new InvalidOperationException ($"Can't convert {array.GetType ()} to an NSArray."); // FIXME: better error @@ -265,7 +265,7 @@ static NativeHandle ManagedArrayToNSArray (object array, bool retain) return Runtime.RetainAndAutoreleaseNSObject (rv); } - unsafe static void NSArray_string_native_to_managed (IntPtr* ptr, ref string[]? value, ref string[]? copy) + unsafe static void NSArray_string_native_to_managed (IntPtr* ptr, ref string []? value, ref string []? copy) { if (ptr is not null) { value = NSArray.StringArrayFromHandle (*ptr); @@ -275,7 +275,7 @@ unsafe static void NSArray_string_native_to_managed (IntPtr* ptr, ref string[]? copy = value; } - unsafe static void NSArray_string_managed_to_native (IntPtr* ptr, string[] value, string[] copy, bool isOut) + unsafe static void NSArray_string_managed_to_native (IntPtr* ptr, string [] value, string [] copy, bool isOut) { if (ptr is null) return; @@ -301,7 +301,7 @@ unsafe static void NSArray_string_managed_to_native (IntPtr* ptr, string[] value *ptr = rv; } - unsafe static void NSArray_native_to_managed (IntPtr* ptr, ref T[]? value, ref T[]? copy) where T: class, INativeObject + unsafe static void NSArray_native_to_managed (IntPtr* ptr, ref T []? value, ref T []? copy) where T : class, INativeObject { if (ptr is not null) { value = NSArray.ArrayFromHandle (*ptr); @@ -311,7 +311,7 @@ unsafe static void NSArray_native_to_managed (IntPtr* ptr, ref T[]? value, re copy = value; } - unsafe static void NSArray_managed_to_native (IntPtr* ptr, T[] value, T[] copy, bool isOut) where T: class, INativeObject + unsafe static void NSArray_managed_to_native (IntPtr* ptr, T [] value, T [] copy, bool isOut) where T : class, INativeObject { if (ptr is null) { #if TRACE @@ -340,7 +340,7 @@ unsafe static void NSArray_managed_to_native (IntPtr* ptr, T[] value, T[] cop *ptr = rv; } - unsafe static void NSObject_native_to_managed (IntPtr* ptr, ref T? value, ref T? copy) where T: NSObject + unsafe static void NSObject_native_to_managed (IntPtr* ptr, ref T? value, ref T? copy) where T : NSObject { if (ptr is not null) { value = Runtime.GetNSObject (*ptr, owns: false); @@ -371,7 +371,7 @@ unsafe static void NSObject_managed_to_native (IntPtr* ptr, NSObject value, NSOb *ptr = rv; } - unsafe static void string_native_to_managed (NativeHandle *ptr, ref string? value, ref string? copy) + unsafe static void string_native_to_managed (NativeHandle* ptr, ref string? value, ref string? copy) { if (ptr is not null) { value = CFString.FromHandle (*ptr); @@ -381,7 +381,7 @@ unsafe static void string_native_to_managed (NativeHandle *ptr, ref string? valu copy = value; } - unsafe static void string_managed_to_native (NativeHandle *ptr, string value, string copy, bool isOut) + unsafe static void string_managed_to_native (NativeHandle* ptr, string value, string copy, bool isOut) { if (ptr is null) { #if TRACE @@ -402,7 +402,7 @@ unsafe static void string_managed_to_native (NativeHandle *ptr, string value, st *ptr = rv; } - unsafe static void INativeObject_native_to_managed (IntPtr* ptr, ref T? value, ref T? copy, RuntimeTypeHandle implementationType) where T: class, INativeObject + unsafe static void INativeObject_native_to_managed (IntPtr* ptr, ref T? value, ref T? copy, RuntimeTypeHandle implementationType) where T : class, INativeObject { if (ptr is not null) { value = Runtime.GetINativeObject (*ptr, implementation: Type.GetTypeFromHandle (implementationType), forced_type: false, owns: false); @@ -412,7 +412,7 @@ unsafe static void INativeObject_native_to_managed (IntPtr* ptr, ref T? value copy = value; } - unsafe static void INativeObject_managed_to_native (IntPtr *ptr, INativeObject value, INativeObject copy, bool isOut) + unsafe static void INativeObject_managed_to_native (IntPtr* ptr, INativeObject value, INativeObject copy, bool isOut) { if (ptr is null) { #if TRACE diff --git a/src/ObjCRuntime/RequiredFrameworkAttribute.cs b/src/ObjCRuntime/RequiredFrameworkAttribute.cs index afc789075980..ac1b8cc56505 100644 --- a/src/ObjCRuntime/RequiredFrameworkAttribute.cs +++ b/src/ObjCRuntime/RequiredFrameworkAttribute.cs @@ -29,11 +29,10 @@ namespace ObjCRuntime { - [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] - public class RequiredFrameworkAttribute : Attribute - { + [AttributeUsage (AttributeTargets.Assembly, AllowMultiple = true)] + public class RequiredFrameworkAttribute : Attribute { public string Name { get; private set; } - + public RequiredFrameworkAttribute (string name) { Name = name; diff --git a/src/ObjCRuntime/Runtime.CoreCLR.cs b/src/ObjCRuntime/Runtime.CoreCLR.cs index 3de830102738..f7a1f4cdf369 100644 --- a/src/ObjCRuntime/Runtime.CoreCLR.cs +++ b/src/ObjCRuntime/Runtime.CoreCLR.cs @@ -37,7 +37,7 @@ using Xamarin.Bundler; -using MonoObjectPtr=System.IntPtr; +using MonoObjectPtr = System.IntPtr; namespace ObjCRuntime { @@ -98,7 +98,7 @@ static void log_coreclr (string message) // Define VERBOSE_LOG at the top of this file to get all printfs [System.Diagnostics.Conditional ("VERBOSE_LOG")] - static void log_coreclr_render (string message, params object?[] argumentsToRender) + static void log_coreclr_render (string message, params object? [] argumentsToRender) { var args = new string [argumentsToRender.Length]; for (var i = 0; i < args.Length; i++) { @@ -212,7 +212,7 @@ internal static GCHandle CreateTrackingGCHandle (NSObject obj, IntPtr handle) unsafe { TrackedObjectInfo* tracked_info; fixed (void* ptr = info) - tracked_info = (TrackedObjectInfo *) ptr; + tracked_info = (TrackedObjectInfo*) ptr; tracked_info->Handle = handle; tracked_info->Flags = obj.FlagsInternal; obj.tracked_object_info = tracked_info; @@ -264,7 +264,7 @@ internal static void RegisterToggleReferenceCoreCLR (NSObject obj, IntPtr handle } // Returns a retained MonoObject. Caller must release. - [UnconditionalSuppressMessage("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "This method is only called to retrieve the assembly where the entry point is, and the entry point is not trimmed away, so this is safe.")] + [UnconditionalSuppressMessage ("AssemblyLoadTrimming", "IL2026:RequiresUnreferencedCode", Justification = "This method is only called to retrieve the assembly where the entry point is, and the entry point is not trimmed away, so this is safe.")] static IntPtr FindAssembly (IntPtr assembly_name) { if (IsNativeAOT) @@ -306,7 +306,7 @@ static unsafe void SetPendingException (MonoObject* exception_obj) ObjectiveCMarshal.SetMessageSendPendingException (exc); } - unsafe static sbyte IsClassOfType (MonoObject *typeobj, TypeLookup match) + unsafe static sbyte IsClassOfType (MonoObject* typeobj, TypeLookup match) { var rv = IsClassOfType ((Type?) GetMonoObjectTarget (typeobj), match); return (sbyte) (rv ? 1 : 0); @@ -459,7 +459,7 @@ static IntPtr GetMonoObjectImpl (object obj) return null; unsafe { - MonoObject *monoobj = (MonoObject *) mobj; + MonoObject* monoobj = (MonoObject*) mobj; return GetGCHandleTarget (monoobj->GCHandle); } } @@ -469,7 +469,7 @@ static IntPtr GetMonoObjectImpl (object obj) static extern void xamarin_bridge_log_monoobject (IntPtr mono_object, string stack_trace); #endif - static IntPtr MarshalStructure (T value) where T: unmanaged + static IntPtr MarshalStructure (T value) where T : unmanaged { var destination = Marshal.AllocHGlobal (Marshal.SizeOf ()); @@ -564,10 +564,10 @@ static byte GetFlagsForNSObject (IntPtr gchandle) return (byte) obj.FlagsInternal; } - static unsafe MonoObject* GetMethodDeclaringType (MonoObject *mobj) + static unsafe MonoObject* GetMethodDeclaringType (MonoObject* mobj) { var method = (MethodBase) GetMonoObjectTarget (mobj)!; - return (MonoObject *) GetMonoObject (method.DeclaringType); + return (MonoObject*) GetMonoObject (method.DeclaringType); } static IntPtr ObjectGetType (MonoObjectPtr mobj) @@ -611,16 +611,16 @@ static unsafe IntPtr GetMethodSignature (MonoObject* methodobj) var parameterCount = parameters.Length; var rv = Marshal.AllocHGlobal (sizeof (MonoMethodSignature) + sizeof (MonoObjectPtr) * parameterCount); - MonoMethodSignature* signature = (MonoMethodSignature *) rv; + MonoMethodSignature* signature = (MonoMethodSignature*) rv; signature->Method = methodobj; xamarin_mono_object_retain (methodobj); signature->ParameterCount = parameterCount; - signature->ReturnType = (MonoObject *) GetMonoObject (GetMethodReturnType (method)); + signature->ReturnType = (MonoObject*) GetMonoObject (GetMethodReturnType (method)); MonoObject** mparams = &signature->Parameters; for (var i = 0; i < parameterCount; i++) { var p = parameters [i]; - mparams [i] = (MonoObject *) GetMonoObject (p.ParameterType); + mparams [i] = (MonoObject*) GetMonoObject (p.ParameterType); } return rv; @@ -638,14 +638,14 @@ static unsafe IntPtr GetMethodSignature (MonoObject* methodobj) return null; } - unsafe static IntPtr ClassGetNamespace (MonoObject *typeobj) + unsafe static IntPtr ClassGetNamespace (MonoObject* typeobj) { var type = (Type?) GetMonoObjectTarget (typeobj); var rv = type?.Namespace; return Marshal.StringToHGlobalAuto (rv); } - unsafe static IntPtr ClassGetName (MonoObject *typeobj) + unsafe static IntPtr ClassGetName (MonoObject* typeobj) { var type = (Type?) GetMonoObjectTarget (typeobj); var rv = type?.Name; @@ -658,7 +658,7 @@ unsafe static IntPtr ClassGetName (MonoObject *typeobj) var type = (Type?) GetMonoObjectTarget (typeobj); if (type?.IsByRef == true) type = type.GetElementType (); - return (MonoObject *) GetMonoObject (type); + return (MonoObject*) GetMonoObject (type); } static unsafe int SizeOf (MonoObject* typeobj) @@ -682,7 +682,7 @@ static int SizeOf (Type type) var method = (MethodBase) GetMonoObjectTarget (methodobj)!; var instance = GetMonoObjectTarget (instanceobj)!; var rv = InvokeMethod (method, instance, native_parameters); - return (MonoObject *) GetMonoObject (rv); + return (MonoObject*) GetMonoObject (rv); } // Return value: NULL or a MonoObject* that must be released with xamarin_mono_object_safe_release. @@ -744,7 +744,7 @@ static int SizeOf (Type type) log_coreclr ($" IsClass/IsInterface/IsNullable IsByRef: {isByRef} IsOut: {p.IsOut} ParameterType: {paramType}"); if (nativeParam != IntPtr.Zero) { unsafe { - MonoObject* mono_obj = (MonoObject *) nativeParam; + MonoObject* mono_obj = (MonoObject*) nativeParam; // dereference if it's a byref type if (isByRef) mono_obj = *(MonoObject**) mono_obj; @@ -788,7 +788,7 @@ static int SizeOf (Type type) try { rv = method.Invoke (instance, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance, null, parameters, null); - } catch (TargetInvocationException tie) { + } catch (TargetInvocationException tie) { var ex = tie.InnerException ?? tie; // This will re-throw the original exception and preserve the stacktrace. ExceptionDispatchInfo.Capture (ex).Throw (); @@ -855,7 +855,7 @@ static unsafe IntPtr StringToUtf8 (MonoObject* obj) static unsafe MonoObject* NewString (IntPtr text) { - return (MonoObject *) GetMonoObject (Marshal.PtrToStringAuto (text)); + return (MonoObject*) GetMonoObject (Marshal.PtrToStringAuto (text)); } static unsafe MonoObject* CreateArray (MonoObject* typeobj, ulong elements) @@ -874,14 +874,14 @@ static unsafe ulong GetArrayLength (MonoObject* obj) return (ulong) array.Length; } - static unsafe void SetArrayObjectValue (MonoObject *arrayobj, ulong index, MonoObject *mobj) + static unsafe void SetArrayObjectValue (MonoObject* arrayobj, ulong index, MonoObject* mobj) { var array = (Array) GetMonoObjectTarget (arrayobj)!; var obj = GetMonoObjectTarget (mobj); array.SetValue (obj, (long) index); } - static unsafe void SetArrayStructValue (MonoObject *arrayobj, ulong index, MonoObject *typeobj, IntPtr valueptr) + static unsafe void SetArrayStructValue (MonoObject* arrayobj, ulong index, MonoObject* typeobj, IntPtr valueptr) { var array = (Array) GetMonoObjectTarget (arrayobj)!; var elementType = (Type) GetMonoObjectTarget (typeobj)!; @@ -893,14 +893,14 @@ static unsafe void SetArrayStructValue (MonoObject *arrayobj, ulong index, MonoO { var array = (Array) GetMonoObjectTarget (arrayobj)!; var obj = array.GetValue ((long) index); - return (MonoObject *) GetMonoObject (obj); + return (MonoObject*) GetMonoObject (obj); } static unsafe MonoObject* Box (MonoObject* typeobj, IntPtr value) { var type = (Type) GetMonoObjectTarget (typeobj)!; var rv = Box (type, value); - return (MonoObject *) GetMonoObject (rv); + return (MonoObject*) GetMonoObject (rv); } static object? Box (Type type, IntPtr value) @@ -948,21 +948,21 @@ static bool IsNullable (Type type) return false; } - unsafe static sbyte IsByRef (MonoObject *typeobj) + unsafe static sbyte IsByRef (MonoObject* typeobj) { var type = (Type) GetMonoObjectTarget (typeobj)!; var rv = type.IsByRef; return (sbyte) (rv ? 1 : 0); } - unsafe static sbyte IsValueType (MonoObject *typeobj) + unsafe static sbyte IsValueType (MonoObject* typeobj) { var type = (Type) GetMonoObjectTarget (typeobj)!; var rv = type.IsValueType; return (sbyte) (rv ? 1 : 0); } - unsafe static sbyte IsEnum (MonoObject *typeobj) + unsafe static sbyte IsEnum (MonoObject* typeobj) { var type = (Type) GetMonoObjectTarget (typeobj)!; var rv = type.IsEnum; diff --git a/src/ObjCRuntime/Runtime.cs b/src/ObjCRuntime/Runtime.cs index 66aedf65af84..138e94b76e5a 100644 --- a/src/ObjCRuntime/Runtime.cs +++ b/src/ObjCRuntime/Runtime.cs @@ -177,8 +177,8 @@ internal enum InitializationFlags : int { /* unused = 0x08,*/ IsSimulator = 0x10, #if NET - IsCoreCLR = 0x20, - IsNativeAOT = 0x40, + IsCoreCLR = 0x20, + IsNativeAOT = 0x40, #endif } @@ -226,8 +226,7 @@ public bool IsSimulator { internal static unsafe InitializationOptions* options; #if NET - public static class ClassHandles - { + public static class ClassHandles { static NativeHandle unused; internal static unsafe void InitializeClassHandles (IntPtr* map) { @@ -238,7 +237,7 @@ internal static unsafe void InitializeClassHandles (IntPtr* map) // Rewriter uses those. // In the case of NO class handle rewriting, // this is a no-op - fixed (NativeHandle *ptr = &unused) { + fixed (NativeHandle* ptr = &unused) { SetHandle (-1, ptr, map); } } @@ -248,9 +247,9 @@ internal static unsafe void SetHandle (int index, NativeHandle* handle, IntPtr* { if (index < 0) return; - + var nativeHandle = map [index]; - *handle = (NativeHandle)nativeHandle; + *handle = (NativeHandle) nativeHandle; } } #endif @@ -297,10 +296,10 @@ internal static bool Initialized { [DllImport (Constants.libcLibrary)] unsafe static extern int _NSGetExecutablePath (byte* buf, int* bufsize); - unsafe static int _NSGetExecutablePath (byte[] buf, ref int bufsize) + unsafe static int _NSGetExecutablePath (byte [] buf, ref int bufsize) { fixed (byte* bufptr = buf) - return _NSGetExecutablePath (bufptr, (int *) Unsafe.AsPointer (ref bufsize)); + return _NSGetExecutablePath (bufptr, (int*) Unsafe.AsPointer (ref bufsize)); } #endif @@ -460,8 +459,7 @@ static bool ThreadPoolDispatcher (Func callback) static bool OnAssemblyRegistration (AssemblyName assembly_name) { if (AssemblyRegistration is not null) { - var args = new AssemblyRegistrationEventArgs - { + var args = new AssemblyRegistrationEventArgs { Register = true, AssemblyName = assembly_name }; @@ -786,14 +784,13 @@ public static void RegisterAssembly (Assembly a) var attributes = a.GetCustomAttributes (typeof (RequiredFrameworkAttribute), false); foreach (var attribute in attributes) { - var requiredFramework = (RequiredFrameworkAttribute)attribute; + var requiredFramework = (RequiredFrameworkAttribute) attribute; string libPath; string libName = requiredFramework.Name; if (libName.Contains (".dylib")) { libPath = ResourcesPath!; - } - else { + } else { libPath = FrameworksPath!; libPath = Path.Combine (libPath, libName); libName = libName.Replace (".frameworks", ""); @@ -802,7 +799,7 @@ public static void RegisterAssembly (Assembly a) if (Dlfcn.dlopen (libPath, 0) == IntPtr.Zero) throw new Exception ($"Unable to load required framework: '{requiredFramework.Name}'", - new Exception (Dlfcn.dlerror())); + new Exception (Dlfcn.dlerror ())); } attributes = a.GetCustomAttributes (typeof (DelayedRegistrationAttribute), false); @@ -1607,7 +1604,7 @@ static void AppendAdditionalInformation (StringBuilder msg, IntPtr sel, RuntimeM // If type is an NSObject, we prefer the NSObject lookup table if (instance is null && type != typeof (NSObject) && type.IsSubclassOf (typeof (NSObject))) { - instance = (T?)(INativeObject?) RegistrarHelper.ConstructNSObject (type, nativeHandle); + instance = (T?) (INativeObject?) RegistrarHelper.ConstructNSObject (type, nativeHandle); if (instance is not null && owns) { Runtime.TryReleaseINativeObject (instance); } @@ -2146,7 +2143,7 @@ static Type LookupINativeObjectImplementation (IntPtr ptr, Type target_type, Typ // For other registrars other than managed-static the generic parameter of ConstructNSObject is used // only to cast the return value so we can safely pass NSObject here to satisfy the constraints of the // generic parameter. - var rv = (T?)(INativeObject?) ConstructNSObject (ptr, implementation, MissingCtorResolution.ThrowConstructor1NotFound, sel, method_handle); + var rv = (T?) (INativeObject?) ConstructNSObject (ptr, implementation, MissingCtorResolution.ThrowConstructor1NotFound, sel, method_handle); if (owns) TryReleaseINativeObject (rv); return rv; diff --git a/src/ObjCRuntime/Runtime.mac.cs b/src/ObjCRuntime/Runtime.mac.cs index d8630d44ee69..56b55d9e03b8 100644 --- a/src/ObjCRuntime/Runtime.mac.cs +++ b/src/ObjCRuntime/Runtime.mac.cs @@ -54,9 +54,9 @@ public static string? FrameworksPath { public static string? ResourcesPath { get; set; } - + delegate void initialize_func (); - unsafe delegate sbyte *get_sbyteptr_func (); + unsafe delegate sbyte* get_sbyteptr_func (); #if !NET // There's a different implementation for other platforms + .NET macOS in Runtime.cs static volatile bool originalWorkingDirectoryIsSet; diff --git a/src/PassKit/PKCompat.cs b/src/PassKit/PKCompat.cs index d8e889f5785b..de76bf7fdb6f 100644 --- a/src/PassKit/PKCompat.cs +++ b/src/PassKit/PKCompat.cs @@ -87,7 +87,7 @@ public unsafe virtual void AuthorizeDisbursement (global::System.Action> AuthorizeDisbursementAsync () + public unsafe virtual Task> AuthorizeDisbursementAsync () { throw new InvalidOperationException (Constants.RemovedFromPassKit); } @@ -125,8 +125,7 @@ protected override void Dispose (bool disposing) #endif // NET [EditorBrowsable (EditorBrowsableState.Never)] [Obsolete ("This class is removed.")] - public partial interface IPKDisbursementAuthorizationControllerDelegate : INativeObject, IDisposable - { + public partial interface IPKDisbursementAuthorizationControllerDelegate : INativeObject, IDisposable { void DidAuthorize (PKDisbursementAuthorizationController controller, PKDisbursementVoucher disbursementVoucher); void DidFinish (PKDisbursementAuthorizationController controller); } diff --git a/src/PdfKit/Enums.cs b/src/PdfKit/Enums.cs index cd3ff0ac0476..45cba05bb9cf 100644 --- a/src/PdfKit/Enums.cs +++ b/src/PdfKit/Enums.cs @@ -39,37 +39,37 @@ namespace PdfKit { [Native] [TV (18, 2)] public enum PdfActionNamedName : long { - None = 0, - NextPage = 1, + None = 0, + NextPage = 1, PreviousPage = 2, - FirstPage = 3, - LastPage = 4, - GoBack = 5, - GoForward = 6, - GoToPage = 7, - Find = 8, - Print = 9, - ZoomIn = 10, - ZoomOut = 11 + FirstPage = 3, + LastPage = 4, + GoBack = 5, + GoForward = 6, + GoToPage = 7, + Find = 8, + Print = 9, + ZoomIn = 10, + ZoomOut = 11 } [Native] [TV (18, 2)] public enum PdfWidgetControlType : long { - Unknown = -1, - PushButton = 0, + Unknown = -1, + PushButton = 0, RadioButton = 1, - CheckBox = 2 + CheckBox = 2 } [Native] [TV (18, 2)] public enum PdfLineStyle : long { - None = 0, - Square = 1, - Circle = 2, - Diamond = 3, - OpenArrow = 4, + None = 0, + Square = 1, + Circle = 2, + Diamond = 3, + OpenArrow = 4, ClosedArrow = 5 } @@ -79,28 +79,28 @@ public enum PdfMarkupType : long { Highlight = 0, StrikeOut = 1, Underline = 2, - Redact = 3, + Redact = 3, } [Native] [TV (18, 2)] public enum PdfTextAnnotationIconType : long { - Comment = 0, - Key = 1, - Note = 2, - Help = 3, + Comment = 0, + Key = 1, + Note = 2, + Help = 3, NewParagraph = 4, - Paragraph = 5, - Insert = 6 + Paragraph = 5, + Insert = 6 } [Native] [TV (18, 2)] public enum PdfBorderStyle : long { - Solid = 0, - Dashed = 1, - Beveled = 2, - Inset = 3, + Solid = 0, + Dashed = 1, + Beveled = 2, + Inset = 3, Underline = 4 } @@ -110,16 +110,16 @@ public enum PdfBorderStyle : long { [Unavailable (PlatformName.MacCatalyst)] [Native] public enum PdfPrintScalingMode : long { - None = 0, - ToFit = 1, + None = 0, + ToFit = 1, DownToFit = 2 } [Native] [TV (18, 2)] public enum PdfDocumentPermissions : long { - None = 0, - User = 1, + None = 0, + User = 1, Owner = 2 } @@ -127,36 +127,36 @@ public enum PdfDocumentPermissions : long { [TV (18, 2)] public enum PdfDisplayBox : long { Media = 0, - Crop = 1, + Crop = 1, Bleed = 2, - Trim = 3, - Art = 4 + Trim = 3, + Art = 4 } [Native] [TV (18, 2)] public enum PdfDisplayMode : long { - SinglePage = 0, + SinglePage = 0, SinglePageContinuous = 1, - TwoUp = 2, - TwoUpContinuous = 3 + TwoUp = 2, + TwoUpContinuous = 3 } [Flags] [Native] [TV (18, 2)] public enum PdfAreaOfInterest : long { - NoArea = 0, - PageArea = 1 << 0, - TextArea = 1 << 1, + NoArea = 0, + PageArea = 1 << 0, + TextArea = 1 << 1, AnnotationArea = 1 << 2, - LinkArea = 1 << 3, - ControlArea = 1 << 4, - TextFieldArea = 1 << 5, - IconArea = 1 << 6, - PopupArea = 1 << 7, - ImageArea = 1 << 8, - [iOS (15,0), MacCatalyst (15,0)] + LinkArea = 1 << 3, + ControlArea = 1 << 4, + TextFieldArea = 1 << 5, + IconArea = 1 << 6, + PopupArea = 1 << 7, + ImageArea = 1 << 8, + [iOS (15, 0), MacCatalyst (15, 0)] AnyArea = Int64.MaxValue, } diff --git a/src/PhotosUI/PHEnums.cs b/src/PhotosUI/PHEnums.cs index 8753917b1c49..5673e478f07b 100644 --- a/src/PhotosUI/PHEnums.cs +++ b/src/PhotosUI/PHEnums.cs @@ -14,7 +14,9 @@ public enum PHLivePhotoViewPlaybackStyle : long { } #if MONOMAC - [NoiOS][NoTV][NoMacCatalyst] + [NoiOS] + [NoTV] + [NoMacCatalyst] [Native] public enum PHLivePhotoViewContentMode : long { AspectFit, diff --git a/src/QuickLook/Thumbnail.cs b/src/QuickLook/Thumbnail.cs index fa43d8107ead..8f7f0f0d2c23 100644 --- a/src/QuickLook/Thumbnail.cs +++ b/src/QuickLook/Thumbnail.cs @@ -52,7 +52,7 @@ public static partial class QLThumbnailImage { #else [Deprecated (PlatformName.MacOSX, 15, 0, message: "Use the QuickLookThumbnailing framework instead for creating thumbnails for files.")] #endif - [DllImport(Constants.QuickLookLibrary)] + [DllImport (Constants.QuickLookLibrary)] extern static /* CGImageRef */ IntPtr QLThumbnailImageCreate (/* CFAllocatorRef */ IntPtr allocator, /* CFUrlRef */ IntPtr url, CGSize maxThumbnailSize, /* CFDictionaryRef */ IntPtr options); #if NET @@ -76,12 +76,12 @@ public static partial class QLThumbnailImage { dictionary.LowlevelSetObject ((NSNumber) scaleFactor, OptionScaleFactorKey.Handle); dictionary.LowlevelSetObject (iconMode ? CFBoolean.TrueHandle : CFBoolean.FalseHandle, OptionIconModeKey.Handle); } - + var handle = QLThumbnailImageCreate (IntPtr.Zero, url.Handle, maxThumbnailSize, dictionary.GetHandle ()); GC.KeepAlive (dictionary); if (handle != IntPtr.Zero) return new CGImage (handle, true); - + return null; } } diff --git a/src/SceneKit/Defs.cs b/src/SceneKit/Defs.cs index 8f1d6da893bf..8ebb75bc6fdc 100644 --- a/src/SceneKit/Defs.cs +++ b/src/SceneKit/Defs.cs @@ -276,10 +276,12 @@ public enum SCNAntialiasingMode : ulong { Multisampling2X, Multisampling4X, #if MONOMAC || __MACCATALYST__ - [NoiOS][NoTV] + [NoiOS] + [NoTV] [NoMacCatalyst] Multisampling8X, - [NoiOS][NoTV] + [NoiOS] + [NoTV] [NoMacCatalyst] Multisampling16X, #endif @@ -361,11 +363,17 @@ public enum SCNRenderingApi : ulong { [NoMac] OpenGLES2, #else - [NoiOS][NoTV][NoMacCatalyst] + [NoiOS] + [NoTV] + [NoMacCatalyst] OpenGLLegacy, - [NoiOS][NoTV][NoMacCatalyst] + [NoiOS] + [NoTV] + [NoMacCatalyst] OpenGLCore32, - [NoiOS][NoTV][NoMacCatalyst] + [NoiOS] + [NoTV] + [NoMacCatalyst] OpenGLCore41, #endif } diff --git a/src/SceneKit/SCNMatrix4_dotnet.cs b/src/SceneKit/SCNMatrix4_dotnet.cs index ffb1efc0484d..6f685e707d19 100644 --- a/src/SceneKit/SCNMatrix4_dotnet.cs +++ b/src/SceneKit/SCNMatrix4_dotnet.cs @@ -53,7 +53,7 @@ namespace SceneKit { /// [Serializable] public struct SCNMatrix4 : IEquatable { -#region Fields + #region Fields /* * SCNMatrix4 is defined like this for iOS, tvOS and watchOS: @@ -104,9 +104,9 @@ public struct SCNMatrix4 : IEquatable { /// public readonly static SCNMatrix4 Identity = new SCNMatrix4 (SCNVector4.UnitX, SCNVector4.UnitY, SCNVector4.UnitZ, SCNVector4.UnitW); -#endregion + #endregion -#region Constructors + #region Constructors /// /// Constructs a new instance. @@ -162,11 +162,11 @@ public SCNMatrix4 (CoreAnimation.CATransform3D transform) Column3 = new SCNVector4 ((pfloat) transform.M41, (pfloat) transform.M42, (pfloat) transform.M43, (pfloat) transform.M44); } -#endregion + #endregion -#region Public Members + #region Public Members -#region Properties + #region Properties /// /// The determinant of this matrix @@ -315,11 +315,11 @@ public SCNVector4 Row3 { /// public pfloat M44 { get { return Column3.W; } set { Column3.W = value; } } -#endregion + #endregion -#region Instance + #region Instance -#region public void Invert() + #region public void Invert() /// /// Converts this instance into its inverse. @@ -329,9 +329,9 @@ public void Invert () this = SCNMatrix4.Invert (this); } -#endregion + #endregion -#region public void Transpose() + #region public void Transpose() /// /// Converts this instance into its transpose. @@ -341,13 +341,13 @@ public void Transpose () this = SCNMatrix4.Transpose (this); } -#endregion + #endregion -#endregion + #endregion -#region Static + #region Static -#region CreateFromColumns + #region CreateFromColumns public static SCNMatrix4 CreateFromColumns (SCNVector4 column0, SCNVector4 column1, SCNVector4 column2, SCNVector4 column3) { @@ -368,9 +368,9 @@ public static void CreateFromColumns (SCNVector4 column0, SCNVector4 column1, SC result.Column3 = column3; } -#endregion + #endregion -#region CreateFromAxisAngle + #region CreateFromAxisAngle /// /// Build a rotation matrix from the specified axis/angle rotation. @@ -424,9 +424,9 @@ static void CreateFromAxisAngle (float x, float y, float z, float angle, out SCN var m33 = t * z * z + cos; result = new SCNMatrix4 ( - m11, m21, m31, 0.0f, - m12, m22, m32, 0.0f, - m13, m23, m33, 0.0f, + m11, m21, m31, 0.0f, + m12, m22, m32, 0.0f, + m13, m23, m33, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); } @@ -455,9 +455,9 @@ static void CreateFromAxisAngle (double x, double y, double z, double angle, out var m33 = (pfloat) (t * z * z + cos); result = new SCNMatrix4 ( - m11, m21, m31, 0.0f, - m12, m22, m32, 0.0f, - m13, m23, m33, 0.0f, + m11, m21, m31, 0.0f, + m12, m22, m32, 0.0f, + m13, m23, m33, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); } @@ -474,9 +474,9 @@ public static SCNMatrix4 CreateFromAxisAngle (SCNVector3 axis, pfloat angle) return result; } -#endregion + #endregion -#region CreateRotation[XYZ] + #region CreateRotation[XYZ] /// /// Builds a rotation matrix for a rotation around the x-axis. @@ -489,10 +489,10 @@ public static void CreateRotationX (pfloat angle, out SCNMatrix4 result) pfloat sin = (pfloat) System.Math.Sin (angle); result = new SCNMatrix4 ( - 1, 0, 0, 0, - 0, cos, -sin, 0, - 0, sin, cos, 0, - 0, 0, 0, 1); + 1, 0, 0, 0, + 0, cos, -sin, 0, + 0, sin, cos, 0, + 0, 0, 0, 1); } /// @@ -518,10 +518,10 @@ public static void CreateRotationY (pfloat angle, out SCNMatrix4 result) pfloat sin = (pfloat) System.Math.Sin (angle); result = new SCNMatrix4 ( - cos, 0, sin, 0, - 0, 1, 0, 0, - -sin, 0, cos, 0, - 0, 0, 0, 1); + cos, 0, sin, 0, + 0, 1, 0, 0, + -sin, 0, cos, 0, + 0, 0, 0, 1); } /// @@ -547,10 +547,10 @@ public static void CreateRotationZ (pfloat angle, out SCNMatrix4 result) pfloat sin = (pfloat) System.Math.Sin (angle); result = new SCNMatrix4 ( - cos, -sin, 0, 0, - sin, cos, 0, 0, - 0, 0, 1, 0, - 0, 0, 0, 1); + cos, -sin, 0, 0, + sin, cos, 0, 0, + 0, 0, 1, 0, + 0, 0, 0, 1); } /// @@ -565,9 +565,9 @@ public static SCNMatrix4 CreateRotationZ (pfloat angle) return result; } -#endregion + #endregion -#region CreateTranslation + #region CreateTranslation /// /// Creates a translation matrix. @@ -621,9 +621,9 @@ public static SCNMatrix4 CreateTranslation (SCNVector3 vector) return result; } -#endregion + #endregion -#region CreateOrthographic + #region CreateOrthographic /// /// Creates an orthographic projection matrix. @@ -653,9 +653,9 @@ public static SCNMatrix4 CreateOrthographic (pfloat width, pfloat height, pfloat return result; } -#endregion + #endregion -#region CreateOrthographicOffCenter + #region CreateOrthographicOffCenter /// /// Creates an orthographic projection matrix. @@ -702,9 +702,9 @@ public static SCNMatrix4 CreateOrthographicOffCenter (pfloat left, pfloat right, return result; } -#endregion + #endregion -#region CreatePerspectiveFieldOfView + #region CreatePerspectiveFieldOfView /// /// Creates a perspective projection matrix. @@ -770,9 +770,9 @@ public static SCNMatrix4 CreatePerspectiveFieldOfView (pfloat fovy, pfloat aspec return result; } -#endregion + #endregion -#region CreatePerspectiveOffCenter + #region CreatePerspectiveOffCenter /// /// Creates a perspective projection matrix. @@ -809,10 +809,10 @@ public static void CreatePerspectiveOffCenter (pfloat left, pfloat right, pfloat pfloat d = -(2.0f * zFar * zNear) / (zFar - zNear); result = new SCNMatrix4 ( - x, 0, a, 0, - 0, y, b, 0, - 0, 0, c, d, - 0, 0, -1, 0); + x, 0, a, 0, + 0, y, b, 0, + 0, 0, c, d, + 0, 0, -1, 0); } /// @@ -840,9 +840,9 @@ public static SCNMatrix4 CreatePerspectiveOffCenter (pfloat left, pfloat right, return result; } -#endregion + #endregion -#region Scale Functions + #region Scale Functions /// /// Build a scaling matrix @@ -880,9 +880,9 @@ public static SCNMatrix4 Scale (pfloat x, pfloat y, pfloat z) 0, 0, 0, 1); } -#endregion + #endregion -#region Rotation Functions + #region Rotation Functions /// /// Build a rotation matrix from a quaternion @@ -913,9 +913,9 @@ public static SCNMatrix4 Rotate (Quaterniond q) CreateFromAxisAngle (axis, angle, out result); return result; } -#endregion + #endregion -#region Camera Helper Functions + #region Camera Helper Functions /// /// Build a world space to camera space matrix @@ -931,9 +931,9 @@ public static SCNMatrix4 LookAt (SCNVector3 eye, SCNVector3 target, SCNVector3 u SCNVector3 y = SCNVector3.Normalize (SCNVector3.Cross (z, x)); SCNMatrix4 rot = new SCNMatrix4 ( - x.X, x.Y, x.Z, 0.0f, - y.X, y.Y, y.Z, 0.0f, - z.X, z.Y, z.Z, 0.0f, + x.X, x.Y, x.Z, 0.0f, + y.X, y.Y, y.Z, 0.0f, + z.X, z.Y, z.Z, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f); SCNMatrix4 trans = SCNMatrix4.CreateTranslation (-eye); @@ -959,9 +959,9 @@ public static SCNMatrix4 LookAt (pfloat eyeX, pfloat eyeY, pfloat eyeZ, pfloat t return LookAt (new SCNVector3 (eyeX, eyeY, eyeZ), new SCNVector3 (targetX, targetY, targetZ), new SCNVector3 (upX, upY, upZ)); } -#endregion + #endregion -#region Multiply Functions + #region Multiply Functions #if XAMCORE_5_0 /// @@ -987,7 +987,7 @@ public static SCNMatrix4 LookAt (pfloat eyeX, pfloat eyeY, pfloat eyeZ, pfloat t #if XAMCORE_5_0 public static SCNMatrix4 Mult (SCNMatrix4 firstTransformation, SCNMatrix4 secondTransformation) #else - public static SCNMatrix4 Mult(SCNMatrix4 left, SCNMatrix4 right) + public static SCNMatrix4 Mult (SCNMatrix4 left, SCNMatrix4 right) #endif { SCNMatrix4 result; @@ -1024,7 +1024,7 @@ public static SCNMatrix4 Mult(SCNMatrix4 left, SCNMatrix4 right) #if XAMCORE_5_0 public static void Mult (ref SCNMatrix4 firstTransformation, ref SCNMatrix4 secondTransformation, out SCNMatrix4 result) #else - public static void Mult(ref SCNMatrix4 left, ref SCNMatrix4 right, out SCNMatrix4 result) + public static void Mult (ref SCNMatrix4 left, ref SCNMatrix4 right, out SCNMatrix4 result) #endif { // the matrices are reversed: https://github.com/xamarin/xamarin-macios/issues/15094#issuecomment-1139699662 @@ -1038,7 +1038,7 @@ public static void Mult(ref SCNMatrix4 left, ref SCNMatrix4 right, out SCNMatrix // Multiply two matrices in the order you'd expect (left * right). static void MatrixMultiply (ref SCNMatrix4 left, ref SCNMatrix4 right, out SCNMatrix4 result) { - result = new SCNMatrix4( + result = new SCNMatrix4 ( left.Column0.X * right.Column0.X + left.Column1.X * right.Column0.Y + left.Column2.X * right.Column0.Z + left.Column3.X * right.Column0.W, left.Column0.X * right.Column1.X + left.Column1.X * right.Column1.Y + left.Column2.X * right.Column1.Z + left.Column3.X * right.Column1.W, left.Column0.X * right.Column2.X + left.Column1.X * right.Column2.Y + left.Column2.X * right.Column2.Z + left.Column3.X * right.Column2.W, @@ -1060,9 +1060,9 @@ static void MatrixMultiply (ref SCNMatrix4 left, ref SCNMatrix4 right, out SCNMa left.Column0.W * right.Column3.X + left.Column1.W * right.Column3.Y + left.Column2.W * right.Column3.Z + left.Column3.W * right.Column3.W); } -#endregion + #endregion -#region Invert Functions + #region Invert Functions static bool InvertSoftware (SCNMatrix4 matrix, out SCNMatrix4 result) { @@ -1094,9 +1094,9 @@ static bool InvertSoftware (SCNMatrix4 matrix, out SCNMatrix4 result) #endif { result = new SCNMatrix4 (pfloat.NaN, pfloat.NaN, pfloat.NaN, pfloat.NaN, - pfloat.NaN, pfloat.NaN, pfloat.NaN, pfloat.NaN, - pfloat.NaN, pfloat.NaN, pfloat.NaN, pfloat.NaN, - pfloat.NaN, pfloat.NaN, pfloat.NaN, pfloat.NaN); + pfloat.NaN, pfloat.NaN, pfloat.NaN, pfloat.NaN, + pfloat.NaN, pfloat.NaN, pfloat.NaN, pfloat.NaN, + pfloat.NaN, pfloat.NaN, pfloat.NaN, pfloat.NaN); return false; } @@ -1154,9 +1154,9 @@ public static SCNMatrix4 Invert (SCNMatrix4 matrix) return inverse; } -#endregion + #endregion -#region Transpose + #region Transpose /// /// Calculate the transpose of the given matrix @@ -1179,11 +1179,11 @@ public static void Transpose (ref SCNMatrix4 mat, out SCNMatrix4 result) result = new SCNMatrix4 (mat.Column0, mat.Column1, mat.Column2, mat.Column3); } -#endregion + #endregion -#endregion + #endregion -#region Operators + #region Operators /// /// Matrix multiplication @@ -1218,11 +1218,11 @@ public static void Transpose (ref SCNMatrix4 mat, out SCNMatrix4 result) return !left.Equals (right); } -#endregion + #endregion -#region Overrides + #region Overrides -#region public override string ToString() + #region public override string ToString() /// /// Returns a System.String that represents the current SCNMatrix4. @@ -1233,9 +1233,9 @@ public override string ToString () return String.Format ("{0}\n{1}\n{2}\n{3}", Row0, Row1, Row2, Row3); } -#endregion + #endregion -#region public override int GetHashCode() + #region public override int GetHashCode() /// /// Returns the hashcode for this instance. @@ -1243,12 +1243,12 @@ public override string ToString () /// A System.Int32 containing the unique hashcode for this instance. public override int GetHashCode () { - return HashCode.Combine(Column0, Column1, Column2, Column3); + return HashCode.Combine (Column0, Column1, Column2, Column3); } -#endregion + #endregion -#region public override bool Equals(object obj) + #region public override bool Equals(object obj) /// /// Indicates whether this instance and a specified object are equal. @@ -1263,13 +1263,13 @@ public override bool Equals (object? obj) return this.Equals ((SCNMatrix4) obj); } -#endregion + #endregion -#endregion + #endregion -#endregion + #endregion -#region IEquatable Members + #region IEquatable Members /// Indicates whether the current matrix is equal to another matrix. /// An matrix to compare with this matrix. @@ -1283,17 +1283,17 @@ public bool Equals (SCNMatrix4 other) Column3 == other.Column3; } -#endregion + #endregion static void ToAxisAngle (Quaternion q, out Vector3 axis, out float angle) { if (q.W > 1.0f) - q = Quaternion.Normalize (q); + q = Quaternion.Normalize (q); angle = 2.0f * (float) System.Math.Acos (q.W); // angle var den = (float) System.Math.Sqrt (1.0 - q.W * q.W); if (den > 0.0001f) { - axis = new Vector3(q.X, q.Y, q.Z) / den; + axis = new Vector3 (q.X, q.Y, q.Z) / den; } else { // This occurs when the angle is zero. // Not a problem: just set an arbitrary normalized axis. diff --git a/src/SceneKit/SCNQuaternion.cs b/src/SceneKit/SCNQuaternion.cs index 24c45a7529e1..a71754c5f07c 100644 --- a/src/SceneKit/SCNQuaternion.cs +++ b/src/SceneKit/SCNQuaternion.cs @@ -60,10 +60,10 @@ namespace SceneKit { /// Represents a Quaternion. /// #if NET - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("ios")] + [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("tvos")] #endif [Serializable] [StructLayout (LayoutKind.Sequential)] @@ -102,7 +102,7 @@ public SCNQuaternion (pfloat x, pfloat y, pfloat z, pfloat w) public SCNQuaternion (ref Matrix3 matrix) { #if NET - double scale = System.Math.Pow (matrix.GetDeterminant (), 1.0d / 3.0d); + double scale = System.Math.Pow (matrix.GetDeterminant (), 1.0d / 3.0d); #else double scale = System.Math.Pow (matrix.Determinant, 1.0d / 3.0d); #endif @@ -121,10 +121,10 @@ public SCNQuaternion (ref Matrix3 matrix) } #if NET - public SCNQuaternion (Quaternion quaternion) - : this (quaternion.X, quaternion.Y, quaternion.Z, quaternion.W) - { - } + public SCNQuaternion (Quaternion quaternion) + : this (quaternion.X, quaternion.Y, quaternion.Z, quaternion.W) + { + } #else public SCNQuaternion (Quaternion openTkQuaternion) : this (new SCNVector3 (openTkQuaternion.XYZ), openTkQuaternion.W) { diff --git a/src/SceneKit/SCNVector3.cs b/src/SceneKit/SCNVector3.cs index 19c4abf1c243..5242ae663659 100644 --- a/src/SceneKit/SCNVector3.cs +++ b/src/SceneKit/SCNVector3.cs @@ -61,10 +61,10 @@ namespace SceneKit { /// The Vector3 structure is suitable for interoperation with unmanaged code requiring three consecutive floats. /// #if NET - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("ios")] + [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("tvos")] #endif [Serializable] [StructLayout (LayoutKind.Sequential)] @@ -771,17 +771,17 @@ public static SCNVector3 TransformVector (SCNVector3 vec, SCNMatrix4 mat) public static void TransformVector (ref SCNVector3 vec, ref SCNMatrix4 mat, out SCNVector3 result) { #if NET - result.X = vec.X * mat.Row0.X + - vec.Y * mat.Row0.Y + - vec.Z * mat.Row0.Z; + result.X = vec.X * mat.Row0.X + + vec.Y * mat.Row0.Y + + vec.Z * mat.Row0.Z; - result.Y = vec.X * mat.Row1.X + - vec.Y * mat.Row1.Y + - vec.Z * mat.Row1.Z; + result.Y = vec.X * mat.Row1.X + + vec.Y * mat.Row1.Y + + vec.Z * mat.Row1.Z; - result.Z = vec.X * mat.Row2.X + - vec.Y * mat.Row2.Y + - vec.Z * mat.Row2.Z; + result.Z = vec.X * mat.Row2.X + + vec.Y * mat.Row2.Y + + vec.Z * mat.Row2.Z; #else result.X = vec.X * mat.Row0.X + vec.Y * mat.Row1.X + @@ -803,7 +803,7 @@ public static void TransformVector (ref SCNVector3 vec, ref SCNMatrix4 mat, out /// This calculates the inverse of the given matrix, use TransformNormalInverse if you /// already have the inverse to avoid this extra calculation /// - /// The column-based normal to transform + /// The column-based normal to transform /// The desired transformation /// The transformed normal #else @@ -828,7 +828,7 @@ public static SCNVector3 TransformNormal (SCNVector3 norm, SCNMatrix4 mat) /// This calculates the inverse of the given matrix, use TransformNormalInverse if you /// already have the inverse to avoid this extra calculation /// - /// The column-based normal to transform + /// The column-based normal to transform /// The desired transformation /// The transformed normal #else @@ -853,7 +853,7 @@ public static void TransformNormal (ref SCNVector3 norm, ref SCNMatrix4 mat, out /// This version doesn't calculate the inverse matrix. /// Use this version if you already have the inverse of the desired transform to hand /// - /// The column-based normal to transform + /// The column-based normal to transform /// The inverse of the desired transformation /// The transformed normal #else @@ -878,7 +878,7 @@ public static SCNVector3 TransformNormalInverse (SCNVector3 norm, SCNMatrix4 inv /// This version doesn't calculate the inverse matrix. /// Use this version if you already have the inverse of the desired transform to hand /// - /// The column-based normal to transform + /// The column-based normal to transform /// The inverse of the desired transformation /// The transformed normal #else @@ -894,17 +894,17 @@ public static SCNVector3 TransformNormalInverse (SCNVector3 norm, SCNMatrix4 inv public static void TransformNormalInverse (ref SCNVector3 norm, ref SCNMatrix4 invMat, out SCNVector3 result) { #if NET - result.X = norm.X * invMat.Column0.X + - norm.Y * invMat.Column0.Y + - norm.Z * invMat.Column0.Z; + result.X = norm.X * invMat.Column0.X + + norm.Y * invMat.Column0.Y + + norm.Z * invMat.Column0.Z; - result.Y = norm.X * invMat.Column1.X + - norm.Y * invMat.Column1.Y + - norm.Z * invMat.Column1.Z; + result.Y = norm.X * invMat.Column1.X + + norm.Y * invMat.Column1.Y + + norm.Z * invMat.Column1.Z; - result.Z = norm.X * invMat.Column2.X + - norm.Y * invMat.Column2.Y + - norm.Z * invMat.Column2.Z; + result.Z = norm.X * invMat.Column2.X + + norm.Y * invMat.Column2.Y + + norm.Z * invMat.Column2.Z; #else result.X = norm.X * invMat.Row0.X + norm.Y * invMat.Row0.Y + @@ -922,7 +922,7 @@ public static void TransformNormalInverse (ref SCNVector3 norm, ref SCNMatrix4 i #if NET /// Transform a Position by the given Matrix - /// The column-based position to transform + /// The column-based position to transform /// The desired transformation /// The transformed position #else @@ -939,7 +939,7 @@ public static SCNVector3 TransformPosition (SCNVector3 pos, SCNMatrix4 mat) #if NET /// Transform a Position by the given Matrix - /// The column-based position to transform + /// The column-based position to transform /// The desired transformation /// The transformed position #else @@ -951,20 +951,20 @@ public static SCNVector3 TransformPosition (SCNVector3 pos, SCNMatrix4 mat) public static void TransformPosition (ref SCNVector3 pos, ref SCNMatrix4 mat, out SCNVector3 result) { #if NET - result.X = mat.Row0.X * pos.X + - mat.Row0.Y * pos.Y + - mat.Row0.Z * pos.Z + - mat.Row0.W; - - result.Y = mat.Row1.X * pos.X + - mat.Row1.Y * pos.Y + - mat.Row1.Z * pos.Z + - mat.Row1.W; - - result.Z = mat.Row2.X * pos.X + - mat.Row2.Y * pos.Y + - mat.Row2.Z * pos.Z + - mat.Row2.W; + result.X = mat.Row0.X * pos.X + + mat.Row0.Y * pos.Y + + mat.Row0.Z * pos.Z + + mat.Row0.W; + + result.Y = mat.Row1.X * pos.X + + mat.Row1.Y * pos.Y + + mat.Row1.Z * pos.Z + + mat.Row1.W; + + result.Z = mat.Row2.X * pos.X + + mat.Row2.Y * pos.Y + + mat.Row2.Z * pos.Z + + mat.Row2.W; #else result.X = pos.X * mat.Row0.X + pos.Y * mat.Row1.X + @@ -985,7 +985,7 @@ public static void TransformPosition (ref SCNVector3 pos, ref SCNMatrix4 mat, ou #if NET /// Transform a Vector by the given Matrix - /// The column vector to transform + /// The column vector to transform /// The desired transformation /// The transformed vector #else @@ -1002,7 +1002,7 @@ public static SCNVector4 Transform (SCNVector3 vec, SCNMatrix4 mat) #if NET /// Transform a Vector by the given Matrix - /// The column vector to transform + /// The column vector to transform /// The desired transformation /// The transformed vector #else diff --git a/src/SceneKit/SCNVector4.cs b/src/SceneKit/SCNVector4.cs index e28a85ffbe38..5e95a1576bd9 100644 --- a/src/SceneKit/SCNVector4.cs +++ b/src/SceneKit/SCNVector4.cs @@ -60,10 +60,10 @@ namespace SceneKit { /// The Vector4 structure is suitable for interoperation with unmanaged code requiring four consecutive floats. /// #if NET - [SupportedOSPlatform ("ios")] - [SupportedOSPlatform ("maccatalyst")] - [SupportedOSPlatform ("macos")] - [SupportedOSPlatform ("tvos")] + [SupportedOSPlatform ("ios")] + [SupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("macos")] + [SupportedOSPlatform ("tvos")] #endif [Serializable] [StructLayout (LayoutKind.Sequential)] @@ -836,7 +836,7 @@ public static void BaryCentric (ref SCNVector4 a, ref SCNVector4 b, ref SCNVecto #if NET /// Transform a Vector by the given Matrix - /// The column vector to transform + /// The column vector to transform /// The desired transformation /// The transformed vector #else @@ -853,7 +853,7 @@ public static SCNVector4 Transform (SCNVector4 vec, SCNMatrix4 mat) #if NET /// Transform a Vector by the given Matrix. - /// The column vector to transform + /// The column vector to transform /// The desired transformation /// The transformed vector #else @@ -865,25 +865,25 @@ public static SCNVector4 Transform (SCNVector4 vec, SCNMatrix4 mat) public static void Transform (ref SCNVector4 vec, ref SCNMatrix4 mat, out SCNVector4 result) { #if NET - result.X = vec.X * mat.Column0.X + - vec.Y * mat.Column1.X + - vec.Z * mat.Column2.X + - vec.W * mat.Column3.X; - - result.Y = vec.X * mat.Column0.Y + - vec.Y * mat.Column1.Y + - vec.Z * mat.Column2.Y + - vec.W * mat.Column3.Y; - - result.Z = vec.X * mat.Column0.Z + - vec.Y * mat.Column1.Z + - vec.Z * mat.Column2.Z + - vec.W * mat.Column3.Z; - - result.W = vec.X * mat.Column0.W + - vec.Y * mat.Column1.W + - vec.Z * mat.Column2.W + - vec.W * mat.Column3.W; + result.X = vec.X * mat.Column0.X + + vec.Y * mat.Column1.X + + vec.Z * mat.Column2.X + + vec.W * mat.Column3.X; + + result.Y = vec.X * mat.Column0.Y + + vec.Y * mat.Column1.Y + + vec.Z * mat.Column2.Y + + vec.W * mat.Column3.Y; + + result.Z = vec.X * mat.Column0.Z + + vec.Y * mat.Column1.Z + + vec.Z * mat.Column2.Z + + vec.W * mat.Column3.Z; + + result.W = vec.X * mat.Column0.W + + vec.Y * mat.Column1.W + + vec.Z * mat.Column2.W + + vec.W * mat.Column3.W; #else result.X = vec.X * mat.Row0.X + vec.Y * mat.Row1.X + diff --git a/src/Security/Authorization.cs b/src/Security/Authorization.cs index 3b62567fedb2..da53d2a4d823 100644 --- a/src/Security/Authorization.cs +++ b/src/Security/Authorization.cs @@ -48,21 +48,21 @@ namespace Security { #endif // Untyped enum in ObjC public enum AuthorizationStatus { - Success = 0, - InvalidSet = -60001, - InvalidRef = -60002, - InvalidTag = -60003, - InvalidPointer = -60004, - Denied = -60005, - Canceled = -60006, - InteractionNotAllowed = -60007, - Internal = -60008, - ExternalizeNotAllowed = -60009, - InternalizeNotAllowed = -60010, - InvalidFlags = -60011, - ToolExecuteFailure = -60031, - ToolEnvironmentError = -60032, - BadAddress = -60033, + Success = 0, + InvalidSet = -60001, + InvalidRef = -60002, + InvalidTag = -60003, + InvalidPointer = -60004, + Denied = -60005, + Canceled = -60006, + InteractionNotAllowed = -60007, + Internal = -60008, + ExternalizeNotAllowed = -60009, + InternalizeNotAllowed = -60010, + InvalidFlags = -60011, + ToolExecuteFailure = -60031, + ToolEnvironmentError = -60032, + BadAddress = -60033, } #if NET @@ -115,7 +115,7 @@ public class AuthorizationParameters { public class AuthorizationEnvironment { public string? Username; public string? Password; - public bool AddToSharedCredentialPool; + public bool AddToSharedCredentialPool; } #if NET @@ -140,7 +140,7 @@ struct AuthorizationItem { #endif unsafe struct AuthorizationItemSet { public int /* UInt32 */ count; - public AuthorizationItem * /* AuthorizationItem* */ ptrToAuthorization; + public AuthorizationItem* /* AuthorizationItem* */ ptrToAuthorization; } #if NET @@ -151,7 +151,7 @@ unsafe struct AuthorizationItemSet { #endif public unsafe class Authorization : DisposableObject { [DllImport (Constants.SecurityLibrary)] - unsafe extern static int /* OSStatus = int */ AuthorizationCreate (AuthorizationItemSet *rights, AuthorizationItemSet *environment, AuthorizationFlags flags, IntPtr* auth); + unsafe extern static int /* OSStatus = int */ AuthorizationCreate (AuthorizationItemSet* rights, AuthorizationItemSet* environment, AuthorizationFlags flags, IntPtr* auth); #if NET [SupportedOSPlatform ("maccatalyst")] @@ -170,7 +170,7 @@ public unsafe class Authorization : DisposableObject { [DllImport (Constants.SecurityLibrary)] extern static int /* OSStatus = int */ AuthorizationFree (IntPtr handle, AuthorizationFlags flags); - + [Preserve (Conditional = true)] internal Authorization (NativeHandle handle, bool owns) : base (handle, owns) @@ -186,7 +186,7 @@ internal Authorization (NativeHandle handle, bool owns) #endif public int ExecuteWithPrivileges (string pathToTool, AuthorizationFlags flags, string []? args) { - string?[]? arguments = args!; + string? []? arguments = args!; if (arguments is not null) { // The arguments array must be null-terminated, so make sure that's the case @@ -213,19 +213,19 @@ protected override void Dispose (bool disposing) { Dispose (0, disposing); } - + public virtual void Dispose (AuthorizationFlags flags, bool disposing) { if (Handle != IntPtr.Zero && Owns) AuthorizationFree (Handle, flags); base.Dispose (disposing); } - + public static Authorization? Create (AuthorizationFlags flags) { return Create (null, null, flags); } - + static void EncodeString (ref AuthorizationItem item, string key, string? value) { item.name = Marshal.StringToHGlobalAuto (key); @@ -234,32 +234,32 @@ static void EncodeString (ref AuthorizationItem item, string key, string? value) item.valueLen = value.Length; } } - + public static Authorization? Create (AuthorizationParameters? parameters, AuthorizationEnvironment? environment, AuthorizationFlags flags) { AuthorizationItemSet pars = new AuthorizationItemSet (); - AuthorizationItemSet *ppars = null; - AuthorizationItem *pitems = null; + AuthorizationItemSet* ppars = null; + AuthorizationItem* pitems = null; AuthorizationItemSet env = new AuthorizationItemSet (); - AuthorizationItemSet *penv = null; - AuthorizationItem *eitems = null; + AuthorizationItemSet* penv = null; + AuthorizationItem* eitems = null; int code; IntPtr auth; try { unsafe { - if (parameters is not null){ + if (parameters is not null) { ppars = &pars; - pars.ptrToAuthorization = (AuthorizationItem *) Marshal.AllocHGlobal (sizeof (AuthorizationItem) * 2); + pars.ptrToAuthorization = (AuthorizationItem*) Marshal.AllocHGlobal (sizeof (AuthorizationItem) * 2); if (parameters.PathToSystemPrivilegeTool is not null) EncodeString (ref pars.ptrToAuthorization [pars.count++], "system.privilege.admin", parameters.PathToSystemPrivilegeTool); if (parameters.IconPath is not null) EncodeString (ref pars.ptrToAuthorization [pars.count++], "icon", parameters.IconPath); } - if (environment is not null || (parameters is not null && parameters.Prompt is not null)){ + if (environment is not null || (parameters is not null && parameters.Prompt is not null)) { penv = &env; - env.ptrToAuthorization = (AuthorizationItem *) Marshal.AllocHGlobal (sizeof (AuthorizationItem) * 4); - if (environment is not null){ + env.ptrToAuthorization = (AuthorizationItem*) Marshal.AllocHGlobal (sizeof (AuthorizationItem) * 4); + if (environment is not null) { if (environment.Username is not null) EncodeString (ref env.ptrToAuthorization [env.count++], "username", environment.Username); if (environment.Password is not null) @@ -267,7 +267,7 @@ static void EncodeString (ref AuthorizationItem item, string key, string? value) if (environment.AddToSharedCredentialPool) EncodeString (ref env.ptrToAuthorization [env.count++], "shared", null); } - if (parameters is not null){ + if (parameters is not null) { if (parameters.Prompt is not null) EncodeString (ref env.ptrToAuthorization [env.count++], "prompt", parameters.Prompt); } @@ -278,20 +278,20 @@ static void EncodeString (ref AuthorizationItem item, string key, string? value) return new Authorization (auth, true); } } finally { - if (ppars is not null){ - for (int i = 0; i < pars.count; i++){ + if (ppars is not null) { + for (int i = 0; i < pars.count; i++) { Marshal.FreeHGlobal (pars.ptrToAuthorization [i].name); Marshal.FreeHGlobal (pars.ptrToAuthorization [i].value); } - Marshal.FreeHGlobal ((IntPtr)pars.ptrToAuthorization); + Marshal.FreeHGlobal ((IntPtr) pars.ptrToAuthorization); } - if (penv is not null){ - for (int i = 0; i < env.count; i++){ + if (penv is not null) { + for (int i = 0; i < env.count; i++) { Marshal.FreeHGlobal (env.ptrToAuthorization [i].name); if (env.ptrToAuthorization [i].value != IntPtr.Zero) Marshal.FreeHGlobal (env.ptrToAuthorization [i].value); } - Marshal.FreeHGlobal ((IntPtr)env.ptrToAuthorization); + Marshal.FreeHGlobal ((IntPtr) env.ptrToAuthorization); } } } diff --git a/src/Security/Enums.cs b/src/Security/Enums.cs index e8266599bef3..5db43f766fcd 100644 --- a/src/Security/Enums.cs +++ b/src/Security/Enums.cs @@ -316,7 +316,7 @@ public enum SecStatusCode { InvalidCRLAuthority = -67827, /* The CRL authority was not valid. */ #if MONOMAC [Obsolete ("Use InvalidCRLAuthority.")] - InvaldCRLAuthority = InvalidCRLAuthority, + InvaldCRLAuthority = InvalidCRLAuthority, #endif InvalidCRLEncoding = -67828, /* The CRL encoding was not valid. */ InvalidCRLType = -67829, /* The CRL type was not valid. */ @@ -345,7 +345,7 @@ public enum SecStatusCode { InvalidTupleCredentials = -67852, /* The tuple credentials are not valid. */ #if MONOMAC [Obsolete ("Use InvalidTupleCredentials.")] - InvalidTupleCredendtials = InvalidTupleCredentials, + InvalidTupleCredendtials = InvalidTupleCredentials, #endif InvalidEncoding = -67853, /* The encoding was not valid. */ InvalidValidityPeriod = -67854, /* The validity period was not valid. */ diff --git a/src/Security/Items.cs b/src/Security/Items.cs index 6f49c0e74dfb..5c7fb45b6de7 100644 --- a/src/Security/Items.cs +++ b/src/Security/Items.cs @@ -338,11 +338,11 @@ public static SecStatusCode Update (SecRecord query, SecRecord newAttributes) extern static SecStatusCode SecKeychainAddGenericPassword ( IntPtr keychain, int serviceNameLength, - byte[]? serviceName, + byte []? serviceName, int accountNameLength, - byte[]? accountName, + byte []? accountName, int passwordLength, - byte[] passwordData, + byte [] passwordData, IntPtr itemRef); #if NET @@ -370,18 +370,18 @@ unsafe extern static SecStatusCode SecKeychainFindGenericPassword ( extern static SecStatusCode SecKeychainAddInternetPassword ( IntPtr keychain, int serverNameLength, - byte[]? serverName, + byte []? serverName, int securityDomainLength, - byte[]? securityDomain, + byte []? securityDomain, int accountNameLength, - byte[]? accountName, + byte []? accountName, int pathLength, - byte[]? path, + byte []? path, short port, IntPtr protocol, IntPtr authenticationType, int passwordLength, - byte[] passwordData, + byte [] passwordData, IntPtr itemRef); #if NET @@ -418,30 +418,30 @@ unsafe extern static SecStatusCode SecKeychainFindInternetPassword ( public static SecStatusCode AddInternetPassword ( string serverName, string accountName, - byte[] password, + byte [] password, SecProtocol protocolType = SecProtocol.Http, short port = 0, string? path = null, SecAuthenticationType authenticationType = SecAuthenticationType.Default, string? securityDomain = null) { - byte[]? serverNameBytes = null; - byte[]? securityDomainBytes = null; - byte[]? accountNameBytes = null; - byte[]? pathBytes = null; - + byte []? serverNameBytes = null; + byte []? securityDomainBytes = null; + byte []? accountNameBytes = null; + byte []? pathBytes = null; + if (!String.IsNullOrEmpty (serverName)) serverNameBytes = System.Text.Encoding.UTF8.GetBytes (serverName); - + if (!String.IsNullOrEmpty (securityDomain)) securityDomainBytes = System.Text.Encoding.UTF8.GetBytes (securityDomain); - + if (!String.IsNullOrEmpty (accountName)) accountNameBytes = System.Text.Encoding.UTF8.GetBytes (accountName); - + if (!String.IsNullOrEmpty (path)) pathBytes = System.Text.Encoding.UTF8.GetBytes (path); - + return SecKeychainAddInternetPassword ( IntPtr.Zero, serverNameBytes?.Length ?? 0, @@ -459,12 +459,12 @@ public static SecStatusCode AddInternetPassword ( password!, IntPtr.Zero); } - - - public static SecStatusCode FindInternetPassword( + + + public static SecStatusCode FindInternetPassword ( string serverName, string accountName, - out byte[]? password, + out byte []? password, SecProtocol protocolType = SecProtocol.Http, short port = 0, string? path = null, @@ -472,36 +472,36 @@ public static SecStatusCode FindInternetPassword( string? securityDomain = null) { password = null; - - byte[]? serverBytes = null; - byte[]? securityDomainBytes = null; - byte[]? accountNameBytes = null; - byte[]? pathBytes = null; + + byte []? serverBytes = null; + byte []? securityDomainBytes = null; + byte []? accountNameBytes = null; + byte []? pathBytes = null; IntPtr passwordPtr = IntPtr.Zero; - + try { if (!String.IsNullOrEmpty (serverName)) serverBytes = System.Text.Encoding.UTF8.GetBytes (serverName); - + if (!String.IsNullOrEmpty (securityDomain)) securityDomainBytes = System.Text.Encoding.UTF8.GetBytes (securityDomain); - + if (!String.IsNullOrEmpty (accountName)) accountNameBytes = System.Text.Encoding.UTF8.GetBytes (accountName); - - if (!String.IsNullOrEmpty(path)) + + if (!String.IsNullOrEmpty (path)) pathBytes = System.Text.Encoding.UTF8.GetBytes (path); - + int passwordLength = 0; - + SecStatusCode code; unsafe { fixed (byte* serverBytesPtr = serverBytes) { fixed (byte* securityDomainBytesPtr = securityDomainBytes) { fixed (byte* accountNameBytesPtr = accountNameBytes) { fixed (byte* pathBytesPtr = pathBytes) { - code = SecKeychainFindInternetPassword( + code = SecKeychainFindInternetPassword ( IntPtr.Zero, serverBytes?.Length ?? 0, serverBytesPtr, @@ -512,8 +512,8 @@ public static SecStatusCode FindInternetPassword( pathBytes?.Length ?? 0, pathBytesPtr, port, - SecProtocolKeys.FromSecProtocol(protocolType), - KeysAuthenticationType.FromSecAuthenticationType(authenticationType), + SecProtocolKeys.FromSecProtocol (protocolType), + KeysAuthenticationType.FromSecAuthenticationType (authenticationType), &passwordLength, &passwordPtr, IntPtr.Zero); @@ -522,32 +522,32 @@ public static SecStatusCode FindInternetPassword( } } } - + if (code == SecStatusCode.Success && passwordLength > 0) { - password = new byte[passwordLength]; - Marshal.Copy(passwordPtr, password, 0, passwordLength); + password = new byte [passwordLength]; + Marshal.Copy (passwordPtr, password, 0, passwordLength); } - + return code; - + } finally { if (passwordPtr != IntPtr.Zero) - SecKeychainItemFreeContent(IntPtr.Zero, passwordPtr); + SecKeychainItemFreeContent (IntPtr.Zero, passwordPtr); } } - public static SecStatusCode AddGenericPassword (string serviceName, string accountName, byte[] password) + public static SecStatusCode AddGenericPassword (string serviceName, string accountName, byte [] password) { - byte[]? serviceNameBytes = null; - byte[]? accountNameBytes = null; - + byte []? serviceNameBytes = null; + byte []? accountNameBytes = null; + if (!String.IsNullOrEmpty (serviceName)) serviceNameBytes = System.Text.Encoding.UTF8.GetBytes (serviceName); if (!String.IsNullOrEmpty (accountName)) accountNameBytes = System.Text.Encoding.UTF8.GetBytes (accountName); - return SecKeychainAddGenericPassword( + return SecKeychainAddGenericPassword ( IntPtr.Zero, serviceNameBytes?.Length ?? 0, serviceNameBytes, @@ -559,30 +559,30 @@ public static SecStatusCode AddGenericPassword (string serviceName, string accou ); } - public static SecStatusCode FindGenericPassword (string serviceName, string accountName, out byte[]? password) + public static SecStatusCode FindGenericPassword (string serviceName, string accountName, out byte []? password) { password = null; - byte[]? serviceNameBytes = null; - byte[]? accountNameBytes = null; - + byte []? serviceNameBytes = null; + byte []? accountNameBytes = null; + IntPtr passwordPtr = IntPtr.Zero; - + try { - + if (!String.IsNullOrEmpty (serviceName)) serviceNameBytes = System.Text.Encoding.UTF8.GetBytes (serviceName); - + if (!String.IsNullOrEmpty (accountName)) accountNameBytes = System.Text.Encoding.UTF8.GetBytes (accountName); - + int passwordLength = 0; - + SecStatusCode code; unsafe { fixed (byte* serviceNameBytesPtr = serviceNameBytes) { fixed (byte* accountNameBytesPtr = accountNameBytes) { - code = SecKeychainFindGenericPassword( + code = SecKeychainFindGenericPassword ( IntPtr.Zero, serviceNameBytes?.Length ?? 0, serviceNameBytesPtr, @@ -595,17 +595,17 @@ public static SecStatusCode FindGenericPassword (string serviceName, string acco } } } - - if (code == SecStatusCode.Success && passwordLength > 0){ - password = new byte[passwordLength]; - Marshal.Copy(passwordPtr, password, 0, passwordLength); + + if (code == SecStatusCode.Success && passwordLength > 0) { + password = new byte [passwordLength]; + Marshal.Copy (passwordPtr, password, 0, passwordLength); } - + return code; - + } finally { if (passwordPtr != IntPtr.Zero) - SecKeychainItemFreeContent(IntPtr.Zero, passwordPtr); + SecKeychainItemFreeContent (IntPtr.Zero, passwordPtr); } } #else diff --git a/src/Security/SecCertificate2.cs b/src/Security/SecCertificate2.cs index 1ca0f1ba97e4..2f48736262d9 100644 --- a/src/Security/SecCertificate2.cs +++ b/src/Security/SecCertificate2.cs @@ -36,7 +36,7 @@ namespace Security { public class SecCertificate2 : NativeObject { [Preserve (Conditional = true)] #if NET - internal SecCertificate2 (NativeHandle handle, bool owns) : base (handle, owns) {} + internal SecCertificate2 (NativeHandle handle, bool owns) : base (handle, owns) { } #else public SecCertificate2 (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Security/SecIdentity2.cs b/src/Security/SecIdentity2.cs index 6db4f0df505b..0bc7f441890c 100644 --- a/src/Security/SecIdentity2.cs +++ b/src/Security/SecIdentity2.cs @@ -36,7 +36,7 @@ namespace Security { public class SecIdentity2 : NativeObject { #if NET [Preserve (Conditional = true)] - internal SecIdentity2 (NativeHandle handle, bool owns) : base (handle, owns) {} + internal SecIdentity2 (NativeHandle handle, bool owns) : base (handle, owns) { } #else internal SecIdentity2 (NativeHandle handle) : base (handle, false) { } [Preserve (Conditional = true)] diff --git a/src/Security/SecSharedCredential.cs b/src/Security/SecSharedCredential.cs index 3749b610945e..149ac4d5d322 100644 --- a/src/Security/SecSharedCredential.cs +++ b/src/Security/SecSharedCredential.cs @@ -17,12 +17,12 @@ public static partial class SecSharedCredential { [DllImport (Constants.SecurityLibrary)] unsafe extern static void SecAddSharedWebCredential (IntPtr /* CFStringRef */ fqdn, IntPtr /* CFStringRef */ account, IntPtr /* CFStringRef */ password, BlockLiteral* /* void (^completionHandler)( CFErrorRef error) ) */ completionHandler); - + #if !NET [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)] internal delegate void DActionArity1V12 (IntPtr block, IntPtr obj); #endif - + // This class bridges native block invocations that call into C# static internal class ActionTrampoline { #if !NET @@ -32,14 +32,15 @@ static internal class ActionTrampoline { #else [UnmanagedCallersOnly] #endif - internal static unsafe void Invoke (IntPtr block, IntPtr obj) { - var descriptor = (BlockLiteral *) block; + internal static unsafe void Invoke (IntPtr block, IntPtr obj) + { + var descriptor = (BlockLiteral*) block; var del = (global::System.Action) (descriptor->Target); if (del is not null) { - del ( Runtime.GetNSObject (obj)); + del (Runtime.GetNSObject (obj)); } - } - } + } + } [BindingImpl (BindingImplOptions.Optimizable)] public static void AddSharedWebCredential (string domainName, string account, string password, Action handler) @@ -78,7 +79,7 @@ public static void AddSharedWebCredential (string domainName, string account, st [Deprecated (PlatformName.MacOSX, 11,0)] #endif [DllImport (Constants.SecurityLibrary)] - unsafe extern static void SecRequestSharedWebCredential ( IntPtr /* CFStringRef */ fqdn, IntPtr /* CFStringRef */ account, + unsafe extern static void SecRequestSharedWebCredential (IntPtr /* CFStringRef */ fqdn, IntPtr /* CFStringRef */ account, BlockLiteral* /* void (^completionHandler)( CFArrayRef credentials, CFErrorRef error) */ completionHandler); #if !NET @@ -98,11 +99,12 @@ static internal class ArrayErrorActionTrampoline { #else [UnmanagedCallersOnly] #endif - internal static unsafe void Invoke (IntPtr block, IntPtr array, IntPtr err) { - var descriptor = (BlockLiteral *) block; + internal static unsafe void Invoke (IntPtr block, IntPtr array, IntPtr err) + { + var descriptor = (BlockLiteral*) block; var del = (global::System.Action) (descriptor->Target); if (del is not null) - del ( Runtime.GetNSObject (array), Runtime.GetNSObject (err)); + del (Runtime.GetNSObject (array), Runtime.GetNSObject (err)); } } @@ -126,7 +128,7 @@ public static void RequestSharedWebCredential (string domainName, string account [Deprecated (PlatformName.MacOSX, 11,0, message: "Use 'ASAuthorizationPasswordRequest' instead.")] #endif [BindingImpl (BindingImplOptions.Optimizable)] - public static void RequestSharedWebCredential (string domainName, string account, Action handler) + public static void RequestSharedWebCredential (string domainName, string account, Action handler) { Action onComplete = (NSArray a, NSError e) => { var creds = new SecSharedCredentialInfo [a.Count]; diff --git a/src/Security/SecTrust2.cs b/src/Security/SecTrust2.cs index fec07746c4eb..50f338b88ab3 100644 --- a/src/Security/SecTrust2.cs +++ b/src/Security/SecTrust2.cs @@ -36,7 +36,7 @@ namespace Security { public class SecTrust2 : NativeObject { [Preserve (Conditional = true)] #if NET - internal SecTrust2 (NativeHandle handle, bool owns) : base (handle, owns) {} + internal SecTrust2 (NativeHandle handle, bool owns) : base (handle, owns) { } #else public SecTrust2 (NativeHandle handle, bool owns) : base (handle, owns) { } #endif diff --git a/src/Simd/MathHelper.cs b/src/Simd/MathHelper.cs index 2f2e0a93470b..5739adfe867a 100644 --- a/src/Simd/MathHelper.cs +++ b/src/Simd/MathHelper.cs @@ -16,8 +16,7 @@ static class MathHelper { /// internal static float InverseSqrtFast (float x) { - unsafe - { + unsafe { float xhalf = 0.5f * x; int i = *(int*) &x; // Read bits as integer. i = 0x5f375a86 - (i >> 1); // Make an initial guess for Newton-Raphson approximation diff --git a/src/Simd/MatrixFloat3x3RM.cs b/src/Simd/MatrixFloat3x3RM.cs index a4cc13c99fe1..66aa43926348 100644 --- a/src/Simd/MatrixFloat3x3RM.cs +++ b/src/Simd/MatrixFloat3x3RM.cs @@ -25,12 +25,10 @@ // This type does not come from the CoreGraphics framework #if NET -namespace CoreGraphics -{ +namespace CoreGraphics { [NativeName ("GLKMatrix3")] [StructLayout (LayoutKind.Sequential)] - public struct RMatrix3 : IEquatable - { + public struct RMatrix3 : IEquatable { public float M11; public float M12; public float M13; @@ -123,7 +121,7 @@ public RMatrix3 ( break; } - throw new IndexOutOfRangeException(); + throw new IndexOutOfRangeException (); } set { switch (row) { @@ -150,7 +148,7 @@ public RMatrix3 ( break; } - throw new IndexOutOfRangeException(); + throw new IndexOutOfRangeException (); } } @@ -292,17 +290,17 @@ public override string ToString () public override int GetHashCode () { - var hash = new HashCode(); - hash.Add(M11); - hash.Add(M12); - hash.Add(M13); - hash.Add(M21); - hash.Add(M22); - hash.Add(M23); - hash.Add(M31); - hash.Add(M32); - hash.Add(M33); - return hash.ToHashCode(); + var hash = new HashCode (); + hash.Add (M11); + hash.Add (M12); + hash.Add (M13); + hash.Add (M21); + hash.Add (M22); + hash.Add (M23); + hash.Add (M31); + hash.Add (M32); + hash.Add (M33); + return hash.ToHashCode (); } public override bool Equals (object? obj) diff --git a/src/Simd/MatrixFloat4x3.cs b/src/Simd/MatrixFloat4x3.cs index cdb52fb94a5a..f06a7c0154ad 100644 --- a/src/Simd/MatrixFloat4x3.cs +++ b/src/Simd/MatrixFloat4x3.cs @@ -16,7 +16,7 @@ using System.Runtime.Versioning; #if NET -using VectorFloat4=global::System.Numerics.Vector4; +using VectorFloat4 = global::System.Numerics.Vector4; #else using VectorFloat4 = global::OpenTK.Vector4; #endif diff --git a/src/Simd/QuaternionDouble.cs b/src/Simd/QuaternionDouble.cs index d5725590a524..a64edbe59ba6 100644 --- a/src/Simd/QuaternionDouble.cs +++ b/src/Simd/QuaternionDouble.cs @@ -20,11 +20,9 @@ // This type does not come from the CoreGraphics framework; it's defined in /usr/include/simd/quaternion.h #if NET -namespace CoreGraphics -{ +namespace CoreGraphics { [StructLayout (LayoutKind.Sequential)] - public struct NQuaterniond : IEquatable - { + public struct NQuaterniond : IEquatable { public double X; public double Y; public double Z; @@ -46,8 +44,7 @@ public NQuaterniond (NVector3d vectorPart, double scalarPart) W = scalarPart; } - internal NVector3d Xyz - { + internal NVector3d Xyz { get => new NVector3d (X, Y, Z); set { X = value.X; @@ -66,7 +63,7 @@ public override string ToString () => $"({X}, {Y}, {Z}, {W})"; public override int GetHashCode () => - HashCode.Combine(X, Y, Z, W); + HashCode.Combine (X, Y, Z, W); public override bool Equals (object? obj) { @@ -100,7 +97,7 @@ internal NVector4d ToAxisAngle () { NQuaterniond q = this; if (q.W > 1.0f) - q.Normalize(); + q.Normalize (); NVector4d result = new NVector4d (); diff --git a/src/Simd/VectorDouble2.cs b/src/Simd/VectorDouble2.cs index 8f2c57e77309..b33768c141ee 100644 --- a/src/Simd/VectorDouble2.cs +++ b/src/Simd/VectorDouble2.cs @@ -16,11 +16,9 @@ // This type does not come from the CoreGraphics framework; it's defined in /usr/include/simd/vector_types.h #if NET -namespace CoreGraphics -{ +namespace CoreGraphics { [StructLayout (LayoutKind.Sequential)] - public struct NVector2d : IEquatable - { + public struct NVector2d : IEquatable { public double X; public double Y; @@ -47,7 +45,7 @@ public override string ToString () public override int GetHashCode () { - return HashCode.Combine(X, Y); + return HashCode.Combine (X, Y); } public override bool Equals (object? obj) diff --git a/src/Simd/VectorDouble4.cs b/src/Simd/VectorDouble4.cs index 2a8459dd8c7a..5aa60c8c370a 100644 --- a/src/Simd/VectorDouble4.cs +++ b/src/Simd/VectorDouble4.cs @@ -16,11 +16,9 @@ // This type does not come from the CoreGraphics framework; it's defined in /usr/include/simd/vector_types.h #if NET -namespace CoreGraphics -{ +namespace CoreGraphics { [StructLayout (LayoutKind.Sequential)] - public struct NVector4d : IEquatable - { + public struct NVector4d : IEquatable { public double X; public double Y; public double Z; @@ -34,8 +32,7 @@ public NVector4d (double x, double y, double z, double w) W = w; } - internal NVector3d Xyz - { + internal NVector3d Xyz { get => new NVector3d (X, Y, Z); set { X = value.X; @@ -61,7 +58,7 @@ public override string ToString () public override int GetHashCode () { - return HashCode.Combine(X, Y, Z, W); + return HashCode.Combine (X, Y, Z, W); } public override bool Equals (object? obj) diff --git a/src/Simd/VectorInt2.cs b/src/Simd/VectorInt2.cs index e1682e07a5d3..5802b10cd0ee 100644 --- a/src/Simd/VectorInt2.cs +++ b/src/Simd/VectorInt2.cs @@ -16,11 +16,9 @@ // This type does not come from the CoreGraphics framework; it's defined in /usr/include/simd/vector_types.h #if NET -namespace CoreGraphics -{ +namespace CoreGraphics { [StructLayout (LayoutKind.Sequential)] - public struct NVector2i : IEquatable - { + public struct NVector2i : IEquatable { public int X; public int Y; @@ -47,7 +45,7 @@ public override string ToString () public override int GetHashCode () { - return HashCode.Combine(X, Y); + return HashCode.Combine (X, Y); } public override bool Equals (object? obj) diff --git a/src/Simd/VectorInt3.cs b/src/Simd/VectorInt3.cs index 40ae57929c98..a1a811c2b0fb 100644 --- a/src/Simd/VectorInt3.cs +++ b/src/Simd/VectorInt3.cs @@ -16,11 +16,9 @@ // This type does not come from the CoreGraphics framework; it's defined in /usr/include/simd/vector_types.h #if NET -namespace CoreGraphics -{ +namespace CoreGraphics { [StructLayout (LayoutKind.Sequential)] - public struct NVector3i : IEquatable - { + public struct NVector3i : IEquatable { public int X; public int Y; public int Z; @@ -51,7 +49,7 @@ public override string ToString () public override int GetHashCode () { - return HashCode.Combine(X, Y, Z); + return HashCode.Combine (X, Y, Z); } public override bool Equals (object? obj) diff --git a/src/Simd/VectorInt4.cs b/src/Simd/VectorInt4.cs index a4ddc37c4397..26336605fb02 100644 --- a/src/Simd/VectorInt4.cs +++ b/src/Simd/VectorInt4.cs @@ -16,11 +16,9 @@ #if NET // This type does not come from the CoreGraphics framework; it's defined in /usr/include/simd/vector_types.h -namespace CoreGraphics -{ +namespace CoreGraphics { [StructLayout (LayoutKind.Sequential)] - public struct NVector4i : IEquatable - { + public struct NVector4i : IEquatable { public int X; public int Y; public int Z; @@ -51,7 +49,7 @@ public override string ToString () public override int GetHashCode () { - return HashCode.Combine(X, Y, Z, W); + return HashCode.Combine (X, Y, Z, W); } public override bool Equals (object? obj) diff --git a/src/StoreKit/SKOverlayAppClipConfiguration.cs b/src/StoreKit/SKOverlayAppClipConfiguration.cs index 4fe5fbdd9871..7f431db6a955 100644 --- a/src/StoreKit/SKOverlayAppClipConfiguration.cs +++ b/src/StoreKit/SKOverlayAppClipConfiguration.cs @@ -10,10 +10,9 @@ namespace StoreKit { #if !COREBUILD - public partial class SKOverlayAppClipConfiguration - { - public NSObject? this[string i] { - get => GetAdditionalValue (i); + public partial class SKOverlayAppClipConfiguration { + public NSObject? this [string i] { + get => GetAdditionalValue (i); set => SetAdditionalValue (value, i); } } diff --git a/src/StoreKit/SKOverlayAppConfiguration.cs b/src/StoreKit/SKOverlayAppConfiguration.cs index 937f5b6b5e87..81d3da2f8c83 100644 --- a/src/StoreKit/SKOverlayAppConfiguration.cs +++ b/src/StoreKit/SKOverlayAppConfiguration.cs @@ -10,10 +10,9 @@ namespace StoreKit { #if !COREBUILD - public partial class SKOverlayAppConfiguration - { - public NSObject? this[string i] { - get => GetAdditionalValue (i); + public partial class SKOverlayAppConfiguration { + public NSObject? this [string i] { + get => GetAdditionalValue (i); set => SetAdditionalValue (value, i); } } diff --git a/src/System.Net.Http/CFNetworkHandler.cs b/src/System.Net.Http/CFNetworkHandler.cs index b94bf44140e2..521c50886157 100644 --- a/src/System.Net.Http/CFNetworkHandler.cs +++ b/src/System.Net.Http/CFNetworkHandler.cs @@ -36,7 +36,7 @@ #if NET using CFNetwork; using CoreFoundation; -using CF=CoreFoundation; +using CF = CoreFoundation; #else using CoreServices; using CoreFoundation; diff --git a/src/UIKit/NSLayoutManager.cs b/src/UIKit/NSLayoutManager.cs index 530730812d64..3c04a9069a0c 100644 --- a/src/UIKit/NSLayoutManager.cs +++ b/src/UIKit/NSLayoutManager.cs @@ -19,7 +19,7 @@ using ObjCRuntime; #if MONOMAC -using UIFont=AppKit.NSFont; +using UIFont = AppKit.NSFont; #endif #if MONOMAC diff --git a/src/UIKit/UIActionSheet.cs b/src/UIKit/UIActionSheet.cs index 285586845534..494a237b948f 100644 --- a/src/UIKit/UIActionSheet.cs +++ b/src/UIKit/UIActionSheet.cs @@ -41,7 +41,7 @@ public UIActionSheet (string title, IUIActionSheetDelegate del, string cancelTit return; } - foreach (string b in other){ + foreach (string b in other) { if (b is not null) AddButton (b); } @@ -49,7 +49,7 @@ public UIActionSheet (string title, IUIActionSheetDelegate del, string cancelTit if (cancelTitle is not null) CancelButtonIndex = AddButton (cancelTitle); } - + #if !NET [Obsolete ("Use overload with a IUIActionSheetDelegate parameter")] public UIActionSheet (string title, UIActionSheetDelegate del) @@ -59,10 +59,10 @@ public UIActionSheet (string title, UIActionSheetDelegate del) #endif public UIActionSheet (string title, IUIActionSheetDelegate del) - : this (title, del, null, null, (string) null) {} + : this (title, del, null, null, (string) null) { } public UIActionSheet (string title) - : this (title, null, null, null, (string) null) {} + : this (title, null, null, null, (string) null) { } public void Add (string name) { @@ -75,7 +75,7 @@ public IEnumerator GetEnumerator () yield return ButtonTitle (i); } } - + } #endif // IOS diff --git a/src/UIKit/UIAppearance.cs b/src/UIKit/UIAppearance.cs index da6d4b9a0b68..481eaa9ca64c 100644 --- a/src/UIKit/UIAppearance.cs +++ b/src/UIKit/UIAppearance.cs @@ -76,7 +76,7 @@ static IntPtr [] TypesToPointers (Type [] whenFoundIn) public static IntPtr GetAppearance (IntPtr class_ptr, params Type [] whenFoundIn) { using (var array = NSArray.FromIntPtrs (TypesToPointers (whenFoundIn))) { - return Messaging.IntPtr_objc_msgSend_IntPtr (class_ptr, + return Messaging.IntPtr_objc_msgSend_IntPtr (class_ptr, Selector.GetHandle (UIAppearance.selAppearanceWhenContainedInInstancesOfClasses), array.Handle); } } @@ -90,7 +90,7 @@ public static IntPtr GetAppearance (IntPtr class_ptr, UITraitCollection traits, throw new ArgumentNullException ("traits"); using (var array = NSArray.FromIntPtrs (TypesToPointers (whenFoundIn))) { - return Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr (class_ptr, + return Messaging.IntPtr_objc_msgSend_IntPtr_IntPtr (class_ptr, Selector.GetHandle (UIAppearance.selAppearanceForTraitCollectionWhenContainedInInstancesOfClasses), traits.Handle, array.Handle); } diff --git a/src/UIKit/UIButton.cs b/src/UIKit/UIButton.cs index 21bdc132fa36..b389b49c995a 100644 --- a/src/UIKit/UIButton.cs +++ b/src/UIKit/UIButton.cs @@ -15,7 +15,7 @@ public partial class UIButton { public UIButton (UIButtonType type) #if NET - : base (ObjCRuntime.Messaging.NativeHandle_objc_msgSend_int (class_ptr, Selector.GetHandle ("buttonWithType:"), (int)type)) + : base (ObjCRuntime.Messaging.NativeHandle_objc_msgSend_int (class_ptr, Selector.GetHandle ("buttonWithType:"), (int) type)) #else : base (ObjCRuntime.Messaging.IntPtr_objc_msgSend_int (class_ptr, Selector.GetHandle ("buttonWithType:"), (int) type)) #endif diff --git a/src/UIKit/UIDevice.cs b/src/UIKit/UIDevice.cs index afe3d44476c2..cdbfe560d04a 100644 --- a/src/UIKit/UIDevice.cs +++ b/src/UIKit/UIDevice.cs @@ -15,7 +15,7 @@ public partial class UIDevice { public bool CheckSystemVersion (int major, int minor) { #if __MACCATALYST__ - return Runtime.CheckSystemVersion (major, minor, Runtime.iOSSupportVersion); + return Runtime.CheckSystemVersion (major, minor, Runtime.iOSSupportVersion); #else return Runtime.CheckSystemVersion (major, minor, SystemVersion); #endif diff --git a/src/UIKit/UIDocumentBrowserViewController.cs b/src/UIKit/UIDocumentBrowserViewController.cs index 74668099e54b..8781942e7b66 100644 --- a/src/UIKit/UIDocumentBrowserViewController.cs +++ b/src/UIKit/UIDocumentBrowserViewController.cs @@ -31,10 +31,10 @@ namespace UIKit { - public partial class UIDocumentBrowserViewController - { + public partial class UIDocumentBrowserViewController { - static bool CheckSystemVersion () { + static bool CheckSystemVersion () + { #if IOS return SystemVersion.CheckiOS (12, 0); #else diff --git a/src/UIKit/UIImage.cs b/src/UIKit/UIImage.cs index 76fb5eadee3e..4b93d0387ef2 100644 --- a/src/UIKit/UIImage.cs +++ b/src/UIKit/UIImage.cs @@ -32,11 +32,11 @@ partial class UIImage { public void SaveToPhotosAlbum (SaveStatus status) { UIImageStatusDispatcher? dis = null; - UIApplication.EnsureUIThread (); + UIApplication.EnsureUIThread (); if (status is not null) dis = new UIImageStatusDispatcher (status); - + UIImageWriteToSavedPhotosAlbum (Handle, dis is not null ? dis.Handle : IntPtr.Zero, dis is not null ? Selector.GetHandle (UIImageStatusDispatcher.callbackSelector) : IntPtr.Zero, IntPtr.Zero); } #endif @@ -155,7 +155,7 @@ public DataWrapper (IntPtr buffer, uint len) internal class UIImageStatusDispatcher : NSObject { public const string callbackSelector = "Xamarin_Internal__image:didFinishSavingWithError:contextInfo:"; UIImage.SaveStatus status; - + public UIImageStatusDispatcher (UIImage.SaveStatus status) { IsDirectBinding = false; diff --git a/src/UIKit/UINavigationBar.cs b/src/UIKit/UINavigationBar.cs index 516a22786811..0e5579a415df 100644 --- a/src/UIKit/UINavigationBar.cs +++ b/src/UIKit/UINavigationBar.cs @@ -23,12 +23,12 @@ public virtual UITextAttributes GetTitleTextAttributes () { return new UITextAttributes (_TitleTextAttributes); } - + public virtual void SetTitleTextAttributes (UITextAttributes attributes) { if (attributes is null) throw new ArgumentNullException ("attributes"); - + _TitleTextAttributes = attributes.ToDictionary (); } } diff --git a/src/UIKit/UIPasteboard.cs b/src/UIKit/UIPasteboard.cs index 9c9307db7074..c55b53c0a80c 100644 --- a/src/UIKit/UIPasteboard.cs +++ b/src/UIKit/UIPasteboard.cs @@ -25,16 +25,16 @@ UIImage [] GetImageArray (IntPtr handle) var obj = Runtime.GetNSObject (array.ValueAt (i)); var data = obj as NSData; UIImage img; - + if (data is not null) { img = new UIImage (data); } else { img = (UIImage) obj; } - + ret [i] = img; } - + return ret; } } @@ -46,11 +46,11 @@ UIImage [] GetImageArray (IntPtr handle) // API and not make users change their code. [CompilerGenerated] - public virtual UIImage[] Images { + public virtual UIImage [] Images { [Export ("images", ArgumentSemantic.Copy)] get { global::UIKit.UIApplication.EnsureUIThread (); - UIImage[] ret; + UIImage [] ret; if (IsDirectBinding) { ret = GetImageArray (ObjCRuntime.Messaging.IntPtr_objc_msgSend (this.Handle, Selector.GetHandle (selImages))); } else { @@ -58,12 +58,12 @@ public virtual UIImage[] Images { } return ret; } - + [Export ("setImages:", ArgumentSemantic.Copy)] set { global::UIKit.UIApplication.EnsureUIThread (); var nsa_value = NSArray.FromNSObjects (value); - + if (IsDirectBinding) { ObjCRuntime.Messaging.void_objc_msgSend_IntPtr (this.Handle, Selector.GetHandle (selSetImages_), nsa_value.Handle); } else { diff --git a/src/UIKit/UIPickerView.cs b/src/UIKit/UIPickerView.cs index dd24a6ea2397..8dce0b97fcc4 100644 --- a/src/UIKit/UIPickerView.cs +++ b/src/UIKit/UIPickerView.cs @@ -2,7 +2,7 @@ using System; -using Foundation; +using Foundation; using CoreGraphics; using ObjCRuntime; diff --git a/src/UIKit/UIPopoverPresentationController.cs b/src/UIKit/UIPopoverPresentationController.cs index 61eb25a88b38..826a0e5ba8a6 100644 --- a/src/UIKit/UIPopoverPresentationController.cs +++ b/src/UIKit/UIPopoverPresentationController.cs @@ -22,7 +22,7 @@ public virtual Type PopoverBackgroundViewType { return Class.Lookup (p); } set { - PopoverBackgroundViewClass = (value is null) ? IntPtr.Zero : + PopoverBackgroundViewClass = (value is null) ? IntPtr.Zero : Class.GetHandle (value); } } diff --git a/src/UIKit/UIStringDrawing.cs b/src/UIKit/UIStringDrawing.cs index 1fad3f3ebc22..6720e7845b79 100644 --- a/src/UIKit/UIStringDrawing.cs +++ b/src/UIKit/UIStringDrawing.cs @@ -8,7 +8,7 @@ using ObjCRuntime; namespace UIKit { - public unsafe static partial class UIStringDrawing { + public unsafe static partial class UIStringDrawing { #if NET [SupportedOSPlatform ("ios")] [SupportedOSPlatform ("maccatalyst")] diff --git a/src/UIKit/UITextAttributes.cs b/src/UIKit/UITextAttributes.cs index 68cee22e67ad..b831b39010b3 100644 --- a/src/UIKit/UITextAttributes.cs +++ b/src/UIKit/UITextAttributes.cs @@ -25,14 +25,14 @@ public class UITextAttributes { public UITextAttributes () { } - + internal UITextAttributes (NSDictionary dict) { if (dict is null) return; - + NSObject val; - + if (dict.TryGetValue (UITextAttributesConstants.Font, out val)) Font = val as UIFont; if (dict.TryGetValue (UITextAttributesConstants.TextColor, out val)) @@ -45,7 +45,7 @@ internal UITextAttributes (NSDictionary dict) TextShadowOffset = value.UIOffsetValue; } } - + internal NSDictionary ToDictionary () { int n = 0; @@ -67,27 +67,27 @@ internal NSDictionary ToDictionary () var keys = new NSObject [n]; var values = new NSObject [n]; n = 0; - if (font is not null){ + if (font is not null) { keys [n] = UITextAttributesConstants.Font; values [n] = font; n++; } - if (text_color is not null){ + if (text_color is not null) { keys [n] = UITextAttributesConstants.TextColor; values [n] = text_color; n++; } - if (text_shadow_color is not null){ + if (text_shadow_color is not null) { keys [n] = UITextAttributesConstants.TextShadowColor; values [n] = text_shadow_color; n++; } - if (text_shadow_offset.Horizontal != 0 || text_shadow_offset.Vertical != 0){ + if (text_shadow_offset.Horizontal != 0 || text_shadow_offset.Vertical != 0) { keys [n] = UITextAttributesConstants.TextShadowOffset; values [n] = NSValue.FromUIOffset (text_shadow_offset); } using (NSArray avalues = NSArray.FromObjects (values), - akeys = NSArray.FromObjects (keys)){ + akeys = NSArray.FromObjects (keys)) { return NSDictionary.FromObjectsAndKeysInternal (avalues, akeys); } } diff --git a/src/UIKit/UIToolbar.cs b/src/UIKit/UIToolbar.cs index 605190d7b70d..fdeb2256aeb9 100644 --- a/src/UIKit/UIToolbar.cs +++ b/src/UIKit/UIToolbar.cs @@ -12,20 +12,20 @@ namespace UIKit { public partial class UIToolbar : UIView { - + // note: we cannot autogenerate this overload and still update the (same) __mt_Items_var local // previously we 'lost' the managed reference to the array and this caused bug #410 // http://bugzilla.xamarin.com/show_bug.cgi?id=410 [Export ("setItems:animated:")] - public virtual void SetItems (UIBarButtonItem[] items, bool animated) + public virtual void SetItems (UIBarButtonItem [] items, bool animated) { if (items is null) throw new ArgumentNullException ("items"); - + // must be identical the [get|set]_Items var nsa_items = NSArray.FromNSObjects (items); - + #if NET if (IsDirectBinding) { ObjCRuntime.Messaging.void_objc_msgSend_NativeHandle_bool (this.Handle, Selector.GetHandle ("setItems:animated:"), nsa_items.Handle, animated ? (byte) 1 : (byte) 0); diff --git a/src/UIKit/UIVideo.cs b/src/UIKit/UIVideo.cs index 64bc283fb7fb..82a8d14c1c01 100644 --- a/src/UIKit/UIVideo.cs +++ b/src/UIKit/UIVideo.cs @@ -22,7 +22,7 @@ namespace UIKit { internal class UIVideoStatusDispatcher : NSObject { public const string callbackSelector = "Xamarin_Internal__video:didFinishSavingWithError:contextInfo:"; UIVideo.SaveStatus status; - + public UIVideoStatusDispatcher (UIVideo.SaveStatus status) { this.status = status; @@ -38,13 +38,13 @@ public void Callback (string str, NSError err, IntPtr ctx) DangerousRelease (); } } - + public static class UIVideo { public delegate void SaveStatus (string path, NSError error); - + [DllImport (Constants.UIKitLibrary)] extern static /* BOOL */ byte UIVideoAtPathIsCompatibleWithSavedPhotosAlbum (/* NSString* */ IntPtr videoPath); - + public static bool IsCompatibleWithSavedPhotosAlbum (string path) { UIApplication.EnsureUIThread (); @@ -63,11 +63,11 @@ public static void SaveToPhotosAlbum (string path, SaveStatus status) throw new ArgumentNullException ("status"); UIApplication.EnsureUIThread (); var dis = new UIVideoStatusDispatcher (status); - + using (var ns = new NSString (path)) UISaveVideoAtPathToSavedPhotosAlbum (ns.Handle, dis.Handle, Selector.GetHandle (UIVideoStatusDispatcher.callbackSelector), IntPtr.Zero); } - + } } diff --git a/src/VideoToolbox/VTCompressionSession.cs b/src/VideoToolbox/VTCompressionSession.cs index deb4485ce60f..83dd6febe765 100644 --- a/src/VideoToolbox/VTCompressionSession.cs +++ b/src/VideoToolbox/VTCompressionSession.cs @@ -179,7 +179,7 @@ unsafe extern static VTStatus VTCompressionSessionCreate ( VTVideoEncoderSpecification? encoderSpecification, // hardware acceleration is default behavior on iOS. no opt-in required. NSDictionary? sourceImageBufferAttributes, // Undocumented options, probably always null #if NET - delegate* unmanaged staticCback) + delegate* unmanaged staticCback) #else CompressionOutputCallback? staticCback) #endif diff --git a/src/VideoToolbox/VTDecompressionSession.cs b/src/VideoToolbox/VTDecompressionSession.cs index 3424ff153749..802d6abc3795 100644 --- a/src/VideoToolbox/VTDecompressionSession.cs +++ b/src/VideoToolbox/VTDecompressionSession.cs @@ -201,8 +201,8 @@ public static VTDecompressionSession Create (CMVideoFormatDescription formatDesc public static VTDecompressionSession? Create (VTDecompressionOutputCallback outputCallback, CMVideoFormatDescription formatDescription, #if NET - VTVideoDecoderSpecification? decoderSpecification = null, // hardware acceleration is default behavior on iOS. no opt-in required. - CVPixelBufferAttributes? destinationImageBufferAttributes = null) + VTVideoDecoderSpecification? decoderSpecification = null, // hardware acceleration is default behavior on iOS. no opt-in required. + CVPixelBufferAttributes? destinationImageBufferAttributes = null) #else VTVideoDecoderSpecification? decoderSpecification, // hardware acceleration is default behavior on iOS. no opt-in required. CVPixelBufferAttributes? destinationImageBufferAttributes) @@ -222,7 +222,7 @@ public static VTDecompressionSession Create (CMVideoFormatDescription formatDesc VTVideoDecoderSpecification? decoderSpecification, // hardware acceleration is default behavior on iOS. no opt-in required. NSDictionary? destinationImageBufferAttributes, #if NET - delegate* unmanaged cback) + delegate* unmanaged cback) #else IntPtr cback) #endif diff --git a/src/VideoToolbox/VTRawProcessingSession.cs b/src/VideoToolbox/VTRawProcessingSession.cs index 410529239c7a..7663da13a70c 100644 --- a/src/VideoToolbox/VTRawProcessingSession.cs +++ b/src/VideoToolbox/VTRawProcessingSession.cs @@ -111,7 +111,7 @@ public static nint GetTypeId () [DllImport (Constants.VideoToolboxLibrary)] unsafe static extern VTStatus VTRAWProcessingSessionSetParameterChangedHander ( IntPtr /* VTRAWProcessingSessionRef */ session, - BlockLiteral * /* VTRAWProcessingParameterChangeHandler */ parameterChangeHandler + BlockLiteral* /* VTRAWProcessingParameterChangeHandler */ parameterChangeHandler ); /// Provide a callback that will be called when the VTRawProcessingPlugin changes the set of processing parameters. @@ -145,7 +145,7 @@ unsafe static extern VTStatus VTRAWProcessingSessionProcessFrame ( IntPtr /* VTRAWProcessingSessionRef */ session, IntPtr /* CVPixelBufferRef */ inputPixelBuffer, IntPtr /* CM_NULLABLE CFDictionaryRef */ frameOptions, - BlockLiteral * /* VTRAWProcessingOutputHandler */ outputHandler + BlockLiteral* /* VTRAWProcessingOutputHandler */ outputHandler ); /// Use this function to submit RAW frames for processing using sequence and frame level parameters. diff --git a/src/WebKit/WKPreferences.cs b/src/WebKit/WKPreferences.cs index d498c8262456..b016487cc737 100644 --- a/src/WebKit/WKPreferences.cs +++ b/src/WebKit/WKPreferences.cs @@ -28,7 +28,7 @@ public bool TextInteractionEnabled { #elif MONOMAC if (SystemVersion.CheckmacOS (12, 0)) #endif - return _NewGetTextInteractionEnabled (); + return _NewGetTextInteractionEnabled (); else return _OldTextInteractionEnabled; } diff --git a/src/accessorysetupkit.cs b/src/accessorysetupkit.cs index d7338d289dcd..0739adb6305d 100644 --- a/src/accessorysetupkit.cs +++ b/src/accessorysetupkit.cs @@ -11,16 +11,16 @@ namespace AccessorySetupKit { [Native] [iOS (18, 0)] public enum ASAccessoryState : long { - Unauthorized = 0, - AwaitingAuthorization = 10, - Authorized = 20, + Unauthorized = 0, + AwaitingAuthorization = 10, + Authorized = 20, } [Flags] [Native] [iOS (18, 0)] public enum ASAccessoryRenameOptions : ulong { - Ssid = 1U << 0, + Ssid = 1U << 0, } [Flags] @@ -73,19 +73,19 @@ interface ASAccessory { [Native] [iOS (18, 0)] public enum ASAccessoryEventType : long { - Unknown = 0, - Activated = 10, - Invalidated = 11, - MigrationComplete = 20, - AccessoryAdded = 30, - AccessoryRemoved = 31, - AccessoryChanged = 32, - PickerDidPresent = 40, - PickerDidDismiss = 50, + Unknown = 0, + Activated = 10, + Invalidated = 11, + MigrationComplete = 20, + AccessoryAdded = 30, + AccessoryRemoved = 31, + AccessoryChanged = 32, + PickerDidPresent = 40, + PickerDidDismiss = 50, PickerSetupBridging = 60, - PickerSetupFailed = 70, - PickerSetupPairing = 80, - PickerSetupRename = 90, + PickerSetupFailed = 70, + PickerSetupPairing = 80, + PickerSetupRename = 90, } [BaseType (typeof (NSObject))] @@ -202,18 +202,18 @@ interface ASDiscoveryDescriptor { [iOS (18, 0)] [ErrorDomain ("ASErrorDomain")] enum ASErrorCode : long { - Success = 0, - Unknown = 1, - ActivationFailed = 100, - ConnectionFailed = 150, - DiscoveryTimeout = 200, - ExtensionNotFound = 300, - Invalidated = 400, - InvalidRequest = 450, + Success = 0, + Unknown = 1, + ActivationFailed = 100, + ConnectionFailed = 150, + DiscoveryTimeout = 200, + ExtensionNotFound = 300, + Invalidated = 400, + InvalidRequest = 450, PickerAlreadyActive = 500, - PickerRestricted = 550, - UserCancelled = 700, - UserRestricted = 750, + PickerRestricted = 550, + UserCancelled = 700, + UserRestricted = 750, } [BaseType (typeof (NSObject))] diff --git a/src/appkit.cs b/src/appkit.cs index 7320ec7c35a6..1a5346eefab9 100644 --- a/src/appkit.cs +++ b/src/appkit.cs @@ -15040,7 +15040,7 @@ partial interface NSSpellChecker { bool IsAutomaticTextCompletionEnabled { get; } #if NET - [Async (ResultTypeName="NSSpellCheckerCandidates")] + [Async (ResultTypeName = "NSSpellCheckerCandidates")] #else [Async (ResultTypeName = "NSSpellCheckerCanidates")] #endif @@ -19847,7 +19847,7 @@ NSTextContentType ContentType { // This came from the NSTextFinderClient protocol in legacy Xamarin, but NSTextView doesn't really implement that protocol, // so when it was removed for .NET, we still need to expose the API from NSTextFinderClient that NSTextView actually has. [Export ("selectedRanges", ArgumentSemantic.Copy)] - NSArray SelectedRanges { get; set; } + NSArray SelectedRanges { get; set; } #endif [NoiOS] diff --git a/src/authenticationservices.cs b/src/authenticationservices.cs index 27bdb45f578f..1516e3f1d7bb 100644 --- a/src/authenticationservices.cs +++ b/src/authenticationservices.cs @@ -630,7 +630,8 @@ interface IASAuthorizationControllerDelegate { } [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] @@ -1048,7 +1049,8 @@ interface IASWebAuthenticationSessionRequestDelegate { } [NoTV] [NoiOS] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] @@ -1162,7 +1164,8 @@ interface IASAccountAuthenticationModificationControllerDelegate { } [iOS (14, 0)] [NoTV, NoMac] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] diff --git a/src/avfoundation.cs b/src/avfoundation.cs index 29f1b1c94063..3479fca03b7e 100644 --- a/src/avfoundation.cs +++ b/src/avfoundation.cs @@ -1336,17 +1336,17 @@ interface AVAudio3DMixing { #if NET [Abstract] - [TV (13,0), iOS (13,0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("sourceMode", ArgumentSemantic.Assign)] AVAudio3DMixingSourceMode SourceMode { get; set; } [Abstract] - [TV (13,0), iOS (13,0)] + [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] [Export ("pointSourceInHeadMode", ArgumentSemantic.Assign)] AVAudio3DMixingPointSourceInHeadMode PointSourceInHeadMode { get; set; } - + #else [TV (13, 0), iOS (13, 0)] [Export ("sourceMode", ArgumentSemantic.Assign)] @@ -8858,7 +8858,7 @@ interface AVAssetExportSession { [Export ("supportedFileTypes")] #if NET - string [] SupportedFileTypes { get; } + string [] SupportedFileTypes { get; } #else NSObject [] SupportedFileTypes { get; } #endif @@ -11857,7 +11857,7 @@ interface AVCaptureDeviceDiscoverySession { #else [Static] [Export ("discoverySessionWithDeviceTypes:mediaType:position:")] - AVCaptureDeviceDiscoverySession Create ([BindAs (typeof (AVCaptureDeviceType[]))] NSString[] deviceTypes, [NullAllowed] [BindAs (typeof (AVMediaTypes))] NSString mediaType, AVCaptureDevicePosition position); + AVCaptureDeviceDiscoverySession Create ([BindAs (typeof (AVCaptureDeviceType []))] NSString [] deviceTypes, [NullAllowed][BindAs (typeof (AVMediaTypes))] NSString mediaType, AVCaptureDevicePosition position); #endif [Export ("devices")] diff --git a/src/backgroundassets.cs b/src/backgroundassets.cs index d5dc0fb046f5..4ae0a5a877d8 100644 --- a/src/backgroundassets.cs +++ b/src/backgroundassets.cs @@ -127,7 +127,8 @@ interface IBADownloadManagerDelegate { } [NoTV, Mac (13, 0), iOS (16, 0), MacCatalyst (16, 0)] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] diff --git a/src/browserenginekit.cs b/src/browserenginekit.cs index e5788e8b1abf..53ac4c0f7be8 100644 --- a/src/browserenginekit.cs +++ b/src/browserenginekit.cs @@ -52,11 +52,10 @@ using OS_xpc_object = Foundation.NSObject; namespace BrowserEngineKit { - [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BELayerHierarchyHandle : NSSecureCoding - { + interface BELayerHierarchyHandle : NSSecureCoding { [Static] [Export ("handleWithXPCRepresentation:error:")] [return: NullAllowed] @@ -66,11 +65,10 @@ interface BELayerHierarchyHandle : NSSecureCoding OS_xpc_object CreateXpcRepresentation (); } - [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BELayerHierarchy - { + interface BELayerHierarchy { [Static] [Export ("layerHierarchyWithError:")] [return: NullAllowed] @@ -86,19 +84,17 @@ interface BELayerHierarchy void Invalidate (); } - [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (UIView))] - interface BELayerHierarchyHostingView - { + interface BELayerHierarchyHostingView { [Export ("handle", ArgumentSemantic.Strong), NullAllowed] BELayerHierarchyHandle LayerHierarchyHandle { get; set; } } - [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BELayerHierarchyHostingTransactionCoordinator : NSSecureCoding - { + interface BELayerHierarchyHostingTransactionCoordinator : NSSecureCoding { [Static] [Export ("coordinatorWithError:")] [return: NullAllowed] @@ -123,11 +119,10 @@ interface BELayerHierarchyHostingTransactionCoordinator : NSSecureCoding void Commit (); } - [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(UIContextMenuConfiguration))] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (UIContextMenuConfiguration))] [DisableDefaultCtor] - interface BEContextMenuConfiguration - { + interface BEContextMenuConfiguration { [DesignatedInitializer] [Export ("init")] NativeHandle Constructor (); @@ -136,13 +131,12 @@ interface BEContextMenuConfiguration bool Fulfill ([NullAllowed] UIContextMenuConfiguration configuration); } - delegate bool BEDragInteractionDelegateGetDragItemsCallback (UIDragItem[] items); + delegate bool BEDragInteractionDelegateGetDragItemsCallback (UIDragItem [] items); - [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (UIDragInteractionDelegate))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] - interface BEDragInteractionDelegate - { + interface BEDragInteractionDelegate { [Export ("dragInteraction:prepareDragSession:completion:")] void PrepareDragSession (BEDragInteraction dragInteraction, IUIDragSession session, Func completion); @@ -150,12 +144,11 @@ interface BEDragInteractionDelegate void GetDragItems (BEDragInteraction dragInteraction, IUIDragSession session, CGPoint point, BEDragInteractionDelegateGetDragItemsCallback completion); } - interface IBEDragInteractionDelegate {} + interface IBEDragInteractionDelegate { } - [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (UIDragInteraction))] - interface BEDragInteraction - { + interface BEDragInteraction { [Wrap ("WeakDelegate")] [NullAllowed] IBEDragInteractionDelegate Delegate { get; } @@ -168,11 +161,10 @@ interface BEDragInteraction NativeHandle Constructor (IBEDragInteractionDelegate @delegate); } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (UIScrollViewDelegate))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] - interface BEScrollViewDelegate - { + interface BEScrollViewDelegate { [Export ("scrollView:handleScrollUpdate:completion:")] void HandleScrollUpdate (BEScrollView scrollView, BEScrollViewScrollUpdate scrollUpdate, Action completion); @@ -181,12 +173,11 @@ interface BEScrollViewDelegate BEScrollView GetParentScrollView (BEScrollView scrollView); } - interface IBEScrollViewDelegate {} + interface IBEScrollViewDelegate { } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(UIScrollView))] - interface BEScrollView - { + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (UIScrollView))] + interface BEScrollView { [Wrap ("WeakDelegate")] [NullAllowed] IBEScrollViewDelegate Delegate { get; set; } @@ -195,21 +186,19 @@ interface BEScrollView NSObject WeakDelegate { get; set; } } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] - public enum BEScrollViewScrollUpdatePhase : long - { + public enum BEScrollViewScrollUpdatePhase : long { Began, Changed, Ended, Cancelled, } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEScrollViewScrollUpdate - { + interface BEScrollViewScrollUpdate { [Export ("timestamp")] double Timestamp { get; } @@ -225,11 +214,10 @@ interface BEScrollViewScrollUpdate delegate void BEWebContentProcessCreateCallback ([NullAllowed] BEWebContentProcess proces, [NullAllowed] NSError error); - [NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [NoTV, Mac (14, 3), iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEWebContentProcess - { + interface BEWebContentProcess { [Static] [Export ("webContentProcessWithInterruptionHandler:completion:")] [Async] @@ -257,7 +245,7 @@ interface BEWebContentProcess IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error); // Inlined from the CapabilityInvalidationHandler (BEWebContentProcess) category - [NoTV, NoMac, iOS (17,6), MacCatalyst (17, 6)] + [NoTV, NoMac, iOS (17, 6), MacCatalyst (17, 6)] [Export ("grantCapability:error:invalidationHandler:")] [return: NullAllowed] IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error, Action invalidationHandler); @@ -265,11 +253,10 @@ interface BEWebContentProcess delegate void BENetworkingProcessCreateCallback ([NullAllowed] BENetworkingProcess proces, [NullAllowed] NSError error); - [NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [NoTV, Mac (14, 3), iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BENetworkingProcess - { + interface BENetworkingProcess { [Static] [Export ("networkProcessWithInterruptionHandler:completion:")] [Async] @@ -302,11 +289,10 @@ interface BENetworkingProcess delegate void BERenderingProcessCreateCallback ([NullAllowed] BERenderingProcess proces, [NullAllowed] NSError error); - [NoTV, Mac (14, 3), iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [NoTV, Mac (14, 3), iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BERenderingProcess - { + interface BERenderingProcess { [Static] [Export ("renderingProcessWithInterruptionHandler:completion:")] [Async] @@ -334,25 +320,24 @@ interface BERenderingProcess IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error); // Inlined from the CapabilityInvalidationHandler (BERenderingProcess) category - [NoTV, NoMac, iOS (17,6), MacCatalyst (17, 6)] + [NoTV, NoMac, iOS (17, 6), MacCatalyst (17, 6)] [Export ("grantCapability:error:invalidationHandler:")] [return: NullAllowed] IBEProcessCapabilityGrant GrantCapability (BEProcessCapability capability, [NullAllowed] out NSError error, Action invalidationHandler); } // Headers say this is available on macOS 14.3, but the BETextInput type isn't, so just remove this type from macOS as well. - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] - interface BETextInputDelegate - { + interface BETextInputDelegate { [Abstract] [Export ("shouldDeferEventHandlingToSystemForTextInput:context:")] bool ShouldDeferEventHandlingToSystem (IBETextInput textInput, BEKeyEntryContext keyEventContext); [Abstract] [Export ("textInput:setCandidateSuggestions:")] - void SetCandidateSuggestions (IBETextInput textInput, [NullAllowed] BETextSuggestion[] suggestions); + void SetCandidateSuggestions (IBETextInput textInput, [NullAllowed] BETextSuggestion [] suggestions); [Abstract] [Export ("selectionWillChangeForTextInput:")] @@ -371,21 +356,19 @@ interface BETextInputDelegate void InvalidateTextEntryContext (IBETextInput textInput); } - interface IBETextInputDelegate {} + interface IBETextInputDelegate { } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] - public enum BEKeyPressState : long - { + public enum BEKeyPressState : long { Down = 1, Up = 2, } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEKeyEntry - { + interface BEKeyEntry { [Export ("key")] UIKey Key { get; } @@ -399,10 +382,9 @@ interface BEKeyEntry double Timestamp { get; } } - [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Native] - public enum BEGestureType : long - { + public enum BEGestureType : long { Loupe = 0, OneFingerTap = 1, DoubleTapAndHold = 2, @@ -415,10 +397,9 @@ public enum BEGestureType : long ForceTouch = 15, } - [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Native] - public enum BESelectionTouchPhase : long - { + public enum BESelectionTouchPhase : long { Started, Moved, Ended, @@ -428,51 +409,46 @@ public enum BESelectionTouchPhase : long } [Flags] - [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] [Native] - public enum BESelectionFlags : ulong - { + public enum BESelectionFlags : ulong { None = 0x0, WordIsNearTap = 1uL << 0, SelectionFlipped = 1uL << 1, PhraseBoundaryChanged = 1uL << 2, } - [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BETextAlternatives - { + interface BETextAlternatives { [Export ("primaryString")] string PrimaryString { get; } [Export ("alternativeStrings")] - string[] AlternativeStrings { get; } + string [] AlternativeStrings { get; } } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Flags] [Native] - public enum BETextReplacementOptions : ulong - { + public enum BETextReplacementOptions : ulong { None = 0x0, AddUnderline = 1uL << 0, } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Flags] [Native] - public enum BEKeyModifierFlags : long - { + public enum BEKeyModifierFlags : long { None, Shift, CapsLock, } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface BEResponderEditActions : UIResponderStandardEditActions - { + interface BEResponderEditActions : UIResponderStandardEditActions { [Export ("share:")] void Share ([NullAllowed] NSObject sender); @@ -498,10 +474,9 @@ interface BEResponderEditActions : UIResponderStandardEditActions void TransliterateChinese ([NullAllowed] NSObject sender); } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface BETextSelectionDirectionNavigation - { + interface BETextSelectionDirectionNavigation { [Abstract] [Export ("moveInLayoutDirection:")] void MoveInLayoutDirection (UITextLayoutDirection direction); @@ -519,10 +494,9 @@ interface BETextSelectionDirectionNavigation void ExtendInStorageDirection (UITextStorageDirection direction, UITextGranularity granularity); } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface BEExtendedTextInputTraits : UITextInputTraits - { + interface BEExtendedTextInputTraits : UITextInputTraits { [Export ("singleLineDocument")] bool SingleLineDocument { [Bind ("isSingleLineDocument")] get; } @@ -539,17 +513,16 @@ interface BEExtendedTextInputTraits : UITextInputTraits UIColor SelectionHighlightColor { get; } } - interface IBEExtendedTextInputTraits {} + interface IBEExtendedTextInputTraits { } delegate void BETextInputHandleKeyEntryCallback (BEKeyEntry entry, bool handled); - delegate void BETextInputReplaceTextCallback (UITextSelectionRect[] rects); + delegate void BETextInputReplaceTextCallback (UITextSelectionRect [] rects); delegate void BETextInputRequestTextContextForAutocorrectionCallback (BETextDocumentContext context); - delegate void BETextInputRequestTextRectsCallback (UITextSelectionRect[] rects); + delegate void BETextInputRequestTextRectsCallback (UITextSelectionRect [] rects); - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BEResponderEditActions - { + interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BEResponderEditActions { [Wrap ("WeakAsyncInputDelegate"), Abstract] [NullAllowed] IBETextInputDelegate AsyncInputDelegate { get; set; } @@ -677,7 +650,7 @@ interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BERespon [Abstract] [Export ("selectionRectsForRange:")] - UITextSelectionRect[] GetSelectionRects (UITextRange range); + UITextSelectionRect [] GetSelectionRects (UITextRange range); [Abstract] [Export ("selectWordForReplacement")] @@ -766,7 +739,7 @@ interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BERespon [Abstract] [return: NullAllowed] [Export ("alternativesForSelectedText")] - BETextAlternatives[] GetAlternativesForSelectedText (); + BETextAlternatives [] GetAlternativesForSelectedText (); [Abstract] [Export ("addTextAlternatives:")] @@ -776,7 +749,7 @@ interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BERespon [Export ("insertTextAlternatives:")] void InsertTextAlternatives (BETextAlternatives alternatives); - [iOS (18,0), MacCatalyst (18, 0), TV (18, 0)] + [iOS (18, 0), MacCatalyst (18, 0), TV (18, 0)] [Export ("removeTextAlternatives")] void RemoveTextAlternatives (); @@ -824,18 +797,17 @@ interface BETextInput : UIKeyInput, BETextSelectionDirectionNavigation, BERespon [Export ("cancelAutoscroll")] void CancelAutoscroll (); - [iOS (18,0), MacCatalyst (18, 0), TV (18, 0)] + [iOS (18, 0), MacCatalyst (18, 0), TV (18, 0)] [Export ("keyboardWillDismiss")] void KeyboardWillDismiss (); } - interface IBETextInput {} + interface IBETextInput { } - [TV (17, 4), Mac (14, 4), iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [TV (17, 4), Mac (14, 4), iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BETextSuggestion - { + interface BETextSuggestion { [Export ("initWithInputText:")] NativeHandle Constructor (string inputText); @@ -843,19 +815,17 @@ interface BETextSuggestion string InputText { get; } } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(BETextSuggestion))] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (BETextSuggestion))] [DisableDefaultCtor] - interface BEAutoFillTextSuggestion - { + interface BEAutoFillTextSuggestion { [Export ("contents", ArgumentSemantic.Copy)] NSDictionary Contents { get; } } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] - interface BETextInteraction : UIInteraction - { + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] + interface BETextInteraction : UIInteraction { [Wrap ("WeakDelegate")] [NullAllowed] IBETextInteractionDelegate Delegate { get; set; } @@ -916,11 +886,10 @@ interface BETextInteraction : UIInteraction } // Headers say this is available on macOS 14.3, but the BETextInteraction type isn't, so just remove this type from macOS as well. - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [BaseType (typeof (NSObject))] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] - interface BETextInteractionDelegate - { + interface BETextInteractionDelegate { [Abstract] [Export ("systemWillChangeSelectionForInteraction:")] void SystemWillChangeSelection (BETextInteraction textInteraction); @@ -930,13 +899,12 @@ interface BETextInteractionDelegate void SystemDidChangeSelection (BETextInteraction textInteraction); } - interface IBETextInteractionDelegate {} + interface IBETextInteractionDelegate { } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEKeyEntryContext - { + interface BEKeyEntryContext { [Export ("keyEntry", ArgumentSemantic.Strong)] BEKeyEntry KeyEntry { get; } @@ -955,10 +923,9 @@ interface BEKeyEntryContext } [Flags] - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] [Native] - public enum BETextDocumentRequestOptions : long - { + public enum BETextDocumentRequestOptions : long { None = 0x0, Text = 1L << 0, AttributedText = 1L << 1, @@ -967,11 +934,10 @@ public enum BETextDocumentRequestOptions : long AutocorrectedRanges = 1L << 7, } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BETextDocumentRequest - { + interface BETextDocumentRequest { [Export ("options", ArgumentSemantic.Assign)] BETextDocumentRequestOptions Options { get; set; } @@ -982,11 +948,10 @@ interface BETextDocumentRequest nint GranularityCount { get; set; } } - [TV (17, 4), NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [TV (17, 4), NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BETextDocumentContext - { + interface BETextDocumentContext { [Export ("initWithSelectedText:contextBefore:contextAfter:markedText:selectedRangeInMarkedText:")] NativeHandle Constructor ([NullAllowed] string selectedText, [NullAllowed] string contextBefore, [NullAllowed] string contextAfter, [NullAllowed] string markedText, NSRange selectedRangeInMarkedText); @@ -997,13 +962,12 @@ interface BETextDocumentContext void AddTextRect (CGRect rect, NSRange range); [Export ("autocorrectedRanges", ArgumentSemantic.Copy)] - NSValue[] AutocorrectedRanges { get; set; } + NSValue [] AutocorrectedRanges { get; set; } } - [NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] + [NoTV, Mac (14, 3), iOS (17, 4), MacCatalyst (17, 4)] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface BEProcessCapabilityGrant - { + interface BEProcessCapabilityGrant { [Abstract] [Export ("invalidate")] bool Invalidate (); @@ -1013,13 +977,12 @@ interface BEProcessCapabilityGrant bool Valid { [Bind ("isValid")] get; } } - interface IBEProcessCapabilityGrant {} + interface IBEProcessCapabilityGrant { } - [NoTV, NoMac, iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [NoTV, NoMac, iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEMediaEnvironment - { + interface BEMediaEnvironment { [Export ("initWithWebPageURL:")] [DesignatedInitializer] NativeHandle Constructor (NSUrl url); @@ -1041,11 +1004,10 @@ interface BEMediaEnvironment AVCaptureSession MakeCaptureSession ([NullAllowed] out NSError error); } - [NoTV, Mac (14,3), iOS (17,4), MacCatalyst (17, 4)] - [BaseType (typeof(NSObject))] + [NoTV, Mac (14, 3), iOS (17, 4), MacCatalyst (17, 4)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEProcessCapability - { + interface BEProcessCapability { [NoMac] [Static] [Export ("mediaPlaybackAndCaptureWithEnvironment:")] @@ -1067,11 +1029,10 @@ interface BEProcessCapability IBEProcessCapabilityGrant Request ([NullAllowed] out NSError error); } - [TV (17, 5), Mac (14, 5), iOS (17,5), MacCatalyst (17, 5)] - [BaseType (typeof(NSObject))] + [TV (17, 5), Mac (14, 5), iOS (17, 5), MacCatalyst (17, 5)] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEWebAppManifest - { + interface BEWebAppManifest { [Export ("initWithJSONData:manifestURL:")] [DesignatedInitializer] NativeHandle Constructor (NSData jsonData, NSUrl manifestUrl); @@ -1085,8 +1046,7 @@ interface BEWebAppManifest [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] - public enum BEAccessibilityPressedState : long - { + public enum BEAccessibilityPressedState : long { Undefined = 0, False, True, @@ -1096,8 +1056,7 @@ public enum BEAccessibilityPressedState : long [Flags] [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Native] - public enum BEAccessibilityContainerType : ulong - { + public enum BEAccessibilityContainerType : ulong { None = 0x0, Landmark = 1uL << 0, Table = 1uL << 1, @@ -1116,8 +1075,7 @@ public enum BEAccessibilityContainerType : ulong [TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)] [Category] [BaseType (typeof (NSObject))] - interface NSObject_BEAccessibility - { + interface NSObject_BEAccessibility { [Export ("browserAccessibilityCurrentStatus")] [return: NullAllowed] string GetBrowserAccessibilityCurrentStatus (); @@ -1225,14 +1183,12 @@ public enum BEAccessibilityNotification : long { [iOS (18, 2), TV (18, 2), Mac (15, 2), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] - interface BEAccessibilityTextMarker : NSCopying, NSSecureCoding - { + interface BEAccessibilityTextMarker : NSCopying, NSSecureCoding { } [iOS (18, 2), TV (18, 2), Mac (15, 2), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] - interface BEAccessibilityTextMarkerRange : NSCopying, NSSecureCoding - { + interface BEAccessibilityTextMarkerRange : NSCopying, NSSecureCoding { [Export ("startMarker", ArgumentSemantic.Strong)] BEAccessibilityTextMarker StartMarker { get; set; } @@ -1242,8 +1198,7 @@ interface BEAccessibilityTextMarkerRange : NSCopying, NSSecureCoding [iOS (18, 2), TV (18, 2), Mac (15, 2), MacCatalyst (18, 2)] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface BEAccessibilityTextMarkerSupport - { + interface BEAccessibilityTextMarkerSupport { [Abstract] [Export ("accessibilityBoundsForTextMarkerRange:")] CGRect GetAccessibilityBounds (BEAccessibilityTextMarkerRange range); @@ -1305,8 +1260,7 @@ interface BEAccessibilityTextMarkerSupport [NoTV, NoMac, iOS (18, 2), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEDownloadMonitorLocation - { + interface BEDownloadMonitorLocation { [Export ("url")] NSUrl Url { get; } @@ -1321,8 +1275,7 @@ interface BEDownloadMonitorLocation [NoTV, NoMac, iOS (18, 2), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface BEDownloadMonitor - { + interface BEDownloadMonitor { [Export ("initWithSourceURL:destinationURL:observedProgress:liveActivityAccessToken:")] NativeHandle Constructor (NSUrl sourceUrl, NSUrl destinationUrl, NSProgress observedProgress, NSData liveActivityAccessToken); diff --git a/src/contactsui.cs b/src/contactsui.cs index 21e5fb594382..e4bafaa3c6aa 100644 --- a/src/contactsui.cs +++ b/src/contactsui.cs @@ -69,11 +69,12 @@ interface CNContactPickerViewController { interface ICNContactPickerDelegate { } #if MONOMAC - [NoiOS][NoMacCatalyst][NoTV] + [NoiOS] + [NoMacCatalyst] + [NoTV] [Protocol, Model] - [BaseType (typeof(NSObject))] - interface CNContactPickerDelegate - { + [BaseType (typeof (NSObject))] + interface CNContactPickerDelegate { [Export ("contactPicker:didSelectContact:")] void ContactSelected (CNContactPicker picker, CNContact contact); diff --git a/src/coreanimation.cs b/src/coreanimation.cs index 929bd78831e8..701e61be1182 100644 --- a/src/coreanimation.cs +++ b/src/coreanimation.cs @@ -1272,7 +1272,8 @@ interface CALayerDelegate { /// /// /// Apple documentation for CAEAGLLayer - [NoMac][NoMacCatalyst] + [NoMac] + [NoMacCatalyst] [Deprecated (PlatformName.TvOS, 12, 0, message: "Use 'CAMetalLayer' instead.")] [Deprecated (PlatformName.iOS, 12, 0, message: "Use 'CAMetalLayer' instead.")] [BaseType (typeof (CALayer))] @@ -1301,7 +1302,7 @@ interface CAAction { /// [BaseType (typeof (NSObject) #if NET - , Delegates = new string [] {"WeakDelegate"}, Events = new Type [] { typeof (CAAnimationDelegate) } + , Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (CAAnimationDelegate) } #endif )] interface CAAnimation : CAAction, CAMediaTiming, NSSecureCoding, NSMutableCopying, SCNAnimationProtocol { diff --git a/src/coredata.cs b/src/coredata.cs index 5b807e12de6c..6fd01dfced52 100644 --- a/src/coredata.cs +++ b/src/coredata.cs @@ -624,7 +624,7 @@ interface NSFetchedResultsController { string GetSectionIndexTitle (string sectionName); [Export ("sectionIndexTitles")] - string[] SectionIndexTitles { get; } + string [] SectionIndexTitles { get; } #endif [Static] @@ -895,7 +895,7 @@ interface NSManagedObject : NSFetchRequestResult { #if XAMCORE_5_0 NSDictionary GetCommittedValues ([NullAllowed] string[] keys); #elif NET - NSDictionary GetCommittedValues ([NullAllowed] string[] keys); + NSDictionary GetCommittedValues ([NullAllowed] string [] keys); #else NSDictionary CommittedValuesForKeys ([NullAllowed] string [] keys); #endif @@ -1271,7 +1271,7 @@ interface NSManagedObjectModel : NSCoding, NSCopying { [Static, Export ("mergedModelFromBundles:")] [return: NullAllowed] #if NET - NSManagedObjectModel GetMergedModel ([NullAllowed] NSBundle[] bundles); + NSManagedObjectModel GetMergedModel ([NullAllowed] NSBundle [] bundles); #else NSManagedObjectModel MergedModelFromBundles ([NullAllowed] NSBundle [] bundles); #endif @@ -1337,7 +1337,7 @@ interface NSManagedObjectModel : NSCoding, NSCopying { #if XAMCORE_5_0 NSManagedObjectModel GetMergedModel ([NullAllowed] NSBundle[] bundles, NSDictionary metadata); #elif NET - NSManagedObjectModel GetMergedModel ([NullAllowed] NSBundle[] bundles, NSDictionary metadata); + NSManagedObjectModel GetMergedModel ([NullAllowed] NSBundle [] bundles, NSDictionary metadata); #else NSManagedObjectModel MergedModelFromBundles ([NullAllowed] NSBundle [] bundles, NSDictionary metadata); #endif @@ -1347,7 +1347,7 @@ interface NSManagedObjectModel : NSCoding, NSCopying { #if XAMCORE_5_0 NSManagedObjectModel GetModelByMerging (NSManagedObjectModel[] models, NSDictionary metadata); #elif NET - NSManagedObjectModel GetModelByMerging (NSManagedObjectModel[] models, NSDictionary metadata); + NSManagedObjectModel GetModelByMerging (NSManagedObjectModel [] models, NSDictionary metadata); #else NSManagedObjectModel ModelByMergingModels (NSManagedObjectModel [] models, NSDictionary metadata); #endif @@ -1395,7 +1395,7 @@ interface NSMappingModel { [Static, Export ("mappingModelFromBundles:forSourceModel:destinationModel:")] [return: NullAllowed] #if NET - NSMappingModel GetMappingModel ([NullAllowed] NSBundle[] bundles, [NullAllowed] NSManagedObjectModel sourceModel, [NullAllowed] NSManagedObjectModel destinationModel); + NSMappingModel GetMappingModel ([NullAllowed] NSBundle [] bundles, [NullAllowed] NSManagedObjectModel sourceModel, [NullAllowed] NSManagedObjectModel destinationModel); #else NSMappingModel MappingModelFromBundles ([NullAllowed] NSBundle [] bundles, [NullAllowed] NSManagedObjectModel sourceModel, [NullAllowed] NSManagedObjectModel destinationModel); #endif @@ -2386,7 +2386,7 @@ interface NSAsynchronousFetchResult { [Export ("finalResult", ArgumentSemantic.Retain)] [NullAllowed] #if NET - INSFetchRequestResult[] FinalResult { get; } + INSFetchRequestResult [] FinalResult { get; } #else NSObject [] FinalResult { get; } #endif diff --git a/src/corehaptics.cs b/src/corehaptics.cs index dd6df1f4d4a5..150be43b5014 100644 --- a/src/corehaptics.cs +++ b/src/corehaptics.cs @@ -22,7 +22,7 @@ namespace CoreHaptics { // we are not binding the API on Mac OS X yet due to an issue on Apples side: https://github.com/xamarin/maccore/issues/1951 #if MONOMAC || TV - interface AVAudioSession {} + interface AVAudioSession { } #endif [iOS (13, 0), TV (14, 0)] diff --git a/src/coreimage.cs b/src/coreimage.cs index be8db0eee89f..1a2bb50e4a2f 100644 --- a/src/coreimage.cs +++ b/src/coreimage.cs @@ -256,14 +256,16 @@ interface CIContext { CIContext Create (); #if HAS_OPENGLES - [NoMac][NoMacCatalyst] + [NoMac] + [NoMacCatalyst] [Deprecated (PlatformName.iOS, 12, 0)] [Deprecated (PlatformName.TvOS, 12, 0)] [Static] [Export ("contextWithEAGLContext:")] CIContext FromContext (EAGLContext eaglContext); - [NoMac][NoMacCatalyst] + [NoMac] + [NoMacCatalyst] [Deprecated (PlatformName.iOS, 12, 0)] [Deprecated (PlatformName.TvOS, 12, 0)] [Static] diff --git a/src/corelocation.cs b/src/corelocation.cs index 07b38a503d6e..f728e652bfee 100644 --- a/src/corelocation.cs +++ b/src/corelocation.cs @@ -58,7 +58,7 @@ public enum CLProximity : long { [ErrorDomain ("CLLocationPushServiceErrorDomain")] #if NET // Apple fixed this in Xcode 13.1 - [iOS (15,0), NoTV, NoMacCatalyst, NoMac] + [iOS (15, 0), NoTV, NoMacCatalyst, NoMac] #else [iOS (15, 0), NoTV, MacCatalyst (15, 0), NoMac] #endif @@ -1064,7 +1064,7 @@ interface CLBeaconIdentityConstraint : NSCopying, NSSecureCoding { } #if NET // Apple fixed this in Xcode 13.1 - [iOS (15,0), NoTV, NoMacCatalyst, NoMac] + [iOS (15, 0), NoTV, NoMacCatalyst, NoMac] #else [iOS (15, 0), NoTV, MacCatalyst (15, 0), NoMac] #endif diff --git a/src/corenfc.cs b/src/corenfc.cs index bcabf9246b31..49d22130a2d8 100644 --- a/src/corenfc.cs +++ b/src/corenfc.cs @@ -870,7 +870,7 @@ enum VasErrorCode [MacCatalyst (13, 1)] #if NET [Native] - enum NFCVasMode + enum NFCVasMode #else [Native ("NFCVASMode")] enum VasMode @@ -1071,7 +1071,8 @@ interface INFCTagReaderSessionDelegate { } [iOS (13, 0)] [MacCatalyst (13, 1)] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] @@ -1119,7 +1120,8 @@ interface INFCVasReaderSessionDelegate { } [iOS (13, 0)] [MacCatalyst (13, 1)] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] diff --git a/src/coretext.cs b/src/coretext.cs index bb02cfff3cd8..40d28ebdfb86 100644 --- a/src/coretext.cs +++ b/src/coretext.cs @@ -126,7 +126,8 @@ interface CTFontManagerErrorKeys { #if NET [Internal] - [Static][Partial] + [Static] + [Partial] interface CTBaselineClassID { [Field ("kCTBaselineClassRoman")] NSString Roman { get; } @@ -148,7 +149,8 @@ interface CTBaselineClassID { } [Internal] - [Static][Partial] + [Static] + [Partial] interface CTBaselineFontID { [Field ("kCTBaselineReferenceFont")] NSString Reference { get; } @@ -274,7 +276,8 @@ interface CTFontTraitKey { } [Internal] - [Static][Partial] + [Static] + [Partial] interface CTFontNameKeyId { [Field ("kCTFontCopyrightNameKey")] NSString Copyright { get; } diff --git a/src/cryptotokenkit.cs b/src/cryptotokenkit.cs index 7da6fd74417a..cd5de12aa674 100644 --- a/src/cryptotokenkit.cs +++ b/src/cryptotokenkit.cs @@ -20,8 +20,7 @@ namespace CryptoTokenKit { [Native] [ErrorDomain ("TKErrorDomain")] [iOS (9, 0), Mac (10, 10), MacCatalyst (13, 1), TV (9, 0)] - public enum TKErrorCode : long - { + public enum TKErrorCode : long { NotImplemented = -1, CommunicationError = -2, CorruptedData = -3, @@ -38,8 +37,7 @@ public enum TKErrorCode : long #endif [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [Native] - public enum TKSmartCardSlotState : long - { + public enum TKSmartCardSlotState : long { Missing = 0, Empty = 1, Probing = 2, @@ -52,8 +50,7 @@ public enum TKSmartCardSlotState : long #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINCharset")] - public enum TKSmartCardPinCharset : long - { + public enum TKSmartCardPinCharset : long { Numeric = 0, Alphanumeric = 1, UpperAlphanumeric = 2, @@ -64,8 +61,7 @@ public enum TKSmartCardPinCharset : long #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINEncoding")] - public enum TKSmartCardPinEncoding : long - { + public enum TKSmartCardPinEncoding : long { Binary = 0, Ascii = 1, Bcd = 2, @@ -76,8 +72,7 @@ public enum TKSmartCardPinEncoding : long #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINJustification")] - public enum TKSmartCardPinJustification : long - { + public enum TKSmartCardPinJustification : long { Left = 0, Right = 1, } @@ -88,8 +83,7 @@ public enum TKSmartCardPinJustification : long [Flags] [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINCompletion")] - public enum TKSmartCardPinCompletion : ulong - { + public enum TKSmartCardPinCompletion : ulong { MaxLength = (1uL << 0), Key = (1uL << 1), Timeout = (1uL << 2), @@ -101,8 +95,7 @@ public enum TKSmartCardPinCompletion : ulong [Flags] [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Native ("TKSmartCardPINConfirmation")] - public enum TKSmartCardPinConfirmation : ulong - { + public enum TKSmartCardPinConfirmation : ulong { None = 0x0, New = (1uL << 0), Current = (1uL << 1), @@ -114,8 +107,7 @@ public enum TKSmartCardPinConfirmation : ulong [Flags] [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] [Native] - public enum TKSmartCardProtocol : ulong - { + public enum TKSmartCardProtocol : ulong { None = 0x0, T0 = (1uL << 0), T1 = (1uL << 1), @@ -128,8 +120,7 @@ public enum TKSmartCardProtocol : ulong #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [Native] - public enum TKTokenOperation : long - { + public enum TKTokenOperation : long { None = 0, ReadData = 1, SignData = 2, @@ -142,8 +133,7 @@ public enum TKTokenOperation : long #endif [iOS (13, 0), Mac (10, 12), MacCatalyst (13, 1), TV (13, 0)] [Protocol] - interface TKSmartCardTokenDriverDelegate : TKTokenDriverDelegate - { + interface TKSmartCardTokenDriverDelegate : TKTokenDriverDelegate { [Abstract] [Export ("tokenDriver:createTokenForSmartCard:AID:error:")] [return: NullAllowed] @@ -153,15 +143,14 @@ interface TKSmartCardTokenDriverDelegate : TKTokenDriverDelegate #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - interface ITKSmartCardTokenDriverDelegate {} + interface ITKSmartCardTokenDriverDelegate { } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [Protocol] - interface TKSmartCardUserInteractionDelegate - { + interface TKSmartCardUserInteractionDelegate { [Export ("characterEnteredInUserInteraction:")] void CharacterEntered (TKSmartCardUserInteraction interaction); @@ -187,16 +176,15 @@ interface TKSmartCardUserInteractionDelegate #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - interface ITKSmartCardUserInteractionDelegate {} + interface ITKSmartCardUserInteractionDelegate { } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [Protocol, Model] - [BaseType (typeof(NSObject))] - interface TKTokenDelegate - { + [BaseType (typeof (NSObject))] + interface TKTokenDelegate { [Abstract] [Export ("token:createSessionWithError:")] [return: NullAllowed] @@ -209,17 +197,16 @@ interface TKTokenDelegate #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - interface ITKTokenDelegate {} + interface ITKTokenDelegate { } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [Protocol, Model] - [BaseType (typeof(NSObject))] - interface TKTokenDriverDelegate - { - [TV (14,0), Mac (10,15), iOS (14,0)] + [BaseType (typeof (NSObject))] + interface TKTokenDriverDelegate { + [TV (14, 0), Mac (10, 15), iOS (14, 0)] [Export ("tokenDriver:tokenForConfiguration:error:")] [return: NullAllowed] TKToken GetToken (TKTokenDriver driver, TKTokenConfiguration configuration, [NullAllowed] out NSError error); @@ -231,16 +218,15 @@ interface TKTokenDriverDelegate #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - interface ITKTokenDriverDelegate {} + interface ITKTokenDriverDelegate { } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [Protocol, Model] - [BaseType (typeof(NSObject))] - interface TKTokenSessionDelegate - { + [BaseType (typeof (NSObject))] + interface TKTokenSessionDelegate { [Export ("tokenSession:beginAuthForOperation:constraint:error:")] [return: NullAllowed] TKTokenAuthOperation BeginAuthentication (TKTokenSession session, TKTokenOperation operation, NSObject constraint, [NullAllowed] out NSError error); @@ -264,15 +250,14 @@ interface TKTokenSessionDelegate #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif - interface ITKTokenSessionDelegate {} + interface ITKTokenSessionDelegate { } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKTlvRecord), Name = "TKBERTLVRecord")] - interface TKBerTlvRecord - { + [BaseType (typeof (TKTlvRecord), Name = "TKBERTLVRecord")] + interface TKBerTlvRecord { [Static] [Export ("dataForTag:")] NSData GetData (ulong tag); @@ -281,16 +266,15 @@ interface TKBerTlvRecord NativeHandle Constructor (ulong tag, NSData value); [Export ("initWithTag:records:")] - NativeHandle Constructor (ulong tag, TKTlvRecord[] records); + NativeHandle Constructor (ulong tag, TKTlvRecord [] records); } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKTlvRecord), Name = "TKCompactTLVRecord")] - interface TKCompactTlvRecord - { + [BaseType (typeof (TKTlvRecord), Name = "TKCompactTLVRecord")] + interface TKCompactTlvRecord { [Export ("initWithTag:value:")] NativeHandle Constructor (byte tag, NSData value); } @@ -299,9 +283,8 @@ interface TKCompactTlvRecord [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKTlvRecord), Name = "TKSimpleTLVRecord")] - interface TKSimpleTlvRecord - { + [BaseType (typeof (TKTlvRecord), Name = "TKSimpleTLVRecord")] + interface TKSimpleTlvRecord { [Export ("initWithTag:value:")] NativeHandle Constructor (byte tag, NSData value); } @@ -320,9 +303,8 @@ interface TKSimpleTlvRecord [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(NSObject))] - interface TKSmartCard - { + [BaseType (typeof (NSObject))] + interface TKSmartCard { [Export ("slot")] TKSmartCardSlot Slot { get; } @@ -377,11 +359,11 @@ interface TKSmartCard [Export ("sendIns:p1:p2:data:le:reply:")] void Send (byte ins, byte p1, byte p2, [NullAllowed] NSData requestData, [NullAllowed] NSNumber le, TKSmartCardSendCallback reply); - [Mac (10,12)] + [Mac (10, 12)] [Export ("inSessionWithError:executeBlock:")] bool ExecuteBlock ([NullAllowed] out NSError error, TKSmartCardExecuteCallback block); - [Mac (10,12)] + [Mac (10, 12)] [Export ("sendIns:p1:p2:data:le:sw:error:")] [return: NullAllowed] NSData Send (byte ins, byte p1, byte p2, [NullAllowed] NSData requestData, [NullAllowed] NSNumber le, out ushort sw, [NullAllowed] out NSError error); @@ -391,10 +373,9 @@ interface TKSmartCard [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(NSObject), Name = "TKSmartCardATR")] + [BaseType (typeof (NSObject), Name = "TKSmartCardATR")] [DisableDefaultCtor] - interface TKSmartCardAtr - { + interface TKSmartCardAtr { [Export ("initWithBytes:")] NativeHandle Constructor (NSData bytes); @@ -405,8 +386,8 @@ interface TKSmartCardAtr NSData Bytes { get; } [Export ("protocols")] - [BindAs (typeof (TKSmartCardProtocol[]))] - NSNumber[] Protocols { get; } + [BindAs (typeof (TKSmartCardProtocol []))] + NSNumber [] Protocols { get; } // -(TKSmartCardATRInterfaceGroup * _Nullable)interfaceGroupAtIndex:(NSInteger)index; [Export ("interfaceGroupAtIndex:")] @@ -423,16 +404,15 @@ interface TKSmartCardAtr [Mac (10, 12)] [Export ("historicalRecords")] [NullAllowed] - TKCompactTlvRecord[] HistoricalRecords { get; } + TKCompactTlvRecord [] HistoricalRecords { get; } } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(NSObject), Name = "TKSmartCardATRInterfaceGroup")] - interface TKSmartCardAtrInterfaceGroup - { + [BaseType (typeof (NSObject), Name = "TKSmartCardATRInterfaceGroup")] + interface TKSmartCardAtrInterfaceGroup { [NullAllowed, Export ("TA")] NSNumber TA { get; } @@ -453,10 +433,9 @@ interface TKSmartCardAtrInterfaceGroup [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKTokenSession - { + interface TKTokenSession { [Export ("initWithToken:")] [DesignatedInitializer] NativeHandle Constructor (TKToken token); @@ -476,9 +455,8 @@ interface TKTokenSession [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(NSObject), Name = "TKSmartCardPINFormat")] - interface TKSmartCardPinFormat - { + [BaseType (typeof (NSObject), Name = "TKSmartCardPINFormat")] + interface TKSmartCardPinFormat { [Export ("charset", ArgumentSemantic.Assign)] TKSmartCardPinCharset Charset { get; set; } @@ -511,9 +489,8 @@ interface TKSmartCardPinFormat [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(NSObject))] - interface TKSmartCardSlot - { + [BaseType (typeof (NSObject))] + interface TKSmartCardSlot { [Export ("state")] TKSmartCardSlotState State { get; } @@ -543,22 +520,21 @@ interface TKSmartCardSlot [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 10), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKSmartCardSlotManager - { + interface TKSmartCardSlotManager { [Static] [NullAllowed, Export ("defaultManager")] TKSmartCardSlotManager DefaultManager { get; } [Export ("slotNames")] - string[] SlotNames { get; } + string [] SlotNames { get; } [Export ("getSlotWithName:reply:")] [Async] void GetSlot (string name, TKGetSlotCallback reply); - [Mac (10,13)] + [Mac (10, 13)] [Export ("slotNamed:")] [return: NullAllowed] TKSmartCardSlot GetSlot (string name); @@ -568,9 +544,8 @@ interface TKSmartCardSlotManager [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKToken))] - interface TKSmartCardToken - { + [BaseType (typeof (TKToken))] + interface TKSmartCardToken { [Export ("initWithSmartCard:AID:instanceID:tokenDriver:")] [DesignatedInitializer] NativeHandle Constructor (TKSmartCard smartCard, [NullAllowed] NSData aid, string instanceId, TKSmartCardTokenDriver tokenDriver); @@ -584,17 +559,15 @@ interface TKSmartCardToken #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] [BaseType (typeof (TKTokenDriver))] - interface TKSmartCardTokenDriver - { + interface TKSmartCardTokenDriver { } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKTokenSession))] - interface TKSmartCardTokenSession - { + [BaseType (typeof (TKTokenSession))] + interface TKSmartCardTokenSession { // Re-implemented from base class. [Export ("initWithToken:")] [DesignatedInitializer] @@ -608,9 +581,8 @@ interface TKSmartCardTokenSession [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(NSObject))] - interface TKSmartCardUserInteraction - { + [BaseType (typeof (NSObject))] + interface TKSmartCardUserInteraction { [Wrap ("WeakDelegate")] [NullAllowed] ITKSmartCardUserInteractionDelegate Delegate { get; set; } @@ -636,15 +608,14 @@ interface TKSmartCardUserInteraction [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(TKSmartCardUserInteraction), Name = "TKSmartCardUserInteractionForPINOperation")] - interface TKSmartCardUserInteractionForPinOperation - { + [BaseType (typeof (TKSmartCardUserInteraction), Name = "TKSmartCardUserInteractionForPINOperation")] + interface TKSmartCardUserInteractionForPinOperation { [Export ("PINCompletion", ArgumentSemantic.Assign)] TKSmartCardPinCompletion PinCompletion { get; set; } // not clear from the documentation if we can BindAs this to something or not [NullAllowed, Export ("PINMessageIndices", ArgumentSemantic.Assign)] - NSNumber[] PinMessageIndices { get; set; } + NSNumber [] PinMessageIndices { get; set; } [NullAllowed, Export ("locale", ArgumentSemantic.Assign)] NSLocale Locale { get; set; } @@ -660,9 +631,8 @@ interface TKSmartCardUserInteractionForPinOperation [Experimental ("APL0001")] #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] - [BaseType (typeof(TKSmartCardUserInteractionForPinOperation), Name = "TKSmartCardUserInteractionForSecurePINChange")] - interface TKSmartCardUserInteractionForSecurePinChange - { + [BaseType (typeof (TKSmartCardUserInteractionForPinOperation), Name = "TKSmartCardUserInteractionForSecurePINChange")] + interface TKSmartCardUserInteractionForSecurePinChange { [Export ("PINConfirmation", ArgumentSemantic.Assign)] TKSmartCardPinConfirmation PinConfirmation { get; set; } } @@ -672,18 +642,16 @@ interface TKSmartCardUserInteractionForSecurePinChange #endif [iOS (13, 0), Mac (10, 11), MacCatalyst (13, 1), TV (13, 0)] [BaseType (typeof (TKSmartCardUserInteractionForPinOperation), Name = "TKSmartCardUserInteractionForSecurePINVerification")] - interface TKSmartCardUserInteractionForSecurePinVerification - { + interface TKSmartCardUserInteractionForSecurePinVerification { } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject), Name = "TKTLVRecord")] + [BaseType (typeof (NSObject), Name = "TKTLVRecord")] [DisableDefaultCtor] - interface TKTlvRecord - { + interface TKTlvRecord { [Export ("tag")] ulong Tag { get; } @@ -701,17 +669,16 @@ interface TKTlvRecord [Static] [Export ("sequenceOfRecordsFromData:")] [return: NullAllowed] - TKTlvRecord[] CreateSequenceOfRecords (NSData data); + TKTlvRecord [] CreateSequenceOfRecords (NSData data); } #if !STABLE_CRYPTOTOKENKIT [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKToken - { + interface TKToken { [Export ("initWithTokenDriver:instanceID:")] [DesignatedInitializer] NativeHandle Constructor (TKTokenDriver tokenDriver, string instanceId); @@ -738,9 +705,8 @@ interface TKToken [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] - interface TKTokenAuthOperation : NSSecureCoding - { + [BaseType (typeof (NSObject))] + interface TKTokenAuthOperation : NSSecureCoding { [Export ("finishWithError:")] bool Finish ([NullAllowed] out NSError error); } @@ -749,10 +715,9 @@ interface TKTokenAuthOperation : NSSecureCoding [Experimental ("APL0001")] #endif [iOS (14, 0), Mac (10, 15), MacCatalyst (14, 0), TV (14, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKTokenConfiguration - { + interface TKTokenConfiguration { [Export ("instanceID")] string InstanceId { get; } @@ -760,7 +725,7 @@ interface TKTokenConfiguration NSData ConfigurationData { get; set; } [Export ("keychainItems", ArgumentSemantic.Copy)] - TKTokenKeychainItem[] KeychainItems { get; set; } + TKTokenKeychainItem [] KeychainItems { get; set; } [Export ("keyForObjectID:error:")] [return: NullAllowed] @@ -775,9 +740,8 @@ interface TKTokenConfiguration [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] - interface TKTokenDriver - { + [BaseType (typeof (NSObject))] + interface TKTokenDriver { [Wrap ("WeakDelegate")] [NullAllowed] ITKTokenDriverDelegate Delegate { get; set; } @@ -790,10 +754,9 @@ interface TKTokenDriver [Experimental ("APL0001")] #endif [iOS (14, 0), Mac (10, 15), MacCatalyst (14, 0), TV (14, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKTokenDriverConfiguration - { + interface TKTokenDriverConfiguration { [Static] [Export ("driverConfigurations")] NSDictionary DriverConfigurations { get; } @@ -815,10 +778,9 @@ interface TKTokenDriverConfiguration [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKTokenKeyAlgorithm - { + interface TKTokenKeyAlgorithm { [Export ("isAlgorithm:")] bool IsAlgorithm ([BindAs (typeof (SecKeyAlgorithm))] NSString algorithm); @@ -830,9 +792,8 @@ interface TKTokenKeyAlgorithm [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKTokenKeychainItem))] - interface TKTokenKeychainCertificate - { + [BaseType (typeof (TKTokenKeychainItem))] + interface TKTokenKeychainCertificate { [Export ("initWithCertificate:objectID:")] [DesignatedInitializer] NativeHandle Constructor ([BindAs (typeof (SecKeyAlgorithm))] NSString certificateRef, NSObject objectId); @@ -845,15 +806,14 @@ interface TKTokenKeychainCertificate [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKTokenKeychainContents - { + interface TKTokenKeychainContents { [Export ("fillWithItems:")] - void Fill (TKTokenKeychainItem[] items); + void Fill (TKTokenKeychainItem [] items); [Export ("items", ArgumentSemantic.Copy)] - TKTokenKeychainItem[] Items { get; } + TKTokenKeychainItem [] Items { get; } [Export ("keyForObjectID:error:")] [return: NullAllowed] @@ -868,10 +828,9 @@ interface TKTokenKeychainContents [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKTokenKeychainItem - { + interface TKTokenKeychainItem { [Export ("initWithObjectID:")] [DesignatedInitializer] NativeHandle Constructor (NSObject objectId); @@ -890,9 +849,8 @@ interface TKTokenKeychainItem [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKTokenKeychainItem))] - interface TKTokenKeychainKey - { + [BaseType (typeof (TKTokenKeychainItem))] + interface TKTokenKeychainKey { [Export ("initWithCertificate:objectID:")] [DesignatedInitializer] NativeHandle Constructor (IntPtr certificate, NSObject objectId); @@ -932,9 +890,8 @@ interface TKTokenKeychainKey [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] - interface TKTokenKeyExchangeParameters - { + [BaseType (typeof (NSObject))] + interface TKTokenKeyExchangeParameters { [Export ("requestedSize")] nint RequestedSize { get; } @@ -946,9 +903,8 @@ interface TKTokenKeyExchangeParameters [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKTokenAuthOperation))] - interface TKTokenPasswordAuthOperation - { + [BaseType (typeof (TKTokenAuthOperation))] + interface TKTokenPasswordAuthOperation { [NullAllowed, Export ("password")] string Password { get; set; } } @@ -957,9 +913,8 @@ interface TKTokenPasswordAuthOperation [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(TKTokenAuthOperation), Name = "TKTokenSmartCardPINAuthOperation")] - interface TKTokenSmartCardPinAuthOperation - { + [BaseType (typeof (TKTokenAuthOperation), Name = "TKTokenSmartCardPINAuthOperation")] + interface TKTokenSmartCardPinAuthOperation { [Export ("PINFormat", ArgumentSemantic.Assign)] TKSmartCardPinFormat PinFormat { get; set; } @@ -980,11 +935,10 @@ interface TKTokenSmartCardPinAuthOperation [Experimental ("APL0001")] #endif [iOS (10, 0), Mac (10, 12), MacCatalyst (13, 1), TV (11, 0)] - [BaseType (typeof(NSObject))] - interface TKTokenWatcher - { + [BaseType (typeof (NSObject))] + interface TKTokenWatcher { [Export ("tokenIDs")] - string[] TokenIds { get; } + string [] TokenIds { get; } // -(instancetype _Nonnull)initWithInsertionHandler:(void (^ _Nonnull)(NSString * _Nonnull))insertionHandler __attribute__((availability(macos, introduced=10.12, deprecated=10.13))) __attribute__((availability(ios, introduced=10.0, deprecated=11.0))); [Deprecated (PlatformName.MacOSX, 10, 13, "Use the default constructor followed by a call to the 'SetInsertionHandler' method.")] @@ -1011,10 +965,9 @@ interface TKTokenWatcher [Experimental ("APL0001")] #endif [iOS (15, 0), Mac (12, 0), MacCatalyst (15, 0), TV (15, 0)] - [BaseType (typeof(NSObject))] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface TKTokenWatcherTokenInfo - { + interface TKTokenWatcherTokenInfo { [Export ("tokenID")] string TokenId { get; } diff --git a/src/eventkit.cs b/src/eventkit.cs index 00c950adde57..1727818fcdbd 100644 --- a/src/eventkit.cs +++ b/src/eventkit.cs @@ -455,7 +455,7 @@ interface EKRecurrenceEnd : NSCopying, NSSecureCoding { interface EKRecurrenceDayOfWeek : NSCopying, NSSecureCoding { [Export ("dayOfTheWeek")] #if NET - EKWeekday DayOfTheWeek { get; } + EKWeekday DayOfTheWeek { get; } #else nint DayOfTheWeek { get; } #endif diff --git a/src/foundation.cs b/src/foundation.cs index 258609434527..b6077cd924b1 100644 --- a/src/foundation.cs +++ b/src/foundation.cs @@ -6015,7 +6015,9 @@ string SuggestedInvocationPhrase { #if HAS_APPCLIP // Inlined from NSUserActivity (AppClip) - [iOS (14,0)][NoTV][NoMac] + [iOS (14, 0)] + [NoTV] + [NoMac] [MacCatalyst (14, 0)] [Export ("appClipActivationPayload", ArgumentSemantic.Strong)] [NullAllowed] @@ -9466,7 +9468,7 @@ interface NSLinguisticAnalysis { [Wrap ("GetLinguisticTags (This, range, scheme.GetConstant ()!, options, orthography, out tokenRanges)")] #if NET - NSLinguisticTag[] GetLinguisticTags (NSRange range, NSLinguisticTagScheme scheme, NSLinguisticTaggerOptions options, [NullAllowed] NSOrthography orthography, [NullAllowed] out NSValue[] tokenRanges); + NSLinguisticTag [] GetLinguisticTags (NSRange range, NSLinguisticTagScheme scheme, NSLinguisticTaggerOptions options, [NullAllowed] NSOrthography orthography, [NullAllowed] out NSValue [] tokenRanges); #else NSLinguisticTagUnit [] GetLinguisticTags (NSRange range, NSLinguisticTagScheme scheme, NSLinguisticTaggerOptions options, [NullAllowed] NSOrthography orthography, [NullAllowed] out NSValue [] tokenRanges); #endif @@ -9666,9 +9668,11 @@ interface NSObject2 : NSObjectProtocol { [Export ("exposedBindings")] NSString [] ExposedBindings (); #else - [NoiOS][NoMacCatalyst][NoTV] + [NoiOS] + [NoMacCatalyst] + [NoTV] [Export ("exposedBindings")] - NSString[] ExposedBindings { get; } + NSString [] ExposedBindings { get; } #endif #if !NET @@ -14921,20 +14925,24 @@ interface NSFileProviderService { #if MONOMAC partial interface NSFilePresenter { - [NoiOS][NoMacCatalyst][NoTV] + [NoiOS] + [NoMacCatalyst] + [NoTV] [NullAllowed] [Export ("primaryPresentedItemURL")] NSUrl PrimaryPresentedItemUrl { get; } } - [NoiOS][NoMacCatalyst][NoTV] - [Deprecated (PlatformName.MacOSX, 12, 0, message : "Use the Network.framework instead.")] + [NoiOS] + [NoMacCatalyst] + [NoTV] + [Deprecated (PlatformName.MacOSX, 12, 0, message: "Use the Network.framework instead.")] [BaseType (typeof (NSObject))] [DisableDefaultCtor] partial interface NSHost { [Static, Internal, Export ("currentHost")] - NSHost _Current { get;} + NSHost _Current { get; } [Static, Internal, Export ("hostWithName:")] NSHost _FromName ([NullAllowed] string name); @@ -14961,7 +14969,7 @@ partial interface NSHost { string _Address { get; } [Internal, Export ("addresses")] - string [] _Addresses { get; } + string [] _Addresses { get; } [Export ("hash"), Internal] nuint _Hash { get; } @@ -17659,7 +17667,8 @@ interface NSUrlSessionWebSocketTask { [TV (13, 0), iOS (13, 0)] [MacCatalyst (13, 1)] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] diff --git a/src/gamekit.cs b/src/gamekit.cs index 8481c3ce6f1b..407a381b191f 100644 --- a/src/gamekit.cs +++ b/src/gamekit.cs @@ -58,10 +58,10 @@ namespace GameKit { delegate void GKEntriesForPlayersHandler (GKLeaderboardEntry localPlayerEntry, GKLeaderboardEntry [] entries, NSError error); #if MONOMAC - delegate void GKImageLoadedHandler (NSImage image, NSError error); + delegate void GKImageLoadedHandler (NSImage image, NSError error); delegate void GKPlayerPhotoLoaded (NSImage photo, NSError error); delegate void GKChallengeComposeHandler (NSViewController composeController, bool issuedChallenge, string [] sentPlayerIDs); - delegate void GKChallengeComposeHandler2 (NSViewController composeController, bool issuedChallenge, GKPlayer[] sentPlayers); + delegate void GKChallengeComposeHandler2 (NSViewController composeController, bool issuedChallenge, GKPlayer [] sentPlayers); #else delegate void GKImageLoadedHandler (UIImage image, NSError error); delegate void GKPlayerPhotoLoaded (UIImage photo, NSError error); @@ -765,8 +765,8 @@ interface GKLeaderboardViewControllerDelegate { [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'GKGameCenterViewController' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'GKGameCenterViewController' instead.")] #if MONOMAC - [BaseType (typeof (GKGameCenterViewController), Events=new Type [] { typeof (GKLeaderboardViewControllerDelegate)}, Delegates=new string [] {"WeakDelegate"})] - interface GKLeaderboardViewController + [BaseType (typeof (GKGameCenterViewController), Events = new Type [] { typeof (GKLeaderboardViewControllerDelegate) }, Delegates = new string [] { "WeakDelegate" })] + interface GKLeaderboardViewController #else [BaseType (typeof (GKGameCenterViewController), Events = new Type [] { typeof (GKLeaderboardViewControllerDelegate) }, Delegates = new string [] { "WeakDelegate" })] interface GKLeaderboardViewController : UIAppearance @@ -1466,7 +1466,7 @@ interface GKMatchmaker { [MacCatalyst (13, 1)] #if MONOMAC - [BaseType (typeof (NSViewController), Delegates=new string [] { "WeakMatchmakerDelegate" }, Events=new Type [] {typeof(GKMatchmakerViewControllerDelegate)})] + [BaseType (typeof (NSViewController), Delegates = new string [] { "WeakMatchmakerDelegate" }, Events = new Type [] { typeof (GKMatchmakerViewControllerDelegate) })] #else [BaseType (typeof (UINavigationController), Delegates = new string [] { "WeakMatchmakerDelegate" }, Events = new Type [] { typeof (GKMatchmakerViewControllerDelegate) })] #endif @@ -1839,8 +1839,8 @@ interface GKAchievementViewControllerDelegate { [Deprecated (PlatformName.MacOSX, 10, 10, message: "Use 'GKGameCenterViewController' instead.")] [Deprecated (PlatformName.MacCatalyst, 13, 1, message: "Use 'GKGameCenterViewController' instead.")] #if MONOMAC - [BaseType (typeof (GKGameCenterViewController), Events=new Type [] { typeof (GKAchievementViewControllerDelegate)}, Delegates=new string [] {"WeakDelegate"})] - interface GKAchievementViewController + [BaseType (typeof (GKGameCenterViewController), Events = new Type [] { typeof (GKAchievementViewControllerDelegate) }, Delegates = new string [] { "WeakDelegate" })] + interface GKAchievementViewController #else [BaseType (typeof (GKGameCenterViewController), Events = new Type [] { typeof (GKAchievementViewControllerDelegate) }, Delegates = new string [] { "WeakDelegate" })] interface GKAchievementViewController : UIAppearance @@ -1885,7 +1885,7 @@ interface GKDialogController { [NoTV] [Deprecated (PlatformName.MacCatalyst, 13, 1)] #if MONOMAC - [BaseType (typeof (NSViewController), Events=new Type [] { typeof (GKFriendRequestComposeViewControllerDelegate)}, Delegates=new string[] {"WeakComposeViewDelegate"})] + [BaseType (typeof (NSViewController), Events = new Type [] { typeof (GKFriendRequestComposeViewControllerDelegate) }, Delegates = new string [] { "WeakComposeViewDelegate" })] interface GKFriendRequestComposeViewController : GKViewController { [Export ("initWithNibName:bundle:")] [NoiOS] diff --git a/src/healthkit.cs b/src/healthkit.cs index a6acc3a0510a..52cc1a2262ec 100644 --- a/src/healthkit.cs +++ b/src/healthkit.cs @@ -220,7 +220,7 @@ public enum HKAudiogramSensitivityTestSide : long { #if NET /// The completion handler for . /// Completion handler for anchored object queries. - delegate void HKAnchoredObjectResultHandler (HKAnchoredObjectQuery query, HKSample[] results, nuint newAnchor, NSError error); + delegate void HKAnchoredObjectResultHandler (HKAnchoredObjectQuery query, HKSample [] results, nuint newAnchor, NSError error); #else delegate void HKAnchoredObjectResultHandler2 (HKAnchoredObjectQuery query, HKSample [] results, nuint newAnchor, NSError error); diff --git a/src/mapkit.cs b/src/mapkit.cs index 2a5bfe34006e..3a4245405bf5 100644 --- a/src/mapkit.cs +++ b/src/mapkit.cs @@ -28,11 +28,11 @@ using System; #if MONOMAC -using UIImage=AppKit.NSImage; -using UIView=AppKit.NSView; -using UIEdgeInsets=AppKit.NSEdgeInsets; -using UIColor=AppKit.NSColor; -using UIScene=AppKit.NSColor; +using UIImage = AppKit.NSImage; +using UIView = AppKit.NSView; +using UIEdgeInsets = AppKit.NSEdgeInsets; +using UIColor = AppKit.NSColor; +using UIScene = AppKit.NSColor; using UIControl = AppKit.NSControl; using UIBarButtonItem = Foundation.NSObject; using UIViewController = AppKit.NSViewController; diff --git a/src/mediaextension.cs b/src/mediaextension.cs index b7a7883c2c46..8706da954203 100644 --- a/src/mediaextension.cs +++ b/src/mediaextension.cs @@ -11,11 +11,10 @@ using UniformTypeIdentifiers; namespace MediaExtension { - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Native] [ErrorDomain ("MediaExtensionErrorDomain")] - public enum MEError : long - { + public enum MEError : long { UnsupportedFeature = -19320, AllocationFailure = -19321, InvalidParameter = -19322, @@ -30,37 +29,33 @@ public enum MEError : long ReferenceMissing = -19331, } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Native] - public enum MEFileInfoFragmentsStatus : long - { + public enum MEFileInfoFragmentsStatus : long { CouldNotContainFragments = 0, ContainsFragments = 1, CouldContainButDoesNotContainFragments = 2, } - [Flags, NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [Flags, NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Native] - public enum MEFormatReaderParseAdditionalFragmentsStatus : ulong - { + public enum MEFormatReaderParseAdditionalFragmentsStatus : ulong { SizeIncreased = 1uL << 0, FragmentAdded = 1uL << 1, FragmentsComplete = 1uL << 2, } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject))] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface MEFormatReaderInstantiationOptions : NSCopying - { + interface MEFormatReaderInstantiationOptions : NSCopying { [Export ("allowIncrementalFragmentParsing")] bool AllowIncrementalFragmentParsing { get; } } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface MEFormatReaderExtension - { + interface MEFormatReaderExtension { [Abstract] [Export ("formatReaderWithByteSource:options:error:")] [return: NullAllowed] @@ -68,14 +63,13 @@ interface MEFormatReaderExtension } delegate void MEFormatReaderLoadFileInfoCallback ([NullAllowed] MEFileInfo fileInfo, [NullAllowed] NSError error); - delegate void MEFormatReaderLoadMetadataCallback ([NullAllowed] AVMetadataItem[] metadata, [NullAllowed] NSError error); - delegate void MEFormatReaderLoadTrackReadersCallback ([NullAllowed] IMETrackReader[] trackReaders, [NullAllowed] NSError error); + delegate void MEFormatReaderLoadMetadataCallback ([NullAllowed] AVMetadataItem [] metadata, [NullAllowed] NSError error); + delegate void MEFormatReaderLoadTrackReadersCallback ([NullAllowed] IMETrackReader [] trackReaders, [NullAllowed] NSError error); delegate void MEFormatReaderParseAdditionalFragmentsCallback ([NullAllowed] MEFormatReaderParseAdditionalFragmentsStatus fragmentStatus, [NullAllowed] NSError error); - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface MEFormatReader - { + interface MEFormatReader { [Abstract] [Export ("loadFileInfoWithCompletionHandler:")] void LoadFileInfo (MEFormatReaderLoadFileInfoCallback completionHandler); @@ -94,10 +88,9 @@ interface MEFormatReader interface IMEFormatReader { } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject))] - interface MEFileInfo : NSCopying - { + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject))] + interface MEFileInfo : NSCopying { [Export ("duration", ArgumentSemantic.Assign)] CMTime Duration { get; set; } @@ -110,12 +103,11 @@ interface MEFileInfo : NSCopying delegate void METrackReaderLoadUneditedDurationCallback ([NullAllowed] CMTime uneditedDuration, [NullAllowed] NSError error); delegate void METrackReaderLoadTotalSampleDataLengthCallback (long totalSampleDataLength, [NullAllowed] NSError error); delegate void METrackReaderLoadEstimatedDataRateCallback (float estimatedDataRate, [NullAllowed] NSError error); - delegate void METrackReaderLoadMetadataCallback ([NullAllowed] AVMetadataItem[] metadata, [NullAllowed] NSError error); + delegate void METrackReaderLoadMetadataCallback ([NullAllowed] AVMetadataItem [] metadata, [NullAllowed] NSError error); - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface METrackReader - { + interface METrackReader { [Abstract] [Export ("loadTrackInfoWithCompletionHandler:")] void LoadTrackInfo (METrackReaderLoadTrackInfoCallback completionHandler); @@ -147,15 +139,14 @@ interface METrackReader interface IMETrackReader { } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject))] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface METrackInfo : NSCopying - { + interface METrackInfo : NSCopying { [Export ("initWithMediaType:trackID:formatDescriptions:")] [DesignatedInitializer] // It's not clear from the documentation which type the format descriptors are, so keep as an array of NSObject for now. - NativeHandle Constructor (CMMediaType mediaType, int trackId, [Params] NSObject[] formatDescriptions); + NativeHandle Constructor (CMMediaType mediaType, int trackId, [Params] NSObject [] formatDescriptions); [Export ("mediaType")] CMMediaType MediaType { get; } @@ -169,7 +160,7 @@ interface METrackInfo : NSCopying // It's not clear from the documentation which type the format descriptors are, so keep as an array of NSObject for now. // However, name as 'Weak' to leave the good name open for when we know. [Export ("formatDescriptions", ArgumentSemantic.Copy)] - NSObject[] WeakFormatDescriptions { get; } + NSObject [] WeakFormatDescriptions { get; } // Inlined from the OptionalProperties (METrackInfo) category [Export ("naturalTimescale")] @@ -178,7 +169,7 @@ interface METrackInfo : NSCopying // Inlined from the OptionalProperties (METrackInfo) category [Export ("trackEdits", ArgumentSemantic.Copy), NullAllowed] [BindAs (typeof (CMTimeMapping []))] - NSValue[] TrackEdits { get; set; } + NSValue [] TrackEdits { get; set; } // Inlined from the LanguageTagOptionalProperties (METrackInfo) category [NullAllowed, Export ("extendedLanguageTag")] @@ -206,10 +197,9 @@ interface METrackInfo : NSCopying delegate void MESampleCursorLoadSampleBufferCallback ([NullAllowed] CMSampleBuffer newSampleBuffer, [NullAllowed] NSError error); delegate void MESampleCursorLoadPostDecodeProcessingMetadataCallback ([NullAllowed] NSDictionary postDecodeProcessingMetadata, [NullAllowed] NSError error); - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface MESampleCursor : INSCopying - { + interface MESampleCursor : INSCopying { [Abstract] [Export ("presentationTimeStamp")] CMTime PresentationTimeStamp { get; } @@ -299,11 +289,10 @@ interface MESampleCursor : INSCopying interface IMESampleCursor { } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject))] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface MESampleCursorChunk : NSCopying - { + interface MESampleCursorChunk : NSCopying { [Export ("initWithByteSource:chunkStorageRange:chunkInfo:sampleIndexWithinChunk:")] [DesignatedInitializer] #if XAMCORE_5_0 @@ -338,11 +327,10 @@ interface MESampleCursorChunk : NSCopying nint SampleIndexWithinChunk { get; } } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject))] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface MESampleLocation : NSCopying - { + interface MESampleLocation : NSCopying { [Export ("initWithByteSource:sampleLocation:")] [DesignatedInitializer] NativeHandle Constructor (MEByteSource byteSource, AVSampleCursorStorageRange sampleLocation); @@ -354,11 +342,10 @@ interface MESampleLocation : NSCopying MEByteSource ByteSource { get; } } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject))] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface MEEstimatedSampleLocation : INSCopying - { + interface MEEstimatedSampleLocation : INSCopying { [Export ("initWithByteSource:estimatedSampleLocation:refinementDataLocation:")] [DesignatedInitializer] NativeHandle Constructor (MEByteSource byteSource, AVSampleCursorStorageRange estimatedSampleLocation, AVSampleCursorStorageRange refinementDataLocation); @@ -373,10 +360,9 @@ interface MEEstimatedSampleLocation : INSCopying MEByteSource ByteSource { get; } } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject), Name = "MEHEVCDependencyInfo")] - interface MEHevcDependencyInfo : INSCopying - { + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject), Name = "MEHEVCDependencyInfo")] + interface MEHevcDependencyInfo : INSCopying { [Export ("temporalSubLayerAccess")] bool TemporalSubLayerAccess { [Bind ("hasTemporalSubLayerAccess")] get; set; } @@ -418,11 +404,10 @@ interface MEHevcDependencyInfo : INSCopying delegate void MEByteSourceReadBytesCallback (nuint bytesRead, [NullAllowed] NSError error); delegate void MEByteSourceReadDataCallback ([NullAllowed] NSData data, [NullAllowed] NSError error); - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [BaseType (typeof (NSObject))] [DisableDefaultCtor] - interface MEByteSource - { + interface MEByteSource { [Export ("fileName")] string FileName { get; } @@ -433,7 +418,7 @@ interface MEByteSource long FileLength { get; } [Export ("relatedFileNamesInSameDirectory")] - string[] RelatedFileNamesInSameDirectory { get; } + string [] RelatedFileNamesInSameDirectory { get; } [Export ("readDataOfLength:fromOffset:toDestination:completionHandler:")] unsafe void ReadData (nuint length, long offset, byte* dest, MEByteSourceReadBytesCallback completionHandler); @@ -455,18 +440,16 @@ interface MEByteSource [Flags] [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Native] - public enum MEDecodeFrameStatus : ulong - { + public enum MEDecodeFrameStatus : ulong { NoStatus = 0, FrameDropped = 1uL << 0, } delegate void MEVideoDecoderDecodeFrameCallback ([NullAllowed] CVImageBuffer imageBuffer, MEDecodeFrameStatus decodeStatus, [NullAllowed] NSError error); - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface MEVideoDecoder - { + interface MEVideoDecoder { [Export ("producesRAWOutput")] bool ProducesRawOutput { get; } @@ -484,7 +467,7 @@ interface MEVideoDecoder // of (and not call themselves), in which case the manual code would be // useless. Thus there's no strongly typed binding for this property. [Export ("supportedPixelFormatsOrderedByQuality")] - NSNumber[] SupportedPixelFormatsOrderedByQuality { get; } + NSNumber [] SupportedPixelFormatsOrderedByQuality { get; } [Export ("reducedResolution", ArgumentSemantic.Assign)] CGSize ReducedResolution { get; set; } @@ -494,7 +477,7 @@ interface MEVideoDecoder // of (and not call themselves), in which case the manual code would be // useless. Thus there's no strongly typed binding for this property. [Export ("pixelFormatsWithReducedResolutionDecodeSupport")] - NSNumber[] PixelFormatsWithReducedResolutionDecodeSupport { get; } + NSNumber [] PixelFormatsWithReducedResolutionDecodeSupport { get; } [Abstract] [Export ("readyForMoreMediaData")] @@ -508,9 +491,9 @@ interface MEVideoDecoder bool CanAcceptFormatDescription (CMFormatDescription formatDescription); } - interface IMEVideoDecoder {} + interface IMEVideoDecoder { } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Static] interface MEVideoDecoderFields { [Notification] @@ -518,10 +501,9 @@ interface MEVideoDecoderFields { NSString ReadyForMoreMediaDataDidChangeNotification { get; } } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false, Name = "MERAWProcessorExtension")] - interface MERawProcessorExtension - { + interface MERawProcessorExtension { [Abstract] [Export ("init")] NativeHandle Constructor (); @@ -532,10 +514,9 @@ interface MERawProcessorExtension IMERawProcessor CreateProcessor (CMVideoFormatDescription formatDescription, MERawProcessorPixelBufferManager extensionPixelBufferManager, [NullAllowed] out NSError error); } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject), Name = "MERAWProcessorPixelBufferManager")] - interface MERawProcessorPixelBufferManager - { + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject), Name = "MERAWProcessorPixelBufferManager")] + interface MERawProcessorPixelBufferManager { [Export ("pixelBufferAttributes", ArgumentSemantic.Copy)] NSDictionary PixelBufferAttributes { get; set; } @@ -544,10 +525,9 @@ interface MERawProcessorPixelBufferManager CVPixelBuffer CreatePixelBuffer ([NullAllowed] out NSError error); } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject), Name = "MERAWProcessingParameter")] - interface MERawProcessingParameter - { + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject), Name = "MERAWProcessingParameter")] + interface MERawProcessingParameter { [Export ("name")] string Name { get; } @@ -561,10 +541,9 @@ interface MERawProcessingParameter bool Enabled { get; set; } } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingListElementParameter")] - interface MERawProcessingListElementParameter - { + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (MERawProcessingParameter), Name = "MERAWProcessingListElementParameter")] + interface MERawProcessingListElementParameter { [Export ("initWithName:description:elementID:")] NativeHandle Constructor (string name, string description, nint elementId); @@ -572,11 +551,10 @@ interface MERawProcessingListElementParameter nint ListElementId { get; } } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingBooleanParameter")] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (MERawProcessingParameter), Name = "MERAWProcessingBooleanParameter")] [DisableDefaultCtor] - interface MERawProcessingBooleanParameter - { + interface MERawProcessingBooleanParameter { [Export ("initWithName:key:description:initialValue:")] NativeHandle Constructor (string name, string key, string description, bool initialValue); @@ -605,11 +583,10 @@ interface MERawProcessingBooleanParameter bool HasCameraValue ([NullAllowed] out bool cameraValue); } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingIntegerParameter")] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (MERawProcessingParameter), Name = "MERAWProcessingIntegerParameter")] [DisableDefaultCtor] - interface MERawProcessingIntegerParameter - { + interface MERawProcessingIntegerParameter { [Export ("initWithName:key:description:initialValue:maximum:minimum:")] NativeHandle Constructor (string name, string key, string description, nint initialValue, nint maximum, nint minimum); @@ -644,11 +621,10 @@ interface MERawProcessingIntegerParameter bool HasCameraValue ([NullAllowed] out nint cameraValue); } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingFloatParameter")] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (MERawProcessingParameter), Name = "MERAWProcessingFloatParameter")] [DisableDefaultCtor] - interface MERawProcessingFloatParameter - { + interface MERawProcessingFloatParameter { [Export ("initWithName:key:description:initialValue:maximum:minimum:")] NativeHandle Constructor (string name, string key, string description, float initialValue, float maximum, float minimum); @@ -683,28 +659,27 @@ interface MERawProcessingFloatParameter bool HasCameraValue ([NullAllowed] out float cameraValue); } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingListParameter")] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (MERawProcessingParameter), Name = "MERAWProcessingListParameter")] [DisableDefaultCtor] - interface MERawProcessingListParameter - { + interface MERawProcessingListParameter { [Export ("initWithName:key:description:list:initialValue:")] - NativeHandle Constructor (string name, string key, string description, MERawProcessingListElementParameter[] listElements, nint initialValue); + NativeHandle Constructor (string name, string key, string description, MERawProcessingListElementParameter [] listElements, nint initialValue); [Internal] [Export ("initWithName:key:description:list:initialValue:neutralValue:")] - NativeHandle _InitWithNeutralValue (string name, string key, string description, MERawProcessingListElementParameter[] listElements, nint initialValue, nint neutralValue); + NativeHandle _InitWithNeutralValue (string name, string key, string description, MERawProcessingListElementParameter [] listElements, nint initialValue, nint neutralValue); [Internal] [Export ("initWithName:key:description:list:initialValue:cameraValue:")] - NativeHandle _InitWithCameraValue (string name, string key, string description, MERawProcessingListElementParameter[] listElements, nint initialValue, nint cameraValue); + NativeHandle _InitWithCameraValue (string name, string key, string description, MERawProcessingListElementParameter [] listElements, nint initialValue, nint cameraValue); [Export ("initWithName:key:description:list:initialValue:neutralValue:cameraValue:")] [DesignatedInitializer] - NativeHandle Constructor (string name, string key, string description, MERawProcessingListElementParameter[] listElements, nint initialValue, nint neutralValue, nint cameraValue); + NativeHandle Constructor (string name, string key, string description, MERawProcessingListElementParameter [] listElements, nint initialValue, nint neutralValue, nint cameraValue); [Export ("listElements")] - MERawProcessingListElementParameter[] ListElements { get; } + MERawProcessingListElementParameter [] ListElements { get; } [Export ("initialValue")] nint InitialValue { get; } @@ -719,24 +694,22 @@ interface MERawProcessingListParameter bool HasCameraValue ([NullAllowed] out nint cameraValue); } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(MERawProcessingParameter), Name = "MERAWProcessingSubGroupParameter")] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (MERawProcessingParameter), Name = "MERAWProcessingSubGroupParameter")] [DisableDefaultCtor] - interface MERawProcessingSubGroupParameter - { + interface MERawProcessingSubGroupParameter { [Export ("initWithName:description:parameters:")] - NativeHandle Constructor (string name, string description, MERawProcessingParameter[] parameters); + NativeHandle Constructor (string name, string description, MERawProcessingParameter [] parameters); [Export ("subGroupParameters")] - MERawProcessingParameter[] SubGroupParameters { get; } + MERawProcessingParameter [] SubGroupParameters { get; } } delegate void MERawProcessorProcessFrameCallback ([NullAllowed] CVPixelBuffer pixelBuffer, [NullAllowed] NSError error); - [NoTV, NoiOS, Mac (15,0), MacCatalyst (18, 0)] + [NoTV, NoiOS, Mac (15, 0), MacCatalyst (18, 0)] [Protocol (BackwardsCompatibleCodeGeneration = false, Name = "MERAWProcessor")] - interface MERawProcessor - { + interface MERawProcessor { [Export ("metalDeviceRegistryID")] ulong MetalDeviceRegistryId { get; set; } @@ -745,7 +718,7 @@ interface MERawProcessor [Abstract] [Export ("processingParameters")] - MERawProcessingParameter[] ProcessingParameters { get; } + MERawProcessingParameter [] ProcessingParameters { get; } [Abstract] [Export ("readyForMoreMediaData")] @@ -756,10 +729,9 @@ interface MERawProcessor void ProcessFrame (CVPixelBuffer inputFrame, MERawProcessorProcessFrameCallback completionHandler); } - [NoTV, NoiOS, Mac (15,0), MacCatalyst (18, 0)] + [NoTV, NoiOS, Mac (15, 0), MacCatalyst (18, 0)] [Static] - interface MERawProcessorFields - { + interface MERawProcessorFields { [Notification] [Field ("MERAWProcessorValuesDidChangeNotification")] NSString ValuesDidChangeNotification { get; } @@ -769,12 +741,11 @@ interface MERawProcessorFields NSString ReadyForMoreMediaDataDidChangeNotification { get; } } - interface IMERawProcessor {} + interface IMERawProcessor { } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] [Protocol (BackwardsCompatibleCodeGeneration = false)] - interface MEVideoDecoderExtension - { + interface MEVideoDecoderExtension { [Abstract] [Export ("init")] NativeHandle Constructor (); @@ -785,10 +756,9 @@ interface MEVideoDecoderExtension IMEVideoDecoder CreateVideoDecoder (CMVideoCodecType codecType, CMVideoFormatDescription videoFormatDescription, NSDictionary videoDecoderSpecifications, MEVideoDecoderPixelBufferManager extensionDecoderPixelBufferManager, [NullAllowed] out NSError error); } - [NoTV, NoiOS, Mac (15,0), NoMacCatalyst] - [BaseType (typeof(NSObject))] - interface MEVideoDecoderPixelBufferManager - { + [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] + [BaseType (typeof (NSObject))] + interface MEVideoDecoderPixelBufferManager { [Export ("pixelBufferAttributes", ArgumentSemantic.Copy)] NSDictionary PixelBufferAttributes { get; set; } @@ -801,9 +771,8 @@ interface MEVideoDecoderPixelBufferManager } [NoTV, NoiOS, Mac (15, 0), NoMacCatalyst] - [BaseType (typeof(NSObject))] - interface MEDecodeFrameOptions - { + [BaseType (typeof (NSObject))] + interface MEDecodeFrameOptions { [Export ("doNotOutputFrame")] bool DoNotOutputFrame { get; set; } diff --git a/src/mediaplayer.cs b/src/mediaplayer.cs index 8826acbb7651..602bc96109ae 100644 --- a/src/mediaplayer.cs +++ b/src/mediaplayer.cs @@ -371,7 +371,7 @@ interface MPMediaLibrary : NSSecureCoding { [Export ("addItemWithProductID:completionHandler:")] [Async] #if IOS - void AddItem (string productID, [NullAllowed] Action completionHandler); + void AddItem (string productID, [NullAllowed] Action completionHandler); #else void AddItem (string productID, [NullAllowed] Action completionHandler); #endif @@ -824,7 +824,7 @@ interface MPMoviePlayerTimedMetadataEventArgs { [NoMac] #if NET - [TV (16,0)] + [TV (16, 0)] [MacCatalyst (13, 1)] #else [Obsoleted (PlatformName.TvOS, 14, 0, message: "Removed in Xcode 12.")] @@ -1250,7 +1250,7 @@ interface MPTimedMetadata { [Export ("value")] #if NET - NSObject Value { get; } + NSObject Value { get; } #else NSObject value { get; } #endif diff --git a/src/metal.cs b/src/metal.cs index 34e4abd28161..74be7fab19d8 100644 --- a/src/metal.cs +++ b/src/metal.cs @@ -1584,7 +1584,7 @@ partial interface MTLDevice { [MacCatalyst (14, 0)] [NullAllowed, Export ("counterSets")] #if NET - IMTLCounterSet[] CounterSets { get; } + IMTLCounterSet [] CounterSets { get; } #else [Obsolete ("Use 'GetIMTLCounterSets' instead.")] MTLCounterSet [] CounterSets { get; } diff --git a/src/metrickit.cs b/src/metrickit.cs index 2c75b672a4c2..f1ecfa2488c8 100644 --- a/src/metrickit.cs +++ b/src/metrickit.cs @@ -163,7 +163,7 @@ interface MXMetaData : NSSecureCoding { [MacCatalyst (14, 0)] [Export ("dictionaryRepresentation")] #if MONOMAC - NSDictionary DictionaryRepresentation { get; } + NSDictionary DictionaryRepresentation { get; } #else [Internal] NSDictionary _DictionaryRepresentation14 { get; } diff --git a/src/networkextension.cs b/src/networkextension.cs index 698c2462256d..4bf350d5a2e6 100644 --- a/src/networkextension.cs +++ b/src/networkextension.cs @@ -1322,9 +1322,9 @@ interface NETunnelProviderManager { // CopyAppRules was incorrectly bound to AppRules and it is only available on macOS #if NET || MONOMAC || __MACCATALYST__ - [NoTV, NoiOS, MacCatalyst (15,0)] + [NoTV, NoiOS, MacCatalyst (15, 0)] [Export ("appRules", ArgumentSemantic.Copy)] - NEAppRule[] AppRules { get; set; } + NEAppRule [] AppRules { get; set; } #else [NoTV] [Obsolete ("Use 'CopyAppRules' instead, this property will be removed in the future.")] diff --git a/src/quicklook.cs b/src/quicklook.cs index 7b841c61b331..4d5a08c3abde 100644 --- a/src/quicklook.cs +++ b/src/quicklook.cs @@ -33,7 +33,7 @@ using CoreGraphics; #if MONOMAC using AppKit; -using UIWindowSceneActivationConfiguration=Foundation.NSObject; +using UIWindowSceneActivationConfiguration = Foundation.NSObject; #else using UIKit; #endif @@ -315,7 +315,9 @@ interface QLPreviewingController { } #else [Static] - [NoiOS][NoMacCatalyst][NoTV] + [NoiOS] + [NoMacCatalyst] + [NoTV] interface QLThumbnailImage { [Internal, Field ("kQLThumbnailOptionScaleFactorKey")] NSString OptionScaleFactorKey { get; } diff --git a/src/scenekit.cs b/src/scenekit.cs index dc58ba55938a..ed14e0b6e0a4 100644 --- a/src/scenekit.cs +++ b/src/scenekit.cs @@ -4063,7 +4063,7 @@ interface SCNAction : NSCopying, NSSecureCoding { [NullAllowed, Export ("timingFunction", ArgumentSemantic.Assign)] #if NET - Func TimingFunction { get; set; } + Func TimingFunction { get; set; } #else Func TimingFunction2 { get; set; } #endif diff --git a/src/sharedwithyou.cs b/src/sharedwithyou.cs index 47b631dc0ee3..0d92484412c3 100644 --- a/src/sharedwithyou.cs +++ b/src/sharedwithyou.cs @@ -19,12 +19,12 @@ #if MONOMAC using AppKit; -using UIViewController=AppKit.NSViewController; -using UIView=AppKit.NSView; -using UIMenu=AppKit.NSMenu; -using UIImage=AppKit.NSImage; -using ICloudSharingControllerDelegate=AppKit.INSCloudSharingServiceDelegate; -using UIWindow=AppKit.NSWindow; +using UIViewController = AppKit.NSViewController; +using UIView = AppKit.NSView; +using UIMenu = AppKit.NSMenu; +using UIImage = AppKit.NSImage; +using ICloudSharingControllerDelegate = AppKit.INSCloudSharingServiceDelegate; +using UIWindow = AppKit.NSWindow; #else using UIKit; using ICloudSharingControllerDelegate = UIKit.IUICloudSharingControllerDelegate; diff --git a/src/soundanalysis.cs b/src/soundanalysis.cs index 997463167641..2b723ba87212 100644 --- a/src/soundanalysis.cs +++ b/src/soundanalysis.cs @@ -210,7 +210,7 @@ interface SNTimeDurationConstraint /* privately conforms to NSCoding, NSCopying, SNTimeDurationConstraintType Type { get; } #if NET - [BindAs (typeof (CMTime[]))] + [BindAs (typeof (CMTime []))] #endif [Export ("enumeratedDurations", ArgumentSemantic.Strong)] NSValue [] EnumeratedDurations { get; } diff --git a/src/spritekit.cs b/src/spritekit.cs index f832ac4342d9..aa35388789f3 100644 --- a/src/spritekit.cs +++ b/src/spritekit.cs @@ -140,205 +140,205 @@ partial interface SKNode : NSSecureCoding, NSCopying, UIFocusItem, UIFocusItemCo #else #error Unknown platform #endif - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); - - [Static, Export ("node")] - SKNode Create (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("nodeWithFileNamed:")] - [return: NullAllowed] - SKNode Create (string filename); - - [MacCatalyst (13, 1)] - [Internal] - [Static] - [Export ("nodeWithFileNamed:securelyWithClasses:andError:")] - [return: NullAllowed] - SKNode Create (string filename, IntPtr classesPtr, out NSError error); - - [Export ("frame")] + [DesignatedInitializer] + [Export ("init")] + NativeHandle Constructor (); + + [Static, Export ("node")] + SKNode Create (); + + [MacCatalyst (13, 1)] + [Static] + [Export ("nodeWithFileNamed:")] + [return: NullAllowed] + SKNode Create (string filename); + + [MacCatalyst (13, 1)] + [Internal] + [Static] + [Export ("nodeWithFileNamed:securelyWithClasses:andError:")] + [return: NullAllowed] + SKNode Create (string filename, IntPtr classesPtr, out NSError error); + + [Export ("frame")] #if !MONOMAC - // For iOS+tvOS we also get this property from the UIFocusItem protocol, but we redefine it here to get the right availability attributes. - new + // For iOS+tvOS we also get this property from the UIFocusItem protocol, but we redefine it here to get the right availability attributes. + new #endif - CGRect Frame { get; } - - [Export ("calculateAccumulatedFrame")] - CGRect CalculateAccumulatedFrame (); - - [Export ("position")] - CGPoint Position { get; set; } - - [Export ("zPosition")] - nfloat ZPosition { get; set; } - - [Export ("zRotation")] - nfloat ZRotation { get; set; } + CGRect Frame { get; } - [Export ("xScale")] - nfloat XScale { get; set; } + [Export ("calculateAccumulatedFrame")] + CGRect CalculateAccumulatedFrame (); - [Export ("yScale")] - nfloat YScale { get; set; } + [Export ("position")] + CGPoint Position { get; set; } - [Export ("speed")] - nfloat Speed { get; set; } + [Export ("zPosition")] + nfloat ZPosition { get; set; } - [Export ("alpha")] - nfloat Alpha { get; set; } + [Export ("zRotation")] + nfloat ZRotation { get; set; } - [Export ("paused")] - bool Paused { [Bind ("isPaused")] get; set; } + [Export ("xScale")] + nfloat XScale { get; set; } - [Export ("hidden")] - bool Hidden { [Bind ("isHidden")] get; set; } + [Export ("yScale")] + nfloat YScale { get; set; } - [Export ("userInteractionEnabled")] - bool UserInteractionEnabled { [Bind ("isUserInteractionEnabled")] get; set; } + [Export ("speed")] + nfloat Speed { get; set; } - [NoMac] - [MacCatalyst (13, 1)] - [Export ("focusBehavior", ArgumentSemantic.Assign)] - SKNodeFocusBehavior FocusBehavior { get; set; } + [Export ("alpha")] + nfloat Alpha { get; set; } - [Export ("parent")] - [NullAllowed] - SKNode Parent { get; } + [Export ("paused")] + bool Paused { [Bind ("isPaused")] get; set; } - [Export ("children")] - SKNode [] Children { get; } + [Export ("hidden")] + bool Hidden { [Bind ("isHidden")] get; set; } - [NullAllowed] // by default this property is null - [Export ("name", ArgumentSemantic.Copy)] - string Name { get; set; } + [Export ("userInteractionEnabled")] + bool UserInteractionEnabled { [Bind ("isUserInteractionEnabled")] get; set; } - [Export ("scene")] - [NullAllowed] - SKScene Scene { get; } + [NoMac] + [MacCatalyst (13, 1)] + [Export ("focusBehavior", ArgumentSemantic.Assign)] + SKNodeFocusBehavior FocusBehavior { get; set; } - [Export ("physicsBody", ArgumentSemantic.Retain), NullAllowed] - SKPhysicsBody PhysicsBody { get; set; } + [Export ("parent")] + [NullAllowed] + SKNode Parent { get; } - [NullAllowed] // by default this property is null - [Export ("userData", ArgumentSemantic.Retain)] - NSMutableDictionary UserData { get; set; } + [Export ("children")] + SKNode [] Children { get; } - [Export ("setScale:")] - void SetScale (nfloat scale); - - [Export ("addChild:")] - [PostGet ("Children")] - void AddChild (SKNode node); + [NullAllowed] // by default this property is null + [Export ("name", ArgumentSemantic.Copy)] + string Name { get; set; } - [Export ("insertChild:atIndex:")] - [PostGet ("Children")] - void InsertChild (SKNode node, nint index); + [Export ("scene")] + [NullAllowed] + SKScene Scene { get; } - [Export ("removeChildrenInArray:")] - [PostGet ("Children")] - void RemoveChildren (SKNode [] nodes); + [Export ("physicsBody", ArgumentSemantic.Retain), NullAllowed] + SKPhysicsBody PhysicsBody { get; set; } - [Export ("removeAllChildren")] - [PostGet ("Children")] - void RemoveAllChildren (); + [NullAllowed] // by default this property is null + [Export ("userData", ArgumentSemantic.Retain)] + NSMutableDictionary UserData { get; set; } - [Export ("removeFromParent")] - void RemoveFromParent (); + [Export ("setScale:")] + void SetScale (nfloat scale); - [Export ("childNodeWithName:")] - [return: NullAllowed] - SKNode GetChildNode (string name); + [Export ("addChild:")] + [PostGet ("Children")] + void AddChild (SKNode node); - [Export ("enumerateChildNodesWithName:usingBlock:")] - void EnumerateChildNodes (string name, SKNodeChildEnumeratorHandler enumerationHandler); + [Export ("insertChild:atIndex:")] + [PostGet ("Children")] + void InsertChild (SKNode node, nint index); - [Export ("runAction:")] - void RunAction (SKAction action); + [Export ("removeChildrenInArray:")] + [PostGet ("Children")] + void RemoveChildren (SKNode [] nodes); - [Async] - [Export ("runAction:completion:")] - void RunAction (SKAction action, Action completionHandler); + [Export ("removeAllChildren")] + [PostGet ("Children")] + void RemoveAllChildren (); - [Export ("runAction:withKey:")] - void RunAction (SKAction action, string key); + [Export ("removeFromParent")] + void RemoveFromParent (); - [Export ("hasActions")] - bool HasActions { get; } + [Export ("childNodeWithName:")] + [return: NullAllowed] + SKNode GetChildNode (string name); - [Export ("actionForKey:")] - [return: NullAllowed] - SKAction GetActionForKey (string key); + [Export ("enumerateChildNodesWithName:usingBlock:")] + void EnumerateChildNodes (string name, SKNodeChildEnumeratorHandler enumerationHandler); - [Export ("removeActionForKey:")] - void RemoveActionForKey (string key); + [Export ("runAction:")] + void RunAction (SKAction action); - [Export ("removeAllActions")] - void RemoveAllActions (); + [Async] + [Export ("runAction:completion:")] + void RunAction (SKAction action, Action completionHandler); - [Export ("containsPoint:")] - bool ContainsPoint (CGPoint point); + [Export ("runAction:withKey:")] + void RunAction (SKAction action, string key); - [Export ("nodeAtPoint:")] - SKNode GetNodeAtPoint (CGPoint point); + [Export ("hasActions")] + bool HasActions { get; } - [Export ("nodesAtPoint:")] - SKNode [] GetNodesAtPoint (CGPoint point); + [Export ("actionForKey:")] + [return: NullAllowed] + SKAction GetActionForKey (string key); - [Export ("convertPoint:fromNode:")] - CGPoint ConvertPointFromNode (CGPoint point, SKNode sourceNode); + [Export ("removeActionForKey:")] + void RemoveActionForKey (string key); - [Export ("convertPoint:toNode:")] - CGPoint ConvertPointToNode (CGPoint point, SKNode sourceNode); + [Export ("removeAllActions")] + void RemoveAllActions (); - [Export ("intersectsNode:")] - bool IntersectsNode (SKNode node); + [Export ("containsPoint:")] + bool ContainsPoint (CGPoint point); - [MacCatalyst (13, 1)] - [Export ("isEqualToNode:")] - bool IsEqual (SKNode node); + [Export ("nodeAtPoint:")] + SKNode GetNodeAtPoint (CGPoint point); - [Export ("inParentHierarchy:")] - bool InParentHierarchy (SKNode node); + [Export ("nodesAtPoint:")] + SKNode [] GetNodesAtPoint (CGPoint point); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("reachConstraints", ArgumentSemantic.Copy)] - SKReachConstraints ReachConstraints { get; set; } + [Export ("convertPoint:fromNode:")] + CGPoint ConvertPointFromNode (CGPoint point, SKNode sourceNode); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("constraints", ArgumentSemantic.Copy)] - SKConstraint [] Constraints { get; set; } + [Export ("convertPoint:toNode:")] + CGPoint ConvertPointToNode (CGPoint point, SKNode sourceNode); - [MacCatalyst (13, 1)] - [Export ("objectForKeyedSubscript:")] - SKNode GetObjectsMatching (string nameExpression); + [Export ("intersectsNode:")] + bool IntersectsNode (SKNode node); - [MacCatalyst (13, 1)] - [Export ("moveToParent:")] - void MoveToParent (SKNode parent); + [MacCatalyst (13, 1)] + [Export ("isEqualToNode:")] + bool IsEqual (SKNode node); - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodeBounds:")] - GKPolygonObstacle [] ObstaclesFromNodeBounds (SKNode [] nodes); + [Export ("inParentHierarchy:")] + bool InParentHierarchy (SKNode node); - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodePhysicsBodies:")] - GKPolygonObstacle [] ObstaclesFromNodePhysicsBodies (SKNode [] nodes); + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("reachConstraints", ArgumentSemantic.Copy)] + SKReachConstraints ReachConstraints { get; set; } - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromSpriteTextures:accuracy:")] - GKPolygonObstacle [] ObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("constraints", ArgumentSemantic.Copy)] + SKConstraint [] Constraints { get; set; } + + [MacCatalyst (13, 1)] + [Export ("objectForKeyedSubscript:")] + SKNode GetObjectsMatching (string nameExpression); + + [MacCatalyst (13, 1)] + [Export ("moveToParent:")] + void MoveToParent (SKNode parent); + + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodeBounds:")] + GKPolygonObstacle [] ObstaclesFromNodeBounds (SKNode [] nodes); + + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodePhysicsBodies:")] + GKPolygonObstacle [] ObstaclesFromNodePhysicsBodies (SKNode [] nodes); + + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromSpriteTextures:accuracy:")] + GKPolygonObstacle [] ObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); #if !NET [Deprecated (PlatformName.iOS, 10, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] @@ -358,1496 +358,1496 @@ partial interface SKNode : NSSecureCoding, NSCopying, UIFocusItem, UIFocusItemCo void SetValue (SKAttributeValue value, string key); #endif - // Extensions from GameplayKit, inlined to avoid ugly static extension syntax - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromSpriteTextures:accuracy:")] - GKPolygonObstacle [] GetObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); + // Extensions from GameplayKit, inlined to avoid ugly static extension syntax + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromSpriteTextures:accuracy:")] + GKPolygonObstacle [] GetObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); + + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodeBounds:")] + GKPolygonObstacle [] GetObstaclesFromNodeBounds (SKNode [] nodes); + + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodePhysicsBodies:")] + GKPolygonObstacle [] GetObstaclesFromNodePhysicsBodies (SKNode [] nodes); + } - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodeBounds:")] - GKPolygonObstacle [] GetObstaclesFromNodeBounds (SKNode [] nodes); + [NoiOS] + [NoTV] + [NoMacCatalyst] + [Category, BaseType (typeof (NSEvent))] + partial interface SKNodeEvent_NSEvent { + + [Export ("locationInNode:")] + CGPoint LocationInNode (SKNode node); + } + /// Extension methods for that aide with conversion to Sprite Kit coordinates. + [NoMac] [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodePhysicsBodies:")] - GKPolygonObstacle [] GetObstaclesFromNodePhysicsBodies (SKNode [] nodes); -} + [Category, BaseType (typeof (UITouch))] + partial interface SKNodeTouches_UITouch { -[NoiOS] -[NoTV] -[NoMacCatalyst] -[Category, BaseType (typeof (NSEvent))] -partial interface SKNodeEvent_NSEvent { + [Export ("locationInNode:")] + CGPoint LocationInNode (SKNode node); - [Export ("locationInNode:")] - CGPoint LocationInNode (SKNode node); -} + [Export ("previousLocationInNode:")] + CGPoint PreviousLocationInNode (SKNode node); + } -/// Extension methods for that aide with conversion to Sprite Kit coordinates. -[NoMac] -[MacCatalyst (13, 1)] -[Category, BaseType (typeof (UITouch))] -partial interface SKNodeTouches_UITouch { + /// An that applies a Core Graphics to its output. + /// + /// Application developers should ensure that is . + /// Note that is a subclass of . + /// + /// Apple documentation for SKEffectNode + [MacCatalyst (13, 1)] + [BaseType (typeof (SKNode))] + partial interface SKEffectNode : SKWarpable { - [Export ("locationInNode:")] - CGPoint LocationInNode (SKNode node); + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("filter", ArgumentSemantic.Retain)] + CIFilter Filter { get; set; } - [Export ("previousLocationInNode:")] - CGPoint PreviousLocationInNode (SKNode node); -} + [Export ("shouldCenterFilter")] + bool ShouldCenterFilter { get; set; } -/// An that applies a Core Graphics to its output. -/// -/// Application developers should ensure that is . -/// Note that is a subclass of . -/// -/// Apple documentation for SKEffectNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -partial interface SKEffectNode : SKWarpable { + [Export ("shouldEnableEffects")] + bool ShouldEnableEffects { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("filter", ArgumentSemantic.Retain)] - CIFilter Filter { get; set; } + [Export ("shouldRasterize")] + bool ShouldRasterize { get; set; } - [Export ("shouldCenterFilter")] - bool ShouldCenterFilter { get; set; } + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - [Export ("shouldEnableEffects")] - bool ShouldEnableEffects { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } - [Export ("shouldRasterize")] - bool ShouldRasterize { get; set; } + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); + } - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + /// A method that derives a force by applying the physics of a field to a body that is within the field. + delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time); + /// Applies physics effects within a portion of a scene. + /// + /// Apple documentation for SKFieldNode [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [BaseType (typeof (SKNode))] + interface SKFieldNode { + [Export ("region", ArgumentSemantic.Retain)] + [NullAllowed] + SKRegion Region { get; set; } - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); -} + [Export ("strength")] + float Strength { get; set; } /* float, not CGFloat */ -/// A method that derives a force by applying the physics of a field to a body that is within the field. -delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time); + [Export ("falloff")] + float Falloff { get; set; } /* float, not CGFloat */ -/// Applies physics effects within a portion of a scene. -/// -/// Apple documentation for SKFieldNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -interface SKFieldNode { - [Export ("region", ArgumentSemantic.Retain)] - [NullAllowed] - SKRegion Region { get; set; } + [Export ("minimumRadius")] - [Export ("strength")] - float Strength { get; set; } /* float, not CGFloat */ + float MinimumRadius { get; set; } /* float, not CGFloat */ - [Export ("falloff")] - float Falloff { get; set; } /* float, not CGFloat */ + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } - [Export ("minimumRadius")] + [Export ("exclusive")] + bool Exclusive { [Bind ("isExclusive")] get; set; } - float MinimumRadius { get; set; } /* float, not CGFloat */ + [Export ("categoryBitMask")] + uint CategoryBitMask { get; set; } /* uint32_t */ - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } + [Export ("direction")] + /* This was typed as Vector4 since sizeof the native type (vector_float3) = 16 */ + Vector4 Direction { + [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] + set; + } - [Export ("exclusive")] - bool Exclusive { [Bind ("isExclusive")] get; set; } + [Export ("smoothness")] + float Smoothness { get; set; } /* float, not CGFloat */ - [Export ("categoryBitMask")] - uint CategoryBitMask { get; set; } /* uint32_t */ + [Export ("animationSpeed")] + float AnimationSpeed { get; set; } /* float, not CGFloat */ - [Export ("direction")] - /* This was typed as Vector4 since sizeof the native type (vector_float3) = 16 */ - Vector4 Direction { - [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] - set; - } + [Export ("texture", ArgumentSemantic.Retain)] + [NullAllowed] + SKTexture Texture { get; set; } - [Export ("smoothness")] - float Smoothness { get; set; } /* float, not CGFloat */ + [Static, Export ("dragField")] + SKFieldNode CreateDragField (); - [Export ("animationSpeed")] - float AnimationSpeed { get; set; } /* float, not CGFloat */ + [Static, Export ("vortexField")] + SKFieldNode CreateVortexField (); - [Export ("texture", ArgumentSemantic.Retain)] - [NullAllowed] - SKTexture Texture { get; set; } + [Static, Export ("radialGravityField")] + SKFieldNode CreateRadialGravityField (); - [Static, Export ("dragField")] - SKFieldNode CreateDragField (); + [Static, Export ("linearGravityFieldWithVector:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKFieldNode CreateLinearGravityField (/* vector_float3 */ Vector4 direction); - [Static, Export ("vortexField")] - SKFieldNode CreateVortexField (); + [Static, Export ("velocityFieldWithVector:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKFieldNode CreateVelocityField (/* vector_float3 */ Vector4 direction); - [Static, Export ("radialGravityField")] - SKFieldNode CreateRadialGravityField (); + [Static, Export ("velocityFieldWithTexture:")] + SKFieldNode CreateVelocityField (SKTexture velocityTexture); - [Static, Export ("linearGravityFieldWithVector:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKFieldNode CreateLinearGravityField (/* vector_float3 */ Vector4 direction); + [Static, Export ("noiseFieldWithSmoothness:animationSpeed:")] + SKFieldNode CreateNoiseField (nfloat smoothness, nfloat speed); - [Static, Export ("velocityFieldWithVector:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKFieldNode CreateVelocityField (/* vector_float3 */ Vector4 direction); + [Static, Export ("turbulenceFieldWithSmoothness:animationSpeed:")] + SKFieldNode CreateTurbulenceField (nfloat smoothness, nfloat speed); - [Static, Export ("velocityFieldWithTexture:")] - SKFieldNode CreateVelocityField (SKTexture velocityTexture); + [Static, Export ("springField")] + SKFieldNode CreateSpringField (); - [Static, Export ("noiseFieldWithSmoothness:animationSpeed:")] - SKFieldNode CreateNoiseField (nfloat smoothness, nfloat speed); + [Static, Export ("electricField")] + SKFieldNode CreateElectricField (); - [Static, Export ("turbulenceFieldWithSmoothness:animationSpeed:")] - SKFieldNode CreateTurbulenceField (nfloat smoothness, nfloat speed); + [Static, Export ("magneticField")] + SKFieldNode CreateMagneticField (); - [Static, Export ("springField")] - SKFieldNode CreateSpringField (); + [Static, Export ("customFieldWithEvaluationBlock:")] + SKFieldNode CreateCustomField (SKFieldForceEvaluator evaluator); + } - [Static, Export ("electricField")] - SKFieldNode CreateElectricField (); + /// + [MacCatalyst (13, 1)] + [BaseType (typeof (SKEffectNode))] + interface SKScene + : GKSceneRootNodeType { + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [Static, Export ("magneticField")] - SKFieldNode CreateMagneticField (); + [Static, Export ("sceneWithSize:")] + SKScene FromSize (CGSize size); - [Static, Export ("customFieldWithEvaluationBlock:")] - SKFieldNode CreateCustomField (SKFieldForceEvaluator evaluator); -} + [MacCatalyst (13, 1)] + [Export ("sceneDidLoad")] + void SceneDidLoad (); -/// -[MacCatalyst (13, 1)] -[BaseType (typeof (SKEffectNode))] -interface SKScene - : GKSceneRootNodeType { - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); + [Export ("size")] + CGSize Size { get; set; } - [Static, Export ("sceneWithSize:")] - SKScene FromSize (CGSize size); + [Export ("scaleMode")] + SKSceneScaleMode ScaleMode { get; set; } - [MacCatalyst (13, 1)] - [Export ("sceneDidLoad")] - void SceneDidLoad (); + [Export ("backgroundColor", ArgumentSemantic.Retain)] + UIColor BackgroundColor { get; set; } - [Export ("size")] - CGSize Size { get; set; } + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } - [Export ("scaleMode")] - SKSceneScaleMode ScaleMode { get; set; } + [Export ("physicsWorld")] + SKPhysicsWorld PhysicsWorld { get; } - [Export ("backgroundColor", ArgumentSemantic.Retain)] - UIColor BackgroundColor { get; set; } + [MacCatalyst (13, 1)] + [Export ("convertPointFromView:")] + CGPoint ConvertPointFromView (CGPoint point); - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } + [MacCatalyst (13, 1)] + [Export ("convertPointToView:")] + CGPoint ConvertPointToView (CGPoint point); - [Export ("physicsWorld")] - SKPhysicsWorld PhysicsWorld { get; } + [MacCatalyst (13, 1)] + [Export ("view", ArgumentSemantic.Weak)] + [NullAllowed] + SKView View { get; } - [MacCatalyst (13, 1)] - [Export ("convertPointFromView:")] - CGPoint ConvertPointFromView (CGPoint point); + [Export ("update:")] + void Update (double currentTime); - [MacCatalyst (13, 1)] - [Export ("convertPointToView:")] - CGPoint ConvertPointToView (CGPoint point); + [Export ("didEvaluateActions")] + void DidEvaluateActions (); - [MacCatalyst (13, 1)] - [Export ("view", ArgumentSemantic.Weak)] - [NullAllowed] - SKView View { get; } + [Export ("didSimulatePhysics")] + void DidSimulatePhysics (); - [Export ("update:")] - void Update (double currentTime); + [MacCatalyst (13, 1)] + [Export ("didMoveToView:")] + void DidMoveToView (SKView view); - [Export ("didEvaluateActions")] - void DidEvaluateActions (); + [MacCatalyst (13, 1)] + [Export ("willMoveFromView:")] + void WillMoveFromView (SKView view); - [Export ("didSimulatePhysics")] - void DidSimulatePhysics (); + [Export ("didChangeSize:")] + void DidChangeSize (CGSize oldSize); - [MacCatalyst (13, 1)] - [Export ("didMoveToView:")] - void DidMoveToView (SKView view); + [MacCatalyst (13, 1)] + [Export ("didApplyConstraints")] + void DidApplyConstraints (); - [MacCatalyst (13, 1)] - [Export ("willMoveFromView:")] - void WillMoveFromView (SKView view); + [MacCatalyst (13, 1)] + [Export ("didFinishUpdate")] + void DidFinishUpdate (); - [Export ("didChangeSize:")] - void DidChangeSize (CGSize oldSize); + [MacCatalyst (13, 1)] + [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] + NSObject WeakDelegate { get; set; } - [MacCatalyst (13, 1)] - [Export ("didApplyConstraints")] - void DidApplyConstraints (); + [MacCatalyst (13, 1)] + [Wrap ("WeakDelegate")] + ISKSceneDelegate Delegate { get; set; } - [MacCatalyst (13, 1)] - [Export ("didFinishUpdate")] - void DidFinishUpdate (); + [MacCatalyst (13, 1)] + [Export ("audioEngine", ArgumentSemantic.Retain)] + AVAudioEngine AudioEngine { get; } - [MacCatalyst (13, 1)] - [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] - NSObject WeakDelegate { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed, Export ("camera", ArgumentSemantic.Weak)] + SKCameraNode Camera { get; set; } - [MacCatalyst (13, 1)] - [Wrap ("WeakDelegate")] - ISKSceneDelegate Delegate { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed, Export ("listener", ArgumentSemantic.Weak)] + SKNode Listener { get; set; } + } - [MacCatalyst (13, 1)] - [Export ("audioEngine", ArgumentSemantic.Retain)] - AVAudioEngine AudioEngine { get; } + /// Interface representing the required methods (if any) of the protocol . + /// + /// This interface contains the required methods (if any) from the protocol defined by . + /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. + /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. + /// + interface ISKSceneDelegate { } + /// Delegate object for SKScene objects. Provides methods relating to animation events. + /// + /// Apple documentation for SKSceneDelegate [MacCatalyst (13, 1)] - [NullAllowed, Export ("camera", ArgumentSemantic.Weak)] - SKCameraNode Camera { get; set; } + [Protocol, Model] + [BaseType (typeof (NSObject))] + interface SKSceneDelegate { + [Export ("update:forScene:")] + void Update (double currentTime, SKScene scene); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("listener", ArgumentSemantic.Weak)] - SKNode Listener { get; set; } -} + [Export ("didEvaluateActionsForScene:")] + void DidEvaluateActions (SKScene scene); -/// Interface representing the required methods (if any) of the protocol . -/// -/// This interface contains the required methods (if any) from the protocol defined by . -/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. -/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. -/// -interface ISKSceneDelegate { } - -/// Delegate object for SKScene objects. Provides methods relating to animation events. -/// -/// Apple documentation for SKSceneDelegate -[MacCatalyst (13, 1)] -[Protocol, Model] -[BaseType (typeof (NSObject))] -interface SKSceneDelegate { - [Export ("update:forScene:")] - void Update (double currentTime, SKScene scene); - - [Export ("didEvaluateActionsForScene:")] - void DidEvaluateActions (SKScene scene); - - [Export ("didSimulatePhysicsForScene:")] - void DidSimulatePhysics (SKScene scene); - - [Export ("didApplyConstraintsForScene:")] - void DidApplyConstraints (SKScene scene); - - [Export ("didFinishUpdateForScene:")] - void DidFinishUpdate (SKScene scene); -} + [Export ("didSimulatePhysicsForScene:")] + void DidSimulatePhysics (SKScene scene); + + [Export ("didApplyConstraintsForScene:")] + void DidApplyConstraints (SKScene scene); + + [Export ("didFinishUpdateForScene:")] + void DidFinishUpdate (SKScene scene); + } + + /// An OpenGL ES fragment shader. + /// + /// Apple documentation for SKShader + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface SKShader : NSCopying, NSSecureCoding { + [Export ("initWithSource:")] + NativeHandle Constructor (string shaderSourceCode); -/// An OpenGL ES fragment shader. -/// -/// Apple documentation for SKShader -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKShader : NSCopying, NSSecureCoding { - [Export ("initWithSource:")] - NativeHandle Constructor (string shaderSourceCode); + [Export ("initWithSource:uniforms:")] + NativeHandle Constructor (string sharedSourceCode, SKUniform [] uniforms); - [Export ("initWithSource:uniforms:")] - NativeHandle Constructor (string sharedSourceCode, SKUniform [] uniforms); + [NullAllowed] // by default this property is null + [Export ("source")] + string Source { get; set; } - [NullAllowed] // by default this property is null - [Export ("source")] - string Source { get; set; } + // @property (copy) NSArray * uniforms; + [Export ("uniforms", ArgumentSemantic.Copy)] + SKUniform [] Uniforms { get; set; } - // @property (copy) NSArray * uniforms; - [Export ("uniforms", ArgumentSemantic.Copy)] - SKUniform [] Uniforms { get; set; } + // @required + (instancetype)shader; + [Static, Export ("shader")] + SKShader Create (); - // @required + (instancetype)shader; - [Static, Export ("shader")] - SKShader Create (); + [Static, Export ("shaderWithSource:")] + SKShader FromShaderSourceCode (string source); - [Static, Export ("shaderWithSource:")] - SKShader FromShaderSourceCode (string source); + [Static, Export ("shaderWithSource:uniforms:")] + SKShader FromShaderSourceCode (string source, SKUniform [] uniforms); - [Static, Export ("shaderWithSource:uniforms:")] - SKShader FromShaderSourceCode (string source, SKUniform [] uniforms); + [Static, Export ("shaderWithFileNamed:")] + SKShader FromFile (string name); - [Static, Export ("shaderWithFileNamed:")] - SKShader FromFile (string name); + [Export ("addUniform:")] + void AddUniform (SKUniform uniform); - [Export ("addUniform:")] - void AddUniform (SKUniform uniform); + [Export ("uniformNamed:")] + [return: NullAllowed] + SKUniform GetUniform (string uniformName); - [Export ("uniformNamed:")] - [return: NullAllowed] - SKUniform GetUniform (string uniformName); + [Export ("removeUniformNamed:")] + void RemoveUniform (string uniforName); - [Export ("removeUniformNamed:")] - void RemoveUniform (string uniforName); + [MacCatalyst (13, 1)] + [Export ("attributes", ArgumentSemantic.Copy)] + SKAttribute [] Attributes { get; set; } + } + /// A that displays a textured, colored sprite. + /// + /// Apple documentation for SKSpriteNode [MacCatalyst (13, 1)] - [Export ("attributes", ArgumentSemantic.Copy)] - SKAttribute [] Attributes { get; set; } -} + [BaseType (typeof (SKNode))] + partial interface SKSpriteNode : SKWarpable { -/// A that displays a textured, colored sprite. -/// -/// Apple documentation for SKSpriteNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -partial interface SKSpriteNode : SKWarpable { + [Static, Export ("spriteNodeWithTexture:size:")] + SKSpriteNode FromTexture ([NullAllowed] SKTexture texture, CGSize size); - [Static, Export ("spriteNodeWithTexture:size:")] - SKSpriteNode FromTexture ([NullAllowed] SKTexture texture, CGSize size); + [Static, Export ("spriteNodeWithTexture:")] + SKSpriteNode FromTexture ([NullAllowed] SKTexture texture); - [Static, Export ("spriteNodeWithTexture:")] - SKSpriteNode FromTexture ([NullAllowed] SKTexture texture); + [Static, Export ("spriteNodeWithImageNamed:")] + SKSpriteNode FromImageNamed (string name); - [Static, Export ("spriteNodeWithImageNamed:")] - SKSpriteNode FromImageNamed (string name); + [Static, Export ("spriteNodeWithColor:size:")] + SKSpriteNode FromColor (UIColor color, CGSize size); - [Static, Export ("spriteNodeWithColor:size:")] - SKSpriteNode FromColor (UIColor color, CGSize size); + [DesignatedInitializer] + [Export ("initWithTexture:color:size:")] + NativeHandle Constructor ([NullAllowed] SKTexture texture, UIColor color, CGSize size); - [DesignatedInitializer] - [Export ("initWithTexture:color:size:")] - NativeHandle Constructor ([NullAllowed] SKTexture texture, UIColor color, CGSize size); + [Export ("initWithTexture:")] + NativeHandle Constructor ([NullAllowed] SKTexture texture); - [Export ("initWithTexture:")] - NativeHandle Constructor ([NullAllowed] SKTexture texture); + // can't be null -> crash + [Export ("initWithImageNamed:")] + NativeHandle Constructor (string name); - // can't be null -> crash - [Export ("initWithImageNamed:")] - NativeHandle Constructor (string name); + [Export ("initWithColor:size:")] + NativeHandle Constructor (UIColor color, CGSize size); - [Export ("initWithColor:size:")] - NativeHandle Constructor (UIColor color, CGSize size); + [Export ("texture", ArgumentSemantic.Retain)] + [NullAllowed] + SKTexture Texture { get; set; } - [Export ("texture", ArgumentSemantic.Retain)] - [NullAllowed] - SKTexture Texture { get; set; } + [Export ("centerRect")] + CGRect CenterRect { get; set; } - [Export ("centerRect")] - CGRect CenterRect { get; set; } + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("color", ArgumentSemantic.Retain)] + [NullAllowed] // it's actually null-resetable (see unit tests) + UIColor Color { get; set; } - [Export ("color", ArgumentSemantic.Retain)] - [NullAllowed] // it's actually null-resetable (see unit tests) - UIColor Color { get; set; } + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } + [Export ("size")] + CGSize Size { get; set; } - [Export ("size")] - CGSize Size { get; set; } + // + // iOS 8 + // - // - // iOS 8 - // + [MacCatalyst (13, 1)] + [Static, Export ("spriteNodeWithTexture:normalMap:")] + SKSpriteNode Create ([NullAllowed] SKTexture texture, [NullAllowed] SKTexture normalMap); - [MacCatalyst (13, 1)] - [Static, Export ("spriteNodeWithTexture:normalMap:")] - SKSpriteNode Create ([NullAllowed] SKTexture texture, [NullAllowed] SKTexture normalMap); + [MacCatalyst (13, 1)] + [Static, Export ("spriteNodeWithImageNamed:normalMapped:")] + SKSpriteNode Create (string imageName, bool generateNormalMap); - [MacCatalyst (13, 1)] - [Static, Export ("spriteNodeWithImageNamed:normalMapped:")] - SKSpriteNode Create (string imageName, bool generateNormalMap); + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("normalTexture", ArgumentSemantic.Retain)] + SKTexture NormalTexture { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("normalTexture", ArgumentSemantic.Retain)] - SKTexture NormalTexture { get; set; } + [MacCatalyst (13, 1)] + [Export ("lightingBitMask")] + uint LightingBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("lightingBitMask")] - uint LightingBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Export ("shadowCastBitMask")] + uint ShadowCastBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("shadowCastBitMask")] - uint ShadowCastBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Export ("shadowedBitMask")] + uint ShadowedBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("shadowedBitMask")] - uint ShadowedBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Export ("shader", ArgumentSemantic.Retain), NullAllowed] + SKShader Shader { get; set; } - [MacCatalyst (13, 1)] - [Export ("shader", ArgumentSemantic.Retain), NullAllowed] - SKShader Shader { get; set; } + [MacCatalyst (13, 1)] + [Export ("scaleToSize:")] + void ScaleTo (CGSize size); - [MacCatalyst (13, 1)] - [Export ("scaleToSize:")] - void ScaleTo (CGSize size); + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); + } + /// An object that can control the properties of particles emitted by a . + /// + /// The total time of the sequence is normalized from 0.0 to 1.0. + /// + /// + /// + /// + /// + /// Apple documentation for SKKeyframeSequence [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); -} + [BaseType (typeof (NSObject))] + partial interface SKKeyframeSequence : NSSecureCoding, NSCopying { -/// An object that can control the properties of particles emitted by a . -/// -/// The total time of the sequence is normalized from 0.0 to 1.0. -/// -/// -/// -/// -/// -/// Apple documentation for SKKeyframeSequence -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -partial interface SKKeyframeSequence : NSSecureCoding, NSCopying { - - [DesignatedInitializer] - [Export ("initWithKeyframeValues:times:")] - [Internal] - NativeHandle Constructor ([NullAllowed] NSObject [] values, [NullAllowed] NSArray times); + [DesignatedInitializer] + [Export ("initWithKeyframeValues:times:")] + [Internal] + NativeHandle Constructor ([NullAllowed] NSObject [] values, [NullAllowed] NSArray times); - [Export ("initWithCapacity:")] - NativeHandle Constructor (nuint numItems); + [Export ("initWithCapacity:")] + NativeHandle Constructor (nuint numItems); - [Export ("count")] - nuint Count { get; } + [Export ("count")] + nuint Count { get; } - [Export ("addKeyframeValue:time:")] - void AddKeyframeValue (NSObject value, nfloat time); + [Export ("addKeyframeValue:time:")] + void AddKeyframeValue (NSObject value, nfloat time); - [Export ("removeLastKeyframe")] - void RemoveLastKeyframe (); + [Export ("removeLastKeyframe")] + void RemoveLastKeyframe (); - [Export ("removeKeyframeAtIndex:")] - void RemoveKeyframe (nuint index); + [Export ("removeKeyframeAtIndex:")] + void RemoveKeyframe (nuint index); - [Export ("setKeyframeValue:forIndex:")] - void SetKeyframeValue (NSObject value, nuint index); + [Export ("setKeyframeValue:forIndex:")] + void SetKeyframeValue (NSObject value, nuint index); - [Export ("setKeyframeTime:forIndex:")] - void SetKeyframeTime (nfloat time, nuint index); + [Export ("setKeyframeTime:forIndex:")] + void SetKeyframeTime (nfloat time, nuint index); - [Export ("setKeyframeValue:time:forIndex:")] - void SetKeyframeValue (NSObject value, nfloat time, nuint index); + [Export ("setKeyframeValue:time:forIndex:")] + void SetKeyframeValue (NSObject value, nfloat time, nuint index); - [Export ("getKeyframeValueForIndex:")] - NSObject GetKeyframeValue (nuint index); + [Export ("getKeyframeValueForIndex:")] + NSObject GetKeyframeValue (nuint index); - [Export ("getKeyframeTimeForIndex:")] - nfloat GetKeyframeTime (nuint index); + [Export ("getKeyframeTimeForIndex:")] + nfloat GetKeyframeTime (nuint index); - [Export ("sampleAtTime:")] - [return: NullAllowed] - NSObject SampleAtTime (nfloat time); + [Export ("sampleAtTime:")] + [return: NullAllowed] + NSObject SampleAtTime (nfloat time); - [Export ("interpolationMode")] - SKInterpolationMode InterpolationMode { get; set; } + [Export ("interpolationMode")] + SKInterpolationMode InterpolationMode { get; set; } - [Export ("repeatMode")] - SKRepeatMode RepeatMode { get; set; } -} + [Export ("repeatMode")] + SKRepeatMode RepeatMode { get; set; } + } -/// A that produces colored and textured particles. -/// -/// Emitted particles are not directly accessible to the application developer; their behavior can be controlled either via the creation parameters configurable in or by a . -/// -/// Apple documentation for SKEmitterNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -partial interface SKEmitterNode { + /// A that produces colored and textured particles. + /// + /// Emitted particles are not directly accessible to the application developer; their behavior can be controlled either via the creation parameters configurable in or by a . + /// + /// Apple documentation for SKEmitterNode + [MacCatalyst (13, 1)] + [BaseType (typeof (SKNode))] + partial interface SKEmitterNode { - [Export ("advanceSimulationTime:")] - void AdvanceSimulationTime (double sec); + [Export ("advanceSimulationTime:")] + void AdvanceSimulationTime (double sec); - [Export ("resetSimulation")] - void ResetSimulation (); + [Export ("resetSimulation")] + void ResetSimulation (); - [NullAllowed] // by default this property is null - [Export ("particleTexture", ArgumentSemantic.Retain)] - SKTexture ParticleTexture { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleTexture", ArgumentSemantic.Retain)] + SKTexture ParticleTexture { get; set; } - [Export ("particleZPosition")] - nfloat ParticleZPosition { get; set; } + [Export ("particleZPosition")] + nfloat ParticleZPosition { get; set; } - [Deprecated (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.TvOS, 8, 0)] - [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("particleZPositionRange")] - nfloat ParticleZPositionRange { get; set; } + [Deprecated (PlatformName.iOS, 8, 0)] + [Deprecated (PlatformName.TvOS, 8, 0)] + [Deprecated (PlatformName.MacOSX, 10, 10)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("particleZPositionRange")] + nfloat ParticleZPositionRange { get; set; } - [Export ("particleBlendMode")] - SKBlendMode ParticleBlendMode { get; set; } + [Export ("particleBlendMode")] + SKBlendMode ParticleBlendMode { get; set; } - [Export ("particleColor", ArgumentSemantic.Retain)] - UIColor ParticleColor { get; set; } + [Export ("particleColor", ArgumentSemantic.Retain)] + UIColor ParticleColor { get; set; } - [Export ("particleColorRedRange")] - nfloat ParticleColorRedRange { get; set; } + [Export ("particleColorRedRange")] + nfloat ParticleColorRedRange { get; set; } - [Export ("particleColorGreenRange")] - nfloat ParticleColorGreenRange { get; set; } + [Export ("particleColorGreenRange")] + nfloat ParticleColorGreenRange { get; set; } - [Export ("particleColorBlueRange")] - nfloat ParticleColorBlueRange { get; set; } + [Export ("particleColorBlueRange")] + nfloat ParticleColorBlueRange { get; set; } - [Export ("particleColorAlphaRange")] - nfloat ParticleColorAlphaRange { get; set; } + [Export ("particleColorAlphaRange")] + nfloat ParticleColorAlphaRange { get; set; } - [Export ("particleColorRedSpeed")] - nfloat ParticleColorRedSpeed { get; set; } + [Export ("particleColorRedSpeed")] + nfloat ParticleColorRedSpeed { get; set; } - [Export ("particleColorGreenSpeed")] - nfloat ParticleColorGreenSpeed { get; set; } + [Export ("particleColorGreenSpeed")] + nfloat ParticleColorGreenSpeed { get; set; } - [Export ("particleColorBlueSpeed")] - nfloat ParticleColorBlueSpeed { get; set; } + [Export ("particleColorBlueSpeed")] + nfloat ParticleColorBlueSpeed { get; set; } - [Export ("particleColorAlphaSpeed")] - nfloat ParticleColorAlphaSpeed { get; set; } + [Export ("particleColorAlphaSpeed")] + nfloat ParticleColorAlphaSpeed { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleColorSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleColorSequence { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleColorSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleColorSequence { get; set; } - [Export ("particleColorBlendFactor")] - nfloat ParticleColorBlendFactor { get; set; } + [Export ("particleColorBlendFactor")] + nfloat ParticleColorBlendFactor { get; set; } - [Export ("particleColorBlendFactorRange")] - nfloat ParticleColorBlendFactorRange { get; set; } + [Export ("particleColorBlendFactorRange")] + nfloat ParticleColorBlendFactorRange { get; set; } - [Export ("particleColorBlendFactorSpeed")] - nfloat ParticleColorBlendFactorSpeed { get; set; } + [Export ("particleColorBlendFactorSpeed")] + nfloat ParticleColorBlendFactorSpeed { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleColorBlendFactorSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleColorBlendFactorSequence { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleColorBlendFactorSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleColorBlendFactorSequence { get; set; } - [Export ("particlePosition")] - CGPoint ParticlePosition { get; set; } + [Export ("particlePosition")] + CGPoint ParticlePosition { get; set; } - [Export ("particlePositionRange")] - CGVector ParticlePositionRange { get; set; } + [Export ("particlePositionRange")] + CGVector ParticlePositionRange { get; set; } - [Export ("particleSpeed")] - nfloat ParticleSpeed { get; set; } + [Export ("particleSpeed")] + nfloat ParticleSpeed { get; set; } - [Export ("particleSpeedRange")] - nfloat ParticleSpeedRange { get; set; } + [Export ("particleSpeedRange")] + nfloat ParticleSpeedRange { get; set; } - [Export ("emissionAngle")] - nfloat EmissionAngle { get; set; } + [Export ("emissionAngle")] + nfloat EmissionAngle { get; set; } - [Export ("emissionAngleRange")] - nfloat EmissionAngleRange { get; set; } + [Export ("emissionAngleRange")] + nfloat EmissionAngleRange { get; set; } - [Export ("xAcceleration")] - nfloat XAcceleration { get; set; } + [Export ("xAcceleration")] + nfloat XAcceleration { get; set; } - [Export ("yAcceleration")] - nfloat YAcceleration { get; set; } + [Export ("yAcceleration")] + nfloat YAcceleration { get; set; } - [Export ("particleBirthRate")] - nfloat ParticleBirthRate { get; set; } + [Export ("particleBirthRate")] + nfloat ParticleBirthRate { get; set; } - [Export ("numParticlesToEmit")] - nuint NumParticlesToEmit { get; set; } + [Export ("numParticlesToEmit")] + nuint NumParticlesToEmit { get; set; } - [Export ("particleLifetime")] - nfloat ParticleLifetime { get; set; } + [Export ("particleLifetime")] + nfloat ParticleLifetime { get; set; } - [Export ("particleLifetimeRange")] - nfloat ParticleLifetimeRange { get; set; } + [Export ("particleLifetimeRange")] + nfloat ParticleLifetimeRange { get; set; } - [Export ("particleRotation")] - nfloat ParticleRotation { get; set; } + [Export ("particleRotation")] + nfloat ParticleRotation { get; set; } - [Export ("particleRotationRange")] - nfloat ParticleRotationRange { get; set; } + [Export ("particleRotationRange")] + nfloat ParticleRotationRange { get; set; } - [Export ("particleRotationSpeed")] - nfloat ParticleRotationSpeed { get; set; } + [Export ("particleRotationSpeed")] + nfloat ParticleRotationSpeed { get; set; } - [Export ("particleSize")] - CGSize ParticleSize { get; set; } + [Export ("particleSize")] + CGSize ParticleSize { get; set; } - [Export ("particleScale")] - nfloat ParticleScale { get; set; } + [Export ("particleScale")] + nfloat ParticleScale { get; set; } - [Export ("particleScaleRange")] - nfloat ParticleScaleRange { get; set; } + [Export ("particleScaleRange")] + nfloat ParticleScaleRange { get; set; } - [Export ("particleScaleSpeed")] - nfloat ParticleScaleSpeed { get; set; } + [Export ("particleScaleSpeed")] + nfloat ParticleScaleSpeed { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleScaleSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleScaleSequence { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleScaleSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleScaleSequence { get; set; } - [Export ("particleAlpha")] - nfloat ParticleAlpha { get; set; } + [Export ("particleAlpha")] + nfloat ParticleAlpha { get; set; } - [Export ("particleAlphaRange")] - nfloat ParticleAlphaRange { get; set; } + [Export ("particleAlphaRange")] + nfloat ParticleAlphaRange { get; set; } - [Export ("particleAlphaSpeed")] - nfloat ParticleAlphaSpeed { get; set; } + [Export ("particleAlphaSpeed")] + nfloat ParticleAlphaSpeed { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleAlphaSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleAlphaSequence { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleAlphaSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleAlphaSequence { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleAction", ArgumentSemantic.Copy)] - SKAction ParticleAction { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleAction", ArgumentSemantic.Copy)] + SKAction ParticleAction { get; set; } - [NullAllowed] // by default this property is null - [Export ("targetNode", ArgumentSemantic.Weak)] - SKNode TargetNode { get; set; } + [NullAllowed] // by default this property is null + [Export ("targetNode", ArgumentSemantic.Weak)] + SKNode TargetNode { get; set; } + + // + // iOS 8 + // + [MacCatalyst (13, 1)] + [Export ("fieldBitMask")] + uint FieldBitMask { get; set; } /* uint32_t */ + + [Deprecated (PlatformName.iOS, 8, 0)] + [Deprecated (PlatformName.TvOS, 8, 0)] + [Deprecated (PlatformName.MacOSX, 10, 10)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("particleZPositionSpeed")] + nfloat ParticleZPositionSpeed { get; set; } + + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Export ("fieldBitMask")] - uint FieldBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Export ("particleRenderOrder", ArgumentSemantic.Assign)] + SKParticleRenderOrder ParticleRenderOrder { get; set; } - [Deprecated (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.TvOS, 8, 0)] - [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("particleZPositionSpeed")] - nfloat ParticleZPositionSpeed { get; set; } + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [MacCatalyst (13, 1)] - [Export ("particleRenderOrder", ArgumentSemantic.Assign)] - SKParticleRenderOrder ParticleRenderOrder { get; set; } + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); + } + /// A defined by a Core Graphics . + /// + /// Apple documentation for SKShapeNode [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + [BaseType (typeof (SKNode))] + partial interface SKShapeNode { - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [NullAllowed] + [Export ("path")] + CGPath Path { get; set; } - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); -} + [Export ("strokeColor", ArgumentSemantic.Retain)] + UIColor StrokeColor { get; set; } -/// A defined by a Core Graphics . -/// -/// Apple documentation for SKShapeNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -partial interface SKShapeNode { + [Export ("fillColor", ArgumentSemantic.Retain)] + UIColor FillColor { get; set; } - [NullAllowed] - [Export ("path")] - CGPath Path { get; set; } + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - [Export ("strokeColor", ArgumentSemantic.Retain)] - UIColor StrokeColor { get; set; } + [Export ("antialiased")] + bool Antialiased { [Bind ("isAntialiased")] get; set; } - [Export ("fillColor", ArgumentSemantic.Retain)] - UIColor FillColor { get; set; } + [Export ("lineWidth")] + nfloat LineWidth { get; set; } - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } + [Export ("glowWidth")] + nfloat GlowWidth { get; set; } - [Export ("antialiased")] - bool Antialiased { [Bind ("isAntialiased")] get; set; } + // + // iOS 8 + // + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("fillTexture", ArgumentSemantic.Retain)] + SKTexture FillTexture { get; set; } - [Export ("lineWidth")] - nfloat LineWidth { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("fillShader", ArgumentSemantic.Retain)] + SKShader FillShader { get; set; } - [Export ("glowWidth")] - nfloat GlowWidth { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("strokeTexture", ArgumentSemantic.Retain)] + SKTexture StrokeTexture { get; set; } - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("fillTexture", ArgumentSemantic.Retain)] - SKTexture FillTexture { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("strokeShader", ArgumentSemantic.Retain)] + SKShader StrokeShader { get; set; } + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithPath:")] + SKShapeNode FromPath (CGPath path); + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithPath:centered:")] + SKShapeNode FromPath (CGPath path, bool centered); + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRect:")] + SKShapeNode FromRect (CGRect rect); + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRectOfSize:")] + SKShapeNode FromRect (CGSize size); + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRect:cornerRadius:")] + SKShapeNode FromRect (CGRect rect, nfloat cornerRadius); + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRectOfSize:cornerRadius:")] + SKShapeNode FromRect (CGSize size, nfloat cornerRadius); + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithCircleOfRadius:")] + SKShapeNode FromCircle (nfloat radius); + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithEllipseInRect:")] + SKShapeNode FromEllipse (CGRect rect); + + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithEllipseOfSize:")] + SKShapeNode FromEllipse (CGSize size); + + // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 + [Internal] + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithPoints:count:")] + SKShapeNode FromPoints (ref CGPoint points, nuint numPoints); + + // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 + [Internal] + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithSplinePoints:count:")] + SKShapeNode FromSplinePoints (ref CGPoint points, nuint numPoints); + + [MacCatalyst (13, 1)] + [Export ("lineCap")] + CGLineCap LineCap { get; set; } + + [MacCatalyst (13, 1)] + [Export ("lineJoin")] + CGLineJoin LineJoin { get; set; } + + [MacCatalyst (13, 1)] + [Export ("miterLimit")] + nfloat MiterLimit { get; set; } + + [MacCatalyst (13, 1)] + [Export ("lineLength")] + nfloat LineLength { get; } + + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } + + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); + + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); + } + /// A range of motion used with inverse kinematics. + /// + /// Apple documentation for SKReachConstraints [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("fillShader", ArgumentSemantic.Retain)] - SKShader FillShader { get; set; } + [BaseType (typeof (NSObject))] + interface SKReachConstraints : NSSecureCoding { + [DesignatedInitializer] + [Export ("initWithLowerAngleLimit:upperAngleLimit:")] + NativeHandle Constructor (nfloat lowerAngleLimit, nfloat upperAngleLimit); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("strokeTexture", ArgumentSemantic.Retain)] - SKTexture StrokeTexture { get; set; } + [Export ("lowerAngleLimit", ArgumentSemantic.UnsafeUnretained)] + nfloat LowerAngleLimit { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("strokeShader", ArgumentSemantic.Retain)] - SKShader StrokeShader { get; set; } + [Export ("upperAngleLimit", ArgumentSemantic.UnsafeUnretained)] + nfloat UpperAngleLimit { get; set; } + } + /// A path-defined area. Typically used for hit-testing and physics-field extents. + /// + /// Apple documentation for SKRegion [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPath:")] - SKShapeNode FromPath (CGPath path); + [BaseType (typeof (NSObject))] + interface SKRegion : NSCopying, NSSecureCoding { + [Export ("initWithRadius:")] + NativeHandle Constructor (float /* float, not CGFloat */ radius); - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPath:centered:")] - SKShapeNode FromPath (CGPath path, bool centered); + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRect:")] - SKShapeNode FromRect (CGRect rect); + [Export ("initWithPath:")] + NativeHandle Constructor (CGPath path); - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRectOfSize:")] - SKShapeNode FromRect (CGSize size); + [Export ("path")] + [NullAllowed] + CGPath Path { get; } - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRect:cornerRadius:")] - SKShapeNode FromRect (CGRect rect, nfloat cornerRadius); + [Static, Export ("infiniteRegion")] + SKRegion InfiniteRegion { get; } - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRectOfSize:cornerRadius:")] - SKShapeNode FromRect (CGSize size, nfloat cornerRadius); + [Export ("inverseRegion")] + SKRegion InverseRegion (); - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithCircleOfRadius:")] - SKShapeNode FromCircle (nfloat radius); + [Export ("regionByUnionWithRegion:")] + SKRegion CreateUnion (SKRegion region); - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithEllipseInRect:")] - SKShapeNode FromEllipse (CGRect rect); + [Export ("regionByDifferenceFromRegion:")] + SKRegion CreateDifference (SKRegion region); - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithEllipseOfSize:")] - SKShapeNode FromEllipse (CGSize size); + [Export ("regionByIntersectionWithRegion:")] + SKRegion CreateIntersection (SKRegion region); - // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 - [Internal] - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPoints:count:")] - SKShapeNode FromPoints (ref CGPoint points, nuint numPoints); + [Export ("containsPoint:")] + bool ContainsPoint (CGPoint point); + } - // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 - [Internal] + /// A that displays a string. + /// + /// Apple documentation for SKLabelNode [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithSplinePoints:count:")] - SKShapeNode FromSplinePoints (ref CGPoint points, nuint numPoints); + [BaseType (typeof (SKNode))] + partial interface SKLabelNode { - [MacCatalyst (13, 1)] - [Export ("lineCap")] - CGLineCap LineCap { get; set; } + [Static, Export ("labelNodeWithFontNamed:")] + SKLabelNode FromFont ([NullAllowed] string fontName); - [MacCatalyst (13, 1)] - [Export ("lineJoin")] - CGLineJoin LineJoin { get; set; } + [Export ("initWithFontNamed:")] + NativeHandle Constructor ([NullAllowed] string fontName); - [MacCatalyst (13, 1)] - [Export ("miterLimit")] - nfloat MiterLimit { get; set; } + [MacCatalyst (13, 1)] + [Static, Export ("labelNodeWithText:")] + SKLabelNode FromText ([NullAllowed] string text); - [MacCatalyst (13, 1)] - [Export ("lineLength")] - nfloat LineLength { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("labelNodeWithAttributedText:")] + SKLabelNode FromText ([NullAllowed] NSAttributedString attributedText); - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + [Export ("verticalAlignmentMode")] + SKLabelVerticalAlignmentMode VerticalAlignmentMode { get; set; } - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [Export ("horizontalAlignmentMode")] + SKLabelHorizontalAlignmentMode HorizontalAlignmentMode { get; set; } - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); -} + [MacCatalyst (13, 1)] + [Export ("numberOfLines")] + nint NumberOfLines { get; set; } -/// A range of motion used with inverse kinematics. -/// -/// Apple documentation for SKReachConstraints -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKReachConstraints : NSSecureCoding { - [DesignatedInitializer] - [Export ("initWithLowerAngleLimit:upperAngleLimit:")] - NativeHandle Constructor (nfloat lowerAngleLimit, nfloat upperAngleLimit); - - [Export ("lowerAngleLimit", ArgumentSemantic.UnsafeUnretained)] - nfloat LowerAngleLimit { get; set; } - - [Export ("upperAngleLimit", ArgumentSemantic.UnsafeUnretained)] - nfloat UpperAngleLimit { get; set; } -} + [MacCatalyst (13, 1)] + [Export ("lineBreakMode", ArgumentSemantic.Assign)] + NSLineBreakMode LineBreakMode { get; set; } -/// A path-defined area. Typically used for hit-testing and physics-field extents. -/// -/// Apple documentation for SKRegion -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKRegion : NSCopying, NSSecureCoding { - [Export ("initWithRadius:")] - NativeHandle Constructor (float /* float, not CGFloat */ radius); + [MacCatalyst (13, 1)] + [Export ("preferredMaxLayoutWidth")] + nfloat PreferredMaxLayoutWidth { get; set; } - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); + [Export ("fontName", ArgumentSemantic.Copy)] + [NullAllowed] + string FontName { get; set; } - [Export ("initWithPath:")] - NativeHandle Constructor (CGPath path); + [Export ("text", ArgumentSemantic.Copy)] + [NullAllowed] // nullable in Xcode7 headers and caught by introspection tests + string Text { get; set; } - [Export ("path")] - [NullAllowed] - CGPath Path { get; } + [MacCatalyst (13, 1)] + [NullAllowed, Export ("attributedText", ArgumentSemantic.Copy)] + NSAttributedString AttributedText { get; set; } - [Static, Export ("infiniteRegion")] - SKRegion InfiniteRegion { get; } + [Export ("fontSize")] + nfloat FontSize { get; set; } - [Export ("inverseRegion")] - SKRegion InverseRegion (); + [Export ("fontColor", ArgumentSemantic.Retain)] + [NullAllowed] + UIColor FontColor { get; set; } - [Export ("regionByUnionWithRegion:")] - SKRegion CreateUnion (SKRegion region); + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Export ("regionByDifferenceFromRegion:")] - SKRegion CreateDifference (SKRegion region); + [NullAllowed] // by default this property is null + [Export ("color", ArgumentSemantic.Retain)] + UIColor Color { get; set; } - [Export ("regionByIntersectionWithRegion:")] - SKRegion CreateIntersection (SKRegion region); + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } + } - [Export ("containsPoint:")] - bool ContainsPoint (CGPoint point); -} + /// A node that creates a lighting effect within a scene. + /// + /// Apple documentation for SKLightNode + [MacCatalyst (13, 1)] + [BaseType (typeof (SKNode))] + interface SKLightNode { + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } -/// A that displays a string. -/// -/// Apple documentation for SKLabelNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -partial interface SKLabelNode { + [Export ("lightColor")] + UIColor LightColor { get; set; } - [Static, Export ("labelNodeWithFontNamed:")] - SKLabelNode FromFont ([NullAllowed] string fontName); + [Export ("ambientColor")] + UIColor AmbientColor { get; set; } - [Export ("initWithFontNamed:")] - NativeHandle Constructor ([NullAllowed] string fontName); + [Export ("shadowColor")] + UIColor ShadowColor { get; set; } - [MacCatalyst (13, 1)] - [Static, Export ("labelNodeWithText:")] - SKLabelNode FromText ([NullAllowed] string text); + [Export ("falloff")] + nfloat Falloff { get; set; } + + [Export ("categoryBitMask")] + uint CategoryBitMask { get; set; } /* uint32_t */ + } + /// A that displays video. + /// + /// Apple documentation for SKVideoNode [MacCatalyst (13, 1)] - [Static] - [Export ("labelNodeWithAttributedText:")] - SKLabelNode FromText ([NullAllowed] NSAttributedString attributedText); + [BaseType (typeof (SKNode))] + partial interface SKVideoNode { + [Static, Export ("videoNodeWithAVPlayer:")] + SKVideoNode FromPlayer (AVPlayer player); - [Export ("verticalAlignmentMode")] - SKLabelVerticalAlignmentMode VerticalAlignmentMode { get; set; } + [Static, Export ("videoNodeWithVideoFileNamed:"), Internal] + SKVideoNode VideoNodeWithVideoFileNamed (string videoFile); - [Export ("horizontalAlignmentMode")] - SKLabelHorizontalAlignmentMode HorizontalAlignmentMode { get; set; } + [Static, Export ("videoNodeWithFileNamed:"), Internal] + SKVideoNode VideoNodeWithFileNamed (string videoFile); - [MacCatalyst (13, 1)] - [Export ("numberOfLines")] - nint NumberOfLines { get; set; } + [Static, Export ("videoNodeWithVideoURL:"), Internal] + SKVideoNode VideoNodeWithVideoURL (NSUrl videoURL); - [MacCatalyst (13, 1)] - [Export ("lineBreakMode", ArgumentSemantic.Assign)] - NSLineBreakMode LineBreakMode { get; set; } + [Static, Export ("videoNodeWithURL:"), Internal] + SKVideoNode VideoNodeWithURL (NSUrl videoURL); - [MacCatalyst (13, 1)] - [Export ("preferredMaxLayoutWidth")] - nfloat PreferredMaxLayoutWidth { get; set; } + [DesignatedInitializer] + [Export ("initWithAVPlayer:")] + NativeHandle Constructor (AVPlayer player); - [Export ("fontName", ArgumentSemantic.Copy)] - [NullAllowed] - string FontName { get; set; } + [Export ("initWithVideoFileNamed:"), Internal] + IntPtr InitWithVideoFileNamed (string videoFile); - [Export ("text", ArgumentSemantic.Copy)] - [NullAllowed] // nullable in Xcode7 headers and caught by introspection tests - string Text { get; set; } + [Export ("initWithFileNamed:"), Internal] + IntPtr InitWithFileNamed (string videoFile); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("attributedText", ArgumentSemantic.Copy)] - NSAttributedString AttributedText { get; set; } + [Export ("initWithVideoURL:"), Internal] + IntPtr InitWithVideoURL (NSUrl url); - [Export ("fontSize")] - nfloat FontSize { get; set; } + [Export ("initWithURL:"), Internal] + IntPtr InitWithURL (NSUrl url); - [Export ("fontColor", ArgumentSemantic.Retain)] - [NullAllowed] - UIColor FontColor { get; set; } + [Export ("play")] + void Play (); - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("pause")] + void Pause (); - [NullAllowed] // by default this property is null - [Export ("color", ArgumentSemantic.Retain)] - UIColor Color { get; set; } + [Export ("size")] + CGSize Size { get; set; } - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } -} + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } + } -/// A node that creates a lighting effect within a scene. -/// -/// Apple documentation for SKLightNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -interface SKLightNode { - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } + /// Mathematical constraint on a node's position or orientation. + /// + /// Apple documentation for SKConstraint + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface SKConstraint : NSSecureCoding, NSCopying { + [Export ("enabled")] + bool Enabled { get; set; } - [Export ("lightColor")] - UIColor LightColor { get; set; } + [NullAllowed] // by default this property is null + [Export ("referenceNode", ArgumentSemantic.Retain)] + SKNode ReferenceNode { get; set; } - [Export ("ambientColor")] - UIColor AmbientColor { get; set; } + [Static, Export ("positionX:")] + SKConstraint CreateXRestriction (SKRange range); - [Export ("shadowColor")] - UIColor ShadowColor { get; set; } + [Static, Export ("positionY:")] + SKConstraint CreateYRestriction (SKRange range); - [Export ("falloff")] - nfloat Falloff { get; set; } + [Static, Export ("positionX:Y:")] + SKConstraint CreateRestriction (SKRange xRange, SKRange yRange); - [Export ("categoryBitMask")] - uint CategoryBitMask { get; set; } /* uint32_t */ -} + [Static, Export ("distance:toNode:")] + SKConstraint CreateDistance (SKRange range, SKNode node); -/// A that displays video. -/// -/// Apple documentation for SKVideoNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -partial interface SKVideoNode { - [Static, Export ("videoNodeWithAVPlayer:")] - SKVideoNode FromPlayer (AVPlayer player); + [Static, Export ("distance:toPoint:")] + SKConstraint CreateDistance (SKRange range, CGPoint point); - [Static, Export ("videoNodeWithVideoFileNamed:"), Internal] - SKVideoNode VideoNodeWithVideoFileNamed (string videoFile); + [Static, Export ("distance:toPoint:inNode:")] + SKConstraint CreateDistance (SKRange range, CGPoint point, SKNode node); - [Static, Export ("videoNodeWithFileNamed:"), Internal] - SKVideoNode VideoNodeWithFileNamed (string videoFile); + [Static, Export ("zRotation:")] + SKConstraint CreateZRotation (SKRange zRange); - [Static, Export ("videoNodeWithVideoURL:"), Internal] - SKVideoNode VideoNodeWithVideoURL (NSUrl videoURL); + [Static, Export ("orientToNode:offset:")] + SKConstraint CreateOrientToNode (SKNode node, SKRange radians); - [Static, Export ("videoNodeWithURL:"), Internal] - SKVideoNode VideoNodeWithURL (NSUrl videoURL); + [Static, Export ("orientToPoint:offset:")] + SKConstraint CreateOrientToPoint (CGPoint point, SKRange radians); - [DesignatedInitializer] - [Export ("initWithAVPlayer:")] - NativeHandle Constructor (AVPlayer player); + [Static, Export ("orientToPoint:inNode:offset:")] + SKConstraint CreateOrientToPoint (CGPoint point, SKNode node, SKRange radians); + } - [Export ("initWithVideoFileNamed:"), Internal] - IntPtr InitWithVideoFileNamed (string videoFile); + /// A node that masks its children's pixels. + /// + /// An masks pixels outside of the area defined by its node. Pixels that fall outside of that area are not passed up towards the root of the . + /// + /// + /// Apple documentation for SKCropNode + [MacCatalyst (13, 1)] + [BaseType (typeof (SKNode))] + partial interface SKCropNode { - [Export ("initWithFileNamed:"), Internal] - IntPtr InitWithFileNamed (string videoFile); + [NullAllowed] // by default this property is null + [Export ("maskNode", ArgumentSemantic.Retain)] + SKNode MaskNode { get; set; } + } - [Export ("initWithVideoURL:"), Internal] - IntPtr InitWithVideoURL (NSUrl url); + /// A that displays a . + /// + /// Application developers should note the availability of debugging properties, such as . + /// + /// Apple documentation for SKView + [MacCatalyst (13, 1)] + [BaseType (typeof (UIView))] + [DisableDefaultCtor] +#if MONOMAC + partial interface SKView : NSSecureCoding { +#else + partial interface SKView { +#endif + [Export ("initWithFrame:")] + NativeHandle Constructor (CGRect frame); - [Export ("initWithURL:"), Internal] - IntPtr InitWithURL (NSUrl url); + [Export ("paused")] + bool Paused { [Bind ("isPaused")] get; set; } - [Export ("play")] - void Play (); + [Export ("showsFPS")] + bool ShowsFPS { get; set; } - [Export ("pause")] - void Pause (); + [Export ("showsDrawCount")] + bool ShowsDrawCount { get; set; } - [Export ("size")] - CGSize Size { get; set; } + [Export ("showsNodeCount")] + bool ShowsNodeCount { get; set; } - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } -} + [MacCatalyst (13, 1)] + [Export ("showsPhysics")] + bool ShowsPhysics { get; set; } -/// Mathematical constraint on a node's position or orientation. -/// -/// Apple documentation for SKConstraint -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKConstraint : NSSecureCoding, NSCopying { - [Export ("enabled")] - bool Enabled { get; set; } + [Export ("asynchronous")] + bool Asynchronous { [Bind ("isAsynchronous")] get; set; } - [NullAllowed] // by default this property is null - [Export ("referenceNode", ArgumentSemantic.Retain)] - SKNode ReferenceNode { get; set; } + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("frameInterval")] + nint FrameInterval { get; set; } - [Static, Export ("positionX:")] - SKConstraint CreateXRestriction (SKRange range); + [Export ("presentScene:")] + void PresentScene ([NullAllowed] SKScene scene); - [Static, Export ("positionY:")] - SKConstraint CreateYRestriction (SKRange range); + [Export ("presentScene:transition:")] + void PresentScene (SKScene scene, SKTransition transition); - [Static, Export ("positionX:Y:")] - SKConstraint CreateRestriction (SKRange xRange, SKRange yRange); + [Export ("scene")] + [NullAllowed] + SKScene Scene { get; } - [Static, Export ("distance:toNode:")] - SKConstraint CreateDistance (SKRange range, SKNode node); + [Export ("textureFromNode:")] + [return: NullAllowed] + SKTexture TextureFromNode (SKNode node); - [Static, Export ("distance:toPoint:")] - SKConstraint CreateDistance (SKRange range, CGPoint point); + [Export ("convertPoint:toScene:")] + CGPoint ConvertPointToScene (CGPoint point, SKScene scene); - [Static, Export ("distance:toPoint:inNode:")] - SKConstraint CreateDistance (SKRange range, CGPoint point, SKNode node); + [Export ("convertPoint:fromScene:")] + CGPoint ConvertPointFromScene (CGPoint point, SKScene scene); - [Static, Export ("zRotation:")] - SKConstraint CreateZRotation (SKRange zRange); + [Export ("ignoresSiblingOrder")] + bool IgnoresSiblingOrder { get; set; } - [Static, Export ("orientToNode:offset:")] - SKConstraint CreateOrientToNode (SKNode node, SKRange radians); + // + // iOS 8 + // + [MacCatalyst (13, 1)] + [Export ("allowsTransparency")] + bool AllowsTransparency { get; set; } - [Static, Export ("orientToPoint:offset:")] - SKConstraint CreateOrientToPoint (CGPoint point, SKRange radians); + [MacCatalyst (13, 1)] + [Export ("shouldCullNonVisibleNodes")] + bool ShouldCullNonVisibleNodes { get; set; } - [Static, Export ("orientToPoint:inNode:offset:")] - SKConstraint CreateOrientToPoint (CGPoint point, SKNode node, SKRange radians); -} + [MacCatalyst (13, 1)] + [Export ("showsFields")] + bool ShowsFields { get; set; } -/// A node that masks its children's pixels. -/// -/// An masks pixels outside of the area defined by its node. Pixels that fall outside of that area are not passed up towards the root of the . -/// -/// -/// Apple documentation for SKCropNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -partial interface SKCropNode { - - [NullAllowed] // by default this property is null - [Export ("maskNode", ArgumentSemantic.Retain)] - SKNode MaskNode { get; set; } -} + [MacCatalyst (13, 1)] + [Export ("showsQuadCount")] + bool ShowsQuadCount { get; set; } -/// A that displays a . -/// -/// Application developers should note the availability of debugging properties, such as . -/// -/// Apple documentation for SKView -[MacCatalyst (13, 1)] -[BaseType (typeof (UIView))] -[DisableDefaultCtor] -#if MONOMAC - partial interface SKView : NSSecureCoding { -#else -partial interface SKView { -#endif - [Export ("initWithFrame:")] - NativeHandle Constructor (CGRect frame); + [MacCatalyst (13, 1)] + [Export ("textureFromNode:crop:")] + [return: NullAllowed] + SKTexture TextureFromNode (SKNode node, CGRect crop); - [Export ("paused")] - bool Paused { [Bind ("isPaused")] get; set; } + [MacCatalyst (13, 1)] + [Export ("preferredFramesPerSecond")] + nint PreferredFramesPerSecond { get; set; } - [Export ("showsFPS")] - bool ShowsFPS { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + ISKViewDelegate Delegate { get; set; } - [Export ("showsDrawCount")] - bool ShowsDrawCount { get; set; } + [iOS (14, 0)] + [TV (14, 0)] + [MacCatalyst (14, 0)] + [Export ("disableDepthStencilBuffer")] + bool DisableDepthStencilBuffer { get; set; } + } - [Export ("showsNodeCount")] - bool ShowsNodeCount { get; set; } + /// Interface representing the required methods (if any) of the protocol . + /// + /// This interface contains the required methods (if any) from the protocol defined by . + /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. + /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. + /// + interface ISKViewDelegate { } + /// Delegate object for objects, allowing the developer to control the frame rate. + /// + /// Apple documentation for SKViewDelegate [MacCatalyst (13, 1)] - [Export ("showsPhysics")] - bool ShowsPhysics { get; set; } + [Protocol, Model] + [BaseType (typeof (NSObject))] + interface SKViewDelegate { + [Export ("view:shouldRenderAtTime:")] + bool ShouldRender (SKView view, double time); + } - [Export ("asynchronous")] - bool Asynchronous { [Bind ("isAsynchronous")] get; set; } + /// Transitions that can be used between s. Used with the method. + /// + /// Apple documentation for SKTransition + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + partial interface SKTransition : NSCopying { - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("frameInterval")] - nint FrameInterval { get; set; } + [Static, Export ("crossFadeWithDuration:")] + SKTransition CrossFadeWithDuration (double sec); - [Export ("presentScene:")] - void PresentScene ([NullAllowed] SKScene scene); + [Static, Export ("fadeWithDuration:")] + SKTransition FadeWithDuration (double sec); - [Export ("presentScene:transition:")] - void PresentScene (SKScene scene, SKTransition transition); + [Static, Export ("fadeWithColor:duration:")] + SKTransition FadeWithColor (UIColor color, double sec); - [Export ("scene")] - [NullAllowed] - SKScene Scene { get; } + [Static, Export ("flipHorizontalWithDuration:")] + SKTransition FlipHorizontalWithDuration (double sec); - [Export ("textureFromNode:")] - [return: NullAllowed] - SKTexture TextureFromNode (SKNode node); + [Static, Export ("flipVerticalWithDuration:")] + SKTransition FlipVerticalWithDuration (double sec); - [Export ("convertPoint:toScene:")] - CGPoint ConvertPointToScene (CGPoint point, SKScene scene); + [Static, Export ("revealWithDirection:duration:")] + SKTransition RevealWithDirection (SKTransitionDirection direction, double sec); - [Export ("convertPoint:fromScene:")] - CGPoint ConvertPointFromScene (CGPoint point, SKScene scene); + [Static, Export ("moveInWithDirection:duration:")] + SKTransition MoveInWithDirection (SKTransitionDirection direction, double sec); - [Export ("ignoresSiblingOrder")] - bool IgnoresSiblingOrder { get; set; } + [Static, Export ("pushWithDirection:duration:")] + SKTransition PushWithDirection (SKTransitionDirection direction, double sec); - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Export ("allowsTransparency")] - bool AllowsTransparency { get; set; } + [Static, Export ("doorsOpenHorizontalWithDuration:")] + SKTransition DoorsOpenHorizontalWithDuration (double sec); - [MacCatalyst (13, 1)] - [Export ("shouldCullNonVisibleNodes")] - bool ShouldCullNonVisibleNodes { get; set; } + [Static, Export ("doorsOpenVerticalWithDuration:")] + SKTransition DoorsOpenVerticalWithDuration (double sec); - [MacCatalyst (13, 1)] - [Export ("showsFields")] - bool ShowsFields { get; set; } + [Static, Export ("doorsCloseHorizontalWithDuration:")] + SKTransition DoorsCloseHorizontalWithDuration (double sec); - [MacCatalyst (13, 1)] - [Export ("showsQuadCount")] - bool ShowsQuadCount { get; set; } + [Static, Export ("doorsCloseVerticalWithDuration:")] + SKTransition DoorsCloseVerticalWithDuration (double sec); - [MacCatalyst (13, 1)] - [Export ("textureFromNode:crop:")] - [return: NullAllowed] - SKTexture TextureFromNode (SKNode node, CGRect crop); - - [MacCatalyst (13, 1)] - [Export ("preferredFramesPerSecond")] - nint PreferredFramesPerSecond { get; set; } - - [MacCatalyst (13, 1)] - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - ISKViewDelegate Delegate { get; set; } - - [iOS (14, 0)] - [TV (14, 0)] - [MacCatalyst (14, 0)] - [Export ("disableDepthStencilBuffer")] - bool DisableDepthStencilBuffer { get; set; } -} - -/// Interface representing the required methods (if any) of the protocol . -/// -/// This interface contains the required methods (if any) from the protocol defined by . -/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. -/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. -/// -interface ISKViewDelegate { } - -/// Delegate object for objects, allowing the developer to control the frame rate. -/// -/// Apple documentation for SKViewDelegate -[MacCatalyst (13, 1)] -[Protocol, Model] -[BaseType (typeof (NSObject))] -interface SKViewDelegate { - [Export ("view:shouldRenderAtTime:")] - bool ShouldRender (SKView view, double time); -} - -/// Transitions that can be used between s. Used with the method. -/// -/// Apple documentation for SKTransition -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[DisableDefaultCtor] -partial interface SKTransition : NSCopying { - - [Static, Export ("crossFadeWithDuration:")] - SKTransition CrossFadeWithDuration (double sec); - - [Static, Export ("fadeWithDuration:")] - SKTransition FadeWithDuration (double sec); - - [Static, Export ("fadeWithColor:duration:")] - SKTransition FadeWithColor (UIColor color, double sec); - - [Static, Export ("flipHorizontalWithDuration:")] - SKTransition FlipHorizontalWithDuration (double sec); - - [Static, Export ("flipVerticalWithDuration:")] - SKTransition FlipVerticalWithDuration (double sec); - - [Static, Export ("revealWithDirection:duration:")] - SKTransition RevealWithDirection (SKTransitionDirection direction, double sec); + [Static, Export ("doorwayWithDuration:")] + SKTransition DoorwayWithDuration (double sec); - [Static, Export ("moveInWithDirection:duration:")] - SKTransition MoveInWithDirection (SKTransitionDirection direction, double sec); + [MacCatalyst (13, 1)] + [Static, Export ("transitionWithCIFilter:duration:")] + SKTransition TransitionWithCIFilter (CIFilter filter, double sec); - [Static, Export ("pushWithDirection:duration:")] - SKTransition PushWithDirection (SKTransitionDirection direction, double sec); + [Export ("pausesIncomingScene")] + bool PausesIncomingScene { get; set; } - [Static, Export ("doorsOpenHorizontalWithDuration:")] - SKTransition DoorsOpenHorizontalWithDuration (double sec); - - [Static, Export ("doorsOpenVerticalWithDuration:")] - SKTransition DoorsOpenVerticalWithDuration (double sec); - - [Static, Export ("doorsCloseHorizontalWithDuration:")] - SKTransition DoorsCloseHorizontalWithDuration (double sec); - - [Static, Export ("doorsCloseVerticalWithDuration:")] - SKTransition DoorsCloseVerticalWithDuration (double sec); - - [Static, Export ("doorwayWithDuration:")] - SKTransition DoorwayWithDuration (double sec); + [Export ("pausesOutgoingScene")] + bool PausesOutgoingScene { get; set; } + } + /// An image that can be used with one or more s and particles. + /// + /// Sprite Kit attempts to be efficient with the memory associated with textures. Textures are lazy-loaded from their source files and in preparation for loading onto the graphics hardware. This lazy-loading can be overridden with the Preload* methods. + /// + /// + /// Apple documentation for SKTexture [MacCatalyst (13, 1)] - [Static, Export ("transitionWithCIFilter:duration:")] - SKTransition TransitionWithCIFilter (CIFilter filter, double sec); + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + partial interface SKTexture : NSSecureCoding, NSCopying { - [Export ("pausesIncomingScene")] - bool PausesIncomingScene { get; set; } + [Static, Export ("textureWithImageNamed:")] + SKTexture FromImageNamed (string name); - [Export ("pausesOutgoingScene")] - bool PausesOutgoingScene { get; set; } -} + [Static, Export ("textureWithRect:inTexture:")] + SKTexture FromRectangle (CGRect rect, SKTexture texture); -/// An image that can be used with one or more s and particles. -/// -/// Sprite Kit attempts to be efficient with the memory associated with textures. Textures are lazy-loaded from their source files and in preparation for loading onto the graphics hardware. This lazy-loading can be overridden with the Preload* methods. -/// -/// -/// Apple documentation for SKTexture -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[DisableDefaultCtor] -partial interface SKTexture : NSSecureCoding, NSCopying { + [Static, Export ("textureWithCGImage:")] + SKTexture FromImage (CGImage image); - [Static, Export ("textureWithImageNamed:")] - SKTexture FromImageNamed (string name); + [Static, Export ("textureWithImage:")] + SKTexture FromImage (UIImage image); - [Static, Export ("textureWithRect:inTexture:")] - SKTexture FromRectangle (CGRect rect, SKTexture texture); + [Static, Export ("textureWithData:size:")] + SKTexture FromData (NSData pixelData, CGSize size); - [Static, Export ("textureWithCGImage:")] - SKTexture FromImage (CGImage image); + [Static, Export ("textureWithData:size:rowLength:alignment:")] + SKTexture FromData (NSData pixelData, CGSize size, uint /* unsigned int*/ rowLength, uint /* unsigned int */ alignment); - [Static, Export ("textureWithImage:")] - SKTexture FromImage (UIImage image); + [MacCatalyst (13, 1)] + [Export ("textureByApplyingCIFilter:")] + SKTexture TextureByApplyingCIFilter (CIFilter filter); - [Static, Export ("textureWithData:size:")] - SKTexture FromData (NSData pixelData, CGSize size); + [Export ("textureRect")] + CGRect TextureRect { get; } - [Static, Export ("textureWithData:size:rowLength:alignment:")] - SKTexture FromData (NSData pixelData, CGSize size, uint /* unsigned int*/ rowLength, uint /* unsigned int */ alignment); + [Export ("size")] + CGSize Size { get; } - [MacCatalyst (13, 1)] - [Export ("textureByApplyingCIFilter:")] - SKTexture TextureByApplyingCIFilter (CIFilter filter); + [Export ("filteringMode")] + SKTextureFilteringMode FilteringMode { get; set; } - [Export ("textureRect")] - CGRect TextureRect { get; } + [Export ("usesMipmaps")] + bool UsesMipmaps { get; set; } - [Export ("size")] - CGSize Size { get; } + [Static] + [Export ("preloadTextures:withCompletionHandler:")] + [Async] + // note: unlike SKTextureAtlas completion can't be null (or it crash) + void PreloadTextures (SKTexture [] textures, Action completion); - [Export ("filteringMode")] - SKTextureFilteringMode FilteringMode { get; set; } + [Export ("preloadWithCompletionHandler:")] + [Async] + // note: unlike SKTextureAtlas completion can't be null (or it crash) + void Preload (Action completion); - [Export ("usesMipmaps")] - bool UsesMipmaps { get; set; } + [MacCatalyst (13, 1)] + [Export ("textureByGeneratingNormalMap")] + SKTexture CreateTextureByGeneratingNormalMap (); - [Static] - [Export ("preloadTextures:withCompletionHandler:")] - [Async] - // note: unlike SKTextureAtlas completion can't be null (or it crash) - void PreloadTextures (SKTexture [] textures, Action completion); + [MacCatalyst (13, 1)] + [Export ("textureByGeneratingNormalMapWithSmoothness:contrast:")] + SKTexture CreateTextureByGeneratingNormalMap (nfloat smoothness, nfloat contrast); - [Export ("preloadWithCompletionHandler:")] - [Async] - // note: unlike SKTextureAtlas completion can't be null (or it crash) - void Preload (Action completion); + [MacCatalyst (13, 1)] + [Static, Export ("textureVectorNoiseWithSmoothness:size:")] + SKTexture FromTextureVectorNoise (nfloat smoothness, CGSize size); - [MacCatalyst (13, 1)] - [Export ("textureByGeneratingNormalMap")] - SKTexture CreateTextureByGeneratingNormalMap (); + [MacCatalyst (13, 1)] + [Static, Export ("textureNoiseWithSmoothness:size:grayscale:")] + SKTexture FromTextureNoise (nfloat smoothness, CGSize size, bool grayscale); - [MacCatalyst (13, 1)] - [Export ("textureByGeneratingNormalMapWithSmoothness:contrast:")] - SKTexture CreateTextureByGeneratingNormalMap (nfloat smoothness, nfloat contrast); + [MacCatalyst (13, 1)] + [Static, Export ("textureWithData:size:flipped:")] + SKTexture FromData (NSData pixelData, CGSize size, bool flipped); - [MacCatalyst (13, 1)] - [Static, Export ("textureVectorNoiseWithSmoothness:size:")] - SKTexture FromTextureVectorNoise (nfloat smoothness, CGSize size); + [MacCatalyst (13, 1)] + [Export ("CGImage")] + CGImage CGImage { get; } - [MacCatalyst (13, 1)] - [Static, Export ("textureNoiseWithSmoothness:size:grayscale:")] - SKTexture FromTextureNoise (nfloat smoothness, CGSize size, bool grayscale); - - [MacCatalyst (13, 1)] - [Static, Export ("textureWithData:size:flipped:")] - SKTexture FromData (NSData pixelData, CGSize size, bool flipped); + // Static Category from GameplayKit + [MacCatalyst (13, 1)] + [Static] + [Export ("textureWithNoiseMap:")] + SKTexture FromNoiseMap (GKNoiseMap noiseMap); + } - [MacCatalyst (13, 1)] - [Export ("CGImage")] - CGImage CGImage { get; } + /// A method that modifies a texture in place. + delegate void SKTextureModify (IntPtr pixelData, nuint lengthInBytes); - // Static Category from GameplayKit + /// A texture that can be modified after assignment. + /// + /// Apple documentation for SKMutableTexture [MacCatalyst (13, 1)] - [Static] - [Export ("textureWithNoiseMap:")] - SKTexture FromNoiseMap (GKNoiseMap noiseMap); -} - -/// A method that modifies a texture in place. -delegate void SKTextureModify (IntPtr pixelData, nuint lengthInBytes); - -/// A texture that can be modified after assignment. -/// -/// Apple documentation for SKMutableTexture -[MacCatalyst (13, 1)] -[BaseType (typeof (SKTexture))] -[DisableDefaultCtor] // cannot be created (like SKTexture) by calling `init` -interface SKMutableTexture { - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); - - [Export ("initWithSize:pixelFormat:")] - NativeHandle Constructor (CGSize size, CVPixelFormatType pixelFormat); + [BaseType (typeof (SKTexture))] + [DisableDefaultCtor] // cannot be created (like SKTexture) by calling `init` + interface SKMutableTexture { + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [Static, Export ("mutableTextureWithSize:")] - SKMutableTexture Create (CGSize size); + [Export ("initWithSize:pixelFormat:")] + NativeHandle Constructor (CGSize size, CVPixelFormatType pixelFormat); - [Export ("modifyPixelDataWithBlock:")] - void ModifyPixelData (SKTextureModify modifyMethod); -} - -delegate void SKTextureAtlasLoadCallback (NSError error, SKTextureAtlas foundAtlases); - -/// A collection of s that are loaded from a single source. -/// -/// -/// Apple documentation for SKTextureAtlas -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -partial interface SKTextureAtlas : NSSecureCoding { - - [Static, Export ("atlasNamed:")] - SKTextureAtlas FromName (string name); + [Static, Export ("mutableTextureWithSize:")] + SKMutableTexture Create (CGSize size); - [Export ("textureNamed:")] - SKTexture TextureNamed (string name); - - [Export ("textureNames")] - string [] TextureNames { get; } + [Export ("modifyPixelDataWithBlock:")] + void ModifyPixelData (SKTextureModify modifyMethod); + } - [Static] - [Export ("preloadTextureAtlases:withCompletionHandler:")] - [Async] - // Unfortunate name, should have been PreloadTextureAtlases - void PreloadTextures (SKTextureAtlas [] textures, Action completion); + delegate void SKTextureAtlasLoadCallback (NSError error, SKTextureAtlas foundAtlases); + /// A collection of s that are loaded from a single source. + /// + /// + /// Apple documentation for SKTextureAtlas [MacCatalyst (13, 1)] - [Static] - [Export ("preloadTextureAtlasesNamed:withCompletionHandler:")] - [Async (ResultTypeName = "SKTextureAtlasLoadResult")] - void PreloadTextureAtlases (string [] atlasNames, SKTextureAtlasLoadCallback completionHandler); + [BaseType (typeof (NSObject))] + partial interface SKTextureAtlas : NSSecureCoding { - [Export ("preloadWithCompletionHandler:")] - [Async] - void Preload (Action completion); + [Static, Export ("atlasNamed:")] + SKTextureAtlas FromName (string name); - [MacCatalyst (13, 1)] - [Static, Export ("atlasWithDictionary:")] - SKTextureAtlas FromDictionary (NSDictionary properties); + [Export ("textureNamed:")] + SKTexture TextureNamed (string name); -} + [Export ("textureNames")] + string [] TextureNames { get; } -/// Holds shareable uniform data for SKShader objects. -/// -/// Apple documentation for SKUniform -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKUniform : NSCopying, NSSecureCoding { - [Export ("initWithName:")] - NativeHandle Constructor (string name); + [Static] + [Export ("preloadTextureAtlases:withCompletionHandler:")] + [Async] + // Unfortunate name, should have been PreloadTextureAtlases + void PreloadTextures (SKTextureAtlas [] textures, Action completion); - [Export ("initWithName:texture:")] - NativeHandle Constructor (string name, [NullAllowed] SKTexture texture); + [MacCatalyst (13, 1)] + [Static] + [Export ("preloadTextureAtlasesNamed:withCompletionHandler:")] + [Async (ResultTypeName = "SKTextureAtlasLoadResult")] + void PreloadTextureAtlases (string [] atlasNames, SKTextureAtlasLoadCallback completionHandler); - [Export ("initWithName:float:")] - NativeHandle Constructor (string name, float /* float, not CGFloat */ value); + [Export ("preloadWithCompletionHandler:")] + [Async] + void Preload (Action completion); - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector2:")] - IntPtr InitWithNameFloatVector2 (string name, Vector2 value); + [MacCatalyst (13, 1)] + [Static, Export ("atlasWithDictionary:")] + SKTextureAtlas FromDictionary (NSDictionary properties); - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [MarshalNativeExceptions] - [Internal] - IntPtr InitWithNameVectorFloat2 (string name, Vector2 value); - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector3:")] - IntPtr InitWithNameFloatVector3 (string name, Vector3 value); - - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [Internal] - IntPtr InitWithNameVectorFloat3 (string name, Vector3 value); - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector4:")] - IntPtr InitWithNameFloatVector4 (string name, Vector4 value); + } - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [Internal] - IntPtr InitWithNameVectorFloat4 (string name, Vector4 value); + /// Holds shareable uniform data for SKShader objects. + /// + /// Apple documentation for SKUniform + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface SKUniform : NSCopying, NSSecureCoding { + [Export ("initWithName:")] + NativeHandle Constructor (string name); + + [Export ("initWithName:texture:")] + NativeHandle Constructor (string name, [NullAllowed] SKTexture texture); + + [Export ("initWithName:float:")] + NativeHandle Constructor (string name, float /* float, not CGFloat */ value); + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector2:")] + IntPtr InitWithNameFloatVector2 (string name, Vector2 value); + + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [MarshalNativeExceptions] + [Internal] + IntPtr InitWithNameVectorFloat2 (string name, Vector2 value); + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector3:")] + IntPtr InitWithNameFloatVector3 (string name, Vector3 value); + + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameVectorFloat3 (string name, Vector3 value); + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector4:")] + IntPtr InitWithNameFloatVector4 (string name, Vector4 value); + + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameVectorFloat4 (string name, Vector4 value); #if !NET [Internal] @@ -1867,10 +1867,10 @@ interface SKUniform : NSCopying, NSSecureCoding { IntPtr InitWithNameMatrixFloat2x2 (string name, Matrix2 value); #endif // !NET - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat2x2 value); + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat2x2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + NativeHandle Constructor (string name, MatrixFloat2x2 value); #if !NET [Internal] @@ -1888,10 +1888,10 @@ interface SKUniform : NSCopying, NSSecureCoding { IntPtr InitWithNameMatrixFloat3x3 (string name, Matrix3 value); #endif // !NET - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat3x3 value); + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat3x3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + NativeHandle Constructor (string name, MatrixFloat3x3 value); #if !NET [Internal] @@ -1911,80 +1911,80 @@ interface SKUniform : NSCopying, NSSecureCoding { IntPtr InitWithNameMatrixFloat4x4 (string name, Matrix4 value); #endif // !NET - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat4x4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat4x4 value); - - [Export ("name")] - string Name { get; } - - [Export ("uniformType")] - SKUniformType UniformType { get; } - - [Export ("textureValue")] - [NullAllowed] - SKTexture TextureValue { get; set; } - - [Export ("floatValue")] - float FloatValue { get; set; } /* float, not CGFloat */ - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector2Value")] - Vector2 _FloatVector2Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] - [Internal] - Vector2 _VectorFloat2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector3Value")] - Vector3 _FloatVector3Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] - [Internal] - Vector3 _VectorFloat3Value { + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat4x4:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector4Value")] - Vector4 _FloatVector4Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] - [Internal] - Vector4 _VectorFloat4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + NativeHandle Constructor (string name, MatrixFloat4x4 value); + + [Export ("name")] + string Name { get; } + + [Export ("uniformType")] + SKUniformType UniformType { get; } + + [Export ("textureValue")] + [NullAllowed] + SKTexture TextureValue { get; set; } + + [Export ("floatValue")] + float FloatValue { get; set; } /* float, not CGFloat */ + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector2Value")] + Vector2 _FloatVector2Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] + [Internal] + Vector2 _VectorFloat2Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector3Value")] + Vector3 _FloatVector3Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] + [Internal] + Vector3 _VectorFloat3Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector4Value")] + Vector4 _FloatVector4Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] + [Internal] + Vector4 _VectorFloat4Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } #if !NET [Internal] @@ -1995,14 +1995,14 @@ Vector4 _VectorFloat4Value { Matrix2 _FloatMatrix2Value { get; set; } #endif // !NET - [MacCatalyst (13, 1)] - [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] - MatrixFloat2x2 MatrixFloat2x2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [MacCatalyst (13, 1)] + [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] + MatrixFloat2x2 MatrixFloat2x2Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } #if !NET [Internal] @@ -2013,14 +2013,14 @@ MatrixFloat2x2 MatrixFloat2x2Value { Matrix3 _FloatMatrix3Value { get; set; } #endif // !NET - [MacCatalyst (13, 1)] - [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] - MatrixFloat3x3 MatrixFloat3x3Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [MacCatalyst (13, 1)] + [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] + MatrixFloat3x3 MatrixFloat3x3Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } #if !NET [Internal] @@ -2031,42 +2031,42 @@ MatrixFloat3x3 MatrixFloat3x3Value { Matrix4 _FloatMatrix4Value { get; set; } #endif // !NET - [MacCatalyst (13, 1)] - [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] - MatrixFloat4x4 MatrixFloat4x4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [MacCatalyst (13, 1)] + [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] + MatrixFloat4x4 MatrixFloat4x4Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } - [Static, Export ("uniformWithName:")] - SKUniform Create (string name); + [Static, Export ("uniformWithName:")] + SKUniform Create (string name); - [Static, Export ("uniformWithName:texture:")] - SKUniform Create (string name, [NullAllowed] SKTexture texture); + [Static, Export ("uniformWithName:texture:")] + SKUniform Create (string name, [NullAllowed] SKTexture texture); - [Static, Export ("uniformWithName:float:")] - SKUniform Create (string name, float /* float, not CGFloat */ value); + [Static, Export ("uniformWithName:float:")] + SKUniform Create (string name, float /* float, not CGFloat */ value); - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [MarshalNativeExceptions] - SKUniform Create (string name, Vector2 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:vectorFloat2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [MarshalNativeExceptions] + SKUniform Create (string name, Vector2 value); - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Vector3 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:vectorFloat3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Vector3 value); - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Vector4 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:vectorFloat4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Vector4 value); #if !NET [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] @@ -2076,11 +2076,11 @@ MatrixFloat4x4 MatrixFloat4x4Value { SKUniform Create (string name, Matrix2 value); #endif // !NET - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat2x2 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat2x2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat2x2 value); #if !NET [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] @@ -2090,11 +2090,11 @@ MatrixFloat4x4 MatrixFloat4x4Value { SKUniform Create (string name, Matrix3 value); #endif - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat3x3 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat3x3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat3x3 value); #if !NET [Obsolete ("Use 'the '(string, MatrixFloat4x4)' overload instead.")] @@ -2104,1415 +2104,1415 @@ MatrixFloat4x4 MatrixFloat4x4Value { SKUniform Create (string name, Matrix4 value); #endif // !NET - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat4x4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat4x4 value); -} + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat4x4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat4x4 value); + } -/// The delegate for a custom action, used with . -delegate void SKActionDurationHandler (SKNode node, nfloat elapsedTime); + /// The delegate for a custom action, used with . + delegate void SKActionDurationHandler (SKNode node, nfloat elapsedTime); -/// -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[DisableDefaultCtor] // To create an action, call the class method for the action you are interested in. -partial interface SKAction : NSSecureCoding, NSCopying { + /// + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] // To create an action, call the class method for the action you are interested in. + partial interface SKAction : NSSecureCoding, NSCopying { - [Export ("duration")] - double Duration { get; set; } + [Export ("duration")] + double Duration { get; set; } - [Export ("timingMode")] - SKActionTimingMode TimingMode { get; set; } + [Export ("timingMode")] + SKActionTimingMode TimingMode { get; set; } - [Export ("speed")] - nfloat Speed { get; set; } + [Export ("speed")] + nfloat Speed { get; set; } - [Export ("reversedAction")] - SKAction ReversedAction { get; } + [Export ("reversedAction")] + SKAction ReversedAction { get; } - // These are in a category - [Static, Export ("moveByX:y:duration:")] - SKAction MoveBy (nfloat deltaX, nfloat deltaY, double sec); + // These are in a category + [Static, Export ("moveByX:y:duration:")] + SKAction MoveBy (nfloat deltaX, nfloat deltaY, double sec); - [Static, Export ("moveBy:duration:")] - SKAction MoveBy (CGVector delta, double duration); + [Static, Export ("moveBy:duration:")] + SKAction MoveBy (CGVector delta, double duration); - [Static, Export ("moveTo:duration:")] - SKAction MoveTo (CGPoint location, double sec); + [Static, Export ("moveTo:duration:")] + SKAction MoveTo (CGPoint location, double sec); - [Static, Export ("moveToX:duration:")] - SKAction MoveToX (nfloat x, double sec); + [Static, Export ("moveToX:duration:")] + SKAction MoveToX (nfloat x, double sec); - [Static, Export ("moveToY:duration:")] - SKAction MoveToY (nfloat y, double sec); + [Static, Export ("moveToY:duration:")] + SKAction MoveToY (nfloat y, double sec); - [Static, Export ("rotateByAngle:duration:")] - SKAction RotateByAngle (nfloat radians, double sec); + [Static, Export ("rotateByAngle:duration:")] + SKAction RotateByAngle (nfloat radians, double sec); - [Static, Export ("rotateToAngle:duration:")] - SKAction RotateToAngle (nfloat radians, double sec); + [Static, Export ("rotateToAngle:duration:")] + SKAction RotateToAngle (nfloat radians, double sec); - [Static, Export ("rotateToAngle:duration:shortestUnitArc:")] - SKAction RotateToAngle (nfloat radians, double sec, bool shortedUnitArc); + [Static, Export ("rotateToAngle:duration:shortestUnitArc:")] + SKAction RotateToAngle (nfloat radians, double sec, bool shortedUnitArc); - [Static, Export ("resizeByWidth:height:duration:")] - SKAction ResizeByWidth (nfloat width, nfloat height, double duration); + [Static, Export ("resizeByWidth:height:duration:")] + SKAction ResizeByWidth (nfloat width, nfloat height, double duration); - [Static, Export ("resizeToWidth:height:duration:")] - SKAction ResizeTo (nfloat width, nfloat height, double duration); + [Static, Export ("resizeToWidth:height:duration:")] + SKAction ResizeTo (nfloat width, nfloat height, double duration); - [Static, Export ("resizeToWidth:duration:")] - SKAction ResizeToWidth (nfloat width, double duration); + [Static, Export ("resizeToWidth:duration:")] + SKAction ResizeToWidth (nfloat width, double duration); - [Static, Export ("resizeToHeight:duration:")] - SKAction ResizeToHeight (nfloat height, double duration); + [Static, Export ("resizeToHeight:duration:")] + SKAction ResizeToHeight (nfloat height, double duration); - [Static, Export ("scaleBy:duration:")] - SKAction ScaleBy (nfloat scale, double sec); + [Static, Export ("scaleBy:duration:")] + SKAction ScaleBy (nfloat scale, double sec); - [Static, Export ("scaleXBy:y:duration:")] - SKAction ScaleBy (nfloat xScale, nfloat yScale, double sec); + [Static, Export ("scaleXBy:y:duration:")] + SKAction ScaleBy (nfloat xScale, nfloat yScale, double sec); - [Static, Export ("scaleTo:duration:")] - SKAction ScaleTo (nfloat scale, double sec); + [Static, Export ("scaleTo:duration:")] + SKAction ScaleTo (nfloat scale, double sec); - [Static, Export ("scaleXTo:y:duration:")] - SKAction ScaleTo (nfloat xScale, nfloat yScale, double sec); + [Static, Export ("scaleXTo:y:duration:")] + SKAction ScaleTo (nfloat xScale, nfloat yScale, double sec); - [Static, Export ("scaleXTo:duration:")] - SKAction ScaleXTo (nfloat scale, double sec); + [Static, Export ("scaleXTo:duration:")] + SKAction ScaleXTo (nfloat scale, double sec); - [Static, Export ("scaleYTo:duration:")] - SKAction ScaleYTo (nfloat scale, double sec); + [Static, Export ("scaleYTo:duration:")] + SKAction ScaleYTo (nfloat scale, double sec); - [MacCatalyst (13, 1)] - [Static] - [Export ("scaleToSize:duration:")] - SKAction ScaleTo (CGSize size, double sec); + [MacCatalyst (13, 1)] + [Static] + [Export ("scaleToSize:duration:")] + SKAction ScaleTo (CGSize size, double sec); - [Static, Export ("sequence:")] - SKAction Sequence ([Params] SKAction [] actions); + [Static, Export ("sequence:")] + SKAction Sequence ([Params] SKAction [] actions); - [Static, Export ("group:")] - SKAction Group ([Params] SKAction [] actions); + [Static, Export ("group:")] + SKAction Group ([Params] SKAction [] actions); - [Static, Export ("repeatAction:count:")] - SKAction RepeatAction (SKAction action, nuint count); + [Static, Export ("repeatAction:count:")] + SKAction RepeatAction (SKAction action, nuint count); - [Static, Export ("repeatActionForever:")] - SKAction RepeatActionForever (SKAction action); + [Static, Export ("repeatActionForever:")] + SKAction RepeatActionForever (SKAction action); - [Static, Export ("fadeInWithDuration:")] - SKAction FadeInWithDuration (double sec); + [Static, Export ("fadeInWithDuration:")] + SKAction FadeInWithDuration (double sec); - [Static, Export ("fadeOutWithDuration:")] - SKAction FadeOutWithDuration (double sec); + [Static, Export ("fadeOutWithDuration:")] + SKAction FadeOutWithDuration (double sec); - [Static, Export ("fadeAlphaBy:duration:")] - SKAction FadeAlphaBy (nfloat factor, double sec); + [Static, Export ("fadeAlphaBy:duration:")] + SKAction FadeAlphaBy (nfloat factor, double sec); - [Static, Export ("fadeAlphaTo:duration:")] - SKAction FadeAlphaTo (nfloat alpha, double sec); + [Static, Export ("fadeAlphaTo:duration:")] + SKAction FadeAlphaTo (nfloat alpha, double sec); - [MacCatalyst (13, 1)] - [Static, Export ("setTexture:")] - SKAction SetTexture (SKTexture texture); + [MacCatalyst (13, 1)] + [Static, Export ("setTexture:")] + SKAction SetTexture (SKTexture texture); - [MacCatalyst (13, 1)] - [Static, Export ("setTexture:resize:")] - SKAction SetTexture (SKTexture texture, bool resize); + [MacCatalyst (13, 1)] + [Static, Export ("setTexture:resize:")] + SKAction SetTexture (SKTexture texture, bool resize); - [Static, Export ("animateWithTextures:timePerFrame:")] - SKAction AnimateWithTextures (SKTexture [] textures, double sec); + [Static, Export ("animateWithTextures:timePerFrame:")] + SKAction AnimateWithTextures (SKTexture [] textures, double sec); - [Static, Export ("animateWithTextures:timePerFrame:resize:restore:")] - SKAction AnimateWithTextures (SKTexture [] textures, double sec, bool resize, bool restore); + [Static, Export ("animateWithTextures:timePerFrame:resize:restore:")] + SKAction AnimateWithTextures (SKTexture [] textures, double sec, bool resize, bool restore); - [Static, Export ("playSoundFileNamed:waitForCompletion:")] - SKAction PlaySoundFileNamed (string soundFile, bool wait); + [Static, Export ("playSoundFileNamed:waitForCompletion:")] + SKAction PlaySoundFileNamed (string soundFile, bool wait); - [Static, Export ("colorizeWithColor:colorBlendFactor:duration:")] - SKAction ColorizeWithColor (UIColor color, nfloat colorBlendFactor, double sec); + [Static, Export ("colorizeWithColor:colorBlendFactor:duration:")] + SKAction ColorizeWithColor (UIColor color, nfloat colorBlendFactor, double sec); - [Static, Export ("colorizeWithColorBlendFactor:duration:")] - SKAction ColorizeWithColorBlendFactor (nfloat colorBlendFactor, double sec); + [Static, Export ("colorizeWithColorBlendFactor:duration:")] + SKAction ColorizeWithColorBlendFactor (nfloat colorBlendFactor, double sec); - [Static, Export ("followPath:duration:")] - SKAction FollowPath (CGPath path, double sec); + [Static, Export ("followPath:duration:")] + SKAction FollowPath (CGPath path, double sec); - [Static, Export ("followPath:asOffset:orientToPath:duration:")] + [Static, Export ("followPath:asOffset:orientToPath:duration:")] #if XAMCORE_5_0 SKAction FollowPath (CGPath path, bool offset, bool orientToPath, double sec); #else - SKAction FollowPath (CGPath path, bool offset, bool orient, double sec); + SKAction FollowPath (CGPath path, bool offset, bool orient, double sec); #endif - [MacCatalyst (13, 1)] - [Static, Export ("followPath:speed:")] - SKAction FollowPath (CGPath path, nfloat speed); + [MacCatalyst (13, 1)] + [Static, Export ("followPath:speed:")] + SKAction FollowPath (CGPath path, nfloat speed); - [MacCatalyst (13, 1)] - [Static, Export ("followPath:asOffset:orientToPath:speed:")] + [MacCatalyst (13, 1)] + [Static, Export ("followPath:asOffset:orientToPath:speed:")] #if XAMCORE_5_0 SKAction FollowPath (CGPath path, bool offset, bool orientToPath, nfloat speed); #else - SKAction FollowPath (CGPath path, bool offset, bool orient, nfloat speed); + SKAction FollowPath (CGPath path, bool offset, bool orient, nfloat speed); #endif - [Static, Export ("speedBy:duration:")] - SKAction SpeedBy (nfloat speed, double sec); - - [Static, Export ("speedTo:duration:")] - SKAction SpeedTo (nfloat speed, double sec); - - [Static, Export ("waitForDuration:")] - SKAction WaitForDuration (double sec); - - [Static, Export ("waitForDuration:withRange:")] - SKAction WaitForDuration (double sec, double durationRange); - - [Static, Export ("removeFromParent")] - SKAction RemoveFromParent (); + [Static, Export ("speedBy:duration:")] + SKAction SpeedBy (nfloat speed, double sec); - [Static, Export ("performSelector:onTarget:")] - SKAction PerformSelector (Selector selector, NSObject target); + [Static, Export ("speedTo:duration:")] + SKAction SpeedTo (nfloat speed, double sec); - [Static, Export ("runBlock:")] - SKAction Run (Action block); + [Static, Export ("waitForDuration:")] + SKAction WaitForDuration (double sec); - [Static, Export ("runBlock:queue:")] - SKAction Run (Action block, DispatchQueue queue); + [Static, Export ("waitForDuration:withRange:")] + SKAction WaitForDuration (double sec, double durationRange); + + [Static, Export ("removeFromParent")] + SKAction RemoveFromParent (); + + [Static, Export ("performSelector:onTarget:")] + SKAction PerformSelector (Selector selector, NSObject target); - [Static, Export ("runAction:onChildWithName:")] - SKAction RunAction (SKAction action, string name); - - [Static, Export ("customActionWithDuration:actionBlock:")] - SKAction CustomActionWithDuration (double seconds, SKActionDurationHandler actionHandler); + [Static, Export ("runBlock:")] + SKAction Run (Action block); + + [Static, Export ("runBlock:queue:")] + SKAction Run (Action block, DispatchQueue queue); + + [Static, Export ("runAction:onChildWithName:")] + SKAction RunAction (SKAction action, string name); + + [Static, Export ("customActionWithDuration:actionBlock:")] + SKAction CustomActionWithDuration (double seconds, SKActionDurationHandler actionHandler); + + // + // iOS 8 cluster (a few more are above, as part of their family + // + [MacCatalyst (13, 1)] + [Static, Export ("hide")] + SKAction Hide (); + + [MacCatalyst (13, 1)] + [Static, Export ("unhide")] + SKAction Unhide (); + + [MacCatalyst (13, 1)] + [Static, Export ("reachTo:rootNode:duration:")] + SKAction ReachTo (CGPoint position, SKNode rootNode, double secs); + + [MacCatalyst (13, 1)] + [Static, Export ("reachTo:rootNode:velocity:")] + SKAction ReachTo (CGPoint position, SKNode rootNode, nfloat velocity); + + [MacCatalyst (13, 1)] + [Static, Export ("reachToNode:rootNode:duration:")] + SKAction ReachToNode (SKNode node, SKNode rootNode, double sec); + + [MacCatalyst (13, 1)] + [Static, Export ("reachToNode:rootNode:velocity:")] + SKAction ReachToNode (SKNode node, SKNode rootNode, nfloat velocity); + + [MacCatalyst (13, 1)] + [Static, Export ("strengthTo:duration:")] + SKAction StrengthTo (float /* float, not CGFloat */ strength, double sec); + + [MacCatalyst (13, 1)] + [Static, Export ("strengthBy:duration:")] + SKAction StrengthBy (float /* float, not CGFloat */ strength, double sec); + + [MacCatalyst (13, 1)] + [NullAllowed, Export ("timingFunction", ArgumentSemantic.Assign)] + SKActionTimingFunction2 TimingFunction2 { get; set; } + + [MacCatalyst (13, 1)] + [Static, Export ("falloffBy:duration:")] + SKAction FalloffBy (float /* float, not CGFloat */ to, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("falloffTo:duration:")] + SKAction FalloffTo (float falloff, double sec); + + // iOS 9 cluster + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:")] + [return: NullAllowed] + SKAction Create (string name); + + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:duration:")] + [return: NullAllowed] + SKAction Create (string name, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:fromURL:")] + [return: NullAllowed] + SKAction Create (string name, NSUrl url); + + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:fromURL:duration:")] + [return: NullAllowed] + SKAction Create (string name, NSUrl url, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("setNormalTexture:")] + SKAction SetNormalTexture (SKTexture texture); + + [MacCatalyst (13, 1)] + [Static] + [Export ("setNormalTexture:resize:")] + SKAction SetNormalTexture (SKTexture texture, bool resize); + + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithNormalTextures:timePerFrame:")] + SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame); + + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithNormalTextures:timePerFrame:resize:restore:")] + SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame, bool resize, bool restore); + + [MacCatalyst (13, 1)] + [Static] + [Export ("play")] + SKAction CreatePlay (); + + [MacCatalyst (13, 1)] + [Static] + [Export ("pause")] + SKAction CreatePause (); + + [MacCatalyst (13, 1)] + [Static] + [Export ("stop")] + SKAction CreateStop (); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changePlaybackRateTo:duration:")] + SKAction CreateChangePlaybackRate (float playbackRate, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changePlaybackRateBy:duration:")] + SKAction CreateChangePlaybackRateBy (float playbackRate, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeVolumeTo:duration:")] + SKAction CreateChangeVolume (float newVolume, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeVolumeBy:duration:")] + SKAction CreateChangeVolumeBy (float by, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeChargeTo:duration:")] + SKAction CreateChangeChargeTo (float newCharge, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeChargeBy:duration:")] + SKAction CreateChangeChargeBy (float by, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeMassTo:duration:")] + SKAction CreateChangeMassTo (float newMass, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeMassBy:duration:")] + SKAction CreateChangeMassBy (float by, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("applyForce:duration:")] + SKAction CreateApplyForce (CGVector force, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("applyForce:atPoint:duration:")] + SKAction CreateApplyForce (CGVector force, CGPoint point, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("applyTorque:duration:")] + SKAction CreateApplyTorque (nfloat torque, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("applyImpulse:duration:")] + SKAction CreateApplyImpulse (CGVector impulse, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("applyImpulse:atPoint:duration:")] + SKAction CreateApplyImpulse (CGVector impulse, CGPoint point, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("applyAngularImpulse:duration:")] + SKAction CreateApplyAngularImpulse (nfloat impulse, double duration); + + // SKAction_SKAudioNode inlined + + [MacCatalyst (13, 1)] + [Static] + [Export ("stereoPanTo:duration:")] + SKAction CreateStereoPanTo (float target, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("stereoPanBy:duration:")] + SKAction CreateStereoPanBy (float by, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeReverbTo:duration:")] + SKAction CreateChangeReverbTo (float target, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeReverbBy:duration:")] + SKAction CreateChangeReverbBy (float by, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeObstructionTo:duration:")] + SKAction CreateChangeObstructionTo (float target, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeObstructionBy:duration:")] + SKAction CreateChangeObstructionBy (float by, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeOcclusionTo:duration:")] + SKAction CreateChangeOcclusionTo (float target, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("changeOcclusionBy:duration:")] + SKAction CreateChangeOcclusionBy (float by, double duration); + + // SKAction_SKWarpable + + [MacCatalyst (13, 1)] + [Static] + [Export ("warpTo:duration:")] + [return: NullAllowed] + SKAction WarpTo (SKWarpGeometry warp, double duration); + + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithWarps:times:")] + [return: NullAllowed] + SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times); + + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithWarps:times:restore:")] + [return: NullAllowed] + SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times, bool restore); + } - // - // iOS 8 cluster (a few more are above, as part of their family - // + /// [MacCatalyst (13, 1)] - [Static, Export ("hide")] - SKAction Hide (); + [DisableDefaultCtor] // see https://bugzilla.xamarin.com/show_bug.cgi?id=14502 + [BaseType (typeof (NSObject))] + partial interface SKPhysicsBody : NSSecureCoding, NSCopying { - [MacCatalyst (13, 1)] - [Static, Export ("unhide")] - SKAction Unhide (); + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithBodies:")] + SKPhysicsBody FromBodies (SKPhysicsBody [] bodies); - [MacCatalyst (13, 1)] - [Static, Export ("reachTo:rootNode:duration:")] - SKAction ReachTo (CGPoint position, SKNode rootNode, double secs); + [Static, Export ("bodyWithCircleOfRadius:")] + SKPhysicsBody CreateCircularBody (nfloat radius); - [MacCatalyst (13, 1)] - [Static, Export ("reachTo:rootNode:velocity:")] - SKAction ReachTo (CGPoint position, SKNode rootNode, nfloat velocity); + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithCircleOfRadius:center:")] + SKPhysicsBody CreateCircularBody (nfloat radius, CGPoint center); - [MacCatalyst (13, 1)] - [Static, Export ("reachToNode:rootNode:duration:")] - SKAction ReachToNode (SKNode node, SKNode rootNode, double sec); + [Static, Export ("bodyWithRectangleOfSize:")] + SKPhysicsBody CreateRectangularBody (CGSize size); - [MacCatalyst (13, 1)] - [Static, Export ("reachToNode:rootNode:velocity:")] - SKAction ReachToNode (SKNode node, SKNode rootNode, nfloat velocity); + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithRectangleOfSize:center:")] + SKPhysicsBody CreateRectangularBody (CGSize size, CGPoint center); - [MacCatalyst (13, 1)] - [Static, Export ("strengthTo:duration:")] - SKAction StrengthTo (float /* float, not CGFloat */ strength, double sec); + [Static, Export ("bodyWithPolygonFromPath:")] + SKPhysicsBody CreateBodyFromPath (CGPath path); - [MacCatalyst (13, 1)] - [Static, Export ("strengthBy:duration:")] - SKAction StrengthBy (float /* float, not CGFloat */ strength, double sec); + [Static, Export ("bodyWithEdgeFromPoint:toPoint:")] + SKPhysicsBody CreateEdge (CGPoint fromPoint, CGPoint toPoint); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("timingFunction", ArgumentSemantic.Assign)] - SKActionTimingFunction2 TimingFunction2 { get; set; } + [Static, Export ("bodyWithEdgeChainFromPath:")] + SKPhysicsBody CreateEdgeChain (CGPath path); - [MacCatalyst (13, 1)] - [Static, Export ("falloffBy:duration:")] - SKAction FalloffBy (float /* float, not CGFloat */ to, double duration); + [Static, Export ("bodyWithEdgeLoopFromPath:")] + SKPhysicsBody CreateEdgeLoop (CGPath path); - [MacCatalyst (13, 1)] - [Static] - [Export ("falloffTo:duration:")] - SKAction FalloffTo (float falloff, double sec); + [Static, Export ("bodyWithEdgeLoopFromRect:")] + SKPhysicsBody CreateEdgeLoop (CGRect rect); - // iOS 9 cluster - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:")] - [return: NullAllowed] - SKAction Create (string name); + [Export ("dynamic")] + bool Dynamic { [Bind ("isDynamic")] get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:duration:")] - [return: NullAllowed] - SKAction Create (string name, double duration); + [Export ("usesPreciseCollisionDetection")] + bool UsesPreciseCollisionDetection { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:fromURL:")] - [return: NullAllowed] - SKAction Create (string name, NSUrl url); + [Export ("allowsRotation")] + bool AllowsRotation { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:fromURL:duration:")] - [return: NullAllowed] - SKAction Create (string name, NSUrl url, double duration); + [Export ("resting")] + bool Resting { [Bind ("isResting")] get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("setNormalTexture:")] - SKAction SetNormalTexture (SKTexture texture); + [Export ("friction")] + nfloat Friction { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("setNormalTexture:resize:")] - SKAction SetNormalTexture (SKTexture texture, bool resize); + [Export ("restitution")] + nfloat Restitution { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithNormalTextures:timePerFrame:")] - SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame); + [Export ("linearDamping", ArgumentSemantic.Assign)] + nfloat LinearDamping { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithNormalTextures:timePerFrame:resize:restore:")] - SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame, bool resize, bool restore); + [Export ("angularDamping", ArgumentSemantic.Assign)] + nfloat AngularDamping { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("play")] - SKAction CreatePlay (); + [Export ("density")] + nfloat Density { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("pause")] - SKAction CreatePause (); + [Export ("mass")] + nfloat Mass { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("stop")] - SKAction CreateStop (); + [Export ("area")] + nfloat Area { get; } - [MacCatalyst (13, 1)] - [Static] - [Export ("changePlaybackRateTo:duration:")] - SKAction CreateChangePlaybackRate (float playbackRate, double duration); + [Export ("affectedByGravity", ArgumentSemantic.Assign)] + bool AffectedByGravity { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("changePlaybackRateBy:duration:")] - SKAction CreateChangePlaybackRateBy (float playbackRate, double duration); + [Export ("categoryBitMask", ArgumentSemantic.Assign)] + uint CategoryBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Static] - [Export ("changeVolumeTo:duration:")] - SKAction CreateChangeVolume (float newVolume, double duration); + [Export ("collisionBitMask", ArgumentSemantic.Assign)] + uint CollisionBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Static] - [Export ("changeVolumeBy:duration:")] - SKAction CreateChangeVolumeBy (float by, double duration); + [Export ("contactTestBitMask", ArgumentSemantic.Assign)] + uint ContactTestBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Static] - [Export ("changeChargeTo:duration:")] - SKAction CreateChangeChargeTo (float newCharge, double duration); + [Export ("joints")] + SKPhysicsJoint [] Joints { get; } - [MacCatalyst (13, 1)] - [Static] - [Export ("changeChargeBy:duration:")] - SKAction CreateChangeChargeBy (float by, double duration); + [Export ("node", ArgumentSemantic.Weak)] + [NullAllowed] + SKNode Node { get; } - [MacCatalyst (13, 1)] - [Static] - [Export ("changeMassTo:duration:")] - SKAction CreateChangeMassTo (float newMass, double duration); + [Export ("velocity")] + CGVector Velocity { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("changeMassBy:duration:")] - SKAction CreateChangeMassBy (float by, double duration); + [Export ("angularVelocity")] + nfloat AngularVelocity { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("applyForce:duration:")] - SKAction CreateApplyForce (CGVector force, double duration); + [Export ("applyForce:")] + void ApplyForce (CGVector force); - [MacCatalyst (13, 1)] - [Static] - [Export ("applyForce:atPoint:duration:")] - SKAction CreateApplyForce (CGVector force, CGPoint point, double duration); + [Export ("applyForce:atPoint:")] + void ApplyForce (CGVector force, CGPoint point); - [MacCatalyst (13, 1)] - [Static] - [Export ("applyTorque:duration:")] - SKAction CreateApplyTorque (nfloat torque, double duration); + [Export ("applyTorque:")] + void ApplyTorque (nfloat torque); - [MacCatalyst (13, 1)] - [Static] - [Export ("applyImpulse:duration:")] - SKAction CreateApplyImpulse (CGVector impulse, double duration); + [Export ("applyImpulse:")] + void ApplyImpulse (CGVector impulse); - [MacCatalyst (13, 1)] - [Static] - [Export ("applyImpulse:atPoint:duration:")] - SKAction CreateApplyImpulse (CGVector impulse, CGPoint point, double duration); + [Export ("applyImpulse:atPoint:")] + void ApplyImpulse (CGVector impulse, CGPoint point); - [MacCatalyst (13, 1)] - [Static] - [Export ("applyAngularImpulse:duration:")] - SKAction CreateApplyAngularImpulse (nfloat impulse, double duration); + [Export ("applyAngularImpulse:")] + void ApplyAngularImpulse (nfloat impulse); - // SKAction_SKAudioNode inlined + [Export ("allContactedBodies")] + SKPhysicsBody [] AllContactedBodies { get; } - [MacCatalyst (13, 1)] - [Static] - [Export ("stereoPanTo:duration:")] - SKAction CreateStereoPanTo (float target, double duration); + // + // iOS 8 + // + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithTexture:size:")] + SKPhysicsBody Create (SKTexture texture, CGSize size); - [MacCatalyst (13, 1)] - [Static] - [Export ("stereoPanBy:duration:")] - SKAction CreateStereoPanBy (float by, double duration); + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithTexture:alphaThreshold:size:")] + SKPhysicsBody Create (SKTexture texture, float /* float, not CGFloat */ alphaThreshold, CGSize size); - [MacCatalyst (13, 1)] - [Static] - [Export ("changeReverbTo:duration:")] - SKAction CreateChangeReverbTo (float target, double duration); + [MacCatalyst (13, 1)] + [Export ("charge")] + nfloat Charge { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("changeReverbBy:duration:")] - SKAction CreateChangeReverbBy (float by, double duration); + [MacCatalyst (13, 1)] + [Export ("fieldBitMask")] + uint FieldBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Static] - [Export ("changeObstructionTo:duration:")] - SKAction CreateChangeObstructionTo (float target, double duration); + [MacCatalyst (13, 1)] + [Export ("pinned")] + bool Pinned { get; set; } + } + /// Encapsulates the data of a collision between two s. + /// + /// + /// Apple documentation for SKPhysicsContact [MacCatalyst (13, 1)] - [Static] - [Export ("changeObstructionBy:duration:")] - SKAction CreateChangeObstructionBy (float by, double duration); + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] // An SKPhysicsContact object is created automatically by Scene Kit + partial interface SKPhysicsContact { - [MacCatalyst (13, 1)] - [Static] - [Export ("changeOcclusionTo:duration:")] - SKAction CreateChangeOcclusionTo (float target, double duration); + [Export ("bodyA")] + SKPhysicsBody BodyA { get; } - [MacCatalyst (13, 1)] - [Static] - [Export ("changeOcclusionBy:duration:")] - SKAction CreateChangeOcclusionBy (float by, double duration); + [Export ("bodyB")] + SKPhysicsBody BodyB { get; } - // SKAction_SKWarpable + [Export ("contactPoint")] + CGPoint ContactPoint { get; } - [MacCatalyst (13, 1)] - [Static] - [Export ("warpTo:duration:")] - [return: NullAllowed] - SKAction WarpTo (SKWarpGeometry warp, double duration); + [Export ("collisionImpulse")] + nfloat CollisionImpulse { get; } - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithWarps:times:")] - [return: NullAllowed] - SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times); + [MacCatalyst (13, 1)] + [Export ("contactNormal")] + CGVector ContactNormal { get; } - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithWarps:times:restore:")] - [return: NullAllowed] - SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times, bool restore); -} + } -/// -[MacCatalyst (13, 1)] -[DisableDefaultCtor] // see https://bugzilla.xamarin.com/show_bug.cgi?id=14502 -[BaseType (typeof (NSObject))] -partial interface SKPhysicsBody : NSSecureCoding, NSCopying { + /// Interface representing the required methods (if any) of the protocol . + /// + /// This interface contains the required methods (if any) from the protocol defined by . + /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. + /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. + /// + interface ISKPhysicsContactDelegate { } + /// [MacCatalyst (13, 1)] - [Static, Export ("bodyWithBodies:")] - SKPhysicsBody FromBodies (SKPhysicsBody [] bodies); + [BaseType (typeof (NSObject))] + [Model] + [Protocol] + partial interface SKPhysicsContactDelegate { - [Static, Export ("bodyWithCircleOfRadius:")] - SKPhysicsBody CreateCircularBody (nfloat radius); + [Export ("didBeginContact:")] + void DidBeginContact (SKPhysicsContact contact); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithCircleOfRadius:center:")] - SKPhysicsBody CreateCircularBody (nfloat radius, CGPoint center); + [Export ("didEndContact:")] + void DidEndContact (SKPhysicsContact contact); + } - [Static, Export ("bodyWithRectangleOfSize:")] - SKPhysicsBody CreateRectangularBody (CGSize size); + /// + delegate void SKPhysicsWorldBodiesEnumeratorHandler (SKPhysicsBody body, out bool stop); + /// The delegate used for enumerating bodies that fall along a ray when used with M:SpriteKit.SKPhysicsWorld.EnumerateBodies(System.Drawing.PointF,System.Drawing.PointF,SpriteKit.SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler*. + delegate void SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler (SKPhysicsBody body, CGPoint point, CGVector normal, out bool stop); + /// [MacCatalyst (13, 1)] - [Static, Export ("bodyWithRectangleOfSize:center:")] - SKPhysicsBody CreateRectangularBody (CGSize size, CGPoint center); - - [Static, Export ("bodyWithPolygonFromPath:")] - SKPhysicsBody CreateBodyFromPath (CGPath path); - - [Static, Export ("bodyWithEdgeFromPoint:toPoint:")] - SKPhysicsBody CreateEdge (CGPoint fromPoint, CGPoint toPoint); + [BaseType (typeof (NSObject), + Delegates = new string [] { "WeakContactDelegate" }, + Events = new Type [] { typeof (SKPhysicsContactDelegate) })] + [DisableDefaultCtor] // You do not create SKPhysicsWorld objects directly; instead, read the physicsWorld property of an SKScene object. + partial interface SKPhysicsWorld : NSSecureCoding { - [Static, Export ("bodyWithEdgeChainFromPath:")] - SKPhysicsBody CreateEdgeChain (CGPath path); + [Export ("gravity")] + CGVector Gravity { get; set; } - [Static, Export ("bodyWithEdgeLoopFromPath:")] - SKPhysicsBody CreateEdgeLoop (CGPath path); + [Export ("speed")] + nfloat Speed { get; set; } - [Static, Export ("bodyWithEdgeLoopFromRect:")] - SKPhysicsBody CreateEdgeLoop (CGRect rect); + [Export ("contactDelegate", ArgumentSemantic.Assign), NullAllowed] + NSObject WeakContactDelegate { get; set; } - [Export ("dynamic")] - bool Dynamic { [Bind ("isDynamic")] get; set; } + [Wrap ("WeakContactDelegate")] + ISKPhysicsContactDelegate ContactDelegate { get; set; } - [Export ("usesPreciseCollisionDetection")] - bool UsesPreciseCollisionDetection { get; set; } + [Export ("addJoint:")] + void AddJoint (SKPhysicsJoint joint); - [Export ("allowsRotation")] - bool AllowsRotation { get; set; } + [Export ("removeJoint:")] + void RemoveJoint (SKPhysicsJoint joint); - [Export ("resting")] - bool Resting { [Bind ("isResting")] get; set; } + [Export ("removeAllJoints")] + void RemoveAllJoints (); - [Export ("friction")] - nfloat Friction { get; set; } + [Export ("bodyAtPoint:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGPoint point); - [Export ("restitution")] - nfloat Restitution { get; set; } + [Export ("bodyInRect:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGRect rect); - [Export ("linearDamping", ArgumentSemantic.Assign)] - nfloat LinearDamping { get; set; } + [Export ("bodyAlongRayStart:end:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGPoint rayStart, CGPoint rayEnd); - [Export ("angularDamping", ArgumentSemantic.Assign)] - nfloat AngularDamping { get; set; } + [Export ("enumerateBodiesAtPoint:usingBlock:")] + void EnumerateBodies (CGPoint point, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); - [Export ("density")] - nfloat Density { get; set; } + [Export ("enumerateBodiesInRect:usingBlock:")] + void EnumerateBodies (CGRect rect, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); - [Export ("mass")] - nfloat Mass { get; set; } + [Export ("enumerateBodiesAlongRayStart:end:usingBlock:")] + void EnumerateBodies (CGPoint start, CGPoint end, SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler enumeratorHandler); - [Export ("area")] - nfloat Area { get; } - - [Export ("affectedByGravity", ArgumentSemantic.Assign)] - bool AffectedByGravity { get; set; } + // + // iOS 8 + // + [MacCatalyst (13, 1)] + [Export ("sampleFieldsAt:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector3 SampleFields (/* vector_float3 */ Vector3 position); + } - [Export ("categoryBitMask", ArgumentSemantic.Assign)] - uint CategoryBitMask { get; set; } /* uint32_t */ + /// + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + [Abstract] // You never instantiate objects of this class directly + partial interface SKPhysicsJoint : NSSecureCoding { - [Export ("collisionBitMask", ArgumentSemantic.Assign)] - uint CollisionBitMask { get; set; } /* uint32_t */ + [Export ("bodyA", ArgumentSemantic.Retain)] + SKPhysicsBody BodyA { get; set; } - [Export ("contactTestBitMask", ArgumentSemantic.Assign)] - uint ContactTestBitMask { get; set; } /* uint32_t */ + [Export ("bodyB", ArgumentSemantic.Retain)] + SKPhysicsBody BodyB { get; set; } - [Export ("joints")] - SKPhysicsJoint [] Joints { get; } + [MacCatalyst (13, 1)] + [Export ("reactionForce")] + CGVector ReactionForce { get; } - [Export ("node", ArgumentSemantic.Weak)] - [NullAllowed] - SKNode Node { get; } + [MacCatalyst (13, 1)] + [Export ("reactionTorque")] + nfloat ReactionTorque { get; } + } - [Export ("velocity")] - CGVector Velocity { get; set; } + /// A that pins two bodies to a common point. + /// + /// Apple documentation for SKPhysicsJointPin + [MacCatalyst (13, 1)] + [BaseType (typeof (SKPhysicsJoint))] + [DisableDefaultCtor] // impossible to set the `anchor` using the default ctor (see #14511) + partial interface SKPhysicsJointPin { - [Export ("angularVelocity")] - nfloat AngularVelocity { get; set; } + [Static, Export ("jointWithBodyA:bodyB:anchor:")] + SKPhysicsJointPin Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); - [Export ("applyForce:")] - void ApplyForce (CGVector force); + [Export ("shouldEnableLimits")] + bool ShouldEnableLimits { get; set; } - [Export ("applyForce:atPoint:")] - void ApplyForce (CGVector force, CGPoint point); + [Export ("lowerAngleLimit")] + nfloat LowerAngleLimit { get; set; } - [Export ("applyTorque:")] - void ApplyTorque (nfloat torque); + [Export ("upperAngleLimit")] + nfloat UpperAngleLimit { get; set; } - [Export ("applyImpulse:")] - void ApplyImpulse (CGVector impulse); + [Export ("frictionTorque")] + nfloat FrictionTorque { get; set; } - [Export ("applyImpulse:atPoint:")] - void ApplyImpulse (CGVector impulse, CGPoint point); + [MacCatalyst (13, 1)] + [Export ("rotationSpeed")] + nfloat RotationSpeed { get; set; } + } - [Export ("applyAngularImpulse:")] - void ApplyAngularImpulse (nfloat impulse); + /// A that connects two bodies as if by a spring. + /// + /// Apple documentation for SKPhysicsJointSpring + [MacCatalyst (13, 1)] + [BaseType (typeof (SKPhysicsJoint))] + [DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) + partial interface SKPhysicsJointSpring { - [Export ("allContactedBodies")] - SKPhysicsBody [] AllContactedBodies { get; } + [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] + SKPhysicsJointSpring Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithTexture:size:")] - SKPhysicsBody Create (SKTexture texture, CGSize size); + [Export ("damping")] + nfloat Damping { get; set; } - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithTexture:alphaThreshold:size:")] - SKPhysicsBody Create (SKTexture texture, float /* float, not CGFloat */ alphaThreshold, CGSize size); + [Export ("frequency")] + nfloat Frequency { get; set; } + } + /// A that rigidly connects two bodies. + /// + /// At least one of the s must have its property set to or this will not behave properly. + /// + /// Apple documentation for SKPhysicsJointFixed [MacCatalyst (13, 1)] - [Export ("charge")] - nfloat Charge { get; set; } + [BaseType (typeof (SKPhysicsJoint))] + [DisableDefaultCtor] // https://bugzilla.xamarin.com/show_bug.cgi?id=14511 + partial interface SKPhysicsJointFixed { - [MacCatalyst (13, 1)] - [Export ("fieldBitMask")] - uint FieldBitMask { get; set; } /* uint32_t */ + [Static, Export ("jointWithBodyA:bodyB:anchor:")] + SKPhysicsJointFixed Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); + } + /// A that connects two bodies as if by a sliding rod. + /// + /// Apple documentation for SKPhysicsJointSliding [MacCatalyst (13, 1)] - [Export ("pinned")] - bool Pinned { get; set; } -} - -/// Encapsulates the data of a collision between two s. -/// -/// -/// Apple documentation for SKPhysicsContact -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[DisableDefaultCtor] // An SKPhysicsContact object is created automatically by Scene Kit -partial interface SKPhysicsContact { + [BaseType (typeof (SKPhysicsJoint))] + [DisableDefaultCtor] // impossible to set the `anchor` and `axis` using the default ctor (see #14511) + partial interface SKPhysicsJointSliding { - [Export ("bodyA")] - SKPhysicsBody BodyA { get; } + [Static, Export ("jointWithBodyA:bodyB:anchor:axis:")] + SKPhysicsJointSliding Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor, CGVector axis); - [Export ("bodyB")] - SKPhysicsBody BodyB { get; } + [Export ("shouldEnableLimits")] + bool ShouldEnableLimits { get; set; } - [Export ("contactPoint")] - CGPoint ContactPoint { get; } + [Export ("lowerDistanceLimit")] + nfloat LowerDistanceLimit { get; set; } - [Export ("collisionImpulse")] - nfloat CollisionImpulse { get; } + [Export ("upperDistanceLimit")] + nfloat UpperDistanceLimit { get; set; } + } + /// A that connects two bodies as if by a rope. + /// + /// Apple documentation for SKPhysicsJointLimit [MacCatalyst (13, 1)] - [Export ("contactNormal")] - CGVector ContactNormal { get; } + [BaseType (typeof (SKPhysicsJoint))] + [DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) + partial interface SKPhysicsJointLimit { -} + [Export ("maxLength")] + nfloat MaxLength { get; set; } -/// Interface representing the required methods (if any) of the protocol . -/// -/// This interface contains the required methods (if any) from the protocol defined by . -/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. -/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. -/// -interface ISKPhysicsContactDelegate { } - -/// -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[Model] -[Protocol] -partial interface SKPhysicsContactDelegate { - - [Export ("didBeginContact:")] - void DidBeginContact (SKPhysicsContact contact); - - [Export ("didEndContact:")] - void DidEndContact (SKPhysicsContact contact); -} + [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] + SKPhysicsJointLimit Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); + } -/// -delegate void SKPhysicsWorldBodiesEnumeratorHandler (SKPhysicsBody body, out bool stop); -/// The delegate used for enumerating bodies that fall along a ray when used with M:SpriteKit.SKPhysicsWorld.EnumerateBodies(System.Drawing.PointF,System.Drawing.PointF,SpriteKit.SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler*. -delegate void SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler (SKPhysicsBody body, CGPoint point, CGVector normal, out bool stop); + /// Defines a range for acceptable float values. + /// + /// Apple documentation for SKRange + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface SKRange : NSSecureCoding, NSCopying { + [DesignatedInitializer] + [Export ("initWithLowerLimit:upperLimit:")] + NativeHandle Constructor (nfloat lowerLimit, nfloat upperLimier); -/// -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject), - Delegates = new string [] { "WeakContactDelegate" }, - Events = new Type [] { typeof (SKPhysicsContactDelegate) })] -[DisableDefaultCtor] // You do not create SKPhysicsWorld objects directly; instead, read the physicsWorld property of an SKScene object. -partial interface SKPhysicsWorld : NSSecureCoding { + [Export ("lowerLimit")] + nfloat LowerLimit { get; set; } - [Export ("gravity")] - CGVector Gravity { get; set; } + [Export ("upperLimit")] + nfloat UpperLimit { get; set; } - [Export ("speed")] - nfloat Speed { get; set; } + [Static, Export ("rangeWithLowerLimit:upperLimit:")] + SKRange Create (nfloat lower, nfloat upper); - [Export ("contactDelegate", ArgumentSemantic.Assign), NullAllowed] - NSObject WeakContactDelegate { get; set; } + [Static, Export ("rangeWithLowerLimit:")] + SKRange CreateWithLowerLimit (nfloat lower); - [Wrap ("WeakContactDelegate")] - ISKPhysicsContactDelegate ContactDelegate { get; set; } + [Static, Export ("rangeWithUpperLimit:")] + SKRange CreateWithUpperLimit (nfloat upper); - [Export ("addJoint:")] - void AddJoint (SKPhysicsJoint joint); + [Static, Export ("rangeWithConstantValue:")] + SKRange CreateConstant (nfloat value); - [Export ("removeJoint:")] - void RemoveJoint (SKPhysicsJoint joint); + [Static, Export ("rangeWithValue:variance:")] + SKRange CreateWithVariance (nfloat value, nfloat variance); - [Export ("removeAllJoints")] - void RemoveAllJoints (); + [Static, Export ("rangeWithNoLimits")] + SKRange CreateUnlimited (); + } - [Export ("bodyAtPoint:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGPoint point); + /// A that holds audio information. + /// + /// Apple documentation for SKAudioNode + [MacCatalyst (13, 1)] + [BaseType (typeof (SKNode))] + [DisableDefaultCtor] + interface SKAudioNode : NSSecureCoding { + [Export ("initWithAVAudioNode:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] AVAudioNode node); - [Export ("bodyInRect:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGRect rect); + [Export ("initWithFileNamed:")] + NativeHandle Constructor (string fileName); - [Export ("bodyAlongRayStart:end:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGPoint rayStart, CGPoint rayEnd); + [Export ("initWithURL:")] + NativeHandle Constructor (NSUrl url); - [Export ("enumerateBodiesAtPoint:usingBlock:")] - void EnumerateBodies (CGPoint point, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + [NullAllowed, Export ("avAudioNode", ArgumentSemantic.Retain)] + AVAudioNode AvAudioNode { get; set; } - [Export ("enumerateBodiesInRect:usingBlock:")] - void EnumerateBodies (CGRect rect, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + [Export ("autoplayLooped")] + bool AutoplayLooped { get; set; } - [Export ("enumerateBodiesAlongRayStart:end:usingBlock:")] - void EnumerateBodies (CGPoint start, CGPoint end, SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler enumeratorHandler); + [Export ("positional")] + bool Positional { [Bind ("isPositional")] get; set; } + } - // - // iOS 8 - // + /// A node that specifies the position inside a from which it can be rendered. + /// + /// Apple documentation for SKCameraNode [MacCatalyst (13, 1)] - [Export ("sampleFieldsAt:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector3 SampleFields (/* vector_float3 */ Vector3 position); -} - -/// -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[Abstract] // You never instantiate objects of this class directly -partial interface SKPhysicsJoint : NSSecureCoding { - - [Export ("bodyA", ArgumentSemantic.Retain)] - SKPhysicsBody BodyA { get; set; } - - [Export ("bodyB", ArgumentSemantic.Retain)] - SKPhysicsBody BodyB { get; set; } + [BaseType (typeof (SKNode))] + interface SKCameraNode { + [Export ("containsNode:")] + bool Contains (SKNode node); - [MacCatalyst (13, 1)] - [Export ("reactionForce")] - CGVector ReactionForce { get; } + [Export ("containedNodeSet")] + NSSet ContainedNodeSet { get; } + } + /// A that holds an archived collection of child nodes that can be used in multiple places throughout the game. + /// + /// Apple documentation for SKReferenceNode [MacCatalyst (13, 1)] - [Export ("reactionTorque")] - nfloat ReactionTorque { get; } -} - -/// A that pins two bodies to a common point. -/// -/// Apple documentation for SKPhysicsJointPin -[MacCatalyst (13, 1)] -[BaseType (typeof (SKPhysicsJoint))] -[DisableDefaultCtor] // impossible to set the `anchor` using the default ctor (see #14511) -partial interface SKPhysicsJointPin { + [BaseType (typeof (SKNode))] + [DisableDefaultCtor] + interface SKReferenceNode { + [Export ("initWithURL:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] NSUrl url); - [Static, Export ("jointWithBodyA:bodyB:anchor:")] - SKPhysicsJointPin Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); + [Export ("initWithFileNamed:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] string fileName); - [Export ("shouldEnableLimits")] - bool ShouldEnableLimits { get; set; } + [Static] + [Export ("referenceNodeWithFileNamed:")] + SKReferenceNode FromFile (string fileName); - [Export ("lowerAngleLimit")] - nfloat LowerAngleLimit { get; set; } + [Static] + [Export ("referenceNodeWithURL:")] + SKReferenceNode FromUrl (NSUrl referenceUrl); - [Export ("upperAngleLimit")] - nfloat UpperAngleLimit { get; set; } + [Export ("didLoadReferenceNode:")] + void DidLoadReferenceNode ([NullAllowed] SKNode node); - [Export ("frictionTorque")] - nfloat FrictionTorque { get; set; } + [Export ("resolveReferenceNode")] + void Resolve (); + } + /// Holds per-node data to be used with a custom shader. + /// + /// Apple documentation for SKAttribute [MacCatalyst (13, 1)] - [Export ("rotationSpeed")] - nfloat RotationSpeed { get; set; } -} - -/// A that connects two bodies as if by a spring. -/// -/// Apple documentation for SKPhysicsJointSpring -[MacCatalyst (13, 1)] -[BaseType (typeof (SKPhysicsJoint))] -[DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) -partial interface SKPhysicsJointSpring { - - [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] - SKPhysicsJointSpring Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); - - [Export ("damping")] - nfloat Damping { get; set; } - - [Export ("frequency")] - nfloat Frequency { get; set; } -} - -/// A that rigidly connects two bodies. -/// -/// At least one of the s must have its property set to or this will not behave properly. -/// -/// Apple documentation for SKPhysicsJointFixed -[MacCatalyst (13, 1)] -[BaseType (typeof (SKPhysicsJoint))] -[DisableDefaultCtor] // https://bugzilla.xamarin.com/show_bug.cgi?id=14511 -partial interface SKPhysicsJointFixed { - - [Static, Export ("jointWithBodyA:bodyB:anchor:")] - SKPhysicsJointFixed Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); -} - -/// A that connects two bodies as if by a sliding rod. -/// -/// Apple documentation for SKPhysicsJointSliding -[MacCatalyst (13, 1)] -[BaseType (typeof (SKPhysicsJoint))] -[DisableDefaultCtor] // impossible to set the `anchor` and `axis` using the default ctor (see #14511) -partial interface SKPhysicsJointSliding { - - [Static, Export ("jointWithBodyA:bodyB:anchor:axis:")] - SKPhysicsJointSliding Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor, CGVector axis); - - [Export ("shouldEnableLimits")] - bool ShouldEnableLimits { get; set; } - - [Export ("lowerDistanceLimit")] - nfloat LowerDistanceLimit { get; set; } - - [Export ("upperDistanceLimit")] - nfloat UpperDistanceLimit { get; set; } -} - -/// A that connects two bodies as if by a rope. -/// -/// Apple documentation for SKPhysicsJointLimit -[MacCatalyst (13, 1)] -[BaseType (typeof (SKPhysicsJoint))] -[DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) -partial interface SKPhysicsJointLimit { - - [Export ("maxLength")] - nfloat MaxLength { get; set; } - - [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] - SKPhysicsJointLimit Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); -} - -/// Defines a range for acceptable float values. -/// -/// Apple documentation for SKRange -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKRange : NSSecureCoding, NSCopying { - [DesignatedInitializer] - [Export ("initWithLowerLimit:upperLimit:")] - NativeHandle Constructor (nfloat lowerLimit, nfloat upperLimier); - - [Export ("lowerLimit")] - nfloat LowerLimit { get; set; } - - [Export ("upperLimit")] - nfloat UpperLimit { get; set; } - - [Static, Export ("rangeWithLowerLimit:upperLimit:")] - SKRange Create (nfloat lower, nfloat upper); - - [Static, Export ("rangeWithLowerLimit:")] - SKRange CreateWithLowerLimit (nfloat lower); - - [Static, Export ("rangeWithUpperLimit:")] - SKRange CreateWithUpperLimit (nfloat upper); - - [Static, Export ("rangeWithConstantValue:")] - SKRange CreateConstant (nfloat value); - - [Static, Export ("rangeWithValue:variance:")] - SKRange CreateWithVariance (nfloat value, nfloat variance); - - [Static, Export ("rangeWithNoLimits")] - SKRange CreateUnlimited (); -} - -/// A that holds audio information. -/// -/// Apple documentation for SKAudioNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -[DisableDefaultCtor] -interface SKAudioNode : NSSecureCoding { - [Export ("initWithAVAudioNode:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] AVAudioNode node); - - [Export ("initWithFileNamed:")] - NativeHandle Constructor (string fileName); - - [Export ("initWithURL:")] - NativeHandle Constructor (NSUrl url); - - [NullAllowed, Export ("avAudioNode", ArgumentSemantic.Retain)] - AVAudioNode AvAudioNode { get; set; } + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SKAttribute : NSSecureCoding { + [Static] + [Export ("attributeWithName:type:")] + SKAttribute Create (string name, SKAttributeType type); - [Export ("autoplayLooped")] - bool AutoplayLooped { get; set; } - - [Export ("positional")] - bool Positional { [Bind ("isPositional")] get; set; } -} - -/// A node that specifies the position inside a from which it can be rendered. -/// -/// Apple documentation for SKCameraNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -interface SKCameraNode { - [Export ("containsNode:")] - bool Contains (SKNode node); - - [Export ("containedNodeSet")] - NSSet ContainedNodeSet { get; } -} - -/// A that holds an archived collection of child nodes that can be used in multiple places throughout the game. -/// -/// Apple documentation for SKReferenceNode -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -[DisableDefaultCtor] -interface SKReferenceNode { - [Export ("initWithURL:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] NSUrl url); - - [Export ("initWithFileNamed:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] string fileName); - - [Static] - [Export ("referenceNodeWithFileNamed:")] - SKReferenceNode FromFile (string fileName); - - [Static] - [Export ("referenceNodeWithURL:")] - SKReferenceNode FromUrl (NSUrl referenceUrl); - - [Export ("didLoadReferenceNode:")] - void DidLoadReferenceNode ([NullAllowed] SKNode node); - - [Export ("resolveReferenceNode")] - void Resolve (); -} - -/// Holds per-node data to be used with a custom shader. -/// -/// Apple documentation for SKAttribute -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[DisableDefaultCtor] -interface SKAttribute : NSSecureCoding { - [Static] - [Export ("attributeWithName:type:")] - SKAttribute Create (string name, SKAttributeType type); - - [Export ("initWithName:type:")] - [DesignatedInitializer] - NativeHandle Constructor (string name, SKAttributeType type); - - [Export ("name")] - string Name { get; } - - [Export ("type")] - SKAttributeType Type { get; } -} - -/// Holds the value, of the appropriate , for an . -/// -/// Apple documentation for SKAttributeValue -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[DisableDefaultCtor] // DesignatedInitializer below -interface SKAttributeValue : NSSecureCoding { - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); - - [Static] - [Export ("valueWithFloat:")] - SKAttributeValue Create (float value); + [Export ("initWithName:type:")] + [DesignatedInitializer] + NativeHandle Constructor (string name, SKAttributeType type); - [Static] - [Export ("valueWithVectorFloat2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector2 value); + [Export ("name")] + string Name { get; } - [Static] - [Export ("valueWithVectorFloat3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector3 value); + [Export ("type")] + SKAttributeType Type { get; } + } - [Static] - [Export ("valueWithVectorFloat4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector4 value); + /// Holds the value, of the appropriate , for an . + /// + /// Apple documentation for SKAttributeValue + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] // DesignatedInitializer below + interface SKAttributeValue : NSSecureCoding { + [DesignatedInitializer] + [Export ("init")] + NativeHandle Constructor (); - [Export ("floatValue")] - float FloatValue { get; set; } + [Static] + [Export ("valueWithFloat:")] + SKAttributeValue Create (float value); - [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] - Vector2 VectorFloat2Value { + [Static] + [Export ("valueWithVectorFloat2:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + SKAttributeValue Create (Vector2 value); - [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] - Vector3 VectorFloat3Value { + [Static] + [Export ("valueWithVectorFloat3:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + SKAttributeValue Create (Vector3 value); - [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] - Vector4 VectorFloat4Value { + [Static] + [Export ("valueWithVectorFloat4:")] [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; + SKAttributeValue Create (Vector4 value); + + [Export ("floatValue")] + float FloatValue { get; set; } + + [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] + Vector2 VectorFloat2Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] + Vector3 VectorFloat3Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] + Vector4 VectorFloat4Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } } -} -/// A single kind of tile in a tile map. -/// -/// Apple documentation for SKTileDefinition -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[DisableDefaultCtor] -interface SKTileDefinition : NSCopying, NSSecureCoding { - [Static] - [Export ("tileDefinitionWithTexture:")] - SKTileDefinition Create (SKTexture texture); - - [Static] - [Export ("tileDefinitionWithTexture:size:")] - SKTileDefinition Create (SKTexture texture, CGSize size); - - [Static] - [Export ("tileDefinitionWithTexture:normalTexture:size:")] - SKTileDefinition Create (SKTexture texture, SKTexture normalTexture, CGSize size); + /// A single kind of tile in a tile map. + /// + /// Apple documentation for SKTileDefinition + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SKTileDefinition : NSCopying, NSSecureCoding { + [Static] + [Export ("tileDefinitionWithTexture:")] + SKTileDefinition Create (SKTexture texture); - [Static] - [Export ("tileDefinitionWithTextures:size:timePerFrame:")] - SKTileDefinition Create (SKTexture [] textures, CGSize size, nfloat timePerFrame); + [Static] + [Export ("tileDefinitionWithTexture:size:")] + SKTileDefinition Create (SKTexture texture, CGSize size); - [Static] - [Export ("tileDefinitionWithTextures:normalTextures:size:timePerFrame:")] - SKTileDefinition Create (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); + [Static] + [Export ("tileDefinitionWithTexture:normalTexture:size:")] + SKTileDefinition Create (SKTexture texture, SKTexture normalTexture, CGSize size); - [Export ("initWithTexture:")] - NativeHandle Constructor (SKTexture texture); + [Static] + [Export ("tileDefinitionWithTextures:size:timePerFrame:")] + SKTileDefinition Create (SKTexture [] textures, CGSize size, nfloat timePerFrame); - [Export ("initWithTexture:size:")] - NativeHandle Constructor (SKTexture texture, CGSize size); + [Static] + [Export ("tileDefinitionWithTextures:normalTextures:size:timePerFrame:")] + SKTileDefinition Create (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); - [Export ("initWithTexture:normalTexture:size:")] - NativeHandle Constructor (SKTexture texture, SKTexture normalTexture, CGSize size); + [Export ("initWithTexture:")] + NativeHandle Constructor (SKTexture texture); - [Export ("initWithTextures:size:timePerFrame:")] - NativeHandle Constructor (SKTexture [] textures, CGSize size, nfloat timePerFrame); + [Export ("initWithTexture:size:")] + NativeHandle Constructor (SKTexture texture, CGSize size); - [Export ("initWithTextures:normalTextures:size:timePerFrame:")] - NativeHandle Constructor (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); + [Export ("initWithTexture:normalTexture:size:")] + NativeHandle Constructor (SKTexture texture, SKTexture normalTexture, CGSize size); - [Export ("textures", ArgumentSemantic.Copy)] - SKTexture [] Textures { get; set; } + [Export ("initWithTextures:size:timePerFrame:")] + NativeHandle Constructor (SKTexture [] textures, CGSize size, nfloat timePerFrame); - [Export ("normalTextures", ArgumentSemantic.Copy)] - SKTexture [] NormalTextures { get; set; } + [Export ("initWithTextures:normalTextures:size:timePerFrame:")] + NativeHandle Constructor (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); - [NullAllowed, Export ("userData", ArgumentSemantic.Retain)] - NSMutableDictionary UserData { get; set; } + [Export ("textures", ArgumentSemantic.Copy)] + SKTexture [] Textures { get; set; } - [NullAllowed, Export ("name")] - string Name { get; set; } + [Export ("normalTextures", ArgumentSemantic.Copy)] + SKTexture [] NormalTextures { get; set; } - [Export ("size", ArgumentSemantic.Assign)] - CGSize Size { get; set; } + [NullAllowed, Export ("userData", ArgumentSemantic.Retain)] + NSMutableDictionary UserData { get; set; } - [Export ("timePerFrame")] - nfloat TimePerFrame { get; set; } + [NullAllowed, Export ("name")] + string Name { get; set; } - [Export ("placementWeight")] - nuint PlacementWeight { get; set; } + [Export ("size", ArgumentSemantic.Assign)] + CGSize Size { get; set; } - [Export ("rotation", ArgumentSemantic.Assign)] - SKTileDefinitionRotation Rotation { get; set; } + [Export ("timePerFrame")] + nfloat TimePerFrame { get; set; } - [Export ("flipVertically")] - bool FlipVertically { get; set; } + [Export ("placementWeight")] + nuint PlacementWeight { get; set; } - [Export ("flipHorizontally")] - bool FlipHorizontally { get; set; } -} + [Export ("rotation", ArgumentSemantic.Assign)] + SKTileDefinitionRotation Rotation { get; set; } -/// -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -interface SKTileMapNode : NSCopying, NSSecureCoding { - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); + [Export ("flipVertically")] + bool FlipVertically { get; set; } - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); + [Export ("flipHorizontally")] + bool FlipHorizontally { get; set; } + } - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:tileGroupLayout:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); + /// + [MacCatalyst (13, 1)] + [BaseType (typeof (SKNode))] + interface SKTileMapNode : NSCopying, NSSecureCoding { + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); - [Export ("initWithTileSet:columns:rows:tileSize:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); - [Export ("initWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:tileGroupLayout:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); - [Export ("initWithTileSet:columns:rows:tileSize:tileGroupLayout:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); + [Export ("initWithTileSet:columns:rows:tileSize:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); - [Export ("numberOfColumns")] - nuint NumberOfColumns { get; set; } + [Export ("initWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); - [Export ("numberOfRows")] - nuint NumberOfRows { get; set; } + [Export ("initWithTileSet:columns:rows:tileSize:tileGroupLayout:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); - [Export ("tileSize", ArgumentSemantic.Assign)] - CGSize TileSize { get; set; } + [Export ("numberOfColumns")] + nuint NumberOfColumns { get; set; } - [Export ("mapSize")] - CGSize MapSize { get; } + [Export ("numberOfRows")] + nuint NumberOfRows { get; set; } - [Export ("tileSet", ArgumentSemantic.Assign)] - SKTileSet TileSet { get; set; } + [Export ("tileSize", ArgumentSemantic.Assign)] + CGSize TileSize { get; set; } - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("mapSize")] + CGSize MapSize { get; } - [Export ("color", ArgumentSemantic.Retain)] - UIColor Color { get; set; } + [Export ("tileSet", ArgumentSemantic.Assign)] + SKTileSet TileSet { get; set; } - [Export ("blendMode", ArgumentSemantic.Assign)] - SKBlendMode BlendMode { get; set; } + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Export ("anchorPoint", ArgumentSemantic.Assign)] - CGPoint AnchorPoint { get; set; } + [Export ("color", ArgumentSemantic.Retain)] + UIColor Color { get; set; } - [NullAllowed, Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [Export ("blendMode", ArgumentSemantic.Assign)] + SKBlendMode BlendMode { get; set; } - [Export ("lightingBitMask")] - uint LightingBitMask { get; set; } + [Export ("anchorPoint", ArgumentSemantic.Assign)] + CGPoint AnchorPoint { get; set; } - [Export ("enableAutomapping")] - bool EnableAutomapping { get; set; } + [NullAllowed, Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } - [Export ("fillWithTileGroup:")] - void Fill ([NullAllowed] SKTileGroup tileGroup); + [Export ("lightingBitMask")] + uint LightingBitMask { get; set; } - [Export ("tileDefinitionAtColumn:row:")] - [return: NullAllowed] - SKTileDefinition GetTileDefinition (nuint column, nuint row); + [Export ("enableAutomapping")] + bool EnableAutomapping { get; set; } - [Export ("tileGroupAtColumn:row:")] - [return: NullAllowed] - SKTileGroup GetTileGroup (nuint column, nuint row); + [Export ("fillWithTileGroup:")] + void Fill ([NullAllowed] SKTileGroup tileGroup); - [Export ("setTileGroup:forColumn:row:")] - void SetTileGroup ([NullAllowed] SKTileGroup tileGroup, nuint column, nuint row); + [Export ("tileDefinitionAtColumn:row:")] + [return: NullAllowed] + SKTileDefinition GetTileDefinition (nuint column, nuint row); - [Export ("setTileGroup:andTileDefinition:forColumn:row:")] - void SetTileGroup (SKTileGroup tileGroup, SKTileDefinition tileDefinition, nuint column, nuint row); + [Export ("tileGroupAtColumn:row:")] + [return: NullAllowed] + SKTileGroup GetTileGroup (nuint column, nuint row); - [Export ("tileColumnIndexFromPosition:")] - nuint GetTileColumnIndex (CGPoint position); + [Export ("setTileGroup:forColumn:row:")] + void SetTileGroup ([NullAllowed] SKTileGroup tileGroup, nuint column, nuint row); - [Export ("tileRowIndexFromPosition:")] - nuint GetTileRowIndex (CGPoint position); + [Export ("setTileGroup:andTileDefinition:forColumn:row:")] + void SetTileGroup (SKTileGroup tileGroup, SKTileDefinition tileDefinition, nuint column, nuint row); - [Export ("centerOfTileAtColumn:row:")] - CGPoint GetCenterOfTile (nuint column, nuint row); + [Export ("tileColumnIndexFromPosition:")] + nuint GetTileColumnIndex (CGPoint position); - // Static Category from GameplayKit - [MacCatalyst (13, 1)] - [Static] - [Export ("tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:")] - SKTileMapNode [] FromTileSet (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, GKNoiseMap noiseMap, NSNumber [] thresholds); + [Export ("tileRowIndexFromPosition:")] + nuint GetTileRowIndex (CGPoint position); - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + [Export ("centerOfTileAtColumn:row:")] + CGPoint GetCenterOfTile (nuint column, nuint row); - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + // Static Category from GameplayKit + [MacCatalyst (13, 1)] + [Static] + [Export ("tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:")] + SKTileMapNode [] FromTileSet (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, GKNoiseMap noiseMap, NSNumber [] thresholds); - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); -} + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } -/// Represents the possible elements of a in the form of objects. -/// -/// An collects a set of related objects that may be placed on a . Additionally, it may define a default tile group and tile size. -/// -/// Apple documentation for SKTileSet -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKTileSet : NSCopying, NSSecureCoding { - [Static] - [Export ("tileSetWithTileGroups:")] - SKTileSet Create (SKTileGroup [] tileGroups); + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [Static] - [Export ("tileSetWithTileGroups:tileSetType:")] - SKTileSet Create (SKTileGroup [] tileGroups, SKTileSetType tileSetType); + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); + } - [Export ("initWithTileGroups:")] - NativeHandle Constructor (SKTileGroup [] tileGroups); + /// Represents the possible elements of a in the form of objects. + /// + /// An collects a set of related objects that may be placed on a . Additionally, it may define a default tile group and tile size. + /// + /// Apple documentation for SKTileSet + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface SKTileSet : NSCopying, NSSecureCoding { + [Static] + [Export ("tileSetWithTileGroups:")] + SKTileSet Create (SKTileGroup [] tileGroups); - [Export ("initWithTileGroups:tileSetType:")] - NativeHandle Constructor (SKTileGroup [] tileGroups, SKTileSetType tileSetType); + [Static] + [Export ("tileSetWithTileGroups:tileSetType:")] + SKTileSet Create (SKTileGroup [] tileGroups, SKTileSetType tileSetType); - [Static] - [Export ("tileSetNamed:")] - [return: NullAllowed] - SKTileSet FromName (string name); + [Export ("initWithTileGroups:")] + NativeHandle Constructor (SKTileGroup [] tileGroups); - [Static] - [Export ("tileSetFromURL:")] - [return: NullAllowed] - SKTileSet FromUrl (NSUrl url); + [Export ("initWithTileGroups:tileSetType:")] + NativeHandle Constructor (SKTileGroup [] tileGroups, SKTileSetType tileSetType); - [Export ("tileGroups", ArgumentSemantic.Copy)] - SKTileGroup [] TileGroups { get; set; } + [Static] + [Export ("tileSetNamed:")] + [return: NullAllowed] + SKTileSet FromName (string name); - [NullAllowed, Export ("name")] - string Name { get; set; } + [Static] + [Export ("tileSetFromURL:")] + [return: NullAllowed] + SKTileSet FromUrl (NSUrl url); - [Export ("type", ArgumentSemantic.Assign)] - SKTileSetType Type { get; set; } + [Export ("tileGroups", ArgumentSemantic.Copy)] + SKTileGroup [] TileGroups { get; set; } - [NullAllowed, Export ("defaultTileGroup", ArgumentSemantic.Assign)] - SKTileGroup DefaultTileGroup { get; set; } + [NullAllowed, Export ("name")] + string Name { get; set; } - [Export ("defaultTileSize", ArgumentSemantic.Assign)] - CGSize DefaultTileSize { get; set; } -} + [Export ("type", ArgumentSemantic.Assign)] + SKTileSetType Type { get; set; } -/// -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKTileGroup : NSCopying, NSSecureCoding { - [Static] - [Export ("tileGroupWithTileDefinition:")] - SKTileGroup Create (SKTileDefinition tileDefinition); + [NullAllowed, Export ("defaultTileGroup", ArgumentSemantic.Assign)] + SKTileGroup DefaultTileGroup { get; set; } - [Static] - [Export ("tileGroupWithRules:")] - SKTileGroup Create (SKTileGroupRule [] rules); + [Export ("defaultTileSize", ArgumentSemantic.Assign)] + CGSize DefaultTileSize { get; set; } + } - [Static] - [Export ("emptyTileGroup")] - SKTileGroup CreateEmpty (); + /// + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface SKTileGroup : NSCopying, NSSecureCoding { + [Static] + [Export ("tileGroupWithTileDefinition:")] + SKTileGroup Create (SKTileDefinition tileDefinition); - [Export ("initWithTileDefinition:")] - NativeHandle Constructor (SKTileDefinition tileDefinition); + [Static] + [Export ("tileGroupWithRules:")] + SKTileGroup Create (SKTileGroupRule [] rules); - [Export ("initWithRules:")] - NativeHandle Constructor (SKTileGroupRule [] rules); + [Static] + [Export ("emptyTileGroup")] + SKTileGroup CreateEmpty (); - [Export ("rules", ArgumentSemantic.Copy)] - SKTileGroupRule [] Rules { get; set; } + [Export ("initWithTileDefinition:")] + NativeHandle Constructor (SKTileDefinition tileDefinition); - [NullAllowed, Export ("name")] - string Name { get; set; } -} + [Export ("initWithRules:")] + NativeHandle Constructor (SKTileGroupRule [] rules); -/// Defines adjacency rules for tiles in an . -/// -/// Apple documentation for SKTileGroupRule -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKTileGroupRule : NSCopying, NSSecureCoding { - [Static] - [Export ("tileGroupRuleWithAdjacency:tileDefinitions:")] - SKTileGroupRule Create (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); + [Export ("rules", ArgumentSemantic.Copy)] + SKTileGroupRule [] Rules { get; set; } - [Export ("initWithAdjacency:tileDefinitions:")] - NativeHandle Constructor (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); + [NullAllowed, Export ("name")] + string Name { get; set; } + } - [Export ("adjacency", ArgumentSemantic.Assign)] - SKTileAdjacencyMask Adjacency { get; set; } + /// Defines adjacency rules for tiles in an . + /// + /// Apple documentation for SKTileGroupRule + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface SKTileGroupRule : NSCopying, NSSecureCoding { + [Static] + [Export ("tileGroupRuleWithAdjacency:tileDefinitions:")] + SKTileGroupRule Create (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); - [Export ("tileDefinitions", ArgumentSemantic.Copy)] - SKTileDefinition [] TileDefinitions { get; set; } + [Export ("initWithAdjacency:tileDefinitions:")] + NativeHandle Constructor (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); - [NullAllowed, Export ("name")] - string Name { get; set; } -} + [Export ("adjacency", ArgumentSemantic.Assign)] + SKTileAdjacencyMask Adjacency { get; set; } -/// Defines geometry deformation on objects. -/// -/// Apple documentation for SKWarpGeometry -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -interface SKWarpGeometry : NSCopying, NSSecureCoding { } - -/// Associates a and subdivision levels with an implementation. -[MacCatalyst (13, 1)] -[Protocol] -interface SKWarpable { - [Abstract] - [NullAllowed, Export ("warpGeometry", ArgumentSemantic.Assign)] - SKWarpGeometry WarpGeometry { get; set; } - - [Abstract] - [Export ("subdivisionLevels")] - nint SubdivisionLevels { get; set; } -} + [Export ("tileDefinitions", ArgumentSemantic.Copy)] + SKTileDefinition [] TileDefinitions { get; set; } -/// A subclass that defines a warpable grid. -/// -/// Apple documentation for SKWarpGeometryGrid -[MacCatalyst (13, 1)] -[BaseType (typeof (SKWarpGeometry))] -[DisableDefaultCtor] -interface SKWarpGeometryGrid : NSSecureCoding { - [Static] - [Export ("grid")] - SKWarpGeometryGrid GetGrid (); + [NullAllowed, Export ("name")] + string Name { get; set; } + } - [Static] - [Export ("gridWithColumns:rows:")] - SKWarpGeometryGrid Create (nint cols, nint rows); + /// Defines geometry deformation on objects. + /// + /// Apple documentation for SKWarpGeometry + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + interface SKWarpGeometry : NSCopying, NSSecureCoding { } - [Internal] - [Static] - [Export ("gridWithColumns:rows:sourcePositions:destPositions:")] - SKWarpGeometryGrid GridWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); + /// Associates a and subdivision levels with an implementation. + [MacCatalyst (13, 1)] + [Protocol] + interface SKWarpable { + [Abstract] + [NullAllowed, Export ("warpGeometry", ArgumentSemantic.Assign)] + SKWarpGeometry WarpGeometry { get; set; } - [Internal] - [DesignatedInitializer] - [Export ("initWithColumns:rows:sourcePositions:destPositions:")] - IntPtr InitWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); + [Abstract] + [Export ("subdivisionLevels")] + nint SubdivisionLevels { get; set; } + } - [Export ("numberOfColumns")] - nint NumberOfColumns { get; } + /// A subclass that defines a warpable grid. + /// + /// Apple documentation for SKWarpGeometryGrid + [MacCatalyst (13, 1)] + [BaseType (typeof (SKWarpGeometry))] + [DisableDefaultCtor] + interface SKWarpGeometryGrid : NSSecureCoding { + [Static] + [Export ("grid")] + SKWarpGeometryGrid GetGrid (); - [Export ("numberOfRows")] - nint NumberOfRows { get; } + [Static] + [Export ("gridWithColumns:rows:")] + SKWarpGeometryGrid Create (nint cols, nint rows); - [Export ("vertexCount")] - nint VertexCount { get; } + [Internal] + [Static] + [Export ("gridWithColumns:rows:sourcePositions:destPositions:")] + SKWarpGeometryGrid GridWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); - [Export ("sourcePositionAtIndex:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector2 GetSourcePosition (nint index); + [Internal] + [DesignatedInitializer] + [Export ("initWithColumns:rows:sourcePositions:destPositions:")] + IntPtr InitWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); - [Export ("destPositionAtIndex:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector2 GetDestPosition (nint index); + [Export ("numberOfColumns")] + nint NumberOfColumns { get; } - [Internal] - [Export ("gridByReplacingSourcePositions:")] - SKWarpGeometryGrid _GridByReplacingSourcePositions (IntPtr sourcePositions); + [Export ("numberOfRows")] + nint NumberOfRows { get; } - [Internal] - [Export ("gridByReplacingDestPositions:")] - SKWarpGeometryGrid _GridByReplacingDestPositions (IntPtr destPositions); -} + [Export ("vertexCount")] + nint VertexCount { get; } -// SKRenderer is not available for WatchKit apps and the iOS simulator -/// The class used to render SpriteKit. -[MacCatalyst (13, 1)] -[BaseType (typeof (NSObject))] -[DisableDefaultCtor] -interface SKRenderer { - [Static] - [Export ("rendererWithDevice:")] - SKRenderer FromDevice (IMTLDevice device); + [Export ("sourcePositionAtIndex:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector2 GetSourcePosition (nint index); - [Export ("renderWithViewport:commandBuffer:renderPassDescriptor:")] - void Render (CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); + [Export ("destPositionAtIndex:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector2 GetDestPosition (nint index); - [Export ("renderWithViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:")] - void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); + [Internal] + [Export ("gridByReplacingSourcePositions:")] + SKWarpGeometryGrid _GridByReplacingSourcePositions (IntPtr sourcePositions); - [Export ("updateAtTime:")] - void Update (double currentTime); + [Internal] + [Export ("gridByReplacingDestPositions:")] + SKWarpGeometryGrid _GridByReplacingDestPositions (IntPtr destPositions); + } - [NullAllowed, Export ("scene", ArgumentSemantic.Assign)] - SKScene Scene { get; set; } + // SKRenderer is not available for WatchKit apps and the iOS simulator + /// The class used to render SpriteKit. + [MacCatalyst (13, 1)] + [BaseType (typeof (NSObject))] + [DisableDefaultCtor] + interface SKRenderer { + [Static] + [Export ("rendererWithDevice:")] + SKRenderer FromDevice (IMTLDevice device); - [Export ("ignoresSiblingOrder")] - bool IgnoresSiblingOrder { get; set; } + [Export ("renderWithViewport:commandBuffer:renderPassDescriptor:")] + void Render (CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); - [Export ("shouldCullNonVisibleNodes")] - bool ShouldCullNonVisibleNodes { get; set; } + [Export ("renderWithViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:")] + void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); - [Export ("showsDrawCount")] - bool ShowsDrawCount { get; set; } + [Export ("updateAtTime:")] + void Update (double currentTime); - [Export ("showsNodeCount")] - bool ShowsNodeCount { get; set; } + [NullAllowed, Export ("scene", ArgumentSemantic.Assign)] + SKScene Scene { get; set; } - [Export ("showsQuadCount")] - bool ShowsQuadCount { get; set; } + [Export ("ignoresSiblingOrder")] + bool IgnoresSiblingOrder { get; set; } - [Export ("showsPhysics")] - bool ShowsPhysics { get; set; } + [Export ("shouldCullNonVisibleNodes")] + bool ShouldCullNonVisibleNodes { get; set; } - [Export ("showsFields")] - bool ShowsFields { get; set; } -} + [Export ("showsDrawCount")] + bool ShowsDrawCount { get; set; } -/// A that holds a geometric transform. -[MacCatalyst (13, 1)] -[BaseType (typeof (SKNode))] -interface SKTransformNode { - [Export ("xRotation")] - nfloat XRotation { get; set; } + [Export ("showsNodeCount")] + bool ShowsNodeCount { get; set; } - [Export ("yRotation")] - nfloat YRotation { get; set; } + [Export ("showsQuadCount")] + bool ShowsQuadCount { get; set; } - [Export ("eulerAngles")] - VectorFloat3 EulerAngles { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [Export ("showsPhysics")] + bool ShowsPhysics { get; set; } - [Export ("rotationMatrix")] - MatrixFloat3x3 RotationMatrix { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; + [Export ("showsFields")] + bool ShowsFields { get; set; } } - [Export ("quaternion")] - Quaternion Quaternion { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; + /// A that holds a geometric transform. + [MacCatalyst (13, 1)] + [BaseType (typeof (SKNode))] + interface SKTransformNode { + [Export ("xRotation")] + nfloat XRotation { get; set; } + + [Export ("yRotation")] + nfloat YRotation { get; set; } + + [Export ("eulerAngles")] + VectorFloat3 EulerAngles { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Export ("rotationMatrix")] + MatrixFloat3x3 RotationMatrix { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Export ("quaternion")] + Quaternion Quaternion { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } } } -} diff --git a/src/storekit.cs b/src/storekit.cs index 1b3269170981..1f273c0191f4 100644 --- a/src/storekit.cs +++ b/src/storekit.cs @@ -79,13 +79,17 @@ partial interface SKDownload { [Export ("state")] SKDownloadState State { get; } #if MONOMAC - [NoiOS][NoTV][NoMacCatalyst] + [NoiOS] + [NoTV] + [NoMacCatalyst] [Obsolete ("Use 'State' instead.")] [Wrap ("State", IsVirtual = true)] - SKDownloadState DownloadState { get; } + SKDownloadState DownloadState { get; } - [NoiOS][NoTV][NoMacCatalyst] - [Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'ExpectedContentLength' instead.")] + [NoiOS] + [NoTV] + [NoMacCatalyst] + [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'ExpectedContentLength' instead.")] [Export ("contentLength", ArgumentSemantic.Copy)] NSNumber ContentLength { get; } #else @@ -374,8 +378,10 @@ interface SKProduct { string ProductIdentifier { get; } #if MONOMAC -[NoiOS][NoTV][NoMacCatalyst] - [Deprecated (PlatformName.MacOSX, 10,15, message: "Use 'IsDownloadable' instead.")] + [NoiOS] + [NoTV] + [NoMacCatalyst] + [Deprecated (PlatformName.MacOSX, 10, 15, message: "Use 'IsDownloadable' instead.")] [Export ("downloadable")] bool Downloadable { get; } #elif !NET diff --git a/src/tvmlkit.cs b/src/tvmlkit.cs index b63ba6ae19e7..ac782b340890 100644 --- a/src/tvmlkit.cs +++ b/src/tvmlkit.cs @@ -716,7 +716,8 @@ interface ITVBrowserViewControllerDataSource { } [Deprecated (PlatformName.TvOS, 18, 0, message: "Use SwiftUI or UIKit instead.")] [TV (13, 0)] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] @@ -734,7 +735,8 @@ interface ITVBrowserViewControllerDelegate { } [Deprecated (PlatformName.TvOS, 18, 0, message: "Use SwiftUI or UIKit instead.")] [TV (13, 0)] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] @@ -799,7 +801,8 @@ interface ITVDocumentViewControllerDelegate { } [Deprecated (PlatformName.TvOS, 18, 0, message: "Use SwiftUI or UIKit instead.")] [TV (13, 0)] #if NET - [Protocol][Model] + [Protocol] + [Model] #else [Protocol] [Model (AutoGeneratedName = true)] diff --git a/src/uikit.cs b/src/uikit.cs index dc2a77d216f0..e88ec7e7c10a 100644 --- a/src/uikit.cs +++ b/src/uikit.cs @@ -15777,7 +15777,7 @@ interface UITableViewRowAction : NSCopying { // , Events=new Type [] {typeof(UITextFieldDelegate)})] custom logic needed, see https://bugzilla.xamarin.com/show_bug.cgi?id=53174 interface UITextField : UITextInput, UIContentSizeCategoryAdjusting, UILetterformAwareAdjusting #if IOS - , UITextDraggable, UITextDroppable, UITextPasteConfigurationSupporting + , UITextDraggable, UITextDroppable, UITextPasteConfigurationSupporting #endif // IOS { [Export ("initWithFrame:")] @@ -15993,7 +15993,7 @@ interface UITextFieldDelegate { [BaseType (typeof (UIScrollView), Delegates = new string [] { "WeakDelegate" }, Events = new Type [] { typeof (UITextViewDelegate) })] interface UITextView : UITextInput, NSCoding, UIContentSizeCategoryAdjusting, UILetterformAwareAdjusting #if IOS - , UITextDraggable, UITextDroppable, UITextPasteConfigurationSupporting + , UITextDraggable, UITextDroppable, UITextPasteConfigurationSupporting #endif // IOS { [Export ("initWithFrame:")] diff --git a/src/webkit.cs b/src/webkit.cs index 08a7e3be2435..3eb3bd941851 100644 --- a/src/webkit.cs +++ b/src/webkit.cs @@ -32,7 +32,7 @@ #if MONOMAC using AppKit; -using UIColor=AppKit.NSColor; +using UIColor = AppKit.NSColor; using UIScrollView = AppKit.NSScrollView; using UIImage = AppKit.NSImage; using IUIContextMenuInteractionCommitAnimating = Foundation.NSObject; @@ -2539,7 +2539,7 @@ partial interface WebUIDelegate { [Export ("webView:shouldPerformAction:fromSender:"), DelegateName ("WebViewPerformAction"), DefaultValue (null)] bool UIShouldPerformActionfromSender (WebView webView, Selector action, NSObject sender); #else - [Export ("webView:shouldPerformAction:fromSender:"), DelegateName("WebViewPerformAction"), DefaultValue (null)] + [Export ("webView:shouldPerformAction:fromSender:"), DelegateName ("WebViewPerformAction"), DefaultValue (null)] bool UIShouldPerformAction (WebView webView, Selector action, NSObject sender); #endif @@ -5760,7 +5760,7 @@ interface WKWindowFeatures { } #if MONOMAC - interface UIPreviewActionItem {} + interface UIPreviewActionItem { } #endif interface IWKPreviewActionItem { } diff --git a/src/xkit.cs b/src/xkit.cs index 6aa374e5d656..fb04b16ca6c7 100644 --- a/src/xkit.cs +++ b/src/xkit.cs @@ -44,21 +44,21 @@ using NSView = System.Object; using NSWindow = System.Object; #else -using UICollectionLayoutListConfiguration=System.Object; -using UIContentInsetsReference=System.Object; -using UIEdgeInsets=System.Object; -using UITraitCollection=System.Object; +using UICollectionLayoutListConfiguration = System.Object; +using UIContentInsetsReference = System.Object; +using UIEdgeInsets = System.Object; +using UITraitCollection = System.Object; #endif // !MONOMAC #if MONOMAC -using BezierPath=AppKit.NSBezierPath; -using Image=AppKit.NSImage; -using TextAlignment=AppKit.NSTextAlignment; -using LineBreakMode=AppKit.NSLineBreakMode; -using CollectionLayoutSectionOrthogonalScrollingBehavior=AppKit.NSCollectionLayoutSectionOrthogonalScrollingBehavior; -using CollectionElementCategory=AppKit.NSCollectionElementCategory; -using StringAttributes=AppKit.NSStringAttributes; -using View=AppKit.NSView; +using BezierPath = AppKit.NSBezierPath; +using Image = AppKit.NSImage; +using TextAlignment = AppKit.NSTextAlignment; +using LineBreakMode = AppKit.NSLineBreakMode; +using CollectionLayoutSectionOrthogonalScrollingBehavior = AppKit.NSCollectionLayoutSectionOrthogonalScrollingBehavior; +using CollectionElementCategory = AppKit.NSCollectionElementCategory; +using StringAttributes = AppKit.NSStringAttributes; +using View = AppKit.NSView; using UICollectionLayoutSectionOrthogonalScrollingProperties = System.Object; #else using BezierPath = UIKit.UIBezierPath; @@ -72,26 +72,26 @@ #endif #if MONOMAC - using IXWritingToolsCoordinatorDelegate = AppKit.INSWritingToolsCoordinatorDelegate; - using XWritingToolsBehavior = AppKit.NSWritingToolsBehavior; - using XWritingToolsCoordinator = AppKit.NSWritingToolsCoordinator; - using XWritingToolsCoordinatorAnimationParameters = AppKit.NSWritingToolsCoordinatorAnimationParameters; - using XWritingToolsCoordinatorContext = AppKit.NSWritingToolsCoordinatorContext; - using XWritingToolsCoordinatorContextScope = AppKit.NSWritingToolsCoordinatorContextScope; - using XWritingToolsCoordinatorDelegate = AppKit.NSWritingToolsCoordinatorDelegate; - using XWritingToolsCoordinatorDelegateReplaceRangeCallback = AppKit.NSWritingToolsCoordinatorDelegateReplaceRangeCallback; - using XWritingToolsCoordinatorDelegateRequestsBoundingBezierPathsCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsBoundingBezierPathsCallback; - using XWritingToolsCoordinatorDelegateRequestsContextsCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsContextsCallback; - using XWritingToolsCoordinatorDelegateRequestsDecorationContainerViewCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsDecorationContainerViewCallback; - using XWritingToolsCoordinatorDelegateRequestsPreviewForTextAnimationCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsPreviewForTextAnimationCallback; - using XWritingToolsCoordinatorDelegateRequestsRangeCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsRangeCallback; - using XWritingToolsCoordinatorDelegateRequestsSingleContainerSubrangesCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsSingleContainerSubrangesCallback; - using XWritingToolsCoordinatorDelegateRequestsUnderlinePathsCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsUnderlinePathsCallback; - using XWritingToolsCoordinatorState = AppKit.NSWritingToolsCoordinatorState; - using XWritingToolsCoordinatorTextAnimation = AppKit.NSWritingToolsCoordinatorTextAnimation; - using XWritingToolsCoordinatorTextReplacementReason = AppKit.NSWritingToolsCoordinatorTextReplacementReason; - using XWritingToolsCoordinatorTextUpdateReason = AppKit.NSWritingToolsCoordinatorTextUpdateReason; - using XWritingToolsResultOptions = AppKit.NSWritingToolsResultOptions; +using IXWritingToolsCoordinatorDelegate = AppKit.INSWritingToolsCoordinatorDelegate; +using XWritingToolsBehavior = AppKit.NSWritingToolsBehavior; +using XWritingToolsCoordinator = AppKit.NSWritingToolsCoordinator; +using XWritingToolsCoordinatorAnimationParameters = AppKit.NSWritingToolsCoordinatorAnimationParameters; +using XWritingToolsCoordinatorContext = AppKit.NSWritingToolsCoordinatorContext; +using XWritingToolsCoordinatorContextScope = AppKit.NSWritingToolsCoordinatorContextScope; +using XWritingToolsCoordinatorDelegate = AppKit.NSWritingToolsCoordinatorDelegate; +using XWritingToolsCoordinatorDelegateReplaceRangeCallback = AppKit.NSWritingToolsCoordinatorDelegateReplaceRangeCallback; +using XWritingToolsCoordinatorDelegateRequestsBoundingBezierPathsCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsBoundingBezierPathsCallback; +using XWritingToolsCoordinatorDelegateRequestsContextsCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsContextsCallback; +using XWritingToolsCoordinatorDelegateRequestsDecorationContainerViewCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsDecorationContainerViewCallback; +using XWritingToolsCoordinatorDelegateRequestsPreviewForTextAnimationCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsPreviewForTextAnimationCallback; +using XWritingToolsCoordinatorDelegateRequestsRangeCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsRangeCallback; +using XWritingToolsCoordinatorDelegateRequestsSingleContainerSubrangesCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsSingleContainerSubrangesCallback; +using XWritingToolsCoordinatorDelegateRequestsUnderlinePathsCallback = AppKit.NSWritingToolsCoordinatorDelegateRequestsUnderlinePathsCallback; +using XWritingToolsCoordinatorState = AppKit.NSWritingToolsCoordinatorState; +using XWritingToolsCoordinatorTextAnimation = AppKit.NSWritingToolsCoordinatorTextAnimation; +using XWritingToolsCoordinatorTextReplacementReason = AppKit.NSWritingToolsCoordinatorTextReplacementReason; +using XWritingToolsCoordinatorTextUpdateReason = AppKit.NSWritingToolsCoordinatorTextUpdateReason; +using XWritingToolsResultOptions = AppKit.NSWritingToolsResultOptions; #else using IXWritingToolsCoordinatorDelegate = UIKit.IUIWritingToolsCoordinatorDelegate; using XWritingToolsBehavior = UIKit.UIWritingToolsBehavior; @@ -4183,7 +4183,7 @@ interface NSTextList : NSCoding, NSCopying, NSSecureCoding { NativeHandle Constructor (NSTextListMarkerFormats format); #if NET - [BindAs (typeof (NSTextListMarkerFormats))] + [BindAs (typeof (NSTextListMarkerFormats))] #endif [Export ("markerFormat")] #if NET @@ -4733,20 +4733,20 @@ interface UIWritingToolsCoordinator : UIInteraction } #if MONOMAC - interface INSWritingToolsCoordinatorDelegate {} + interface INSWritingToolsCoordinatorDelegate { } #else interface IUIWritingToolsCoordinatorDelegate { } #endif #if MONOMAC - delegate void NSWritingToolsCoordinatorDelegateRequestsContextsCallback (XWritingToolsCoordinatorContext[] contexts); + delegate void NSWritingToolsCoordinatorDelegateRequestsContextsCallback (XWritingToolsCoordinatorContext [] contexts); delegate void NSWritingToolsCoordinatorDelegateReplaceRangeCallback ([NullAllowed] NSAttributedString replacementText); delegate void NSWritingToolsCoordinatorDelegateRequestsRangeCallback (NSRange range, NSUuid contextId); - delegate void NSWritingToolsCoordinatorDelegateRequestsBoundingBezierPathsCallback (BezierPath[] paths); - delegate void NSWritingToolsCoordinatorDelegateRequestsUnderlinePathsCallback (BezierPath[] paths); + delegate void NSWritingToolsCoordinatorDelegateRequestsBoundingBezierPathsCallback (BezierPath [] paths); + delegate void NSWritingToolsCoordinatorDelegateRequestsUnderlinePathsCallback (BezierPath [] paths); delegate void NSWritingToolsCoordinatorDelegateRequestsPreviewForTextAnimationCallback ([NullAllowed] NSTextPreview [] view); // different signature vs other platforms delegate void NSWritingToolsCoordinatorDelegateRequestsPreviewCallback ([NullAllowed] NSTextPreview textPreview); // doesn't exist on other platforms - delegate void NSWritingToolsCoordinatorDelegateRequestsSingleContainerSubrangesCallback (/* [BindAs (typeof (NSRange[]))] */ NSValue[] ranges); // BindAs doesn't work here + delegate void NSWritingToolsCoordinatorDelegateRequestsSingleContainerSubrangesCallback (/* [BindAs (typeof (NSRange[]))] */ NSValue [] ranges); // BindAs doesn't work here delegate void NSWritingToolsCoordinatorDelegateRequestsDecorationContainerViewCallback (View view); #else delegate void UIWritingToolsCoordinatorDelegateRequestsContextsCallback (XWritingToolsCoordinatorContext [] contexts); From 7b72ef2281372fc519bc000021c5129431539335 Mon Sep 17 00:00:00 2001 From: GitHub Actions Autoformatter Date: Thu, 16 Jan 2025 08:23:53 +0000 Subject: [PATCH 2/2] Auto-format source code --- src/CoreFoundation/CFProxySupport.cs | 48 +- src/CoreMedia/CMSampleBuffer.cs | 2 +- src/CoreVideo/CVBuffer.cs | 4 +- src/Intents/INBillTypeResolutionResult.cs | 4 +- .../INCallRecordTypeResolutionResult.cs | 4 +- .../INCarSignalOptionsResolutionResult.cs | 4 +- ...MessageAttributeOptionsResolutionResult.cs | 4 +- .../INMessageAttributeResolutionResult.cs | 4 +- .../INPaymentStatusResolutionResult.cs | 4 +- src/Intents/INSpeakableString.cs | 2 +- .../INWorkoutGoalUnitTypeResolutionResult.cs | 4 +- .../INWorkoutLocationTypeResolutionResult.cs | 4 +- src/WebKit/WKPreferences.cs | 2 +- src/spritekit.cs | 5100 ++++++++--------- 14 files changed, 2595 insertions(+), 2595 deletions(-) diff --git a/src/CoreFoundation/CFProxySupport.cs b/src/CoreFoundation/CFProxySupport.cs index 3ccd9134be87..01feaaf66745 100644 --- a/src/CoreFoundation/CFProxySupport.cs +++ b/src/CoreFoundation/CFProxySupport.cs @@ -723,23 +723,23 @@ await Task.Run (() => { #else using (var loopSource = new CFRunLoopSource (factory (ExecutePacCallback, ref clientContext), true)) #endif - using (var mode = new NSString ("Xamarin.iOS.Proxy")) { - - if (cancellationToken.IsCancellationRequested) - throw new OperationCanceledException ("Operation was cancelled."); - - cancellationToken.Register (() => { - //if user cancels, we invalidte the source, stop the runloop and remove the source - loopSource.Invalidate (); - runLoop.RemoveSource (loopSource, mode); - runLoop.Stop (); - }); - runLoop.AddSource (loopSource, mode); - // blocks until stop is called, will be done in the cb set previously - runLoop.RunInMode (mode, double.MaxValue, false); - // does not raise an error if source is not longer present, so no need to worry + using (var mode = new NSString ("Xamarin.iOS.Proxy")) { + + if (cancellationToken.IsCancellationRequested) + throw new OperationCanceledException ("Operation was cancelled."); + + cancellationToken.Register (() => { + //if user cancels, we invalidte the source, stop the runloop and remove the source + loopSource.Invalidate (); runLoop.RemoveSource (loopSource, mode); - } + runLoop.Stop (); + }); + runLoop.AddSource (loopSource, mode); + // blocks until stop is called, will be done in the cb set previously + runLoop.RunInMode (mode, double.MaxValue, false); + // does not raise an error if source is not longer present, so no need to worry + runLoop.RemoveSource (loopSource, mode); + } #if NET } // matches the unsafe block #endif @@ -787,14 +787,14 @@ await Task.Run (() => { #else using (var loopSource = new CFRunLoopSource (factory (ExecutePacCallback, ref clientContext), true)) #endif - using (var mode = new NSString ("Xamarin.iOS.Proxy")) { - runLoop.AddSource (loopSource, mode); - runLoop.RunInMode (mode, double.MaxValue, false); - runLoop.RemoveSource (loopSource, mode); - } - pacCbData = Marshal.PtrToStructure (pacDataPtr)!; - // get data from the struct - outError = pacCbData.Error; + using (var mode = new NSString ("Xamarin.iOS.Proxy")) { + runLoop.AddSource (loopSource, mode); + runLoop.RunInMode (mode, double.MaxValue, false); + runLoop.RemoveSource (loopSource, mode); + } + pacCbData = Marshal.PtrToStructure (pacDataPtr)!; + // get data from the struct + outError = pacCbData.Error; #if NET } // unsafe #endif diff --git a/src/CoreMedia/CMSampleBuffer.cs b/src/CoreMedia/CMSampleBuffer.cs index c113833aae73..5ff8c4fab453 100644 --- a/src/CoreMedia/CMSampleBuffer.cs +++ b/src/CoreMedia/CMSampleBuffer.cs @@ -663,7 +663,7 @@ public CMSampleBufferError SetInvalidateCallback (Action invalid #if NET unsafe { #endif - return CMSampleBufferSetInvalidateCallback (Handle, null, 0); + return CMSampleBufferSetInvalidateCallback (Handle, null, 0); #if NET } #endif diff --git a/src/CoreVideo/CVBuffer.cs b/src/CoreVideo/CVBuffer.cs index 35284bd03ef8..8eebf4912d78 100644 --- a/src/CoreVideo/CVBuffer.cs +++ b/src/CoreVideo/CVBuffer.cs @@ -148,7 +148,7 @@ unsafe static IntPtr CVBufferCopyAttachment (IntPtr buffer, IntPtr key, out CVAt #if IOS || __MACCATALYST__ || TVOS if (SystemVersion.CheckiOS (15, 0)) #endif - return Runtime.GetINativeObject (CVBufferCopyAttachment (Handle, key.Handle, out attachmentMode), true); + return Runtime.GetINativeObject (CVBufferCopyAttachment (Handle, key.Handle, out attachmentMode), true); return Runtime.GetINativeObject (CVBufferGetAttachment (Handle, key.Handle, out attachmentMode), false); } #else @@ -201,7 +201,7 @@ unsafe static IntPtr CVBufferCopyAttachment (IntPtr buffer, IntPtr key, out CVAt #elif MONOMAC if (SystemVersion.CheckmacOS (12, 0)) #endif - return Runtime.GetINativeObject (CVBufferCopyAttachments (Handle, attachmentMode), true); + return Runtime.GetINativeObject (CVBufferCopyAttachments (Handle, attachmentMode), true); return Runtime.GetNSObject (CVBufferGetAttachments (Handle, attachmentMode), false); } diff --git a/src/Intents/INBillTypeResolutionResult.cs b/src/Intents/INBillTypeResolutionResult.cs index 9d33beb35a89..ea6e7a3a7e48 100644 --- a/src/Intents/INBillTypeResolutionResult.cs +++ b/src/Intents/INBillTypeResolutionResult.cs @@ -20,7 +20,7 @@ public static INBillTypeResolutionResult GetSuccess (INBillType resolvedValue) #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedBillType (resolvedValue); + return SuccessWithResolvedBillType (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INBillTypeResolutionResult GetConfirmationRequired (INBillType val #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithBillTypeToConfirm (valueToConfirm); + return ConfirmationRequiredWithBillTypeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INCallRecordTypeResolutionResult.cs b/src/Intents/INCallRecordTypeResolutionResult.cs index a61cc33455e5..9246df1f7567 100644 --- a/src/Intents/INCallRecordTypeResolutionResult.cs +++ b/src/Intents/INCallRecordTypeResolutionResult.cs @@ -22,7 +22,7 @@ public static INCallRecordTypeResolutionResult GetSuccess (INCallRecordType reso #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return SuccessWithResolvedCallRecordType (resolvedValue); + return SuccessWithResolvedCallRecordType (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -34,7 +34,7 @@ public static INCallRecordTypeResolutionResult GetConfirmationRequired (INCallRe #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return ConfirmationRequiredWithCallRecordTypeToConfirm (valueToConfirm); + return ConfirmationRequiredWithCallRecordTypeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INCarSignalOptionsResolutionResult.cs b/src/Intents/INCarSignalOptionsResolutionResult.cs index aa412bd8bdc4..bcdc2196ffc8 100644 --- a/src/Intents/INCarSignalOptionsResolutionResult.cs +++ b/src/Intents/INCarSignalOptionsResolutionResult.cs @@ -20,7 +20,7 @@ public static INCarSignalOptionsResolutionResult GetSuccess (INCarSignalOptions #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedCarSignalOptions (resolvedValue); + return SuccessWithResolvedCarSignalOptions (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INCarSignalOptionsResolutionResult GetConfirmationRequired (INCarS #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithCarSignalOptionsToConfirm (valueToConfirm); + return ConfirmationRequiredWithCarSignalOptionsToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INMessageAttributeOptionsResolutionResult.cs b/src/Intents/INMessageAttributeOptionsResolutionResult.cs index 68223a697189..ff6439b10fbc 100644 --- a/src/Intents/INMessageAttributeOptionsResolutionResult.cs +++ b/src/Intents/INMessageAttributeOptionsResolutionResult.cs @@ -23,7 +23,7 @@ public static INMessageAttributeOptionsResolutionResult GetSuccess (INMessageAtt #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return SuccessWithResolvedMessageAttributeOptions (resolvedValue); + return SuccessWithResolvedMessageAttributeOptions (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -35,7 +35,7 @@ public static INMessageAttributeOptionsResolutionResult GetConfirmationRequired #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return ConfirmationRequiredWithMessageAttributeOptionsToConfirm (valueToConfirm); + return ConfirmationRequiredWithMessageAttributeOptionsToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INMessageAttributeResolutionResult.cs b/src/Intents/INMessageAttributeResolutionResult.cs index 3c64ca4e8d65..5e8a2b8d8658 100644 --- a/src/Intents/INMessageAttributeResolutionResult.cs +++ b/src/Intents/INMessageAttributeResolutionResult.cs @@ -23,7 +23,7 @@ public static INMessageAttributeResolutionResult GetSuccess (INMessageAttribute #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return SuccessWithResolvedMessageAttribute (resolvedValue); + return SuccessWithResolvedMessageAttribute (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -35,7 +35,7 @@ public static INMessageAttributeResolutionResult GetConfirmationRequired (INMess #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - return ConfirmationRequiredWithMessageAttributeToConfirm (valueToConfirm); + return ConfirmationRequiredWithMessageAttributeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INPaymentStatusResolutionResult.cs b/src/Intents/INPaymentStatusResolutionResult.cs index 7c37db737020..05098efd515c 100644 --- a/src/Intents/INPaymentStatusResolutionResult.cs +++ b/src/Intents/INPaymentStatusResolutionResult.cs @@ -20,7 +20,7 @@ public static INPaymentStatusResolutionResult GetSuccess (INPaymentStatus resolv #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedPaymentStatus (resolvedValue); + return SuccessWithResolvedPaymentStatus (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INPaymentStatusResolutionResult GetConfirmationRequired (INPayment #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithPaymentStatusToConfirm (valueToConfirm); + return ConfirmationRequiredWithPaymentStatusToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INSpeakableString.cs b/src/Intents/INSpeakableString.cs index 8ad1f2dab945..7b6ed0e23a73 100644 --- a/src/Intents/INSpeakableString.cs +++ b/src/Intents/INSpeakableString.cs @@ -21,7 +21,7 @@ public INSpeakableString (string identifier, string spokenPhrase, string pronunc #elif MONOMAC if (SystemVersion.CheckmacOS (10, 13)) #endif - InitializeHandle (InitWithVocabularyIdentifier (identifier, spokenPhrase, pronunciationHint)); + InitializeHandle (InitWithVocabularyIdentifier (identifier, spokenPhrase, pronunciationHint)); #if !TVOS else InitializeHandle (InitWithIdentifier (identifier, spokenPhrase, pronunciationHint)); diff --git a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs index 7992a54356d8..46020fca83a0 100644 --- a/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs +++ b/src/Intents/INWorkoutGoalUnitTypeResolutionResult.cs @@ -20,7 +20,7 @@ public static INWorkoutGoalUnitTypeResolutionResult GetSuccess (INWorkoutGoalUni #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedWorkoutGoalUnitType (resolvedValue); + return SuccessWithResolvedWorkoutGoalUnitType (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INWorkoutGoalUnitTypeResolutionResult GetConfirmationRequired (INW #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm (valueToConfirm); + return ConfirmationRequiredWithWorkoutGoalUnitTypeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/Intents/INWorkoutLocationTypeResolutionResult.cs b/src/Intents/INWorkoutLocationTypeResolutionResult.cs index 1fc4bcef3ba3..0afa363d03e1 100644 --- a/src/Intents/INWorkoutLocationTypeResolutionResult.cs +++ b/src/Intents/INWorkoutLocationTypeResolutionResult.cs @@ -20,7 +20,7 @@ public static INWorkoutLocationTypeResolutionResult GetSuccess (INWorkoutLocatio #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return SuccessWithResolvedWorkoutLocationType (resolvedValue); + return SuccessWithResolvedWorkoutLocationType (resolvedValue); else return SuccessWithResolvedValue (resolvedValue); } @@ -30,7 +30,7 @@ public static INWorkoutLocationTypeResolutionResult GetConfirmationRequired (INW #if IOS if (SystemVersion.CheckiOS (11, 0)) #endif - return ConfirmationRequiredWithWorkoutLocationTypeToConfirm (valueToConfirm); + return ConfirmationRequiredWithWorkoutLocationTypeToConfirm (valueToConfirm); else return ConfirmationRequiredWithValueToConfirm (valueToConfirm); } diff --git a/src/WebKit/WKPreferences.cs b/src/WebKit/WKPreferences.cs index b016487cc737..d498c8262456 100644 --- a/src/WebKit/WKPreferences.cs +++ b/src/WebKit/WKPreferences.cs @@ -28,7 +28,7 @@ public bool TextInteractionEnabled { #elif MONOMAC if (SystemVersion.CheckmacOS (12, 0)) #endif - return _NewGetTextInteractionEnabled (); + return _NewGetTextInteractionEnabled (); else return _OldTextInteractionEnabled; } diff --git a/src/spritekit.cs b/src/spritekit.cs index aa35388789f3..f832ac4342d9 100644 --- a/src/spritekit.cs +++ b/src/spritekit.cs @@ -140,205 +140,205 @@ partial interface SKNode : NSSecureCoding, NSCopying, UIFocusItem, UIFocusItemCo #else #error Unknown platform #endif - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); - - [Static, Export ("node")] - SKNode Create (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("nodeWithFileNamed:")] - [return: NullAllowed] - SKNode Create (string filename); - - [MacCatalyst (13, 1)] - [Internal] - [Static] - [Export ("nodeWithFileNamed:securelyWithClasses:andError:")] - [return: NullAllowed] - SKNode Create (string filename, IntPtr classesPtr, out NSError error); - - [Export ("frame")] + [DesignatedInitializer] + [Export ("init")] + NativeHandle Constructor (); + + [Static, Export ("node")] + SKNode Create (); + + [MacCatalyst (13, 1)] + [Static] + [Export ("nodeWithFileNamed:")] + [return: NullAllowed] + SKNode Create (string filename); + + [MacCatalyst (13, 1)] + [Internal] + [Static] + [Export ("nodeWithFileNamed:securelyWithClasses:andError:")] + [return: NullAllowed] + SKNode Create (string filename, IntPtr classesPtr, out NSError error); + + [Export ("frame")] #if !MONOMAC - // For iOS+tvOS we also get this property from the UIFocusItem protocol, but we redefine it here to get the right availability attributes. - new + // For iOS+tvOS we also get this property from the UIFocusItem protocol, but we redefine it here to get the right availability attributes. + new #endif - CGRect Frame { get; } + CGRect Frame { get; } - [Export ("calculateAccumulatedFrame")] - CGRect CalculateAccumulatedFrame (); + [Export ("calculateAccumulatedFrame")] + CGRect CalculateAccumulatedFrame (); - [Export ("position")] - CGPoint Position { get; set; } + [Export ("position")] + CGPoint Position { get; set; } - [Export ("zPosition")] - nfloat ZPosition { get; set; } + [Export ("zPosition")] + nfloat ZPosition { get; set; } - [Export ("zRotation")] - nfloat ZRotation { get; set; } + [Export ("zRotation")] + nfloat ZRotation { get; set; } - [Export ("xScale")] - nfloat XScale { get; set; } + [Export ("xScale")] + nfloat XScale { get; set; } - [Export ("yScale")] - nfloat YScale { get; set; } + [Export ("yScale")] + nfloat YScale { get; set; } - [Export ("speed")] - nfloat Speed { get; set; } + [Export ("speed")] + nfloat Speed { get; set; } - [Export ("alpha")] - nfloat Alpha { get; set; } + [Export ("alpha")] + nfloat Alpha { get; set; } - [Export ("paused")] - bool Paused { [Bind ("isPaused")] get; set; } + [Export ("paused")] + bool Paused { [Bind ("isPaused")] get; set; } - [Export ("hidden")] - bool Hidden { [Bind ("isHidden")] get; set; } + [Export ("hidden")] + bool Hidden { [Bind ("isHidden")] get; set; } - [Export ("userInteractionEnabled")] - bool UserInteractionEnabled { [Bind ("isUserInteractionEnabled")] get; set; } + [Export ("userInteractionEnabled")] + bool UserInteractionEnabled { [Bind ("isUserInteractionEnabled")] get; set; } - [NoMac] - [MacCatalyst (13, 1)] - [Export ("focusBehavior", ArgumentSemantic.Assign)] - SKNodeFocusBehavior FocusBehavior { get; set; } + [NoMac] + [MacCatalyst (13, 1)] + [Export ("focusBehavior", ArgumentSemantic.Assign)] + SKNodeFocusBehavior FocusBehavior { get; set; } - [Export ("parent")] - [NullAllowed] - SKNode Parent { get; } + [Export ("parent")] + [NullAllowed] + SKNode Parent { get; } - [Export ("children")] - SKNode [] Children { get; } + [Export ("children")] + SKNode [] Children { get; } - [NullAllowed] // by default this property is null - [Export ("name", ArgumentSemantic.Copy)] - string Name { get; set; } + [NullAllowed] // by default this property is null + [Export ("name", ArgumentSemantic.Copy)] + string Name { get; set; } - [Export ("scene")] - [NullAllowed] - SKScene Scene { get; } + [Export ("scene")] + [NullAllowed] + SKScene Scene { get; } - [Export ("physicsBody", ArgumentSemantic.Retain), NullAllowed] - SKPhysicsBody PhysicsBody { get; set; } + [Export ("physicsBody", ArgumentSemantic.Retain), NullAllowed] + SKPhysicsBody PhysicsBody { get; set; } - [NullAllowed] // by default this property is null - [Export ("userData", ArgumentSemantic.Retain)] - NSMutableDictionary UserData { get; set; } + [NullAllowed] // by default this property is null + [Export ("userData", ArgumentSemantic.Retain)] + NSMutableDictionary UserData { get; set; } - [Export ("setScale:")] - void SetScale (nfloat scale); + [Export ("setScale:")] + void SetScale (nfloat scale); - [Export ("addChild:")] - [PostGet ("Children")] - void AddChild (SKNode node); + [Export ("addChild:")] + [PostGet ("Children")] + void AddChild (SKNode node); - [Export ("insertChild:atIndex:")] - [PostGet ("Children")] - void InsertChild (SKNode node, nint index); + [Export ("insertChild:atIndex:")] + [PostGet ("Children")] + void InsertChild (SKNode node, nint index); - [Export ("removeChildrenInArray:")] - [PostGet ("Children")] - void RemoveChildren (SKNode [] nodes); + [Export ("removeChildrenInArray:")] + [PostGet ("Children")] + void RemoveChildren (SKNode [] nodes); - [Export ("removeAllChildren")] - [PostGet ("Children")] - void RemoveAllChildren (); + [Export ("removeAllChildren")] + [PostGet ("Children")] + void RemoveAllChildren (); - [Export ("removeFromParent")] - void RemoveFromParent (); + [Export ("removeFromParent")] + void RemoveFromParent (); - [Export ("childNodeWithName:")] - [return: NullAllowed] - SKNode GetChildNode (string name); + [Export ("childNodeWithName:")] + [return: NullAllowed] + SKNode GetChildNode (string name); - [Export ("enumerateChildNodesWithName:usingBlock:")] - void EnumerateChildNodes (string name, SKNodeChildEnumeratorHandler enumerationHandler); + [Export ("enumerateChildNodesWithName:usingBlock:")] + void EnumerateChildNodes (string name, SKNodeChildEnumeratorHandler enumerationHandler); - [Export ("runAction:")] - void RunAction (SKAction action); + [Export ("runAction:")] + void RunAction (SKAction action); - [Async] - [Export ("runAction:completion:")] - void RunAction (SKAction action, Action completionHandler); + [Async] + [Export ("runAction:completion:")] + void RunAction (SKAction action, Action completionHandler); - [Export ("runAction:withKey:")] - void RunAction (SKAction action, string key); + [Export ("runAction:withKey:")] + void RunAction (SKAction action, string key); - [Export ("hasActions")] - bool HasActions { get; } + [Export ("hasActions")] + bool HasActions { get; } - [Export ("actionForKey:")] - [return: NullAllowed] - SKAction GetActionForKey (string key); + [Export ("actionForKey:")] + [return: NullAllowed] + SKAction GetActionForKey (string key); - [Export ("removeActionForKey:")] - void RemoveActionForKey (string key); + [Export ("removeActionForKey:")] + void RemoveActionForKey (string key); - [Export ("removeAllActions")] - void RemoveAllActions (); + [Export ("removeAllActions")] + void RemoveAllActions (); - [Export ("containsPoint:")] - bool ContainsPoint (CGPoint point); + [Export ("containsPoint:")] + bool ContainsPoint (CGPoint point); - [Export ("nodeAtPoint:")] - SKNode GetNodeAtPoint (CGPoint point); + [Export ("nodeAtPoint:")] + SKNode GetNodeAtPoint (CGPoint point); - [Export ("nodesAtPoint:")] - SKNode [] GetNodesAtPoint (CGPoint point); + [Export ("nodesAtPoint:")] + SKNode [] GetNodesAtPoint (CGPoint point); - [Export ("convertPoint:fromNode:")] - CGPoint ConvertPointFromNode (CGPoint point, SKNode sourceNode); + [Export ("convertPoint:fromNode:")] + CGPoint ConvertPointFromNode (CGPoint point, SKNode sourceNode); - [Export ("convertPoint:toNode:")] - CGPoint ConvertPointToNode (CGPoint point, SKNode sourceNode); + [Export ("convertPoint:toNode:")] + CGPoint ConvertPointToNode (CGPoint point, SKNode sourceNode); - [Export ("intersectsNode:")] - bool IntersectsNode (SKNode node); + [Export ("intersectsNode:")] + bool IntersectsNode (SKNode node); - [MacCatalyst (13, 1)] - [Export ("isEqualToNode:")] - bool IsEqual (SKNode node); + [MacCatalyst (13, 1)] + [Export ("isEqualToNode:")] + bool IsEqual (SKNode node); - [Export ("inParentHierarchy:")] - bool InParentHierarchy (SKNode node); + [Export ("inParentHierarchy:")] + bool InParentHierarchy (SKNode node); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("reachConstraints", ArgumentSemantic.Copy)] - SKReachConstraints ReachConstraints { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("reachConstraints", ArgumentSemantic.Copy)] + SKReachConstraints ReachConstraints { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("constraints", ArgumentSemantic.Copy)] - SKConstraint [] Constraints { get; set; } - - [MacCatalyst (13, 1)] - [Export ("objectForKeyedSubscript:")] - SKNode GetObjectsMatching (string nameExpression); - - [MacCatalyst (13, 1)] - [Export ("moveToParent:")] - void MoveToParent (SKNode parent); - - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodeBounds:")] - GKPolygonObstacle [] ObstaclesFromNodeBounds (SKNode [] nodes); - - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodePhysicsBodies:")] - GKPolygonObstacle [] ObstaclesFromNodePhysicsBodies (SKNode [] nodes); - - // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromSpriteTextures:accuracy:")] - GKPolygonObstacle [] ObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("constraints", ArgumentSemantic.Copy)] + SKConstraint [] Constraints { get; set; } + + [MacCatalyst (13, 1)] + [Export ("objectForKeyedSubscript:")] + SKNode GetObjectsMatching (string nameExpression); + + [MacCatalyst (13, 1)] + [Export ("moveToParent:")] + void MoveToParent (SKNode parent); + + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodeBounds:")] + GKPolygonObstacle [] ObstaclesFromNodeBounds (SKNode [] nodes); + + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodePhysicsBodies:")] + GKPolygonObstacle [] ObstaclesFromNodePhysicsBodies (SKNode [] nodes); + + // Moved from SpriteKit to GameplayKit header in iOS 10 beta 1 + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromSpriteTextures:accuracy:")] + GKPolygonObstacle [] ObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); #if !NET [Deprecated (PlatformName.iOS, 10, 0, message: "Attributes are only available for node classes supporting SKShader (see SKSpriteNode etc.).")] @@ -358,1496 +358,1496 @@ partial interface SKNode : NSSecureCoding, NSCopying, UIFocusItem, UIFocusItemCo void SetValue (SKAttributeValue value, string key); #endif - // Extensions from GameplayKit, inlined to avoid ugly static extension syntax - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromSpriteTextures:accuracy:")] - GKPolygonObstacle [] GetObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); - - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodeBounds:")] - GKPolygonObstacle [] GetObstaclesFromNodeBounds (SKNode [] nodes); - - [MacCatalyst (13, 1)] - [Static] - [Export ("obstaclesFromNodePhysicsBodies:")] - GKPolygonObstacle [] GetObstaclesFromNodePhysicsBodies (SKNode [] nodes); - } - - [NoiOS] - [NoTV] - [NoMacCatalyst] - [Category, BaseType (typeof (NSEvent))] - partial interface SKNodeEvent_NSEvent { - - [Export ("locationInNode:")] - CGPoint LocationInNode (SKNode node); - } - - /// Extension methods for that aide with conversion to Sprite Kit coordinates. - [NoMac] + // Extensions from GameplayKit, inlined to avoid ugly static extension syntax [MacCatalyst (13, 1)] - [Category, BaseType (typeof (UITouch))] - partial interface SKNodeTouches_UITouch { - - [Export ("locationInNode:")] - CGPoint LocationInNode (SKNode node); - - [Export ("previousLocationInNode:")] - CGPoint PreviousLocationInNode (SKNode node); - } + [Static] + [Export ("obstaclesFromSpriteTextures:accuracy:")] + GKPolygonObstacle [] GetObstaclesFromSpriteTextures (SKNode [] sprites, float accuracy); - /// An that applies a Core Graphics to its output. - /// - /// Application developers should ensure that is . - /// Note that is a subclass of . - /// - /// Apple documentation for SKEffectNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKEffectNode : SKWarpable { + [Static] + [Export ("obstaclesFromNodeBounds:")] + GKPolygonObstacle [] GetObstaclesFromNodeBounds (SKNode [] nodes); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("filter", ArgumentSemantic.Retain)] - CIFilter Filter { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("obstaclesFromNodePhysicsBodies:")] + GKPolygonObstacle [] GetObstaclesFromNodePhysicsBodies (SKNode [] nodes); +} - [Export ("shouldCenterFilter")] - bool ShouldCenterFilter { get; set; } +[NoiOS] +[NoTV] +[NoMacCatalyst] +[Category, BaseType (typeof (NSEvent))] +partial interface SKNodeEvent_NSEvent { - [Export ("shouldEnableEffects")] - bool ShouldEnableEffects { get; set; } + [Export ("locationInNode:")] + CGPoint LocationInNode (SKNode node); +} - [Export ("shouldRasterize")] - bool ShouldRasterize { get; set; } +/// Extension methods for that aide with conversion to Sprite Kit coordinates. +[NoMac] +[MacCatalyst (13, 1)] +[Category, BaseType (typeof (UITouch))] +partial interface SKNodeTouches_UITouch { - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } + [Export ("locationInNode:")] + CGPoint LocationInNode (SKNode node); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [Export ("previousLocationInNode:")] + CGPoint PreviousLocationInNode (SKNode node); +} - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } +/// An that applies a Core Graphics to its output. +/// +/// Application developers should ensure that is . +/// Note that is a subclass of . +/// +/// Apple documentation for SKEffectNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKEffectNode : SKWarpable { - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("filter", ArgumentSemantic.Retain)] + CIFilter Filter { get; set; } - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [Export ("shouldCenterFilter")] + bool ShouldCenterFilter { get; set; } - /// A method that derives a force by applying the physics of a field to a body that is within the field. - delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time); + [Export ("shouldEnableEffects")] + bool ShouldEnableEffects { get; set; } - /// Applies physics effects within a portion of a scene. - /// - /// Apple documentation for SKFieldNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKFieldNode { - [Export ("region", ArgumentSemantic.Retain)] - [NullAllowed] - SKRegion Region { get; set; } + [Export ("shouldRasterize")] + bool ShouldRasterize { get; set; } - [Export ("strength")] - float Strength { get; set; } /* float, not CGFloat */ + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - [Export ("falloff")] - float Falloff { get; set; } /* float, not CGFloat */ + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } - [Export ("minimumRadius")] + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - float MinimumRadius { get; set; } /* float, not CGFloat */ + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [Export ("exclusive")] - bool Exclusive { [Bind ("isExclusive")] get; set; } +/// A method that derives a force by applying the physics of a field to a body that is within the field. +delegate Vector3 SKFieldForceEvaluator (/* vector_float3 */ Vector4 position, /* vector_float3 */ Vector4 velocity, float /* float, not CGFloat */ mass, float /* float, not CGFloat */ charge, double time); - [Export ("categoryBitMask")] - uint CategoryBitMask { get; set; } /* uint32_t */ +/// Applies physics effects within a portion of a scene. +/// +/// Apple documentation for SKFieldNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKFieldNode { + [Export ("region", ArgumentSemantic.Retain)] + [NullAllowed] + SKRegion Region { get; set; } - [Export ("direction")] - /* This was typed as Vector4 since sizeof the native type (vector_float3) = 16 */ - Vector4 Direction { - [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] - set; - } + [Export ("strength")] + float Strength { get; set; } /* float, not CGFloat */ - [Export ("smoothness")] - float Smoothness { get; set; } /* float, not CGFloat */ + [Export ("falloff")] + float Falloff { get; set; } /* float, not CGFloat */ - [Export ("animationSpeed")] - float AnimationSpeed { get; set; } /* float, not CGFloat */ + [Export ("minimumRadius")] - [Export ("texture", ArgumentSemantic.Retain)] - [NullAllowed] - SKTexture Texture { get; set; } + float MinimumRadius { get; set; } /* float, not CGFloat */ - [Static, Export ("dragField")] - SKFieldNode CreateDragField (); + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } - [Static, Export ("vortexField")] - SKFieldNode CreateVortexField (); + [Export ("exclusive")] + bool Exclusive { [Bind ("isExclusive")] get; set; } - [Static, Export ("radialGravityField")] - SKFieldNode CreateRadialGravityField (); + [Export ("categoryBitMask")] + uint CategoryBitMask { get; set; } /* uint32_t */ - [Static, Export ("linearGravityFieldWithVector:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKFieldNode CreateLinearGravityField (/* vector_float3 */ Vector4 direction); + [Export ("direction")] + /* This was typed as Vector4 since sizeof the native type (vector_float3) = 16 */ + Vector4 Direction { + [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_vector_float3__", Library = "__Internal")] + set; + } - [Static, Export ("velocityFieldWithVector:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKFieldNode CreateVelocityField (/* vector_float3 */ Vector4 direction); + [Export ("smoothness")] + float Smoothness { get; set; } /* float, not CGFloat */ - [Static, Export ("velocityFieldWithTexture:")] - SKFieldNode CreateVelocityField (SKTexture velocityTexture); + [Export ("animationSpeed")] + float AnimationSpeed { get; set; } /* float, not CGFloat */ - [Static, Export ("noiseFieldWithSmoothness:animationSpeed:")] - SKFieldNode CreateNoiseField (nfloat smoothness, nfloat speed); + [Export ("texture", ArgumentSemantic.Retain)] + [NullAllowed] + SKTexture Texture { get; set; } - [Static, Export ("turbulenceFieldWithSmoothness:animationSpeed:")] - SKFieldNode CreateTurbulenceField (nfloat smoothness, nfloat speed); + [Static, Export ("dragField")] + SKFieldNode CreateDragField (); - [Static, Export ("springField")] - SKFieldNode CreateSpringField (); + [Static, Export ("vortexField")] + SKFieldNode CreateVortexField (); - [Static, Export ("electricField")] - SKFieldNode CreateElectricField (); + [Static, Export ("radialGravityField")] + SKFieldNode CreateRadialGravityField (); - [Static, Export ("magneticField")] - SKFieldNode CreateMagneticField (); + [Static, Export ("linearGravityFieldWithVector:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKFieldNode CreateLinearGravityField (/* vector_float3 */ Vector4 direction); - [Static, Export ("customFieldWithEvaluationBlock:")] - SKFieldNode CreateCustomField (SKFieldForceEvaluator evaluator); - } + [Static, Export ("velocityFieldWithVector:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKFieldNode CreateVelocityField (/* vector_float3 */ Vector4 direction); - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (SKEffectNode))] - interface SKScene - : GKSceneRootNodeType { - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); + [Static, Export ("velocityFieldWithTexture:")] + SKFieldNode CreateVelocityField (SKTexture velocityTexture); - [Static, Export ("sceneWithSize:")] - SKScene FromSize (CGSize size); + [Static, Export ("noiseFieldWithSmoothness:animationSpeed:")] + SKFieldNode CreateNoiseField (nfloat smoothness, nfloat speed); - [MacCatalyst (13, 1)] - [Export ("sceneDidLoad")] - void SceneDidLoad (); + [Static, Export ("turbulenceFieldWithSmoothness:animationSpeed:")] + SKFieldNode CreateTurbulenceField (nfloat smoothness, nfloat speed); - [Export ("size")] - CGSize Size { get; set; } + [Static, Export ("springField")] + SKFieldNode CreateSpringField (); - [Export ("scaleMode")] - SKSceneScaleMode ScaleMode { get; set; } + [Static, Export ("electricField")] + SKFieldNode CreateElectricField (); - [Export ("backgroundColor", ArgumentSemantic.Retain)] - UIColor BackgroundColor { get; set; } + [Static, Export ("magneticField")] + SKFieldNode CreateMagneticField (); - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } + [Static, Export ("customFieldWithEvaluationBlock:")] + SKFieldNode CreateCustomField (SKFieldForceEvaluator evaluator); +} - [Export ("physicsWorld")] - SKPhysicsWorld PhysicsWorld { get; } +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (SKEffectNode))] +interface SKScene + : GKSceneRootNodeType { + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [MacCatalyst (13, 1)] - [Export ("convertPointFromView:")] - CGPoint ConvertPointFromView (CGPoint point); + [Static, Export ("sceneWithSize:")] + SKScene FromSize (CGSize size); - [MacCatalyst (13, 1)] - [Export ("convertPointToView:")] - CGPoint ConvertPointToView (CGPoint point); + [MacCatalyst (13, 1)] + [Export ("sceneDidLoad")] + void SceneDidLoad (); - [MacCatalyst (13, 1)] - [Export ("view", ArgumentSemantic.Weak)] - [NullAllowed] - SKView View { get; } + [Export ("size")] + CGSize Size { get; set; } - [Export ("update:")] - void Update (double currentTime); + [Export ("scaleMode")] + SKSceneScaleMode ScaleMode { get; set; } - [Export ("didEvaluateActions")] - void DidEvaluateActions (); + [Export ("backgroundColor", ArgumentSemantic.Retain)] + UIColor BackgroundColor { get; set; } - [Export ("didSimulatePhysics")] - void DidSimulatePhysics (); + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } - [MacCatalyst (13, 1)] - [Export ("didMoveToView:")] - void DidMoveToView (SKView view); + [Export ("physicsWorld")] + SKPhysicsWorld PhysicsWorld { get; } - [MacCatalyst (13, 1)] - [Export ("willMoveFromView:")] - void WillMoveFromView (SKView view); + [MacCatalyst (13, 1)] + [Export ("convertPointFromView:")] + CGPoint ConvertPointFromView (CGPoint point); - [Export ("didChangeSize:")] - void DidChangeSize (CGSize oldSize); + [MacCatalyst (13, 1)] + [Export ("convertPointToView:")] + CGPoint ConvertPointToView (CGPoint point); - [MacCatalyst (13, 1)] - [Export ("didApplyConstraints")] - void DidApplyConstraints (); + [MacCatalyst (13, 1)] + [Export ("view", ArgumentSemantic.Weak)] + [NullAllowed] + SKView View { get; } - [MacCatalyst (13, 1)] - [Export ("didFinishUpdate")] - void DidFinishUpdate (); + [Export ("update:")] + void Update (double currentTime); - [MacCatalyst (13, 1)] - [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] - NSObject WeakDelegate { get; set; } + [Export ("didEvaluateActions")] + void DidEvaluateActions (); - [MacCatalyst (13, 1)] - [Wrap ("WeakDelegate")] - ISKSceneDelegate Delegate { get; set; } + [Export ("didSimulatePhysics")] + void DidSimulatePhysics (); - [MacCatalyst (13, 1)] - [Export ("audioEngine", ArgumentSemantic.Retain)] - AVAudioEngine AudioEngine { get; } + [MacCatalyst (13, 1)] + [Export ("didMoveToView:")] + void DidMoveToView (SKView view); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("camera", ArgumentSemantic.Weak)] - SKCameraNode Camera { get; set; } + [MacCatalyst (13, 1)] + [Export ("willMoveFromView:")] + void WillMoveFromView (SKView view); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("listener", ArgumentSemantic.Weak)] - SKNode Listener { get; set; } - } + [Export ("didChangeSize:")] + void DidChangeSize (CGSize oldSize); - /// Interface representing the required methods (if any) of the protocol . - /// - /// This interface contains the required methods (if any) from the protocol defined by . - /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. - /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. - /// - interface ISKSceneDelegate { } + [MacCatalyst (13, 1)] + [Export ("didApplyConstraints")] + void DidApplyConstraints (); - /// Delegate object for SKScene objects. Provides methods relating to animation events. - /// - /// Apple documentation for SKSceneDelegate [MacCatalyst (13, 1)] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface SKSceneDelegate { - [Export ("update:forScene:")] - void Update (double currentTime, SKScene scene); + [Export ("didFinishUpdate")] + void DidFinishUpdate (); - [Export ("didEvaluateActionsForScene:")] - void DidEvaluateActions (SKScene scene); + [MacCatalyst (13, 1)] + [Export ("delegate", ArgumentSemantic.Weak), NullAllowed] + NSObject WeakDelegate { get; set; } - [Export ("didSimulatePhysicsForScene:")] - void DidSimulatePhysics (SKScene scene); + [MacCatalyst (13, 1)] + [Wrap ("WeakDelegate")] + ISKSceneDelegate Delegate { get; set; } - [Export ("didApplyConstraintsForScene:")] - void DidApplyConstraints (SKScene scene); + [MacCatalyst (13, 1)] + [Export ("audioEngine", ArgumentSemantic.Retain)] + AVAudioEngine AudioEngine { get; } - [Export ("didFinishUpdateForScene:")] - void DidFinishUpdate (SKScene scene); - } + [MacCatalyst (13, 1)] + [NullAllowed, Export ("camera", ArgumentSemantic.Weak)] + SKCameraNode Camera { get; set; } - /// An OpenGL ES fragment shader. - /// - /// Apple documentation for SKShader [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKShader : NSCopying, NSSecureCoding { - [Export ("initWithSource:")] - NativeHandle Constructor (string shaderSourceCode); + [NullAllowed, Export ("listener", ArgumentSemantic.Weak)] + SKNode Listener { get; set; } +} - [Export ("initWithSource:uniforms:")] - NativeHandle Constructor (string sharedSourceCode, SKUniform [] uniforms); +/// Interface representing the required methods (if any) of the protocol . +/// +/// This interface contains the required methods (if any) from the protocol defined by . +/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. +/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. +/// +interface ISKSceneDelegate { } + +/// Delegate object for SKScene objects. Provides methods relating to animation events. +/// +/// Apple documentation for SKSceneDelegate +[MacCatalyst (13, 1)] +[Protocol, Model] +[BaseType (typeof (NSObject))] +interface SKSceneDelegate { + [Export ("update:forScene:")] + void Update (double currentTime, SKScene scene); + + [Export ("didEvaluateActionsForScene:")] + void DidEvaluateActions (SKScene scene); + + [Export ("didSimulatePhysicsForScene:")] + void DidSimulatePhysics (SKScene scene); + + [Export ("didApplyConstraintsForScene:")] + void DidApplyConstraints (SKScene scene); + + [Export ("didFinishUpdateForScene:")] + void DidFinishUpdate (SKScene scene); +} - [NullAllowed] // by default this property is null - [Export ("source")] - string Source { get; set; } +/// An OpenGL ES fragment shader. +/// +/// Apple documentation for SKShader +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKShader : NSCopying, NSSecureCoding { + [Export ("initWithSource:")] + NativeHandle Constructor (string shaderSourceCode); - // @property (copy) NSArray * uniforms; - [Export ("uniforms", ArgumentSemantic.Copy)] - SKUniform [] Uniforms { get; set; } + [Export ("initWithSource:uniforms:")] + NativeHandle Constructor (string sharedSourceCode, SKUniform [] uniforms); - // @required + (instancetype)shader; - [Static, Export ("shader")] - SKShader Create (); + [NullAllowed] // by default this property is null + [Export ("source")] + string Source { get; set; } - [Static, Export ("shaderWithSource:")] - SKShader FromShaderSourceCode (string source); + // @property (copy) NSArray * uniforms; + [Export ("uniforms", ArgumentSemantic.Copy)] + SKUniform [] Uniforms { get; set; } - [Static, Export ("shaderWithSource:uniforms:")] - SKShader FromShaderSourceCode (string source, SKUniform [] uniforms); + // @required + (instancetype)shader; + [Static, Export ("shader")] + SKShader Create (); - [Static, Export ("shaderWithFileNamed:")] - SKShader FromFile (string name); + [Static, Export ("shaderWithSource:")] + SKShader FromShaderSourceCode (string source); - [Export ("addUniform:")] - void AddUniform (SKUniform uniform); + [Static, Export ("shaderWithSource:uniforms:")] + SKShader FromShaderSourceCode (string source, SKUniform [] uniforms); - [Export ("uniformNamed:")] - [return: NullAllowed] - SKUniform GetUniform (string uniformName); + [Static, Export ("shaderWithFileNamed:")] + SKShader FromFile (string name); - [Export ("removeUniformNamed:")] - void RemoveUniform (string uniforName); + [Export ("addUniform:")] + void AddUniform (SKUniform uniform); - [MacCatalyst (13, 1)] - [Export ("attributes", ArgumentSemantic.Copy)] - SKAttribute [] Attributes { get; set; } - } + [Export ("uniformNamed:")] + [return: NullAllowed] + SKUniform GetUniform (string uniformName); - /// A that displays a textured, colored sprite. - /// - /// Apple documentation for SKSpriteNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKSpriteNode : SKWarpable { + [Export ("removeUniformNamed:")] + void RemoveUniform (string uniforName); - [Static, Export ("spriteNodeWithTexture:size:")] - SKSpriteNode FromTexture ([NullAllowed] SKTexture texture, CGSize size); + [MacCatalyst (13, 1)] + [Export ("attributes", ArgumentSemantic.Copy)] + SKAttribute [] Attributes { get; set; } +} - [Static, Export ("spriteNodeWithTexture:")] - SKSpriteNode FromTexture ([NullAllowed] SKTexture texture); +/// A that displays a textured, colored sprite. +/// +/// Apple documentation for SKSpriteNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKSpriteNode : SKWarpable { - [Static, Export ("spriteNodeWithImageNamed:")] - SKSpriteNode FromImageNamed (string name); + [Static, Export ("spriteNodeWithTexture:size:")] + SKSpriteNode FromTexture ([NullAllowed] SKTexture texture, CGSize size); - [Static, Export ("spriteNodeWithColor:size:")] - SKSpriteNode FromColor (UIColor color, CGSize size); + [Static, Export ("spriteNodeWithTexture:")] + SKSpriteNode FromTexture ([NullAllowed] SKTexture texture); - [DesignatedInitializer] - [Export ("initWithTexture:color:size:")] - NativeHandle Constructor ([NullAllowed] SKTexture texture, UIColor color, CGSize size); + [Static, Export ("spriteNodeWithImageNamed:")] + SKSpriteNode FromImageNamed (string name); - [Export ("initWithTexture:")] - NativeHandle Constructor ([NullAllowed] SKTexture texture); + [Static, Export ("spriteNodeWithColor:size:")] + SKSpriteNode FromColor (UIColor color, CGSize size); - // can't be null -> crash - [Export ("initWithImageNamed:")] - NativeHandle Constructor (string name); + [DesignatedInitializer] + [Export ("initWithTexture:color:size:")] + NativeHandle Constructor ([NullAllowed] SKTexture texture, UIColor color, CGSize size); - [Export ("initWithColor:size:")] - NativeHandle Constructor (UIColor color, CGSize size); + [Export ("initWithTexture:")] + NativeHandle Constructor ([NullAllowed] SKTexture texture); - [Export ("texture", ArgumentSemantic.Retain)] - [NullAllowed] - SKTexture Texture { get; set; } + // can't be null -> crash + [Export ("initWithImageNamed:")] + NativeHandle Constructor (string name); - [Export ("centerRect")] - CGRect CenterRect { get; set; } + [Export ("initWithColor:size:")] + NativeHandle Constructor (UIColor color, CGSize size); - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("texture", ArgumentSemantic.Retain)] + [NullAllowed] + SKTexture Texture { get; set; } - [Export ("color", ArgumentSemantic.Retain)] - [NullAllowed] // it's actually null-resetable (see unit tests) - UIColor Color { get; set; } + [Export ("centerRect")] + CGRect CenterRect { get; set; } - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } + [Export ("color", ArgumentSemantic.Retain)] + [NullAllowed] // it's actually null-resetable (see unit tests) + UIColor Color { get; set; } - [Export ("size")] - CGSize Size { get; set; } + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - // - // iOS 8 - // + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } + [Export ("size")] + CGSize Size { get; set; } - [MacCatalyst (13, 1)] - [Static, Export ("spriteNodeWithTexture:normalMap:")] - SKSpriteNode Create ([NullAllowed] SKTexture texture, [NullAllowed] SKTexture normalMap); + // + // iOS 8 + // - [MacCatalyst (13, 1)] - [Static, Export ("spriteNodeWithImageNamed:normalMapped:")] - SKSpriteNode Create (string imageName, bool generateNormalMap); - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("normalTexture", ArgumentSemantic.Retain)] - SKTexture NormalTexture { get; set; } + [MacCatalyst (13, 1)] + [Static, Export ("spriteNodeWithTexture:normalMap:")] + SKSpriteNode Create ([NullAllowed] SKTexture texture, [NullAllowed] SKTexture normalMap); - [MacCatalyst (13, 1)] - [Export ("lightingBitMask")] - uint LightingBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static, Export ("spriteNodeWithImageNamed:normalMapped:")] + SKSpriteNode Create (string imageName, bool generateNormalMap); - [MacCatalyst (13, 1)] - [Export ("shadowCastBitMask")] - uint ShadowCastBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("normalTexture", ArgumentSemantic.Retain)] + SKTexture NormalTexture { get; set; } - [MacCatalyst (13, 1)] - [Export ("shadowedBitMask")] - uint ShadowedBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Export ("lightingBitMask")] + uint LightingBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("shader", ArgumentSemantic.Retain), NullAllowed] - SKShader Shader { get; set; } + [MacCatalyst (13, 1)] + [Export ("shadowCastBitMask")] + uint ShadowCastBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("scaleToSize:")] - void ScaleTo (CGSize size); + [MacCatalyst (13, 1)] + [Export ("shadowedBitMask")] + uint ShadowedBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + [MacCatalyst (13, 1)] + [Export ("shader", ArgumentSemantic.Retain), NullAllowed] + SKShader Shader { get; set; } - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [MacCatalyst (13, 1)] + [Export ("scaleToSize:")] + void ScaleTo (CGSize size); - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - /// An object that can control the properties of particles emitted by a . - /// - /// The total time of the sequence is normalized from 0.0 to 1.0. - /// - /// - /// - /// - /// - /// Apple documentation for SKKeyframeSequence [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - partial interface SKKeyframeSequence : NSSecureCoding, NSCopying { + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [DesignatedInitializer] - [Export ("initWithKeyframeValues:times:")] - [Internal] - NativeHandle Constructor ([NullAllowed] NSObject [] values, [NullAllowed] NSArray times); + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [Export ("initWithCapacity:")] - NativeHandle Constructor (nuint numItems); +/// An object that can control the properties of particles emitted by a . +/// +/// The total time of the sequence is normalized from 0.0 to 1.0. +/// +/// +/// +/// +/// +/// Apple documentation for SKKeyframeSequence +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +partial interface SKKeyframeSequence : NSSecureCoding, NSCopying { + + [DesignatedInitializer] + [Export ("initWithKeyframeValues:times:")] + [Internal] + NativeHandle Constructor ([NullAllowed] NSObject [] values, [NullAllowed] NSArray times); - [Export ("count")] - nuint Count { get; } + [Export ("initWithCapacity:")] + NativeHandle Constructor (nuint numItems); - [Export ("addKeyframeValue:time:")] - void AddKeyframeValue (NSObject value, nfloat time); + [Export ("count")] + nuint Count { get; } - [Export ("removeLastKeyframe")] - void RemoveLastKeyframe (); + [Export ("addKeyframeValue:time:")] + void AddKeyframeValue (NSObject value, nfloat time); - [Export ("removeKeyframeAtIndex:")] - void RemoveKeyframe (nuint index); + [Export ("removeLastKeyframe")] + void RemoveLastKeyframe (); - [Export ("setKeyframeValue:forIndex:")] - void SetKeyframeValue (NSObject value, nuint index); + [Export ("removeKeyframeAtIndex:")] + void RemoveKeyframe (nuint index); - [Export ("setKeyframeTime:forIndex:")] - void SetKeyframeTime (nfloat time, nuint index); + [Export ("setKeyframeValue:forIndex:")] + void SetKeyframeValue (NSObject value, nuint index); - [Export ("setKeyframeValue:time:forIndex:")] - void SetKeyframeValue (NSObject value, nfloat time, nuint index); + [Export ("setKeyframeTime:forIndex:")] + void SetKeyframeTime (nfloat time, nuint index); - [Export ("getKeyframeValueForIndex:")] - NSObject GetKeyframeValue (nuint index); + [Export ("setKeyframeValue:time:forIndex:")] + void SetKeyframeValue (NSObject value, nfloat time, nuint index); - [Export ("getKeyframeTimeForIndex:")] - nfloat GetKeyframeTime (nuint index); + [Export ("getKeyframeValueForIndex:")] + NSObject GetKeyframeValue (nuint index); - [Export ("sampleAtTime:")] - [return: NullAllowed] - NSObject SampleAtTime (nfloat time); + [Export ("getKeyframeTimeForIndex:")] + nfloat GetKeyframeTime (nuint index); - [Export ("interpolationMode")] - SKInterpolationMode InterpolationMode { get; set; } + [Export ("sampleAtTime:")] + [return: NullAllowed] + NSObject SampleAtTime (nfloat time); - [Export ("repeatMode")] - SKRepeatMode RepeatMode { get; set; } - } + [Export ("interpolationMode")] + SKInterpolationMode InterpolationMode { get; set; } - /// A that produces colored and textured particles. - /// - /// Emitted particles are not directly accessible to the application developer; their behavior can be controlled either via the creation parameters configurable in or by a . - /// - /// Apple documentation for SKEmitterNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKEmitterNode { + [Export ("repeatMode")] + SKRepeatMode RepeatMode { get; set; } +} - [Export ("advanceSimulationTime:")] - void AdvanceSimulationTime (double sec); +/// A that produces colored and textured particles. +/// +/// Emitted particles are not directly accessible to the application developer; their behavior can be controlled either via the creation parameters configurable in or by a . +/// +/// Apple documentation for SKEmitterNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKEmitterNode { - [Export ("resetSimulation")] - void ResetSimulation (); + [Export ("advanceSimulationTime:")] + void AdvanceSimulationTime (double sec); - [NullAllowed] // by default this property is null - [Export ("particleTexture", ArgumentSemantic.Retain)] - SKTexture ParticleTexture { get; set; } + [Export ("resetSimulation")] + void ResetSimulation (); - [Export ("particleZPosition")] - nfloat ParticleZPosition { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleTexture", ArgumentSemantic.Retain)] + SKTexture ParticleTexture { get; set; } - [Deprecated (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.TvOS, 8, 0)] - [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("particleZPositionRange")] - nfloat ParticleZPositionRange { get; set; } + [Export ("particleZPosition")] + nfloat ParticleZPosition { get; set; } - [Export ("particleBlendMode")] - SKBlendMode ParticleBlendMode { get; set; } + [Deprecated (PlatformName.iOS, 8, 0)] + [Deprecated (PlatformName.TvOS, 8, 0)] + [Deprecated (PlatformName.MacOSX, 10, 10)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("particleZPositionRange")] + nfloat ParticleZPositionRange { get; set; } - [Export ("particleColor", ArgumentSemantic.Retain)] - UIColor ParticleColor { get; set; } + [Export ("particleBlendMode")] + SKBlendMode ParticleBlendMode { get; set; } - [Export ("particleColorRedRange")] - nfloat ParticleColorRedRange { get; set; } + [Export ("particleColor", ArgumentSemantic.Retain)] + UIColor ParticleColor { get; set; } - [Export ("particleColorGreenRange")] - nfloat ParticleColorGreenRange { get; set; } + [Export ("particleColorRedRange")] + nfloat ParticleColorRedRange { get; set; } - [Export ("particleColorBlueRange")] - nfloat ParticleColorBlueRange { get; set; } + [Export ("particleColorGreenRange")] + nfloat ParticleColorGreenRange { get; set; } - [Export ("particleColorAlphaRange")] - nfloat ParticleColorAlphaRange { get; set; } + [Export ("particleColorBlueRange")] + nfloat ParticleColorBlueRange { get; set; } - [Export ("particleColorRedSpeed")] - nfloat ParticleColorRedSpeed { get; set; } + [Export ("particleColorAlphaRange")] + nfloat ParticleColorAlphaRange { get; set; } - [Export ("particleColorGreenSpeed")] - nfloat ParticleColorGreenSpeed { get; set; } + [Export ("particleColorRedSpeed")] + nfloat ParticleColorRedSpeed { get; set; } - [Export ("particleColorBlueSpeed")] - nfloat ParticleColorBlueSpeed { get; set; } + [Export ("particleColorGreenSpeed")] + nfloat ParticleColorGreenSpeed { get; set; } - [Export ("particleColorAlphaSpeed")] - nfloat ParticleColorAlphaSpeed { get; set; } + [Export ("particleColorBlueSpeed")] + nfloat ParticleColorBlueSpeed { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleColorSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleColorSequence { get; set; } + [Export ("particleColorAlphaSpeed")] + nfloat ParticleColorAlphaSpeed { get; set; } - [Export ("particleColorBlendFactor")] - nfloat ParticleColorBlendFactor { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleColorSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleColorSequence { get; set; } - [Export ("particleColorBlendFactorRange")] - nfloat ParticleColorBlendFactorRange { get; set; } + [Export ("particleColorBlendFactor")] + nfloat ParticleColorBlendFactor { get; set; } - [Export ("particleColorBlendFactorSpeed")] - nfloat ParticleColorBlendFactorSpeed { get; set; } + [Export ("particleColorBlendFactorRange")] + nfloat ParticleColorBlendFactorRange { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleColorBlendFactorSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleColorBlendFactorSequence { get; set; } + [Export ("particleColorBlendFactorSpeed")] + nfloat ParticleColorBlendFactorSpeed { get; set; } - [Export ("particlePosition")] - CGPoint ParticlePosition { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleColorBlendFactorSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleColorBlendFactorSequence { get; set; } - [Export ("particlePositionRange")] - CGVector ParticlePositionRange { get; set; } + [Export ("particlePosition")] + CGPoint ParticlePosition { get; set; } - [Export ("particleSpeed")] - nfloat ParticleSpeed { get; set; } + [Export ("particlePositionRange")] + CGVector ParticlePositionRange { get; set; } - [Export ("particleSpeedRange")] - nfloat ParticleSpeedRange { get; set; } + [Export ("particleSpeed")] + nfloat ParticleSpeed { get; set; } - [Export ("emissionAngle")] - nfloat EmissionAngle { get; set; } + [Export ("particleSpeedRange")] + nfloat ParticleSpeedRange { get; set; } - [Export ("emissionAngleRange")] - nfloat EmissionAngleRange { get; set; } + [Export ("emissionAngle")] + nfloat EmissionAngle { get; set; } - [Export ("xAcceleration")] - nfloat XAcceleration { get; set; } + [Export ("emissionAngleRange")] + nfloat EmissionAngleRange { get; set; } - [Export ("yAcceleration")] - nfloat YAcceleration { get; set; } + [Export ("xAcceleration")] + nfloat XAcceleration { get; set; } - [Export ("particleBirthRate")] - nfloat ParticleBirthRate { get; set; } + [Export ("yAcceleration")] + nfloat YAcceleration { get; set; } - [Export ("numParticlesToEmit")] - nuint NumParticlesToEmit { get; set; } + [Export ("particleBirthRate")] + nfloat ParticleBirthRate { get; set; } - [Export ("particleLifetime")] - nfloat ParticleLifetime { get; set; } + [Export ("numParticlesToEmit")] + nuint NumParticlesToEmit { get; set; } - [Export ("particleLifetimeRange")] - nfloat ParticleLifetimeRange { get; set; } + [Export ("particleLifetime")] + nfloat ParticleLifetime { get; set; } - [Export ("particleRotation")] - nfloat ParticleRotation { get; set; } + [Export ("particleLifetimeRange")] + nfloat ParticleLifetimeRange { get; set; } - [Export ("particleRotationRange")] - nfloat ParticleRotationRange { get; set; } + [Export ("particleRotation")] + nfloat ParticleRotation { get; set; } - [Export ("particleRotationSpeed")] - nfloat ParticleRotationSpeed { get; set; } + [Export ("particleRotationRange")] + nfloat ParticleRotationRange { get; set; } - [Export ("particleSize")] - CGSize ParticleSize { get; set; } + [Export ("particleRotationSpeed")] + nfloat ParticleRotationSpeed { get; set; } - [Export ("particleScale")] - nfloat ParticleScale { get; set; } + [Export ("particleSize")] + CGSize ParticleSize { get; set; } - [Export ("particleScaleRange")] - nfloat ParticleScaleRange { get; set; } + [Export ("particleScale")] + nfloat ParticleScale { get; set; } - [Export ("particleScaleSpeed")] - nfloat ParticleScaleSpeed { get; set; } + [Export ("particleScaleRange")] + nfloat ParticleScaleRange { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleScaleSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleScaleSequence { get; set; } + [Export ("particleScaleSpeed")] + nfloat ParticleScaleSpeed { get; set; } - [Export ("particleAlpha")] - nfloat ParticleAlpha { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleScaleSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleScaleSequence { get; set; } - [Export ("particleAlphaRange")] - nfloat ParticleAlphaRange { get; set; } + [Export ("particleAlpha")] + nfloat ParticleAlpha { get; set; } - [Export ("particleAlphaSpeed")] - nfloat ParticleAlphaSpeed { get; set; } + [Export ("particleAlphaRange")] + nfloat ParticleAlphaRange { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleAlphaSequence", ArgumentSemantic.Retain)] - SKKeyframeSequence ParticleAlphaSequence { get; set; } + [Export ("particleAlphaSpeed")] + nfloat ParticleAlphaSpeed { get; set; } - [NullAllowed] // by default this property is null - [Export ("particleAction", ArgumentSemantic.Copy)] - SKAction ParticleAction { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleAlphaSequence", ArgumentSemantic.Retain)] + SKKeyframeSequence ParticleAlphaSequence { get; set; } - [NullAllowed] // by default this property is null - [Export ("targetNode", ArgumentSemantic.Weak)] - SKNode TargetNode { get; set; } - - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Export ("fieldBitMask")] - uint FieldBitMask { get; set; } /* uint32_t */ - - [Deprecated (PlatformName.iOS, 8, 0)] - [Deprecated (PlatformName.TvOS, 8, 0)] - [Deprecated (PlatformName.MacOSX, 10, 10)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("particleZPositionSpeed")] - nfloat ParticleZPositionSpeed { get; set; } - - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [NullAllowed] // by default this property is null + [Export ("particleAction", ArgumentSemantic.Copy)] + SKAction ParticleAction { get; set; } - [MacCatalyst (13, 1)] - [Export ("particleRenderOrder", ArgumentSemantic.Assign)] - SKParticleRenderOrder ParticleRenderOrder { get; set; } + [NullAllowed] // by default this property is null + [Export ("targetNode", ArgumentSemantic.Weak)] + SKNode TargetNode { get; set; } - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + // + // iOS 8 + // + [MacCatalyst (13, 1)] + [Export ("fieldBitMask")] + uint FieldBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); + [Deprecated (PlatformName.iOS, 8, 0)] + [Deprecated (PlatformName.TvOS, 8, 0)] + [Deprecated (PlatformName.MacOSX, 10, 10)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("particleZPositionSpeed")] + nfloat ParticleZPositionSpeed { get; set; } - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } - /// A defined by a Core Graphics . - /// - /// Apple documentation for SKShapeNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKShapeNode { + [Export ("particleRenderOrder", ArgumentSemantic.Assign)] + SKParticleRenderOrder ParticleRenderOrder { get; set; } - [NullAllowed] - [Export ("path")] - CGPath Path { get; set; } + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [Export ("strokeColor", ArgumentSemantic.Retain)] - UIColor StrokeColor { get; set; } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [Export ("fillColor", ArgumentSemantic.Retain)] - UIColor FillColor { get; set; } + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } +/// A defined by a Core Graphics . +/// +/// Apple documentation for SKShapeNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKShapeNode { - [Export ("antialiased")] - bool Antialiased { [Bind ("isAntialiased")] get; set; } + [NullAllowed] + [Export ("path")] + CGPath Path { get; set; } - [Export ("lineWidth")] - nfloat LineWidth { get; set; } + [Export ("strokeColor", ArgumentSemantic.Retain)] + UIColor StrokeColor { get; set; } - [Export ("glowWidth")] - nfloat GlowWidth { get; set; } + [Export ("fillColor", ArgumentSemantic.Retain)] + UIColor FillColor { get; set; } - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("fillTexture", ArgumentSemantic.Retain)] - SKTexture FillTexture { get; set; } + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("fillShader", ArgumentSemantic.Retain)] - SKShader FillShader { get; set; } + [Export ("antialiased")] + bool Antialiased { [Bind ("isAntialiased")] get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("strokeTexture", ArgumentSemantic.Retain)] - SKTexture StrokeTexture { get; set; } + [Export ("lineWidth")] + nfloat LineWidth { get; set; } - [MacCatalyst (13, 1)] - [NullAllowed] // by default this property is null - [Export ("strokeShader", ArgumentSemantic.Retain)] - SKShader StrokeShader { get; set; } - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPath:")] - SKShapeNode FromPath (CGPath path); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPath:centered:")] - SKShapeNode FromPath (CGPath path, bool centered); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRect:")] - SKShapeNode FromRect (CGRect rect); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRectOfSize:")] - SKShapeNode FromRect (CGSize size); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRect:cornerRadius:")] - SKShapeNode FromRect (CGRect rect, nfloat cornerRadius); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithRectOfSize:cornerRadius:")] - SKShapeNode FromRect (CGSize size, nfloat cornerRadius); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithCircleOfRadius:")] - SKShapeNode FromCircle (nfloat radius); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithEllipseInRect:")] - SKShapeNode FromEllipse (CGRect rect); - - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithEllipseOfSize:")] - SKShapeNode FromEllipse (CGSize size); - - // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 - [Internal] - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithPoints:count:")] - SKShapeNode FromPoints (ref CGPoint points, nuint numPoints); - - // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 - [Internal] - [MacCatalyst (13, 1)] - [Static, Export ("shapeNodeWithSplinePoints:count:")] - SKShapeNode FromSplinePoints (ref CGPoint points, nuint numPoints); - - [MacCatalyst (13, 1)] - [Export ("lineCap")] - CGLineCap LineCap { get; set; } - - [MacCatalyst (13, 1)] - [Export ("lineJoin")] - CGLineJoin LineJoin { get; set; } - - [MacCatalyst (13, 1)] - [Export ("miterLimit")] - nfloat MiterLimit { get; set; } - - [MacCatalyst (13, 1)] - [Export ("lineLength")] - nfloat LineLength { get; } - - [MacCatalyst (13, 1)] - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } - - [MacCatalyst (13, 1)] - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); - - [MacCatalyst (13, 1)] - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [Export ("glowWidth")] + nfloat GlowWidth { get; set; } - /// A range of motion used with inverse kinematics. - /// - /// Apple documentation for SKReachConstraints + // + // iOS 8 + // [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKReachConstraints : NSSecureCoding { - [DesignatedInitializer] - [Export ("initWithLowerAngleLimit:upperAngleLimit:")] - NativeHandle Constructor (nfloat lowerAngleLimit, nfloat upperAngleLimit); + [NullAllowed] // by default this property is null + [Export ("fillTexture", ArgumentSemantic.Retain)] + SKTexture FillTexture { get; set; } - [Export ("lowerAngleLimit", ArgumentSemantic.UnsafeUnretained)] - nfloat LowerAngleLimit { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("fillShader", ArgumentSemantic.Retain)] + SKShader FillShader { get; set; } - [Export ("upperAngleLimit", ArgumentSemantic.UnsafeUnretained)] - nfloat UpperAngleLimit { get; set; } - } + [MacCatalyst (13, 1)] + [NullAllowed] // by default this property is null + [Export ("strokeTexture", ArgumentSemantic.Retain)] + SKTexture StrokeTexture { get; set; } - /// A path-defined area. Typically used for hit-testing and physics-field extents. - /// - /// Apple documentation for SKRegion [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKRegion : NSCopying, NSSecureCoding { - [Export ("initWithRadius:")] - NativeHandle Constructor (float /* float, not CGFloat */ radius); + [NullAllowed] // by default this property is null + [Export ("strokeShader", ArgumentSemantic.Retain)] + SKShader StrokeShader { get; set; } - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithPath:")] + SKShapeNode FromPath (CGPath path); - [Export ("initWithPath:")] - NativeHandle Constructor (CGPath path); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithPath:centered:")] + SKShapeNode FromPath (CGPath path, bool centered); - [Export ("path")] - [NullAllowed] - CGPath Path { get; } + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRect:")] + SKShapeNode FromRect (CGRect rect); - [Static, Export ("infiniteRegion")] - SKRegion InfiniteRegion { get; } + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRectOfSize:")] + SKShapeNode FromRect (CGSize size); - [Export ("inverseRegion")] - SKRegion InverseRegion (); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRect:cornerRadius:")] + SKShapeNode FromRect (CGRect rect, nfloat cornerRadius); - [Export ("regionByUnionWithRegion:")] - SKRegion CreateUnion (SKRegion region); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithRectOfSize:cornerRadius:")] + SKShapeNode FromRect (CGSize size, nfloat cornerRadius); - [Export ("regionByDifferenceFromRegion:")] - SKRegion CreateDifference (SKRegion region); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithCircleOfRadius:")] + SKShapeNode FromCircle (nfloat radius); - [Export ("regionByIntersectionWithRegion:")] - SKRegion CreateIntersection (SKRegion region); + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithEllipseInRect:")] + SKShapeNode FromEllipse (CGRect rect); - [Export ("containsPoint:")] - bool ContainsPoint (CGPoint point); - } + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithEllipseOfSize:")] + SKShapeNode FromEllipse (CGSize size); - /// A that displays a string. - /// - /// Apple documentation for SKLabelNode + // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 + [Internal] [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKLabelNode { + [Static, Export ("shapeNodeWithPoints:count:")] + SKShapeNode FromPoints (ref CGPoint points, nuint numPoints); - [Static, Export ("labelNodeWithFontNamed:")] - SKLabelNode FromFont ([NullAllowed] string fontName); + // Hide this ugly api fixes https://bugzilla.xamarin.com/show_bug.cgi?id=39706 + [Internal] + [MacCatalyst (13, 1)] + [Static, Export ("shapeNodeWithSplinePoints:count:")] + SKShapeNode FromSplinePoints (ref CGPoint points, nuint numPoints); - [Export ("initWithFontNamed:")] - NativeHandle Constructor ([NullAllowed] string fontName); + [MacCatalyst (13, 1)] + [Export ("lineCap")] + CGLineCap LineCap { get; set; } - [MacCatalyst (13, 1)] - [Static, Export ("labelNodeWithText:")] - SKLabelNode FromText ([NullAllowed] string text); + [MacCatalyst (13, 1)] + [Export ("lineJoin")] + CGLineJoin LineJoin { get; set; } - [MacCatalyst (13, 1)] - [Static] - [Export ("labelNodeWithAttributedText:")] - SKLabelNode FromText ([NullAllowed] NSAttributedString attributedText); + [MacCatalyst (13, 1)] + [Export ("miterLimit")] + nfloat MiterLimit { get; set; } - [Export ("verticalAlignmentMode")] - SKLabelVerticalAlignmentMode VerticalAlignmentMode { get; set; } + [MacCatalyst (13, 1)] + [Export ("lineLength")] + nfloat LineLength { get; } - [Export ("horizontalAlignmentMode")] - SKLabelHorizontalAlignmentMode HorizontalAlignmentMode { get; set; } + [MacCatalyst (13, 1)] + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - [MacCatalyst (13, 1)] - [Export ("numberOfLines")] - nint NumberOfLines { get; set; } + [MacCatalyst (13, 1)] + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [MacCatalyst (13, 1)] - [Export ("lineBreakMode", ArgumentSemantic.Assign)] - NSLineBreakMode LineBreakMode { get; set; } + [MacCatalyst (13, 1)] + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [MacCatalyst (13, 1)] - [Export ("preferredMaxLayoutWidth")] - nfloat PreferredMaxLayoutWidth { get; set; } +/// A range of motion used with inverse kinematics. +/// +/// Apple documentation for SKReachConstraints +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKReachConstraints : NSSecureCoding { + [DesignatedInitializer] + [Export ("initWithLowerAngleLimit:upperAngleLimit:")] + NativeHandle Constructor (nfloat lowerAngleLimit, nfloat upperAngleLimit); + + [Export ("lowerAngleLimit", ArgumentSemantic.UnsafeUnretained)] + nfloat LowerAngleLimit { get; set; } + + [Export ("upperAngleLimit", ArgumentSemantic.UnsafeUnretained)] + nfloat UpperAngleLimit { get; set; } +} - [Export ("fontName", ArgumentSemantic.Copy)] - [NullAllowed] - string FontName { get; set; } +/// A path-defined area. Typically used for hit-testing and physics-field extents. +/// +/// Apple documentation for SKRegion +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKRegion : NSCopying, NSSecureCoding { + [Export ("initWithRadius:")] + NativeHandle Constructor (float /* float, not CGFloat */ radius); - [Export ("text", ArgumentSemantic.Copy)] - [NullAllowed] // nullable in Xcode7 headers and caught by introspection tests - string Text { get; set; } + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [MacCatalyst (13, 1)] - [NullAllowed, Export ("attributedText", ArgumentSemantic.Copy)] - NSAttributedString AttributedText { get; set; } + [Export ("initWithPath:")] + NativeHandle Constructor (CGPath path); - [Export ("fontSize")] - nfloat FontSize { get; set; } + [Export ("path")] + [NullAllowed] + CGPath Path { get; } - [Export ("fontColor", ArgumentSemantic.Retain)] - [NullAllowed] - UIColor FontColor { get; set; } + [Static, Export ("infiniteRegion")] + SKRegion InfiniteRegion { get; } - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("inverseRegion")] + SKRegion InverseRegion (); - [NullAllowed] // by default this property is null - [Export ("color", ArgumentSemantic.Retain)] - UIColor Color { get; set; } + [Export ("regionByUnionWithRegion:")] + SKRegion CreateUnion (SKRegion region); - [Export ("blendMode")] - SKBlendMode BlendMode { get; set; } - } + [Export ("regionByDifferenceFromRegion:")] + SKRegion CreateDifference (SKRegion region); - /// A node that creates a lighting effect within a scene. - /// - /// Apple documentation for SKLightNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKLightNode { - [Export ("enabled")] - bool Enabled { [Bind ("isEnabled")] get; set; } + [Export ("regionByIntersectionWithRegion:")] + SKRegion CreateIntersection (SKRegion region); - [Export ("lightColor")] - UIColor LightColor { get; set; } + [Export ("containsPoint:")] + bool ContainsPoint (CGPoint point); +} - [Export ("ambientColor")] - UIColor AmbientColor { get; set; } +/// A that displays a string. +/// +/// Apple documentation for SKLabelNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKLabelNode { - [Export ("shadowColor")] - UIColor ShadowColor { get; set; } + [Static, Export ("labelNodeWithFontNamed:")] + SKLabelNode FromFont ([NullAllowed] string fontName); - [Export ("falloff")] - nfloat Falloff { get; set; } + [Export ("initWithFontNamed:")] + NativeHandle Constructor ([NullAllowed] string fontName); - [Export ("categoryBitMask")] - uint CategoryBitMask { get; set; } /* uint32_t */ - } + [MacCatalyst (13, 1)] + [Static, Export ("labelNodeWithText:")] + SKLabelNode FromText ([NullAllowed] string text); - /// A that displays video. - /// - /// Apple documentation for SKVideoNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKVideoNode { - [Static, Export ("videoNodeWithAVPlayer:")] - SKVideoNode FromPlayer (AVPlayer player); + [Static] + [Export ("labelNodeWithAttributedText:")] + SKLabelNode FromText ([NullAllowed] NSAttributedString attributedText); - [Static, Export ("videoNodeWithVideoFileNamed:"), Internal] - SKVideoNode VideoNodeWithVideoFileNamed (string videoFile); + [Export ("verticalAlignmentMode")] + SKLabelVerticalAlignmentMode VerticalAlignmentMode { get; set; } - [Static, Export ("videoNodeWithFileNamed:"), Internal] - SKVideoNode VideoNodeWithFileNamed (string videoFile); + [Export ("horizontalAlignmentMode")] + SKLabelHorizontalAlignmentMode HorizontalAlignmentMode { get; set; } - [Static, Export ("videoNodeWithVideoURL:"), Internal] - SKVideoNode VideoNodeWithVideoURL (NSUrl videoURL); + [MacCatalyst (13, 1)] + [Export ("numberOfLines")] + nint NumberOfLines { get; set; } - [Static, Export ("videoNodeWithURL:"), Internal] - SKVideoNode VideoNodeWithURL (NSUrl videoURL); + [MacCatalyst (13, 1)] + [Export ("lineBreakMode", ArgumentSemantic.Assign)] + NSLineBreakMode LineBreakMode { get; set; } - [DesignatedInitializer] - [Export ("initWithAVPlayer:")] - NativeHandle Constructor (AVPlayer player); + [MacCatalyst (13, 1)] + [Export ("preferredMaxLayoutWidth")] + nfloat PreferredMaxLayoutWidth { get; set; } - [Export ("initWithVideoFileNamed:"), Internal] - IntPtr InitWithVideoFileNamed (string videoFile); + [Export ("fontName", ArgumentSemantic.Copy)] + [NullAllowed] + string FontName { get; set; } - [Export ("initWithFileNamed:"), Internal] - IntPtr InitWithFileNamed (string videoFile); + [Export ("text", ArgumentSemantic.Copy)] + [NullAllowed] // nullable in Xcode7 headers and caught by introspection tests + string Text { get; set; } - [Export ("initWithVideoURL:"), Internal] - IntPtr InitWithVideoURL (NSUrl url); + [MacCatalyst (13, 1)] + [NullAllowed, Export ("attributedText", ArgumentSemantic.Copy)] + NSAttributedString AttributedText { get; set; } - [Export ("initWithURL:"), Internal] - IntPtr InitWithURL (NSUrl url); + [Export ("fontSize")] + nfloat FontSize { get; set; } - [Export ("play")] - void Play (); + [Export ("fontColor", ArgumentSemantic.Retain)] + [NullAllowed] + UIColor FontColor { get; set; } - [Export ("pause")] - void Pause (); + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Export ("size")] - CGSize Size { get; set; } + [NullAllowed] // by default this property is null + [Export ("color", ArgumentSemantic.Retain)] + UIColor Color { get; set; } - [Export ("anchorPoint")] - CGPoint AnchorPoint { get; set; } - } + [Export ("blendMode")] + SKBlendMode BlendMode { get; set; } +} - /// Mathematical constraint on a node's position or orientation. - /// - /// Apple documentation for SKConstraint - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKConstraint : NSSecureCoding, NSCopying { - [Export ("enabled")] - bool Enabled { get; set; } +/// A node that creates a lighting effect within a scene. +/// +/// Apple documentation for SKLightNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKLightNode { + [Export ("enabled")] + bool Enabled { [Bind ("isEnabled")] get; set; } - [NullAllowed] // by default this property is null - [Export ("referenceNode", ArgumentSemantic.Retain)] - SKNode ReferenceNode { get; set; } + [Export ("lightColor")] + UIColor LightColor { get; set; } - [Static, Export ("positionX:")] - SKConstraint CreateXRestriction (SKRange range); + [Export ("ambientColor")] + UIColor AmbientColor { get; set; } - [Static, Export ("positionY:")] - SKConstraint CreateYRestriction (SKRange range); + [Export ("shadowColor")] + UIColor ShadowColor { get; set; } - [Static, Export ("positionX:Y:")] - SKConstraint CreateRestriction (SKRange xRange, SKRange yRange); + [Export ("falloff")] + nfloat Falloff { get; set; } - [Static, Export ("distance:toNode:")] - SKConstraint CreateDistance (SKRange range, SKNode node); + [Export ("categoryBitMask")] + uint CategoryBitMask { get; set; } /* uint32_t */ +} - [Static, Export ("distance:toPoint:")] - SKConstraint CreateDistance (SKRange range, CGPoint point); +/// A that displays video. +/// +/// Apple documentation for SKVideoNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKVideoNode { + [Static, Export ("videoNodeWithAVPlayer:")] + SKVideoNode FromPlayer (AVPlayer player); - [Static, Export ("distance:toPoint:inNode:")] - SKConstraint CreateDistance (SKRange range, CGPoint point, SKNode node); + [Static, Export ("videoNodeWithVideoFileNamed:"), Internal] + SKVideoNode VideoNodeWithVideoFileNamed (string videoFile); - [Static, Export ("zRotation:")] - SKConstraint CreateZRotation (SKRange zRange); + [Static, Export ("videoNodeWithFileNamed:"), Internal] + SKVideoNode VideoNodeWithFileNamed (string videoFile); - [Static, Export ("orientToNode:offset:")] - SKConstraint CreateOrientToNode (SKNode node, SKRange radians); + [Static, Export ("videoNodeWithVideoURL:"), Internal] + SKVideoNode VideoNodeWithVideoURL (NSUrl videoURL); - [Static, Export ("orientToPoint:offset:")] - SKConstraint CreateOrientToPoint (CGPoint point, SKRange radians); + [Static, Export ("videoNodeWithURL:"), Internal] + SKVideoNode VideoNodeWithURL (NSUrl videoURL); - [Static, Export ("orientToPoint:inNode:offset:")] - SKConstraint CreateOrientToPoint (CGPoint point, SKNode node, SKRange radians); - } + [DesignatedInitializer] + [Export ("initWithAVPlayer:")] + NativeHandle Constructor (AVPlayer player); - /// A node that masks its children's pixels. - /// - /// An masks pixels outside of the area defined by its node. Pixels that fall outside of that area are not passed up towards the root of the . - /// - /// - /// Apple documentation for SKCropNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - partial interface SKCropNode { + [Export ("initWithVideoFileNamed:"), Internal] + IntPtr InitWithVideoFileNamed (string videoFile); - [NullAllowed] // by default this property is null - [Export ("maskNode", ArgumentSemantic.Retain)] - SKNode MaskNode { get; set; } - } + [Export ("initWithFileNamed:"), Internal] + IntPtr InitWithFileNamed (string videoFile); - /// A that displays a . - /// - /// Application developers should note the availability of debugging properties, such as . - /// - /// Apple documentation for SKView - [MacCatalyst (13, 1)] - [BaseType (typeof (UIView))] - [DisableDefaultCtor] -#if MONOMAC - partial interface SKView : NSSecureCoding { -#else - partial interface SKView { -#endif - [Export ("initWithFrame:")] - NativeHandle Constructor (CGRect frame); + [Export ("initWithVideoURL:"), Internal] + IntPtr InitWithVideoURL (NSUrl url); - [Export ("paused")] - bool Paused { [Bind ("isPaused")] get; set; } + [Export ("initWithURL:"), Internal] + IntPtr InitWithURL (NSUrl url); - [Export ("showsFPS")] - bool ShowsFPS { get; set; } + [Export ("play")] + void Play (); - [Export ("showsDrawCount")] - bool ShowsDrawCount { get; set; } + [Export ("pause")] + void Pause (); - [Export ("showsNodeCount")] - bool ShowsNodeCount { get; set; } + [Export ("size")] + CGSize Size { get; set; } - [MacCatalyst (13, 1)] - [Export ("showsPhysics")] - bool ShowsPhysics { get; set; } + [Export ("anchorPoint")] + CGPoint AnchorPoint { get; set; } +} - [Export ("asynchronous")] - bool Asynchronous { [Bind ("isAsynchronous")] get; set; } +/// Mathematical constraint on a node's position or orientation. +/// +/// Apple documentation for SKConstraint +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKConstraint : NSSecureCoding, NSCopying { + [Export ("enabled")] + bool Enabled { get; set; } - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("frameInterval")] - nint FrameInterval { get; set; } + [NullAllowed] // by default this property is null + [Export ("referenceNode", ArgumentSemantic.Retain)] + SKNode ReferenceNode { get; set; } - [Export ("presentScene:")] - void PresentScene ([NullAllowed] SKScene scene); + [Static, Export ("positionX:")] + SKConstraint CreateXRestriction (SKRange range); - [Export ("presentScene:transition:")] - void PresentScene (SKScene scene, SKTransition transition); + [Static, Export ("positionY:")] + SKConstraint CreateYRestriction (SKRange range); - [Export ("scene")] - [NullAllowed] - SKScene Scene { get; } + [Static, Export ("positionX:Y:")] + SKConstraint CreateRestriction (SKRange xRange, SKRange yRange); - [Export ("textureFromNode:")] - [return: NullAllowed] - SKTexture TextureFromNode (SKNode node); + [Static, Export ("distance:toNode:")] + SKConstraint CreateDistance (SKRange range, SKNode node); - [Export ("convertPoint:toScene:")] - CGPoint ConvertPointToScene (CGPoint point, SKScene scene); + [Static, Export ("distance:toPoint:")] + SKConstraint CreateDistance (SKRange range, CGPoint point); - [Export ("convertPoint:fromScene:")] - CGPoint ConvertPointFromScene (CGPoint point, SKScene scene); + [Static, Export ("distance:toPoint:inNode:")] + SKConstraint CreateDistance (SKRange range, CGPoint point, SKNode node); - [Export ("ignoresSiblingOrder")] - bool IgnoresSiblingOrder { get; set; } + [Static, Export ("zRotation:")] + SKConstraint CreateZRotation (SKRange zRange); - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Export ("allowsTransparency")] - bool AllowsTransparency { get; set; } + [Static, Export ("orientToNode:offset:")] + SKConstraint CreateOrientToNode (SKNode node, SKRange radians); - [MacCatalyst (13, 1)] - [Export ("shouldCullNonVisibleNodes")] - bool ShouldCullNonVisibleNodes { get; set; } + [Static, Export ("orientToPoint:offset:")] + SKConstraint CreateOrientToPoint (CGPoint point, SKRange radians); - [MacCatalyst (13, 1)] - [Export ("showsFields")] - bool ShowsFields { get; set; } + [Static, Export ("orientToPoint:inNode:offset:")] + SKConstraint CreateOrientToPoint (CGPoint point, SKNode node, SKRange radians); +} - [MacCatalyst (13, 1)] - [Export ("showsQuadCount")] - bool ShowsQuadCount { get; set; } +/// A node that masks its children's pixels. +/// +/// An masks pixels outside of the area defined by its node. Pixels that fall outside of that area are not passed up towards the root of the . +/// +/// +/// Apple documentation for SKCropNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +partial interface SKCropNode { + + [NullAllowed] // by default this property is null + [Export ("maskNode", ArgumentSemantic.Retain)] + SKNode MaskNode { get; set; } +} - [MacCatalyst (13, 1)] - [Export ("textureFromNode:crop:")] - [return: NullAllowed] - SKTexture TextureFromNode (SKNode node, CGRect crop); +/// A that displays a . +/// +/// Application developers should note the availability of debugging properties, such as . +/// +/// Apple documentation for SKView +[MacCatalyst (13, 1)] +[BaseType (typeof (UIView))] +[DisableDefaultCtor] +#if MONOMAC + partial interface SKView : NSSecureCoding { +#else +partial interface SKView { +#endif + [Export ("initWithFrame:")] + NativeHandle Constructor (CGRect frame); - [MacCatalyst (13, 1)] - [Export ("preferredFramesPerSecond")] - nint PreferredFramesPerSecond { get; set; } + [Export ("paused")] + bool Paused { [Bind ("isPaused")] get; set; } - [MacCatalyst (13, 1)] - [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] - ISKViewDelegate Delegate { get; set; } + [Export ("showsFPS")] + bool ShowsFPS { get; set; } - [iOS (14, 0)] - [TV (14, 0)] - [MacCatalyst (14, 0)] - [Export ("disableDepthStencilBuffer")] - bool DisableDepthStencilBuffer { get; set; } - } + [Export ("showsDrawCount")] + bool ShowsDrawCount { get; set; } - /// Interface representing the required methods (if any) of the protocol . - /// - /// This interface contains the required methods (if any) from the protocol defined by . - /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. - /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. - /// - interface ISKViewDelegate { } + [Export ("showsNodeCount")] + bool ShowsNodeCount { get; set; } - /// Delegate object for objects, allowing the developer to control the frame rate. - /// - /// Apple documentation for SKViewDelegate [MacCatalyst (13, 1)] - [Protocol, Model] - [BaseType (typeof (NSObject))] - interface SKViewDelegate { - [Export ("view:shouldRenderAtTime:")] - bool ShouldRender (SKView view, double time); - } + [Export ("showsPhysics")] + bool ShowsPhysics { get; set; } - /// Transitions that can be used between s. Used with the method. - /// - /// Apple documentation for SKTransition - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - partial interface SKTransition : NSCopying { + [Export ("asynchronous")] + bool Asynchronous { [Bind ("isAsynchronous")] get; set; } - [Static, Export ("crossFadeWithDuration:")] - SKTransition CrossFadeWithDuration (double sec); + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("frameInterval")] + nint FrameInterval { get; set; } - [Static, Export ("fadeWithDuration:")] - SKTransition FadeWithDuration (double sec); + [Export ("presentScene:")] + void PresentScene ([NullAllowed] SKScene scene); - [Static, Export ("fadeWithColor:duration:")] - SKTransition FadeWithColor (UIColor color, double sec); + [Export ("presentScene:transition:")] + void PresentScene (SKScene scene, SKTransition transition); - [Static, Export ("flipHorizontalWithDuration:")] - SKTransition FlipHorizontalWithDuration (double sec); + [Export ("scene")] + [NullAllowed] + SKScene Scene { get; } - [Static, Export ("flipVerticalWithDuration:")] - SKTransition FlipVerticalWithDuration (double sec); + [Export ("textureFromNode:")] + [return: NullAllowed] + SKTexture TextureFromNode (SKNode node); - [Static, Export ("revealWithDirection:duration:")] - SKTransition RevealWithDirection (SKTransitionDirection direction, double sec); + [Export ("convertPoint:toScene:")] + CGPoint ConvertPointToScene (CGPoint point, SKScene scene); - [Static, Export ("moveInWithDirection:duration:")] - SKTransition MoveInWithDirection (SKTransitionDirection direction, double sec); + [Export ("convertPoint:fromScene:")] + CGPoint ConvertPointFromScene (CGPoint point, SKScene scene); - [Static, Export ("pushWithDirection:duration:")] - SKTransition PushWithDirection (SKTransitionDirection direction, double sec); + [Export ("ignoresSiblingOrder")] + bool IgnoresSiblingOrder { get; set; } - [Static, Export ("doorsOpenHorizontalWithDuration:")] - SKTransition DoorsOpenHorizontalWithDuration (double sec); + // + // iOS 8 + // + [MacCatalyst (13, 1)] + [Export ("allowsTransparency")] + bool AllowsTransparency { get; set; } - [Static, Export ("doorsOpenVerticalWithDuration:")] - SKTransition DoorsOpenVerticalWithDuration (double sec); + [MacCatalyst (13, 1)] + [Export ("shouldCullNonVisibleNodes")] + bool ShouldCullNonVisibleNodes { get; set; } - [Static, Export ("doorsCloseHorizontalWithDuration:")] - SKTransition DoorsCloseHorizontalWithDuration (double sec); + [MacCatalyst (13, 1)] + [Export ("showsFields")] + bool ShowsFields { get; set; } - [Static, Export ("doorsCloseVerticalWithDuration:")] - SKTransition DoorsCloseVerticalWithDuration (double sec); + [MacCatalyst (13, 1)] + [Export ("showsQuadCount")] + bool ShowsQuadCount { get; set; } - [Static, Export ("doorwayWithDuration:")] - SKTransition DoorwayWithDuration (double sec); + [MacCatalyst (13, 1)] + [Export ("textureFromNode:crop:")] + [return: NullAllowed] + SKTexture TextureFromNode (SKNode node, CGRect crop); - [MacCatalyst (13, 1)] - [Static, Export ("transitionWithCIFilter:duration:")] - SKTransition TransitionWithCIFilter (CIFilter filter, double sec); + [MacCatalyst (13, 1)] + [Export ("preferredFramesPerSecond")] + nint PreferredFramesPerSecond { get; set; } - [Export ("pausesIncomingScene")] - bool PausesIncomingScene { get; set; } + [MacCatalyst (13, 1)] + [NullAllowed, Export ("delegate", ArgumentSemantic.Weak)] + ISKViewDelegate Delegate { get; set; } + + [iOS (14, 0)] + [TV (14, 0)] + [MacCatalyst (14, 0)] + [Export ("disableDepthStencilBuffer")] + bool DisableDepthStencilBuffer { get; set; } +} - [Export ("pausesOutgoingScene")] - bool PausesOutgoingScene { get; set; } - } +/// Interface representing the required methods (if any) of the protocol . +/// +/// This interface contains the required methods (if any) from the protocol defined by . +/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. +/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. +/// +interface ISKViewDelegate { } + +/// Delegate object for objects, allowing the developer to control the frame rate. +/// +/// Apple documentation for SKViewDelegate +[MacCatalyst (13, 1)] +[Protocol, Model] +[BaseType (typeof (NSObject))] +interface SKViewDelegate { + [Export ("view:shouldRenderAtTime:")] + bool ShouldRender (SKView view, double time); +} + +/// Transitions that can be used between s. Used with the method. +/// +/// Apple documentation for SKTransition +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +partial interface SKTransition : NSCopying { + + [Static, Export ("crossFadeWithDuration:")] + SKTransition CrossFadeWithDuration (double sec); + + [Static, Export ("fadeWithDuration:")] + SKTransition FadeWithDuration (double sec); + + [Static, Export ("fadeWithColor:duration:")] + SKTransition FadeWithColor (UIColor color, double sec); + + [Static, Export ("flipHorizontalWithDuration:")] + SKTransition FlipHorizontalWithDuration (double sec); + + [Static, Export ("flipVerticalWithDuration:")] + SKTransition FlipVerticalWithDuration (double sec); + + [Static, Export ("revealWithDirection:duration:")] + SKTransition RevealWithDirection (SKTransitionDirection direction, double sec); + + [Static, Export ("moveInWithDirection:duration:")] + SKTransition MoveInWithDirection (SKTransitionDirection direction, double sec); + + [Static, Export ("pushWithDirection:duration:")] + SKTransition PushWithDirection (SKTransitionDirection direction, double sec); + + [Static, Export ("doorsOpenHorizontalWithDuration:")] + SKTransition DoorsOpenHorizontalWithDuration (double sec); + + [Static, Export ("doorsOpenVerticalWithDuration:")] + SKTransition DoorsOpenVerticalWithDuration (double sec); + + [Static, Export ("doorsCloseHorizontalWithDuration:")] + SKTransition DoorsCloseHorizontalWithDuration (double sec); + + [Static, Export ("doorsCloseVerticalWithDuration:")] + SKTransition DoorsCloseVerticalWithDuration (double sec); + + [Static, Export ("doorwayWithDuration:")] + SKTransition DoorwayWithDuration (double sec); - /// An image that can be used with one or more s and particles. - /// - /// Sprite Kit attempts to be efficient with the memory associated with textures. Textures are lazy-loaded from their source files and in preparation for loading onto the graphics hardware. This lazy-loading can be overridden with the Preload* methods. - /// - /// - /// Apple documentation for SKTexture [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - partial interface SKTexture : NSSecureCoding, NSCopying { + [Static, Export ("transitionWithCIFilter:duration:")] + SKTransition TransitionWithCIFilter (CIFilter filter, double sec); - [Static, Export ("textureWithImageNamed:")] - SKTexture FromImageNamed (string name); + [Export ("pausesIncomingScene")] + bool PausesIncomingScene { get; set; } - [Static, Export ("textureWithRect:inTexture:")] - SKTexture FromRectangle (CGRect rect, SKTexture texture); + [Export ("pausesOutgoingScene")] + bool PausesOutgoingScene { get; set; } +} - [Static, Export ("textureWithCGImage:")] - SKTexture FromImage (CGImage image); +/// An image that can be used with one or more s and particles. +/// +/// Sprite Kit attempts to be efficient with the memory associated with textures. Textures are lazy-loaded from their source files and in preparation for loading onto the graphics hardware. This lazy-loading can be overridden with the Preload* methods. +/// +/// +/// Apple documentation for SKTexture +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +partial interface SKTexture : NSSecureCoding, NSCopying { - [Static, Export ("textureWithImage:")] - SKTexture FromImage (UIImage image); + [Static, Export ("textureWithImageNamed:")] + SKTexture FromImageNamed (string name); - [Static, Export ("textureWithData:size:")] - SKTexture FromData (NSData pixelData, CGSize size); + [Static, Export ("textureWithRect:inTexture:")] + SKTexture FromRectangle (CGRect rect, SKTexture texture); - [Static, Export ("textureWithData:size:rowLength:alignment:")] - SKTexture FromData (NSData pixelData, CGSize size, uint /* unsigned int*/ rowLength, uint /* unsigned int */ alignment); + [Static, Export ("textureWithCGImage:")] + SKTexture FromImage (CGImage image); - [MacCatalyst (13, 1)] - [Export ("textureByApplyingCIFilter:")] - SKTexture TextureByApplyingCIFilter (CIFilter filter); + [Static, Export ("textureWithImage:")] + SKTexture FromImage (UIImage image); - [Export ("textureRect")] - CGRect TextureRect { get; } + [Static, Export ("textureWithData:size:")] + SKTexture FromData (NSData pixelData, CGSize size); - [Export ("size")] - CGSize Size { get; } + [Static, Export ("textureWithData:size:rowLength:alignment:")] + SKTexture FromData (NSData pixelData, CGSize size, uint /* unsigned int*/ rowLength, uint /* unsigned int */ alignment); - [Export ("filteringMode")] - SKTextureFilteringMode FilteringMode { get; set; } + [MacCatalyst (13, 1)] + [Export ("textureByApplyingCIFilter:")] + SKTexture TextureByApplyingCIFilter (CIFilter filter); - [Export ("usesMipmaps")] - bool UsesMipmaps { get; set; } + [Export ("textureRect")] + CGRect TextureRect { get; } - [Static] - [Export ("preloadTextures:withCompletionHandler:")] - [Async] - // note: unlike SKTextureAtlas completion can't be null (or it crash) - void PreloadTextures (SKTexture [] textures, Action completion); + [Export ("size")] + CGSize Size { get; } - [Export ("preloadWithCompletionHandler:")] - [Async] - // note: unlike SKTextureAtlas completion can't be null (or it crash) - void Preload (Action completion); + [Export ("filteringMode")] + SKTextureFilteringMode FilteringMode { get; set; } - [MacCatalyst (13, 1)] - [Export ("textureByGeneratingNormalMap")] - SKTexture CreateTextureByGeneratingNormalMap (); + [Export ("usesMipmaps")] + bool UsesMipmaps { get; set; } - [MacCatalyst (13, 1)] - [Export ("textureByGeneratingNormalMapWithSmoothness:contrast:")] - SKTexture CreateTextureByGeneratingNormalMap (nfloat smoothness, nfloat contrast); + [Static] + [Export ("preloadTextures:withCompletionHandler:")] + [Async] + // note: unlike SKTextureAtlas completion can't be null (or it crash) + void PreloadTextures (SKTexture [] textures, Action completion); - [MacCatalyst (13, 1)] - [Static, Export ("textureVectorNoiseWithSmoothness:size:")] - SKTexture FromTextureVectorNoise (nfloat smoothness, CGSize size); + [Export ("preloadWithCompletionHandler:")] + [Async] + // note: unlike SKTextureAtlas completion can't be null (or it crash) + void Preload (Action completion); - [MacCatalyst (13, 1)] - [Static, Export ("textureNoiseWithSmoothness:size:grayscale:")] - SKTexture FromTextureNoise (nfloat smoothness, CGSize size, bool grayscale); + [MacCatalyst (13, 1)] + [Export ("textureByGeneratingNormalMap")] + SKTexture CreateTextureByGeneratingNormalMap (); - [MacCatalyst (13, 1)] - [Static, Export ("textureWithData:size:flipped:")] - SKTexture FromData (NSData pixelData, CGSize size, bool flipped); + [MacCatalyst (13, 1)] + [Export ("textureByGeneratingNormalMapWithSmoothness:contrast:")] + SKTexture CreateTextureByGeneratingNormalMap (nfloat smoothness, nfloat contrast); - [MacCatalyst (13, 1)] - [Export ("CGImage")] - CGImage CGImage { get; } + [MacCatalyst (13, 1)] + [Static, Export ("textureVectorNoiseWithSmoothness:size:")] + SKTexture FromTextureVectorNoise (nfloat smoothness, CGSize size); - // Static Category from GameplayKit - [MacCatalyst (13, 1)] - [Static] - [Export ("textureWithNoiseMap:")] - SKTexture FromNoiseMap (GKNoiseMap noiseMap); - } + [MacCatalyst (13, 1)] + [Static, Export ("textureNoiseWithSmoothness:size:grayscale:")] + SKTexture FromTextureNoise (nfloat smoothness, CGSize size, bool grayscale); + + [MacCatalyst (13, 1)] + [Static, Export ("textureWithData:size:flipped:")] + SKTexture FromData (NSData pixelData, CGSize size, bool flipped); - /// A method that modifies a texture in place. - delegate void SKTextureModify (IntPtr pixelData, nuint lengthInBytes); + [MacCatalyst (13, 1)] + [Export ("CGImage")] + CGImage CGImage { get; } - /// A texture that can be modified after assignment. - /// - /// Apple documentation for SKMutableTexture + // Static Category from GameplayKit [MacCatalyst (13, 1)] - [BaseType (typeof (SKTexture))] - [DisableDefaultCtor] // cannot be created (like SKTexture) by calling `init` - interface SKMutableTexture { - [Export ("initWithSize:")] - NativeHandle Constructor (CGSize size); + [Static] + [Export ("textureWithNoiseMap:")] + SKTexture FromNoiseMap (GKNoiseMap noiseMap); +} - [Export ("initWithSize:pixelFormat:")] - NativeHandle Constructor (CGSize size, CVPixelFormatType pixelFormat); +/// A method that modifies a texture in place. +delegate void SKTextureModify (IntPtr pixelData, nuint lengthInBytes); - [Static, Export ("mutableTextureWithSize:")] - SKMutableTexture Create (CGSize size); +/// A texture that can be modified after assignment. +/// +/// Apple documentation for SKMutableTexture +[MacCatalyst (13, 1)] +[BaseType (typeof (SKTexture))] +[DisableDefaultCtor] // cannot be created (like SKTexture) by calling `init` +interface SKMutableTexture { + [Export ("initWithSize:")] + NativeHandle Constructor (CGSize size); - [Export ("modifyPixelDataWithBlock:")] - void ModifyPixelData (SKTextureModify modifyMethod); - } + [Export ("initWithSize:pixelFormat:")] + NativeHandle Constructor (CGSize size, CVPixelFormatType pixelFormat); - delegate void SKTextureAtlasLoadCallback (NSError error, SKTextureAtlas foundAtlases); + [Static, Export ("mutableTextureWithSize:")] + SKMutableTexture Create (CGSize size); + + [Export ("modifyPixelDataWithBlock:")] + void ModifyPixelData (SKTextureModify modifyMethod); +} + +delegate void SKTextureAtlasLoadCallback (NSError error, SKTextureAtlas foundAtlases); + +/// A collection of s that are loaded from a single source. +/// +/// +/// Apple documentation for SKTextureAtlas +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +partial interface SKTextureAtlas : NSSecureCoding { + + [Static, Export ("atlasNamed:")] + SKTextureAtlas FromName (string name); + + [Export ("textureNamed:")] + SKTexture TextureNamed (string name); + + [Export ("textureNames")] + string [] TextureNames { get; } + + [Static] + [Export ("preloadTextureAtlases:withCompletionHandler:")] + [Async] + // Unfortunate name, should have been PreloadTextureAtlases + void PreloadTextures (SKTextureAtlas [] textures, Action completion); - /// A collection of s that are loaded from a single source. - /// - /// - /// Apple documentation for SKTextureAtlas [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - partial interface SKTextureAtlas : NSSecureCoding { + [Static] + [Export ("preloadTextureAtlasesNamed:withCompletionHandler:")] + [Async (ResultTypeName = "SKTextureAtlasLoadResult")] + void PreloadTextureAtlases (string [] atlasNames, SKTextureAtlasLoadCallback completionHandler); - [Static, Export ("atlasNamed:")] - SKTextureAtlas FromName (string name); + [Export ("preloadWithCompletionHandler:")] + [Async] + void Preload (Action completion); - [Export ("textureNamed:")] - SKTexture TextureNamed (string name); + [MacCatalyst (13, 1)] + [Static, Export ("atlasWithDictionary:")] + SKTextureAtlas FromDictionary (NSDictionary properties); - [Export ("textureNames")] - string [] TextureNames { get; } +} - [Static] - [Export ("preloadTextureAtlases:withCompletionHandler:")] - [Async] - // Unfortunate name, should have been PreloadTextureAtlases - void PreloadTextures (SKTextureAtlas [] textures, Action completion); +/// Holds shareable uniform data for SKShader objects. +/// +/// Apple documentation for SKUniform +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKUniform : NSCopying, NSSecureCoding { + [Export ("initWithName:")] + NativeHandle Constructor (string name); - [MacCatalyst (13, 1)] - [Static] - [Export ("preloadTextureAtlasesNamed:withCompletionHandler:")] - [Async (ResultTypeName = "SKTextureAtlasLoadResult")] - void PreloadTextureAtlases (string [] atlasNames, SKTextureAtlasLoadCallback completionHandler); + [Export ("initWithName:texture:")] + NativeHandle Constructor (string name, [NullAllowed] SKTexture texture); - [Export ("preloadWithCompletionHandler:")] - [Async] - void Preload (Action completion); + [Export ("initWithName:float:")] + NativeHandle Constructor (string name, float /* float, not CGFloat */ value); - [MacCatalyst (13, 1)] - [Static, Export ("atlasWithDictionary:")] - SKTextureAtlas FromDictionary (NSDictionary properties); + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector2:")] + IntPtr InitWithNameFloatVector2 (string name, Vector2 value); - } + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [MarshalNativeExceptions] + [Internal] + IntPtr InitWithNameVectorFloat2 (string name, Vector2 value); - /// Holds shareable uniform data for SKShader objects. - /// - /// Apple documentation for SKUniform - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKUniform : NSCopying, NSSecureCoding { - [Export ("initWithName:")] - NativeHandle Constructor (string name); - - [Export ("initWithName:texture:")] - NativeHandle Constructor (string name, [NullAllowed] SKTexture texture); - - [Export ("initWithName:float:")] - NativeHandle Constructor (string name, float /* float, not CGFloat */ value); - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector2:")] - IntPtr InitWithNameFloatVector2 (string name, Vector2 value); - - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [MarshalNativeExceptions] - [Internal] - IntPtr InitWithNameVectorFloat2 (string name, Vector2 value); - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector3:")] - IntPtr InitWithNameFloatVector3 (string name, Vector3 value); - - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [Internal] - IntPtr InitWithNameVectorFloat3 (string name, Vector3 value); - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("initWithName:floatVector4:")] - IntPtr InitWithNameFloatVector4 (string name, Vector4 value); - - [MacCatalyst (13, 1)] - [Export ("initWithName:vectorFloat4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [Internal] - IntPtr InitWithNameVectorFloat4 (string name, Vector4 value); + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector3:")] + IntPtr InitWithNameFloatVector3 (string name, Vector3 value); + + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameVectorFloat3 (string name, Vector3 value); + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("initWithName:floatVector4:")] + IntPtr InitWithNameFloatVector4 (string name, Vector4 value); + + [MacCatalyst (13, 1)] + [Export ("initWithName:vectorFloat4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [Internal] + IntPtr InitWithNameVectorFloat4 (string name, Vector4 value); #if !NET [Internal] @@ -1867,10 +1867,10 @@ interface SKUniform : NSCopying, NSSecureCoding { IntPtr InitWithNameMatrixFloat2x2 (string name, Matrix2 value); #endif // !NET - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat2x2 value); + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat2x2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + NativeHandle Constructor (string name, MatrixFloat2x2 value); #if !NET [Internal] @@ -1888,10 +1888,10 @@ interface SKUniform : NSCopying, NSSecureCoding { IntPtr InitWithNameMatrixFloat3x3 (string name, Matrix3 value); #endif // !NET - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat3x3 value); + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat3x3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + NativeHandle Constructor (string name, MatrixFloat3x3 value); #if !NET [Internal] @@ -1911,80 +1911,80 @@ interface SKUniform : NSCopying, NSSecureCoding { IntPtr InitWithNameMatrixFloat4x4 (string name, Matrix4 value); #endif // !NET - [MacCatalyst (13, 1)] - [Export ("initWithName:matrixFloat4x4:")] + [MacCatalyst (13, 1)] + [Export ("initWithName:matrixFloat4x4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + NativeHandle Constructor (string name, MatrixFloat4x4 value); + + [Export ("name")] + string Name { get; } + + [Export ("uniformType")] + SKUniformType UniformType { get; } + + [Export ("textureValue")] + [NullAllowed] + SKTexture TextureValue { get; set; } + + [Export ("floatValue")] + float FloatValue { get; set; } /* float, not CGFloat */ + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector2Value")] + Vector2 _FloatVector2Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] + [Internal] + Vector2 _VectorFloat2Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector3Value")] + Vector3 _FloatVector3Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] + [Internal] + Vector3 _VectorFloat3Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - NativeHandle Constructor (string name, MatrixFloat4x4 value); - - [Export ("name")] - string Name { get; } - - [Export ("uniformType")] - SKUniformType UniformType { get; } - - [Export ("textureValue")] - [NullAllowed] - SKTexture TextureValue { get; set; } - - [Export ("floatValue")] - float FloatValue { get; set; } /* float, not CGFloat */ - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector2Value")] - Vector2 _FloatVector2Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] - [Internal] - Vector2 _VectorFloat2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector3Value")] - Vector3 _FloatVector3Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] - [Internal] - Vector3 _VectorFloat3Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Internal] - [Deprecated (PlatformName.iOS, 10, 0)] - [Deprecated (PlatformName.TvOS, 10, 0)] - [Deprecated (PlatformName.MacOSX, 10, 12)] - [MacCatalyst (13, 1)] - [Deprecated (PlatformName.MacCatalyst, 13, 1)] - [Export ("floatVector4Value")] - Vector4 _FloatVector4Value { get; set; } - - [MacCatalyst (13, 1)] - [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] - [Internal] - Vector4 _VectorFloat4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } + + [Internal] + [Deprecated (PlatformName.iOS, 10, 0)] + [Deprecated (PlatformName.TvOS, 10, 0)] + [Deprecated (PlatformName.MacOSX, 10, 12)] + [MacCatalyst (13, 1)] + [Deprecated (PlatformName.MacCatalyst, 13, 1)] + [Export ("floatVector4Value")] + Vector4 _FloatVector4Value { get; set; } + + [MacCatalyst (13, 1)] + [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] + [Internal] + Vector4 _VectorFloat4Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } #if !NET [Internal] @@ -1995,14 +1995,14 @@ Vector4 _VectorFloat4Value { Matrix2 _FloatMatrix2Value { get; set; } #endif // !NET - [MacCatalyst (13, 1)] - [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] - MatrixFloat2x2 MatrixFloat2x2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [MacCatalyst (13, 1)] + [Export ("matrixFloat2x2Value", ArgumentSemantic.Assign)] + MatrixFloat2x2 MatrixFloat2x2Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } #if !NET [Internal] @@ -2013,14 +2013,14 @@ MatrixFloat2x2 MatrixFloat2x2Value { Matrix3 _FloatMatrix3Value { get; set; } #endif // !NET - [MacCatalyst (13, 1)] - [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] - MatrixFloat3x3 MatrixFloat3x3Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [MacCatalyst (13, 1)] + [Export ("matrixFloat3x3Value", ArgumentSemantic.Assign)] + MatrixFloat3x3 MatrixFloat3x3Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } #if !NET [Internal] @@ -2031,42 +2031,42 @@ MatrixFloat3x3 MatrixFloat3x3Value { Matrix4 _FloatMatrix4Value { get; set; } #endif // !NET - [MacCatalyst (13, 1)] - [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] - MatrixFloat4x4 MatrixFloat4x4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [MacCatalyst (13, 1)] + [Export ("matrixFloat4x4Value", ArgumentSemantic.Assign)] + MatrixFloat4x4 MatrixFloat4x4Value { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } - [Static, Export ("uniformWithName:")] - SKUniform Create (string name); + [Static, Export ("uniformWithName:")] + SKUniform Create (string name); - [Static, Export ("uniformWithName:texture:")] - SKUniform Create (string name, [NullAllowed] SKTexture texture); + [Static, Export ("uniformWithName:texture:")] + SKUniform Create (string name, [NullAllowed] SKTexture texture); - [Static, Export ("uniformWithName:float:")] - SKUniform Create (string name, float /* float, not CGFloat */ value); + [Static, Export ("uniformWithName:float:")] + SKUniform Create (string name, float /* float, not CGFloat */ value); - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - [MarshalNativeExceptions] - SKUniform Create (string name, Vector2 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:vectorFloat2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + [MarshalNativeExceptions] + SKUniform Create (string name, Vector2 value); - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Vector3 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:vectorFloat3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Vector3 value); - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:vectorFloat4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, Vector4 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:vectorFloat4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, Vector4 value); #if !NET [Obsolete ("Use the '(string, MatrixFloat2x2)' overload instead.")] @@ -2076,11 +2076,11 @@ MatrixFloat4x4 MatrixFloat4x4Value { SKUniform Create (string name, Matrix2 value); #endif // !NET - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat2x2:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat2x2 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat2x2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat2x2 value); #if !NET [Obsolete ("Use the '(string, MatrixFloat3x3)' overload instead.")] @@ -2090,11 +2090,11 @@ MatrixFloat4x4 MatrixFloat4x4Value { SKUniform Create (string name, Matrix3 value); #endif - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat3x3:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat3x3 value); + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat3x3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat3x3 value); #if !NET [Obsolete ("Use 'the '(string, MatrixFloat4x4)' overload instead.")] @@ -2104,1415 +2104,1415 @@ MatrixFloat4x4 MatrixFloat4x4Value { SKUniform Create (string name, Matrix4 value); #endif // !NET - [MacCatalyst (13, 1)] - [Static] - [Export ("uniformWithName:matrixFloat4x4:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKUniform Create (string name, MatrixFloat4x4 value); - } + [MacCatalyst (13, 1)] + [Static] + [Export ("uniformWithName:matrixFloat4x4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKUniform Create (string name, MatrixFloat4x4 value); +} - /// The delegate for a custom action, used with . - delegate void SKActionDurationHandler (SKNode node, nfloat elapsedTime); +/// The delegate for a custom action, used with . +delegate void SKActionDurationHandler (SKNode node, nfloat elapsedTime); - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // To create an action, call the class method for the action you are interested in. - partial interface SKAction : NSSecureCoding, NSCopying { +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] // To create an action, call the class method for the action you are interested in. +partial interface SKAction : NSSecureCoding, NSCopying { - [Export ("duration")] - double Duration { get; set; } + [Export ("duration")] + double Duration { get; set; } - [Export ("timingMode")] - SKActionTimingMode TimingMode { get; set; } + [Export ("timingMode")] + SKActionTimingMode TimingMode { get; set; } - [Export ("speed")] - nfloat Speed { get; set; } + [Export ("speed")] + nfloat Speed { get; set; } - [Export ("reversedAction")] - SKAction ReversedAction { get; } + [Export ("reversedAction")] + SKAction ReversedAction { get; } - // These are in a category - [Static, Export ("moveByX:y:duration:")] - SKAction MoveBy (nfloat deltaX, nfloat deltaY, double sec); + // These are in a category + [Static, Export ("moveByX:y:duration:")] + SKAction MoveBy (nfloat deltaX, nfloat deltaY, double sec); - [Static, Export ("moveBy:duration:")] - SKAction MoveBy (CGVector delta, double duration); + [Static, Export ("moveBy:duration:")] + SKAction MoveBy (CGVector delta, double duration); - [Static, Export ("moveTo:duration:")] - SKAction MoveTo (CGPoint location, double sec); + [Static, Export ("moveTo:duration:")] + SKAction MoveTo (CGPoint location, double sec); - [Static, Export ("moveToX:duration:")] - SKAction MoveToX (nfloat x, double sec); + [Static, Export ("moveToX:duration:")] + SKAction MoveToX (nfloat x, double sec); - [Static, Export ("moveToY:duration:")] - SKAction MoveToY (nfloat y, double sec); + [Static, Export ("moveToY:duration:")] + SKAction MoveToY (nfloat y, double sec); - [Static, Export ("rotateByAngle:duration:")] - SKAction RotateByAngle (nfloat radians, double sec); + [Static, Export ("rotateByAngle:duration:")] + SKAction RotateByAngle (nfloat radians, double sec); - [Static, Export ("rotateToAngle:duration:")] - SKAction RotateToAngle (nfloat radians, double sec); + [Static, Export ("rotateToAngle:duration:")] + SKAction RotateToAngle (nfloat radians, double sec); - [Static, Export ("rotateToAngle:duration:shortestUnitArc:")] - SKAction RotateToAngle (nfloat radians, double sec, bool shortedUnitArc); + [Static, Export ("rotateToAngle:duration:shortestUnitArc:")] + SKAction RotateToAngle (nfloat radians, double sec, bool shortedUnitArc); - [Static, Export ("resizeByWidth:height:duration:")] - SKAction ResizeByWidth (nfloat width, nfloat height, double duration); + [Static, Export ("resizeByWidth:height:duration:")] + SKAction ResizeByWidth (nfloat width, nfloat height, double duration); - [Static, Export ("resizeToWidth:height:duration:")] - SKAction ResizeTo (nfloat width, nfloat height, double duration); + [Static, Export ("resizeToWidth:height:duration:")] + SKAction ResizeTo (nfloat width, nfloat height, double duration); - [Static, Export ("resizeToWidth:duration:")] - SKAction ResizeToWidth (nfloat width, double duration); + [Static, Export ("resizeToWidth:duration:")] + SKAction ResizeToWidth (nfloat width, double duration); - [Static, Export ("resizeToHeight:duration:")] - SKAction ResizeToHeight (nfloat height, double duration); + [Static, Export ("resizeToHeight:duration:")] + SKAction ResizeToHeight (nfloat height, double duration); - [Static, Export ("scaleBy:duration:")] - SKAction ScaleBy (nfloat scale, double sec); + [Static, Export ("scaleBy:duration:")] + SKAction ScaleBy (nfloat scale, double sec); - [Static, Export ("scaleXBy:y:duration:")] - SKAction ScaleBy (nfloat xScale, nfloat yScale, double sec); + [Static, Export ("scaleXBy:y:duration:")] + SKAction ScaleBy (nfloat xScale, nfloat yScale, double sec); - [Static, Export ("scaleTo:duration:")] - SKAction ScaleTo (nfloat scale, double sec); + [Static, Export ("scaleTo:duration:")] + SKAction ScaleTo (nfloat scale, double sec); - [Static, Export ("scaleXTo:y:duration:")] - SKAction ScaleTo (nfloat xScale, nfloat yScale, double sec); + [Static, Export ("scaleXTo:y:duration:")] + SKAction ScaleTo (nfloat xScale, nfloat yScale, double sec); - [Static, Export ("scaleXTo:duration:")] - SKAction ScaleXTo (nfloat scale, double sec); + [Static, Export ("scaleXTo:duration:")] + SKAction ScaleXTo (nfloat scale, double sec); - [Static, Export ("scaleYTo:duration:")] - SKAction ScaleYTo (nfloat scale, double sec); + [Static, Export ("scaleYTo:duration:")] + SKAction ScaleYTo (nfloat scale, double sec); - [MacCatalyst (13, 1)] - [Static] - [Export ("scaleToSize:duration:")] - SKAction ScaleTo (CGSize size, double sec); + [MacCatalyst (13, 1)] + [Static] + [Export ("scaleToSize:duration:")] + SKAction ScaleTo (CGSize size, double sec); - [Static, Export ("sequence:")] - SKAction Sequence ([Params] SKAction [] actions); + [Static, Export ("sequence:")] + SKAction Sequence ([Params] SKAction [] actions); - [Static, Export ("group:")] - SKAction Group ([Params] SKAction [] actions); + [Static, Export ("group:")] + SKAction Group ([Params] SKAction [] actions); - [Static, Export ("repeatAction:count:")] - SKAction RepeatAction (SKAction action, nuint count); + [Static, Export ("repeatAction:count:")] + SKAction RepeatAction (SKAction action, nuint count); - [Static, Export ("repeatActionForever:")] - SKAction RepeatActionForever (SKAction action); + [Static, Export ("repeatActionForever:")] + SKAction RepeatActionForever (SKAction action); - [Static, Export ("fadeInWithDuration:")] - SKAction FadeInWithDuration (double sec); + [Static, Export ("fadeInWithDuration:")] + SKAction FadeInWithDuration (double sec); - [Static, Export ("fadeOutWithDuration:")] - SKAction FadeOutWithDuration (double sec); + [Static, Export ("fadeOutWithDuration:")] + SKAction FadeOutWithDuration (double sec); - [Static, Export ("fadeAlphaBy:duration:")] - SKAction FadeAlphaBy (nfloat factor, double sec); + [Static, Export ("fadeAlphaBy:duration:")] + SKAction FadeAlphaBy (nfloat factor, double sec); - [Static, Export ("fadeAlphaTo:duration:")] - SKAction FadeAlphaTo (nfloat alpha, double sec); + [Static, Export ("fadeAlphaTo:duration:")] + SKAction FadeAlphaTo (nfloat alpha, double sec); - [MacCatalyst (13, 1)] - [Static, Export ("setTexture:")] - SKAction SetTexture (SKTexture texture); + [MacCatalyst (13, 1)] + [Static, Export ("setTexture:")] + SKAction SetTexture (SKTexture texture); - [MacCatalyst (13, 1)] - [Static, Export ("setTexture:resize:")] - SKAction SetTexture (SKTexture texture, bool resize); + [MacCatalyst (13, 1)] + [Static, Export ("setTexture:resize:")] + SKAction SetTexture (SKTexture texture, bool resize); - [Static, Export ("animateWithTextures:timePerFrame:")] - SKAction AnimateWithTextures (SKTexture [] textures, double sec); + [Static, Export ("animateWithTextures:timePerFrame:")] + SKAction AnimateWithTextures (SKTexture [] textures, double sec); - [Static, Export ("animateWithTextures:timePerFrame:resize:restore:")] - SKAction AnimateWithTextures (SKTexture [] textures, double sec, bool resize, bool restore); + [Static, Export ("animateWithTextures:timePerFrame:resize:restore:")] + SKAction AnimateWithTextures (SKTexture [] textures, double sec, bool resize, bool restore); - [Static, Export ("playSoundFileNamed:waitForCompletion:")] - SKAction PlaySoundFileNamed (string soundFile, bool wait); + [Static, Export ("playSoundFileNamed:waitForCompletion:")] + SKAction PlaySoundFileNamed (string soundFile, bool wait); - [Static, Export ("colorizeWithColor:colorBlendFactor:duration:")] - SKAction ColorizeWithColor (UIColor color, nfloat colorBlendFactor, double sec); + [Static, Export ("colorizeWithColor:colorBlendFactor:duration:")] + SKAction ColorizeWithColor (UIColor color, nfloat colorBlendFactor, double sec); - [Static, Export ("colorizeWithColorBlendFactor:duration:")] - SKAction ColorizeWithColorBlendFactor (nfloat colorBlendFactor, double sec); + [Static, Export ("colorizeWithColorBlendFactor:duration:")] + SKAction ColorizeWithColorBlendFactor (nfloat colorBlendFactor, double sec); - [Static, Export ("followPath:duration:")] - SKAction FollowPath (CGPath path, double sec); + [Static, Export ("followPath:duration:")] + SKAction FollowPath (CGPath path, double sec); - [Static, Export ("followPath:asOffset:orientToPath:duration:")] + [Static, Export ("followPath:asOffset:orientToPath:duration:")] #if XAMCORE_5_0 SKAction FollowPath (CGPath path, bool offset, bool orientToPath, double sec); #else - SKAction FollowPath (CGPath path, bool offset, bool orient, double sec); + SKAction FollowPath (CGPath path, bool offset, bool orient, double sec); #endif - [MacCatalyst (13, 1)] - [Static, Export ("followPath:speed:")] - SKAction FollowPath (CGPath path, nfloat speed); + [MacCatalyst (13, 1)] + [Static, Export ("followPath:speed:")] + SKAction FollowPath (CGPath path, nfloat speed); - [MacCatalyst (13, 1)] - [Static, Export ("followPath:asOffset:orientToPath:speed:")] + [MacCatalyst (13, 1)] + [Static, Export ("followPath:asOffset:orientToPath:speed:")] #if XAMCORE_5_0 SKAction FollowPath (CGPath path, bool offset, bool orientToPath, nfloat speed); #else - SKAction FollowPath (CGPath path, bool offset, bool orient, nfloat speed); + SKAction FollowPath (CGPath path, bool offset, bool orient, nfloat speed); #endif - [Static, Export ("speedBy:duration:")] - SKAction SpeedBy (nfloat speed, double sec); + [Static, Export ("speedBy:duration:")] + SKAction SpeedBy (nfloat speed, double sec); - [Static, Export ("speedTo:duration:")] - SKAction SpeedTo (nfloat speed, double sec); + [Static, Export ("speedTo:duration:")] + SKAction SpeedTo (nfloat speed, double sec); - [Static, Export ("waitForDuration:")] - SKAction WaitForDuration (double sec); + [Static, Export ("waitForDuration:")] + SKAction WaitForDuration (double sec); - [Static, Export ("waitForDuration:withRange:")] - SKAction WaitForDuration (double sec, double durationRange); - - [Static, Export ("removeFromParent")] - SKAction RemoveFromParent (); - - [Static, Export ("performSelector:onTarget:")] - SKAction PerformSelector (Selector selector, NSObject target); + [Static, Export ("waitForDuration:withRange:")] + SKAction WaitForDuration (double sec, double durationRange); - [Static, Export ("runBlock:")] - SKAction Run (Action block); - - [Static, Export ("runBlock:queue:")] - SKAction Run (Action block, DispatchQueue queue); - - [Static, Export ("runAction:onChildWithName:")] - SKAction RunAction (SKAction action, string name); - - [Static, Export ("customActionWithDuration:actionBlock:")] - SKAction CustomActionWithDuration (double seconds, SKActionDurationHandler actionHandler); - - // - // iOS 8 cluster (a few more are above, as part of their family - // - [MacCatalyst (13, 1)] - [Static, Export ("hide")] - SKAction Hide (); - - [MacCatalyst (13, 1)] - [Static, Export ("unhide")] - SKAction Unhide (); - - [MacCatalyst (13, 1)] - [Static, Export ("reachTo:rootNode:duration:")] - SKAction ReachTo (CGPoint position, SKNode rootNode, double secs); - - [MacCatalyst (13, 1)] - [Static, Export ("reachTo:rootNode:velocity:")] - SKAction ReachTo (CGPoint position, SKNode rootNode, nfloat velocity); - - [MacCatalyst (13, 1)] - [Static, Export ("reachToNode:rootNode:duration:")] - SKAction ReachToNode (SKNode node, SKNode rootNode, double sec); - - [MacCatalyst (13, 1)] - [Static, Export ("reachToNode:rootNode:velocity:")] - SKAction ReachToNode (SKNode node, SKNode rootNode, nfloat velocity); - - [MacCatalyst (13, 1)] - [Static, Export ("strengthTo:duration:")] - SKAction StrengthTo (float /* float, not CGFloat */ strength, double sec); - - [MacCatalyst (13, 1)] - [Static, Export ("strengthBy:duration:")] - SKAction StrengthBy (float /* float, not CGFloat */ strength, double sec); - - [MacCatalyst (13, 1)] - [NullAllowed, Export ("timingFunction", ArgumentSemantic.Assign)] - SKActionTimingFunction2 TimingFunction2 { get; set; } - - [MacCatalyst (13, 1)] - [Static, Export ("falloffBy:duration:")] - SKAction FalloffBy (float /* float, not CGFloat */ to, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("falloffTo:duration:")] - SKAction FalloffTo (float falloff, double sec); - - // iOS 9 cluster - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:")] - [return: NullAllowed] - SKAction Create (string name); - - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:duration:")] - [return: NullAllowed] - SKAction Create (string name, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:fromURL:")] - [return: NullAllowed] - SKAction Create (string name, NSUrl url); - - [MacCatalyst (13, 1)] - [Static] - [Export ("actionNamed:fromURL:duration:")] - [return: NullAllowed] - SKAction Create (string name, NSUrl url, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("setNormalTexture:")] - SKAction SetNormalTexture (SKTexture texture); - - [MacCatalyst (13, 1)] - [Static] - [Export ("setNormalTexture:resize:")] - SKAction SetNormalTexture (SKTexture texture, bool resize); - - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithNormalTextures:timePerFrame:")] - SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame); - - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithNormalTextures:timePerFrame:resize:restore:")] - SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame, bool resize, bool restore); - - [MacCatalyst (13, 1)] - [Static] - [Export ("play")] - SKAction CreatePlay (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("pause")] - SKAction CreatePause (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("stop")] - SKAction CreateStop (); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changePlaybackRateTo:duration:")] - SKAction CreateChangePlaybackRate (float playbackRate, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changePlaybackRateBy:duration:")] - SKAction CreateChangePlaybackRateBy (float playbackRate, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeVolumeTo:duration:")] - SKAction CreateChangeVolume (float newVolume, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeVolumeBy:duration:")] - SKAction CreateChangeVolumeBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeChargeTo:duration:")] - SKAction CreateChangeChargeTo (float newCharge, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeChargeBy:duration:")] - SKAction CreateChangeChargeBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeMassTo:duration:")] - SKAction CreateChangeMassTo (float newMass, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeMassBy:duration:")] - SKAction CreateChangeMassBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyForce:duration:")] - SKAction CreateApplyForce (CGVector force, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyForce:atPoint:duration:")] - SKAction CreateApplyForce (CGVector force, CGPoint point, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyTorque:duration:")] - SKAction CreateApplyTorque (nfloat torque, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyImpulse:duration:")] - SKAction CreateApplyImpulse (CGVector impulse, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyImpulse:atPoint:duration:")] - SKAction CreateApplyImpulse (CGVector impulse, CGPoint point, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("applyAngularImpulse:duration:")] - SKAction CreateApplyAngularImpulse (nfloat impulse, double duration); - - // SKAction_SKAudioNode inlined - - [MacCatalyst (13, 1)] - [Static] - [Export ("stereoPanTo:duration:")] - SKAction CreateStereoPanTo (float target, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("stereoPanBy:duration:")] - SKAction CreateStereoPanBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeReverbTo:duration:")] - SKAction CreateChangeReverbTo (float target, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeReverbBy:duration:")] - SKAction CreateChangeReverbBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeObstructionTo:duration:")] - SKAction CreateChangeObstructionTo (float target, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeObstructionBy:duration:")] - SKAction CreateChangeObstructionBy (float by, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeOcclusionTo:duration:")] - SKAction CreateChangeOcclusionTo (float target, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("changeOcclusionBy:duration:")] - SKAction CreateChangeOcclusionBy (float by, double duration); - - // SKAction_SKWarpable - - [MacCatalyst (13, 1)] - [Static] - [Export ("warpTo:duration:")] - [return: NullAllowed] - SKAction WarpTo (SKWarpGeometry warp, double duration); - - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithWarps:times:")] - [return: NullAllowed] - SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times); - - [MacCatalyst (13, 1)] - [Static] - [Export ("animateWithWarps:times:restore:")] - [return: NullAllowed] - SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times, bool restore); - } + [Static, Export ("removeFromParent")] + SKAction RemoveFromParent (); + + [Static, Export ("performSelector:onTarget:")] + SKAction PerformSelector (Selector selector, NSObject target); + + [Static, Export ("runBlock:")] + SKAction Run (Action block); + + [Static, Export ("runBlock:queue:")] + SKAction Run (Action block, DispatchQueue queue); - /// + [Static, Export ("runAction:onChildWithName:")] + SKAction RunAction (SKAction action, string name); + + [Static, Export ("customActionWithDuration:actionBlock:")] + SKAction CustomActionWithDuration (double seconds, SKActionDurationHandler actionHandler); + + // + // iOS 8 cluster (a few more are above, as part of their family + // [MacCatalyst (13, 1)] - [DisableDefaultCtor] // see https://bugzilla.xamarin.com/show_bug.cgi?id=14502 - [BaseType (typeof (NSObject))] - partial interface SKPhysicsBody : NSSecureCoding, NSCopying { + [Static, Export ("hide")] + SKAction Hide (); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithBodies:")] - SKPhysicsBody FromBodies (SKPhysicsBody [] bodies); + [MacCatalyst (13, 1)] + [Static, Export ("unhide")] + SKAction Unhide (); - [Static, Export ("bodyWithCircleOfRadius:")] - SKPhysicsBody CreateCircularBody (nfloat radius); + [MacCatalyst (13, 1)] + [Static, Export ("reachTo:rootNode:duration:")] + SKAction ReachTo (CGPoint position, SKNode rootNode, double secs); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithCircleOfRadius:center:")] - SKPhysicsBody CreateCircularBody (nfloat radius, CGPoint center); + [MacCatalyst (13, 1)] + [Static, Export ("reachTo:rootNode:velocity:")] + SKAction ReachTo (CGPoint position, SKNode rootNode, nfloat velocity); - [Static, Export ("bodyWithRectangleOfSize:")] - SKPhysicsBody CreateRectangularBody (CGSize size); + [MacCatalyst (13, 1)] + [Static, Export ("reachToNode:rootNode:duration:")] + SKAction ReachToNode (SKNode node, SKNode rootNode, double sec); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithRectangleOfSize:center:")] - SKPhysicsBody CreateRectangularBody (CGSize size, CGPoint center); + [MacCatalyst (13, 1)] + [Static, Export ("reachToNode:rootNode:velocity:")] + SKAction ReachToNode (SKNode node, SKNode rootNode, nfloat velocity); - [Static, Export ("bodyWithPolygonFromPath:")] - SKPhysicsBody CreateBodyFromPath (CGPath path); + [MacCatalyst (13, 1)] + [Static, Export ("strengthTo:duration:")] + SKAction StrengthTo (float /* float, not CGFloat */ strength, double sec); - [Static, Export ("bodyWithEdgeFromPoint:toPoint:")] - SKPhysicsBody CreateEdge (CGPoint fromPoint, CGPoint toPoint); + [MacCatalyst (13, 1)] + [Static, Export ("strengthBy:duration:")] + SKAction StrengthBy (float /* float, not CGFloat */ strength, double sec); - [Static, Export ("bodyWithEdgeChainFromPath:")] - SKPhysicsBody CreateEdgeChain (CGPath path); + [MacCatalyst (13, 1)] + [NullAllowed, Export ("timingFunction", ArgumentSemantic.Assign)] + SKActionTimingFunction2 TimingFunction2 { get; set; } - [Static, Export ("bodyWithEdgeLoopFromPath:")] - SKPhysicsBody CreateEdgeLoop (CGPath path); + [MacCatalyst (13, 1)] + [Static, Export ("falloffBy:duration:")] + SKAction FalloffBy (float /* float, not CGFloat */ to, double duration); - [Static, Export ("bodyWithEdgeLoopFromRect:")] - SKPhysicsBody CreateEdgeLoop (CGRect rect); + [MacCatalyst (13, 1)] + [Static] + [Export ("falloffTo:duration:")] + SKAction FalloffTo (float falloff, double sec); - [Export ("dynamic")] - bool Dynamic { [Bind ("isDynamic")] get; set; } + // iOS 9 cluster + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:")] + [return: NullAllowed] + SKAction Create (string name); - [Export ("usesPreciseCollisionDetection")] - bool UsesPreciseCollisionDetection { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:duration:")] + [return: NullAllowed] + SKAction Create (string name, double duration); - [Export ("allowsRotation")] - bool AllowsRotation { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:fromURL:")] + [return: NullAllowed] + SKAction Create (string name, NSUrl url); - [Export ("resting")] - bool Resting { [Bind ("isResting")] get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("actionNamed:fromURL:duration:")] + [return: NullAllowed] + SKAction Create (string name, NSUrl url, double duration); - [Export ("friction")] - nfloat Friction { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("setNormalTexture:")] + SKAction SetNormalTexture (SKTexture texture); - [Export ("restitution")] - nfloat Restitution { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("setNormalTexture:resize:")] + SKAction SetNormalTexture (SKTexture texture, bool resize); - [Export ("linearDamping", ArgumentSemantic.Assign)] - nfloat LinearDamping { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithNormalTextures:timePerFrame:")] + SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame); - [Export ("angularDamping", ArgumentSemantic.Assign)] - nfloat AngularDamping { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithNormalTextures:timePerFrame:resize:restore:")] + SKAction AnimateWithNormalTextures (SKTexture [] textures, double secondsPerFrame, bool resize, bool restore); - [Export ("density")] - nfloat Density { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("play")] + SKAction CreatePlay (); - [Export ("mass")] - nfloat Mass { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("pause")] + SKAction CreatePause (); - [Export ("area")] - nfloat Area { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("stop")] + SKAction CreateStop (); - [Export ("affectedByGravity", ArgumentSemantic.Assign)] - bool AffectedByGravity { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changePlaybackRateTo:duration:")] + SKAction CreateChangePlaybackRate (float playbackRate, double duration); - [Export ("categoryBitMask", ArgumentSemantic.Assign)] - uint CategoryBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static] + [Export ("changePlaybackRateBy:duration:")] + SKAction CreateChangePlaybackRateBy (float playbackRate, double duration); - [Export ("collisionBitMask", ArgumentSemantic.Assign)] - uint CollisionBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static] + [Export ("changeVolumeTo:duration:")] + SKAction CreateChangeVolume (float newVolume, double duration); - [Export ("contactTestBitMask", ArgumentSemantic.Assign)] - uint ContactTestBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static] + [Export ("changeVolumeBy:duration:")] + SKAction CreateChangeVolumeBy (float by, double duration); - [Export ("joints")] - SKPhysicsJoint [] Joints { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeChargeTo:duration:")] + SKAction CreateChangeChargeTo (float newCharge, double duration); - [Export ("node", ArgumentSemantic.Weak)] - [NullAllowed] - SKNode Node { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeChargeBy:duration:")] + SKAction CreateChangeChargeBy (float by, double duration); - [Export ("velocity")] - CGVector Velocity { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeMassTo:duration:")] + SKAction CreateChangeMassTo (float newMass, double duration); - [Export ("angularVelocity")] - nfloat AngularVelocity { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeMassBy:duration:")] + SKAction CreateChangeMassBy (float by, double duration); - [Export ("applyForce:")] - void ApplyForce (CGVector force); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyForce:duration:")] + SKAction CreateApplyForce (CGVector force, double duration); - [Export ("applyForce:atPoint:")] - void ApplyForce (CGVector force, CGPoint point); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyForce:atPoint:duration:")] + SKAction CreateApplyForce (CGVector force, CGPoint point, double duration); - [Export ("applyTorque:")] - void ApplyTorque (nfloat torque); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyTorque:duration:")] + SKAction CreateApplyTorque (nfloat torque, double duration); - [Export ("applyImpulse:")] - void ApplyImpulse (CGVector impulse); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyImpulse:duration:")] + SKAction CreateApplyImpulse (CGVector impulse, double duration); - [Export ("applyImpulse:atPoint:")] - void ApplyImpulse (CGVector impulse, CGPoint point); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyImpulse:atPoint:duration:")] + SKAction CreateApplyImpulse (CGVector impulse, CGPoint point, double duration); - [Export ("applyAngularImpulse:")] - void ApplyAngularImpulse (nfloat impulse); + [MacCatalyst (13, 1)] + [Static] + [Export ("applyAngularImpulse:duration:")] + SKAction CreateApplyAngularImpulse (nfloat impulse, double duration); - [Export ("allContactedBodies")] - SKPhysicsBody [] AllContactedBodies { get; } + // SKAction_SKAudioNode inlined - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithTexture:size:")] - SKPhysicsBody Create (SKTexture texture, CGSize size); + [MacCatalyst (13, 1)] + [Static] + [Export ("stereoPanTo:duration:")] + SKAction CreateStereoPanTo (float target, double duration); - [MacCatalyst (13, 1)] - [Static, Export ("bodyWithTexture:alphaThreshold:size:")] - SKPhysicsBody Create (SKTexture texture, float /* float, not CGFloat */ alphaThreshold, CGSize size); + [MacCatalyst (13, 1)] + [Static] + [Export ("stereoPanBy:duration:")] + SKAction CreateStereoPanBy (float by, double duration); - [MacCatalyst (13, 1)] - [Export ("charge")] - nfloat Charge { get; set; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeReverbTo:duration:")] + SKAction CreateChangeReverbTo (float target, double duration); - [MacCatalyst (13, 1)] - [Export ("fieldBitMask")] - uint FieldBitMask { get; set; } /* uint32_t */ + [MacCatalyst (13, 1)] + [Static] + [Export ("changeReverbBy:duration:")] + SKAction CreateChangeReverbBy (float by, double duration); - [MacCatalyst (13, 1)] - [Export ("pinned")] - bool Pinned { get; set; } - } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeObstructionTo:duration:")] + SKAction CreateChangeObstructionTo (float target, double duration); - /// Encapsulates the data of a collision between two s. - /// - /// - /// Apple documentation for SKPhysicsContact [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // An SKPhysicsContact object is created automatically by Scene Kit - partial interface SKPhysicsContact { + [Static] + [Export ("changeObstructionBy:duration:")] + SKAction CreateChangeObstructionBy (float by, double duration); - [Export ("bodyA")] - SKPhysicsBody BodyA { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeOcclusionTo:duration:")] + SKAction CreateChangeOcclusionTo (float target, double duration); - [Export ("bodyB")] - SKPhysicsBody BodyB { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("changeOcclusionBy:duration:")] + SKAction CreateChangeOcclusionBy (float by, double duration); - [Export ("contactPoint")] - CGPoint ContactPoint { get; } + // SKAction_SKWarpable - [Export ("collisionImpulse")] - nfloat CollisionImpulse { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("warpTo:duration:")] + [return: NullAllowed] + SKAction WarpTo (SKWarpGeometry warp, double duration); - [MacCatalyst (13, 1)] - [Export ("contactNormal")] - CGVector ContactNormal { get; } + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithWarps:times:")] + [return: NullAllowed] + SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times); - } + [MacCatalyst (13, 1)] + [Static] + [Export ("animateWithWarps:times:restore:")] + [return: NullAllowed] + SKAction Animate (SKWarpGeometry [] warps, NSNumber [] times, bool restore); +} - /// Interface representing the required methods (if any) of the protocol . - /// - /// This interface contains the required methods (if any) from the protocol defined by . - /// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. - /// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. - /// - interface ISKPhysicsContactDelegate { } +/// +[MacCatalyst (13, 1)] +[DisableDefaultCtor] // see https://bugzilla.xamarin.com/show_bug.cgi?id=14502 +[BaseType (typeof (NSObject))] +partial interface SKPhysicsBody : NSSecureCoding, NSCopying { - /// [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [Model] - [Protocol] - partial interface SKPhysicsContactDelegate { + [Static, Export ("bodyWithBodies:")] + SKPhysicsBody FromBodies (SKPhysicsBody [] bodies); - [Export ("didBeginContact:")] - void DidBeginContact (SKPhysicsContact contact); + [Static, Export ("bodyWithCircleOfRadius:")] + SKPhysicsBody CreateCircularBody (nfloat radius); - [Export ("didEndContact:")] - void DidEndContact (SKPhysicsContact contact); - } + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithCircleOfRadius:center:")] + SKPhysicsBody CreateCircularBody (nfloat radius, CGPoint center); - /// - delegate void SKPhysicsWorldBodiesEnumeratorHandler (SKPhysicsBody body, out bool stop); - /// The delegate used for enumerating bodies that fall along a ray when used with M:SpriteKit.SKPhysicsWorld.EnumerateBodies(System.Drawing.PointF,System.Drawing.PointF,SpriteKit.SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler*. - delegate void SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler (SKPhysicsBody body, CGPoint point, CGVector normal, out bool stop); + [Static, Export ("bodyWithRectangleOfSize:")] + SKPhysicsBody CreateRectangularBody (CGSize size); - /// [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject), - Delegates = new string [] { "WeakContactDelegate" }, - Events = new Type [] { typeof (SKPhysicsContactDelegate) })] - [DisableDefaultCtor] // You do not create SKPhysicsWorld objects directly; instead, read the physicsWorld property of an SKScene object. - partial interface SKPhysicsWorld : NSSecureCoding { + [Static, Export ("bodyWithRectangleOfSize:center:")] + SKPhysicsBody CreateRectangularBody (CGSize size, CGPoint center); - [Export ("gravity")] - CGVector Gravity { get; set; } + [Static, Export ("bodyWithPolygonFromPath:")] + SKPhysicsBody CreateBodyFromPath (CGPath path); - [Export ("speed")] - nfloat Speed { get; set; } + [Static, Export ("bodyWithEdgeFromPoint:toPoint:")] + SKPhysicsBody CreateEdge (CGPoint fromPoint, CGPoint toPoint); - [Export ("contactDelegate", ArgumentSemantic.Assign), NullAllowed] - NSObject WeakContactDelegate { get; set; } + [Static, Export ("bodyWithEdgeChainFromPath:")] + SKPhysicsBody CreateEdgeChain (CGPath path); - [Wrap ("WeakContactDelegate")] - ISKPhysicsContactDelegate ContactDelegate { get; set; } + [Static, Export ("bodyWithEdgeLoopFromPath:")] + SKPhysicsBody CreateEdgeLoop (CGPath path); - [Export ("addJoint:")] - void AddJoint (SKPhysicsJoint joint); + [Static, Export ("bodyWithEdgeLoopFromRect:")] + SKPhysicsBody CreateEdgeLoop (CGRect rect); - [Export ("removeJoint:")] - void RemoveJoint (SKPhysicsJoint joint); + [Export ("dynamic")] + bool Dynamic { [Bind ("isDynamic")] get; set; } - [Export ("removeAllJoints")] - void RemoveAllJoints (); + [Export ("usesPreciseCollisionDetection")] + bool UsesPreciseCollisionDetection { get; set; } - [Export ("bodyAtPoint:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGPoint point); + [Export ("allowsRotation")] + bool AllowsRotation { get; set; } - [Export ("bodyInRect:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGRect rect); + [Export ("resting")] + bool Resting { [Bind ("isResting")] get; set; } - [Export ("bodyAlongRayStart:end:")] - [return: NullAllowed] - SKPhysicsBody GetBody (CGPoint rayStart, CGPoint rayEnd); + [Export ("friction")] + nfloat Friction { get; set; } - [Export ("enumerateBodiesAtPoint:usingBlock:")] - void EnumerateBodies (CGPoint point, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + [Export ("restitution")] + nfloat Restitution { get; set; } - [Export ("enumerateBodiesInRect:usingBlock:")] - void EnumerateBodies (CGRect rect, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + [Export ("linearDamping", ArgumentSemantic.Assign)] + nfloat LinearDamping { get; set; } - [Export ("enumerateBodiesAlongRayStart:end:usingBlock:")] - void EnumerateBodies (CGPoint start, CGPoint end, SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler enumeratorHandler); + [Export ("angularDamping", ArgumentSemantic.Assign)] + nfloat AngularDamping { get; set; } - // - // iOS 8 - // - [MacCatalyst (13, 1)] - [Export ("sampleFieldsAt:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector3 SampleFields (/* vector_float3 */ Vector3 position); - } + [Export ("density")] + nfloat Density { get; set; } - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [Abstract] // You never instantiate objects of this class directly - partial interface SKPhysicsJoint : NSSecureCoding { + [Export ("mass")] + nfloat Mass { get; set; } - [Export ("bodyA", ArgumentSemantic.Retain)] - SKPhysicsBody BodyA { get; set; } + [Export ("area")] + nfloat Area { get; } - [Export ("bodyB", ArgumentSemantic.Retain)] - SKPhysicsBody BodyB { get; set; } + [Export ("affectedByGravity", ArgumentSemantic.Assign)] + bool AffectedByGravity { get; set; } - [MacCatalyst (13, 1)] - [Export ("reactionForce")] - CGVector ReactionForce { get; } + [Export ("categoryBitMask", ArgumentSemantic.Assign)] + uint CategoryBitMask { get; set; } /* uint32_t */ - [MacCatalyst (13, 1)] - [Export ("reactionTorque")] - nfloat ReactionTorque { get; } - } + [Export ("collisionBitMask", ArgumentSemantic.Assign)] + uint CollisionBitMask { get; set; } /* uint32_t */ - /// A that pins two bodies to a common point. - /// - /// Apple documentation for SKPhysicsJointPin - [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // impossible to set the `anchor` using the default ctor (see #14511) - partial interface SKPhysicsJointPin { + [Export ("contactTestBitMask", ArgumentSemantic.Assign)] + uint ContactTestBitMask { get; set; } /* uint32_t */ - [Static, Export ("jointWithBodyA:bodyB:anchor:")] - SKPhysicsJointPin Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); + [Export ("joints")] + SKPhysicsJoint [] Joints { get; } - [Export ("shouldEnableLimits")] - bool ShouldEnableLimits { get; set; } + [Export ("node", ArgumentSemantic.Weak)] + [NullAllowed] + SKNode Node { get; } - [Export ("lowerAngleLimit")] - nfloat LowerAngleLimit { get; set; } + [Export ("velocity")] + CGVector Velocity { get; set; } - [Export ("upperAngleLimit")] - nfloat UpperAngleLimit { get; set; } + [Export ("angularVelocity")] + nfloat AngularVelocity { get; set; } - [Export ("frictionTorque")] - nfloat FrictionTorque { get; set; } + [Export ("applyForce:")] + void ApplyForce (CGVector force); - [MacCatalyst (13, 1)] - [Export ("rotationSpeed")] - nfloat RotationSpeed { get; set; } - } + [Export ("applyForce:atPoint:")] + void ApplyForce (CGVector force, CGPoint point); - /// A that connects two bodies as if by a spring. - /// - /// Apple documentation for SKPhysicsJointSpring - [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) - partial interface SKPhysicsJointSpring { + [Export ("applyTorque:")] + void ApplyTorque (nfloat torque); - [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] - SKPhysicsJointSpring Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); + [Export ("applyImpulse:")] + void ApplyImpulse (CGVector impulse); - [Export ("damping")] - nfloat Damping { get; set; } + [Export ("applyImpulse:atPoint:")] + void ApplyImpulse (CGVector impulse, CGPoint point); - [Export ("frequency")] - nfloat Frequency { get; set; } - } + [Export ("applyAngularImpulse:")] + void ApplyAngularImpulse (nfloat impulse); - /// A that rigidly connects two bodies. - /// - /// At least one of the s must have its property set to or this will not behave properly. - /// - /// Apple documentation for SKPhysicsJointFixed + [Export ("allContactedBodies")] + SKPhysicsBody [] AllContactedBodies { get; } + + // + // iOS 8 + // [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // https://bugzilla.xamarin.com/show_bug.cgi?id=14511 - partial interface SKPhysicsJointFixed { + [Static, Export ("bodyWithTexture:size:")] + SKPhysicsBody Create (SKTexture texture, CGSize size); - [Static, Export ("jointWithBodyA:bodyB:anchor:")] - SKPhysicsJointFixed Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); - } + [MacCatalyst (13, 1)] + [Static, Export ("bodyWithTexture:alphaThreshold:size:")] + SKPhysicsBody Create (SKTexture texture, float /* float, not CGFloat */ alphaThreshold, CGSize size); - /// A that connects two bodies as if by a sliding rod. - /// - /// Apple documentation for SKPhysicsJointSliding [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // impossible to set the `anchor` and `axis` using the default ctor (see #14511) - partial interface SKPhysicsJointSliding { + [Export ("charge")] + nfloat Charge { get; set; } - [Static, Export ("jointWithBodyA:bodyB:anchor:axis:")] - SKPhysicsJointSliding Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor, CGVector axis); + [MacCatalyst (13, 1)] + [Export ("fieldBitMask")] + uint FieldBitMask { get; set; } /* uint32_t */ - [Export ("shouldEnableLimits")] - bool ShouldEnableLimits { get; set; } + [MacCatalyst (13, 1)] + [Export ("pinned")] + bool Pinned { get; set; } +} - [Export ("lowerDistanceLimit")] - nfloat LowerDistanceLimit { get; set; } +/// Encapsulates the data of a collision between two s. +/// +/// +/// Apple documentation for SKPhysicsContact +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] // An SKPhysicsContact object is created automatically by Scene Kit +partial interface SKPhysicsContact { - [Export ("upperDistanceLimit")] - nfloat UpperDistanceLimit { get; set; } - } + [Export ("bodyA")] + SKPhysicsBody BodyA { get; } - /// A that connects two bodies as if by a rope. - /// - /// Apple documentation for SKPhysicsJointLimit - [MacCatalyst (13, 1)] - [BaseType (typeof (SKPhysicsJoint))] - [DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) - partial interface SKPhysicsJointLimit { + [Export ("bodyB")] + SKPhysicsBody BodyB { get; } - [Export ("maxLength")] - nfloat MaxLength { get; set; } + [Export ("contactPoint")] + CGPoint ContactPoint { get; } - [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] - SKPhysicsJointLimit Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); - } + [Export ("collisionImpulse")] + nfloat CollisionImpulse { get; } - /// Defines a range for acceptable float values. - /// - /// Apple documentation for SKRange [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKRange : NSSecureCoding, NSCopying { - [DesignatedInitializer] - [Export ("initWithLowerLimit:upperLimit:")] - NativeHandle Constructor (nfloat lowerLimit, nfloat upperLimier); + [Export ("contactNormal")] + CGVector ContactNormal { get; } - [Export ("lowerLimit")] - nfloat LowerLimit { get; set; } +} - [Export ("upperLimit")] - nfloat UpperLimit { get; set; } +/// Interface representing the required methods (if any) of the protocol . +/// +/// This interface contains the required methods (if any) from the protocol defined by . +/// If developers create classes that implement this interface, the implementation methods will automatically be exported to Objective-C with the matching signature from the method defined in the protocol. +/// Optional methods (if any) are provided by the class as extension methods to the interface, allowing developers to invoke any optional methods on the protocol. +/// +interface ISKPhysicsContactDelegate { } + +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[Model] +[Protocol] +partial interface SKPhysicsContactDelegate { + + [Export ("didBeginContact:")] + void DidBeginContact (SKPhysicsContact contact); + + [Export ("didEndContact:")] + void DidEndContact (SKPhysicsContact contact); +} - [Static, Export ("rangeWithLowerLimit:upperLimit:")] - SKRange Create (nfloat lower, nfloat upper); +/// +delegate void SKPhysicsWorldBodiesEnumeratorHandler (SKPhysicsBody body, out bool stop); +/// The delegate used for enumerating bodies that fall along a ray when used with M:SpriteKit.SKPhysicsWorld.EnumerateBodies(System.Drawing.PointF,System.Drawing.PointF,SpriteKit.SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler*. +delegate void SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler (SKPhysicsBody body, CGPoint point, CGVector normal, out bool stop); - [Static, Export ("rangeWithLowerLimit:")] - SKRange CreateWithLowerLimit (nfloat lower); +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject), + Delegates = new string [] { "WeakContactDelegate" }, + Events = new Type [] { typeof (SKPhysicsContactDelegate) })] +[DisableDefaultCtor] // You do not create SKPhysicsWorld objects directly; instead, read the physicsWorld property of an SKScene object. +partial interface SKPhysicsWorld : NSSecureCoding { - [Static, Export ("rangeWithUpperLimit:")] - SKRange CreateWithUpperLimit (nfloat upper); + [Export ("gravity")] + CGVector Gravity { get; set; } - [Static, Export ("rangeWithConstantValue:")] - SKRange CreateConstant (nfloat value); + [Export ("speed")] + nfloat Speed { get; set; } - [Static, Export ("rangeWithValue:variance:")] - SKRange CreateWithVariance (nfloat value, nfloat variance); + [Export ("contactDelegate", ArgumentSemantic.Assign), NullAllowed] + NSObject WeakContactDelegate { get; set; } - [Static, Export ("rangeWithNoLimits")] - SKRange CreateUnlimited (); - } + [Wrap ("WeakContactDelegate")] + ISKPhysicsContactDelegate ContactDelegate { get; set; } - /// A that holds audio information. - /// - /// Apple documentation for SKAudioNode - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - [DisableDefaultCtor] - interface SKAudioNode : NSSecureCoding { - [Export ("initWithAVAudioNode:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] AVAudioNode node); + [Export ("addJoint:")] + void AddJoint (SKPhysicsJoint joint); - [Export ("initWithFileNamed:")] - NativeHandle Constructor (string fileName); + [Export ("removeJoint:")] + void RemoveJoint (SKPhysicsJoint joint); - [Export ("initWithURL:")] - NativeHandle Constructor (NSUrl url); + [Export ("removeAllJoints")] + void RemoveAllJoints (); - [NullAllowed, Export ("avAudioNode", ArgumentSemantic.Retain)] - AVAudioNode AvAudioNode { get; set; } + [Export ("bodyAtPoint:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGPoint point); - [Export ("autoplayLooped")] - bool AutoplayLooped { get; set; } + [Export ("bodyInRect:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGRect rect); - [Export ("positional")] - bool Positional { [Bind ("isPositional")] get; set; } - } + [Export ("bodyAlongRayStart:end:")] + [return: NullAllowed] + SKPhysicsBody GetBody (CGPoint rayStart, CGPoint rayEnd); - /// A node that specifies the position inside a from which it can be rendered. - /// - /// Apple documentation for SKCameraNode + [Export ("enumerateBodiesAtPoint:usingBlock:")] + void EnumerateBodies (CGPoint point, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + + [Export ("enumerateBodiesInRect:usingBlock:")] + void EnumerateBodies (CGRect rect, SKPhysicsWorldBodiesEnumeratorHandler enumeratorHandler); + + [Export ("enumerateBodiesAlongRayStart:end:usingBlock:")] + void EnumerateBodies (CGPoint start, CGPoint end, SKPhysicsWorldBodiesAlongRayStartEnumeratorHandler enumeratorHandler); + + // + // iOS 8 + // [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKCameraNode { - [Export ("containsNode:")] - bool Contains (SKNode node); + [Export ("sampleFieldsAt:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector3 SampleFields (/* vector_float3 */ Vector3 position); +} - [Export ("containedNodeSet")] - NSSet ContainedNodeSet { get; } - } +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[Abstract] // You never instantiate objects of this class directly +partial interface SKPhysicsJoint : NSSecureCoding { + + [Export ("bodyA", ArgumentSemantic.Retain)] + SKPhysicsBody BodyA { get; set; } + + [Export ("bodyB", ArgumentSemantic.Retain)] + SKPhysicsBody BodyB { get; set; } - /// A that holds an archived collection of child nodes that can be used in multiple places throughout the game. - /// - /// Apple documentation for SKReferenceNode [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - [DisableDefaultCtor] - interface SKReferenceNode { - [Export ("initWithURL:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] NSUrl url); + [Export ("reactionForce")] + CGVector ReactionForce { get; } - [Export ("initWithFileNamed:")] - [DesignatedInitializer] - NativeHandle Constructor ([NullAllowed] string fileName); + [MacCatalyst (13, 1)] + [Export ("reactionTorque")] + nfloat ReactionTorque { get; } +} - [Static] - [Export ("referenceNodeWithFileNamed:")] - SKReferenceNode FromFile (string fileName); +/// A that pins two bodies to a common point. +/// +/// Apple documentation for SKPhysicsJointPin +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // impossible to set the `anchor` using the default ctor (see #14511) +partial interface SKPhysicsJointPin { - [Static] - [Export ("referenceNodeWithURL:")] - SKReferenceNode FromUrl (NSUrl referenceUrl); + [Static, Export ("jointWithBodyA:bodyB:anchor:")] + SKPhysicsJointPin Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); - [Export ("didLoadReferenceNode:")] - void DidLoadReferenceNode ([NullAllowed] SKNode node); + [Export ("shouldEnableLimits")] + bool ShouldEnableLimits { get; set; } - [Export ("resolveReferenceNode")] - void Resolve (); - } + [Export ("lowerAngleLimit")] + nfloat LowerAngleLimit { get; set; } + + [Export ("upperAngleLimit")] + nfloat UpperAngleLimit { get; set; } + + [Export ("frictionTorque")] + nfloat FrictionTorque { get; set; } - /// Holds per-node data to be used with a custom shader. - /// - /// Apple documentation for SKAttribute [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface SKAttribute : NSSecureCoding { - [Static] - [Export ("attributeWithName:type:")] - SKAttribute Create (string name, SKAttributeType type); + [Export ("rotationSpeed")] + nfloat RotationSpeed { get; set; } +} - [Export ("initWithName:type:")] - [DesignatedInitializer] - NativeHandle Constructor (string name, SKAttributeType type); +/// A that connects two bodies as if by a spring. +/// +/// Apple documentation for SKPhysicsJointSpring +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) +partial interface SKPhysicsJointSpring { - [Export ("name")] - string Name { get; } + [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] + SKPhysicsJointSpring Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); - [Export ("type")] - SKAttributeType Type { get; } - } + [Export ("damping")] + nfloat Damping { get; set; } - /// Holds the value, of the appropriate , for an . - /// - /// Apple documentation for SKAttributeValue - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] // DesignatedInitializer below - interface SKAttributeValue : NSSecureCoding { - [DesignatedInitializer] - [Export ("init")] - NativeHandle Constructor (); + [Export ("frequency")] + nfloat Frequency { get; set; } +} + +/// A that rigidly connects two bodies. +/// +/// At least one of the s must have its property set to or this will not behave properly. +/// +/// Apple documentation for SKPhysicsJointFixed +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // https://bugzilla.xamarin.com/show_bug.cgi?id=14511 +partial interface SKPhysicsJointFixed { + + [Static, Export ("jointWithBodyA:bodyB:anchor:")] + SKPhysicsJointFixed Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor); +} + +/// A that connects two bodies as if by a sliding rod. +/// +/// Apple documentation for SKPhysicsJointSliding +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // impossible to set the `anchor` and `axis` using the default ctor (see #14511) +partial interface SKPhysicsJointSliding { + + [Static, Export ("jointWithBodyA:bodyB:anchor:axis:")] + SKPhysicsJointSliding Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchor, CGVector axis); + + [Export ("shouldEnableLimits")] + bool ShouldEnableLimits { get; set; } + + [Export ("lowerDistanceLimit")] + nfloat LowerDistanceLimit { get; set; } + + [Export ("upperDistanceLimit")] + nfloat UpperDistanceLimit { get; set; } +} + +/// A that connects two bodies as if by a rope. +/// +/// Apple documentation for SKPhysicsJointLimit +[MacCatalyst (13, 1)] +[BaseType (typeof (SKPhysicsJoint))] +[DisableDefaultCtor] // impossible to set the `anchorA` and `anchorB` using the default ctor (see #14511) +partial interface SKPhysicsJointLimit { + + [Export ("maxLength")] + nfloat MaxLength { get; set; } + + [Static, Export ("jointWithBodyA:bodyB:anchorA:anchorB:")] + SKPhysicsJointLimit Create (SKPhysicsBody bodyA, SKPhysicsBody bodyB, CGPoint anchorA, CGPoint anchorB); +} + +/// Defines a range for acceptable float values. +/// +/// Apple documentation for SKRange +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKRange : NSSecureCoding, NSCopying { + [DesignatedInitializer] + [Export ("initWithLowerLimit:upperLimit:")] + NativeHandle Constructor (nfloat lowerLimit, nfloat upperLimier); + + [Export ("lowerLimit")] + nfloat LowerLimit { get; set; } + + [Export ("upperLimit")] + nfloat UpperLimit { get; set; } + + [Static, Export ("rangeWithLowerLimit:upperLimit:")] + SKRange Create (nfloat lower, nfloat upper); + + [Static, Export ("rangeWithLowerLimit:")] + SKRange CreateWithLowerLimit (nfloat lower); + + [Static, Export ("rangeWithUpperLimit:")] + SKRange CreateWithUpperLimit (nfloat upper); + + [Static, Export ("rangeWithConstantValue:")] + SKRange CreateConstant (nfloat value); + + [Static, Export ("rangeWithValue:variance:")] + SKRange CreateWithVariance (nfloat value, nfloat variance); + + [Static, Export ("rangeWithNoLimits")] + SKRange CreateUnlimited (); +} + +/// A that holds audio information. +/// +/// Apple documentation for SKAudioNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +[DisableDefaultCtor] +interface SKAudioNode : NSSecureCoding { + [Export ("initWithAVAudioNode:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] AVAudioNode node); + + [Export ("initWithFileNamed:")] + NativeHandle Constructor (string fileName); - [Static] - [Export ("valueWithFloat:")] - SKAttributeValue Create (float value); + [Export ("initWithURL:")] + NativeHandle Constructor (NSUrl url); - [Static] - [Export ("valueWithVectorFloat2:")] + [NullAllowed, Export ("avAudioNode", ArgumentSemantic.Retain)] + AVAudioNode AvAudioNode { get; set; } + + [Export ("autoplayLooped")] + bool AutoplayLooped { get; set; } + + [Export ("positional")] + bool Positional { [Bind ("isPositional")] get; set; } +} + +/// A node that specifies the position inside a from which it can be rendered. +/// +/// Apple documentation for SKCameraNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKCameraNode { + [Export ("containsNode:")] + bool Contains (SKNode node); + + [Export ("containedNodeSet")] + NSSet ContainedNodeSet { get; } +} + +/// A that holds an archived collection of child nodes that can be used in multiple places throughout the game. +/// +/// Apple documentation for SKReferenceNode +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +[DisableDefaultCtor] +interface SKReferenceNode { + [Export ("initWithURL:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] NSUrl url); + + [Export ("initWithFileNamed:")] + [DesignatedInitializer] + NativeHandle Constructor ([NullAllowed] string fileName); + + [Static] + [Export ("referenceNodeWithFileNamed:")] + SKReferenceNode FromFile (string fileName); + + [Static] + [Export ("referenceNodeWithURL:")] + SKReferenceNode FromUrl (NSUrl referenceUrl); + + [Export ("didLoadReferenceNode:")] + void DidLoadReferenceNode ([NullAllowed] SKNode node); + + [Export ("resolveReferenceNode")] + void Resolve (); +} + +/// Holds per-node data to be used with a custom shader. +/// +/// Apple documentation for SKAttribute +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +interface SKAttribute : NSSecureCoding { + [Static] + [Export ("attributeWithName:type:")] + SKAttribute Create (string name, SKAttributeType type); + + [Export ("initWithName:type:")] + [DesignatedInitializer] + NativeHandle Constructor (string name, SKAttributeType type); + + [Export ("name")] + string Name { get; } + + [Export ("type")] + SKAttributeType Type { get; } +} + +/// Holds the value, of the appropriate , for an . +/// +/// Apple documentation for SKAttributeValue +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] // DesignatedInitializer below +interface SKAttributeValue : NSSecureCoding { + [DesignatedInitializer] + [Export ("init")] + NativeHandle Constructor (); + + [Static] + [Export ("valueWithFloat:")] + SKAttributeValue Create (float value); + + [Static] + [Export ("valueWithVectorFloat2:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKAttributeValue Create (Vector2 value); + + [Static] + [Export ("valueWithVectorFloat3:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKAttributeValue Create (Vector3 value); + + [Static] + [Export ("valueWithVectorFloat4:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + SKAttributeValue Create (Vector4 value); + + [Export ("floatValue")] + float FloatValue { get; set; } + + [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] + Vector2 VectorFloat2Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector2 value); + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } - [Static] - [Export ("valueWithVectorFloat3:")] + [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] + Vector3 VectorFloat3Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector3 value); + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } - [Static] - [Export ("valueWithVectorFloat4:")] + [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] + Vector4 VectorFloat4Value { [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - SKAttributeValue Create (Vector4 value); - - [Export ("floatValue")] - float FloatValue { get; set; } - - [Export ("vectorFloat2Value", ArgumentSemantic.Assign)] - Vector2 VectorFloat2Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Export ("vectorFloat3Value", ArgumentSemantic.Assign)] - Vector3 VectorFloat3Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Export ("vectorFloat4Value", ArgumentSemantic.Assign)] - Vector4 VectorFloat4Value { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; } +} - /// A single kind of tile in a tile map. - /// - /// Apple documentation for SKTileDefinition - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface SKTileDefinition : NSCopying, NSSecureCoding { - [Static] - [Export ("tileDefinitionWithTexture:")] - SKTileDefinition Create (SKTexture texture); +/// A single kind of tile in a tile map. +/// +/// Apple documentation for SKTileDefinition +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +interface SKTileDefinition : NSCopying, NSSecureCoding { + [Static] + [Export ("tileDefinitionWithTexture:")] + SKTileDefinition Create (SKTexture texture); + + [Static] + [Export ("tileDefinitionWithTexture:size:")] + SKTileDefinition Create (SKTexture texture, CGSize size); + + [Static] + [Export ("tileDefinitionWithTexture:normalTexture:size:")] + SKTileDefinition Create (SKTexture texture, SKTexture normalTexture, CGSize size); - [Static] - [Export ("tileDefinitionWithTexture:size:")] - SKTileDefinition Create (SKTexture texture, CGSize size); + [Static] + [Export ("tileDefinitionWithTextures:size:timePerFrame:")] + SKTileDefinition Create (SKTexture [] textures, CGSize size, nfloat timePerFrame); - [Static] - [Export ("tileDefinitionWithTexture:normalTexture:size:")] - SKTileDefinition Create (SKTexture texture, SKTexture normalTexture, CGSize size); + [Static] + [Export ("tileDefinitionWithTextures:normalTextures:size:timePerFrame:")] + SKTileDefinition Create (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); - [Static] - [Export ("tileDefinitionWithTextures:size:timePerFrame:")] - SKTileDefinition Create (SKTexture [] textures, CGSize size, nfloat timePerFrame); + [Export ("initWithTexture:")] + NativeHandle Constructor (SKTexture texture); - [Static] - [Export ("tileDefinitionWithTextures:normalTextures:size:timePerFrame:")] - SKTileDefinition Create (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); + [Export ("initWithTexture:size:")] + NativeHandle Constructor (SKTexture texture, CGSize size); - [Export ("initWithTexture:")] - NativeHandle Constructor (SKTexture texture); + [Export ("initWithTexture:normalTexture:size:")] + NativeHandle Constructor (SKTexture texture, SKTexture normalTexture, CGSize size); - [Export ("initWithTexture:size:")] - NativeHandle Constructor (SKTexture texture, CGSize size); + [Export ("initWithTextures:size:timePerFrame:")] + NativeHandle Constructor (SKTexture [] textures, CGSize size, nfloat timePerFrame); - [Export ("initWithTexture:normalTexture:size:")] - NativeHandle Constructor (SKTexture texture, SKTexture normalTexture, CGSize size); + [Export ("initWithTextures:normalTextures:size:timePerFrame:")] + NativeHandle Constructor (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); - [Export ("initWithTextures:size:timePerFrame:")] - NativeHandle Constructor (SKTexture [] textures, CGSize size, nfloat timePerFrame); + [Export ("textures", ArgumentSemantic.Copy)] + SKTexture [] Textures { get; set; } - [Export ("initWithTextures:normalTextures:size:timePerFrame:")] - NativeHandle Constructor (SKTexture [] textures, SKTexture [] normalTextures, CGSize size, nfloat timePerFrame); + [Export ("normalTextures", ArgumentSemantic.Copy)] + SKTexture [] NormalTextures { get; set; } - [Export ("textures", ArgumentSemantic.Copy)] - SKTexture [] Textures { get; set; } + [NullAllowed, Export ("userData", ArgumentSemantic.Retain)] + NSMutableDictionary UserData { get; set; } - [Export ("normalTextures", ArgumentSemantic.Copy)] - SKTexture [] NormalTextures { get; set; } + [NullAllowed, Export ("name")] + string Name { get; set; } - [NullAllowed, Export ("userData", ArgumentSemantic.Retain)] - NSMutableDictionary UserData { get; set; } + [Export ("size", ArgumentSemantic.Assign)] + CGSize Size { get; set; } - [NullAllowed, Export ("name")] - string Name { get; set; } + [Export ("timePerFrame")] + nfloat TimePerFrame { get; set; } - [Export ("size", ArgumentSemantic.Assign)] - CGSize Size { get; set; } + [Export ("placementWeight")] + nuint PlacementWeight { get; set; } - [Export ("timePerFrame")] - nfloat TimePerFrame { get; set; } + [Export ("rotation", ArgumentSemantic.Assign)] + SKTileDefinitionRotation Rotation { get; set; } - [Export ("placementWeight")] - nuint PlacementWeight { get; set; } + [Export ("flipVertically")] + bool FlipVertically { get; set; } - [Export ("rotation", ArgumentSemantic.Assign)] - SKTileDefinitionRotation Rotation { get; set; } + [Export ("flipHorizontally")] + bool FlipHorizontally { get; set; } +} - [Export ("flipVertically")] - bool FlipVertically { get; set; } +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKTileMapNode : NSCopying, NSSecureCoding { + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); - [Export ("flipHorizontally")] - bool FlipHorizontally { get; set; } - } + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKTileMapNode : NSCopying, NSSecureCoding { - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); + [Static] + [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:tileGroupLayout:")] + SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); + [Export ("initWithTileSet:columns:rows:tileSize:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); - [Static] - [Export ("tileMapNodeWithTileSet:columns:rows:tileSize:tileGroupLayout:")] - SKTileMapNode Create (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); + [Export ("initWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); - [Export ("initWithTileSet:columns:rows:tileSize:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize); + [Export ("initWithTileSet:columns:rows:tileSize:tileGroupLayout:")] + NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); - [Export ("initWithTileSet:columns:rows:tileSize:fillWithTileGroup:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup tileGroup); + [Export ("numberOfColumns")] + nuint NumberOfColumns { get; set; } - [Export ("initWithTileSet:columns:rows:tileSize:tileGroupLayout:")] - NativeHandle Constructor (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, SKTileGroup [] tileGroupLayout); + [Export ("numberOfRows")] + nuint NumberOfRows { get; set; } - [Export ("numberOfColumns")] - nuint NumberOfColumns { get; set; } + [Export ("tileSize", ArgumentSemantic.Assign)] + CGSize TileSize { get; set; } - [Export ("numberOfRows")] - nuint NumberOfRows { get; set; } + [Export ("mapSize")] + CGSize MapSize { get; } - [Export ("tileSize", ArgumentSemantic.Assign)] - CGSize TileSize { get; set; } + [Export ("tileSet", ArgumentSemantic.Assign)] + SKTileSet TileSet { get; set; } - [Export ("mapSize")] - CGSize MapSize { get; } + [Export ("colorBlendFactor")] + nfloat ColorBlendFactor { get; set; } - [Export ("tileSet", ArgumentSemantic.Assign)] - SKTileSet TileSet { get; set; } + [Export ("color", ArgumentSemantic.Retain)] + UIColor Color { get; set; } - [Export ("colorBlendFactor")] - nfloat ColorBlendFactor { get; set; } + [Export ("blendMode", ArgumentSemantic.Assign)] + SKBlendMode BlendMode { get; set; } - [Export ("color", ArgumentSemantic.Retain)] - UIColor Color { get; set; } + [Export ("anchorPoint", ArgumentSemantic.Assign)] + CGPoint AnchorPoint { get; set; } - [Export ("blendMode", ArgumentSemantic.Assign)] - SKBlendMode BlendMode { get; set; } + [NullAllowed, Export ("shader", ArgumentSemantic.Retain)] + SKShader Shader { get; set; } - [Export ("anchorPoint", ArgumentSemantic.Assign)] - CGPoint AnchorPoint { get; set; } + [Export ("lightingBitMask")] + uint LightingBitMask { get; set; } - [NullAllowed, Export ("shader", ArgumentSemantic.Retain)] - SKShader Shader { get; set; } + [Export ("enableAutomapping")] + bool EnableAutomapping { get; set; } - [Export ("lightingBitMask")] - uint LightingBitMask { get; set; } + [Export ("fillWithTileGroup:")] + void Fill ([NullAllowed] SKTileGroup tileGroup); - [Export ("enableAutomapping")] - bool EnableAutomapping { get; set; } + [Export ("tileDefinitionAtColumn:row:")] + [return: NullAllowed] + SKTileDefinition GetTileDefinition (nuint column, nuint row); - [Export ("fillWithTileGroup:")] - void Fill ([NullAllowed] SKTileGroup tileGroup); + [Export ("tileGroupAtColumn:row:")] + [return: NullAllowed] + SKTileGroup GetTileGroup (nuint column, nuint row); - [Export ("tileDefinitionAtColumn:row:")] - [return: NullAllowed] - SKTileDefinition GetTileDefinition (nuint column, nuint row); + [Export ("setTileGroup:forColumn:row:")] + void SetTileGroup ([NullAllowed] SKTileGroup tileGroup, nuint column, nuint row); - [Export ("tileGroupAtColumn:row:")] - [return: NullAllowed] - SKTileGroup GetTileGroup (nuint column, nuint row); + [Export ("setTileGroup:andTileDefinition:forColumn:row:")] + void SetTileGroup (SKTileGroup tileGroup, SKTileDefinition tileDefinition, nuint column, nuint row); - [Export ("setTileGroup:forColumn:row:")] - void SetTileGroup ([NullAllowed] SKTileGroup tileGroup, nuint column, nuint row); + [Export ("tileColumnIndexFromPosition:")] + nuint GetTileColumnIndex (CGPoint position); - [Export ("setTileGroup:andTileDefinition:forColumn:row:")] - void SetTileGroup (SKTileGroup tileGroup, SKTileDefinition tileDefinition, nuint column, nuint row); + [Export ("tileRowIndexFromPosition:")] + nuint GetTileRowIndex (CGPoint position); - [Export ("tileColumnIndexFromPosition:")] - nuint GetTileColumnIndex (CGPoint position); + [Export ("centerOfTileAtColumn:row:")] + CGPoint GetCenterOfTile (nuint column, nuint row); - [Export ("tileRowIndexFromPosition:")] - nuint GetTileRowIndex (CGPoint position); + // Static Category from GameplayKit + [MacCatalyst (13, 1)] + [Static] + [Export ("tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:")] + SKTileMapNode [] FromTileSet (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, GKNoiseMap noiseMap, NSNumber [] thresholds); - [Export ("centerOfTileAtColumn:row:")] - CGPoint GetCenterOfTile (nuint column, nuint row); + [Export ("attributeValues", ArgumentSemantic.Copy)] + NSDictionary AttributeValues { get; set; } - // Static Category from GameplayKit - [MacCatalyst (13, 1)] - [Static] - [Export ("tileMapNodesWithTileSet:columns:rows:tileSize:fromNoiseMap:tileTypeNoiseMapThresholds:")] - SKTileMapNode [] FromTileSet (SKTileSet tileSet, nuint columns, nuint rows, CGSize tileSize, GKNoiseMap noiseMap, NSNumber [] thresholds); + [Export ("valueForAttributeNamed:")] + [return: NullAllowed] + SKAttributeValue GetValue (string key); - [Export ("attributeValues", ArgumentSemantic.Copy)] - NSDictionary AttributeValues { get; set; } + [Export ("setValue:forAttributeNamed:")] + void SetValue (SKAttributeValue value, string key); +} - [Export ("valueForAttributeNamed:")] - [return: NullAllowed] - SKAttributeValue GetValue (string key); +/// Represents the possible elements of a in the form of objects. +/// +/// An collects a set of related objects that may be placed on a . Additionally, it may define a default tile group and tile size. +/// +/// Apple documentation for SKTileSet +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKTileSet : NSCopying, NSSecureCoding { + [Static] + [Export ("tileSetWithTileGroups:")] + SKTileSet Create (SKTileGroup [] tileGroups); - [Export ("setValue:forAttributeNamed:")] - void SetValue (SKAttributeValue value, string key); - } + [Static] + [Export ("tileSetWithTileGroups:tileSetType:")] + SKTileSet Create (SKTileGroup [] tileGroups, SKTileSetType tileSetType); - /// Represents the possible elements of a in the form of objects. - /// - /// An collects a set of related objects that may be placed on a . Additionally, it may define a default tile group and tile size. - /// - /// Apple documentation for SKTileSet - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKTileSet : NSCopying, NSSecureCoding { - [Static] - [Export ("tileSetWithTileGroups:")] - SKTileSet Create (SKTileGroup [] tileGroups); + [Export ("initWithTileGroups:")] + NativeHandle Constructor (SKTileGroup [] tileGroups); - [Static] - [Export ("tileSetWithTileGroups:tileSetType:")] - SKTileSet Create (SKTileGroup [] tileGroups, SKTileSetType tileSetType); + [Export ("initWithTileGroups:tileSetType:")] + NativeHandle Constructor (SKTileGroup [] tileGroups, SKTileSetType tileSetType); - [Export ("initWithTileGroups:")] - NativeHandle Constructor (SKTileGroup [] tileGroups); + [Static] + [Export ("tileSetNamed:")] + [return: NullAllowed] + SKTileSet FromName (string name); - [Export ("initWithTileGroups:tileSetType:")] - NativeHandle Constructor (SKTileGroup [] tileGroups, SKTileSetType tileSetType); + [Static] + [Export ("tileSetFromURL:")] + [return: NullAllowed] + SKTileSet FromUrl (NSUrl url); - [Static] - [Export ("tileSetNamed:")] - [return: NullAllowed] - SKTileSet FromName (string name); + [Export ("tileGroups", ArgumentSemantic.Copy)] + SKTileGroup [] TileGroups { get; set; } - [Static] - [Export ("tileSetFromURL:")] - [return: NullAllowed] - SKTileSet FromUrl (NSUrl url); + [NullAllowed, Export ("name")] + string Name { get; set; } - [Export ("tileGroups", ArgumentSemantic.Copy)] - SKTileGroup [] TileGroups { get; set; } + [Export ("type", ArgumentSemantic.Assign)] + SKTileSetType Type { get; set; } - [NullAllowed, Export ("name")] - string Name { get; set; } + [NullAllowed, Export ("defaultTileGroup", ArgumentSemantic.Assign)] + SKTileGroup DefaultTileGroup { get; set; } - [Export ("type", ArgumentSemantic.Assign)] - SKTileSetType Type { get; set; } + [Export ("defaultTileSize", ArgumentSemantic.Assign)] + CGSize DefaultTileSize { get; set; } +} - [NullAllowed, Export ("defaultTileGroup", ArgumentSemantic.Assign)] - SKTileGroup DefaultTileGroup { get; set; } +/// +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKTileGroup : NSCopying, NSSecureCoding { + [Static] + [Export ("tileGroupWithTileDefinition:")] + SKTileGroup Create (SKTileDefinition tileDefinition); - [Export ("defaultTileSize", ArgumentSemantic.Assign)] - CGSize DefaultTileSize { get; set; } - } + [Static] + [Export ("tileGroupWithRules:")] + SKTileGroup Create (SKTileGroupRule [] rules); - /// - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKTileGroup : NSCopying, NSSecureCoding { - [Static] - [Export ("tileGroupWithTileDefinition:")] - SKTileGroup Create (SKTileDefinition tileDefinition); + [Static] + [Export ("emptyTileGroup")] + SKTileGroup CreateEmpty (); - [Static] - [Export ("tileGroupWithRules:")] - SKTileGroup Create (SKTileGroupRule [] rules); + [Export ("initWithTileDefinition:")] + NativeHandle Constructor (SKTileDefinition tileDefinition); - [Static] - [Export ("emptyTileGroup")] - SKTileGroup CreateEmpty (); + [Export ("initWithRules:")] + NativeHandle Constructor (SKTileGroupRule [] rules); - [Export ("initWithTileDefinition:")] - NativeHandle Constructor (SKTileDefinition tileDefinition); + [Export ("rules", ArgumentSemantic.Copy)] + SKTileGroupRule [] Rules { get; set; } - [Export ("initWithRules:")] - NativeHandle Constructor (SKTileGroupRule [] rules); + [NullAllowed, Export ("name")] + string Name { get; set; } +} - [Export ("rules", ArgumentSemantic.Copy)] - SKTileGroupRule [] Rules { get; set; } +/// Defines adjacency rules for tiles in an . +/// +/// Apple documentation for SKTileGroupRule +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKTileGroupRule : NSCopying, NSSecureCoding { + [Static] + [Export ("tileGroupRuleWithAdjacency:tileDefinitions:")] + SKTileGroupRule Create (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); - [NullAllowed, Export ("name")] - string Name { get; set; } - } + [Export ("initWithAdjacency:tileDefinitions:")] + NativeHandle Constructor (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); - /// Defines adjacency rules for tiles in an . - /// - /// Apple documentation for SKTileGroupRule - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKTileGroupRule : NSCopying, NSSecureCoding { - [Static] - [Export ("tileGroupRuleWithAdjacency:tileDefinitions:")] - SKTileGroupRule Create (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); + [Export ("adjacency", ArgumentSemantic.Assign)] + SKTileAdjacencyMask Adjacency { get; set; } - [Export ("initWithAdjacency:tileDefinitions:")] - NativeHandle Constructor (SKTileAdjacencyMask adjacency, SKTileDefinition [] tileDefinitions); + [Export ("tileDefinitions", ArgumentSemantic.Copy)] + SKTileDefinition [] TileDefinitions { get; set; } - [Export ("adjacency", ArgumentSemantic.Assign)] - SKTileAdjacencyMask Adjacency { get; set; } + [NullAllowed, Export ("name")] + string Name { get; set; } +} - [Export ("tileDefinitions", ArgumentSemantic.Copy)] - SKTileDefinition [] TileDefinitions { get; set; } +/// Defines geometry deformation on objects. +/// +/// Apple documentation for SKWarpGeometry +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +interface SKWarpGeometry : NSCopying, NSSecureCoding { } + +/// Associates a and subdivision levels with an implementation. +[MacCatalyst (13, 1)] +[Protocol] +interface SKWarpable { + [Abstract] + [NullAllowed, Export ("warpGeometry", ArgumentSemantic.Assign)] + SKWarpGeometry WarpGeometry { get; set; } + + [Abstract] + [Export ("subdivisionLevels")] + nint SubdivisionLevels { get; set; } +} - [NullAllowed, Export ("name")] - string Name { get; set; } - } +/// A subclass that defines a warpable grid. +/// +/// Apple documentation for SKWarpGeometryGrid +[MacCatalyst (13, 1)] +[BaseType (typeof (SKWarpGeometry))] +[DisableDefaultCtor] +interface SKWarpGeometryGrid : NSSecureCoding { + [Static] + [Export ("grid")] + SKWarpGeometryGrid GetGrid (); - /// Defines geometry deformation on objects. - /// - /// Apple documentation for SKWarpGeometry - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - interface SKWarpGeometry : NSCopying, NSSecureCoding { } + [Static] + [Export ("gridWithColumns:rows:")] + SKWarpGeometryGrid Create (nint cols, nint rows); - /// Associates a and subdivision levels with an implementation. - [MacCatalyst (13, 1)] - [Protocol] - interface SKWarpable { - [Abstract] - [NullAllowed, Export ("warpGeometry", ArgumentSemantic.Assign)] - SKWarpGeometry WarpGeometry { get; set; } + [Internal] + [Static] + [Export ("gridWithColumns:rows:sourcePositions:destPositions:")] + SKWarpGeometryGrid GridWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); - [Abstract] - [Export ("subdivisionLevels")] - nint SubdivisionLevels { get; set; } - } + [Internal] + [DesignatedInitializer] + [Export ("initWithColumns:rows:sourcePositions:destPositions:")] + IntPtr InitWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); - /// A subclass that defines a warpable grid. - /// - /// Apple documentation for SKWarpGeometryGrid - [MacCatalyst (13, 1)] - [BaseType (typeof (SKWarpGeometry))] - [DisableDefaultCtor] - interface SKWarpGeometryGrid : NSSecureCoding { - [Static] - [Export ("grid")] - SKWarpGeometryGrid GetGrid (); + [Export ("numberOfColumns")] + nint NumberOfColumns { get; } - [Static] - [Export ("gridWithColumns:rows:")] - SKWarpGeometryGrid Create (nint cols, nint rows); + [Export ("numberOfRows")] + nint NumberOfRows { get; } - [Internal] - [Static] - [Export ("gridWithColumns:rows:sourcePositions:destPositions:")] - SKWarpGeometryGrid GridWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); + [Export ("vertexCount")] + nint VertexCount { get; } - [Internal] - [DesignatedInitializer] - [Export ("initWithColumns:rows:sourcePositions:destPositions:")] - IntPtr InitWithColumns (nint cols, nint rows, [NullAllowed] IntPtr sourcePositions, [NullAllowed] IntPtr destPositions); + [Export ("sourcePositionAtIndex:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector2 GetSourcePosition (nint index); - [Export ("numberOfColumns")] - nint NumberOfColumns { get; } + [Export ("destPositionAtIndex:")] + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + Vector2 GetDestPosition (nint index); - [Export ("numberOfRows")] - nint NumberOfRows { get; } + [Internal] + [Export ("gridByReplacingSourcePositions:")] + SKWarpGeometryGrid _GridByReplacingSourcePositions (IntPtr sourcePositions); - [Export ("vertexCount")] - nint VertexCount { get; } + [Internal] + [Export ("gridByReplacingDestPositions:")] + SKWarpGeometryGrid _GridByReplacingDestPositions (IntPtr destPositions); +} - [Export ("sourcePositionAtIndex:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector2 GetSourcePosition (nint index); +// SKRenderer is not available for WatchKit apps and the iOS simulator +/// The class used to render SpriteKit. +[MacCatalyst (13, 1)] +[BaseType (typeof (NSObject))] +[DisableDefaultCtor] +interface SKRenderer { + [Static] + [Export ("rendererWithDevice:")] + SKRenderer FromDevice (IMTLDevice device); - [Export ("destPositionAtIndex:")] - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - Vector2 GetDestPosition (nint index); + [Export ("renderWithViewport:commandBuffer:renderPassDescriptor:")] + void Render (CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); - [Internal] - [Export ("gridByReplacingSourcePositions:")] - SKWarpGeometryGrid _GridByReplacingSourcePositions (IntPtr sourcePositions); + [Export ("renderWithViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:")] + void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); - [Internal] - [Export ("gridByReplacingDestPositions:")] - SKWarpGeometryGrid _GridByReplacingDestPositions (IntPtr destPositions); - } + [Export ("updateAtTime:")] + void Update (double currentTime); - // SKRenderer is not available for WatchKit apps and the iOS simulator - /// The class used to render SpriteKit. - [MacCatalyst (13, 1)] - [BaseType (typeof (NSObject))] - [DisableDefaultCtor] - interface SKRenderer { - [Static] - [Export ("rendererWithDevice:")] - SKRenderer FromDevice (IMTLDevice device); + [NullAllowed, Export ("scene", ArgumentSemantic.Assign)] + SKScene Scene { get; set; } - [Export ("renderWithViewport:commandBuffer:renderPassDescriptor:")] - void Render (CGRect viewport, IMTLCommandBuffer commandBuffer, MTLRenderPassDescriptor renderPassDescriptor); + [Export ("ignoresSiblingOrder")] + bool IgnoresSiblingOrder { get; set; } - [Export ("renderWithViewport:renderCommandEncoder:renderPassDescriptor:commandQueue:")] - void Render (CGRect viewport, IMTLRenderCommandEncoder renderCommandEncoder, MTLRenderPassDescriptor renderPassDescriptor, IMTLCommandQueue commandQueue); + [Export ("shouldCullNonVisibleNodes")] + bool ShouldCullNonVisibleNodes { get; set; } - [Export ("updateAtTime:")] - void Update (double currentTime); + [Export ("showsDrawCount")] + bool ShowsDrawCount { get; set; } - [NullAllowed, Export ("scene", ArgumentSemantic.Assign)] - SKScene Scene { get; set; } + [Export ("showsNodeCount")] + bool ShowsNodeCount { get; set; } - [Export ("ignoresSiblingOrder")] - bool IgnoresSiblingOrder { get; set; } + [Export ("showsQuadCount")] + bool ShowsQuadCount { get; set; } - [Export ("shouldCullNonVisibleNodes")] - bool ShouldCullNonVisibleNodes { get; set; } + [Export ("showsPhysics")] + bool ShowsPhysics { get; set; } - [Export ("showsDrawCount")] - bool ShowsDrawCount { get; set; } + [Export ("showsFields")] + bool ShowsFields { get; set; } +} - [Export ("showsNodeCount")] - bool ShowsNodeCount { get; set; } +/// A that holds a geometric transform. +[MacCatalyst (13, 1)] +[BaseType (typeof (SKNode))] +interface SKTransformNode { + [Export ("xRotation")] + nfloat XRotation { get; set; } - [Export ("showsQuadCount")] - bool ShowsQuadCount { get; set; } + [Export ("yRotation")] + nfloat YRotation { get; set; } - [Export ("showsPhysics")] - bool ShowsPhysics { get; set; } + [Export ("eulerAngles")] + VectorFloat3 EulerAngles { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; + } - [Export ("showsFields")] - bool ShowsFields { get; set; } + [Export ("rotationMatrix")] + MatrixFloat3x3 RotationMatrix { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; } - /// A that holds a geometric transform. - [MacCatalyst (13, 1)] - [BaseType (typeof (SKNode))] - interface SKTransformNode { - [Export ("xRotation")] - nfloat XRotation { get; set; } - - [Export ("yRotation")] - nfloat YRotation { get; set; } - - [Export ("eulerAngles")] - VectorFloat3 EulerAngles { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Export ("rotationMatrix")] - MatrixFloat3x3 RotationMatrix { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } - - [Export ("quaternion")] - Quaternion Quaternion { - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - get; - [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] - set; - } + [Export ("quaternion")] + Quaternion Quaternion { + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + get; + [MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")] + set; } } +}