screencapturekit

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package screencapturekit provides a fluent Go API over the macOS ScreenCaptureKit framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Errors

Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.

Delegates

A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.

Index

Constants

This section is empty.

Variables

View Source
var ErrAttemptToConfigState = errkit.New("SCStreamErrorDomain", -3810)

ErrAttemptToConfigState matches the ScreenCaptureKit error SCStreamErrorAttemptToConfigState.

View Source
var ErrAttemptToStartStreamState = errkit.New("SCStreamErrorDomain", -3807)

ErrAttemptToStartStreamState matches the ScreenCaptureKit error SCStreamErrorAttemptToStartStreamState.

View Source
var ErrAttemptToStopStreamState = errkit.New("SCStreamErrorDomain", -3808)

ErrAttemptToStopStreamState matches the ScreenCaptureKit error SCStreamErrorAttemptToStopStreamState.

View Source
var ErrAttemptToUpdateFilterState = errkit.New("SCStreamErrorDomain", -3809)

ErrAttemptToUpdateFilterState matches the ScreenCaptureKit error SCStreamErrorAttemptToUpdateFilterState.

View Source
var ErrFailedApplicationConnectionInterrupted = errkit.New("SCStreamErrorDomain", -3805)

ErrFailedApplicationConnectionInterrupted matches the ScreenCaptureKit error SCStreamErrorFailedApplicationConnectionInterrupted.

View Source
var ErrFailedApplicationConnectionInvalid = errkit.New("SCStreamErrorDomain", -3804)

ErrFailedApplicationConnectionInvalid matches the ScreenCaptureKit error SCStreamErrorFailedApplicationConnectionInvalid.

View Source
var ErrFailedNoMatchingApplicationContext = errkit.New("SCStreamErrorDomain", -3806)

ErrFailedNoMatchingApplicationContext matches the ScreenCaptureKit error SCStreamErrorFailedNoMatchingApplicationContext.

View Source
var ErrFailedToStart = errkit.New("SCStreamErrorDomain", -3802)

ErrFailedToStart matches the ScreenCaptureKit error SCStreamErrorFailedToStart.

View Source
var ErrFailedToStartAudioCapture = errkit.New("SCStreamErrorDomain", -3818)

ErrFailedToStartAudioCapture matches the ScreenCaptureKit error SCStreamErrorFailedToStartAudioCapture.

View Source
var ErrFailedToStartMicrophoneCapture = errkit.New("SCStreamErrorDomain", -3820)

ErrFailedToStartMicrophoneCapture matches the ScreenCaptureKit error SCStreamErrorFailedToStartMicrophoneCapture.

View Source
var ErrFailedToStopAudioCapture = errkit.New("SCStreamErrorDomain", -3819)

ErrFailedToStopAudioCapture matches the ScreenCaptureKit error SCStreamErrorFailedToStopAudioCapture.

View Source
var ErrInternalError = errkit.New("SCStreamErrorDomain", -3811)

ErrInternalError matches the ScreenCaptureKit error SCStreamErrorInternalError.

View Source
var ErrInvalidParameter = errkit.New("SCStreamErrorDomain", -3812)

ErrInvalidParameter matches the ScreenCaptureKit error SCStreamErrorInvalidParameter.

View Source
var ErrMissingEntitlements = errkit.New("SCStreamErrorDomain", -3803)

ErrMissingEntitlements matches the ScreenCaptureKit error SCStreamErrorMissingEntitlements.

View Source
var ErrNoCaptureSource = errkit.New("SCStreamErrorDomain", -3815)

ErrNoCaptureSource matches the ScreenCaptureKit error SCStreamErrorNoCaptureSource.

View Source
var ErrNoDisplayList = errkit.New("SCStreamErrorDomain", -3814)

ErrNoDisplayList matches the ScreenCaptureKit error SCStreamErrorNoDisplayList.

View Source
var ErrNoWindowList = errkit.New("SCStreamErrorDomain", -3813)

ErrNoWindowList matches the ScreenCaptureKit error SCStreamErrorNoWindowList.

View Source
var ErrRemovingStream = errkit.New("SCStreamErrorDomain", -3816)

ErrRemovingStream matches the ScreenCaptureKit error SCStreamErrorRemovingStream.

View Source
var ErrSystemStoppedStream = errkit.New("SCStreamErrorDomain", -3821)

ErrSystemStoppedStream matches the ScreenCaptureKit error SCStreamErrorSystemStoppedStream.

View Source
var ErrUserDeclined = errkit.New("SCStreamErrorDomain", -3801)

ErrUserDeclined matches the ScreenCaptureKit error SCStreamErrorUserDeclined.

View Source
var ErrUserStopped = errkit.New("SCStreamErrorDomain", -3817)

ErrUserStopped matches the ScreenCaptureKit error SCStreamErrorUserStopped.

Functions

func CaptureImageInRectCompletionHandler added in v0.18.0

func CaptureImageInRectCompletionHandler(rect corefoundation.CGRect, completionHandler func(unsafe.Pointer, unsafe.Pointer))

CaptureImageInRectCompletionHandler captureImageInRect:completionHandler: this method returns an image containing the contents of the rectangle in points, specified in display space

func CaptureImageWithFilterConfigurationCompletionHandler added in v0.18.0

func CaptureImageWithFilterConfigurationCompletionHandler(contentFilter *ContentFilter, config *StreamConfiguration, completionHandler func(unsafe.Pointer, unsafe.Pointer))

CaptureImageWithFilterConfigurationCompletionHandler captures a single frame from a stream as an image, using a filter.

func CaptureSampleBufferWithFilterConfigurationCompletionHandler added in v0.18.0

func CaptureSampleBufferWithFilterConfigurationCompletionHandler(contentFilter *ContentFilter, config *StreamConfiguration, completionHandler func(unsafe.Pointer, unsafe.Pointer))

CaptureSampleBufferWithFilterConfigurationCompletionHandler captures a single frame directly from a stream’s buffer, using a filter.

func SCStreamErrorDomain

func SCStreamErrorDomain() obj.Object

SCStreamErrorDomain returns the string constant SCStreamErrorDomain, for use as a dictionary key or argument.

func SCStreamFrameInfoBoundingRect

func SCStreamFrameInfoBoundingRect() obj.Object

SCStreamFrameInfoBoundingRect returns the string constant SCStreamFrameInfoBoundingRect, for use as a dictionary key or argument.

func SCStreamFrameInfoContentRect

func SCStreamFrameInfoContentRect() obj.Object

SCStreamFrameInfoContentRect returns the string constant SCStreamFrameInfoContentRect, for use as a dictionary key or argument.

func SCStreamFrameInfoContentScale

func SCStreamFrameInfoContentScale() obj.Object

SCStreamFrameInfoContentScale returns the string constant SCStreamFrameInfoContentScale, for use as a dictionary key or argument.

func SCStreamFrameInfoDirtyRects

func SCStreamFrameInfoDirtyRects() obj.Object

SCStreamFrameInfoDirtyRects returns the string constant SCStreamFrameInfoDirtyRects, for use as a dictionary key or argument.

func SCStreamFrameInfoDisplayTime

func SCStreamFrameInfoDisplayTime() obj.Object

SCStreamFrameInfoDisplayTime returns the string constant SCStreamFrameInfoDisplayTime, for use as a dictionary key or argument.

func SCStreamFrameInfoPresenterOverlayContentRect

func SCStreamFrameInfoPresenterOverlayContentRect() obj.Object

SCStreamFrameInfoPresenterOverlayContentRect returns the string constant SCStreamFrameInfoPresenterOverlayContentRect, for use as a dictionary key or argument.

func SCStreamFrameInfoScaleFactor

func SCStreamFrameInfoScaleFactor() obj.Object

SCStreamFrameInfoScaleFactor returns the string constant SCStreamFrameInfoScaleFactor, for use as a dictionary key or argument.

func SCStreamFrameInfoScreenRect

func SCStreamFrameInfoScreenRect() obj.Object

SCStreamFrameInfoScreenRect returns the string constant SCStreamFrameInfoScreenRect, for use as a dictionary key or argument.

func SCStreamFrameInfoStatus

func SCStreamFrameInfoStatus() obj.Object

SCStreamFrameInfoStatus returns the string constant SCStreamFrameInfoStatus, for use as a dictionary key or argument.

func SupportedContentTypes added in v0.17.0

func SupportedContentTypes() []obj.Object

SupportedContentTypes returns an array of UTTypes that corresponds to the file formats that are supported. ScreenCaptureKit can save the CGImage into heic, jpeg, and png

SupportedContentTypes returns the collection as a Go slice.

Types

type CGLCPContextPriorityRequest

type CGLCPContextPriorityRequest int32
const (
	KCGLCPContextPriorityRequestHigh   CGLCPContextPriorityRequest = 0
	KCGLCPContextPriorityRequestNormal CGLCPContextPriorityRequest = 1
	KCGLCPContextPriorityRequestLow    CGLCPContextPriorityRequest = 2
)

func (CGLCPContextPriorityRequest) String

String returns the CGLCPContextPriorityRequest constant's name, or its numeric form when the value is not a known constant.

type CaptureDynamicRange added in v0.17.0

type CaptureDynamicRange int64

Specifies whether the captured screen output is standard or high dynamic range.

const (
	// Specifies that the system captures the screen in standard dynamic range.
	CaptureDynamicRangeSDR CaptureDynamicRange = 0
	// Specifies that the system captures the screen in high dynamic range with attributes of the local display.
	CaptureDynamicRangeHDRLocalDisplay CaptureDynamicRange = 1
	// Specifies that the system captures the screen in high dynamic range with attributes of the canonical display.
	CaptureDynamicRangeHDRCanonicalDisplay CaptureDynamicRange = 2
)

func (CaptureDynamicRange) String added in v0.17.0

func (e CaptureDynamicRange) String() string

String returns the CaptureDynamicRange constant's name, or its numeric form when the value is not a known constant.

type CaptureResolutionType added in v0.17.0

type CaptureResolutionType int64

Available resolutions for content capture.

const (
	// Allow ScreenCaptureKit to automatically select the quality of content depending on factors such as network connection.
	//
	// Deprecated: Use SCShareableContentStyle instead
	CaptureResolutionAutomatic CaptureResolutionType = 0
	// Capture streaming content at the best available resolution.
	//
	// Deprecated: Use SCShareableContentStyle instead
	CaptureResolutionBest CaptureResolutionType = 1
	// Capture streaming content with a one point to one pixel conversion factor.
	CaptureResolutionNominal CaptureResolutionType = 2
)

func (CaptureResolutionType) String added in v0.17.0

func (e CaptureResolutionType) String() string

String returns the CaptureResolutionType constant's name, or its numeric form when the value is not a known constant.

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type ContentFilter added in v0.17.0

type ContentFilter struct {
	objref.Handle
}

ContentFilter is an idiomatic wrapper over the Objective-C class SCContentFilter.

An instance that filters the content a stream captures.

func ContentFilterFromID added in v0.17.0

func ContentFilterFromID(id objc.ID) *ContentFilter

ContentFilterFromID adopts an existing Objective-C object as a ContentFilter (nil for 0), retaining it and registering a release finalizer.

func NewContentFilterWithDesktopIndependentWindow added in v0.17.0

func NewContentFilterWithDesktopIndependentWindow(window *Window) *ContentFilter

NewContentFilterWithDesktopIndependentWindow creates a filter that captures only the specified window.

func NewContentFilterWithDisplayExcludingApplicationsExceptingWindows added in v0.17.0

func NewContentFilterWithDisplayExcludingApplicationsExceptingWindows(display *Display, applications []*RunningApplication, exceptingWindows []*Window) *ContentFilter

NewContentFilterWithDisplayExcludingApplicationsExceptingWindows creates a filter that captures a display, excluding windows of the specified apps.

func NewContentFilterWithDisplayExcludingWindows added in v0.17.0

func NewContentFilterWithDisplayExcludingWindows(display *Display, excluded []*Window) *ContentFilter

NewContentFilterWithDisplayExcludingWindows creates a filter that captures the contents of a display, excluding the specified windows.

func NewContentFilterWithDisplayIncludingApplicationsExceptingWindows added in v0.17.0

func NewContentFilterWithDisplayIncludingApplicationsExceptingWindows(display *Display, applications []*RunningApplication, exceptingWindows []*Window) *ContentFilter

NewContentFilterWithDisplayIncludingApplicationsExceptingWindows creates a filter that captures a display, including only windows of the specified apps.

func NewContentFilterWithDisplayIncludingWindows added in v0.17.0

func NewContentFilterWithDisplayIncludingWindows(display *Display, includedWindows []*Window) *ContentFilter

NewContentFilterWithDisplayIncludingWindows creates a filter that captures only specific windows from a display.

func (*ContentFilter) ContentRect added in v0.17.0

func (cf *ContentFilter) ContentRect() corefoundation.CGRect

ContentRect returns size and location of content in points

func (*ContentFilter) Description added in v0.17.0

func (cf *ContentFilter) Description() string

Description returns the object's -description text.

func (*ContentFilter) IncludeMenuBar added in v0.17.0

func (cf *ContentFilter) IncludeMenuBar() bool

IncludeMenuBar reports whether to include menu bar as part of the capture. This property has no effect for the desktop independent window filter. For content filters created with initWithDisplay:excluding, the default value is true. Display excluding content filters contains the desktop and dock. For content filters created with initWithDisplay:including, the default value is false. Display including content filters do not contain the desktop and dock

func (*ContentFilter) IncludedApplications added in v0.17.0

func (cf *ContentFilter) IncludedApplications() []*RunningApplication

IncludedApplications returns applications that are included in the content filter

IncludedApplications returns the collection as a Go slice.

func (*ContentFilter) IncludedDisplays added in v0.17.0

func (cf *ContentFilter) IncludedDisplays() []*Display

IncludedDisplays returns SCDisplays that are included in the content filter

IncludedDisplays returns the collection as a Go slice.

func (*ContentFilter) IncludedWindows added in v0.17.0

func (cf *ContentFilter) IncludedWindows() []*Window

IncludedWindows returns windows that are included in the content filter

IncludedWindows returns the collection as a Go slice.

func (*ContentFilter) IsEqual added in v0.17.0

func (cf *ContentFilter) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ContentFilter) IsKind added in v0.17.0

func (cf *ContentFilter) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ContentFilter) PointPixelScale added in v0.17.0

func (cf *ContentFilter) PointPixelScale() float32

PointPixelScale returns pixel to points scaling factor

func (*ContentFilter) StreamType added in v0.17.0

func (cf *ContentFilter) StreamType() StreamType

StreamType returns streamType type of stream

func (*ContentFilter) String added in v0.17.0

func (cf *ContentFilter) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ContentFilter) Style added in v0.17.0

Style returns style of stream

func (*ContentFilter) WithIncludeMenuBar added in v0.17.0

func (cf *ContentFilter) WithIncludeMenuBar(includeMenuBar bool) *ContentFilter

WithIncludeMenuBar sets to include menu bar as part of the capture. This property has no effect for the desktop independent window filter. For content filters created with initWithDisplay:excluding, the default value is YES. Display excluding content filters contains the desktop and dock. For content filters created with initWithDisplay:including, the default value is NO. Display including content filters do not contain the desktop and dock

type ContentSharingPicker added in v0.17.0

type ContentSharingPicker struct {
	objref.Handle
}

ContentSharingPicker is an idiomatic wrapper over the Objective-C class SCContentSharingPicker.

An instance of a picker presented by the operating system for managing frame-capture streams.

func ContentSharingPickerFromID added in v0.17.0

func ContentSharingPickerFromID(id objc.ID) *ContentSharingPicker

ContentSharingPickerFromID adopts an existing Objective-C object as a ContentSharingPicker (nil for 0), retaining it and registering a release finalizer.

func NewContentSharingPicker added in v0.17.0

func NewContentSharingPicker() *ContentSharingPicker

NewContentSharingPicker creates a new ContentSharingPicker.

func SharedPicker added in v0.17.0

func SharedPicker() *ContentSharingPicker

SharedPicker returns sharedPicker the singleton shared picker for the application

func (*ContentSharingPicker) DefaultConfiguration added in v0.17.0

func (csp *ContentSharingPicker) DefaultConfiguration() obj.Object

DefaultConfiguration returns defaultConfiguration for the content sharing picker. If a stream does not have a configuration, the default configuration will be used.

func (*ContentSharingPicker) Description added in v0.17.0

func (csp *ContentSharingPicker) Description() string

Description returns the object's -description text.

func (*ContentSharingPicker) IsActive added in v0.17.0

func (csp *ContentSharingPicker) IsActive() bool

IsActive reports whether active A picker needs to be marked as active for its UI to appear. If `startPickingContent` is called and the picker is not marked as active, the picker will not appear.

func (*ContentSharingPicker) IsEqual added in v0.17.0

func (csp *ContentSharingPicker) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ContentSharingPicker) IsKind added in v0.17.0

func (csp *ContentSharingPicker) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ContentSharingPicker) MaximumStreamCount added in v0.17.0

func (csp *ContentSharingPicker) MaximumStreamCount() *foundation.Number

MaximumStreamCount returns maximumStreamCount An integer value that, if set, limits when Control Center will show the UI to present a picker with no associated stream. If set to 0, Control Center will never ever show UI to present a picker without an associated stream.

func (*ContentSharingPicker) Present added in v0.17.0

func (csp *ContentSharingPicker) Present()

Present displays the picker with no active selection for capture.

func (*ContentSharingPicker) PresentPickerForStream added in v0.17.0

func (csp *ContentSharingPicker) PresentPickerForStream(stream *Stream)

PresentPickerForStream displays the picker with an already running capture stream.

func (*ContentSharingPicker) PresentPickerForStreamUsingContentStyle added in v0.17.0

func (csp *ContentSharingPicker) PresentPickerForStreamUsingContentStyle(stream *Stream, contentStyle ShareableContentStyle)

PresentPickerForStreamUsingContentStyle displays the picker with an existing capture stream, allowing for a single type of capture selection.

func (*ContentSharingPicker) PresentPickerUsingContentStyle added in v0.17.0

func (csp *ContentSharingPicker) PresentPickerUsingContentStyle(contentStyle ShareableContentStyle)

PresentPickerUsingContentStyle displays the picker for a single type of capture selection.

func (*ContentSharingPicker) SetConfigurationForStream added in v0.17.0

func (csp *ContentSharingPicker) SetConfigurationForStream(pickerConfig obj.Object, stream *Stream)

SetConfigurationForStream sets the configuration for the content capture picker for a capture stream, providing allowed selection modes and content excluded from selection.

func (*ContentSharingPicker) String added in v0.17.0

func (csp *ContentSharingPicker) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ContentSharingPicker) WithActive added in v0.17.0

func (csp *ContentSharingPicker) WithActive(active bool) *ContentSharingPicker

WithActive sets a Boolean value that indicates if the picker is active.

func (*ContentSharingPicker) WithDefaultConfiguration added in v0.17.0

func (csp *ContentSharingPicker) WithDefaultConfiguration(defaultConfiguration obj.Object) *ContentSharingPicker

WithDefaultConfiguration sets the default configuration to use for the content capture picker.

func (*ContentSharingPicker) WithMaximumStreamCount added in v0.17.0

func (csp *ContentSharingPicker) WithMaximumStreamCount(maximumStreamCount obj.Object) *ContentSharingPicker

WithMaximumStreamCount sets the maximum number of streams the content capture picker allows.

type ContentSharingPickerConfiguration added in v0.17.0

type ContentSharingPickerConfiguration struct {
	objref.Handle
}

ContentSharingPickerConfiguration is an idiomatic wrapper over the Objective-C class SCContentSharingPickerConfiguration.

An instance for configuring the system content-sharing picker.

func ContentSharingPickerConfigurationFromID added in v0.17.0

func ContentSharingPickerConfigurationFromID(id objc.ID) *ContentSharingPickerConfiguration

ContentSharingPickerConfigurationFromID adopts an existing Objective-C object as a ContentSharingPickerConfiguration (nil for 0), retaining it and registering a release finalizer.

func NewContentSharingPickerConfiguration added in v0.17.0

func NewContentSharingPickerConfiguration() *ContentSharingPickerConfiguration

NewContentSharingPickerConfiguration creates a new ContentSharingPickerConfiguration.

func (*ContentSharingPickerConfiguration) AllowedPickerModes added in v0.17.0

AllowedPickerModes returns allowedPickerModes Limits the type of selections available to the user when the picker is presented. Default is 0, no excluded picking modes

func (*ContentSharingPickerConfiguration) AllowsChangingSelectedContent added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) AllowsChangingSelectedContent() bool

AllowsChangingSelectedContent reports whether allowsChangingSelectedContent Controls if the user can make updates to the content filter after the initial selection. Defaults is true.

func (*ContentSharingPickerConfiguration) Description added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) Description() string

Description returns the object's -description text.

func (*ContentSharingPickerConfiguration) ExcludedBundleIDs added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) ExcludedBundleIDs() []string

ExcludedBundleIDs returns excludedBundleIDs Excludes bundle IDs for picking

ExcludedBundleIDs returns the collection as a Go slice.

func (*ContentSharingPickerConfiguration) ExcludedWindowIDs added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) ExcludedWindowIDs() []obj.Object

ExcludedWindowIDs returns excludedWindowIDs Excludes CGWindowIDs for picking

ExcludedWindowIDs returns the collection as a Go slice.

func (*ContentSharingPickerConfiguration) IsEqual added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ContentSharingPickerConfiguration) IsKind added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ContentSharingPickerConfiguration) String added in v0.17.0

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ContentSharingPickerConfiguration) WithAllowedPickerModes added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) WithAllowedPickerModes(allowedPickerModes ContentSharingPickerMode) *ContentSharingPickerConfiguration

WithAllowedPickerModes sets allowedPickerModes Limits the type of selections available to the user when the picker is presented. Default is 0, no excluded picking modes

func (*ContentSharingPickerConfiguration) WithAllowsChangingSelectedContent added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) WithAllowsChangingSelectedContent(allowsChangingSelectedContent bool) *ContentSharingPickerConfiguration

WithAllowsChangingSelectedContent sets allowsChangingSelectedContent Controls if the user can make updates to the content filter after the initial selection. Defaults is YES.

func (*ContentSharingPickerConfiguration) WithExcludedBundleIDs added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) WithExcludedBundleIDs(items ...obj.Object) *ContentSharingPickerConfiguration

WithExcludedBundleIDs sets excludedBundleIDs Excludes bundle IDs for picking

func (*ContentSharingPickerConfiguration) WithExcludedWindowIDs added in v0.17.0

func (cspc *ContentSharingPickerConfiguration) WithExcludedWindowIDs(items ...obj.Object) *ContentSharingPickerConfiguration

WithExcludedWindowIDs sets excludedWindowIDs Excludes CGWindowIDs for picking

type ContentSharingPickerMode added in v0.17.0

type ContentSharingPickerMode uint64

Available modes for selecting streaming content from a picker presented by the operating system. Bitmask — values may be combined with |.

const (
	// The mode allowing the selection of a single window through the presented picker.
	ContentSharingPickerModeSingleWindow ContentSharingPickerMode = 1
	// The mode allowing the selection of multiple windows through the presented picker.
	ContentSharingPickerModeMultipleWindows ContentSharingPickerMode = 2
	// The mode allowing the selection of a single application through the presented picker.
	ContentSharingPickerModeSingleApplication ContentSharingPickerMode = 4
	// The mode allowing the selection of multiple applications through the presented picker.
	ContentSharingPickerModeMultipleApplications ContentSharingPickerMode = 8
	// The mode allowing the selection of a single display through the presented picker.
	ContentSharingPickerModeSingleDisplay ContentSharingPickerMode = 16
)

func (ContentSharingPickerMode) String added in v0.17.0

func (e ContentSharingPickerMode) String() string

String returns the ContentSharingPickerMode constant's name, or its numeric form when the value is not a known constant.

type ContentSharingPickerObserver added in v0.17.0

type ContentSharingPickerObserver interface {
	// ContentSharingPickerDidCancelForStream contentSharingPicker:didCancelforStream: the observer callback method when the picker has been canceled with no selection.
	ContentSharingPickerDidCancelForStream(picker *ContentSharingPicker, stream *Stream)
	// ContentSharingPickerDidUpdateWithFilterForStream contentSharingPicker:didUpdateWithFilter:forStream: the observer callback method when the user has finished updating content for a stream
	ContentSharingPickerDidUpdateWithFilterForStream(picker *ContentSharingPicker, filter *ContentFilter, stream *Stream)
	// ContentSharingPickerStartDidFailWithError contentSharingPickerStartDidFailWithError: the observer callback method when the picker was asked to start but failed to do so.
	ContentSharingPickerStartDidFailWithError(err error)
}

ContentSharingPickerObserver receives the callbacks of the Objective-C protocol SCContentSharingPickerObserver. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (ContentSharingPickerObserver…Handler): implement the ones you need on the same value and the framework will call them too.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type Display added in v0.17.0

type Display struct {
	objref.Handle
}

Display is an idiomatic wrapper over the Objective-C class SCDisplay.

An instance that represents a display device.

func DisplayFromID added in v0.17.0

func DisplayFromID(id objc.ID) *Display

DisplayFromID adopts an existing Objective-C object as a Display (nil for 0), retaining it and registering a release finalizer.

func NewDisplay added in v0.17.0

func NewDisplay() *Display

NewDisplay creates a new Display.

func (*Display) Description added in v0.17.0

func (d *Display) Description() string

Description returns the object's -description text.

func (*Display) DisplayID added in v0.17.0

func (d *Display) DisplayID() uint32

DisplayID returns displayId the CGDirectDisplayID for the SCDisplay

func (*Display) Frame added in v0.17.0

func (d *Display) Frame() corefoundation.CGRect

Frame returns frame the CGRect frame for the SCDisplay

func (*Display) Height added in v0.17.0

func (d *Display) Height() int

Height returns height the height, in points, for the SCDisplay

func (*Display) IsEqual added in v0.17.0

func (d *Display) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Display) IsKind added in v0.17.0

func (d *Display) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Display) String added in v0.17.0

func (d *Display) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Display) Width added in v0.17.0

func (d *Display) Width() int

Width returns width the width, in points, for the SCDisplay

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type EvCmd

type EvCmd int32
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

String returns the EvCmd constant's name, or its numeric form when the value is not a known constant.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type FrameStatus added in v0.17.0

type FrameStatus int64

Status values for a frame from a stream.

const (
	// A status that indicates the system successfully generated a new frame.
	FrameStatusComplete FrameStatus = 0
	// A status that indicates the system didn’t generate a new frame because the display didn’t change.
	FrameStatusIdle FrameStatus = 1
	// A status that indicates the system didn’t generate a new frame because the display is blank.
	FrameStatusBlank FrameStatus = 2
	// A status that indicates the system didn’t generate a new frame because you suspended updates.
	FrameStatusSuspended FrameStatus = 3
	// A status that indicates the frame is the first one sent after the stream starts.
	FrameStatusStarted FrameStatus = 4
	// A status that indicates the frame is in a stopped state.
	FrameStatusStopped FrameStatus = 5
)

func (FrameStatus) String added in v0.17.0

func (e FrameStatus) String() string

String returns the FrameStatus constant's name, or its numeric form when the value is not a known constant.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type NXMouseButton

type NXMouseButton int32
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type OSUnfairLockFlags added in v0.17.0

type OSUnfairLockFlags uint32

Bitmask — values may be combined with |.

const (
	OSUnfairLockFlagsNone         OSUnfairLockFlags = 0
	OSUnfairLockFlagsAdaptiveSpin OSUnfairLockFlags = 262144
)

func (OSUnfairLockFlags) String added in v0.17.0

func (e OSUnfairLockFlags) String() string

String returns the OSUnfairLockFlags constant's name, or its numeric form when the value is not a known constant.

type PMPageToPaperMappingType

type PMPageToPaperMappingType int32
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PresenterOverlayAlertSetting added in v0.17.0

type PresenterOverlayAlertSetting int64

Configures how to present streaming notifications to a streamer of Presenter Overlay.

const (
	// Displays an alert when using Presenter Overlay based on the System Settings.
	PresenterOverlayAlertSettingSystem PresenterOverlayAlertSetting = 0
	// Never display an alert when using Presenter Overlay.
	PresenterOverlayAlertSettingNever PresenterOverlayAlertSetting = 1
	// Always display an alert when using Presenter Overlay.
	PresenterOverlayAlertSettingAlways PresenterOverlayAlertSetting = 2
)

func (PresenterOverlayAlertSetting) String added in v0.17.0

String returns the PresenterOverlayAlertSetting constant's name, or its numeric form when the value is not a known constant.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type RecordingOutput added in v0.17.0

type RecordingOutput struct {
	objref.Handle
}

RecordingOutput is an idiomatic wrapper over the Objective-C class SCRecordingOutput.

func NewRecordingOutput added in v0.17.0

func NewRecordingOutput() *RecordingOutput

NewRecordingOutput creates a new RecordingOutput.

func RecordingOutputFromID added in v0.17.0

func RecordingOutputFromID(id objc.ID) *RecordingOutput

RecordingOutputFromID adopts an existing Objective-C object as a RecordingOutput (nil for 0), retaining it and registering a release finalizer.

func (*RecordingOutput) Description added in v0.17.0

func (ro *RecordingOutput) Description() string

Description returns the object's -description text.

func (*RecordingOutput) IsEqual added in v0.17.0

func (ro *RecordingOutput) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*RecordingOutput) IsKind added in v0.17.0

func (ro *RecordingOutput) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*RecordingOutput) RecordedDuration added in v0.17.0

func (ro *RecordingOutput) RecordedDuration() coremedia.CMTime

RecordedDuration indicates current duration of recording to the output file.

func (*RecordingOutput) RecordedFileSize added in v0.17.0

func (ro *RecordingOutput) RecordedFileSize() int

RecordedFileSize indicates current size, in bytes, of the data recorded to the output file.

func (*RecordingOutput) String added in v0.17.0

func (ro *RecordingOutput) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type RecordingOutputConfiguration added in v0.17.0

type RecordingOutputConfiguration struct {
	objref.Handle
}

RecordingOutputConfiguration is an idiomatic wrapper over the Objective-C class SCRecordingOutputConfiguration.

func NewRecordingOutputConfiguration added in v0.17.0

func NewRecordingOutputConfiguration() *RecordingOutputConfiguration

NewRecordingOutputConfiguration creates a new RecordingOutputConfiguration.

func RecordingOutputConfigurationFromID added in v0.17.0

func RecordingOutputConfigurationFromID(id objc.ID) *RecordingOutputConfiguration

RecordingOutputConfigurationFromID adopts an existing Objective-C object as a RecordingOutputConfiguration (nil for 0), retaining it and registering a release finalizer.

func (*RecordingOutputConfiguration) AvailableOutputFileTypes added in v0.17.0

func (roc *RecordingOutputConfiguration) AvailableOutputFileTypes() []obj.Object

AvailableOutputFileTypes returns an array of supported file types that can be specified in SCRecordingOutputConfiguration for outputFileType Provides the file types AVCaptureAudioFileOutput can write.

AvailableOutputFileTypes returns the collection as a Go slice.

func (*RecordingOutputConfiguration) AvailableVideoCodecTypes added in v0.17.0

func (roc *RecordingOutputConfiguration) AvailableVideoCodecTypes() []obj.Object

AvailableVideoCodecTypes returns an array of supported video codec formats that can be specified in SCRecordingOutputConfiguration for videoCodecType

AvailableVideoCodecTypes returns the collection as a Go slice.

func (*RecordingOutputConfiguration) Description added in v0.17.0

func (roc *RecordingOutputConfiguration) Description() string

Description returns the object's -description text.

func (*RecordingOutputConfiguration) IsEqual added in v0.17.0

func (roc *RecordingOutputConfiguration) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*RecordingOutputConfiguration) IsKind added in v0.17.0

func (roc *RecordingOutputConfiguration) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*RecordingOutputConfiguration) OutputFileType added in v0.17.0

func (roc *RecordingOutputConfiguration) OutputFileType() *foundation.String

OutputFileType specifies file type for the recording output, default is AVFileTypeMPEG4, supported values can be obtained using availableOutputFileTypes

func (*RecordingOutputConfiguration) OutputURL added in v0.17.0

func (roc *RecordingOutputConfiguration) OutputURL() string

OutputURL specifies output URL to save the recording.

func (*RecordingOutputConfiguration) String added in v0.17.0

func (roc *RecordingOutputConfiguration) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*RecordingOutputConfiguration) VideoCodecType added in v0.17.0

func (roc *RecordingOutputConfiguration) VideoCodecType() *foundation.String

VideoCodecType specifies video codec for the recording output, default is AVVideoCodecTypeH264, supported values can be obtained using availableVideoCodecTypes

func (*RecordingOutputConfiguration) WithOutputFileType added in v0.17.0

func (roc *RecordingOutputConfiguration) WithOutputFileType(outputFileType obj.Object) *RecordingOutputConfiguration

WithOutputFileType sets specifies file type for the recording output, default is AVFileTypeMPEG4, supported values can be obtained using availableOutputFileTypes

func (*RecordingOutputConfiguration) WithOutputURL added in v0.17.0

func (roc *RecordingOutputConfiguration) WithOutputURL(outputURL string) *RecordingOutputConfiguration

WithOutputURL sets specifies output URL to save the recording.

func (*RecordingOutputConfiguration) WithVideoCodecType added in v0.17.0

func (roc *RecordingOutputConfiguration) WithVideoCodecType(videoCodecType obj.Object) *RecordingOutputConfiguration

WithVideoCodecType sets specifies video codec for the recording output, default is AVVideoCodecTypeH264, supported values can be obtained using availableVideoCodecTypes

type RecordingOutputDelegate added in v0.17.0

type RecordingOutputDelegate interface {
}

RecordingOutputDelegate receives the callbacks of the Objective-C protocol SCRecordingOutputDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (RecordingOutputDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type RecordingOutputDelegateRecordingOutputDidFailWithErrorHandler added in v0.17.0

type RecordingOutputDelegateRecordingOutputDidFailWithErrorHandler interface {
	RecordingOutputDidFailWithError(recordingOutput *RecordingOutput, err error)
}

RecordingOutputDelegateRecordingOutputDidFailWithErrorHandler is the optional SCRecordingOutputDelegate method recordingOutput:didFailWithError:. Implement it on a RecordingOutputDelegate value to receive that callback; a value without it is simply never sent one.

type RecordingOutputDelegateRecordingOutputDidFinishRecordingHandler added in v0.17.0

type RecordingOutputDelegateRecordingOutputDidFinishRecordingHandler interface {
	RecordingOutputDidFinishRecording(recordingOutput *RecordingOutput)
}

RecordingOutputDelegateRecordingOutputDidFinishRecordingHandler is the optional SCRecordingOutputDelegate method recordingOutputDidFinishRecording:. Implement it on a RecordingOutputDelegate value to receive that callback; a value without it is simply never sent one.

type RecordingOutputDelegateRecordingOutputDidStartRecordingHandler added in v0.17.0

type RecordingOutputDelegateRecordingOutputDidStartRecordingHandler interface {
	RecordingOutputDidStartRecording(recordingOutput *RecordingOutput)
}

RecordingOutputDelegateRecordingOutputDidStartRecordingHandler is the optional SCRecordingOutputDelegate method recordingOutputDidStartRecording:. Implement it on a RecordingOutputDelegate value to receive that callback; a value without it is simply never sent one.

type RunningApplication added in v0.17.0

type RunningApplication struct {
	objref.Handle
}

RunningApplication is an idiomatic wrapper over the Objective-C class SCRunningApplication.

An instance that represents an app running on a device.

func NewRunningApplication added in v0.17.0

func NewRunningApplication() *RunningApplication

NewRunningApplication creates a new RunningApplication.

func RunningApplicationFromID added in v0.17.0

func RunningApplicationFromID(id objc.ID) *RunningApplication

RunningApplicationFromID adopts an existing Objective-C object as a RunningApplication (nil for 0), retaining it and registering a release finalizer.

func (*RunningApplication) ApplicationName added in v0.17.0

func (ra *RunningApplication) ApplicationName() string

ApplicationName returns applicationName the application name for the SCRunningApplication

func (*RunningApplication) BundleIdentifier added in v0.17.0

func (ra *RunningApplication) BundleIdentifier() string

BundleIdentifier returns bundleIdentifier the bundleIdentifier for the SCRunningApplication

func (*RunningApplication) Description added in v0.17.0

func (ra *RunningApplication) Description() string

Description returns the object's -description text.

func (*RunningApplication) IsEqual added in v0.17.0

func (ra *RunningApplication) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*RunningApplication) IsKind added in v0.17.0

func (ra *RunningApplication) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*RunningApplication) ProcessID added in v0.17.0

func (ra *RunningApplication) ProcessID() int

ProcessID returns processID the SCRunningApplication

func (*RunningApplication) String added in v0.17.0

func (ra *RunningApplication) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ScreenshotConfiguration added in v0.17.0

type ScreenshotConfiguration struct {
	objref.Handle
}

ScreenshotConfiguration is an idiomatic wrapper over the Objective-C class SCScreenshotConfiguration.

An object that contains screenshot properties such as output width, height, and image quality specifications.

func NewScreenshotConfiguration added in v0.17.0

func NewScreenshotConfiguration() *ScreenshotConfiguration

NewScreenshotConfiguration creates a new ScreenshotConfiguration.

func ScreenshotConfigurationFromID added in v0.17.0

func ScreenshotConfigurationFromID(id objc.ID) *ScreenshotConfiguration

ScreenshotConfigurationFromID adopts an existing Objective-C object as a ScreenshotConfiguration (nil for 0), retaining it and registering a release finalizer.

func (*ScreenshotConfiguration) ContentType added in v0.17.0

func (sc *ScreenshotConfiguration) ContentType() obj.Object

ContentType specifies the screenshot file format.

func (*ScreenshotConfiguration) Description added in v0.17.0

func (sc *ScreenshotConfiguration) Description() string

Description returns the object's -description text.

func (*ScreenshotConfiguration) DestinationRect added in v0.17.0

func (sc *ScreenshotConfiguration) DestinationRect() corefoundation.CGRect

DestinationRect returns SCScreenshotProperty that specifies that the screenshot outputs into a subset of the output CGimage.If not set then the output surface is used. The rectangle is specified in pixels in the display's coordinate system.

func (*ScreenshotConfiguration) DisplayIntent added in v0.17.0

DisplayIntent specifies the render type of the screenshot.

func (*ScreenshotConfiguration) DynamicRange added in v0.17.0

DynamicRange specifies the CGImage to return to the client.

func (*ScreenshotConfiguration) FileURL added in v0.17.0

func (sc *ScreenshotConfiguration) FileURL() string

FileURL specifies output URL to save the screenshot. If the imageOutputURL is nil, then the file will not be saved.

func (*ScreenshotConfiguration) Height added in v0.17.0

func (sc *ScreenshotConfiguration) Height() int

Height returns SCScreenshotProperty for output height as measured in pixels. Default is the height of the content being captured.

func (*ScreenshotConfiguration) IgnoreClipping added in v0.17.0

func (sc *ScreenshotConfiguration) IgnoreClipping() bool

IgnoreClipping reports whether SCScreenshotProperty to ignore framing on windows in the display bounded sharing case (will ignore shadows).

func (*ScreenshotConfiguration) IgnoreShadows added in v0.17.0

func (sc *ScreenshotConfiguration) IgnoreShadows() bool

IgnoreShadows reports whether SCScreenshotProperty to ignore framing on windows (will ignore shadows).

func (*ScreenshotConfiguration) IncludeChildWindows added in v0.17.0

func (sc *ScreenshotConfiguration) IncludeChildWindows() bool

IncludeChildWindows reports whether SCScreenshotProperty to show the child windows of the applications and windows being captured. Child windows are included by default.

func (*ScreenshotConfiguration) IsEqual added in v0.17.0

func (sc *ScreenshotConfiguration) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ScreenshotConfiguration) IsKind added in v0.17.0

func (sc *ScreenshotConfiguration) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ScreenshotConfiguration) ShowsCursor added in v0.17.0

func (sc *ScreenshotConfiguration) ShowsCursor() bool

ShowsCursor reports whether SCScreenshotProperty that specifies whether the cursor should appear in the screenshot. By default the cursor is visible.

func (*ScreenshotConfiguration) SourceRect added in v0.17.0

SourceRect returns SCScreenshotProperty that specifies that the screenshot only samples a subset of the frame input. If not set, then the entire screenshot will be captured. The rectangle is specified in points in the display’s logical coordinate system.

func (*ScreenshotConfiguration) String added in v0.17.0

func (sc *ScreenshotConfiguration) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ScreenshotConfiguration) Width added in v0.17.0

func (sc *ScreenshotConfiguration) Width() int

Width returns SCScreenshotProperty for output width as measured in pixels. Default is the width of the content being captured.

func (*ScreenshotConfiguration) WithContentType added in v0.17.0

func (sc *ScreenshotConfiguration) WithContentType(contentType obj.Object) *ScreenshotConfiguration

WithContentType sets a uniform type identifier that specifies the screenshot’s file format; HEIC, JPEG, or PNG.

func (*ScreenshotConfiguration) WithDestinationRect added in v0.17.0

func (sc *ScreenshotConfiguration) WithDestinationRect(destinationRect corefoundation.CGRect) *ScreenshotConfiguration

WithDestinationRect sets a rectangle that specifies whether to output screenshots in a subset of the output image.

func (*ScreenshotConfiguration) WithDisplayIntent added in v0.17.0

func (sc *ScreenshotConfiguration) WithDisplayIntent(displayIntent ScreenshotDisplayIntent) *ScreenshotConfiguration

WithDisplayIntent sets specifies whether the screen capture uses attributes of the local or canonical display.

func (*ScreenshotConfiguration) WithDynamicRange added in v0.17.0

func (sc *ScreenshotConfiguration) WithDynamicRange(dynamicRange ScreenshotDynamicRange) *ScreenshotConfiguration

WithDynamicRange sets specifies the type of image returned to the client; standard dynamic range, high dynamic range, or both.

func (*ScreenshotConfiguration) WithFileURL added in v0.17.0

func (sc *ScreenshotConfiguration) WithFileURL(fileURL string) *ScreenshotConfiguration

WithFileURL sets specifies the URL where the screenshot process saves the output.

func (*ScreenshotConfiguration) WithHeight added in v0.17.0

func (sc *ScreenshotConfiguration) WithHeight(height int) *ScreenshotConfiguration

WithHeight sets an integer value that specifies the output height, measured in pixels.

func (*ScreenshotConfiguration) WithIgnoreClipping added in v0.17.0

func (sc *ScreenshotConfiguration) WithIgnoreClipping(ignoreClipping bool) *ScreenshotConfiguration

WithIgnoreClipping sets a Boolean value that specifies whether to ignore framing on windows when using content filters.

func (*ScreenshotConfiguration) WithIgnoreShadows added in v0.17.0

func (sc *ScreenshotConfiguration) WithIgnoreShadows(ignoreShadows bool) *ScreenshotConfiguration

WithIgnoreShadows sets a Boolean value that specifies whether to ignore framing on windows.

func (*ScreenshotConfiguration) WithIncludeChildWindows added in v0.17.0

func (sc *ScreenshotConfiguration) WithIncludeChildWindows(includeChildWindows bool) *ScreenshotConfiguration

WithIncludeChildWindows sets a Boolean that specifies whether the screenshot captures subwindows of the included apps and windows.

func (*ScreenshotConfiguration) WithShowsCursor added in v0.17.0

func (sc *ScreenshotConfiguration) WithShowsCursor(showsCursor bool) *ScreenshotConfiguration

WithShowsCursor sets a Boolean value that specifies whether the pointer appears in the screenshot.

func (*ScreenshotConfiguration) WithSourceRect added in v0.17.0

func (sc *ScreenshotConfiguration) WithSourceRect(sourceRect corefoundation.CGRect) *ScreenshotConfiguration

WithSourceRect sets a rectangle that specifies that the screenshot only samples a subset of the frame input.

func (*ScreenshotConfiguration) WithWidth added in v0.17.0

func (sc *ScreenshotConfiguration) WithWidth(width int) *ScreenshotConfiguration

WithWidth sets an integer value that specifies the output width in pixels.

type ScreenshotDisplayIntent added in v0.17.0

type ScreenshotDisplayIntent int64
const (
	ScreenshotDisplayIntentCanonical ScreenshotDisplayIntent = 0
	ScreenshotDisplayIntentLocal     ScreenshotDisplayIntent = 1
)

func (ScreenshotDisplayIntent) String added in v0.17.0

func (e ScreenshotDisplayIntent) String() string

String returns the ScreenshotDisplayIntent constant's name, or its numeric form when the value is not a known constant.

type ScreenshotDynamicRange added in v0.17.0

type ScreenshotDynamicRange int64
const (
	ScreenshotDynamicRangeSDR       ScreenshotDynamicRange = 0
	ScreenshotDynamicRangeHDR       ScreenshotDynamicRange = 1
	ScreenshotDynamicRangeSDRAndHDR ScreenshotDynamicRange = 2
)

func (ScreenshotDynamicRange) String added in v0.17.0

func (e ScreenshotDynamicRange) String() string

String returns the ScreenshotDynamicRange constant's name, or its numeric form when the value is not a known constant.

type ScreenshotManager added in v0.17.0

type ScreenshotManager struct {
	objref.Handle
}

ScreenshotManager is an idiomatic wrapper over the Objective-C class SCScreenshotManager.

An instance for the capture of single frames from a stream.

func NewScreenshotManager added in v0.17.0

func NewScreenshotManager() *ScreenshotManager

NewScreenshotManager creates a new ScreenshotManager.

func ScreenshotManagerFromID added in v0.17.0

func ScreenshotManagerFromID(id objc.ID) *ScreenshotManager

ScreenshotManagerFromID adopts an existing Objective-C object as a ScreenshotManager (nil for 0), retaining it and registering a release finalizer.

func (*ScreenshotManager) Description added in v0.17.0

func (sm *ScreenshotManager) Description() string

Description returns the object's -description text.

func (*ScreenshotManager) IsEqual added in v0.17.0

func (sm *ScreenshotManager) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ScreenshotManager) IsKind added in v0.17.0

func (sm *ScreenshotManager) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ScreenshotManager) String added in v0.17.0

func (sm *ScreenshotManager) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ScreenshotOutput added in v0.17.0

type ScreenshotOutput struct {
	objref.Handle
}

ScreenshotOutput is an idiomatic wrapper over the Objective-C class SCScreenshotOutput.

An object that contains all images requested by the client.

func CaptureScreenshotWithFilterConfiguration added in v0.17.0

func CaptureScreenshotWithFilterConfiguration(ctx context.Context, contentFilter *ContentFilter, config *ScreenshotConfiguration) (result *ScreenshotOutput, err error)

CaptureScreenshotWithFilterConfiguration captureScreenshotWithFilter:configuration:completionHandler: this method returns an SCScreenshotOutput object containing CGImages of the screenshot requested by the client

CaptureScreenshotWithFilterConfiguration blocks until the operation completes or ctx is cancelled.

func CaptureScreenshotWithRectConfiguration added in v0.17.0

func CaptureScreenshotWithRectConfiguration(ctx context.Context, rect corefoundation.CGRect, config *ScreenshotConfiguration) (result *ScreenshotOutput, err error)

CaptureScreenshotWithRectConfiguration captureScreenshotWithRect:configuration:completionHandler: this method returns an SCScreenshotOutput object containing CGImages of the screenshot requested by the client

CaptureScreenshotWithRectConfiguration blocks until the operation completes or ctx is cancelled.

func NewScreenshotOutput added in v0.17.0

func NewScreenshotOutput() *ScreenshotOutput

NewScreenshotOutput creates a new ScreenshotOutput.

func ScreenshotOutputFromID added in v0.17.0

func ScreenshotOutputFromID(id objc.ID) *ScreenshotOutput

ScreenshotOutputFromID adopts an existing Objective-C object as a ScreenshotOutput (nil for 0), retaining it and registering a release finalizer.

func (*ScreenshotOutput) Description added in v0.17.0

func (so *ScreenshotOutput) Description() string

Description returns the object's -description text.

func (*ScreenshotOutput) FileURL added in v0.17.0

func (so *ScreenshotOutput) FileURL() string

FileURL returns SCScreenshotOutput property to specify the location where the image was saved. If a fileURL in the screenshot configuration was not specified, then the fileURL will be nil

func (*ScreenshotOutput) HdrImage added in v0.17.0

func (so *ScreenshotOutput) HdrImage() coregraphics.CGImageRef

HdrImage returns SCScreenshotOutput property that denotes the HDR CGimage. The output CGImage uses the extended sRGB color space.

func (*ScreenshotOutput) IsEqual added in v0.17.0

func (so *ScreenshotOutput) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ScreenshotOutput) IsKind added in v0.17.0

func (so *ScreenshotOutput) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ScreenshotOutput) SdrImage added in v0.17.0

func (so *ScreenshotOutput) SdrImage() coregraphics.CGImageRef

SdrImage returns SCScreenshotOutput property that denotes the SDR CGimage. The output CGImage uses the same color space as the display

func (*ScreenshotOutput) String added in v0.17.0

func (so *ScreenshotOutput) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ScreenshotOutput) WithFileURL added in v0.17.0

func (so *ScreenshotOutput) WithFileURL(fileURL string) *ScreenshotOutput

WithFileURL sets a URL property that specifies the location of the saved image.

func (*ScreenshotOutput) WithHdrImage added in v0.17.0

func (so *ScreenshotOutput) WithHdrImage(hdrImage coregraphics.CGImageRef) *ScreenshotOutput

WithHdrImage sets an output property that specifies the high dynamic range version of the screenshot.

func (*ScreenshotOutput) WithSdrImage added in v0.17.0

func (so *ScreenshotOutput) WithSdrImage(sdrImage coregraphics.CGImageRef) *ScreenshotOutput

WithSdrImage sets an output property that specifies the standard dynamic range version of the screenshot.

type ShareableContent added in v0.17.0

type ShareableContent struct {
	objref.Handle
}

ShareableContent is an idiomatic wrapper over the Objective-C class SCShareableContent.

An instance that represents a set of displays, apps, and windows that your app can capture.

func GetCurrentProcessShareableContent added in v0.17.0

func GetCurrentProcessShareableContent(ctx context.Context) (result *ShareableContent, err error)

GetCurrentProcessShareableContent getCurrentProcessShareableContentWithCompletionHandler:completionHandler this method will create a SCShareableContent object that is called on the supplied queue. The SCShareableContent will contain redacted information about windows, displays and applications that are available to capture by current process without user consent via TCC

GetCurrentProcessShareableContent blocks until the operation completes or ctx is cancelled.

func GetShareableContent added in v0.17.0

func GetShareableContent(ctx context.Context) (result *ShareableContent, err error)

GetShareableContent retrieves the displays, apps, and windows that your app can capture.

GetShareableContent blocks until the operation completes or ctx is cancelled.

func GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnly added in v0.17.0

func GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnly(ctx context.Context, excludeDesktopWindows bool, onScreenWindowsOnly bool) (result *ShareableContent, err error)

GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnly retrieves the displays, apps, and windows that match your criteria.

GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnly blocks until the operation completes or ctx is cancelled.

func GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindow added in v0.17.0

func GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindow(ctx context.Context, excludeDesktopWindows bool, window *Window) (result *ShareableContent, err error)

GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindow retrieves the displays, apps, and windows that are in front of the specified window.

GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyAboveWindow blocks until the operation completes or ctx is cancelled.

func GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindow added in v0.17.0

func GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindow(ctx context.Context, excludeDesktopWindows bool, window *Window) (result *ShareableContent, err error)

GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindow retrieves the displays, apps, and windows that are behind the specified window.

GetShareableContentExcludingDesktopWindowsOnScreenWindowsOnlyBelowWindow blocks until the operation completes or ctx is cancelled.

func NewShareableContent added in v0.17.0

func NewShareableContent() *ShareableContent

NewShareableContent creates a new ShareableContent.

func ShareableContentFromID added in v0.17.0

func ShareableContentFromID(id objc.ID) *ShareableContent

ShareableContentFromID adopts an existing Objective-C object as a ShareableContent (nil for 0), retaining it and registering a release finalizer.

func (*ShareableContent) Applications added in v0.17.0

func (sc *ShareableContent) Applications() []*RunningApplication

Applications returns applications SCShareableContent property that contains all the sharable SCRunningApplications

Applications returns the collection as a Go slice.

func (*ShareableContent) Description added in v0.17.0

func (sc *ShareableContent) Description() string

Description returns the object's -description text.

func (*ShareableContent) Displays added in v0.17.0

func (sc *ShareableContent) Displays() []*Display

Displays returns displays SCShareableContent property that contains all the sharable SCDisplays

Displays returns the collection as a Go slice.

func (*ShareableContent) IsEqual added in v0.17.0

func (sc *ShareableContent) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ShareableContent) IsKind added in v0.17.0

func (sc *ShareableContent) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ShareableContent) String added in v0.17.0

func (sc *ShareableContent) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ShareableContent) Windows added in v0.17.0

func (sc *ShareableContent) Windows() []*Window

Windows returns windows SCShareableContent property that contains all the sharable SCWindows

Windows returns the collection as a Go slice.

type ShareableContentInfo added in v0.17.0

type ShareableContentInfo struct {
	objref.Handle
}

ShareableContentInfo is an idiomatic wrapper over the Objective-C class SCShareableContentInfo.

An instance that provides information for the content in a given stream.

func InfoForFilter added in v0.17.0

func InfoForFilter(filter *ContentFilter) *ShareableContentInfo

InfoForFilter retrieves any available sharable content information that matches the provided filter.

func NewShareableContentInfo added in v0.17.0

func NewShareableContentInfo() *ShareableContentInfo

NewShareableContentInfo creates a new ShareableContentInfo.

func ShareableContentInfoFromID added in v0.17.0

func ShareableContentInfoFromID(id objc.ID) *ShareableContentInfo

ShareableContentInfoFromID adopts an existing Objective-C object as a ShareableContentInfo (nil for 0), retaining it and registering a release finalizer.

func (*ShareableContentInfo) ContentRect added in v0.17.0

func (sci *ShareableContentInfo) ContentRect() corefoundation.CGRect

ContentRect returns size and location of content in points

func (*ShareableContentInfo) Description added in v0.17.0

func (sci *ShareableContentInfo) Description() string

Description returns the object's -description text.

func (*ShareableContentInfo) IsEqual added in v0.17.0

func (sci *ShareableContentInfo) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ShareableContentInfo) IsKind added in v0.17.0

func (sci *ShareableContentInfo) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ShareableContentInfo) PointPixelScale added in v0.17.0

func (sci *ShareableContentInfo) PointPixelScale() float32

PointPixelScale returns pixel to points scaling factor

func (*ShareableContentInfo) String added in v0.17.0

func (sci *ShareableContentInfo) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ShareableContentInfo) Style added in v0.17.0

Style returns style of stream

type ShareableContentStyle added in v0.17.0

type ShareableContentStyle int64

The style of content presented in a stream.

const (
	// The stream isn’t currently presenting any content.
	ShareableContentStyleNone ShareableContentStyle = 0
	// The stream is currently presenting one or more windows.
	ShareableContentStyleWindow ShareableContentStyle = 1
	// The stream is currently presenting a complete display.
	ShareableContentStyleDisplay ShareableContentStyle = 2
	// The stream is currently presenting one or more applications.
	ShareableContentStyleApplication ShareableContentStyle = 3
)

func (ShareableContentStyle) String added in v0.17.0

func (e ShareableContentStyle) String() string

String returns the ShareableContentStyle constant's name, or its numeric form when the value is not a known constant.

type Stream added in v0.17.0

type Stream struct {
	objref.Handle
}

Stream is an idiomatic wrapper over the Objective-C class SCStream.

An instance that represents a stream of shareable content.

func NewStream added in v0.17.0

func NewStream() *Stream

NewStream creates a new Stream.

func StreamFromID added in v0.17.0

func StreamFromID(id objc.ID) *Stream

StreamFromID adopts an existing Objective-C object as a Stream (nil for 0), retaining it and registering a release finalizer.

func (*Stream) AddRecordingOutput added in v0.17.0

func (s *Stream) AddRecordingOutput(recordingOutput *RecordingOutput) error

AddRecordingOutput add a SCRecordingOutput to the SCStream. Starts Recording if stream is already capturing, otherwise recording will be started after capture starts. Recording will be written into a file url specified in SCRecordingOutput. Media(Screen/Audio/Microphone) to be recorded will be based on the SCStream configuration. Returns a BOOL denoting if the add was successful. Currently only support one recordingOutput on a stream. To guarantee the first sample captured in the stream to be written into the recording file, client need to add recordingOutput before startCapture. Delegate for recordingDidStart will be notified in SCRecordingOutput or recordingDidFinishWithError will be notified with an error associated if recording failed to start.

func (*Stream) Description added in v0.17.0

func (s *Stream) Description() string

Description returns the object's -description text.

func (*Stream) IsEqual added in v0.17.0

func (s *Stream) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Stream) IsKind added in v0.17.0

func (s *Stream) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Stream) RemoveRecordingOutput added in v0.17.0

func (s *Stream) RemoveRecordingOutput(recordingOutput *RecordingOutput) error

RemoveRecordingOutput remove SCRecordingOutput from the SCStream. Stops Recording if the stream is currently recording. Returns a BOOL denoting if the remove was successful. Delegate for recordingDidFinishWithError will be notified in SCRecordingOutput, associate with an error code if recording failed to finish written to the file. If stopCapture is called without removing recordingOutput, recording will be stopped and finish writting into the file. In case client update the stream configuration during recording, recording will be stopped as well.

func (*Stream) StartCapture added in v0.17.0

func (s *Stream) StartCapture(ctx context.Context) error

StartCapture starts the stream with a callback to indicate whether it successfully starts.

StartCapture blocks until the operation completes or ctx is cancelled.

func (*Stream) StopCapture added in v0.17.0

func (s *Stream) StopCapture(ctx context.Context) error

StopCapture stops the stream.

StopCapture blocks until the operation completes or ctx is cancelled.

func (*Stream) String added in v0.17.0

func (s *Stream) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Stream) SynchronizationClock added in v0.17.0

func (s *Stream) SynchronizationClock() obj.Object

SynchronizationClock returns synchronization clock used for media capture.

func (*Stream) UpdateConfiguration added in v0.17.0

func (s *Stream) UpdateConfiguration(ctx context.Context, streamConfig *StreamConfiguration) error

UpdateConfiguration updates the stream with a new configuration.

UpdateConfiguration blocks until the operation completes or ctx is cancelled.

func (*Stream) UpdateContentFilter added in v0.17.0

func (s *Stream) UpdateContentFilter(ctx context.Context, contentFilter *ContentFilter) error

UpdateContentFilter updates the stream by applying a new content filter.

UpdateContentFilter blocks until the operation completes or ctx is cancelled.

type StreamConfiguration added in v0.17.0

type StreamConfiguration struct {
	objref.Handle
}

StreamConfiguration is an idiomatic wrapper over the Objective-C class SCStreamConfiguration.

An instance that provides the output configuration for a stream.

func NewStreamConfiguration added in v0.17.0

func NewStreamConfiguration() *StreamConfiguration

NewStreamConfiguration creates a new StreamConfiguration.

func StreamConfigurationFromID added in v0.17.0

func StreamConfigurationFromID(id objc.ID) *StreamConfiguration

StreamConfigurationFromID adopts an existing Objective-C object as a StreamConfiguration (nil for 0), retaining it and registering a release finalizer.

func StreamConfigurationWithPreset added in v0.17.0

func StreamConfigurationWithPreset(preset StreamConfigurationPreset) *StreamConfiguration

StreamConfigurationWithPreset returns an instance of SCStreamConfiguration corresponding to the given preset The SCStreamConfiguration of the returned object can be used as a guide for creating and configuring an SCStream. If all the suggested properties are respected in creating the SCStream, the resulting capture result will conform to the criteria implied by the preset.

func (*StreamConfiguration) BackgroundColor added in v0.17.0

func (sc *StreamConfiguration) BackgroundColor() coregraphics.CGColorRef

BackgroundColor returns SCStreamProperty for background color. By default the background color is clear.

func (*StreamConfiguration) CaptureDynamicRange added in v0.17.0

func (sc *StreamConfiguration) CaptureDynamicRange() CaptureDynamicRange

CaptureDynamicRange returns SCStreamProperty client will choose captureDynamicRange between SCCaptureDynamicRangeSDR, SCCaptureDynamicRangeHDRLocalDisplay, SCCaptureDynamicRangeHDRCanonicalDisplay. By default, the stream is capturing with SCCaptureDynamicRangeSDR. HDR capture is only supported with Apple Silicon Mac, setting this property on Intel Mac will have no effect. HDR recording is not support yet, adding a recording output to a stream with SCCaptureDynamicRangeHDR set will fail.

func (*StreamConfiguration) CaptureMicrophone added in v0.17.0

func (sc *StreamConfiguration) CaptureMicrophone() bool

CaptureMicrophone reports whether SCStreamProperty that specifies whether the microphone audio will be captured. By default microphone is not captured.

func (*StreamConfiguration) CaptureResolution added in v0.17.0

func (sc *StreamConfiguration) CaptureResolution() CaptureResolutionType

CaptureResolution returns captureResolution Choose between automatic, best, and nominal.

func (*StreamConfiguration) CapturesAudio added in v0.17.0

func (sc *StreamConfiguration) CapturesAudio() bool

CapturesAudio reports whether SCStreamProperty that specifies whether the audio will be captured. By default audio is not captured.

func (*StreamConfiguration) CapturesShadowsOnly added in v0.17.0

func (sc *StreamConfiguration) CapturesShadowsOnly() bool

CapturesShadowsOnly reports whether SCStreamProperty to capture only the shadows of windows.

func (*StreamConfiguration) ChannelCount added in v0.17.0

func (sc *StreamConfiguration) ChannelCount() int

ChannelCount returns SCStreamProperty to specify channel count. Default is set to two.

func (*StreamConfiguration) ColorMatrix added in v0.17.0

ColorMatrix returns SCStreamProperty that specifies the YCbCr matrix applied to the output surface. The value must be one of the strings specified in https://developer.apple.com/documentation/coregraphics/quartz_display_services/display_stream_ycbcr_to_rgb_conversion_matrix_options. Should only be used if your pixel format is 420v or 420f.

func (*StreamConfiguration) ColorSpaceName added in v0.17.0

func (sc *StreamConfiguration) ColorSpaceName() corefoundation.CFStringRef

ColorSpaceName returns SCStreamProperty that specifies the color space of the output buffer. If not set the output buffer uses the same color space as the display. The value must be one of the strings specified in https://developer.apple.com/documentation/coregraphics/cgcolorspace/color_space_names.

func (*StreamConfiguration) Description added in v0.17.0

func (sc *StreamConfiguration) Description() string

Description returns the object's -description text.

func (*StreamConfiguration) DestinationRect added in v0.17.0

func (sc *StreamConfiguration) DestinationRect() corefoundation.CGRect

DestinationRect returns SCStreamProperty that specifies that the stream outputs the frame data into a subset of the output IOSurface object. For both display streams and independent window streams, if not set, then the entire output surface is used. The rectangle is specified in pixels in the display's coordinate system.

func (*StreamConfiguration) ExcludesCurrentProcessAudio added in v0.17.0

func (sc *StreamConfiguration) ExcludesCurrentProcessAudio() bool

ExcludesCurrentProcessAudio reports whether SCAudioProperty whether to exclude audio from current process. Default is set to false.

func (*StreamConfiguration) Height added in v0.17.0

func (sc *StreamConfiguration) Height() int

Height returns SCStreamProperty for output height as measured in pixels. Default is set to 1080.

func (*StreamConfiguration) IgnoreGlobalClipDisplay added in v0.17.0

func (sc *StreamConfiguration) IgnoreGlobalClipDisplay() bool

IgnoreGlobalClipDisplay reports whether SCStreamProperty to ignore framing on windows in the display sharing case (will ignore shadows).

func (*StreamConfiguration) IgnoreGlobalClipSingleWindow added in v0.17.0

func (sc *StreamConfiguration) IgnoreGlobalClipSingleWindow() bool

IgnoreGlobalClipSingleWindow reports whether SCStreamProperty to ignore global clipping when on single window share. When set to true, single window captures that are partially off the screen will not be clipped. (will ignore window placement in display context).

func (*StreamConfiguration) IgnoreShadowsDisplay added in v0.17.0

func (sc *StreamConfiguration) IgnoreShadowsDisplay() bool

IgnoreShadowsDisplay reports whether SCStreamProperty to ignore framing on windows in the display sharing case (will ignore shadows).

func (*StreamConfiguration) IgnoreShadowsSingleWindow added in v0.17.0

func (sc *StreamConfiguration) IgnoreShadowsSingleWindow() bool

IgnoreShadowsSingleWindow reports whether SCStreamProperty to ignore framing on windows in the single window sharing case (will ignore shadows).

func (*StreamConfiguration) IncludeChildWindows added in v0.17.0

func (sc *StreamConfiguration) IncludeChildWindows() bool

IncludeChildWindows reports whether SCStreamProperty to show the child windows in display bound windows and applications sharing. Child windows are included by default.

func (*StreamConfiguration) IsEqual added in v0.17.0

func (sc *StreamConfiguration) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*StreamConfiguration) IsKind added in v0.17.0

func (sc *StreamConfiguration) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*StreamConfiguration) MicrophoneCaptureDeviceID added in v0.17.0

func (sc *StreamConfiguration) MicrophoneCaptureDeviceID() string

MicrophoneCaptureDeviceID returns SCStreamProperty that specifies which microphone device to capture. This deviceID is the uniqueID from AVCaptureDevice for the microphone. System Default Microphone will be used if not specified by client. For Mac Catalyst apps, the System Default Microphone will be captured.

func (*StreamConfiguration) MinimumFrameInterval added in v0.17.0

func (sc *StreamConfiguration) MinimumFrameInterval() coremedia.CMTime

MinimumFrameInterval returns SCStreamProperty that specifies the desired minimum time in seconds between frame updates, allowing you to throttle the rate at which updates are received. The default value is 1/60, meaning that updates are coming in at or up to 60fps. Set this to kCMTimeZero to capture at display's native refresh rate.

func (*StreamConfiguration) PixelFormat added in v0.17.0

func (sc *StreamConfiguration) PixelFormat() int

PixelFormat returns SCStreamProperty for output pixel format. Supported pixel formats are: 'BGRA': Packed Little Endian ARGB8888 'l10r': Packed Little Endian ARGB2101010 '420v': 2-plane "video" range YCbCr 4:2:0 '420f': 2-plane "full" range YCbCr 4:2:0 'xf44': 2 plane "full" range YCbCr10 4:4:4 'RGhA': 64 bit RGBA IEEE half-precision float, 16-bit little-endian See https://developer.apple.com/documentation/coregraphics/1455170-cgdisplaystreamcreate

func (*StreamConfiguration) PresenterOverlayPrivacyAlertSetting added in v0.17.0

func (sc *StreamConfiguration) PresenterOverlayPrivacyAlertSetting() PresenterOverlayAlertSetting

PresenterOverlayPrivacyAlertSetting returns SCStreamProperty that informs the system if a privacy alert should be shown when using presenter overlay for a stream. Defaults to SCPresenterOverlayAlertSettingSystem;

func (*StreamConfiguration) PreservesAspectRatio added in v0.17.0

func (sc *StreamConfiguration) PreservesAspectRatio() bool

PreservesAspectRatio reports whether SCStreamProperty that specifies whether the stream preserves the aspect ratio of the source pixel data. By default the aspect ratio is preserved.

func (*StreamConfiguration) QueueDepth added in v0.17.0

func (sc *StreamConfiguration) QueueDepth() int

QueueDepth returns SCStreamProperty that specifies the number of frames to keep in the queue. If not set the default value is 8 frames. Specifying more frames uses more memory, but may allow you to process frame data without stalling the display stream and should not exceed 8 frames.

func (*StreamConfiguration) SampleRate added in v0.17.0

func (sc *StreamConfiguration) SampleRate() int

SampleRate returns SCStreamProperty to specify the sample rate for audio. Default is set to 48000.

func (*StreamConfiguration) ScalesToFit added in v0.17.0

func (sc *StreamConfiguration) ScalesToFit() bool

ScalesToFit reports whether SCStreamProperty for output to be always scaled to fit into the provided width and height. For use for independent window capture. When true, the output scales up and down. When false, the output only scales down.

func (*StreamConfiguration) ShouldBeOpaque added in v0.17.0

func (sc *StreamConfiguration) ShouldBeOpaque() bool

ShouldBeOpaque reports whether SCStreamProperty to ensure partially transparent areas on windows are backed by a solid white color so that the resulting image is fully opaque.

func (*StreamConfiguration) ShowMouseClicks added in v0.17.0

func (sc *StreamConfiguration) ShowMouseClicks() bool

ShowMouseClicks reports whether SCStreamProperty that specifies whether to draw a circle around the cursor click, default is false. This property will not be affected by showsCursor. This property currently applies when pixelFormat is set to BGRA.

func (*StreamConfiguration) ShowsCursor added in v0.17.0

func (sc *StreamConfiguration) ShowsCursor() bool

ShowsCursor reports whether SCStreamProperty that specifies whether the cursor should appear in the stream. By default the cursor is visible.

func (*StreamConfiguration) SourceRect added in v0.17.0

func (sc *StreamConfiguration) SourceRect() corefoundation.CGRect

SourceRect returns SCStreamProperty that specifies that the stream only samples a subset of the frame input. For display streams, if not set, then the entire display is streamed. For independent window streams, if not set, then the entire window is streamed. The rectangle is specified in points in the display’s logical coordinate system.

func (*StreamConfiguration) StreamName added in v0.17.0

func (sc *StreamConfiguration) StreamName() string

StreamName returns SCStreamProperty the name of the stream

func (*StreamConfiguration) String added in v0.17.0

func (sc *StreamConfiguration) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*StreamConfiguration) Width added in v0.17.0

func (sc *StreamConfiguration) Width() int

Width returns SCStreamProperty for output width as measured in pixels. Default is set to 1920.

func (*StreamConfiguration) WithBackgroundColor added in v0.17.0

func (sc *StreamConfiguration) WithBackgroundColor(backgroundColor coregraphics.CGColorRef) *StreamConfiguration

WithBackgroundColor sets a background color for the output.

func (*StreamConfiguration) WithCaptureDynamicRange added in v0.17.0

func (sc *StreamConfiguration) WithCaptureDynamicRange(captureDynamicRange CaptureDynamicRange) *StreamConfiguration

WithCaptureDynamicRange sets SCStreamProperty client will choose captureDynamicRange between SCCaptureDynamicRangeSDR, SCCaptureDynamicRangeHDRLocalDisplay, SCCaptureDynamicRangeHDRCanonicalDisplay. By default, the stream is capturing with SCCaptureDynamicRangeSDR. HDR capture is only supported with Apple Silicon Mac, setting this property on Intel Mac will have no effect. HDR recording is not support yet, adding a recording output to a stream with SCCaptureDynamicRangeHDR set will fail.

func (*StreamConfiguration) WithCaptureMicrophone added in v0.17.0

func (sc *StreamConfiguration) WithCaptureMicrophone(captureMicrophone bool) *StreamConfiguration

WithCaptureMicrophone sets SCStreamProperty that specifies whether the microphone audio will be captured. By default microphone is not captured.

func (*StreamConfiguration) WithCaptureResolution added in v0.17.0

func (sc *StreamConfiguration) WithCaptureResolution(captureResolution CaptureResolutionType) *StreamConfiguration

WithCaptureResolution sets the resolution at which to capture source content.

func (*StreamConfiguration) WithCapturesAudio added in v0.17.0

func (sc *StreamConfiguration) WithCapturesAudio(capturesAudio bool) *StreamConfiguration

WithCapturesAudio sets a Boolean value that indicates whether to capture audio.

func (*StreamConfiguration) WithCapturesShadowsOnly added in v0.17.0

func (sc *StreamConfiguration) WithCapturesShadowsOnly(capturesShadowsOnly bool) *StreamConfiguration

WithCapturesShadowsOnly sets a Boolean value that indicates if the stream only captures shadows.

func (*StreamConfiguration) WithChannelCount added in v0.17.0

func (sc *StreamConfiguration) WithChannelCount(channelCount int) *StreamConfiguration

WithChannelCount sets the number of audio channels to capture.

func (*StreamConfiguration) WithColorMatrix added in v0.17.0

func (sc *StreamConfiguration) WithColorMatrix(colorMatrix corefoundation.CFStringRef) *StreamConfiguration

WithColorMatrix sets a color matrix to apply to the output surface.

func (*StreamConfiguration) WithColorSpaceName added in v0.17.0

func (sc *StreamConfiguration) WithColorSpaceName(colorSpaceName corefoundation.CFStringRef) *StreamConfiguration

WithColorSpaceName sets a color space to use for the output buffer.

func (*StreamConfiguration) WithDestinationRect added in v0.17.0

func (sc *StreamConfiguration) WithDestinationRect(destinationRect corefoundation.CGRect) *StreamConfiguration

WithDestinationRect sets a rectangle that specifies a destination into which to write the output.

func (*StreamConfiguration) WithExcludesCurrentProcessAudio added in v0.17.0

func (sc *StreamConfiguration) WithExcludesCurrentProcessAudio(excludesCurrentProcessAudio bool) *StreamConfiguration

WithExcludesCurrentProcessAudio sets a Boolean value that indicates whether to exclude audio from your app during capture.

func (*StreamConfiguration) WithHeight added in v0.17.0

func (sc *StreamConfiguration) WithHeight(height int) *StreamConfiguration

WithHeight sets the height of the output.

func (*StreamConfiguration) WithIgnoreGlobalClipDisplay added in v0.17.0

func (sc *StreamConfiguration) WithIgnoreGlobalClipDisplay(ignoreGlobalClipDisplay bool) *StreamConfiguration

WithIgnoreGlobalClipDisplay sets a Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in display style.

func (*StreamConfiguration) WithIgnoreGlobalClipSingleWindow added in v0.17.0

func (sc *StreamConfiguration) WithIgnoreGlobalClipSingleWindow(ignoreGlobalClipSingleWindow bool) *StreamConfiguration

WithIgnoreGlobalClipSingleWindow sets a Boolean value that indicates if the stream ignores content clipped past the edge of a display, when streaming in window style.

func (*StreamConfiguration) WithIgnoreShadowsDisplay added in v0.17.0

func (sc *StreamConfiguration) WithIgnoreShadowsDisplay(ignoreShadowsDisplay bool) *StreamConfiguration

WithIgnoreShadowsDisplay sets a Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in display style.

func (*StreamConfiguration) WithIgnoreShadowsSingleWindow added in v0.17.0

func (sc *StreamConfiguration) WithIgnoreShadowsSingleWindow(ignoreShadowsSingleWindow bool) *StreamConfiguration

WithIgnoreShadowsSingleWindow sets a Boolean value that indicates if the stream ignores the capturing of window shadows when streaming in window style.

func (*StreamConfiguration) WithIncludeChildWindows added in v0.17.0

func (sc *StreamConfiguration) WithIncludeChildWindows(includeChildWindows bool) *StreamConfiguration

WithIncludeChildWindows sets SCStreamProperty to show the child windows in display bound windows and applications sharing. Child windows are included by default.

func (*StreamConfiguration) WithMicrophoneCaptureDeviceID added in v0.17.0

func (sc *StreamConfiguration) WithMicrophoneCaptureDeviceID(microphoneCaptureDeviceID string) *StreamConfiguration

WithMicrophoneCaptureDeviceID sets SCStreamProperty that specifies which microphone device to capture. This deviceID is the uniqueID from AVCaptureDevice for the microphone. System Default Microphone will be used if not specified by client. For Mac Catalyst apps, the System Default Microphone will be captured.

func (*StreamConfiguration) WithMinimumFrameInterval added in v0.17.0

func (sc *StreamConfiguration) WithMinimumFrameInterval(minimumFrameInterval coremedia.CMTime) *StreamConfiguration

WithMinimumFrameInterval sets the desired minimum time between frame updates, in seconds.

func (*StreamConfiguration) WithPixelFormat added in v0.17.0

func (sc *StreamConfiguration) WithPixelFormat(pixelFormat int) *StreamConfiguration

WithPixelFormat sets a pixel format for sample buffers that a stream outputs.

func (*StreamConfiguration) WithPresenterOverlayPrivacyAlertSetting added in v0.17.0

func (sc *StreamConfiguration) WithPresenterOverlayPrivacyAlertSetting(presenterOverlayPrivacyAlertSetting PresenterOverlayAlertSetting) *StreamConfiguration

WithPresenterOverlayPrivacyAlertSetting sets a value indicating if alerts appear to presenters while using Presenter Overlay.

func (*StreamConfiguration) WithPreservesAspectRatio added in v0.17.0

func (sc *StreamConfiguration) WithPreservesAspectRatio(preservesAspectRatio bool) *StreamConfiguration

WithPreservesAspectRatio sets a Boolean value that determines if the stream preserves aspect ratio.

func (*StreamConfiguration) WithQueueDepth added in v0.17.0

func (sc *StreamConfiguration) WithQueueDepth(queueDepth int) *StreamConfiguration

WithQueueDepth sets the maximum number of frames for the queue to store.

func (*StreamConfiguration) WithSampleRate added in v0.17.0

func (sc *StreamConfiguration) WithSampleRate(sampleRate int) *StreamConfiguration

WithSampleRate sets the sample rate for audio capture.

func (*StreamConfiguration) WithScalesToFit added in v0.17.0

func (sc *StreamConfiguration) WithScalesToFit(scalesToFit bool) *StreamConfiguration

WithScalesToFit sets a Boolean value that indicates whether to scale the output to fit the configured width and height.

func (*StreamConfiguration) WithShouldBeOpaque added in v0.17.0

func (sc *StreamConfiguration) WithShouldBeOpaque(shouldBeOpaque bool) *StreamConfiguration

WithShouldBeOpaque sets a Boolean value that indicates if semitransparent content presents as opaque.

func (*StreamConfiguration) WithShowMouseClicks added in v0.17.0

func (sc *StreamConfiguration) WithShowMouseClicks(showMouseClicks bool) *StreamConfiguration

WithShowMouseClicks sets SCStreamProperty that specifies whether to draw a circle around the cursor click, default is NO. This property will not be affected by showsCursor. This property currently applies when pixelFormat is set to BGRA.

func (*StreamConfiguration) WithShowsCursor added in v0.17.0

func (sc *StreamConfiguration) WithShowsCursor(showsCursor bool) *StreamConfiguration

WithShowsCursor sets a Boolean value that determines whether the cursor is visible in the stream.

func (*StreamConfiguration) WithSourceRect added in v0.17.0

func (sc *StreamConfiguration) WithSourceRect(sourceRect corefoundation.CGRect) *StreamConfiguration

WithSourceRect sets a rectangle that specifies the source area to capture.

func (*StreamConfiguration) WithStreamName added in v0.17.0

func (sc *StreamConfiguration) WithStreamName(streamName string) *StreamConfiguration

WithStreamName sets a name that you provide for identifying the stream.

func (*StreamConfiguration) WithWidth added in v0.17.0

func (sc *StreamConfiguration) WithWidth(width int) *StreamConfiguration

WithWidth sets the width of the output.

type StreamConfigurationPreset added in v0.17.0

type StreamConfigurationPreset int64
const (
	StreamConfigurationPresetCaptureHDRStreamLocalDisplay         StreamConfigurationPreset = 0
	StreamConfigurationPresetCaptureHDRStreamCanonicalDisplay     StreamConfigurationPreset = 1
	StreamConfigurationPresetCaptureHDRScreenshotLocalDisplay     StreamConfigurationPreset = 2
	StreamConfigurationPresetCaptureHDRScreenshotCanonicalDisplay StreamConfigurationPreset = 3
	StreamConfigurationPresetCaptureHDRRecordingPreservedSDRHDR10 StreamConfigurationPreset = 4
)

func (StreamConfigurationPreset) String added in v0.17.0

func (e StreamConfigurationPreset) String() string

String returns the StreamConfigurationPreset constant's name, or its numeric form when the value is not a known constant.

type StreamDelegate added in v0.17.0

type StreamDelegate interface {
}

StreamDelegate receives the callbacks of the Objective-C protocol SCStreamDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (StreamDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type StreamDelegateOutputVideoEffectDidStartForStreamHandler added in v0.17.0

type StreamDelegateOutputVideoEffectDidStartForStreamHandler interface {
	OutputVideoEffectDidStartForStream(stream *Stream)
}

StreamDelegateOutputVideoEffectDidStartForStreamHandler is the optional SCStreamDelegate method outputVideoEffectDidStartForStream:. Implement it on a StreamDelegate value to receive that callback; a value without it is simply never sent one.

type StreamDelegateOutputVideoEffectDidStopForStreamHandler added in v0.17.0

type StreamDelegateOutputVideoEffectDidStopForStreamHandler interface {
	OutputVideoEffectDidStopForStream(stream *Stream)
}

StreamDelegateOutputVideoEffectDidStopForStreamHandler is the optional SCStreamDelegate method outputVideoEffectDidStopForStream:. Implement it on a StreamDelegate value to receive that callback; a value without it is simply never sent one.

type StreamDelegateStreamDidBecomeActiveHandler added in v0.17.0

type StreamDelegateStreamDidBecomeActiveHandler interface {
	StreamDidBecomeActive(stream *Stream)
}

StreamDelegateStreamDidBecomeActiveHandler is the optional SCStreamDelegate method streamDidBecomeActive:. Implement it on a StreamDelegate value to receive that callback; a value without it is simply never sent one.

type StreamDelegateStreamDidBecomeInactiveHandler added in v0.17.0

type StreamDelegateStreamDidBecomeInactiveHandler interface {
	StreamDidBecomeInactive(stream *Stream)
}

StreamDelegateStreamDidBecomeInactiveHandler is the optional SCStreamDelegate method streamDidBecomeInactive:. Implement it on a StreamDelegate value to receive that callback; a value without it is simply never sent one.

type StreamDelegateStreamDidStopWithErrorHandler added in v0.17.0

type StreamDelegateStreamDidStopWithErrorHandler interface {
	StreamDidStopWithError(stream *Stream, err error)
}

StreamDelegateStreamDidStopWithErrorHandler is the optional SCStreamDelegate method stream:didStopWithError:. Implement it on a StreamDelegate value to receive that callback; a value without it is simply never sent one.

type StreamErrorCode added in v0.17.0

type StreamErrorCode int64

Codes for user cancellation events and errors that can occur in ScreenCaptureKit.

const (
	StreamErrorUserDeclined                           StreamErrorCode = -3801
	StreamErrorFailedToStart                          StreamErrorCode = -3802
	StreamErrorMissingEntitlements                    StreamErrorCode = -3803
	StreamErrorFailedApplicationConnectionInvalid     StreamErrorCode = -3804
	StreamErrorFailedApplicationConnectionInterrupted StreamErrorCode = -3805
	StreamErrorFailedNoMatchingApplicationContext     StreamErrorCode = -3806
	StreamErrorAttemptToStartStreamState              StreamErrorCode = -3807
	StreamErrorAttemptToStopStreamState               StreamErrorCode = -3808
	StreamErrorAttemptToUpdateFilterState             StreamErrorCode = -3809
	StreamErrorAttemptToConfigState                   StreamErrorCode = -3810
	StreamErrorInternalError                          StreamErrorCode = -3811
	StreamErrorInvalidParameter                       StreamErrorCode = -3812
	StreamErrorNoWindowList                           StreamErrorCode = -3813
	StreamErrorNoDisplayList                          StreamErrorCode = -3814
	StreamErrorNoCaptureSource                        StreamErrorCode = -3815
	StreamErrorRemovingStream                         StreamErrorCode = -3816
	StreamErrorUserStopped                            StreamErrorCode = -3817
	StreamErrorFailedToStartAudioCapture              StreamErrorCode = -3818
	StreamErrorFailedToStopAudioCapture               StreamErrorCode = -3819
	StreamErrorFailedToStartMicrophoneCapture         StreamErrorCode = -3820
	StreamErrorSystemStoppedStream                    StreamErrorCode = -3821
)

func (StreamErrorCode) String added in v0.17.0

func (e StreamErrorCode) String() string

String returns the StreamErrorCode constant's name, or its numeric form when the value is not a known constant.

type StreamOutput added in v0.17.0

type StreamOutput interface {
}

StreamOutput is the Go form of the Objective-C protocol SCStreamOutput.

type StreamOutputType added in v0.17.0

type StreamOutputType int64

Constants that represent output types for a stream frame.

const (
	// An output type that represents a screen capture sample buffer.
	StreamOutputTypeScreen StreamOutputType = 0
	// An output type that represents an audio capture sample buffer.
	StreamOutputTypeAudio      StreamOutputType = 1
	StreamOutputTypeMicrophone StreamOutputType = 2
)

func (StreamOutputType) String added in v0.17.0

func (e StreamOutputType) String() string

String returns the StreamOutputType constant's name, or its numeric form when the value is not a known constant.

type StreamType deprecated added in v0.17.0

type StreamType int64

The display type of the presented stream.

Deprecated: Use SCShareableContentStyle instead

const (
	// The stream is currently presented as a window.
	StreamTypeWindow StreamType = 0
	// The stream is currently on a complete display.
	StreamTypeDisplay StreamType = 1
)

func (StreamType) String added in v0.17.0

func (e StreamType) String() string

String returns the StreamType constant's name, or its numeric form when the value is not a known constant.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                   VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  VirtualMemoryGuardExceptionCode = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED               VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED            VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type Window added in v0.17.0

type Window struct {
	objref.Handle
}

Window is an idiomatic wrapper over the Objective-C class SCWindow.

An instance that represents an onscreen window.

func NewWindow added in v0.17.0

func NewWindow() *Window

NewWindow creates a new Window.

func WindowFromID added in v0.17.0

func WindowFromID(id objc.ID) *Window

WindowFromID adopts an existing Objective-C object as a Window (nil for 0), retaining it and registering a release finalizer.

func (*Window) Description added in v0.17.0

func (w *Window) Description() string

Description returns the object's -description text.

func (*Window) Frame added in v0.17.0

func (w *Window) Frame() corefoundation.CGRect

Frame returns frame the CGRect for the SCWindow

func (*Window) IsActive added in v0.17.0

func (w *Window) IsActive() bool

IsActive reports whether active the bool property denoting of the SCWindow is active. with Stage Manager, SCWindow can be offScreen and active

func (*Window) IsEqual added in v0.17.0

func (w *Window) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Window) IsKind added in v0.17.0

func (w *Window) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Window) IsOnScreen added in v0.17.0

func (w *Window) IsOnScreen() bool

IsOnScreen reports whether onScreen the bool property denoting of the SCWindow is on the screen

func (*Window) OwningApplication added in v0.17.0

func (w *Window) OwningApplication() *RunningApplication

OwningApplication returns owningApplication is the SCRunningApplication that owns this SCWindow

func (*Window) String added in v0.17.0

func (w *Window) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Window) Title added in v0.17.0

func (w *Window) Title() string

Title returns title the window title for the SCWindow

func (*Window) WindowID added in v0.17.0

func (w *Window) WindowID() uint32

WindowID returns windowID the CGWindowID for the SCWindow

func (*Window) WindowLayer added in v0.17.0

func (w *Window) WindowLayer() int

WindowLayer returns windowLayer the window layer for the SCWindow

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL