From e7e6f79907b8b1da603fb4acb26403e82473ded9 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 29 Nov 2024 13:04:45 +0100 Subject: [PATCH 1/2] [ScreenCaptureKit] Implement Xcode 16.2 beta 1-3 changes. --- src/ScreenCaptureKit/SCContentFilter.cs | 2 +- src/build/dotnet/generator-frameworks.g.cs | 1 + src/frameworks.sources | 1 + src/rsp/dotnet/maccatalyst-defines-dotnet.rsp | 1 + src/screencapturekit.cs | 88 +++++++++----- .../Documentation.KnownFailures.txt | 12 ++ tests/introspection/ApiSignatureTest.cs | 3 + .../MacCatalyst-ReplayKit.ignore | 2 - .../MacCatalyst-ScreenCaptureKit.ignore | 76 ------------- .../MacCatalyst-ScreenCaptureKit.todo | 107 ------------------ .../macOS-ScreenCaptureKit.ignore | 3 - .../macOS-ScreenCaptureKit.todo | 6 - tools/common/Frameworks.cs | 4 +- 13 files changed, 80 insertions(+), 226 deletions(-) delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ReplayKit.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.ignore delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.todo delete mode 100644 tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.todo diff --git a/src/ScreenCaptureKit/SCContentFilter.cs b/src/ScreenCaptureKit/SCContentFilter.cs index 787441e66178..6fc6a6593755 100644 --- a/src/ScreenCaptureKit/SCContentFilter.cs +++ b/src/ScreenCaptureKit/SCContentFilter.cs @@ -21,7 +21,7 @@ namespace ScreenCaptureKit { [UnsupportedOSPlatform ("ios")] [UnsupportedOSPlatform ("tvos")] [SupportedOSPlatform ("macos12.3")] - [UnsupportedOSPlatform ("maccatalyst")] + [SupportedOSPlatform ("maccatalyst18.2")] public enum SCContentFilterOption { /// The specified windows or applications are included in the filter. Include, diff --git a/src/build/dotnet/generator-frameworks.g.cs b/src/build/dotnet/generator-frameworks.g.cs index f16ffd5bee06..1344ff419ee7 100644 --- a/src/build/dotnet/generator-frameworks.g.cs +++ b/src/build/dotnet/generator-frameworks.g.cs @@ -540,6 +540,7 @@ partial class Frameworks { "ReplayKit", "SafariServices", "SceneKit", + "ScreenCaptureKit", "ScreenTime", "Security", "SensitiveContentAnalysis", diff --git a/src/frameworks.sources b/src/frameworks.sources index 07e65017c298..750aaf4d863f 100644 --- a/src/frameworks.sources +++ b/src/frameworks.sources @@ -2522,6 +2522,7 @@ MACCATALYST_FRAMEWORKS = \ QuickLookThumbnailing \ ReplayKit \ SafariServices \ + ScreenCaptureKit \ ScreenTime \ Security \ SensitiveContentAnalysis \ diff --git a/src/rsp/dotnet/maccatalyst-defines-dotnet.rsp b/src/rsp/dotnet/maccatalyst-defines-dotnet.rsp index fafd721310e5..993054207122 100644 --- a/src/rsp/dotnet/maccatalyst-defines-dotnet.rsp +++ b/src/rsp/dotnet/maccatalyst-defines-dotnet.rsp @@ -100,6 +100,7 @@ -d:HAS_REPLAYKIT -d:HAS_SAFARISERVICES -d:HAS_SCENEKIT +-d:HAS_SCREENCAPTUREKIT -d:HAS_SCREENTIME -d:HAS_SECURITY -d:HAS_SENSITIVECONTENTANALYSIS diff --git a/src/screencapturekit.cs b/src/screencapturekit.cs index a97cae42d310..071d8b1a5707 100644 --- a/src/screencapturekit.cs +++ b/src/screencapturekit.cs @@ -23,7 +23,7 @@ namespace ScreenCaptureKit { - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [ErrorDomain ("SCStreamErrorDomain")] [Native] enum SCStreamErrorCode : long { @@ -50,7 +50,7 @@ enum SCStreamErrorCode : long { SystemStoppedStream = -3821, } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [Native] enum SCFrameStatus : long { Complete, @@ -61,7 +61,7 @@ enum SCFrameStatus : long { Stopped, } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [Native] enum SCStreamOutputType : long { Screen, @@ -79,7 +79,7 @@ public enum SCStreamType : long { Display, } - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [Native] public enum SCPresenterOverlayAlertSetting : long { System, @@ -87,7 +87,7 @@ public enum SCPresenterOverlayAlertSetting : long { Always, } - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [Native] public enum SCCaptureResolutionType : long { Automatic, @@ -95,7 +95,7 @@ public enum SCCaptureResolutionType : long { Nominal, } - [Flags, NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [Flags, NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [Native] public enum SCContentSharingPickerMode : ulong { SingleWindow = 1 << 0, @@ -105,7 +105,7 @@ public enum SCContentSharingPickerMode : ulong { SingleDisplay = 1 << 4, } - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [Native] public enum SCShareableContentStyle : long { None, @@ -114,7 +114,7 @@ public enum SCShareableContentStyle : long { Application, } - [NoiOS, NoTV, NoWatch, Mac (15, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (15, 0), MacCatalyst (18, 2)] [Native] public enum SCCaptureDynamicRange : long { Sdr, @@ -122,7 +122,7 @@ public enum SCCaptureDynamicRange : long { HdrCanonicalDisplay, } - [NoiOS, NoTV, NoWatch, Mac (15, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (15, 0), MacCatalyst (18, 2)] [Native] public enum SCStreamConfigurationPreset : long { CaptureHdrStreamLocalDisplay, @@ -131,7 +131,7 @@ public enum SCStreamConfigurationPreset : long { CaptureHdrScreenshotCanonicalDisplay, } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [Static] interface SCStreamFrameInfoKeys { @@ -166,7 +166,7 @@ interface SCStreamFrameInfoKeys { NSString PresenterOverlayContentRect { get; } } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCRunningApplication { @@ -181,7 +181,7 @@ interface SCRunningApplication { int ProcessId { get; } } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCWindow { @@ -210,7 +210,7 @@ interface SCWindow { } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCDisplay { @@ -228,7 +228,7 @@ interface SCDisplay { CGRect Frame { get; } } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCShareableContent { @@ -274,7 +274,7 @@ interface SCShareableContent { SCShareableContentInfo GetInfo (SCContentFilter filter); } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCContentFilter { @@ -301,6 +301,7 @@ interface SCContentFilter { // per docs, the following selectors are available for 12.3+ // but return types are SCStreamType and SCShareableContentStyle are 14.0+ [Deprecated (PlatformName.MacOSX, 14, 2, message: "Use 'Style' instead.")] + [NoMacCatalyst] [Mac (14, 0)] [Export ("streamType")] SCStreamType StreamType { get; } @@ -320,9 +321,21 @@ interface SCContentFilter { [Mac (14, 2)] [Export ("includeMenuBar")] bool IncludeMenuBar { get; set; } + + [Mac (15, 2), MacCatalyst (18, 2)] + [Export ("includedDisplays")] + SCDisplay [] IncludedDisplays { get; } + + [Mac (15, 2), MacCatalyst (18, 2)] + [Export ("includedApplications")] + SCRunningApplication [] IncludedApplications { get; } + + [Mac (15, 2), MacCatalyst (18, 2)] + [Export ("includedWindows")] + SCWindow [] IncludedWindows { get; } } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] interface SCStreamConfiguration { @@ -435,6 +448,7 @@ interface SCStreamConfiguration { [Export ("captureMicrophone", ArgumentSemantic.Assign)] bool CaptureMicrophone { get; set; } + [NoMacCatalyst] [Mac (15, 0)] [Export ("microphoneCaptureDeviceID", ArgumentSemantic.Strong), NullAllowed] string MicrophoneCaptureDeviceId { get; set; } @@ -449,7 +463,7 @@ interface SCStreamConfiguration { SCStreamConfiguration Create (SCStreamConfigurationPreset preset); } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCStream { @@ -481,7 +495,8 @@ interface SCStream { [Mac (13, 0)] [Export ("synchronizationClock")] - CMClock SynchronizationClock { [return: NullAllowed] get; } + [NullAllowed] + CMClock SynchronizationClock { get; } [Mac (15, 0)] [Export ("addRecordingOutput:error:")] @@ -494,7 +509,7 @@ interface SCStream { interface ISCStreamDelegate { } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [Protocol] #if NET [Model] @@ -512,6 +527,7 @@ interface SCStreamDelegate { [EditorBrowsable (EditorBrowsableState.Never)] [Obsolete ("Do not use this method.")] [Mac (14, 4)] + [NoMacCatalyst] [Export ("userDidStopStream:")] void UserDidStop (SCStream stream); #endif @@ -523,11 +539,19 @@ interface SCStreamDelegate { [Mac (14, 0)] [Export ("outputVideoEffectDidStopForStream:")] void OutputVideoEffectDidStop (SCStream stream); + + [Mac (15, 2), MacCatalyst (18, 2)] + [Export ("streamDidBecomeActive:")] + void StreamDidBecomeActive (SCStream stream); + + [Mac (15, 2), MacCatalyst (18, 2)] + [Export ("streamDidBecomeInactive:")] + void StreamDidBecomeInactive (SCStream stream); } interface ISCStreamOutput { } - [NoiOS, NoTV, NoWatch, Mac (12, 3), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (12, 3), MacCatalyst (18, 2)] [Protocol] interface SCStreamOutput { @@ -535,7 +559,7 @@ interface SCStreamOutput { void DidOutputSampleBuffer (SCStream stream, CMSampleBuffer sampleBuffer, SCStreamOutputType type); } - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] interface SCContentSharingPickerConfiguration { [Export ("allowedPickerModes", ArgumentSemantic.Assign)] @@ -551,7 +575,7 @@ interface SCContentSharingPickerConfiguration { bool AllowsChangingSelectedContent { get; set; } } - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCContentSharingPicker { @@ -594,7 +618,7 @@ interface SCContentSharingPicker { interface ISCContentSharingPickerObserver { } - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [Protocol] [Model] [BaseType (typeof (NSObject))] @@ -612,7 +636,7 @@ interface SCContentSharingPickerObserver { void DidFail (NSError error); } - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCShareableContentInfo { @@ -626,7 +650,9 @@ interface SCShareableContentInfo { CGRect ContentRect { get; } } - [NoiOS, NoTV, NoWatch, Mac (14, 0), NoMacCatalyst] + delegate void SCScreenshotManagerCaptureImageCallback ([NullAllowed] CGImage image, [NullAllowed] NSError error); + + [NoiOS, NoTV, NoWatch, Mac (14, 0), MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCScreenshotManager { @@ -639,9 +665,15 @@ interface SCScreenshotManager { [Export ("captureImageWithFilter:configuration:completionHandler:")] [Async] void CaptureImage (SCContentFilter contentFilter, SCStreamConfiguration config, [NullAllowed] Action completionHandler); + + [Mac (15, 2)] + [Static] + [Export ("captureImageInRect:completionHandler:")] + [Async] + void CaptureImage (CGRect rect, [NullAllowed] SCScreenshotManagerCaptureImageCallback completionHandler); } - [Mac (15, 0), NoiOS, NoTV, NoWatch, NoMacCatalyst] + [Mac (15, 0), NoiOS, NoTV, NoWatch, MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] interface SCRecordingOutputConfiguration { [Export ("outputURL", ArgumentSemantic.Copy)] @@ -664,7 +696,7 @@ interface SCRecordingOutputConfiguration { NSString [] AvailableOutputFileTypes { get; } } - [Mac (15, 0), NoiOS, NoTV, NoWatch, NoMacCatalyst] + [Mac (15, 0), NoiOS, NoTV, NoWatch, MacCatalyst (18, 2)] [Protocol (BackwardsCompatibleCodeGeneration = false), Model] [BaseType (typeof (NSObject))] interface SCRecordingOutputDelegate { @@ -680,7 +712,7 @@ interface SCRecordingOutputDelegate { interface ISCRecordingOutputDelegate { } - [Mac (15, 0), NoiOS, NoTV, NoWatch, NoMacCatalyst] + [Mac (15, 0), NoiOS, NoTV, NoWatch, MacCatalyst (18, 2)] [BaseType (typeof (NSObject))] [DisableDefaultCtor] interface SCRecordingOutput { diff --git a/tests/cecil-tests/Documentation.KnownFailures.txt b/tests/cecil-tests/Documentation.KnownFailures.txt index 5c3414a6c973..5a228690f7f0 100644 --- a/tests/cecil-tests/Documentation.KnownFailures.txt +++ b/tests/cecil-tests/Documentation.KnownFailures.txt @@ -42937,7 +42937,11 @@ M:ScreenCaptureKit.ISCRecordingOutputDelegate.DidStartRecording(ScreenCaptureKit M:ScreenCaptureKit.ISCStreamDelegate.DidStop(ScreenCaptureKit.SCStream,Foundation.NSError) M:ScreenCaptureKit.ISCStreamDelegate.OutputVideoEffectDidStart(ScreenCaptureKit.SCStream) M:ScreenCaptureKit.ISCStreamDelegate.OutputVideoEffectDidStop(ScreenCaptureKit.SCStream) +M:ScreenCaptureKit.ISCStreamDelegate.StreamDidBecomeActive(ScreenCaptureKit.SCStream) +M:ScreenCaptureKit.ISCStreamDelegate.StreamDidBecomeInactive(ScreenCaptureKit.SCStream) M:ScreenCaptureKit.ISCStreamOutput.DidOutputSampleBuffer(ScreenCaptureKit.SCStream,CoreMedia.CMSampleBuffer,ScreenCaptureKit.SCStreamOutputType) +M:ScreenCaptureKit.SCScreenshotManager.CaptureImage(CoreGraphics.CGRect,ScreenCaptureKit.SCScreenshotManagerCaptureImageCallback) +M:ScreenCaptureKit.SCScreenshotManager.CaptureImageAsync(CoreGraphics.CGRect) M:ScreenCaptureKit.SCScreenshotManager.CaptureImageAsync(ScreenCaptureKit.SCContentFilter,ScreenCaptureKit.SCStreamConfiguration) M:ScreenCaptureKit.SCScreenshotManager.CaptureSampleBufferAsync(ScreenCaptureKit.SCContentFilter,ScreenCaptureKit.SCStreamConfiguration) M:ScreenCaptureKit.SCShareableContent.GetCurrentProcessShareableContentAsync @@ -42951,6 +42955,10 @@ M:ScreenCaptureKit.SCStreamConfiguration.Dispose(System.Boolean) M:ScreenCaptureKit.SCStreamDelegate_Extensions.DidStop(ScreenCaptureKit.ISCStreamDelegate,ScreenCaptureKit.SCStream,Foundation.NSError) M:ScreenCaptureKit.SCStreamDelegate_Extensions.OutputVideoEffectDidStart(ScreenCaptureKit.ISCStreamDelegate,ScreenCaptureKit.SCStream) M:ScreenCaptureKit.SCStreamDelegate_Extensions.OutputVideoEffectDidStop(ScreenCaptureKit.ISCStreamDelegate,ScreenCaptureKit.SCStream) +M:ScreenCaptureKit.SCStreamDelegate_Extensions.StreamDidBecomeActive(ScreenCaptureKit.ISCStreamDelegate,ScreenCaptureKit.SCStream) +M:ScreenCaptureKit.SCStreamDelegate_Extensions.StreamDidBecomeInactive(ScreenCaptureKit.ISCStreamDelegate,ScreenCaptureKit.SCStream) +M:ScreenCaptureKit.SCStreamDelegate.StreamDidBecomeActive(ScreenCaptureKit.SCStream) +M:ScreenCaptureKit.SCStreamDelegate.StreamDidBecomeInactive(ScreenCaptureKit.SCStream) M:ScreenCaptureKit.SCStreamOutput_Extensions.DidOutputSampleBuffer(ScreenCaptureKit.ISCStreamOutput,ScreenCaptureKit.SCStream,CoreMedia.CMSampleBuffer,ScreenCaptureKit.SCStreamOutputType) M:ScreenTime.STScreenTimeConfiguration.EncodeTo(Foundation.NSCoder) M:ScreenTime.STScreenTimeConfigurationObserver.#ctor(CoreFoundation.DispatchQueue) @@ -66863,6 +66871,9 @@ P:SceneKit.SCNView.JitteringEnabled P:SceneKit.SCNView.Playing P:SceneKit.SCNView.SceneRendererDelegate P:SceneKit.SCNView.TemporalAntialiasingEnabled +P:ScreenCaptureKit.SCContentFilter.IncludedApplications +P:ScreenCaptureKit.SCContentFilter.IncludedDisplays +P:ScreenCaptureKit.SCContentFilter.IncludedWindows P:ScreenCaptureKit.SCContentSharingPicker.Active P:ScreenCaptureKit.SCStreamFrameInfoKeys.BoundingRect P:ScreenCaptureKit.SCStreamFrameInfoKeys.ContentRect @@ -75439,6 +75450,7 @@ T:ScreenCaptureKit.SCContentSharingPickerObserver T:ScreenCaptureKit.SCFrameStatus T:ScreenCaptureKit.SCPresenterOverlayAlertSetting T:ScreenCaptureKit.SCRecordingOutputDelegate +T:ScreenCaptureKit.SCScreenshotManagerCaptureImageCallback T:ScreenCaptureKit.SCShareableContentStyle T:ScreenCaptureKit.SCStreamConfigurationPreset T:ScreenCaptureKit.SCStreamDelegate diff --git a/tests/introspection/ApiSignatureTest.cs b/tests/introspection/ApiSignatureTest.cs index a47c2b80c6dc..b7c099bf1493 100644 --- a/tests/introspection/ApiSignatureTest.cs +++ b/tests/introspection/ApiSignatureTest.cs @@ -973,6 +973,9 @@ protected virtual bool IgnoreAsync (MethodInfo m) return m.DeclaringType.Name == "NSTextContentManager"; case "AccommodatePresentedItemEviction": // comes from a protocol implementation return m.DeclaringType.Name == "NSFilePresenter" || m.DeclaringType.Name == "UIDocument"; + case "StartCapture": + case "StopCapture": // it does not make sense for these APIs + return m.DeclaringType.Name == "SCStream"; } return false; } diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ReplayKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ReplayKit.ignore deleted file mode 100644 index 0ef953184181..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ReplayKit.ignore +++ /dev/null @@ -1,2 +0,0 @@ -# Did not find a good place for this one. -!missing-field! SCStreamErrorDomain not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.ignore deleted file mode 100644 index e40236d866d0..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.ignore +++ /dev/null @@ -1,76 +0,0 @@ -# This framework is not available on Mac Catalyst, even if ObjectiveSharpie thinks it is. -!missing-enum! SCFrameStatus not bound -!missing-enum! SCStreamErrorCode not bound -!missing-enum! SCStreamOutputType not bound -!missing-field! SCStreamErrorDomain not bound -!missing-field! SCStreamFrameInfoContentRect not bound -!missing-field! SCStreamFrameInfoContentScale not bound -!missing-field! SCStreamFrameInfoDirtyRects not bound -!missing-field! SCStreamFrameInfoDisplayTime not bound -!missing-field! SCStreamFrameInfoScaleFactor not bound -!missing-field! SCStreamFrameInfoStatus not bound -!missing-protocol! SCStreamDelegate not bound -!missing-protocol! SCStreamOutput not bound -!missing-selector! +SCShareableContent::getShareableContentExcludingDesktopWindows:onScreenWindowsOnly:completionHandler: not bound -!missing-selector! +SCShareableContent::getShareableContentExcludingDesktopWindows:onScreenWindowsOnlyAboveWindow:completionHandler: not bound -!missing-selector! +SCShareableContent::getShareableContentExcludingDesktopWindows:onScreenWindowsOnlyBelowWindow:completionHandler: not bound -!missing-selector! +SCShareableContent::getShareableContentWithCompletionHandler: not bound -!missing-selector! SCContentFilter::initWithDesktopIndependentWindow: not bound -!missing-selector! SCContentFilter::initWithDisplay:excludingApplications:exceptingWindows: not bound -!missing-selector! SCContentFilter::initWithDisplay:excludingWindows: not bound -!missing-selector! SCContentFilter::initWithDisplay:includingApplications:exceptingWindows: not bound -!missing-selector! SCContentFilter::initWithDisplay:includingWindows: not bound -!missing-selector! SCDisplay::displayID not bound -!missing-selector! SCDisplay::frame not bound -!missing-selector! SCDisplay::height not bound -!missing-selector! SCDisplay::width not bound -!missing-selector! SCRunningApplication::applicationName not bound -!missing-selector! SCRunningApplication::bundleIdentifier not bound -!missing-selector! SCRunningApplication::processID not bound -!missing-selector! SCShareableContent::applications not bound -!missing-selector! SCShareableContent::displays not bound -!missing-selector! SCShareableContent::windows not bound -!missing-selector! SCStream::addStreamOutput:type:sampleHandlerQueue:error: not bound -!missing-selector! SCStream::initWithFilter:configuration:delegate: not bound -!missing-selector! SCStream::removeStreamOutput:type:error: not bound -!missing-selector! SCStream::startCaptureWithCompletionHandler: not bound -!missing-selector! SCStream::stopCaptureWithCompletionHandler: not bound -!missing-selector! SCStream::updateConfiguration:completionHandler: not bound -!missing-selector! SCStream::updateContentFilter:completionHandler: not bound -!missing-selector! SCStreamConfiguration::backgroundColor not bound -!missing-selector! SCStreamConfiguration::colorMatrix not bound -!missing-selector! SCStreamConfiguration::colorSpaceName not bound -!missing-selector! SCStreamConfiguration::destinationRect not bound -!missing-selector! SCStreamConfiguration::height not bound -!missing-selector! SCStreamConfiguration::minimumFrameInterval not bound -!missing-selector! SCStreamConfiguration::pixelFormat not bound -!missing-selector! SCStreamConfiguration::queueDepth not bound -!missing-selector! SCStreamConfiguration::scalesToFit not bound -!missing-selector! SCStreamConfiguration::setBackgroundColor: not bound -!missing-selector! SCStreamConfiguration::setColorMatrix: not bound -!missing-selector! SCStreamConfiguration::setColorSpaceName: not bound -!missing-selector! SCStreamConfiguration::setDestinationRect: not bound -!missing-selector! SCStreamConfiguration::setHeight: not bound -!missing-selector! SCStreamConfiguration::setMinimumFrameInterval: not bound -!missing-selector! SCStreamConfiguration::setPixelFormat: not bound -!missing-selector! SCStreamConfiguration::setQueueDepth: not bound -!missing-selector! SCStreamConfiguration::setScalesToFit: not bound -!missing-selector! SCStreamConfiguration::setShowsCursor: not bound -!missing-selector! SCStreamConfiguration::setSourceRect: not bound -!missing-selector! SCStreamConfiguration::setWidth: not bound -!missing-selector! SCStreamConfiguration::showsCursor not bound -!missing-selector! SCStreamConfiguration::sourceRect not bound -!missing-selector! SCStreamConfiguration::width not bound -!missing-selector! SCWindow::frame not bound -!missing-selector! SCWindow::isOnScreen not bound -!missing-selector! SCWindow::owningApplication not bound -!missing-selector! SCWindow::title not bound -!missing-selector! SCWindow::windowID not bound -!missing-selector! SCWindow::windowLayer not bound -!missing-type! SCContentFilter not bound -!missing-type! SCDisplay not bound -!missing-type! SCRunningApplication not bound -!missing-type! SCShareableContent not bound -!missing-type! SCStream not bound -!missing-type! SCStreamConfiguration not bound -!missing-type! SCWindow not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.todo deleted file mode 100644 index c974d189e8a9..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/MacCatalyst-ScreenCaptureKit.todo +++ /dev/null @@ -1,107 +0,0 @@ -!missing-enum! SCCaptureResolutionType not bound -!missing-enum! SCContentSharingPickerMode not bound -!missing-enum! SCPresenterOverlayAlertSetting not bound -!missing-enum! SCShareableContentStyle not bound -!missing-field! SCStreamFrameInfoBoundingRect not bound -!missing-field! SCStreamFrameInfoPresenterOverlayContentRect not bound -!missing-field! SCStreamFrameInfoScreenRect not bound -!missing-protocol! SCContentSharingPickerObserver not bound -!missing-selector! +SCContentSharingPicker::sharedPicker not bound -!missing-selector! +SCScreenshotManager::captureImageWithFilter:configuration:completionHandler: not bound -!missing-selector! +SCScreenshotManager::captureSampleBufferWithFilter:configuration:completionHandler: not bound -!missing-selector! +SCShareableContent::getCurrentProcessShareableContentWithCompletionHandler: not bound -!missing-selector! +SCShareableContent::infoForFilter: not bound -!missing-selector! SCContentFilter::contentRect not bound -!missing-selector! SCContentFilter::includeMenuBar not bound -!missing-selector! SCContentFilter::pointPixelScale not bound -!missing-selector! SCContentFilter::setIncludeMenuBar: not bound -!missing-selector! SCContentFilter::style not bound -!missing-selector! SCContentSharingPicker::addObserver: not bound -!missing-selector! SCContentSharingPicker::defaultConfiguration not bound -!missing-selector! SCContentSharingPicker::isActive not bound -!missing-selector! SCContentSharingPicker::maximumStreamCount not bound -!missing-selector! SCContentSharingPicker::present not bound -!missing-selector! SCContentSharingPicker::presentPickerForStream: not bound -!missing-selector! SCContentSharingPicker::presentPickerForStream:usingContentStyle: not bound -!missing-selector! SCContentSharingPicker::presentPickerUsingContentStyle: not bound -!missing-selector! SCContentSharingPicker::removeObserver: not bound -!missing-selector! SCContentSharingPicker::setActive: not bound -!missing-selector! SCContentSharingPicker::setConfiguration:forStream: not bound -!missing-selector! SCContentSharingPicker::setDefaultConfiguration: not bound -!missing-selector! SCContentSharingPicker::setMaximumStreamCount: not bound -!missing-selector! SCContentSharingPickerConfiguration::allowedPickerModes not bound -!missing-selector! SCContentSharingPickerConfiguration::allowsChangingSelectedContent not bound -!missing-selector! SCContentSharingPickerConfiguration::excludedBundleIDs not bound -!missing-selector! SCContentSharingPickerConfiguration::excludedWindowIDs not bound -!missing-selector! SCContentSharingPickerConfiguration::setAllowedPickerModes: not bound -!missing-selector! SCContentSharingPickerConfiguration::setAllowsChangingSelectedContent: not bound -!missing-selector! SCContentSharingPickerConfiguration::setExcludedBundleIDs: not bound -!missing-selector! SCContentSharingPickerConfiguration::setExcludedWindowIDs: not bound -!missing-selector! SCShareableContentInfo::contentRect not bound -!missing-selector! SCShareableContentInfo::pointPixelScale not bound -!missing-selector! SCShareableContentInfo::style not bound -!missing-selector! SCStream::synchronizationClock not bound -!missing-selector! SCStreamConfiguration::captureResolution not bound -!missing-selector! SCStreamConfiguration::capturesAudio not bound -!missing-selector! SCStreamConfiguration::capturesShadowsOnly not bound -!missing-selector! SCStreamConfiguration::channelCount not bound -!missing-selector! SCStreamConfiguration::excludesCurrentProcessAudio not bound -!missing-selector! SCStreamConfiguration::ignoreGlobalClipDisplay not bound -!missing-selector! SCStreamConfiguration::ignoreGlobalClipSingleWindow not bound -!missing-selector! SCStreamConfiguration::ignoreShadowsDisplay not bound -!missing-selector! SCStreamConfiguration::ignoreShadowsSingleWindow not bound -!missing-selector! SCStreamConfiguration::includeChildWindows not bound -!missing-selector! SCStreamConfiguration::presenterOverlayPrivacyAlertSetting not bound -!missing-selector! SCStreamConfiguration::preservesAspectRatio not bound -!missing-selector! SCStreamConfiguration::sampleRate not bound -!missing-selector! SCStreamConfiguration::setCaptureResolution: not bound -!missing-selector! SCStreamConfiguration::setCapturesAudio: not bound -!missing-selector! SCStreamConfiguration::setCapturesShadowsOnly: not bound -!missing-selector! SCStreamConfiguration::setChannelCount: not bound -!missing-selector! SCStreamConfiguration::setExcludesCurrentProcessAudio: not bound -!missing-selector! SCStreamConfiguration::setIgnoreGlobalClipDisplay: not bound -!missing-selector! SCStreamConfiguration::setIgnoreGlobalClipSingleWindow: not bound -!missing-selector! SCStreamConfiguration::setIgnoreShadowsDisplay: not bound -!missing-selector! SCStreamConfiguration::setIgnoreShadowsSingleWindow: not bound -!missing-selector! SCStreamConfiguration::setIncludeChildWindows: not bound -!missing-selector! SCStreamConfiguration::setPresenterOverlayPrivacyAlertSetting: not bound -!missing-selector! SCStreamConfiguration::setPreservesAspectRatio: not bound -!missing-selector! SCStreamConfiguration::setSampleRate: not bound -!missing-selector! SCStreamConfiguration::setShouldBeOpaque: not bound -!missing-selector! SCStreamConfiguration::setStreamName: not bound -!missing-selector! SCStreamConfiguration::shouldBeOpaque not bound -!missing-selector! SCStreamConfiguration::streamName not bound -!missing-selector! SCWindow::isActive not bound -!missing-type! SCContentSharingPicker not bound -!missing-type! SCContentSharingPickerConfiguration not bound -!missing-type! SCScreenshotManager not bound -!missing-type! SCShareableContentInfo not bound -!missing-enum! SCCaptureDynamicRange not bound -!missing-enum! SCStreamConfigurationPreset not bound -!missing-protocol! SCRecordingOutputDelegate not bound -!missing-selector! +SCStreamConfiguration::streamConfigurationWithPreset: not bound -!missing-selector! SCRecordingOutput::initWithConfiguration:delegate: not bound -!missing-selector! SCRecordingOutput::recordedDuration not bound -!missing-selector! SCRecordingOutput::recordedFileSize not bound -!missing-selector! SCRecordingOutputConfiguration::availableOutputFileTypes not bound -!missing-selector! SCRecordingOutputConfiguration::availableVideoCodecTypes not bound -!missing-selector! SCRecordingOutputConfiguration::outputFileType not bound -!missing-selector! SCRecordingOutputConfiguration::outputURL not bound -!missing-selector! SCRecordingOutputConfiguration::setOutputFileType: not bound -!missing-selector! SCRecordingOutputConfiguration::setOutputURL: not bound -!missing-selector! SCRecordingOutputConfiguration::setVideoCodecType: not bound -!missing-selector! SCRecordingOutputConfiguration::videoCodecType not bound -!missing-selector! SCStream::addRecordingOutput:error: not bound -!missing-selector! SCStream::removeRecordingOutput:error: not bound -!missing-selector! SCStreamConfiguration::captureDynamicRange not bound -!missing-selector! SCStreamConfiguration::captureMicrophone not bound -!missing-selector! SCStreamConfiguration::setCaptureDynamicRange: not bound -!missing-selector! SCStreamConfiguration::setCaptureMicrophone: not bound -!missing-selector! SCStreamConfiguration::setShowMouseClicks: not bound -!missing-selector! SCStreamConfiguration::showMouseClicks not bound -!missing-type! SCRecordingOutput not bound -!missing-type! SCRecordingOutputConfiguration not bound -!missing-selector! +SCScreenshotManager::captureImageInRect:completionHandler: not bound -!missing-selector! SCContentFilter::includedApplications not bound -!missing-selector! SCContentFilter::includedDisplays not bound -!missing-selector! SCContentFilter::includedWindows not bound diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.ignore b/tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.ignore index d5cd725e4ca1..17ddabe3988d 100644 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.ignore +++ b/tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.ignore @@ -1,5 +1,2 @@ -# ignoring due to https://github.com/xamarin/xamarin-macios/issues/15656 -!missing-field! SCStreamErrorDomain not bound -!missing-null-allowed! 'CoreMedia.CMClock ScreenCaptureKit.SCStream::get_SynchronizationClock()' is missing an [NullAllowed] on return type # removed in XAMCORE_5_0 !extra-protocol-member! unexpected selector SCStreamDelegate::userDidStopStream: found diff --git a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.todo b/tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.todo deleted file mode 100644 index 404655f3684b..000000000000 --- a/tests/xtro-sharpie/api-annotations-dotnet/macOS-ScreenCaptureKit.todo +++ /dev/null @@ -1,6 +0,0 @@ -!missing-protocol-member! SCStreamDelegate::streamDidBecomeActive: not found -!missing-protocol-member! SCStreamDelegate::streamDidBecomeInactive: not found -!missing-selector! +SCScreenshotManager::captureImageInRect:completionHandler: not bound -!missing-selector! SCContentFilter::includedApplications not bound -!missing-selector! SCContentFilter::includedDisplays not bound -!missing-selector! SCContentFilter::includedWindows not bound diff --git a/tools/common/Frameworks.cs b/tools/common/Frameworks.cs index b9d351a24359..b643356bc7e4 100644 --- a/tools/common/Frameworks.cs +++ b/tools/common/Frameworks.cs @@ -751,9 +751,7 @@ public static Frameworks GetMacCatalystFrameworks () catalyst_frameworks.Add ("AppKit", 13, 0); catalyst_frameworks.Add ("ExecutionPolicy", 16, 0); catalyst_frameworks.Add ("ServiceManagement", 16, 0); - // Due to a linking problem, ScreenCpatureKit doesn't work on Mac Catalyst (we can't pass -framework ScreenCaptureKit to the native linker, - // because there's no Mac Catalyst tbd file for ScreenCaptureKit). - // catalyst_frameworks.Add ("ScreenCaptureKit", 15, 4); + catalyst_frameworks.Add ("ScreenCaptureKit", 18, 2); } return catalyst_frameworks; } From 505b66baddcb69142fcffc0c713e575ca6201a48 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 3 Dec 2024 19:38:09 +0100 Subject: [PATCH 2/2] Update tests. --- tests/dotnet/UnitTests/ProjectTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/dotnet/UnitTests/ProjectTest.cs b/tests/dotnet/UnitTests/ProjectTest.cs index 2b74832e19db..8a34b7f4e4a1 100644 --- a/tests/dotnet/UnitTests/ProjectTest.cs +++ b/tests/dotnet/UnitTests/ProjectTest.cs @@ -2897,6 +2897,7 @@ public void AppendRuntimeIdentifierToOutputPath_DisableDirectoryBuildProps (Appl "/System/iOSSupport/System/Library/Frameworks/ReplayKit.framework/Versions/A/ReplayKit", "/System/iOSSupport/System/Library/Frameworks/SafariServices.framework/Versions/A/SafariServices", "/System/iOSSupport/System/Library/Frameworks/SceneKit.framework/Versions/A/SceneKit", + "/System/iOSSupport/System/Library/Frameworks/ScreenCaptureKit.framework/Versions/A/ScreenCaptureKit", "/System/iOSSupport/System/Library/Frameworks/ScreenTime.framework/Versions/A/ScreenTime", "/System/iOSSupport/System/Library/Frameworks/SharedWithYou.framework/Versions/A/SharedWithYou", "/System/iOSSupport/System/Library/Frameworks/Social.framework/Versions/A/Social",