Skip to content

Instantly share code, notes, and snippets.

@vs-mobiletools-engineering-service2
Created September 15, 2023 19:08
Show Gist options
  • Save vs-mobiletools-engineering-service2/afa41a26ebe7a794a44de00aad8f553a to your computer and use it in GitHub Desktop.
Save vs-mobiletools-engineering-service2/afa41a26ebe7a794a44de00aad8f553a to your computer and use it in GitHub Desktop.
previous-api-comparison/mac-api-diff.md
title description author ms.author ms.date ms.topic ms.assetid ms.prod
Xamarin.Mac SDK API diff
List of API changes for Xamarin.Mac.
spouliot
sepoulio
9/15/2023
article
f833f3cb-eea7-c1b8-a706-dfbb597746ea
xamarin

Xamarin.Mac SDK API diff

Namespace ScreenCaptureKit

Type Changed: ScreenCaptureKit.SCContentFilter

Added properties:

public virtual CoreGraphics.CGRect ContentRect { get; }
public virtual float PointPixelScale { get; }
public virtual SCStreamType StreamType { get; }
public virtual SCShareableContentStyle Style { get; }

Type Changed: ScreenCaptureKit.SCShareableContent

Added method:

public static SCShareableContentInfo GetInfo (SCContentFilter filter);

Type Changed: ScreenCaptureKit.SCStreamConfiguration

Added properties:

public virtual SCCaptureResolutionType CaptureResolution { get; set; }
public virtual bool CapturesShadowsOnly { get; set; }
public virtual bool IgnoreGlobalClipDisplay { get; set; }
public virtual bool IgnoreGlobalClipSingleWindow { get; set; }
public virtual bool IgnoreShadowsDisplay { get; set; }
public virtual bool IgnoreShadowsSingleWindow { get; set; }
public virtual SCPresenterOverlayAlertSetting PresenterOverlayPrivacyAlertSetting { get; set; }
public virtual bool PreservesAspectRatio { get; set; }
public virtual bool ShouldBeOpaque { get; set; }
public virtual string StreamName { get; set; }

Type Changed: ScreenCaptureKit.SCStreamDelegate

Added methods:

public virtual void OutputVideoEffectDidStart (SCStream stream);
public virtual void OutputVideoEffectDidStop (SCStream stream);

Type Changed: ScreenCaptureKit.SCStreamDelegate_Extensions

Added methods:

public static void OutputVideoEffectDidStart (this ISCStreamDelegate This, SCStream stream);
public static void OutputVideoEffectDidStop (this ISCStreamDelegate This, SCStream stream);

Type Changed: ScreenCaptureKit.SCStreamFrameInfoKeys

Added property:

public static Foundation.NSString BoundingRect { get; }

New Type: ScreenCaptureKit.ISCContentSharingPickerObserver

public interface ISCContentSharingPickerObserver : ObjCRuntime.INativeObject, System.IDisposable {
	// methods
	public virtual void DidCancel (SCContentSharingPicker picker, SCStream stream);
	public virtual void DidFail (Foundation.NSError error);
	public virtual void DidUpdate (SCContentSharingPicker picker, SCContentFilter filter, SCStream stream);
}

New Type: ScreenCaptureKit.SCCaptureResolutionType

[Serializable]
public enum SCCaptureResolutionType {
	Automatic = 0,
	Best = 1,
	Nominal = 2,
}

New Type: ScreenCaptureKit.SCContentSharingPicker

public class SCContentSharingPicker : Foundation.NSObject {
	// constructors
	protected SCContentSharingPicker (Foundation.NSObjectFlag t);
	protected SCContentSharingPicker (IntPtr handle);
	// properties
	public virtual bool Active { get; set; }
	public override IntPtr ClassHandle { get; }
	public virtual SCContentSharingPickerConfiguration DefaultConfiguration { get; set; }
	public virtual int MaximumStreamCount { get; set; }
	public static SCContentSharingPicker SharedPicker { get; }
	// methods
	public virtual void AddObserver (ISCContentSharingPickerObserver observer);
	public virtual void Present ();
	public virtual void Present (SCShareableContentStyle contentStyle);
	public virtual void Present (SCStream stream);
	public virtual void Present (SCStream stream, SCShareableContentStyle contentStyle);
	public virtual void RemoveObserver (ISCContentSharingPickerObserver observer);
	public virtual void SetConfiguration (SCContentSharingPickerConfiguration pickerConfig, SCStream stream);
}

New Type: ScreenCaptureKit.SCContentSharingPickerConfiguration

public class SCContentSharingPickerConfiguration : Foundation.NSObject {
	// constructors
	public SCContentSharingPickerConfiguration ();
	protected SCContentSharingPickerConfiguration (Foundation.NSObjectFlag t);
	protected SCContentSharingPickerConfiguration (IntPtr handle);
	// properties
	public virtual SCContentSharingPickerMode AllowedPickerModes { get; set; }
	public virtual bool AllowsChangingSelectedContent { get; set; }
	public override IntPtr ClassHandle { get; }
	public virtual string[] ExcludedBundleIds { get; set; }
	public virtual Foundation.NSNumber[] ExcludedWindowIds { get; set; }
}

New Type: ScreenCaptureKit.SCContentSharingPickerMode

[Serializable]
[Flags]
public enum SCContentSharingPickerMode {
	MultipleApplications = 8,
	MultipleWindows = 2,
	SingleApplication = 4,
	SingleDisplay = 16,
	SingleWindow = 1,
}

New Type: ScreenCaptureKit.SCContentSharingPickerObserver

public abstract class SCContentSharingPickerObserver : Foundation.NSObject, ObjCRuntime.INativeObject, ISCContentSharingPickerObserver, System.IDisposable {
	// constructors
	protected SCContentSharingPickerObserver ();
	protected SCContentSharingPickerObserver (Foundation.NSObjectFlag t);
	protected SCContentSharingPickerObserver (IntPtr handle);
	// methods
	public virtual void DidCancel (SCContentSharingPicker picker, SCStream stream);
	public virtual void DidFail (Foundation.NSError error);
	public virtual void DidUpdate (SCContentSharingPicker picker, SCContentFilter filter, SCStream stream);
}

New Type: ScreenCaptureKit.SCPresenterOverlayAlertSetting

[Serializable]
public enum SCPresenterOverlayAlertSetting {
	Always = 2,
	Never = 1,
	System = 0,
}

New Type: ScreenCaptureKit.SCScreenshotManager

public class SCScreenshotManager : Foundation.NSObject {
	// constructors
	protected SCScreenshotManager (Foundation.NSObjectFlag t);
	protected SCScreenshotManager (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	// methods
	public static void CaptureImage (SCContentFilter contentFilter, SCStreamConfiguration config, System.Action<CoreGraphics.CGImage,Foundation.NSError> completionHandler);
	public static System.Threading.Tasks.Task<CoreGraphics.CGImage> CaptureImageAsync (SCContentFilter contentFilter, SCStreamConfiguration config);
	public static void CaptureSampleBuffer (SCContentFilter contentFilter, SCStreamConfiguration config, System.Action<CoreMedia.CMSampleBuffer,Foundation.NSError> completionHandler);
	public static System.Threading.Tasks.Task<CoreMedia.CMSampleBuffer> CaptureSampleBufferAsync (SCContentFilter contentFilter, SCStreamConfiguration config);
}

New Type: ScreenCaptureKit.SCShareableContentInfo

public class SCShareableContentInfo : Foundation.NSObject {
	// constructors
	protected SCShareableContentInfo (Foundation.NSObjectFlag t);
	protected SCShareableContentInfo (IntPtr handle);
	// properties
	public override IntPtr ClassHandle { get; }
	public virtual CoreGraphics.CGRect ContentRect { get; }
	public virtual float PointPixelScale { get; }
	public virtual SCShareableContentStyle Style { get; }
}

New Type: ScreenCaptureKit.SCShareableContentStyle

[Serializable]
public enum SCShareableContentStyle {
	Application = 3,
	Display = 2,
	None = 0,
	Window = 1,
}

New Type: ScreenCaptureKit.SCStreamType

[Serializable]
public enum SCStreamType {
	Display = 1,
	Window = 0,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment