Documentation
¶
Overview ¶
Package screencapturekit provides Go bindings for the ScreenCaptureKit framework.
Filter and select screen content and stream it to your app.
Use the ScreenCaptureKit framework to add support for high-performance frame capture of screen and audio content to your Mac app. The framework gives you fine-grained control to select and stream only the content that you want to capture. As a stream captures new video frames and audio samples, it passes them to your app as [CMSampleBuffer](<doc://com.apple.documentation/documentation/CoreMedia/CMSampleBuffer>) objects that contain the media data and its related metadata. ScreenCaptureKit also provides a macOS-integrated picker for streaming selection and management, SCContentSharingPicker(<doc://com.apple.screencapturekit/documentation/ScreenCaptureKit/SCContentSharingPicker>).
Essentials ¶
- ScreenCaptureKit updates: Learn about important changes to ScreenCaptureKit.
- Persistent Content Capture: A Boolean value that indicates whether a Virtual Network Computing (VNC) app needs persistent access to screen capture.
- Capturing screen content in macOS: Stream desktop content like displays, apps, and windows by adopting screen capture in your app.
Shareable content ¶
- SCShareableContent: An instance that represents a set of displays, apps, and windows that your app can capture.
- SCShareableContentInfo: An instance that provides information for the content in a given stream.
- SCShareableContentStyle: The style of content presented in a stream.
- SCDisplay: An instance that represents a display device.
- SCRunningApplication: An instance that represents an app running on a device.
- SCWindow: An instance that represents an onscreen window.
Content capture ¶
- SCStream: An instance that represents a stream of shareable content. (SCRecordingOutput)
- SCStreamConfiguration: An instance that provides the output configuration for a stream. (SCCaptureResolutionType, SCPresenterOverlayAlertSetting, SCCaptureDynamicRange)
- SCContentFilter: An instance that filters the content a stream captures. (SCStreamType)
- SCStreamDelegate: A delegate protocol your app implements to respond to stream events.
- SCScreenshotManager: An instance for the capture of single frames from a stream.
- SCScreenshotConfiguration: An object that contains screenshot properties such as output width, height, and image quality specifications.
- SCScreenshotOutput: An object that contains all images requested by the client.
Output processing ¶
- SCStreamOutput: A delegate protocol your app implements to receive capture stream output events.
- SCStreamOutputType: Constants that represent output types for a stream frame.
- SCStreamFrameInfo: An instance that defines metadata keys for a stream frame.
- SCFrameStatus: Status values for a frame from a stream.
System content-sharing picker ¶
- SCContentSharingPicker: An instance of a picker presented by the operating system for managing frame-capture streams.
- SCContentSharingPickerConfiguration: An instance for configuring the system content-sharing picker.
- SCContentSharingPickerMode: Available modes for selecting streaming content from a picker presented by the operating system.
- SCContentSharingPickerObserver: An observer protocol your app implements to receive messages from the operating system’s content picker.
Stream errors ¶
- SCStreamErrorDomain: A string representation of the error domain.
- SCStreamError: An instance representing a ScreenCaptureKit framework error.
Key Types ¶
- SCStreamConfiguration - An instance that provides the output configuration for a stream.
- SCContentFilter - An instance that filters the content a stream captures.
- SCScreenshotConfiguration - An object that contains screenshot properties such as output width, height, and image quality specifications.
- SCContentSharingPicker - An instance of a picker presented by the operating system for managing frame-capture streams.
- SCStream - An instance that represents a stream of shareable content.
- SCShareableContent - An instance that represents a set of displays, apps, and windows that your app can capture.
- SCWindow - An instance that represents an onscreen window.
- SCRecordingOutputConfiguration
- SCScreenshotManager - An instance for the capture of single frames from a stream.
- SCContentSharingPickerConfiguration - An instance for configuring the system content-sharing picker.
Code generated from Apple documentation. DO NOT EDIT.
Index ¶
- Variables
- func NewCGImageRefErrorBlock(handler CGImageRefErrorHandler) (objc.ID, func())
- func NewCMSampleBufferRefErrorBlock(handler CMSampleBufferRefErrorHandler) (objc.ID, func())
- func NewErrorBlock(handler ErrorHandler) (objc.ID, func())
- func NewSCScreenshotOutputErrorBlock(handler SCScreenshotOutputErrorHandler) (objc.ID, func())
- func NewSCShareableContentErrorBlock(handler SCShareableContentErrorHandler) (objc.ID, func())
- type CGImageRefErrorHandler
- type CMSampleBufferRefErrorHandler
- type ErrorHandler
- type ISCContentFilter
- type ISCContentSharingPicker
- type ISCContentSharingPickerConfiguration
- type ISCDisplay
- type ISCRecordingOutput
- type ISCRecordingOutputConfiguration
- type ISCRunningApplication
- type ISCScreenshotConfiguration
- type ISCScreenshotManager
- type ISCScreenshotOutput
- type ISCShareableContent
- type ISCShareableContentInfo
- type ISCStream
- type ISCStreamConfiguration
- type ISCWindow
- type SCCaptureDynamicRange
- type SCCaptureResolutionType
- type SCContentFilter
- func NewContentFilterWithDesktopIndependentWindow(window ISCWindow) SCContentFilter
- func NewContentFilterWithDisplayExcludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, ...) SCContentFilter
- func NewContentFilterWithDisplayExcludingWindows(display ISCDisplay, excluded []SCWindow) SCContentFilter
- func NewContentFilterWithDisplayIncludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, ...) SCContentFilter
- func NewContentFilterWithDisplayIncludingWindows(display ISCDisplay, includedWindows []SCWindow) SCContentFilter
- func NewSCContentFilter() SCContentFilter
- func SCContentFilterFromID(id objc.ID) SCContentFilter
- func (c SCContentFilter) Autorelease() SCContentFilter
- func (c SCContentFilter) ContentRect() corefoundation.CGRect
- func (c SCContentFilter) IncludeMenuBar() bool
- func (c SCContentFilter) IncludedApplications() []SCRunningApplication
- func (c SCContentFilter) IncludedDisplays() []SCDisplay
- func (c SCContentFilter) IncludedWindows() []SCWindow
- func (c SCContentFilter) Init() SCContentFilter
- func (c SCContentFilter) InitWithDesktopIndependentWindow(window ISCWindow) SCContentFilter
- func (c SCContentFilter) InitWithDisplayExcludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, ...) SCContentFilter
- func (c SCContentFilter) InitWithDisplayExcludingWindows(display ISCDisplay, excluded []SCWindow) SCContentFilter
- func (c SCContentFilter) InitWithDisplayIncludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, ...) SCContentFilter
- func (c SCContentFilter) InitWithDisplayIncludingWindows(display ISCDisplay, includedWindows []SCWindow) SCContentFilter
- func (c SCContentFilter) PointPixelScale() float32
- func (c SCContentFilter) SetIncludeMenuBar(value bool)
- func (c SCContentFilter) StreamType() SCStreamType
- func (c SCContentFilter) Style() SCShareableContentStyle
- type SCContentFilterClass
- type SCContentSharingPicker
- func (c SCContentSharingPicker) Active() bool
- func (c SCContentSharingPicker) AddObserver(observer SCContentSharingPickerObserver)
- func (c SCContentSharingPicker) Autorelease() SCContentSharingPicker
- func (c SCContentSharingPicker) Configuration() ISCContentSharingPickerConfiguration
- func (c SCContentSharingPicker) DefaultConfiguration() ISCContentSharingPickerConfiguration
- func (c SCContentSharingPicker) Init() SCContentSharingPicker
- func (c SCContentSharingPicker) MaximumStreamCount() int
- func (c SCContentSharingPicker) Present()
- func (c SCContentSharingPicker) PresentPickerForStream(stream ISCStream)
- func (c SCContentSharingPicker) PresentPickerForStreamUsingContentStyle(stream ISCStream, contentStyle SCShareableContentStyle)
- func (c SCContentSharingPicker) PresentPickerUsingContentStyle(contentStyle SCShareableContentStyle)
- func (c SCContentSharingPicker) RemoveObserver(observer SCContentSharingPickerObserver)
- func (c SCContentSharingPicker) SetActive(value bool)
- func (c SCContentSharingPicker) SetConfiguration(value ISCContentSharingPickerConfiguration)
- func (c SCContentSharingPicker) SetDefaultConfiguration(value ISCContentSharingPickerConfiguration)
- func (c SCContentSharingPicker) SetMaximumStreamCount(value int)
- type SCContentSharingPickerClass
- type SCContentSharingPickerConfiguration
- func (c SCContentSharingPickerConfiguration) AllowedPickerModes() SCContentSharingPickerMode
- func (c SCContentSharingPickerConfiguration) AllowsChangingSelectedContent() bool
- func (c SCContentSharingPickerConfiguration) Autorelease() SCContentSharingPickerConfiguration
- func (c SCContentSharingPickerConfiguration) ExcludedBundleIDs() []string
- func (c SCContentSharingPickerConfiguration) ExcludedWindowIDs() []foundation.NSNumber
- func (c SCContentSharingPickerConfiguration) Init() SCContentSharingPickerConfiguration
- func (c SCContentSharingPickerConfiguration) SetAllowedPickerModes(value SCContentSharingPickerMode)
- func (c SCContentSharingPickerConfiguration) SetAllowsChangingSelectedContent(value bool)
- func (c SCContentSharingPickerConfiguration) SetExcludedBundleIDs(value []string)
- func (c SCContentSharingPickerConfiguration) SetExcludedWindowIDs(value []foundation.NSNumber)
- type SCContentSharingPickerConfigurationClass
- type SCContentSharingPickerMode
- type SCContentSharingPickerObserver
- type SCContentSharingPickerObserverObject
- func (o SCContentSharingPickerObserverObject) BaseObject() objectivec.Object
- func (o SCContentSharingPickerObserverObject) ContentSharingPickerDidCancelForStream(picker ISCContentSharingPicker, stream ISCStream)
- func (o SCContentSharingPickerObserverObject) ContentSharingPickerDidUpdateWithFilterForStream(picker ISCContentSharingPicker, filter ISCContentFilter, stream ISCStream)
- func (o SCContentSharingPickerObserverObject) ContentSharingPickerStartDidFailWithError(error_ foundation.INSError)
- type SCDisplay
- type SCDisplayClass
- type SCFrameStatus
- type SCPresenterOverlayAlertSetting
- type SCRecordingOutput
- func (r SCRecordingOutput) Autorelease() SCRecordingOutput
- func (r SCRecordingOutput) Init() SCRecordingOutput
- func (r SCRecordingOutput) InitWithConfigurationDelegate(recordingOutputConfiguration ISCRecordingOutputConfiguration, ...) SCRecordingOutput
- func (r SCRecordingOutput) RecordedDuration() objectivec.IObject
- func (r SCRecordingOutput) RecordedFileSize() int
- type SCRecordingOutputClass
- type SCRecordingOutputConfiguration
- func (r SCRecordingOutputConfiguration) Autorelease() SCRecordingOutputConfiguration
- func (r SCRecordingOutputConfiguration) AvailableOutputFileTypes() []string
- func (r SCRecordingOutputConfiguration) AvailableVideoCodecTypes() []string
- func (r SCRecordingOutputConfiguration) Init() SCRecordingOutputConfiguration
- func (r SCRecordingOutputConfiguration) OutputFileType() foundation.NSString
- func (r SCRecordingOutputConfiguration) OutputURL() foundation.INSURL
- func (r SCRecordingOutputConfiguration) SetOutputFileType(value foundation.NSString)
- func (r SCRecordingOutputConfiguration) SetOutputURL(value foundation.INSURL)
- func (r SCRecordingOutputConfiguration) SetVideoCodecType(value foundation.NSString)
- func (r SCRecordingOutputConfiguration) VideoCodecType() foundation.NSString
- type SCRecordingOutputConfigurationClass
- type SCRecordingOutputDelegate
- type SCRecordingOutputDelegateConfig
- type SCRecordingOutputDelegateObject
- func (o SCRecordingOutputDelegateObject) BaseObject() objectivec.Object
- func (o SCRecordingOutputDelegateObject) RecordingOutputDidFailWithError(recordingOutput ISCRecordingOutput, error_ foundation.INSError)
- func (o SCRecordingOutputDelegateObject) RecordingOutputDidFinishRecording(recordingOutput ISCRecordingOutput)
- func (o SCRecordingOutputDelegateObject) RecordingOutputDidStartRecording(recordingOutput ISCRecordingOutput)
- type SCRunningApplication
- type SCRunningApplicationClass
- type SCScreenshotConfiguration
- func (s SCScreenshotConfiguration) Autorelease() SCScreenshotConfiguration
- func (s SCScreenshotConfiguration) ContentType() uniformtypeidentifiers.UTType
- func (s SCScreenshotConfiguration) DestinationRect() corefoundation.CGRect
- func (s SCScreenshotConfiguration) DisplayIntent() SCScreenshotDisplayIntent
- func (s SCScreenshotConfiguration) DynamicRange() SCScreenshotDynamicRange
- func (s SCScreenshotConfiguration) FileURL() foundation.INSURL
- func (s SCScreenshotConfiguration) Height() int
- func (s SCScreenshotConfiguration) IgnoreClipping() bool
- func (s SCScreenshotConfiguration) IgnoreShadows() bool
- func (s SCScreenshotConfiguration) IncludeChildWindows() bool
- func (s SCScreenshotConfiguration) Init() SCScreenshotConfiguration
- func (s SCScreenshotConfiguration) SetContentType(value uniformtypeidentifiers.UTType)
- func (s SCScreenshotConfiguration) SetDestinationRect(value corefoundation.CGRect)
- func (s SCScreenshotConfiguration) SetDisplayIntent(value SCScreenshotDisplayIntent)
- func (s SCScreenshotConfiguration) SetDynamicRange(value SCScreenshotDynamicRange)
- func (s SCScreenshotConfiguration) SetFileURL(value foundation.INSURL)
- func (s SCScreenshotConfiguration) SetHeight(value int)
- func (s SCScreenshotConfiguration) SetIgnoreClipping(value bool)
- func (s SCScreenshotConfiguration) SetIgnoreShadows(value bool)
- func (s SCScreenshotConfiguration) SetIncludeChildWindows(value bool)
- func (s SCScreenshotConfiguration) SetShowsCursor(value bool)
- func (s SCScreenshotConfiguration) SetSourceRect(value corefoundation.CGRect)
- func (s SCScreenshotConfiguration) SetWidth(value int)
- func (s SCScreenshotConfiguration) ShowsCursor() bool
- func (s SCScreenshotConfiguration) SourceRect() corefoundation.CGRect
- func (s SCScreenshotConfiguration) Width() int
- type SCScreenshotConfigurationClass
- type SCScreenshotDisplayIntent
- type SCScreenshotDynamicRange
- type SCScreenshotManager
- type SCScreenshotManagerClass
- func (sc SCScreenshotManagerClass) Alloc() SCScreenshotManager
- func (sc SCScreenshotManagerClass) CaptureImageInRect(ctx context.Context, rect corefoundation.CGRect) (coregraphics.CGImageRef, error)
- func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureImageInRectCompletionHandler(rect corefoundation.CGRect, completionHandler CGImageRefErrorHandler)
- func (sc SCScreenshotManagerClass) CaptureImageWithFilterConfiguration(ctx context.Context, contentFilter ISCContentFilter, ...) (coregraphics.CGImageRef, error)
- func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureImageWithFilterConfigurationCompletionHandler(contentFilter ISCContentFilter, config ISCStreamConfiguration, ...)
- func (sc SCScreenshotManagerClass) CaptureSampleBufferWithFilterConfiguration(ctx context.Context, contentFilter ISCContentFilter, ...) (objectivec.IObject, error)
- func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureSampleBufferWithFilterConfigurationCompletionHandler(contentFilter ISCContentFilter, config ISCStreamConfiguration, ...)
- func (sc SCScreenshotManagerClass) CaptureScreenshotWithFilterConfiguration(ctx context.Context, contentFilter ISCContentFilter, ...) (*SCScreenshotOutput, error)
- func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureScreenshotWithFilterConfigurationCompletionHandler(contentFilter ISCContentFilter, config ISCScreenshotConfiguration, ...)
- func (sc SCScreenshotManagerClass) CaptureScreenshotWithRectConfiguration(ctx context.Context, rect corefoundation.CGRect, ...) (*SCScreenshotOutput, error)
- func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureScreenshotWithRectConfigurationCompletionHandler(rect corefoundation.CGRect, config ISCScreenshotConfiguration, ...)
- type SCScreenshotOutput
- func (s SCScreenshotOutput) Autorelease() SCScreenshotOutput
- func (s SCScreenshotOutput) FileURL() foundation.INSURL
- func (s SCScreenshotOutput) HdrImage() coregraphics.CGImageRef
- func (s SCScreenshotOutput) Init() SCScreenshotOutput
- func (s SCScreenshotOutput) SdrImage() coregraphics.CGImageRef
- func (s SCScreenshotOutput) SetFileURL(value foundation.INSURL)
- func (s SCScreenshotOutput) SetHdrImage(value coregraphics.CGImageRef)
- func (s SCScreenshotOutput) SetSdrImage(value coregraphics.CGImageRef)
- type SCScreenshotOutputClass
- type SCScreenshotOutputErrorHandler
- type SCShareableContent
- type SCShareableContentClass
- func (sc SCShareableContentClass) Alloc() SCShareableContent
- func (sc SCShareableContentClass) GetCurrentProcessShareableContent(ctx context.Context) (*SCShareableContent, error)
- func (_SCShareableContentClass SCShareableContentClass) GetCurrentProcessShareableContentWithCompletionHandler(completionHandler SCShareableContentErrorHandler)
- func (sc SCShareableContentClass) GetShareableContent(ctx context.Context) (*SCShareableContent, error)
- func (sc SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnly(ctx context.Context, excludeDesktopWindows bool, onScreenWindowsOnly bool) (*SCShareableContent, error)
- func (sc SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindow(ctx context.Context, excludeDesktopWindows bool, window ISCWindow) (*SCShareableContent, error)
- func (_SCShareableContentClass SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindowCompletionHandler(excludeDesktopWindows bool, window ISCWindow, ...)
- func (sc SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindow(ctx context.Context, excludeDesktopWindows bool, window ISCWindow) (*SCShareableContent, error)
- func (_SCShareableContentClass SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindowCompletionHandler(excludeDesktopWindows bool, window ISCWindow, ...)
- func (_SCShareableContentClass SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyCompletionHandler(excludeDesktopWindows bool, onScreenWindowsOnly bool, ...)
- func (_SCShareableContentClass SCShareableContentClass) GetShareableContentWithCompletionHandler(completionHandler SCShareableContentErrorHandler)
- func (_SCShareableContentClass SCShareableContentClass) InfoForFilter(filter ISCContentFilter) SCShareableContentInfo
- type SCShareableContentErrorHandler
- type SCShareableContentInfo
- func (s SCShareableContentInfo) Autorelease() SCShareableContentInfo
- func (s SCShareableContentInfo) ContentRect() corefoundation.CGRect
- func (s SCShareableContentInfo) Init() SCShareableContentInfo
- func (s SCShareableContentInfo) PointPixelScale() float32
- func (s SCShareableContentInfo) Style() SCShareableContentStyle
- type SCShareableContentInfoClass
- type SCShareableContentStyle
- type SCStream
- func (s SCStream) AddRecordingOutputError(recordingOutput ISCRecordingOutput) (bool, error)
- func (s SCStream) AddStreamOutputTypeSampleHandlerQueueError(output SCStreamOutput, type_ SCStreamOutputType, ...) (bool, error)
- func (s SCStream) Autorelease() SCStream
- func (s SCStream) Init() SCStream
- func (s SCStream) InitWithFilterConfigurationDelegate(contentFilter ISCContentFilter, streamConfig ISCStreamConfiguration, ...) SCStream
- func (s SCStream) RemoveRecordingOutputError(recordingOutput ISCRecordingOutput) (bool, error)
- func (s SCStream) RemoveStreamOutputTypeError(output SCStreamOutput, type_ SCStreamOutputType) (bool, error)
- func (s SCStream) StartCapture(ctx context.Context) error
- func (s SCStream) StartCaptureWithCompletionHandler(completionHandler ErrorHandler)
- func (s SCStream) StopCapture(ctx context.Context) error
- func (s SCStream) StopCaptureWithCompletionHandler(completionHandler ErrorHandler)
- func (s SCStream) SynchronizationClock() objectivec.IObject
- func (s SCStream) UpdateConfiguration(ctx context.Context, streamConfig ISCStreamConfiguration) error
- func (s SCStream) UpdateConfigurationCompletionHandler(streamConfig ISCStreamConfiguration, completionHandler ErrorHandler)
- func (s SCStream) UpdateContentFilter(ctx context.Context, contentFilter ISCContentFilter) error
- func (s SCStream) UpdateContentFilterCompletionHandler(contentFilter ISCContentFilter, completionHandler ErrorHandler)
- type SCStreamClass
- type SCStreamConfiguration
- func (s SCStreamConfiguration) Autorelease() SCStreamConfiguration
- func (s SCStreamConfiguration) BackgroundColor() coregraphics.CGColorRef
- func (s SCStreamConfiguration) CaptureDynamicRange() SCCaptureDynamicRange
- func (s SCStreamConfiguration) CaptureMicrophone() bool
- func (s SCStreamConfiguration) CaptureResolution() SCCaptureResolutionType
- func (s SCStreamConfiguration) CapturesAudio() bool
- func (s SCStreamConfiguration) CapturesShadowsOnly() bool
- func (s SCStreamConfiguration) ChannelCount() int
- func (s SCStreamConfiguration) ColorMatrix() corefoundation.CFStringRef
- func (s SCStreamConfiguration) ColorSpaceName() corefoundation.CFStringRef
- func (s SCStreamConfiguration) DestinationRect() corefoundation.CGRect
- func (s SCStreamConfiguration) ExcludesCurrentProcessAudio() bool
- func (s SCStreamConfiguration) Height() uintptr
- func (s SCStreamConfiguration) IgnoreGlobalClipDisplay() bool
- func (s SCStreamConfiguration) IgnoreGlobalClipSingleWindow() bool
- func (s SCStreamConfiguration) IgnoreShadowsDisplay() bool
- func (s SCStreamConfiguration) IgnoreShadowsSingleWindow() bool
- func (s SCStreamConfiguration) IncludeChildWindows() bool
- func (s SCStreamConfiguration) Init() SCStreamConfiguration
- func (s SCStreamConfiguration) MicrophoneCaptureDeviceID() string
- func (s SCStreamConfiguration) MinimumFrameInterval() objectivec.IObject
- func (s SCStreamConfiguration) PixelFormat() uint32
- func (s SCStreamConfiguration) PresenterOverlayPrivacyAlertSetting() SCPresenterOverlayAlertSetting
- func (s SCStreamConfiguration) PreservesAspectRatio() bool
- func (s SCStreamConfiguration) QueueDepth() int
- func (s SCStreamConfiguration) SampleRate() int
- func (s SCStreamConfiguration) ScalesToFit() bool
- func (s SCStreamConfiguration) SetBackgroundColor(value coregraphics.CGColorRef)
- func (s SCStreamConfiguration) SetCaptureDynamicRange(value SCCaptureDynamicRange)
- func (s SCStreamConfiguration) SetCaptureMicrophone(value bool)
- func (s SCStreamConfiguration) SetCaptureResolution(value SCCaptureResolutionType)
- func (s SCStreamConfiguration) SetCapturesAudio(value bool)
- func (s SCStreamConfiguration) SetCapturesShadowsOnly(value bool)
- func (s SCStreamConfiguration) SetChannelCount(value int)
- func (s SCStreamConfiguration) SetColorMatrix(value corefoundation.CFStringRef)
- func (s SCStreamConfiguration) SetColorSpaceName(value corefoundation.CFStringRef)
- func (s SCStreamConfiguration) SetDestinationRect(value corefoundation.CGRect)
- func (s SCStreamConfiguration) SetExcludesCurrentProcessAudio(value bool)
- func (s SCStreamConfiguration) SetHeight(value uintptr)
- func (s SCStreamConfiguration) SetIgnoreGlobalClipDisplay(value bool)
- func (s SCStreamConfiguration) SetIgnoreGlobalClipSingleWindow(value bool)
- func (s SCStreamConfiguration) SetIgnoreShadowsDisplay(value bool)
- func (s SCStreamConfiguration) SetIgnoreShadowsSingleWindow(value bool)
- func (s SCStreamConfiguration) SetIncludeChildWindows(value bool)
- func (s SCStreamConfiguration) SetMicrophoneCaptureDeviceID(value string)
- func (s SCStreamConfiguration) SetMinimumFrameInterval(value objectivec.IObject)
- func (s SCStreamConfiguration) SetPixelFormat(value uint32)
- func (s SCStreamConfiguration) SetPresenterOverlayPrivacyAlertSetting(value SCPresenterOverlayAlertSetting)
- func (s SCStreamConfiguration) SetPreservesAspectRatio(value bool)
- func (s SCStreamConfiguration) SetQueueDepth(value int)
- func (s SCStreamConfiguration) SetSampleRate(value int)
- func (s SCStreamConfiguration) SetScalesToFit(value bool)
- func (s SCStreamConfiguration) SetShouldBeOpaque(value bool)
- func (s SCStreamConfiguration) SetShowMouseClicks(value bool)
- func (s SCStreamConfiguration) SetShowsCursor(value bool)
- func (s SCStreamConfiguration) SetSourceRect(value corefoundation.CGRect)
- func (s SCStreamConfiguration) SetStreamName(value string)
- func (s SCStreamConfiguration) SetWidth(value uintptr)
- func (s SCStreamConfiguration) ShouldBeOpaque() bool
- func (s SCStreamConfiguration) ShowMouseClicks() bool
- func (s SCStreamConfiguration) ShowsCursor() bool
- func (s SCStreamConfiguration) SourceRect() corefoundation.CGRect
- func (s SCStreamConfiguration) StreamName() string
- func (s SCStreamConfiguration) Width() uintptr
- type SCStreamConfigurationClass
- type SCStreamConfigurationPreset
- type SCStreamDelegate
- type SCStreamDelegateConfig
- type SCStreamDelegateObject
- func (o SCStreamDelegateObject) BaseObject() objectivec.Object
- func (o SCStreamDelegateObject) OutputVideoEffectDidStartForStream(stream ISCStream)
- func (o SCStreamDelegateObject) OutputVideoEffectDidStopForStream(stream ISCStream)
- func (o SCStreamDelegateObject) StreamDidBecomeActive(stream ISCStream)
- func (o SCStreamDelegateObject) StreamDidBecomeInactive(stream ISCStream)
- func (o SCStreamDelegateObject) StreamDidStopWithError(stream ISCStream, error_ foundation.INSError)
- type SCStreamErrorCode
- type SCStreamFrameInfo
- type SCStreamFrameInfoValues
- func (SCStreamFrameInfoValues) BoundingRect() SCStreamFrameInfo
- func (SCStreamFrameInfoValues) ContentRect() SCStreamFrameInfo
- func (SCStreamFrameInfoValues) ContentScale() SCStreamFrameInfo
- func (SCStreamFrameInfoValues) DirtyRects() SCStreamFrameInfo
- func (SCStreamFrameInfoValues) DisplayTime() SCStreamFrameInfo
- func (SCStreamFrameInfoValues) PresenterOverlayContentRect() SCStreamFrameInfo
- func (SCStreamFrameInfoValues) ScaleFactor() SCStreamFrameInfo
- func (SCStreamFrameInfoValues) ScreenRect() SCStreamFrameInfo
- func (SCStreamFrameInfoValues) Status() SCStreamFrameInfo
- type SCStreamOutput
- type SCStreamOutputObject
- type SCStreamOutputType
- type SCStreamType
- type SCWindow
- func (w SCWindow) Active() bool
- func (w SCWindow) Autorelease() SCWindow
- func (w SCWindow) Frame() corefoundation.CGRect
- func (w SCWindow) Init() SCWindow
- func (w SCWindow) OnScreen() bool
- func (w SCWindow) OwningApplication() ISCRunningApplication
- func (w SCWindow) Title() string
- func (w SCWindow) WindowID() uint32
- func (w SCWindow) WindowLayer() int
- type SCWindowClass
Constants ¶
This section is empty.
Variables ¶
var SCStreamErrorDomain string
Functions ¶
func NewCGImageRefErrorBlock ¶
func NewCGImageRefErrorBlock(handler CGImageRefErrorHandler) (objc.ID, func())
NewCGImageRefErrorBlock wraps a Go CGImageRefErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
- [SCScreenshotManager.CaptureImageInRectCompletionHandler]
- [SCScreenshotManager.CaptureImageWithFilterConfigurationCompletionHandler]
func NewCMSampleBufferRefErrorBlock ¶
func NewCMSampleBufferRefErrorBlock(handler CMSampleBufferRefErrorHandler) (objc.ID, func())
NewCMSampleBufferRefErrorBlock wraps a Go CMSampleBufferRefErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
- [SCScreenshotManager.CaptureSampleBufferWithFilterConfigurationCompletionHandler]
func NewErrorBlock ¶
func NewErrorBlock(handler ErrorHandler) (objc.ID, func())
NewErrorBlock wraps a Go ErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
func NewSCScreenshotOutputErrorBlock ¶
func NewSCScreenshotOutputErrorBlock(handler SCScreenshotOutputErrorHandler) (objc.ID, func())
NewSCScreenshotOutputErrorBlock wraps a Go SCScreenshotOutputErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
- [SCScreenshotManager.CaptureScreenshotWithFilterConfigurationCompletionHandler]
- [SCScreenshotManager.CaptureScreenshotWithRectConfigurationCompletionHandler]
func NewSCShareableContentErrorBlock ¶
func NewSCShareableContentErrorBlock(handler SCShareableContentErrorHandler) (objc.ID, func())
NewSCShareableContentErrorBlock wraps a Go SCShareableContentErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.
Used by:
- [SCShareableContent.GetCurrentProcessShareableContentWithCompletionHandler]
- [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindowCompletionHandler]
- [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindowCompletionHandler]
- [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyCompletionHandler]
- [SCShareableContent.GetShareableContentWithCompletionHandler]
Types ¶
type CGImageRefErrorHandler ¶
type CGImageRefErrorHandler = func(coregraphics.CGImageRef, error)
CGImageRefErrorHandler handles Closure that processes the screenshot taken from the streaming content. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.
Used by:
- [SCScreenshotManager.CaptureImageInRectCompletionHandler]
- [SCScreenshotManager.CaptureImageWithFilterConfigurationCompletionHandler]
type CMSampleBufferRefErrorHandler ¶
type CMSampleBufferRefErrorHandler = func(objectivec.IObject, error)
CMSampleBufferRefErrorHandler handles Closure that processes the capture taken from streaming content. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.
Used by:
- [SCScreenshotManager.CaptureSampleBufferWithFilterConfigurationCompletionHandler]
type ErrorHandler ¶
type ErrorHandler = func(error)
ErrorHandler handles A completion handler the system calls when this method completes. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.
Used by:
type ISCContentFilter ¶
type ISCContentFilter interface {
objectivec.IObject
// Creates a filter that captures only the specified window.
InitWithDesktopIndependentWindow(window ISCWindow) SCContentFilter
// Creates a filter that captures only specific windows from a display.
InitWithDisplayIncludingWindows(display ISCDisplay, includedWindows []SCWindow) SCContentFilter
// Creates a filter that captures the contents of a display, excluding the specified windows.
InitWithDisplayExcludingWindows(display ISCDisplay, excluded []SCWindow) SCContentFilter
// Creates a filter that captures a display, including only windows of the specified apps.
InitWithDisplayIncludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, exceptingWindows []SCWindow) SCContentFilter
// Creates a filter that captures a display, excluding windows of the specified apps.
InitWithDisplayExcludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, exceptingWindows []SCWindow) SCContentFilter
// The size and location of the content to filter, in screen points.
ContentRect() corefoundation.CGRect
// The scaling factor used to translate screen points into pixels.
PointPixelScale() float32
// The type of the streaming content.
StreamType() SCStreamType
// The display style of the sharable content.
Style() SCShareableContentStyle
IncludeMenuBar() bool
SetIncludeMenuBar(value bool)
IncludedApplications() []SCRunningApplication
IncludedDisplays() []SCDisplay
IncludedWindows() []SCWindow
}
An interface definition for the SCContentFilter class.
Creating a filter ¶
- [ISCContentFilter.InitWithDesktopIndependentWindow]: Creates a filter that captures only the specified window.
- [ISCContentFilter.InitWithDisplayIncludingWindows]: Creates a filter that captures only specific windows from a display.
- [ISCContentFilter.InitWithDisplayExcludingWindows]: Creates a filter that captures the contents of a display, excluding the specified windows.
- [ISCContentFilter.InitWithDisplayIncludingApplicationsExceptingWindows]: Creates a filter that captures a display, including only windows of the specified apps.
- [ISCContentFilter.InitWithDisplayExcludingApplicationsExceptingWindows]: Creates a filter that captures a display, excluding windows of the specified apps.
Filter properties ¶
- [ISCContentFilter.ContentRect]: The size and location of the content to filter, in screen points.
- [ISCContentFilter.PointPixelScale]: The scaling factor used to translate screen points into pixels.
- [ISCContentFilter.StreamType]: The type of the streaming content.
- [ISCContentFilter.Style]: The display style of the sharable content.
Instance Properties ¶
- [ISCContentFilter.IncludeMenuBar]
- [ISCContentFilter.SetIncludeMenuBar]
- [ISCContentFilter.IncludedApplications]
- [ISCContentFilter.IncludedDisplays]
- [ISCContentFilter.IncludedWindows]
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter
type ISCContentSharingPicker ¶
type ISCContentSharingPicker interface {
objectivec.IObject
// A Boolean value that indicates if the picker is active.
Active() bool
SetActive(value bool)
// Sets the configuration for the content capture picker for all streams, providing allowed selection modes and content excluded from selection.
Configuration() ISCContentSharingPickerConfiguration
SetConfiguration(value ISCContentSharingPickerConfiguration)
// The default configuration to use for the content capture picker.
DefaultConfiguration() ISCContentSharingPickerConfiguration
SetDefaultConfiguration(value ISCContentSharingPickerConfiguration)
// The maximum number of streams the content capture picker allows.
MaximumStreamCount() int
SetMaximumStreamCount(value int)
// Adds an observer instance to notify of changes in the content-sharing picker.
AddObserver(observer SCContentSharingPickerObserver)
// Removes an observer instance from the content-sharing picker.
RemoveObserver(observer SCContentSharingPickerObserver)
// Displays the picker with no active selection for capture.
Present()
// Displays the picker with an already running capture stream.
PresentPickerForStream(stream ISCStream)
// Displays the picker for a single type of capture selection.
PresentPickerUsingContentStyle(contentStyle SCShareableContentStyle)
// Displays the picker with an existing capture stream, allowing for a single type of capture selection.
PresentPickerForStreamUsingContentStyle(stream ISCStream, contentStyle SCShareableContentStyle)
}
An interface definition for the SCContentSharingPicker class.
Picker availability ¶
- [ISCContentSharingPicker.Active]: A Boolean value that indicates if the picker is active.
- [ISCContentSharingPicker.SetActive]
Stream configuration ¶
- [ISCContentSharingPicker.Configuration]: Sets the configuration for the content capture picker for all streams, providing allowed selection modes and content excluded from selection.
- [ISCContentSharingPicker.SetConfiguration]
- [ISCContentSharingPicker.DefaultConfiguration]: The default configuration to use for the content capture picker.
- [ISCContentSharingPicker.SetDefaultConfiguration]
- [ISCContentSharingPicker.MaximumStreamCount]: The maximum number of streams the content capture picker allows.
- [ISCContentSharingPicker.SetMaximumStreamCount]
Manage observers ¶
- [ISCContentSharingPicker.AddObserver]: Adds an observer instance to notify of changes in the content-sharing picker.
- [ISCContentSharingPicker.RemoveObserver]: Removes an observer instance from the content-sharing picker.
Picker display ¶
- [ISCContentSharingPicker.Present]: Displays the picker with no active selection for capture.
- [ISCContentSharingPicker.PresentPickerForStream]: Displays the picker with an already running capture stream.
- [ISCContentSharingPicker.PresentPickerUsingContentStyle]: Displays the picker for a single type of capture selection.
- [ISCContentSharingPicker.PresentPickerForStreamUsingContentStyle]: Displays the picker with an existing capture stream, allowing for a single type of capture selection.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker
type ISCContentSharingPickerConfiguration ¶
type ISCContentSharingPickerConfiguration interface {
objectivec.IObject
// The content-selection modes supported by the picker.
AllowedPickerModes() SCContentSharingPickerMode
SetAllowedPickerModes(value SCContentSharingPickerMode)
// A Boolean value that indicates if the present stream can change to a different source.
AllowsChangingSelectedContent() bool
SetAllowsChangingSelectedContent(value bool)
// A list of bundle IDs to exclude from the sharing picker.
ExcludedBundleIDs() []string
SetExcludedBundleIDs(value []string)
// A list of window IDs to exclude from the sharing picker.
ExcludedWindowIDs() []foundation.NSNumber
SetExcludedWindowIDs(value []foundation.NSNumber)
}
An interface definition for the SCContentSharingPickerConfiguration class.
Control streaming selections ¶
- [ISCContentSharingPickerConfiguration.AllowedPickerModes]: The content-selection modes supported by the picker.
- [ISCContentSharingPickerConfiguration.SetAllowedPickerModes]
- [ISCContentSharingPickerConfiguration.AllowsChangingSelectedContent]: A Boolean value that indicates if the present stream can change to a different source.
- [ISCContentSharingPickerConfiguration.SetAllowsChangingSelectedContent]
- [ISCContentSharingPickerConfiguration.ExcludedBundleIDs]: A list of bundle IDs to exclude from the sharing picker.
- [ISCContentSharingPickerConfiguration.SetExcludedBundleIDs]
- [ISCContentSharingPickerConfiguration.ExcludedWindowIDs]: A list of window IDs to exclude from the sharing picker.
- [ISCContentSharingPickerConfiguration.SetExcludedWindowIDs]
type ISCDisplay ¶
type ISCDisplay interface {
objectivec.IObject
// The Core Graphics display identifier.
DisplayID() uint32
// The frame of the display.
Frame() corefoundation.CGRect
// The width of the display in points.
Width() int
// The height of the display in points.
Height() int
}
An interface definition for the SCDisplay class.
Identifying displays ¶
- [ISCDisplay.DisplayID]: The Core Graphics display identifier.
Accessing dimensions ¶
- [ISCDisplay.Frame]: The frame of the display.
- [ISCDisplay.Width]: The width of the display in points.
- [ISCDisplay.Height]: The height of the display in points.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCDisplay
type ISCRecordingOutput ¶
type ISCRecordingOutput interface {
objectivec.IObject
InitWithConfigurationDelegate(recordingOutputConfiguration ISCRecordingOutputConfiguration, delegate SCRecordingOutputDelegate) SCRecordingOutput
RecordedDuration() objectivec.IObject
RecordedFileSize() int
}
An interface definition for the SCRecordingOutput class.
Creating a recording output ¶
- [ISCRecordingOutput.InitWithConfigurationDelegate]
Configuring the recording output ¶
- [ISCRecordingOutput.RecordedDuration]
- [ISCRecordingOutput.RecordedFileSize]
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRecordingOutput
type ISCRecordingOutputConfiguration ¶
type ISCRecordingOutputConfiguration interface {
objectivec.IObject
AvailableOutputFileTypes() []string
AvailableVideoCodecTypes() []string
OutputFileType() foundation.NSString
SetOutputFileType(value foundation.NSString)
OutputURL() foundation.INSURL
SetOutputURL(value foundation.INSURL)
VideoCodecType() foundation.NSString
SetVideoCodecType(value foundation.NSString)
}
An interface definition for the SCRecordingOutputConfiguration class.
Instance Properties ¶
- [ISCRecordingOutputConfiguration.AvailableOutputFileTypes]
- [ISCRecordingOutputConfiguration.AvailableVideoCodecTypes]
- [ISCRecordingOutputConfiguration.OutputFileType]
- [ISCRecordingOutputConfiguration.SetOutputFileType]
- [ISCRecordingOutputConfiguration.OutputURL]
- [ISCRecordingOutputConfiguration.SetOutputURL]
- [ISCRecordingOutputConfiguration.VideoCodecType]
- [ISCRecordingOutputConfiguration.SetVideoCodecType]
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRecordingOutputConfiguration
type ISCRunningApplication ¶
type ISCRunningApplication interface {
objectivec.IObject
// The system process identifier of the app.
ProcessID() int32
// The unique bundle identifier of the app.
BundleIdentifier() string
// The display name of the app.
ApplicationName() string
}
An interface definition for the SCRunningApplication class.
Inspecting an app ¶
- [ISCRunningApplication.ProcessID]: The system process identifier of the app.
- [ISCRunningApplication.BundleIdentifier]: The unique bundle identifier of the app.
- [ISCRunningApplication.ApplicationName]: The display name of the app.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRunningApplication
type ISCScreenshotConfiguration ¶
type ISCScreenshotConfiguration interface {
objectivec.IObject
// A uniform type identifier that specifies the screenshot’s file format; HEIC, JPEG, or PNG.
ContentType() uniformtypeidentifiers.UTType
SetContentType(value uniformtypeidentifiers.UTType)
// A rectangle that specifies whether to output screenshots in a subset of the output image.
DestinationRect() corefoundation.CGRect
SetDestinationRect(value corefoundation.CGRect)
// Specifies whether the screen capture uses attributes of the local or canonical display.
DisplayIntent() SCScreenshotDisplayIntent
SetDisplayIntent(value SCScreenshotDisplayIntent)
// Specifies the type of image returned to the client; standard dynamic range, high dynamic range, or both.
DynamicRange() SCScreenshotDynamicRange
SetDynamicRange(value SCScreenshotDynamicRange)
// Specifies the URL where the screenshot process saves the output.
FileURL() foundation.INSURL
SetFileURL(value foundation.INSURL)
// An integer value that specifies the output height, measured in pixels.
Height() int
SetHeight(value int)
// A Boolean value that specifies whether to ignore framing on windows when using content filters.
IgnoreClipping() bool
SetIgnoreClipping(value bool)
// A Boolean value that specifies whether to ignore framing on windows.
IgnoreShadows() bool
SetIgnoreShadows(value bool)
// A Boolean that specifies whether the screenshot captures subwindows of the included apps and windows.
IncludeChildWindows() bool
SetIncludeChildWindows(value bool)
// A Boolean value that specifies whether the pointer appears in the screenshot.
ShowsCursor() bool
SetShowsCursor(value bool)
// A rectangle that specifies that the screenshot only samples a subset of the frame input.
SourceRect() corefoundation.CGRect
SetSourceRect(value corefoundation.CGRect)
// An integer value that specifies the output width in pixels.
Width() int
SetWidth(value int)
}
An interface definition for the SCScreenshotConfiguration class.
Instance Properties ¶
- [ISCScreenshotConfiguration.ContentType]: A uniform type identifier that specifies the screenshot’s file format; HEIC, JPEG, or PNG.
- [ISCScreenshotConfiguration.SetContentType]
- [ISCScreenshotConfiguration.DestinationRect]: A rectangle that specifies whether to output screenshots in a subset of the output image.
- [ISCScreenshotConfiguration.SetDestinationRect]
- [ISCScreenshotConfiguration.DisplayIntent]: Specifies whether the screen capture uses attributes of the local or canonical display.
- [ISCScreenshotConfiguration.SetDisplayIntent]
- [ISCScreenshotConfiguration.DynamicRange]: Specifies the type of image returned to the client; standard dynamic range, high dynamic range, or both.
- [ISCScreenshotConfiguration.SetDynamicRange]
- [ISCScreenshotConfiguration.FileURL]: Specifies the URL where the screenshot process saves the output.
- [ISCScreenshotConfiguration.SetFileURL]
- [ISCScreenshotConfiguration.Height]: An integer value that specifies the output height, measured in pixels.
- [ISCScreenshotConfiguration.SetHeight]
- [ISCScreenshotConfiguration.IgnoreClipping]: A Boolean value that specifies whether to ignore framing on windows when using content filters.
- [ISCScreenshotConfiguration.SetIgnoreClipping]
- [ISCScreenshotConfiguration.IgnoreShadows]: A Boolean value that specifies whether to ignore framing on windows.
- [ISCScreenshotConfiguration.SetIgnoreShadows]
- [ISCScreenshotConfiguration.IncludeChildWindows]: A Boolean that specifies whether the screenshot captures subwindows of the included apps and windows.
- [ISCScreenshotConfiguration.SetIncludeChildWindows]
- [ISCScreenshotConfiguration.ShowsCursor]: A Boolean value that specifies whether the pointer appears in the screenshot.
- [ISCScreenshotConfiguration.SetShowsCursor]
- [ISCScreenshotConfiguration.SourceRect]: A rectangle that specifies that the screenshot only samples a subset of the frame input.
- [ISCScreenshotConfiguration.SetSourceRect]
- [ISCScreenshotConfiguration.Width]: An integer value that specifies the output width in pixels.
- [ISCScreenshotConfiguration.SetWidth]
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration
type ISCScreenshotManager ¶
type ISCScreenshotManager interface {
objectivec.IObject
}
An interface definition for the SCScreenshotManager class.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotManager
type ISCScreenshotOutput ¶
type ISCScreenshotOutput interface {
objectivec.IObject
// A URL property that specifies the location of the saved image.
FileURL() foundation.INSURL
SetFileURL(value foundation.INSURL)
// An output property that specifies the high dynamic range version of the screenshot.
HdrImage() coregraphics.CGImageRef
SetHdrImage(value coregraphics.CGImageRef)
// An output property that specifies the standard dynamic range version of the screenshot.
SdrImage() coregraphics.CGImageRef
SetSdrImage(value coregraphics.CGImageRef)
}
An interface definition for the SCScreenshotOutput class.
Instance Properties ¶
- [ISCScreenshotOutput.FileURL]: A URL property that specifies the location of the saved image.
- [ISCScreenshotOutput.SetFileURL]
- [ISCScreenshotOutput.HdrImage]: An output property that specifies the high dynamic range version of the screenshot.
- [ISCScreenshotOutput.SetHdrImage]
- [ISCScreenshotOutput.SdrImage]: An output property that specifies the standard dynamic range version of the screenshot.
- [ISCScreenshotOutput.SetSdrImage]
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotOutput
type ISCShareableContent ¶
type ISCShareableContent interface {
objectivec.IObject
Windows() []SCWindow
Displays() []SCDisplay
Applications() []SCRunningApplication
}
An interface definition for the SCShareableContent class.
Inspecting shareable content ¶
- [ISCShareableContent.Windows]: The windows available for capture.
- [ISCShareableContent.Displays]: The displays available for capture.
- [ISCShareableContent.Applications]: The apps available for capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContent
type ISCShareableContentInfo ¶
type ISCShareableContentInfo interface {
objectivec.IObject
ContentRect() corefoundation.CGRect
PointPixelScale() float32
Style() SCShareableContentStyle
}
An interface definition for the SCShareableContentInfo class.
Shared content properties ¶
- [ISCShareableContentInfo.ContentRect]: The size and location of content for the stream.
- [ISCShareableContentInfo.PointPixelScale]: The scaling from points to output pixel resolution for the stream.
- [ISCShareableContentInfo.Style]: The current presentation style of the stream.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContentInfo
type ISCStream ¶
type ISCStream interface {
objectivec.IObject
// Creates a stream with a content filter and configuration.
InitWithFilterConfigurationDelegate(contentFilter ISCContentFilter, streamConfig ISCStreamConfiguration, delegate SCStreamDelegate) SCStream
// Updates the stream with a new configuration.
UpdateConfigurationCompletionHandler(streamConfig ISCStreamConfiguration, completionHandler ErrorHandler)
// Updates the stream by applying a new content filter.
UpdateContentFilterCompletionHandler(contentFilter ISCContentFilter, completionHandler ErrorHandler)
// Adds a destination that receives the stream output.
AddStreamOutputTypeSampleHandlerQueueError(output SCStreamOutput, type_ SCStreamOutputType, sampleHandlerQueue dispatch.Queue) (bool, error)
// Removes a destination from receiving stream output.
RemoveStreamOutputTypeError(output SCStreamOutput, type_ SCStreamOutputType) (bool, error)
AddRecordingOutputError(recordingOutput ISCRecordingOutput) (bool, error)
RemoveRecordingOutputError(recordingOutput ISCRecordingOutput) (bool, error)
// Starts the stream with a callback to indicate whether it successfully starts.
StartCaptureWithCompletionHandler(completionHandler ErrorHandler)
// Stops the stream.
StopCaptureWithCompletionHandler(completionHandler ErrorHandler)
// A clock to use for output synchronization.
SynchronizationClock() objectivec.IObject
}
An interface definition for the SCStream class.
Creating a stream ¶
- [ISCStream.InitWithFilterConfigurationDelegate]: Creates a stream with a content filter and configuration.
Updating stream configuration ¶
- [ISCStream.UpdateConfigurationCompletionHandler]: Updates the stream with a new configuration.
- [ISCStream.UpdateContentFilterCompletionHandler]: Updates the stream by applying a new content filter.
Adding and removing stream output ¶
- [ISCStream.AddStreamOutputTypeSampleHandlerQueueError]: Adds a destination that receives the stream output.
- [ISCStream.RemoveStreamOutputTypeError]: Removes a destination from receiving stream output.
Adding and removing recording output ¶
- [ISCStream.AddRecordingOutputError]
- [ISCStream.RemoveRecordingOutputError]
Starting and stopping a stream ¶
- [ISCStream.StartCaptureWithCompletionHandler]: Starts the stream with a callback to indicate whether it successfully starts.
- [ISCStream.StopCaptureWithCompletionHandler]: Stops the stream.
Stream synchronization ¶
- [ISCStream.SynchronizationClock]: A clock to use for output synchronization.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStream
type ISCStreamConfiguration ¶
type ISCStreamConfiguration interface {
objectivec.IObject
// The width of the output.
Width() uintptr
SetWidth(value uintptr)
// The height of the output.
Height() uintptr
SetHeight(value uintptr)
// A Boolean value that indicates whether to scale the output to fit the configured width and height.
ScalesToFit() bool
SetScalesToFit(value bool)
// A rectangle that specifies the source area to capture.
SourceRect() corefoundation.CGRect
SetSourceRect(value corefoundation.CGRect)
// A rectangle that specifies a destination into which to write the output.
DestinationRect() corefoundation.CGRect
SetDestinationRect(value corefoundation.CGRect)
// A Boolean value that determines if the stream preserves aspect ratio.
PreservesAspectRatio() bool
SetPreservesAspectRatio(value bool)
// A pixel format for sample buffers that a stream outputs.
PixelFormat() uint32
SetPixelFormat(value uint32)
// A color matrix to apply to the output surface.
ColorMatrix() corefoundation.CFStringRef
SetColorMatrix(value corefoundation.CFStringRef)
// A color space to use for the output buffer.
ColorSpaceName() corefoundation.CFStringRef
SetColorSpaceName(value corefoundation.CFStringRef)
// A background color for the output.
BackgroundColor() coregraphics.CGColorRef
SetBackgroundColor(value coregraphics.CGColorRef)
// A Boolean value that determines whether the cursor is visible in the stream.
ShowsCursor() bool
SetShowsCursor(value bool)
// A Boolean value that indicates if semitransparent content presents as opaque.
ShouldBeOpaque() bool
SetShouldBeOpaque(value bool)
// A Boolean value that indicates if the stream only captures shadows.
CapturesShadowsOnly() bool
SetCapturesShadowsOnly(value bool)
// A Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in display style.
IgnoreShadowsDisplay() bool
SetIgnoreShadowsDisplay(value bool)
// A Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in window style.
IgnoreShadowsSingleWindow() bool
SetIgnoreShadowsSingleWindow(value bool)
// A Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in display style.
IgnoreGlobalClipDisplay() bool
SetIgnoreGlobalClipDisplay(value bool)
// A Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in window style.
IgnoreGlobalClipSingleWindow() bool
SetIgnoreGlobalClipSingleWindow(value bool)
// The maximum number of frames for the queue to store.
QueueDepth() int
SetQueueDepth(value int)
// The desired minimum time between frame updates, in seconds.
MinimumFrameInterval() objectivec.IObject
SetMinimumFrameInterval(value objectivec.IObject)
// The resolution at which to capture source content.
CaptureResolution() SCCaptureResolutionType
SetCaptureResolution(value SCCaptureResolutionType)
// A Boolean value that indicates whether to capture audio.
CapturesAudio() bool
SetCapturesAudio(value bool)
// The sample rate for audio capture.
SampleRate() int
SetSampleRate(value int)
// The number of audio channels to capture.
ChannelCount() int
SetChannelCount(value int)
// A Boolean value that indicates whether to exclude audio from your app during capture.
ExcludesCurrentProcessAudio() bool
SetExcludesCurrentProcessAudio(value bool)
// A name that you provide for identifying the stream.
StreamName() string
SetStreamName(value string)
// A value indicating if alerts appear to presenters while using Presenter Overlay.
PresenterOverlayPrivacyAlertSetting() SCPresenterOverlayAlertSetting
SetPresenterOverlayPrivacyAlertSetting(value SCPresenterOverlayAlertSetting)
CaptureDynamicRange() SCCaptureDynamicRange
SetCaptureDynamicRange(value SCCaptureDynamicRange)
CaptureMicrophone() bool
SetCaptureMicrophone(value bool)
IncludeChildWindows() bool
SetIncludeChildWindows(value bool)
MicrophoneCaptureDeviceID() string
SetMicrophoneCaptureDeviceID(value string)
ShowMouseClicks() bool
SetShowMouseClicks(value bool)
}
An interface definition for the SCStreamConfiguration class.
Specifying dimensions ¶
- [ISCStreamConfiguration.Width]: The width of the output.
- [ISCStreamConfiguration.SetWidth]
- [ISCStreamConfiguration.Height]: The height of the output.
- [ISCStreamConfiguration.SetHeight]
- [ISCStreamConfiguration.ScalesToFit]: A Boolean value that indicates whether to scale the output to fit the configured width and height.
- [ISCStreamConfiguration.SetScalesToFit]
- [ISCStreamConfiguration.SourceRect]: A rectangle that specifies the source area to capture.
- [ISCStreamConfiguration.SetSourceRect]
- [ISCStreamConfiguration.DestinationRect]: A rectangle that specifies a destination into which to write the output.
- [ISCStreamConfiguration.SetDestinationRect]
- [ISCStreamConfiguration.PreservesAspectRatio]: A Boolean value that determines if the stream preserves aspect ratio.
- [ISCStreamConfiguration.SetPreservesAspectRatio]
Configuring colors ¶
- [ISCStreamConfiguration.PixelFormat]: A pixel format for sample buffers that a stream outputs.
- [ISCStreamConfiguration.SetPixelFormat]
- [ISCStreamConfiguration.ColorMatrix]: A color matrix to apply to the output surface.
- [ISCStreamConfiguration.SetColorMatrix]
- [ISCStreamConfiguration.ColorSpaceName]: A color space to use for the output buffer.
- [ISCStreamConfiguration.SetColorSpaceName]
- [ISCStreamConfiguration.BackgroundColor]: A background color for the output.
- [ISCStreamConfiguration.SetBackgroundColor]
Configuring captured elements ¶
- [ISCStreamConfiguration.ShowsCursor]: A Boolean value that determines whether the cursor is visible in the stream.
- [ISCStreamConfiguration.SetShowsCursor]
- [ISCStreamConfiguration.ShouldBeOpaque]: A Boolean value that indicates if semitransparent content presents as opaque.
- [ISCStreamConfiguration.SetShouldBeOpaque]
- [ISCStreamConfiguration.CapturesShadowsOnly]: A Boolean value that indicates if the stream only captures shadows.
- [ISCStreamConfiguration.SetCapturesShadowsOnly]
- [ISCStreamConfiguration.IgnoreShadowsDisplay]: A Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in display style.
- [ISCStreamConfiguration.SetIgnoreShadowsDisplay]
- [ISCStreamConfiguration.IgnoreShadowsSingleWindow]: A Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in window style.
- [ISCStreamConfiguration.SetIgnoreShadowsSingleWindow]
- [ISCStreamConfiguration.IgnoreGlobalClipDisplay]: A Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in display style.
- [ISCStreamConfiguration.SetIgnoreGlobalClipDisplay]
- [ISCStreamConfiguration.IgnoreGlobalClipSingleWindow]: A Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in window style.
- [ISCStreamConfiguration.SetIgnoreGlobalClipSingleWindow]
Configuring captured frames ¶
- [ISCStreamConfiguration.QueueDepth]: The maximum number of frames for the queue to store.
- [ISCStreamConfiguration.SetQueueDepth]
- [ISCStreamConfiguration.MinimumFrameInterval]: The desired minimum time between frame updates, in seconds.
- [ISCStreamConfiguration.SetMinimumFrameInterval]
- [ISCStreamConfiguration.CaptureResolution]: The resolution at which to capture source content.
- [ISCStreamConfiguration.SetCaptureResolution]
Configuring audio ¶
- [ISCStreamConfiguration.CapturesAudio]: A Boolean value that indicates whether to capture audio.
- [ISCStreamConfiguration.SetCapturesAudio]
- [ISCStreamConfiguration.SampleRate]: The sample rate for audio capture.
- [ISCStreamConfiguration.SetSampleRate]
- [ISCStreamConfiguration.ChannelCount]: The number of audio channels to capture.
- [ISCStreamConfiguration.SetChannelCount]
- [ISCStreamConfiguration.ExcludesCurrentProcessAudio]: A Boolean value that indicates whether to exclude audio from your app during capture.
- [ISCStreamConfiguration.SetExcludesCurrentProcessAudio]
Identifying a stream ¶
- [ISCStreamConfiguration.StreamName]: A name that you provide for identifying the stream.
- [ISCStreamConfiguration.SetStreamName]
Notifying presenters ¶
- [ISCStreamConfiguration.PresenterOverlayPrivacyAlertSetting]: A value indicating if alerts appear to presenters while using Presenter Overlay.
- [ISCStreamConfiguration.SetPresenterOverlayPrivacyAlertSetting]
Instance Properties ¶
- [ISCStreamConfiguration.CaptureDynamicRange]
- [ISCStreamConfiguration.SetCaptureDynamicRange]
- [ISCStreamConfiguration.CaptureMicrophone]
- [ISCStreamConfiguration.SetCaptureMicrophone]
- [ISCStreamConfiguration.IncludeChildWindows]
- [ISCStreamConfiguration.SetIncludeChildWindows]
- [ISCStreamConfiguration.MicrophoneCaptureDeviceID]
- [ISCStreamConfiguration.SetMicrophoneCaptureDeviceID]
- [ISCStreamConfiguration.ShowMouseClicks]
- [ISCStreamConfiguration.SetShowMouseClicks]
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration
type ISCWindow ¶
type ISCWindow interface {
objectivec.IObject
// The Core Graphics window identifier.
WindowID() uint32
// The string that displays in a window’s title bar.
Title() string
// The app that owns the window.
OwningApplication() ISCRunningApplication
// The layer of the window relative to other windows.
WindowLayer() int
// A rectangle the represents the frame of the window within a display.
Frame() corefoundation.CGRect
// A Boolean value that indicates whether the window is on screen.
OnScreen() bool
// A Boolean value that indicates if the window is currently streaming.
Active() bool
}
An interface definition for the SCWindow class.
Identifying windows ¶
- [ISCWindow.WindowID]: The Core Graphics window identifier.
- [ISCWindow.Title]: The string that displays in a window’s title bar.
- [ISCWindow.OwningApplication]: The app that owns the window.
- [ISCWindow.WindowLayer]: The layer of the window relative to other windows.
Accessing dimensions ¶
- [ISCWindow.Frame]: A rectangle the represents the frame of the window within a display.
Determining visibility ¶
- [ISCWindow.OnScreen]: A Boolean value that indicates whether the window is on screen.
- [ISCWindow.Active]: A Boolean value that indicates if the window is currently streaming.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow
type SCCaptureDynamicRange ¶
type SCCaptureDynamicRange int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCCaptureDynamicRange
const ( // SCCaptureDynamicRangeHDRCanonicalDisplay: Specifies that the system captures the screen in high dynamic range with attributes of the canonical display. SCCaptureDynamicRangeHDRCanonicalDisplay SCCaptureDynamicRange = 2 // SCCaptureDynamicRangeHDRLocalDisplay: Specifies that the system captures the screen in high dynamic range with attributes of the local display. SCCaptureDynamicRangeHDRLocalDisplay SCCaptureDynamicRange = 1 // SCCaptureDynamicRangeSDR: Specifies that the system captures the screen in standard dynamic range. SCCaptureDynamicRangeSDR SCCaptureDynamicRange = 0 )
func (SCCaptureDynamicRange) String ¶
func (e SCCaptureDynamicRange) String() string
type SCCaptureResolutionType ¶
type SCCaptureResolutionType int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCCaptureResolutionType
const ( // SCCaptureResolutionAutomatic: Allow ScreenCaptureKit to automatically select the quality of content depending on factors such as network connection. SCCaptureResolutionAutomatic SCCaptureResolutionType = 0 // SCCaptureResolutionBest: Capture streaming content at the best available resolution. SCCaptureResolutionBest SCCaptureResolutionType = 1 // SCCaptureResolutionNominal: Capture streaming content with a one point to one pixel conversion factor. SCCaptureResolutionNominal SCCaptureResolutionType = 2 )
func (SCCaptureResolutionType) String ¶
func (e SCCaptureResolutionType) String() string
type SCContentFilter ¶
type SCContentFilter struct {
objectivec.Object
}
An instance that filters the content a stream captures.
Overview ¶
Use a content filter to limit an SCStream object’s output to only that matching your filter criteria. Retrieve the displays, apps, and windows that your app can capture from an instance of SCShareableContent.
Creating a filter ¶
- SCContentFilter.InitWithDesktopIndependentWindow: Creates a filter that captures only the specified window.
- SCContentFilter.InitWithDisplayIncludingWindows: Creates a filter that captures only specific windows from a display.
- SCContentFilter.InitWithDisplayExcludingWindows: Creates a filter that captures the contents of a display, excluding the specified windows.
- SCContentFilter.InitWithDisplayIncludingApplicationsExceptingWindows: Creates a filter that captures a display, including only windows of the specified apps.
- SCContentFilter.InitWithDisplayExcludingApplicationsExceptingWindows: Creates a filter that captures a display, excluding windows of the specified apps.
Filter properties ¶
- SCContentFilter.ContentRect: The size and location of the content to filter, in screen points.
- SCContentFilter.PointPixelScale: The scaling factor used to translate screen points into pixels.
- SCContentFilter.StreamType: The type of the streaming content.
- SCContentFilter.Style: The display style of the sharable content.
Instance Properties ¶
- SCContentFilter.IncludeMenuBar
- SCContentFilter.SetIncludeMenuBar
- SCContentFilter.IncludedApplications
- SCContentFilter.IncludedDisplays
- SCContentFilter.IncludedWindows
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter
func NewContentFilterWithDesktopIndependentWindow ¶
func NewContentFilterWithDesktopIndependentWindow(window ISCWindow) SCContentFilter
Creates a filter that captures only the specified window.
window: A window to capture.
func NewContentFilterWithDisplayExcludingApplicationsExceptingWindows ¶
func NewContentFilterWithDisplayExcludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, exceptingWindows []SCWindow) SCContentFilter
Creates a filter that captures a display, excluding windows of the specified apps.
display: A display to capture.
applications: An array of apps to exclude from capture.
exceptingWindows: An array of windows that are exceptions to the previous rules.
Discussion ¶
The initializer arguments provide a three-stage filter that gives you fine-grained control over the output:
- Specify a display to capture. If you don’t specify additional filter criteria, the stream includes all content for a display. - Specify one or more apps with windows to exclude from the output. - Specify one or more windows that are exceptions to the previous rules. If the previous rules include a window, specifying it as an exception excludes it from the output. Likewise, if the previous rules exclude a window, specifying it as an exception includes it in the output.
func NewContentFilterWithDisplayExcludingWindows ¶
func NewContentFilterWithDisplayExcludingWindows(display ISCDisplay, excluded []SCWindow) SCContentFilter
Creates a filter that captures the contents of a display, excluding the specified windows.
display: A display to capture.
excluded: An array of windows to exclude from the output.
func NewContentFilterWithDisplayIncludingApplicationsExceptingWindows ¶
func NewContentFilterWithDisplayIncludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, exceptingWindows []SCWindow) SCContentFilter
Creates a filter that captures a display, including only windows of the specified apps.
display: A display to capture.
applications: An array of apps with windows to capture.
exceptingWindows: An array of windows that are exceptions to the previous rules.
Discussion ¶
The initializer arguments provide a three-stage filter that gives you fine-grained control over the output:
- Specify a display to capture. If you don’t specify additional filter criteria, the stream includes all content for a display. - Specify one or more apps to capture only the windows that they own. - Specify one or more windows that are exceptions to the previous rules. If the previous rules include a window, specifying it as an exception excludes it from the output. Likewise, if the previous rules exclude a window, specifying it as an exception includes it in the output.
func NewContentFilterWithDisplayIncludingWindows ¶
func NewContentFilterWithDisplayIncludingWindows(display ISCDisplay, includedWindows []SCWindow) SCContentFilter
Creates a filter that captures only specific windows from a display.
display: A display to capture.
includedWindows: An array of windows to include in the output.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/init(display:including:)
func NewSCContentFilter ¶
func NewSCContentFilter() SCContentFilter
NewSCContentFilter creates a new SCContentFilter instance.
func SCContentFilterFromID ¶
func SCContentFilterFromID(id objc.ID) SCContentFilter
SCContentFilterFromID constructs a SCContentFilter from an objc.ID.
An instance that filters the content a stream captures.
func (SCContentFilter) Autorelease ¶
func (c SCContentFilter) Autorelease() SCContentFilter
Autorelease adds the receiver to the current autorelease pool.
func (SCContentFilter) ContentRect ¶
func (c SCContentFilter) ContentRect() corefoundation.CGRect
The size and location of the content to filter, in screen points.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/contentRect
func (SCContentFilter) IncludeMenuBar ¶
func (c SCContentFilter) IncludeMenuBar() bool
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/includeMenuBar
func (SCContentFilter) IncludedApplications ¶
func (c SCContentFilter) IncludedApplications() []SCRunningApplication
Discussion ¶
Applications that are included in the content filter ¶
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/includedApplications
func (SCContentFilter) IncludedDisplays ¶
func (c SCContentFilter) IncludedDisplays() []SCDisplay
Discussion ¶
SCDisplays that are included in the content filter ¶
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/includedDisplays
func (SCContentFilter) IncludedWindows ¶
func (c SCContentFilter) IncludedWindows() []SCWindow
Discussion ¶
Windows that are included in the content filter ¶
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/includedWindows
func (SCContentFilter) Init ¶
func (c SCContentFilter) Init() SCContentFilter
Init initializes the instance.
func (SCContentFilter) InitWithDesktopIndependentWindow ¶
func (c SCContentFilter) InitWithDesktopIndependentWindow(window ISCWindow) SCContentFilter
Creates a filter that captures only the specified window.
window: A window to capture.
func (SCContentFilter) InitWithDisplayExcludingApplicationsExceptingWindows ¶
func (c SCContentFilter) InitWithDisplayExcludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, exceptingWindows []SCWindow) SCContentFilter
Creates a filter that captures a display, excluding windows of the specified apps.
display: A display to capture.
applications: An array of apps to exclude from capture.
exceptingWindows: An array of windows that are exceptions to the previous rules.
Discussion ¶
The initializer arguments provide a three-stage filter that gives you fine-grained control over the output:
- Specify a display to capture. If you don’t specify additional filter criteria, the stream includes all content for a display. - Specify one or more apps with windows to exclude from the output. - Specify one or more windows that are exceptions to the previous rules. If the previous rules include a window, specifying it as an exception excludes it from the output. Likewise, if the previous rules exclude a window, specifying it as an exception includes it in the output.
func (SCContentFilter) InitWithDisplayExcludingWindows ¶
func (c SCContentFilter) InitWithDisplayExcludingWindows(display ISCDisplay, excluded []SCWindow) SCContentFilter
Creates a filter that captures the contents of a display, excluding the specified windows.
display: A display to capture.
excluded: An array of windows to exclude from the output.
func (SCContentFilter) InitWithDisplayIncludingApplicationsExceptingWindows ¶
func (c SCContentFilter) InitWithDisplayIncludingApplicationsExceptingWindows(display ISCDisplay, applications []SCRunningApplication, exceptingWindows []SCWindow) SCContentFilter
Creates a filter that captures a display, including only windows of the specified apps.
display: A display to capture.
applications: An array of apps with windows to capture.
exceptingWindows: An array of windows that are exceptions to the previous rules.
Discussion ¶
The initializer arguments provide a three-stage filter that gives you fine-grained control over the output:
- Specify a display to capture. If you don’t specify additional filter criteria, the stream includes all content for a display. - Specify one or more apps to capture only the windows that they own. - Specify one or more windows that are exceptions to the previous rules. If the previous rules include a window, specifying it as an exception excludes it from the output. Likewise, if the previous rules exclude a window, specifying it as an exception includes it in the output.
func (SCContentFilter) InitWithDisplayIncludingWindows ¶
func (c SCContentFilter) InitWithDisplayIncludingWindows(display ISCDisplay, includedWindows []SCWindow) SCContentFilter
Creates a filter that captures only specific windows from a display.
display: A display to capture.
includedWindows: An array of windows to include in the output.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/init(display:including:)
func (SCContentFilter) PointPixelScale ¶
func (c SCContentFilter) PointPixelScale() float32
The scaling factor used to translate screen points into pixels.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/pointPixelScale
func (SCContentFilter) SetIncludeMenuBar ¶
func (c SCContentFilter) SetIncludeMenuBar(value bool)
func (SCContentFilter) StreamType ¶
func (c SCContentFilter) StreamType() SCStreamType
The type of the streaming content.
Discussion ¶
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/streamType
func (SCContentFilter) Style ¶
func (c SCContentFilter) Style() SCShareableContentStyle
The display style of the sharable content.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentFilter/style
type SCContentFilterClass ¶
type SCContentFilterClass struct {
// contains filtered or unexported fields
}
func GetSCContentFilterClass ¶
func GetSCContentFilterClass() SCContentFilterClass
GetSCContentFilterClass returns the class object for SCContentFilter.
func (SCContentFilterClass) Alloc ¶
func (sc SCContentFilterClass) Alloc() SCContentFilter
Alloc allocates memory for a new instance of the class.
type SCContentSharingPicker ¶
type SCContentSharingPicker struct {
objectivec.Object
}
An instance of a picker presented by the operating system for managing frame-capture streams.
Overview ¶
Picker availability ¶
- SCContentSharingPicker.Active: A Boolean value that indicates if the picker is active.
- SCContentSharingPicker.SetActive
Stream configuration ¶
- SCContentSharingPicker.Configuration: Sets the configuration for the content capture picker for all streams, providing allowed selection modes and content excluded from selection.
- SCContentSharingPicker.SetConfiguration
- SCContentSharingPicker.DefaultConfiguration: The default configuration to use for the content capture picker.
- SCContentSharingPicker.SetDefaultConfiguration
- SCContentSharingPicker.MaximumStreamCount: The maximum number of streams the content capture picker allows.
- SCContentSharingPicker.SetMaximumStreamCount
Manage observers ¶
- SCContentSharingPicker.AddObserver: Adds an observer instance to notify of changes in the content-sharing picker.
- SCContentSharingPicker.RemoveObserver: Removes an observer instance from the content-sharing picker.
Picker display ¶
- SCContentSharingPicker.Present: Displays the picker with no active selection for capture.
- SCContentSharingPicker.PresentPickerForStream: Displays the picker with an already running capture stream.
- SCContentSharingPicker.PresentPickerUsingContentStyle: Displays the picker for a single type of capture selection.
- SCContentSharingPicker.PresentPickerForStreamUsingContentStyle: Displays the picker with an existing capture stream, allowing for a single type of capture selection.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker
func NewSCContentSharingPicker ¶
func NewSCContentSharingPicker() SCContentSharingPicker
NewSCContentSharingPicker creates a new SCContentSharingPicker instance.
func SCContentSharingPickerFromID ¶
func SCContentSharingPickerFromID(id objc.ID) SCContentSharingPicker
SCContentSharingPickerFromID constructs a SCContentSharingPicker from an objc.ID.
An instance of a picker presented by the operating system for managing frame-capture streams.
func (SCContentSharingPicker) Active ¶
func (c SCContentSharingPicker) Active() bool
A Boolean value that indicates if the picker is active.
Discussion ¶
When this value is `true`, the capture stream picker is active, available for managing capture. The default value is `false`.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker/isActive
func (SCContentSharingPicker) AddObserver ¶
func (c SCContentSharingPicker) AddObserver(observer SCContentSharingPickerObserver)
Adds an observer instance to notify of changes in the content-sharing picker.
observer: The observer instance to send notifications to.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker/add(_:)
func (SCContentSharingPicker) Autorelease ¶
func (c SCContentSharingPicker) Autorelease() SCContentSharingPicker
Autorelease adds the receiver to the current autorelease pool.
func (SCContentSharingPicker) Configuration ¶
func (c SCContentSharingPicker) Configuration() ISCContentSharingPickerConfiguration
Sets the configuration for the content capture picker for all streams, providing allowed selection modes and content excluded from selection.
See: https://developer.apple.com/documentation/screencapturekit/sccontentsharingpicker/configuration
func (SCContentSharingPicker) DefaultConfiguration ¶
func (c SCContentSharingPicker) DefaultConfiguration() ISCContentSharingPickerConfiguration
The default configuration to use for the content capture picker.
func (SCContentSharingPicker) Init ¶
func (c SCContentSharingPicker) Init() SCContentSharingPicker
Init initializes the instance.
func (SCContentSharingPicker) MaximumStreamCount ¶
func (c SCContentSharingPicker) MaximumStreamCount() int
The maximum number of streams the content capture picker allows.
func (SCContentSharingPicker) Present ¶
func (c SCContentSharingPicker) Present()
Displays the picker with no active selection for capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker/present()
func (SCContentSharingPicker) PresentPickerForStream ¶
func (c SCContentSharingPicker) PresentPickerForStream(stream ISCStream)
Displays the picker with an already running capture stream.
stream: The capture stream to display in the picker.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker/present(for:)
func (SCContentSharingPicker) PresentPickerForStreamUsingContentStyle ¶
func (c SCContentSharingPicker) PresentPickerForStreamUsingContentStyle(stream ISCStream, contentStyle SCShareableContentStyle)
Displays the picker with an existing capture stream, allowing for a single type of capture selection.
stream: The stream to display in the picker.
contentStyle: The type of streaming content selection allowed through the presented picker.
func (SCContentSharingPicker) PresentPickerUsingContentStyle ¶
func (c SCContentSharingPicker) PresentPickerUsingContentStyle(contentStyle SCShareableContentStyle)
Displays the picker for a single type of capture selection.
contentStyle: The type of streaming content selection allowed through the presented picker.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker/present(using:)
func (SCContentSharingPicker) RemoveObserver ¶
func (c SCContentSharingPicker) RemoveObserver(observer SCContentSharingPickerObserver)
Removes an observer instance from the content-sharing picker.
observer: The observer instance to remove.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker/remove(_:)
func (SCContentSharingPicker) SetActive ¶
func (c SCContentSharingPicker) SetActive(value bool)
func (SCContentSharingPicker) SetConfiguration ¶
func (c SCContentSharingPicker) SetConfiguration(value ISCContentSharingPickerConfiguration)
func (SCContentSharingPicker) SetDefaultConfiguration ¶
func (c SCContentSharingPicker) SetDefaultConfiguration(value ISCContentSharingPickerConfiguration)
func (SCContentSharingPicker) SetMaximumStreamCount ¶
func (c SCContentSharingPicker) SetMaximumStreamCount(value int)
type SCContentSharingPickerClass ¶
type SCContentSharingPickerClass struct {
// contains filtered or unexported fields
}
func GetSCContentSharingPickerClass ¶
func GetSCContentSharingPickerClass() SCContentSharingPickerClass
GetSCContentSharingPickerClass returns the class object for SCContentSharingPicker.
func (SCContentSharingPickerClass) Alloc ¶
func (sc SCContentSharingPickerClass) Alloc() SCContentSharingPicker
Alloc allocates memory for a new instance of the class.
func (SCContentSharingPickerClass) SharedPicker ¶
func (_SCContentSharingPickerClass SCContentSharingPickerClass) SharedPicker() SCContentSharingPicker
The system-provided picker UI instance for capturing display and audio content from someone’s Mac.
Discussion ¶
The picker gives a person control over what information on their Mac they wish to let your app view or record such as specific applications, displays, and windows.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPicker/shared
type SCContentSharingPickerConfiguration ¶
type SCContentSharingPickerConfiguration struct {
objectivec.Object
}
An instance for configuring the system content-sharing picker.
Control streaming selections ¶
- SCContentSharingPickerConfiguration.AllowedPickerModes: The content-selection modes supported by the picker.
- SCContentSharingPickerConfiguration.SetAllowedPickerModes
- SCContentSharingPickerConfiguration.AllowsChangingSelectedContent: A Boolean value that indicates if the present stream can change to a different source.
- SCContentSharingPickerConfiguration.SetAllowsChangingSelectedContent
- SCContentSharingPickerConfiguration.ExcludedBundleIDs: A list of bundle IDs to exclude from the sharing picker.
- SCContentSharingPickerConfiguration.SetExcludedBundleIDs
- SCContentSharingPickerConfiguration.ExcludedWindowIDs: A list of window IDs to exclude from the sharing picker.
- SCContentSharingPickerConfiguration.SetExcludedWindowIDs
func NewSCContentSharingPickerConfiguration ¶
func NewSCContentSharingPickerConfiguration() SCContentSharingPickerConfiguration
NewSCContentSharingPickerConfiguration creates a new SCContentSharingPickerConfiguration instance.
func SCContentSharingPickerConfigurationFromID ¶
func SCContentSharingPickerConfigurationFromID(id objc.ID) SCContentSharingPickerConfiguration
SCContentSharingPickerConfigurationFromID constructs a SCContentSharingPickerConfiguration from an objc.ID.
An instance for configuring the system content-sharing picker.
func (SCContentSharingPickerConfiguration) AllowedPickerModes ¶
func (c SCContentSharingPickerConfiguration) AllowedPickerModes() SCContentSharingPickerMode
The content-selection modes supported by the picker.
Discussion ¶
The default value doesn’t exclude selecting any content for streaming. There isn’t an equivalent SCContentSharingPickerMode available to reset this property once changed.
func (SCContentSharingPickerConfiguration) AllowsChangingSelectedContent ¶
func (c SCContentSharingPickerConfiguration) AllowsChangingSelectedContent() bool
A Boolean value that indicates if the present stream can change to a different source.
Discussion ¶
The default value is `true`.
func (SCContentSharingPickerConfiguration) Autorelease ¶
func (c SCContentSharingPickerConfiguration) Autorelease() SCContentSharingPickerConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (SCContentSharingPickerConfiguration) ExcludedBundleIDs ¶
func (c SCContentSharingPickerConfiguration) ExcludedBundleIDs() []string
A list of bundle IDs to exclude from the sharing picker.
func (SCContentSharingPickerConfiguration) ExcludedWindowIDs ¶
func (c SCContentSharingPickerConfiguration) ExcludedWindowIDs() []foundation.NSNumber
A list of window IDs to exclude from the sharing picker.
Discussion ¶
func (SCContentSharingPickerConfiguration) SetAllowedPickerModes ¶
func (c SCContentSharingPickerConfiguration) SetAllowedPickerModes(value SCContentSharingPickerMode)
func (SCContentSharingPickerConfiguration) SetAllowsChangingSelectedContent ¶
func (c SCContentSharingPickerConfiguration) SetAllowsChangingSelectedContent(value bool)
func (SCContentSharingPickerConfiguration) SetExcludedBundleIDs ¶
func (c SCContentSharingPickerConfiguration) SetExcludedBundleIDs(value []string)
func (SCContentSharingPickerConfiguration) SetExcludedWindowIDs ¶
func (c SCContentSharingPickerConfiguration) SetExcludedWindowIDs(value []foundation.NSNumber)
type SCContentSharingPickerConfigurationClass ¶
type SCContentSharingPickerConfigurationClass struct {
// contains filtered or unexported fields
}
func GetSCContentSharingPickerConfigurationClass ¶
func GetSCContentSharingPickerConfigurationClass() SCContentSharingPickerConfigurationClass
GetSCContentSharingPickerConfigurationClass returns the class object for SCContentSharingPickerConfiguration.
func (SCContentSharingPickerConfigurationClass) Alloc ¶
func (sc SCContentSharingPickerConfigurationClass) Alloc() SCContentSharingPickerConfiguration
Alloc allocates memory for a new instance of the class.
type SCContentSharingPickerMode ¶
type SCContentSharingPickerMode int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPickerMode
const ( // SCContentSharingPickerModeMultipleApplications: The mode allowing the selection of multiple applications through the presented picker. SCContentSharingPickerModeMultipleApplications SCContentSharingPickerMode = 8 // SCContentSharingPickerModeMultipleWindows: The mode allowing the selection of multiple windows through the presented picker. SCContentSharingPickerModeMultipleWindows SCContentSharingPickerMode = 2 // SCContentSharingPickerModeSingleApplication: The mode allowing the selection of a single application through the presented picker. SCContentSharingPickerModeSingleApplication SCContentSharingPickerMode = 4 // SCContentSharingPickerModeSingleDisplay: The mode allowing the selection of a single display through the presented picker. SCContentSharingPickerModeSingleDisplay SCContentSharingPickerMode = 16 // SCContentSharingPickerModeSingleWindow: The mode allowing the selection of a single window through the presented picker. SCContentSharingPickerModeSingleWindow SCContentSharingPickerMode = 1 )
func (SCContentSharingPickerMode) String ¶
func (e SCContentSharingPickerMode) String() string
type SCContentSharingPickerObserver ¶
type SCContentSharingPickerObserver interface {
objectivec.IObject
// Tells the observer that a sharing picker canceled selection for a stream.
//
// See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPickerObserver/contentSharingPicker(_:didCancelFor:)
ContentSharingPickerDidCancelForStream(picker ISCContentSharingPicker, stream ISCStream)
// Tells the observer that a sharing picker updated the content filter for a stream.
//
// See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPickerObserver/contentSharingPicker(_:didUpdateWith:for:)
ContentSharingPickerDidUpdateWithFilterForStream(picker ISCContentSharingPicker, filter ISCContentFilter, stream ISCStream)
// Tells the observer that a sharing picker was unable to start.
//
// See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPickerObserver/contentSharingPickerStartDidFailWithError(_:)
ContentSharingPickerStartDidFailWithError(error_ foundation.INSError)
}
An observer protocol your app implements to receive messages from the operating system’s content picker.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCContentSharingPickerObserver
type SCContentSharingPickerObserverObject ¶
type SCContentSharingPickerObserverObject struct {
objectivec.Object
}
SCContentSharingPickerObserverObject wraps an existing Objective-C object that conforms to the SCContentSharingPickerObserver protocol.
func SCContentSharingPickerObserverObjectFromID ¶
func SCContentSharingPickerObserverObjectFromID(id objc.ID) SCContentSharingPickerObserverObject
SCContentSharingPickerObserverObjectFromID constructs a SCContentSharingPickerObserverObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (SCContentSharingPickerObserverObject) BaseObject ¶
func (o SCContentSharingPickerObserverObject) BaseObject() objectivec.Object
func (SCContentSharingPickerObserverObject) ContentSharingPickerDidCancelForStream ¶
func (o SCContentSharingPickerObserverObject) ContentSharingPickerDidCancelForStream(picker ISCContentSharingPicker, stream ISCStream)
func (SCContentSharingPickerObserverObject) ContentSharingPickerDidUpdateWithFilterForStream ¶
func (o SCContentSharingPickerObserverObject) ContentSharingPickerDidUpdateWithFilterForStream(picker ISCContentSharingPicker, filter ISCContentFilter, stream ISCStream)
func (SCContentSharingPickerObserverObject) ContentSharingPickerStartDidFailWithError ¶
func (o SCContentSharingPickerObserverObject) ContentSharingPickerStartDidFailWithError(error_ foundation.INSError)
type SCDisplay ¶
type SCDisplay struct {
objectivec.Object
}
An instance that represents a display device.
Overview ¶
A display object represents a physical display connected to a Mac. Query the display to retrieve its unique identifier and onscreen coordinates.
Retrieve the available displays from an instance of SCShareableContent. Select a display to capture and use it to create an instance of SCContentFilter. Apply the filter to an instance of SCStream to limit its output to content matching your criteria.
Identifying displays ¶
- SCDisplay.DisplayID: The Core Graphics display identifier.
Accessing dimensions ¶
- SCDisplay.Frame: The frame of the display.
- SCDisplay.Width: The width of the display in points.
- SCDisplay.Height: The height of the display in points.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCDisplay
func SCDisplayFromID ¶
SCDisplayFromID constructs a SCDisplay from an objc.ID.
An instance that represents a display device.
func (SCDisplay) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (SCDisplay) DisplayID ¶
The Core Graphics display identifier.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCDisplay/displayID
func (SCDisplay) Frame ¶
func (d SCDisplay) Frame() corefoundation.CGRect
The frame of the display.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCDisplay/frame
func (SCDisplay) Height ¶
The height of the display in points.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCDisplay/height
func (SCDisplay) Width ¶
The width of the display in points.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCDisplay/width
type SCDisplayClass ¶
type SCDisplayClass struct {
// contains filtered or unexported fields
}
func GetSCDisplayClass ¶
func GetSCDisplayClass() SCDisplayClass
GetSCDisplayClass returns the class object for SCDisplay.
func (SCDisplayClass) Alloc ¶
func (sc SCDisplayClass) Alloc() SCDisplay
Alloc allocates memory for a new instance of the class.
type SCFrameStatus ¶
type SCFrameStatus int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCFrameStatus
const ( // SCFrameStatusBlank: A status that indicates the system didn’t generate a new frame because the display is blank. SCFrameStatusBlank SCFrameStatus = 2 // SCFrameStatusComplete: A status that indicates the system successfully generated a new frame. SCFrameStatusComplete SCFrameStatus = 0 // SCFrameStatusIdle: A status that indicates the system didn’t generate a new frame because the display didn’t change. SCFrameStatusIdle SCFrameStatus = 1 // SCFrameStatusStarted: A status that indicates the frame is the first one sent after the stream starts. SCFrameStatusStarted SCFrameStatus = 4 // SCFrameStatusStopped: A status that indicates the frame is in a stopped state. SCFrameStatusStopped SCFrameStatus = 5 // SCFrameStatusSuspended: A status that indicates the system didn’t generate a new frame because you suspended updates. SCFrameStatusSuspended SCFrameStatus = 3 )
func (SCFrameStatus) String ¶
func (e SCFrameStatus) String() string
type SCPresenterOverlayAlertSetting ¶
type SCPresenterOverlayAlertSetting int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCPresenterOverlayAlertSetting
const ( // SCPresenterOverlayAlertSettingAlways: Always display an alert when using Presenter Overlay. SCPresenterOverlayAlertSettingAlways SCPresenterOverlayAlertSetting = 2 // SCPresenterOverlayAlertSettingNever: Never display an alert when using Presenter Overlay. SCPresenterOverlayAlertSettingNever SCPresenterOverlayAlertSetting = 1 // SCPresenterOverlayAlertSettingSystem: Displays an alert when using Presenter Overlay based on the System Settings. SCPresenterOverlayAlertSettingSystem SCPresenterOverlayAlertSetting = 0 )
func (SCPresenterOverlayAlertSetting) String ¶
func (e SCPresenterOverlayAlertSetting) String() string
type SCRecordingOutput ¶
type SCRecordingOutput struct {
objectivec.Object
}
Creating a recording output ¶
Configuring the recording output ¶
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRecordingOutput
func NewRecordingOutputWithConfigurationDelegate ¶
func NewRecordingOutputWithConfigurationDelegate(recordingOutputConfiguration ISCRecordingOutputConfiguration, delegate SCRecordingOutputDelegate) SCRecordingOutput
func NewSCRecordingOutput ¶
func NewSCRecordingOutput() SCRecordingOutput
NewSCRecordingOutput creates a new SCRecordingOutput instance.
func SCRecordingOutputFromID ¶
func SCRecordingOutputFromID(id objc.ID) SCRecordingOutput
SCRecordingOutputFromID constructs a SCRecordingOutput from an objc.ID.
func (SCRecordingOutput) Autorelease ¶
func (r SCRecordingOutput) Autorelease() SCRecordingOutput
Autorelease adds the receiver to the current autorelease pool.
func (SCRecordingOutput) Init ¶
func (r SCRecordingOutput) Init() SCRecordingOutput
Init initializes the instance.
func (SCRecordingOutput) InitWithConfigurationDelegate ¶
func (r SCRecordingOutput) InitWithConfigurationDelegate(recordingOutputConfiguration ISCRecordingOutputConfiguration, delegate SCRecordingOutputDelegate) SCRecordingOutput
func (SCRecordingOutput) RecordedDuration ¶
func (r SCRecordingOutput) RecordedDuration() objectivec.IObject
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRecordingOutput/recordedDuration
func (SCRecordingOutput) RecordedFileSize ¶
func (r SCRecordingOutput) RecordedFileSize() int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRecordingOutput/recordedFileSize
type SCRecordingOutputClass ¶
type SCRecordingOutputClass struct {
// contains filtered or unexported fields
}
func GetSCRecordingOutputClass ¶
func GetSCRecordingOutputClass() SCRecordingOutputClass
GetSCRecordingOutputClass returns the class object for SCRecordingOutput.
func (SCRecordingOutputClass) Alloc ¶
func (sc SCRecordingOutputClass) Alloc() SCRecordingOutput
Alloc allocates memory for a new instance of the class.
type SCRecordingOutputConfiguration ¶
type SCRecordingOutputConfiguration struct {
objectivec.Object
}
Instance Properties ¶
- SCRecordingOutputConfiguration.AvailableOutputFileTypes
- SCRecordingOutputConfiguration.AvailableVideoCodecTypes
- SCRecordingOutputConfiguration.OutputFileType
- SCRecordingOutputConfiguration.SetOutputFileType
- SCRecordingOutputConfiguration.OutputURL
- SCRecordingOutputConfiguration.SetOutputURL
- SCRecordingOutputConfiguration.VideoCodecType
- SCRecordingOutputConfiguration.SetVideoCodecType
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRecordingOutputConfiguration
func NewSCRecordingOutputConfiguration ¶
func NewSCRecordingOutputConfiguration() SCRecordingOutputConfiguration
NewSCRecordingOutputConfiguration creates a new SCRecordingOutputConfiguration instance.
func SCRecordingOutputConfigurationFromID ¶
func SCRecordingOutputConfigurationFromID(id objc.ID) SCRecordingOutputConfiguration
SCRecordingOutputConfigurationFromID constructs a SCRecordingOutputConfiguration from an objc.ID.
func (SCRecordingOutputConfiguration) Autorelease ¶
func (r SCRecordingOutputConfiguration) Autorelease() SCRecordingOutputConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (SCRecordingOutputConfiguration) AvailableOutputFileTypes ¶
func (r SCRecordingOutputConfiguration) AvailableOutputFileTypes() []string
func (SCRecordingOutputConfiguration) AvailableVideoCodecTypes ¶
func (r SCRecordingOutputConfiguration) AvailableVideoCodecTypes() []string
func (SCRecordingOutputConfiguration) Init ¶
func (r SCRecordingOutputConfiguration) Init() SCRecordingOutputConfiguration
Init initializes the instance.
func (SCRecordingOutputConfiguration) OutputFileType ¶
func (r SCRecordingOutputConfiguration) OutputFileType() foundation.NSString
func (SCRecordingOutputConfiguration) OutputURL ¶
func (r SCRecordingOutputConfiguration) OutputURL() foundation.INSURL
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRecordingOutputConfiguration/outputURL
func (SCRecordingOutputConfiguration) SetOutputFileType ¶
func (r SCRecordingOutputConfiguration) SetOutputFileType(value foundation.NSString)
func (SCRecordingOutputConfiguration) SetOutputURL ¶
func (r SCRecordingOutputConfiguration) SetOutputURL(value foundation.INSURL)
func (SCRecordingOutputConfiguration) SetVideoCodecType ¶
func (r SCRecordingOutputConfiguration) SetVideoCodecType(value foundation.NSString)
func (SCRecordingOutputConfiguration) VideoCodecType ¶
func (r SCRecordingOutputConfiguration) VideoCodecType() foundation.NSString
type SCRecordingOutputConfigurationClass ¶
type SCRecordingOutputConfigurationClass struct {
// contains filtered or unexported fields
}
func GetSCRecordingOutputConfigurationClass ¶
func GetSCRecordingOutputConfigurationClass() SCRecordingOutputConfigurationClass
GetSCRecordingOutputConfigurationClass returns the class object for SCRecordingOutputConfiguration.
func (SCRecordingOutputConfigurationClass) Alloc ¶
func (sc SCRecordingOutputConfigurationClass) Alloc() SCRecordingOutputConfiguration
Alloc allocates memory for a new instance of the class.
type SCRecordingOutputDelegate ¶
type SCRecordingOutputDelegate interface {
objectivec.IObject
}
SCRecordingOutputDelegate protocol.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRecordingOutputDelegate
type SCRecordingOutputDelegateConfig ¶
type SCRecordingOutputDelegateConfig struct {
// Instance Methods
RecordingOutputDidFailWithError func(recordingOutput SCRecordingOutput, error_ foundation.NSError)
RecordingOutputDidFinishRecording func(recordingOutput SCRecordingOutput)
RecordingOutputDidStartRecording func(recordingOutput SCRecordingOutput)
}
SCRecordingOutputDelegateConfig holds optional typed callbacks for SCRecordingOutputDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type SCRecordingOutputDelegateObject ¶
type SCRecordingOutputDelegateObject struct {
objectivec.Object
}
SCRecordingOutputDelegateObject wraps an existing Objective-C object that conforms to the SCRecordingOutputDelegate protocol.
func NewSCRecordingOutputDelegate ¶
func NewSCRecordingOutputDelegate(config SCRecordingOutputDelegateConfig) SCRecordingOutputDelegateObject
NewSCRecordingOutputDelegate creates an Objective-C object implementing the SCRecordingOutputDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned SCRecordingOutputDelegateObject satisfies the SCRecordingOutputDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func SCRecordingOutputDelegateObjectFromID ¶
func SCRecordingOutputDelegateObjectFromID(id objc.ID) SCRecordingOutputDelegateObject
SCRecordingOutputDelegateObjectFromID constructs a SCRecordingOutputDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (SCRecordingOutputDelegateObject) BaseObject ¶
func (o SCRecordingOutputDelegateObject) BaseObject() objectivec.Object
func (SCRecordingOutputDelegateObject) RecordingOutputDidFailWithError ¶
func (o SCRecordingOutputDelegateObject) RecordingOutputDidFailWithError(recordingOutput ISCRecordingOutput, error_ foundation.INSError)
func (SCRecordingOutputDelegateObject) RecordingOutputDidFinishRecording ¶
func (o SCRecordingOutputDelegateObject) RecordingOutputDidFinishRecording(recordingOutput ISCRecordingOutput)
func (SCRecordingOutputDelegateObject) RecordingOutputDidStartRecording ¶
func (o SCRecordingOutputDelegateObject) RecordingOutputDidStartRecording(recordingOutput ISCRecordingOutput)
type SCRunningApplication ¶
type SCRunningApplication struct {
objectivec.Object
}
An instance that represents an app running on a device.
Overview ¶
Retrieve the available apps from an instance of SCShareableContent. Select one or more apps to capture and use them to create an instance of SCContentFilter. Apply the filter to an instance of SCStream to limit its output to content matching your criteria.
Inspecting an app ¶
- SCRunningApplication.ProcessID: The system process identifier of the app.
- SCRunningApplication.BundleIdentifier: The unique bundle identifier of the app.
- SCRunningApplication.ApplicationName: The display name of the app.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRunningApplication
func NewSCRunningApplication ¶
func NewSCRunningApplication() SCRunningApplication
NewSCRunningApplication creates a new SCRunningApplication instance.
func SCRunningApplicationFromID ¶
func SCRunningApplicationFromID(id objc.ID) SCRunningApplication
SCRunningApplicationFromID constructs a SCRunningApplication from an objc.ID.
An instance that represents an app running on a device.
func (SCRunningApplication) ApplicationName ¶
func (r SCRunningApplication) ApplicationName() string
The display name of the app.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRunningApplication/applicationName
func (SCRunningApplication) Autorelease ¶
func (r SCRunningApplication) Autorelease() SCRunningApplication
Autorelease adds the receiver to the current autorelease pool.
func (SCRunningApplication) BundleIdentifier ¶
func (r SCRunningApplication) BundleIdentifier() string
The unique bundle identifier of the app.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRunningApplication/bundleIdentifier
func (SCRunningApplication) Init ¶
func (r SCRunningApplication) Init() SCRunningApplication
Init initializes the instance.
func (SCRunningApplication) ProcessID ¶
func (r SCRunningApplication) ProcessID() int32
The system process identifier of the app.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCRunningApplication/processID
type SCRunningApplicationClass ¶
type SCRunningApplicationClass struct {
// contains filtered or unexported fields
}
func GetSCRunningApplicationClass ¶
func GetSCRunningApplicationClass() SCRunningApplicationClass
GetSCRunningApplicationClass returns the class object for SCRunningApplication.
func (SCRunningApplicationClass) Alloc ¶
func (sc SCRunningApplicationClass) Alloc() SCRunningApplication
Alloc allocates memory for a new instance of the class.
type SCScreenshotConfiguration ¶
type SCScreenshotConfiguration struct {
objectivec.Object
}
An object that contains screenshot properties such as output width, height, and image quality specifications.
Overview ¶
SCScreenshotConfiguration provides a default image capture configuration for SCScreenshotManager. Only configure its properties if you need to customize the output. Additional options for customization include dynamic range settings, image reproduction optimizations, and ignoring user interface elements.
Instance Properties ¶
- SCScreenshotConfiguration.ContentType: A uniform type identifier that specifies the screenshot’s file format; HEIC, JPEG, or PNG.
- SCScreenshotConfiguration.SetContentType
- SCScreenshotConfiguration.DestinationRect: A rectangle that specifies whether to output screenshots in a subset of the output image.
- SCScreenshotConfiguration.SetDestinationRect
- SCScreenshotConfiguration.DisplayIntent: Specifies whether the screen capture uses attributes of the local or canonical display.
- SCScreenshotConfiguration.SetDisplayIntent
- SCScreenshotConfiguration.DynamicRange: Specifies the type of image returned to the client; standard dynamic range, high dynamic range, or both.
- SCScreenshotConfiguration.SetDynamicRange
- SCScreenshotConfiguration.FileURL: Specifies the URL where the screenshot process saves the output.
- SCScreenshotConfiguration.SetFileURL
- SCScreenshotConfiguration.Height: An integer value that specifies the output height, measured in pixels.
- SCScreenshotConfiguration.SetHeight
- SCScreenshotConfiguration.IgnoreClipping: A Boolean value that specifies whether to ignore framing on windows when using content filters.
- SCScreenshotConfiguration.SetIgnoreClipping
- SCScreenshotConfiguration.IgnoreShadows: A Boolean value that specifies whether to ignore framing on windows.
- SCScreenshotConfiguration.SetIgnoreShadows
- SCScreenshotConfiguration.IncludeChildWindows: A Boolean that specifies whether the screenshot captures subwindows of the included apps and windows.
- SCScreenshotConfiguration.SetIncludeChildWindows
- SCScreenshotConfiguration.ShowsCursor: A Boolean value that specifies whether the pointer appears in the screenshot.
- SCScreenshotConfiguration.SetShowsCursor
- SCScreenshotConfiguration.SourceRect: A rectangle that specifies that the screenshot only samples a subset of the frame input.
- SCScreenshotConfiguration.SetSourceRect
- SCScreenshotConfiguration.Width: An integer value that specifies the output width in pixels.
- SCScreenshotConfiguration.SetWidth
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration
func NewSCScreenshotConfiguration ¶
func NewSCScreenshotConfiguration() SCScreenshotConfiguration
NewSCScreenshotConfiguration creates a new SCScreenshotConfiguration instance.
func SCScreenshotConfigurationFromID ¶
func SCScreenshotConfigurationFromID(id objc.ID) SCScreenshotConfiguration
SCScreenshotConfigurationFromID constructs a SCScreenshotConfiguration from an objc.ID.
An object that contains screenshot properties such as output width, height, and image quality specifications.
func (SCScreenshotConfiguration) Autorelease ¶
func (s SCScreenshotConfiguration) Autorelease() SCScreenshotConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (SCScreenshotConfiguration) ContentType ¶
func (s SCScreenshotConfiguration) ContentType() uniformtypeidentifiers.UTType
A uniform type identifier that specifies the screenshot’s file format; HEIC, JPEG, or PNG.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/contentType
func (SCScreenshotConfiguration) DestinationRect ¶
func (s SCScreenshotConfiguration) DestinationRect() corefoundation.CGRect
A rectangle that specifies whether to output screenshots in a subset of the output image.
Discussion ¶
If you don’t specify a destination rectangle, the system uses the full dimensions of the output surface. The rectangle is specified in pixels in the display’s coordinate system.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/destinationRect
func (SCScreenshotConfiguration) DisplayIntent ¶
func (s SCScreenshotConfiguration) DisplayIntent() SCScreenshotDisplayIntent
Specifies whether the screen capture uses attributes of the local or canonical display.
Discussion ¶
Performing a screenshot with either the local or canonical display attributes optimizes output for presentation on either the capture display or any high dynamic range display respectively.
func (SCScreenshotConfiguration) DynamicRange ¶
func (s SCScreenshotConfiguration) DynamicRange() SCScreenshotDynamicRange
Specifies the type of image returned to the client; standard dynamic range, high dynamic range, or both.
func (SCScreenshotConfiguration) FileURL ¶
func (s SCScreenshotConfiguration) FileURL() foundation.INSURL
Specifies the URL where the screenshot process saves the output.
Discussion ¶
If `imageOutputURL` is `nil`, then the file isn’t saved.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/fileURL
func (SCScreenshotConfiguration) Height ¶
func (s SCScreenshotConfiguration) Height() int
An integer value that specifies the output height, measured in pixels.
Discussion ¶
The default value is the height of the captured content.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/height
func (SCScreenshotConfiguration) IgnoreClipping ¶
func (s SCScreenshotConfiguration) IgnoreClipping() bool
A Boolean value that specifies whether to ignore framing on windows when using content filters.
Discussion ¶
Use [SCNPropertyFilter] in conjunction with this property to ignore window framing on specified apps and windows. Setting this value to `true` ignores shadows.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/ignoreClipping
func (SCScreenshotConfiguration) IgnoreShadows ¶
func (s SCScreenshotConfiguration) IgnoreShadows() bool
A Boolean value that specifies whether to ignore framing on windows.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/ignoreShadows
func (SCScreenshotConfiguration) IncludeChildWindows ¶
func (s SCScreenshotConfiguration) IncludeChildWindows() bool
A Boolean that specifies whether the screenshot captures subwindows of the included apps and windows.
Discussion ¶
By default taking a screenshot captures subwindows. For example, alerts, popovers, and sheets are captured by default.
func (SCScreenshotConfiguration) Init ¶
func (s SCScreenshotConfiguration) Init() SCScreenshotConfiguration
Init initializes the instance.
func (SCScreenshotConfiguration) SetContentType ¶
func (s SCScreenshotConfiguration) SetContentType(value uniformtypeidentifiers.UTType)
func (SCScreenshotConfiguration) SetDestinationRect ¶
func (s SCScreenshotConfiguration) SetDestinationRect(value corefoundation.CGRect)
func (SCScreenshotConfiguration) SetDisplayIntent ¶
func (s SCScreenshotConfiguration) SetDisplayIntent(value SCScreenshotDisplayIntent)
func (SCScreenshotConfiguration) SetDynamicRange ¶
func (s SCScreenshotConfiguration) SetDynamicRange(value SCScreenshotDynamicRange)
func (SCScreenshotConfiguration) SetFileURL ¶
func (s SCScreenshotConfiguration) SetFileURL(value foundation.INSURL)
func (SCScreenshotConfiguration) SetHeight ¶
func (s SCScreenshotConfiguration) SetHeight(value int)
func (SCScreenshotConfiguration) SetIgnoreClipping ¶
func (s SCScreenshotConfiguration) SetIgnoreClipping(value bool)
func (SCScreenshotConfiguration) SetIgnoreShadows ¶
func (s SCScreenshotConfiguration) SetIgnoreShadows(value bool)
func (SCScreenshotConfiguration) SetIncludeChildWindows ¶
func (s SCScreenshotConfiguration) SetIncludeChildWindows(value bool)
func (SCScreenshotConfiguration) SetShowsCursor ¶
func (s SCScreenshotConfiguration) SetShowsCursor(value bool)
func (SCScreenshotConfiguration) SetSourceRect ¶
func (s SCScreenshotConfiguration) SetSourceRect(value corefoundation.CGRect)
func (SCScreenshotConfiguration) SetWidth ¶
func (s SCScreenshotConfiguration) SetWidth(value int)
func (SCScreenshotConfiguration) ShowsCursor ¶
func (s SCScreenshotConfiguration) ShowsCursor() bool
A Boolean value that specifies whether the pointer appears in the screenshot.
Discussion ¶
By default the pointer is visible in screenshots.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/showsCursor
func (SCScreenshotConfiguration) SourceRect ¶
func (s SCScreenshotConfiguration) SourceRect() corefoundation.CGRect
A rectangle that specifies that the screenshot only samples a subset of the frame input.
Discussion ¶
If not set, the screenshot captures the entire frame. Specify the rectangle in points in the display’s logical coordinate system.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/sourceRect
func (SCScreenshotConfiguration) Width ¶
func (s SCScreenshotConfiguration) Width() int
An integer value that specifies the output width in pixels.
Discussion ¶
The default value is the width of the captured content.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotConfiguration/width
type SCScreenshotConfigurationClass ¶
type SCScreenshotConfigurationClass struct {
// contains filtered or unexported fields
}
func GetSCScreenshotConfigurationClass ¶
func GetSCScreenshotConfigurationClass() SCScreenshotConfigurationClass
GetSCScreenshotConfigurationClass returns the class object for SCScreenshotConfiguration.
func (SCScreenshotConfigurationClass) Alloc ¶
func (sc SCScreenshotConfigurationClass) Alloc() SCScreenshotConfiguration
Alloc allocates memory for a new instance of the class.
func (SCScreenshotConfigurationClass) SupportedContentTypes ¶
func (_SCScreenshotConfigurationClass SCScreenshotConfigurationClass) SupportedContentTypes() []uniformtypeidentifiers.UTType
An array of uniform type identifiers that correspond to file formats the output image supports.
Discussion ¶
You can save the output CGImage into HEIC, JPEG, and PNG formats.
type SCScreenshotDisplayIntent ¶
type SCScreenshotDisplayIntent int
const ( // SCScreenshotDisplayIntentCanonical: Specifies that the screenshot renders with canonical display attributes optimizing output for presentation on a high dynamic range display. SCScreenshotDisplayIntentCanonical SCScreenshotDisplayIntent = 0 // SCScreenshotDisplayIntentLocal: Specifies that the screenshot renders with local display attributes optimizing output for presentation on the capture display. SCScreenshotDisplayIntentLocal SCScreenshotDisplayIntent = 1 )
func (SCScreenshotDisplayIntent) String ¶
func (e SCScreenshotDisplayIntent) String() string
type SCScreenshotDynamicRange ¶
type SCScreenshotDynamicRange int
const ( // SCScreenshotDynamicRangeHDR: Returns a high dynamic range image to the client. SCScreenshotDynamicRangeHDR SCScreenshotDynamicRange = 1 // SCScreenshotDynamicRangeSDR: Returns a standard dynamic range image to the client. SCScreenshotDynamicRangeSDR SCScreenshotDynamicRange = 0 // SCScreenshotDynamicRangeSDRAndHDR: Returns both standard dynamic range and high dynamic range image versions to the client. SCScreenshotDynamicRangeSDRAndHDR SCScreenshotDynamicRange = 2 )
func (SCScreenshotDynamicRange) String ¶
func (e SCScreenshotDynamicRange) String() string
type SCScreenshotManager ¶
type SCScreenshotManager struct {
objectivec.Object
}
An instance for the capture of single frames from a stream.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotManager
func NewSCScreenshotManager ¶
func NewSCScreenshotManager() SCScreenshotManager
NewSCScreenshotManager creates a new SCScreenshotManager instance.
func SCScreenshotManagerFromID ¶
func SCScreenshotManagerFromID(id objc.ID) SCScreenshotManager
SCScreenshotManagerFromID constructs a SCScreenshotManager from an objc.ID.
An instance for the capture of single frames from a stream.
func (SCScreenshotManager) Autorelease ¶
func (s SCScreenshotManager) Autorelease() SCScreenshotManager
Autorelease adds the receiver to the current autorelease pool.
func (SCScreenshotManager) Init ¶
func (s SCScreenshotManager) Init() SCScreenshotManager
Init initializes the instance.
type SCScreenshotManagerClass ¶
type SCScreenshotManagerClass struct {
// contains filtered or unexported fields
}
func GetSCScreenshotManagerClass ¶
func GetSCScreenshotManagerClass() SCScreenshotManagerClass
GetSCScreenshotManagerClass returns the class object for SCScreenshotManager.
func (SCScreenshotManagerClass) Alloc ¶
func (sc SCScreenshotManagerClass) Alloc() SCScreenshotManager
Alloc allocates memory for a new instance of the class.
func (SCScreenshotManagerClass) CaptureImageInRect ¶
func (sc SCScreenshotManagerClass) CaptureImageInRect(ctx context.Context, rect corefoundation.CGRect) (coregraphics.CGImageRef, error)
CaptureImageInRect is a synchronous wrapper around [SCScreenshotManager.CaptureImageInRectCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCScreenshotManagerClass) CaptureImageInRectCompletionHandler ¶
func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureImageInRectCompletionHandler(rect corefoundation.CGRect, completionHandler CGImageRefErrorHandler)
rect: The rect for the region in points on the screen space for the screen shot, this is display agnostic and supports multiple displays
completionHandler: Is the handler that will deliver the screenshot to the client
Discussion ¶
captureImageInRect:completionHandler:
this method returns an image containing the contents of the rectangle in points, specified in display space
func (SCScreenshotManagerClass) CaptureImageWithFilterConfiguration ¶
func (sc SCScreenshotManagerClass) CaptureImageWithFilterConfiguration(ctx context.Context, contentFilter ISCContentFilter, config ISCStreamConfiguration) (coregraphics.CGImageRef, error)
CaptureImageWithFilterConfiguration is a synchronous wrapper around [SCScreenshotManager.CaptureImageWithFilterConfigurationCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCScreenshotManagerClass) CaptureImageWithFilterConfigurationCompletionHandler ¶
func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureImageWithFilterConfigurationCompletionHandler(contentFilter ISCContentFilter, config ISCStreamConfiguration, completionHandler CGImageRefErrorHandler)
Captures a single frame from a stream as an image, using a filter.
contentFilter: The content filter used to select the stream.
config: Configuration information for how to capture the screenshot.
completionHandler: Closure that processes the screenshot taken from the streaming content.
func (SCScreenshotManagerClass) CaptureSampleBufferWithFilterConfiguration ¶
func (sc SCScreenshotManagerClass) CaptureSampleBufferWithFilterConfiguration(ctx context.Context, contentFilter ISCContentFilter, config ISCStreamConfiguration) (objectivec.IObject, error)
CaptureSampleBufferWithFilterConfiguration is a synchronous wrapper around [SCScreenshotManager.CaptureSampleBufferWithFilterConfigurationCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCScreenshotManagerClass) CaptureSampleBufferWithFilterConfigurationCompletionHandler ¶
func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureSampleBufferWithFilterConfigurationCompletionHandler(contentFilter ISCContentFilter, config ISCStreamConfiguration, completionHandler CMSampleBufferRefErrorHandler)
Captures a single frame directly from a stream’s buffer, using a filter.
contentFilter: The content filter used to select the stream.
config: Configuration information for how to record the stream buffer.
completionHandler: Closure that processes the capture taken from streaming content.
func (SCScreenshotManagerClass) CaptureScreenshotWithFilterConfiguration ¶
func (sc SCScreenshotManagerClass) CaptureScreenshotWithFilterConfiguration(ctx context.Context, contentFilter ISCContentFilter, config ISCScreenshotConfiguration) (*SCScreenshotOutput, error)
CaptureScreenshotWithFilterConfiguration is a synchronous wrapper around [SCScreenshotManager.CaptureScreenshotWithFilterConfigurationCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCScreenshotManagerClass) CaptureScreenshotWithFilterConfigurationCompletionHandler ¶
func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureScreenshotWithFilterConfigurationCompletionHandler(contentFilter ISCContentFilter, config ISCScreenshotConfiguration, completionHandler SCScreenshotOutputErrorHandler)
contentFilter: Is the filter containing the content to take a screenshot of
config: Is the screenshot configuration containing information on how to format the screenshot
completionHandler: Is the handler that will deliver the SCScreenshotOutput object to the client
Discussion ¶
captureScreenshotWithFilter:configuration:completionHandler:
this method returns an SCScreenshotOutput object containing CGImages of the screenshot requested by the client
func (SCScreenshotManagerClass) CaptureScreenshotWithRectConfiguration ¶
func (sc SCScreenshotManagerClass) CaptureScreenshotWithRectConfiguration(ctx context.Context, rect corefoundation.CGRect, config ISCScreenshotConfiguration) (*SCScreenshotOutput, error)
CaptureScreenshotWithRectConfiguration is a synchronous wrapper around [SCScreenshotManager.CaptureScreenshotWithRectConfigurationCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCScreenshotManagerClass) CaptureScreenshotWithRectConfigurationCompletionHandler ¶
func (_SCScreenshotManagerClass SCScreenshotManagerClass) CaptureScreenshotWithRectConfigurationCompletionHandler(rect corefoundation.CGRect, config ISCScreenshotConfiguration, completionHandler SCScreenshotOutputErrorHandler)
rect: The rect for the region in points on the screen space for the screen shot, this is display agnostic and supports multiple displays
config: Is the screenshot configuration containing information on how to format the screenshot
completionHandler: Is the handler that will deliver the SCScreenshotOutput object to the client
Discussion ¶
captureScreenshotWithRect:configuration:completionHandler:
this method returns an SCScreenshotOutput object containing CGImages of the screenshot requested by the client
type SCScreenshotOutput ¶
type SCScreenshotOutput struct {
objectivec.Object
}
An object that contains all images requested by the client.
Instance Properties ¶
- SCScreenshotOutput.FileURL: A URL property that specifies the location of the saved image.
- SCScreenshotOutput.SetFileURL
- SCScreenshotOutput.HdrImage: An output property that specifies the high dynamic range version of the screenshot.
- SCScreenshotOutput.SetHdrImage
- SCScreenshotOutput.SdrImage: An output property that specifies the standard dynamic range version of the screenshot.
- SCScreenshotOutput.SetSdrImage
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotOutput
func NewSCScreenshotOutput ¶
func NewSCScreenshotOutput() SCScreenshotOutput
NewSCScreenshotOutput creates a new SCScreenshotOutput instance.
func SCScreenshotOutputFromID ¶
func SCScreenshotOutputFromID(id objc.ID) SCScreenshotOutput
SCScreenshotOutputFromID constructs a SCScreenshotOutput from an objc.ID.
An object that contains all images requested by the client.
func (SCScreenshotOutput) Autorelease ¶
func (s SCScreenshotOutput) Autorelease() SCScreenshotOutput
Autorelease adds the receiver to the current autorelease pool.
func (SCScreenshotOutput) FileURL ¶
func (s SCScreenshotOutput) FileURL() foundation.INSURL
A URL property that specifies the location of the saved image.
Discussion ¶
If `fileURL` is `nil`, then the file isn’t saved.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotOutput/fileURL
func (SCScreenshotOutput) HdrImage ¶
func (s SCScreenshotOutput) HdrImage() coregraphics.CGImageRef
An output property that specifies the high dynamic range version of the screenshot.
Discussion ¶
The output CGImage uses the extended sRGB color space.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotOutput/hdrImage
func (SCScreenshotOutput) Init ¶
func (s SCScreenshotOutput) Init() SCScreenshotOutput
Init initializes the instance.
func (SCScreenshotOutput) SdrImage ¶
func (s SCScreenshotOutput) SdrImage() coregraphics.CGImageRef
An output property that specifies the standard dynamic range version of the screenshot.
Discussion ¶
The output CGImage uses the same color space as the content capture display.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCScreenshotOutput/sdrImage
func (SCScreenshotOutput) SetFileURL ¶
func (s SCScreenshotOutput) SetFileURL(value foundation.INSURL)
func (SCScreenshotOutput) SetHdrImage ¶
func (s SCScreenshotOutput) SetHdrImage(value coregraphics.CGImageRef)
func (SCScreenshotOutput) SetSdrImage ¶
func (s SCScreenshotOutput) SetSdrImage(value coregraphics.CGImageRef)
type SCScreenshotOutputClass ¶
type SCScreenshotOutputClass struct {
// contains filtered or unexported fields
}
func GetSCScreenshotOutputClass ¶
func GetSCScreenshotOutputClass() SCScreenshotOutputClass
GetSCScreenshotOutputClass returns the class object for SCScreenshotOutput.
func (SCScreenshotOutputClass) Alloc ¶
func (sc SCScreenshotOutputClass) Alloc() SCScreenshotOutput
Alloc allocates memory for a new instance of the class.
type SCScreenshotOutputErrorHandler ¶
type SCScreenshotOutputErrorHandler = func(*SCScreenshotOutput, error)
SCScreenshotOutputErrorHandler handles Is the handler that will deliver the SCScreenshotOutput object to the client The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.
Used by:
- [SCScreenshotManager.CaptureScreenshotWithFilterConfigurationCompletionHandler]
- [SCScreenshotManager.CaptureScreenshotWithRectConfigurationCompletionHandler]
type SCShareableContent ¶
type SCShareableContent struct {
}
An instance that represents a set of displays, apps, and windows that your app can capture.
Overview ¶
Use the SCShareableContent.Displays, SCShareableContent.Windows, and SCShareableContent.Applications properties to create a SCContentFilter object that specifies what display content to capture. You apply the filter to an instance of SCStream to limit its output to only the content matching your filter.
Inspecting shareable content ¶
- SCShareableContent.Windows: The windows available for capture.
- SCShareableContent.Displays: The displays available for capture.
- SCShareableContent.Applications: The apps available for capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContent
func NewSCShareableContent ¶
func NewSCShareableContent() SCShareableContent
NewSCShareableContent creates a new SCShareableContent instance.
func SCShareableContentFromID ¶
func SCShareableContentFromID(id objc.ID) SCShareableContent
SCShareableContentFromID constructs a SCShareableContent from an objc.ID.
An instance that represents a set of displays, apps, and windows that your app can capture.
func (SCShareableContent) Applications ¶
func (s SCShareableContent) Applications() []SCRunningApplication
The apps available for capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContent/applications
func (SCShareableContent) Autorelease ¶
func (s SCShareableContent) Autorelease() SCShareableContent
Autorelease adds the receiver to the current autorelease pool.
func (SCShareableContent) Displays ¶
func (s SCShareableContent) Displays() []SCDisplay
The displays available for capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContent/displays
func (SCShareableContent) Init ¶
func (s SCShareableContent) Init() SCShareableContent
Init initializes the instance.
func (SCShareableContent) Windows ¶
func (s SCShareableContent) Windows() []SCWindow
The windows available for capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContent/windows
type SCShareableContentClass ¶
type SCShareableContentClass struct {
// contains filtered or unexported fields
}
func GetSCShareableContentClass ¶
func GetSCShareableContentClass() SCShareableContentClass
GetSCShareableContentClass returns the class object for SCShareableContent.
func (SCShareableContentClass) Alloc ¶
func (sc SCShareableContentClass) Alloc() SCShareableContent
Alloc allocates memory for a new instance of the class.
func (SCShareableContentClass) GetCurrentProcessShareableContent ¶
func (sc SCShareableContentClass) GetCurrentProcessShareableContent(ctx context.Context) (*SCShareableContent, error)
GetCurrentProcessShareableContent is a synchronous wrapper around [SCShareableContent.GetCurrentProcessShareableContentWithCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCShareableContentClass) GetCurrentProcessShareableContentWithCompletionHandler ¶
func (_SCShareableContentClass SCShareableContentClass) GetCurrentProcessShareableContentWithCompletionHandler(completionHandler SCShareableContentErrorHandler)
func (SCShareableContentClass) GetShareableContent ¶
func (sc SCShareableContentClass) GetShareableContent(ctx context.Context) (*SCShareableContent, error)
GetShareableContent is a synchronous wrapper around [SCShareableContent.GetShareableContentWithCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnly ¶
func (sc SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnly(ctx context.Context, excludeDesktopWindows bool, onScreenWindowsOnly bool) (*SCShareableContent, error)
GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnly is a synchronous wrapper around [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindow ¶
func (sc SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindow(ctx context.Context, excludeDesktopWindows bool, window ISCWindow) (*SCShareableContent, error)
GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindow is a synchronous wrapper around [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindowCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindowCompletionHandler ¶
func (_SCShareableContentClass SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindowCompletionHandler(excludeDesktopWindows bool, window ISCWindow, completionHandler SCShareableContentErrorHandler)
Retrieves the displays, apps, and windows that are in front of the specified window.
excludeDesktopWindows: A Boolean value that indicates whether to exclude desktop windows like Finder, Dock, and Desktop from the set of shareable content.
window: The window above which to retrieve shareable content.
completionHandler: A callback the system invokes with the shareable content, or an error if a failure occurs.
Discussion ¶
Use this method to retrieve the onscreen content matching your filtering criteria. If the call is successful, the system passes an SCShareableContent instance to the completion handler; otherwise, it returns an error that describes the failure.
func (SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindow ¶
func (sc SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindow(ctx context.Context, excludeDesktopWindows bool, window ISCWindow) (*SCShareableContent, error)
GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindow is a synchronous wrapper around [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindowCompletionHandler]. It blocks until the completion handler fires or the context is cancelled.
func (SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindowCompletionHandler ¶
func (_SCShareableContentClass SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindowCompletionHandler(excludeDesktopWindows bool, window ISCWindow, completionHandler SCShareableContentErrorHandler)
Retrieves the displays, apps, and windows that are behind the specified window.
excludeDesktopWindows: A Boolean value that indicates whether to exclude desktop windows from the set of shareable content.
window: The window above which to retrieve shareable content.
completionHandler: A callback the system invokes with the shareable content, or an error if a failure occurs.
Discussion ¶
Use this method to retrieve the onscreen content matching your filtering criteria. If the call is successful, the system passes an SCShareableContent instance to the completion handler; otherwise, it returns an error that describes the failure.
func (SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyCompletionHandler ¶
func (_SCShareableContentClass SCShareableContentClass) GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyCompletionHandler(excludeDesktopWindows bool, onScreenWindowsOnly bool, completionHandler SCShareableContentErrorHandler)
Retrieves the displays, apps, and windows that match your criteria.
excludeDesktopWindows: A Boolean value that indicates whether to exclude desktop windows like Finder, Dock, and Desktop from the set of shareable content.
onScreenWindowsOnly: A Boolean value that indicates whether to include only onscreen windows in the set of shareable content.
completionHandler: A callback the system invokes with the shareable content, or an error if a failure occurs.
Discussion ¶
Use this method to retrieve the onscreen content matching your filtering criteria. If the call is successful, the system passes an SCShareableContent instance to the completion handler; otherwise, it returns an error that describes the failure.
func (SCShareableContentClass) GetShareableContentWithCompletionHandler ¶
func (_SCShareableContentClass SCShareableContentClass) GetShareableContentWithCompletionHandler(completionHandler SCShareableContentErrorHandler)
Retrieves the displays, apps, and windows that your app can capture.
completionHandler: A callback the system invokes with the shareable content, or an error if a failure occurs.
Discussion ¶
Use this method to retrieve the onscreen content that your app can capture. If the call is successful, the system returns the shareable content to the completion handler; otherwise, it returns an error that describes the failure.
func (SCShareableContentClass) InfoForFilter ¶
func (_SCShareableContentClass SCShareableContentClass) InfoForFilter(filter ISCContentFilter) SCShareableContentInfo
Retrieves any available sharable content information that matches the provided filter.
filter: The filter to match current sharable content against.
Return Value ¶
The sharable content matching the filter, or `nil` if none is found.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContent/info(for:)
type SCShareableContentErrorHandler ¶
type SCShareableContentErrorHandler = func(*SCShareableContent, error)
SCShareableContentErrorHandler handles A callback the system invokes with the shareable content, or an error if a failure occurs. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.
Used by:
- [SCShareableContent.GetCurrentProcessShareableContentWithCompletionHandler]
- [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindowCompletionHandler]
- [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindowCompletionHandler]
- [SCShareableContent.GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyCompletionHandler]
- [SCShareableContent.GetShareableContentWithCompletionHandler]
type SCShareableContentInfo ¶
type SCShareableContentInfo struct {
}
An instance that provides information for the content in a given stream.
Shared content properties ¶
- SCShareableContentInfo.ContentRect: The size and location of content for the stream.
- SCShareableContentInfo.PointPixelScale: The scaling from points to output pixel resolution for the stream.
- SCShareableContentInfo.Style: The current presentation style of the stream.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContentInfo
func NewSCShareableContentInfo ¶
func NewSCShareableContentInfo() SCShareableContentInfo
NewSCShareableContentInfo creates a new SCShareableContentInfo instance.
func SCShareableContentInfoFromID ¶
func SCShareableContentInfoFromID(id objc.ID) SCShareableContentInfo
SCShareableContentInfoFromID constructs a SCShareableContentInfo from an objc.ID.
An instance that provides information for the content in a given stream.
func (SCShareableContentInfo) Autorelease ¶
func (s SCShareableContentInfo) Autorelease() SCShareableContentInfo
Autorelease adds the receiver to the current autorelease pool.
func (SCShareableContentInfo) ContentRect ¶
func (s SCShareableContentInfo) ContentRect() corefoundation.CGRect
The size and location of content for the stream.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContentInfo/contentRect
func (SCShareableContentInfo) Init ¶
func (s SCShareableContentInfo) Init() SCShareableContentInfo
Init initializes the instance.
func (SCShareableContentInfo) PointPixelScale ¶
func (s SCShareableContentInfo) PointPixelScale() float32
The scaling from points to output pixel resolution for the stream.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContentInfo/pointPixelScale
func (SCShareableContentInfo) Style ¶
func (s SCShareableContentInfo) Style() SCShareableContentStyle
The current presentation style of the stream.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContentInfo/style
type SCShareableContentInfoClass ¶
type SCShareableContentInfoClass struct {
// contains filtered or unexported fields
}
func GetSCShareableContentInfoClass ¶
func GetSCShareableContentInfoClass() SCShareableContentInfoClass
GetSCShareableContentInfoClass returns the class object for SCShareableContentInfo.
func (SCShareableContentInfoClass) Alloc ¶
func (sc SCShareableContentInfoClass) Alloc() SCShareableContentInfo
Alloc allocates memory for a new instance of the class.
type SCShareableContentStyle ¶
type SCShareableContentStyle int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCShareableContentStyle
const ( SCShareableContentStyleApplication SCShareableContentStyle = 3 SCShareableContentStyleDisplay SCShareableContentStyle = 2 SCShareableContentStyleNone SCShareableContentStyle = 0 SCShareableContentStyleWindow SCShareableContentStyle = 1 )
func (SCShareableContentStyle) String ¶
func (e SCShareableContentStyle) String() string
type SCStream ¶
type SCStream struct {
objectivec.Object
}
An instance that represents a stream of shareable content.
Overview ¶
Use a stream to capture video of screen content like apps and windows. Create a content stream by passing it an instance of SCContentFilter and an SCStreamConfiguration object. The stream uses the filter to determine which screen content to capture, and uses the configuration data to configure the output.
Creating a stream ¶
- SCStream.InitWithFilterConfigurationDelegate: Creates a stream with a content filter and configuration.
Updating stream configuration ¶
- SCStream.UpdateConfigurationCompletionHandler: Updates the stream with a new configuration.
- SCStream.UpdateContentFilterCompletionHandler: Updates the stream by applying a new content filter.
Adding and removing stream output ¶
- SCStream.AddStreamOutputTypeSampleHandlerQueueError: Adds a destination that receives the stream output.
- SCStream.RemoveStreamOutputTypeError: Removes a destination from receiving stream output.
Adding and removing recording output ¶
Starting and stopping a stream ¶
- SCStream.StartCaptureWithCompletionHandler: Starts the stream with a callback to indicate whether it successfully starts.
- SCStream.StopCaptureWithCompletionHandler: Stops the stream.
Stream synchronization ¶
- SCStream.SynchronizationClock: A clock to use for output synchronization.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStream
func NewStreamWithFilterConfigurationDelegate ¶
func NewStreamWithFilterConfigurationDelegate(contentFilter ISCContentFilter, streamConfig ISCStreamConfiguration, delegate SCStreamDelegate) SCStream
Creates a stream with a content filter and configuration.
contentFilter: The content to capture.
streamConfig: The configuration to apply to the stream.
delegate: An optional object that responds to stream events.
func SCStreamFromID ¶
SCStreamFromID constructs a SCStream from an objc.ID.
An instance that represents a stream of shareable content.
func (SCStream) AddRecordingOutputError ¶
func (s SCStream) AddRecordingOutputError(recordingOutput ISCRecordingOutput) (bool, error)
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStream/addRecordingOutput(_:)
func (SCStream) AddStreamOutputTypeSampleHandlerQueueError ¶
func (s SCStream) AddStreamOutputTypeSampleHandlerQueueError(output SCStreamOutput, type_ SCStreamOutputType, sampleHandlerQueue dispatch.Queue) (bool, error)
Adds a destination that receives the stream output.
output: The object that conforms to the stream output protocol.
type: The stream output type.
sampleHandlerQueue: The queue that receives the stream output.
Discussion ¶
Use this method to attach an object that conforms to SCStreamOutput to receive stream content. Optionally, provide a DispatchQueue to send output to a queue that’s responsible for processing the output.
func (SCStream) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (SCStream) InitWithFilterConfigurationDelegate ¶
func (s SCStream) InitWithFilterConfigurationDelegate(contentFilter ISCContentFilter, streamConfig ISCStreamConfiguration, delegate SCStreamDelegate) SCStream
Creates a stream with a content filter and configuration.
contentFilter: The content to capture.
streamConfig: The configuration to apply to the stream.
delegate: An optional object that responds to stream events.
func (SCStream) RemoveRecordingOutputError ¶
func (s SCStream) RemoveRecordingOutputError(recordingOutput ISCRecordingOutput) (bool, error)
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStream/removeRecordingOutput(_:)
func (SCStream) RemoveStreamOutputTypeError ¶
func (s SCStream) RemoveStreamOutputTypeError(output SCStreamOutput, type_ SCStreamOutputType) (bool, error)
Removes a destination from receiving stream output.
output: The object to remove that conforms to the stream output protocol.
type: The stream output type.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStream/removeStreamOutput(_:type:)
func (SCStream) StartCapture ¶
StartCapture is a synchronous wrapper around SCStream.StartCaptureWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (SCStream) StartCaptureWithCompletionHandler ¶
func (s SCStream) StartCaptureWithCompletionHandler(completionHandler ErrorHandler)
Starts the stream with a callback to indicate whether it successfully starts.
completionHandler: A completion handler that provides an error if the stream fails to start.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStream/startCapture(completionHandler:)
func (SCStream) StopCapture ¶
StopCapture is a synchronous wrapper around SCStream.StopCaptureWithCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (SCStream) StopCaptureWithCompletionHandler ¶
func (s SCStream) StopCaptureWithCompletionHandler(completionHandler ErrorHandler)
Stops the stream.
completionHandler: A completion handler that provides an error if the stream fails to stop.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStream/stopCapture(completionHandler:)
func (SCStream) SynchronizationClock ¶
func (s SCStream) SynchronizationClock() objectivec.IObject
A clock to use for output synchronization.
Discussion ¶
The synchronization clock provides the timebase for sample buffers that the stream outputs. Use it to synchronize with the clocks of other media sources, such as the synchronizationClock of AVCaptureSession.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStream/synchronizationClock
func (SCStream) UpdateConfiguration ¶
func (s SCStream) UpdateConfiguration(ctx context.Context, streamConfig ISCStreamConfiguration) error
UpdateConfiguration is a synchronous wrapper around SCStream.UpdateConfigurationCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (SCStream) UpdateConfigurationCompletionHandler ¶
func (s SCStream) UpdateConfigurationCompletionHandler(streamConfig ISCStreamConfiguration, completionHandler ErrorHandler)
Updates the stream with a new configuration.
streamConfig: An object that provides the updated stream configuration.
completionHandler: A completion handler the system calls when this method completes. It includes an error if the update fails.
func (SCStream) UpdateContentFilter ¶
func (s SCStream) UpdateContentFilter(ctx context.Context, contentFilter ISCContentFilter) error
UpdateContentFilter is a synchronous wrapper around SCStream.UpdateContentFilterCompletionHandler. It blocks until the completion handler fires or the context is cancelled.
func (SCStream) UpdateContentFilterCompletionHandler ¶
func (s SCStream) UpdateContentFilterCompletionHandler(contentFilter ISCContentFilter, completionHandler ErrorHandler)
Updates the stream by applying a new content filter.
contentFilter: The content filter to apply.
completionHandler: A completion handler the system calls when this method completes. It includes an error if the update fails.
type SCStreamClass ¶
type SCStreamClass struct {
// contains filtered or unexported fields
}
func GetSCStreamClass ¶
func GetSCStreamClass() SCStreamClass
GetSCStreamClass returns the class object for SCStream.
func (SCStreamClass) Alloc ¶
func (sc SCStreamClass) Alloc() SCStream
Alloc allocates memory for a new instance of the class.
type SCStreamConfiguration ¶
type SCStreamConfiguration struct {
objectivec.Object
}
An instance that provides the output configuration for a stream.
Overview ¶
Creating an instance of this class provides a default configuration for a stream. Only configure its properties if you need to customize the output.
Specifying dimensions ¶
- SCStreamConfiguration.Width: The width of the output.
- SCStreamConfiguration.SetWidth
- SCStreamConfiguration.Height: The height of the output.
- SCStreamConfiguration.SetHeight
- SCStreamConfiguration.ScalesToFit: A Boolean value that indicates whether to scale the output to fit the configured width and height.
- SCStreamConfiguration.SetScalesToFit
- SCStreamConfiguration.SourceRect: A rectangle that specifies the source area to capture.
- SCStreamConfiguration.SetSourceRect
- SCStreamConfiguration.DestinationRect: A rectangle that specifies a destination into which to write the output.
- SCStreamConfiguration.SetDestinationRect
- SCStreamConfiguration.PreservesAspectRatio: A Boolean value that determines if the stream preserves aspect ratio.
- SCStreamConfiguration.SetPreservesAspectRatio
Configuring colors ¶
- SCStreamConfiguration.PixelFormat: A pixel format for sample buffers that a stream outputs.
- SCStreamConfiguration.SetPixelFormat
- SCStreamConfiguration.ColorMatrix: A color matrix to apply to the output surface.
- SCStreamConfiguration.SetColorMatrix
- SCStreamConfiguration.ColorSpaceName: A color space to use for the output buffer.
- SCStreamConfiguration.SetColorSpaceName
- SCStreamConfiguration.BackgroundColor: A background color for the output.
- SCStreamConfiguration.SetBackgroundColor
Configuring captured elements ¶
- SCStreamConfiguration.ShowsCursor: A Boolean value that determines whether the cursor is visible in the stream.
- SCStreamConfiguration.SetShowsCursor
- SCStreamConfiguration.ShouldBeOpaque: A Boolean value that indicates if semitransparent content presents as opaque.
- SCStreamConfiguration.SetShouldBeOpaque
- SCStreamConfiguration.CapturesShadowsOnly: A Boolean value that indicates if the stream only captures shadows.
- SCStreamConfiguration.SetCapturesShadowsOnly
- SCStreamConfiguration.IgnoreShadowsDisplay: A Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in display style.
- SCStreamConfiguration.SetIgnoreShadowsDisplay
- SCStreamConfiguration.IgnoreShadowsSingleWindow: A Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in window style.
- SCStreamConfiguration.SetIgnoreShadowsSingleWindow
- SCStreamConfiguration.IgnoreGlobalClipDisplay: A Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in display style.
- SCStreamConfiguration.SetIgnoreGlobalClipDisplay
- SCStreamConfiguration.IgnoreGlobalClipSingleWindow: A Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in window style.
- SCStreamConfiguration.SetIgnoreGlobalClipSingleWindow
Configuring captured frames ¶
- SCStreamConfiguration.QueueDepth: The maximum number of frames for the queue to store.
- SCStreamConfiguration.SetQueueDepth
- SCStreamConfiguration.MinimumFrameInterval: The desired minimum time between frame updates, in seconds.
- SCStreamConfiguration.SetMinimumFrameInterval
- SCStreamConfiguration.CaptureResolution: The resolution at which to capture source content.
- SCStreamConfiguration.SetCaptureResolution
Configuring audio ¶
- SCStreamConfiguration.CapturesAudio: A Boolean value that indicates whether to capture audio.
- SCStreamConfiguration.SetCapturesAudio
- SCStreamConfiguration.SampleRate: The sample rate for audio capture.
- SCStreamConfiguration.SetSampleRate
- SCStreamConfiguration.ChannelCount: The number of audio channels to capture.
- SCStreamConfiguration.SetChannelCount
- SCStreamConfiguration.ExcludesCurrentProcessAudio: A Boolean value that indicates whether to exclude audio from your app during capture.
- SCStreamConfiguration.SetExcludesCurrentProcessAudio
Identifying a stream ¶
- SCStreamConfiguration.StreamName: A name that you provide for identifying the stream.
- SCStreamConfiguration.SetStreamName
Notifying presenters ¶
- SCStreamConfiguration.PresenterOverlayPrivacyAlertSetting: A value indicating if alerts appear to presenters while using Presenter Overlay.
- SCStreamConfiguration.SetPresenterOverlayPrivacyAlertSetting
Instance Properties ¶
- SCStreamConfiguration.CaptureDynamicRange
- SCStreamConfiguration.SetCaptureDynamicRange
- SCStreamConfiguration.CaptureMicrophone
- SCStreamConfiguration.SetCaptureMicrophone
- SCStreamConfiguration.IncludeChildWindows
- SCStreamConfiguration.SetIncludeChildWindows
- SCStreamConfiguration.MicrophoneCaptureDeviceID
- SCStreamConfiguration.SetMicrophoneCaptureDeviceID
- SCStreamConfiguration.ShowMouseClicks
- SCStreamConfiguration.SetShowMouseClicks
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration
func NewSCStreamConfiguration ¶
func NewSCStreamConfiguration() SCStreamConfiguration
NewSCStreamConfiguration creates a new SCStreamConfiguration instance.
func NewStreamConfigurationWithPreset ¶
func NewStreamConfigurationWithPreset(preset SCStreamConfigurationPreset) SCStreamConfiguration
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/init(preset:)
func SCStreamConfigurationFromID ¶
func SCStreamConfigurationFromID(id objc.ID) SCStreamConfiguration
SCStreamConfigurationFromID constructs a SCStreamConfiguration from an objc.ID.
An instance that provides the output configuration for a stream.
func (SCStreamConfiguration) Autorelease ¶
func (s SCStreamConfiguration) Autorelease() SCStreamConfiguration
Autorelease adds the receiver to the current autorelease pool.
func (SCStreamConfiguration) BackgroundColor ¶
func (s SCStreamConfiguration) BackgroundColor() coregraphics.CGColorRef
A background color for the output.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/backgroundColor
func (SCStreamConfiguration) CaptureDynamicRange ¶
func (s SCStreamConfiguration) CaptureDynamicRange() SCCaptureDynamicRange
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/captureDynamicRange
func (SCStreamConfiguration) CaptureMicrophone ¶
func (s SCStreamConfiguration) CaptureMicrophone() bool
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/captureMicrophone
func (SCStreamConfiguration) CaptureResolution ¶
func (s SCStreamConfiguration) CaptureResolution() SCCaptureResolutionType
The resolution at which to capture source content.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/captureResolution
func (SCStreamConfiguration) CapturesAudio ¶
func (s SCStreamConfiguration) CapturesAudio() bool
A Boolean value that indicates whether to capture audio.
Discussion ¶
A stream doesn’t capture audio by default. Set this value to true if you require audio capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/capturesAudio
func (SCStreamConfiguration) CapturesShadowsOnly ¶
func (s SCStreamConfiguration) CapturesShadowsOnly() bool
A Boolean value that indicates if the stream only captures shadows.
Discussion ¶
The default value is `false`.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/capturesShadowsOnly
func (SCStreamConfiguration) ChannelCount ¶
func (s SCStreamConfiguration) ChannelCount() int
The number of audio channels to capture.
Discussion ¶
The framework supports channel counts of `1` (mono) or `2` (stereo). If you don’t specify a channel count, or specify an unsupported value, the system defaults to stereo audio capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/channelCount
func (SCStreamConfiguration) ColorMatrix ¶
func (s SCStreamConfiguration) ColorMatrix() corefoundation.CFStringRef
A color matrix to apply to the output surface.
Discussion ¶
You can specify a value for this property if your pixel format is `420v` or `420f`. The value must be one of the strings specified in Display Stream YCbCr to RGB conversion Matrix Options.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/colorMatrix
func (SCStreamConfiguration) ColorSpaceName ¶
func (s SCStreamConfiguration) ColorSpaceName() corefoundation.CFStringRef
A color space to use for the output buffer.
Discussion ¶
If you don’t specify a value, the output buffer uses the same color space as the display. If you specify a value, if must be one of the strings specified in CGColorSpace.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/colorSpaceName
func (SCStreamConfiguration) DestinationRect ¶
func (s SCStreamConfiguration) DestinationRect() corefoundation.CGRect
A rectangle that specifies a destination into which to write the output.
Discussion ¶
If you don’t specify a destination rectangle, the system uses the full dimensions of the output surface.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/destinationRect
func (SCStreamConfiguration) ExcludesCurrentProcessAudio ¶
func (s SCStreamConfiguration) ExcludesCurrentProcessAudio() bool
A Boolean value that indicates whether to exclude audio from your app during capture.
Discussion ¶
The default value is false. If you include your app process in the stream output, you can set this value to true to exclude its audio.
func (SCStreamConfiguration) Height ¶
func (s SCStreamConfiguration) Height() uintptr
The height of the output.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/height
func (SCStreamConfiguration) IgnoreGlobalClipDisplay ¶
func (s SCStreamConfiguration) IgnoreGlobalClipDisplay() bool
A Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in display style.
Discussion ¶
The display that originates the stream determines clipping bounds. When this value is `true`, the stream contains content moved past the clipping bounds. The default value is `false`.
func (SCStreamConfiguration) IgnoreGlobalClipSingleWindow ¶
func (s SCStreamConfiguration) IgnoreGlobalClipSingleWindow() bool
A Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in window style.
Discussion ¶
The display that originates the stream determines clipping bounds. When this value is `true`, the stream contains content moved past the clipping bounds. The default value is `false`.
func (SCStreamConfiguration) IgnoreShadowsDisplay ¶
func (s SCStreamConfiguration) IgnoreShadowsDisplay() bool
A Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in display style.
func (SCStreamConfiguration) IgnoreShadowsSingleWindow ¶
func (s SCStreamConfiguration) IgnoreShadowsSingleWindow() bool
A Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in window style.
func (SCStreamConfiguration) IncludeChildWindows ¶
func (s SCStreamConfiguration) IncludeChildWindows() bool
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/includeChildWindows
func (SCStreamConfiguration) Init ¶
func (s SCStreamConfiguration) Init() SCStreamConfiguration
Init initializes the instance.
func (SCStreamConfiguration) MicrophoneCaptureDeviceID ¶
func (s SCStreamConfiguration) MicrophoneCaptureDeviceID() string
func (SCStreamConfiguration) MinimumFrameInterval ¶
func (s SCStreamConfiguration) MinimumFrameInterval() objectivec.IObject
The desired minimum time between frame updates, in seconds.
Discussion ¶
Use this value to throttle the rate at which you receive updates. The default value is `0`, which indicates that the system uses the maximum supported frame rate.
You specify the minimum frame interval as the reciprocal of the maximum frame rate. For example, to configure the stream to capture at 60 fps, specify a minimum frame interval equal to `1/60`.
func (SCStreamConfiguration) PixelFormat ¶
func (s SCStreamConfiguration) PixelFormat() uint32
A pixel format for sample buffers that a stream outputs.
Discussion ¶
A stream supports the following pixel formats:
[BGRA]: Packed little endian ARGB8888. `l10r`: Packed little endian ARGB2101010. `420v`: Two-plane “video” range YCbCr 4:2:0. `420f`: Two-plane “full” range YCbCr 4:2:0.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/pixelFormat
func (SCStreamConfiguration) PresenterOverlayPrivacyAlertSetting ¶
func (s SCStreamConfiguration) PresenterOverlayPrivacyAlertSetting() SCPresenterOverlayAlertSetting
A value indicating if alerts appear to presenters while using Presenter Overlay.
Discussion ¶
The default value is SCPresenterOverlayAlertSetting.system.
func (SCStreamConfiguration) PreservesAspectRatio ¶
func (s SCStreamConfiguration) PreservesAspectRatio() bool
A Boolean value that determines if the stream preserves aspect ratio.
Discussion ¶
The default value is `true`.
func (SCStreamConfiguration) QueueDepth ¶
func (s SCStreamConfiguration) QueueDepth() int
The maximum number of frames for the queue to store.
Discussion ¶
By default, the system sets the queue depth to its minimum value of three frames. Specifying more frames uses more memory, but may allow you to process frame data without stalling the display stream.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/queueDepth
func (SCStreamConfiguration) SampleRate ¶
func (s SCStreamConfiguration) SampleRate() int
The sample rate for audio capture.
Discussion ¶
The framework supports sample rates of `8000`, `16000`, `24000`, and `48000`. If you don’t specify a sample rate, or specify an unsupported value, the system uses a default sample rate of 48 kHz.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/sampleRate
func (SCStreamConfiguration) ScalesToFit ¶
func (s SCStreamConfiguration) ScalesToFit() bool
A Boolean value that indicates whether to scale the output to fit the configured width and height.
Discussion ¶
The system uses this value during independent window capture.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/scalesToFit
func (SCStreamConfiguration) SetBackgroundColor ¶
func (s SCStreamConfiguration) SetBackgroundColor(value coregraphics.CGColorRef)
func (SCStreamConfiguration) SetCaptureDynamicRange ¶
func (s SCStreamConfiguration) SetCaptureDynamicRange(value SCCaptureDynamicRange)
func (SCStreamConfiguration) SetCaptureMicrophone ¶
func (s SCStreamConfiguration) SetCaptureMicrophone(value bool)
func (SCStreamConfiguration) SetCaptureResolution ¶
func (s SCStreamConfiguration) SetCaptureResolution(value SCCaptureResolutionType)
func (SCStreamConfiguration) SetCapturesAudio ¶
func (s SCStreamConfiguration) SetCapturesAudio(value bool)
func (SCStreamConfiguration) SetCapturesShadowsOnly ¶
func (s SCStreamConfiguration) SetCapturesShadowsOnly(value bool)
func (SCStreamConfiguration) SetChannelCount ¶
func (s SCStreamConfiguration) SetChannelCount(value int)
func (SCStreamConfiguration) SetColorMatrix ¶
func (s SCStreamConfiguration) SetColorMatrix(value corefoundation.CFStringRef)
func (SCStreamConfiguration) SetColorSpaceName ¶
func (s SCStreamConfiguration) SetColorSpaceName(value corefoundation.CFStringRef)
func (SCStreamConfiguration) SetDestinationRect ¶
func (s SCStreamConfiguration) SetDestinationRect(value corefoundation.CGRect)
func (SCStreamConfiguration) SetExcludesCurrentProcessAudio ¶
func (s SCStreamConfiguration) SetExcludesCurrentProcessAudio(value bool)
func (SCStreamConfiguration) SetHeight ¶
func (s SCStreamConfiguration) SetHeight(value uintptr)
func (SCStreamConfiguration) SetIgnoreGlobalClipDisplay ¶
func (s SCStreamConfiguration) SetIgnoreGlobalClipDisplay(value bool)
func (SCStreamConfiguration) SetIgnoreGlobalClipSingleWindow ¶
func (s SCStreamConfiguration) SetIgnoreGlobalClipSingleWindow(value bool)
func (SCStreamConfiguration) SetIgnoreShadowsDisplay ¶
func (s SCStreamConfiguration) SetIgnoreShadowsDisplay(value bool)
func (SCStreamConfiguration) SetIgnoreShadowsSingleWindow ¶
func (s SCStreamConfiguration) SetIgnoreShadowsSingleWindow(value bool)
func (SCStreamConfiguration) SetIncludeChildWindows ¶
func (s SCStreamConfiguration) SetIncludeChildWindows(value bool)
func (SCStreamConfiguration) SetMicrophoneCaptureDeviceID ¶
func (s SCStreamConfiguration) SetMicrophoneCaptureDeviceID(value string)
func (SCStreamConfiguration) SetMinimumFrameInterval ¶
func (s SCStreamConfiguration) SetMinimumFrameInterval(value objectivec.IObject)
func (SCStreamConfiguration) SetPixelFormat ¶
func (s SCStreamConfiguration) SetPixelFormat(value uint32)
func (SCStreamConfiguration) SetPresenterOverlayPrivacyAlertSetting ¶
func (s SCStreamConfiguration) SetPresenterOverlayPrivacyAlertSetting(value SCPresenterOverlayAlertSetting)
func (SCStreamConfiguration) SetPreservesAspectRatio ¶
func (s SCStreamConfiguration) SetPreservesAspectRatio(value bool)
func (SCStreamConfiguration) SetQueueDepth ¶
func (s SCStreamConfiguration) SetQueueDepth(value int)
func (SCStreamConfiguration) SetSampleRate ¶
func (s SCStreamConfiguration) SetSampleRate(value int)
func (SCStreamConfiguration) SetScalesToFit ¶
func (s SCStreamConfiguration) SetScalesToFit(value bool)
func (SCStreamConfiguration) SetShouldBeOpaque ¶
func (s SCStreamConfiguration) SetShouldBeOpaque(value bool)
func (SCStreamConfiguration) SetShowMouseClicks ¶
func (s SCStreamConfiguration) SetShowMouseClicks(value bool)
func (SCStreamConfiguration) SetShowsCursor ¶
func (s SCStreamConfiguration) SetShowsCursor(value bool)
func (SCStreamConfiguration) SetSourceRect ¶
func (s SCStreamConfiguration) SetSourceRect(value corefoundation.CGRect)
func (SCStreamConfiguration) SetStreamName ¶
func (s SCStreamConfiguration) SetStreamName(value string)
func (SCStreamConfiguration) SetWidth ¶
func (s SCStreamConfiguration) SetWidth(value uintptr)
func (SCStreamConfiguration) ShouldBeOpaque ¶
func (s SCStreamConfiguration) ShouldBeOpaque() bool
A Boolean value that indicates if semitransparent content presents as opaque.
Discussion ¶
When this property is `true`, semitransparent content in the stream presents as backed by a solid white background, making the resulting image fully opaque. The default value is `false`.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/shouldBeOpaque
func (SCStreamConfiguration) ShowMouseClicks ¶
func (s SCStreamConfiguration) ShowMouseClicks() bool
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/showMouseClicks
func (SCStreamConfiguration) ShowsCursor ¶
func (s SCStreamConfiguration) ShowsCursor() bool
A Boolean value that determines whether the cursor is visible in the stream.
Discussion ¶
The cursor is visible by default.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/showsCursor
func (SCStreamConfiguration) SourceRect ¶
func (s SCStreamConfiguration) SourceRect() corefoundation.CGRect
A rectangle that specifies the source area to capture.
Discussion ¶
If you don’t specify a source rectangle to capture, the system captures the entire display.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/sourceRect
func (SCStreamConfiguration) StreamName ¶
func (s SCStreamConfiguration) StreamName() string
A name that you provide for identifying the stream.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/streamName
func (SCStreamConfiguration) Width ¶
func (s SCStreamConfiguration) Width() uintptr
The width of the output.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/width
type SCStreamConfigurationClass ¶
type SCStreamConfigurationClass struct {
// contains filtered or unexported fields
}
func GetSCStreamConfigurationClass ¶
func GetSCStreamConfigurationClass() SCStreamConfigurationClass
GetSCStreamConfigurationClass returns the class object for SCStreamConfiguration.
func (SCStreamConfigurationClass) Alloc ¶
func (sc SCStreamConfigurationClass) Alloc() SCStreamConfiguration
Alloc allocates memory for a new instance of the class.
type SCStreamConfigurationPreset ¶
type SCStreamConfigurationPreset int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamConfiguration/Preset
const ( SCStreamConfigurationPresetCaptureHDRRecordingPreservedSDRHDR10 SCStreamConfigurationPreset = 4 SCStreamConfigurationPresetCaptureHDRScreenshotCanonicalDisplay SCStreamConfigurationPreset = 3 SCStreamConfigurationPresetCaptureHDRScreenshotLocalDisplay SCStreamConfigurationPreset = 2 SCStreamConfigurationPresetCaptureHDRStreamCanonicalDisplay SCStreamConfigurationPreset = 1 SCStreamConfigurationPresetCaptureHDRStreamLocalDisplay SCStreamConfigurationPreset = 0 )
func (SCStreamConfigurationPreset) String ¶
func (e SCStreamConfigurationPreset) String() string
type SCStreamDelegate ¶
type SCStreamDelegate interface {
objectivec.IObject
}
A delegate protocol your app implements to respond to stream events.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamDelegate
type SCStreamDelegateConfig ¶
type SCStreamDelegateConfig struct {
// Responding to stream stoppage
// StreamDidStopWithError — Tells the delegate that the stream stopped with an error.
StreamDidStopWithError func(stream SCStream, error_ foundation.NSError)
// Instance Methods
StreamDidBecomeActive func(stream SCStream)
StreamDidBecomeInactive func(stream SCStream)
// Other Methods
// OutputVideoEffectDidStartForStream — Tells the delegate that Presenter Overlay started.
OutputVideoEffectDidStartForStream func(stream SCStream)
// OutputVideoEffectDidStopForStream — Tells the delegate that Presenter Overlay stopped.
OutputVideoEffectDidStopForStream func(stream SCStream)
}
SCStreamDelegateConfig holds optional typed callbacks for SCStreamDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.
See Apple Documentation for protocol details.
type SCStreamDelegateObject ¶
type SCStreamDelegateObject struct {
objectivec.Object
}
SCStreamDelegateObject wraps an existing Objective-C object that conforms to the SCStreamDelegate protocol.
func NewSCStreamDelegate ¶
func NewSCStreamDelegate(config SCStreamDelegateConfig) SCStreamDelegateObject
NewSCStreamDelegate creates an Objective-C object implementing the SCStreamDelegate protocol.
Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.
The returned SCStreamDelegateObject satisfies the SCStreamDelegate interface and can be passed directly to SetDelegate and similar methods.
See Apple Documentation for protocol details.
func SCStreamDelegateObjectFromID ¶
func SCStreamDelegateObjectFromID(id objc.ID) SCStreamDelegateObject
SCStreamDelegateObjectFromID constructs a SCStreamDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (SCStreamDelegateObject) BaseObject ¶
func (o SCStreamDelegateObject) BaseObject() objectivec.Object
func (SCStreamDelegateObject) OutputVideoEffectDidStartForStream ¶
func (o SCStreamDelegateObject) OutputVideoEffectDidStartForStream(stream ISCStream)
func (SCStreamDelegateObject) OutputVideoEffectDidStopForStream ¶
func (o SCStreamDelegateObject) OutputVideoEffectDidStopForStream(stream ISCStream)
func (SCStreamDelegateObject) StreamDidBecomeActive ¶
func (o SCStreamDelegateObject) StreamDidBecomeActive(stream ISCStream)
func (SCStreamDelegateObject) StreamDidBecomeInactive ¶
func (o SCStreamDelegateObject) StreamDidBecomeInactive(stream ISCStream)
func (SCStreamDelegateObject) StreamDidStopWithError ¶
func (o SCStreamDelegateObject) StreamDidStopWithError(stream ISCStream, error_ foundation.INSError)
type SCStreamErrorCode ¶
type SCStreamErrorCode int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamError/Code
const ( // SCStreamErrorAttemptToConfigState: An error message that indicates a stream couldn’t update its configuration. SCStreamErrorAttemptToConfigState SCStreamErrorCode = -3810 // SCStreamErrorAttemptToStartStreamState: An error message that indicates a stream is already running or doesn’t exist when trying to start a stream. SCStreamErrorAttemptToStartStreamState SCStreamErrorCode = -3807 // SCStreamErrorAttemptToStopStreamState: An error message that indicates a stream is already stopped or doesn’t exist when trying to stop a stream. SCStreamErrorAttemptToStopStreamState SCStreamErrorCode = -3808 // SCStreamErrorAttemptToUpdateFilterState: An error message that indicates a stream couldn’t update its content filter. SCStreamErrorAttemptToUpdateFilterState SCStreamErrorCode = -3809 // SCStreamErrorFailedApplicationConnectionInterrupted: An error message that indicates there was an interruption in a connection to an app. SCStreamErrorFailedApplicationConnectionInterrupted SCStreamErrorCode = -3805 // SCStreamErrorFailedApplicationConnectionInvalid: An error message that indicates the stream lost its connection to an app. SCStreamErrorFailedApplicationConnectionInvalid SCStreamErrorCode = -3804 // SCStreamErrorFailedNoMatchingApplicationContext: An error message that indicates there isn’t a matching app context for streaming. SCStreamErrorFailedNoMatchingApplicationContext SCStreamErrorCode = -3806 // SCStreamErrorFailedToStart: An error message that indicates a stream failed to start. SCStreamErrorFailedToStart SCStreamErrorCode = -3802 // SCStreamErrorFailedToStartAudioCapture: An error message that indicates an audio stream failed to start. SCStreamErrorFailedToStartAudioCapture SCStreamErrorCode = -3818 // SCStreamErrorFailedToStartMicrophoneCapture: An error message that indicates microphone capture failed to start. SCStreamErrorFailedToStartMicrophoneCapture SCStreamErrorCode = -3820 // SCStreamErrorFailedToStopAudioCapture: An error message that indicates an audio stream failed to stop. SCStreamErrorFailedToStopAudioCapture SCStreamErrorCode = -3819 // SCStreamErrorInternalError: An error message that indicates a stream can’t start due to a failure in ScreenCaptureKit’s internals. SCStreamErrorInternalError SCStreamErrorCode = -3811 // SCStreamErrorInvalidParameter: An error message that indicates an operation failed because of an invalid parameter value. SCStreamErrorInvalidParameter SCStreamErrorCode = -3812 // SCStreamErrorMissingEntitlements: An error message that indicates missing entitlements in your app. SCStreamErrorMissingEntitlements SCStreamErrorCode = -3803 // SCStreamErrorNoCaptureSource: An error message that indicates a stream doesn’t have a source to capture. SCStreamErrorNoCaptureSource SCStreamErrorCode = -3815 // SCStreamErrorNoDisplayList: An error message that indicates a stream doesn’t have displays available. SCStreamErrorNoDisplayList SCStreamErrorCode = -3814 // SCStreamErrorNoWindowList: An error message that indicates a stream doesn’t have windows available. SCStreamErrorNoWindowList SCStreamErrorCode = -3813 // SCStreamErrorRemovingStream: An error message that indicates a stream wasn’t removed. SCStreamErrorRemovingStream SCStreamErrorCode = -3816 // SCStreamErrorSystemStoppedStream: An error message that indicates the system stopped the stream. SCStreamErrorSystemStoppedStream SCStreamErrorCode = -3821 // SCStreamErrorUserDeclined: An error message that indicates the user didn’t grant Screen Recording permission to your app. SCStreamErrorUserDeclined SCStreamErrorCode = -3801 // SCStreamErrorUserStopped: An error message that indicates the user stopped the stream. SCStreamErrorUserStopped SCStreamErrorCode = -3817 )
func (SCStreamErrorCode) String ¶
func (e SCStreamErrorCode) String() string
type SCStreamFrameInfo ¶
type SCStreamFrameInfo = string
type SCStreamFrameInfoValues ¶
type SCStreamFrameInfoValues struct{}
var SCStreamFrameInfos SCStreamFrameInfoValues
SCStreamFrameInfos provides typed accessors for SCStreamFrameInfo constants.
func (SCStreamFrameInfoValues) BoundingRect ¶
func (SCStreamFrameInfoValues) BoundingRect() SCStreamFrameInfo
BoundingRect returns A key to retrieve the bounding rectangle for a video frame.
func (SCStreamFrameInfoValues) ContentRect ¶
func (SCStreamFrameInfoValues) ContentRect() SCStreamFrameInfo
ContentRect returns A key to retrieve the content rectangle of a video frame.
func (SCStreamFrameInfoValues) ContentScale ¶
func (SCStreamFrameInfoValues) ContentScale() SCStreamFrameInfo
ContentScale returns A key to retrieve the content scale of a video frame.
func (SCStreamFrameInfoValues) DirtyRects ¶
func (SCStreamFrameInfoValues) DirtyRects() SCStreamFrameInfo
DirtyRects returns A key to retrieve the areas of a video frame that contain changes.
func (SCStreamFrameInfoValues) DisplayTime ¶
func (SCStreamFrameInfoValues) DisplayTime() SCStreamFrameInfo
DisplayTime returns A key to retrieve the display time of a video frame.
func (SCStreamFrameInfoValues) PresenterOverlayContentRect ¶
func (SCStreamFrameInfoValues) PresenterOverlayContentRect() SCStreamFrameInfo
func (SCStreamFrameInfoValues) ScaleFactor ¶
func (SCStreamFrameInfoValues) ScaleFactor() SCStreamFrameInfo
ScaleFactor returns A key to retrieve the scale factor of a video frame.
func (SCStreamFrameInfoValues) ScreenRect ¶
func (SCStreamFrameInfoValues) ScreenRect() SCStreamFrameInfo
ScreenRect returns A key to retrieve the onscreen location of captured content.
func (SCStreamFrameInfoValues) Status ¶
func (SCStreamFrameInfoValues) Status() SCStreamFrameInfo
Status returns A key to retrieve the status of a video frame.
type SCStreamOutput ¶
type SCStreamOutput interface {
objectivec.IObject
}
A delegate protocol your app implements to receive capture stream output events.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamOutput
type SCStreamOutputObject ¶
type SCStreamOutputObject struct {
objectivec.Object
}
SCStreamOutputObject wraps an existing Objective-C object that conforms to the SCStreamOutput protocol.
func SCStreamOutputObjectFromID ¶
func SCStreamOutputObjectFromID(id objc.ID) SCStreamOutputObject
SCStreamOutputObjectFromID constructs a SCStreamOutputObject from an objc.ID. The object is determined to conform to the protocol at runtime.
func (SCStreamOutputObject) BaseObject ¶
func (o SCStreamOutputObject) BaseObject() objectivec.Object
func (SCStreamOutputObject) StreamDidOutputSampleBufferOfType ¶
func (o SCStreamOutputObject) StreamDidOutputSampleBufferOfType(stream ISCStream, sampleBuffer objectivec.IObject, type_ SCStreamOutputType)
type SCStreamOutputType ¶
type SCStreamOutputType int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamOutputType
const ( // SCStreamOutputTypeAudio: An output type that represents an audio capture sample buffer. SCStreamOutputTypeAudio SCStreamOutputType = 1 // SCStreamOutputTypeScreen: An output type that represents a screen capture sample buffer. SCStreamOutputTypeScreen SCStreamOutputType = 0 )
func (SCStreamOutputType) String ¶
func (e SCStreamOutputType) String() string
type SCStreamType ¶
type SCStreamType int
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCStreamType
const ( // SCStreamTypeDisplay: The stream is currently on a complete display. SCStreamTypeDisplay SCStreamType = 1 // SCStreamTypeWindow: The stream is currently presented as a window. SCStreamTypeWindow SCStreamType = 0 )
func (SCStreamType) String ¶
func (e SCStreamType) String() string
type SCWindow ¶
type SCWindow struct {
objectivec.Object
}
An instance that represents an onscreen window.
Overview ¶
Retrieve the available windows from an instance of SCShareableContent. Select one or more windows to capture and use them to create an instance of SCContentFilter. Apply the filter to an instance of SCStream to limit its output to content matching your criteria.
Identifying windows ¶
- SCWindow.WindowID: The Core Graphics window identifier.
- SCWindow.Title: The string that displays in a window’s title bar.
- SCWindow.OwningApplication: The app that owns the window.
- SCWindow.WindowLayer: The layer of the window relative to other windows.
Accessing dimensions ¶
- SCWindow.Frame: A rectangle the represents the frame of the window within a display.
Determining visibility ¶
- SCWindow.OnScreen: A Boolean value that indicates whether the window is on screen.
- SCWindow.Active: A Boolean value that indicates if the window is currently streaming.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow
func SCWindowFromID ¶
SCWindowFromID constructs a SCWindow from an objc.ID.
An instance that represents an onscreen window.
func (SCWindow) Active ¶
A Boolean value that indicates if the window is currently streaming.
Discussion ¶
When this value is `true`, the window is currently streaming, even if offscreen.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow/isActive
func (SCWindow) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (SCWindow) Frame ¶
func (w SCWindow) Frame() corefoundation.CGRect
A rectangle the represents the frame of the window within a display.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow/frame
func (SCWindow) OnScreen ¶
A Boolean value that indicates whether the window is on screen.
Discussion ¶
This value represents the macOS window server’s onscreen status of the window.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow/isOnScreen
func (SCWindow) OwningApplication ¶
func (w SCWindow) OwningApplication() ISCRunningApplication
The app that owns the window.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow/owningApplication
func (SCWindow) Title ¶
The string that displays in a window’s title bar.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow/title
func (SCWindow) WindowID ¶
The Core Graphics window identifier.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow/windowID
func (SCWindow) WindowLayer ¶
The layer of the window relative to other windows.
See: https://developer.apple.com/documentation/ScreenCaptureKit/SCWindow/windowLayer
type SCWindowClass ¶
type SCWindowClass struct {
// contains filtered or unexported fields
}
func GetSCWindowClass ¶
func GetSCWindowClass() SCWindowClass
GetSCWindowClass returns the class object for SCWindow.
func (SCWindowClass) Alloc ¶
func (sc SCWindowClass) Alloc() SCWindow
Alloc allocates memory for a new instance of the class.
Source Files
¶
- blocks.gen.go
- content_sharing_picker_observer_protocol.gen.go
- delegate_class_counter.gen.go
- doc.gen.go
- enums.gen.go
- functions.gen.go
- generate.go
- global_vars.gen.go
- recording_output_delegate_protocol.gen.go
- sc_content_filter.gen.go
- sc_content_sharing_picker.gen.go
- sc_content_sharing_picker_configuration.gen.go
- sc_display.gen.go
- sc_recording_output.gen.go
- sc_recording_output_configuration.gen.go
- sc_running_application.gen.go
- sc_screenshot_configuration.gen.go
- sc_screenshot_manager.gen.go
- sc_screenshot_output.gen.go
- sc_shareable_content.gen.go
- sc_shareable_content_info.gen.go
- sc_stream.gen.go
- sc_stream_configuration.gen.go
- sc_window.gen.go
- stream_delegate_protocol.gen.go
- stream_output_protocol.gen.go
- typedefs.gen.go
- types.gen.go
- undefined_types.gen.go