iosurface

package
v0.6.21 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2026 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package iosurface provides Go bindings for the IOSurface framework.

Share hardware-accelerated buffer data (framebuffers and textures) across multiple processes. Manage image memory more efficiently.

The IOSurface framework provides a framebuffer object suitable for sharing across process boundaries. It is commonly used to allow applications to move complex image decompression and draw logic into a separate process to enhance security.

Classes

  • IOSurface: Data type representing an IOSurface opaque object.
  • IOSurfaceRef: Data type representing an IOSurface opaque object.

Variables

Key Types

  • IOSurface - Data type representing an IOSurface opaque object.

Code generated from Apple documentation. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	// KIOSurfaceAllocSize is cFNumber of the total allocation size of the buffer including all planes.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceAllocSize
	KIOSurfaceAllocSize string
	// KIOSurfaceBytesPerElement is the total number of bytes in an element.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceBytesPerElement
	KIOSurfaceBytesPerElement string
	// KIOSurfaceBytesPerRow is the bytes per row of the buffer.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceBytesPerRow
	KIOSurfaceBytesPerRow string
	// KIOSurfaceCacheMode is the CPU cache mode to be used for the allocation.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceCacheMode
	KIOSurfaceCacheMode string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceColorSpace
	KIOSurfaceColorSpace string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceContentHeadroom
	KIOSurfaceContentHeadroom string
	// KIOSurfaceElementHeight is cFNumber for how many pixels high each element is.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceElementHeight
	KIOSurfaceElementHeight string
	// KIOSurfaceElementWidth is cFNumber for how many pixels wide each element is.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceElementWidth
	KIOSurfaceElementWidth string
	// KIOSurfaceHeight is the height of the IOSurface buffer in pixels.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceHeight
	KIOSurfaceHeight string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceICCProfile
	KIOSurfaceICCProfile string
	// KIOSurfaceIsGlobal is cFBoolean If true, the IOSurface may be looked up by any task in the system by its ID.
	//
	// Deprecated: Deprecated since macOS 10.11. Global surfaces are insecure
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceIsGlobal
	KIOSurfaceIsGlobal string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceName
	KIOSurfaceName string
	// KIOSurfaceOffset is the starting offset into the buffer.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceOffset
	KIOSurfaceOffset string
	// KIOSurfacePixelFormat is a 32-bit unsigned integer that stores the traditional macOS buffer format.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePixelFormat
	KIOSurfacePixelFormat string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePixelSizeCastingAllowed
	KIOSurfacePixelSizeCastingAllowed string
	// KIOSurfacePlaneBase is the base offset into the buffer for this plane.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneBase
	KIOSurfacePlaneBase string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneBitsPerElement
	KIOSurfacePlaneBitsPerElement string
	// KIOSurfacePlaneBytesPerElement is the bytes per element of this plane.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneBytesPerElement
	KIOSurfacePlaneBytesPerElement string
	// KIOSurfacePlaneBytesPerRow is the bytes per row of this plane.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneBytesPerRow
	KIOSurfacePlaneBytesPerRow string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneComponentBitDepths
	KIOSurfacePlaneComponentBitDepths string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneComponentBitOffsets
	KIOSurfacePlaneComponentBitOffsets string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneComponentNames
	KIOSurfacePlaneComponentNames string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneComponentRanges
	KIOSurfacePlaneComponentRanges string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneComponentTypes
	KIOSurfacePlaneComponentTypes string
	// KIOSurfacePlaneElementHeight is the element height of this plane.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneElementHeight
	KIOSurfacePlaneElementHeight string
	// KIOSurfacePlaneElementWidth is the element width of this plane.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneElementWidth
	KIOSurfacePlaneElementWidth string
	// KIOSurfacePlaneHeight is the height of this plane in pixels.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneHeight
	KIOSurfacePlaneHeight string
	// KIOSurfacePlaneInfo is cFArray describing each image plane in the buffer as a CFDictionary.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneInfo
	KIOSurfacePlaneInfo string
	// KIOSurfacePlaneOffset is the offset into the buffer for this plane.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneOffset
	KIOSurfacePlaneOffset string
	// KIOSurfacePlaneSize is the total data size of this plane.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneSize
	KIOSurfacePlaneSize string
	// KIOSurfacePlaneWidth is the width of this plane in pixels.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfacePlaneWidth
	KIOSurfacePlaneWidth string
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceSubsampling
	KIOSurfaceSubsampling string
	// KIOSurfaceWidth is the width of the IOSurface buffer in pixels.
	//
	// See: https://developer.apple.com/documentation/IOSurface/kIOSurfaceWidth
	KIOSurfaceWidth string
)
View Source
var (
	//
	// Deprecated: Deprecated since macOS 10.14.
	//
	// See: https://developer.apple.com/documentation/IOSurface/IOSurfacePropertyKey/allocSizeKey
	IOSurfacePropertyAllocSizeKey string
)
View Source
var IOSurfacePropertyKeys struct {
	AllocSize               IOSurfacePropertyKey
	BytesPerElement         IOSurfacePropertyKey
	BytesPerRow             IOSurfacePropertyKey
	CacheMode               IOSurfacePropertyKey
	ElementHeight           IOSurfacePropertyKey
	ElementWidth            IOSurfacePropertyKey
	Height                  IOSurfacePropertyKey
	Name                    IOSurfacePropertyKey
	Offset                  IOSurfacePropertyKey
	PixelFormat             IOSurfacePropertyKey
	PixelSizeCastingAllowed IOSurfacePropertyKey
	PlaneBase               IOSurfacePropertyKey
	PlaneBytesPerElement    IOSurfacePropertyKey
	PlaneBytesPerRow        IOSurfacePropertyKey
	PlaneElementHeight      IOSurfacePropertyKey
	PlaneElementWidth       IOSurfacePropertyKey
	PlaneHeight             IOSurfacePropertyKey
	PlaneInfo               IOSurfacePropertyKey
	PlaneOffset             IOSurfacePropertyKey
	PlaneSize               IOSurfacePropertyKey
	PlaneWidth              IOSurfacePropertyKey
	Width                   IOSurfacePropertyKey
}

IOSurfacePropertyKeys provides typed accessors for IOSurfacePropertyKey constants.

Functions

func BindFunc

func BindFunc(fptr any, name string) (err error)

BindFunc binds the IOSurface symbol name into fptr, which must be a pointer to a func variable.

The caller supplies the signature, and nothing checks it. A dylib records no argument count or types for a C symbol, so a wrong signature here is not a type error: it is the wrong number of machine words moved on a live stack, and the failure surfaces somewhere else entirely. Prefer a generated binding, whose signature carries recorded evidence, and reach for this only for a symbol that has none. purego.RegisterFunc panics on a signature it cannot lower; that is recovered and returned, because an escape hatch that takes down the process on a mistyped experiment is not one anybody can experiment with.

func IOSurfaceAlignProperty

func IOSurfaceAlignProperty(property corefoundation.CFStringRef, value uintptr) uintptr

IOSurfaceAlignProperty returns the smallest aligned value greater than or equal to the specified value.

It panics if IOSurfaceAlignProperty is unavailable at run time; use TryIOSurfaceAlignProperty to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceAlignProperty(_:_:)

func IOSurfaceAllowsPixelSizeCasting

func IOSurfaceAllowsPixelSizeCasting(buffer IOSurfaceRef) bool

IOSurfaceAllowsPixelSizeCasting.

It panics if IOSurfaceAllowsPixelSizeCasting is unavailable at run time; use TryIOSurfaceAllowsPixelSizeCasting to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceAllowsPixelSizeCasting(_:)

func IOSurfaceCopyAllValues

func IOSurfaceCopyAllValues(buffer IOSurfaceRef) corefoundation.CFDictionaryRef

IOSurfaceCopyAllValues.

It panics if IOSurfaceCopyAllValues is unavailable at run time; use TryIOSurfaceCopyAllValues to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceCopyAllValues(_:)

func IOSurfaceCopyValue

func IOSurfaceCopyValue(buffer IOSurfaceRef, key corefoundation.CFStringRef) corefoundation.CFTypeRef

IOSurfaceCopyValue retrieves a value from the dictionary associated with the buffer.

It panics if IOSurfaceCopyValue is unavailable at run time; use TryIOSurfaceCopyValue to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceCopyValue(_:_:)

func IOSurfaceCreateMachPort

func IOSurfaceCreateMachPort(buffer IOSurfaceRef) uint32

IOSurfaceCreateMachPort returns a mach_port_t that holds a reference to the IOSurface.

It panics if IOSurfaceCreateMachPort is unavailable at run time; use TryIOSurfaceCreateMachPort to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceCreateMachPort(_:)

func IOSurfaceCreateXPCObject

func IOSurfaceCreateXPCObject(aSurface IOSurfaceRef) xpc.Xpc_object_t

IOSurfaceCreateXPCObject returns an xpc_object_t that holds a reference to the IOSurface.

It panics if IOSurfaceCreateXPCObject is unavailable at run time; use TryIOSurfaceCreateXPCObject to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceCreateXPCObject(_:)

func IOSurfaceDecrementUseCount

func IOSurfaceDecrementUseCount(buffer IOSurfaceRef)

IOSurfaceDecrementUseCount decrements the per-process usage count for an IOSurface.

It panics if IOSurfaceDecrementUseCount is unavailable at run time; use TryIOSurfaceDecrementUseCount to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceDecrementUseCount(_:)

func IOSurfaceGetAllocSize

func IOSurfaceGetAllocSize(buffer IOSurfaceRef) uintptr

IOSurfaceGetAllocSize returns the total allocation size of the buffer including all planes.

It panics if IOSurfaceGetAllocSize is unavailable at run time; use TryIOSurfaceGetAllocSize to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetAllocSize(_:)

func IOSurfaceGetBaseAddress

func IOSurfaceGetBaseAddress(buffer IOSurfaceRef) unsafe.Pointer

IOSurfaceGetBaseAddress returns the address of the first byte of data in a particular buffer.

It panics if IOSurfaceGetBaseAddress is unavailable at run time; use TryIOSurfaceGetBaseAddress to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetBaseAddress(_:)

func IOSurfaceGetBaseAddressOfPlane

func IOSurfaceGetBaseAddressOfPlane(buffer IOSurfaceRef, planeIndex uintptr) unsafe.Pointer

IOSurfaceGetBaseAddressOfPlane returns the address of the first byte of data in the specified plane.

It panics if IOSurfaceGetBaseAddressOfPlane is unavailable at run time; use TryIOSurfaceGetBaseAddressOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetBaseAddressOfPlane(_:_:)

func IOSurfaceGetBitDepthOfComponentOfPlane

func IOSurfaceGetBitDepthOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) uintptr

IOSurfaceGetBitDepthOfComponentOfPlane.

It panics if IOSurfaceGetBitDepthOfComponentOfPlane is unavailable at run time; use TryIOSurfaceGetBitDepthOfComponentOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetBitDepthOfComponentOfPlane(_:_:_:)

func IOSurfaceGetBitOffsetOfComponentOfPlane

func IOSurfaceGetBitOffsetOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) uintptr

IOSurfaceGetBitOffsetOfComponentOfPlane.

It panics if IOSurfaceGetBitOffsetOfComponentOfPlane is unavailable at run time; use TryIOSurfaceGetBitOffsetOfComponentOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetBitOffsetOfComponentOfPlane(_:_:_:)

func IOSurfaceGetBytesPerElement

func IOSurfaceGetBytesPerElement(buffer IOSurfaceRef) uintptr

IOSurfaceGetBytesPerElement returns the length (in bytes) of each element in a particular buffer.

It panics if IOSurfaceGetBytesPerElement is unavailable at run time; use TryIOSurfaceGetBytesPerElement to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetBytesPerElement(_:)

func IOSurfaceGetBytesPerElementOfPlane

func IOSurfaceGetBytesPerElementOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr

IOSurfaceGetBytesPerElementOfPlane returns the size of each element (in bytes) in the specified plane.

It panics if IOSurfaceGetBytesPerElementOfPlane is unavailable at run time; use TryIOSurfaceGetBytesPerElementOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetBytesPerElementOfPlane(_:_:)

func IOSurfaceGetBytesPerRow

func IOSurfaceGetBytesPerRow(buffer IOSurfaceRef) uintptr

IOSurfaceGetBytesPerRow returns the length (in bytes) of each row in a particular buffer.

It panics if IOSurfaceGetBytesPerRow is unavailable at run time; use TryIOSurfaceGetBytesPerRow to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetBytesPerRow(_:)

func IOSurfaceGetBytesPerRowOfPlane

func IOSurfaceGetBytesPerRowOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr

IOSurfaceGetBytesPerRowOfPlane returns the size of each row (in bytes) in the specified plane.

It panics if IOSurfaceGetBytesPerRowOfPlane is unavailable at run time; use TryIOSurfaceGetBytesPerRowOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetBytesPerRowOfPlane(_:_:)

func IOSurfaceGetElementHeight

func IOSurfaceGetElementHeight(buffer IOSurfaceRef) uintptr

IOSurfaceGetElementHeight returns the height (in pixels) of each element in a particular buffer.

It panics if IOSurfaceGetElementHeight is unavailable at run time; use TryIOSurfaceGetElementHeight to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetElementHeight(_:)

func IOSurfaceGetElementHeightOfPlane

func IOSurfaceGetElementHeightOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr

IOSurfaceGetElementHeightOfPlane returns the height (in pixels) of each element in the specified plane.

It panics if IOSurfaceGetElementHeightOfPlane is unavailable at run time; use TryIOSurfaceGetElementHeightOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetElementHeightOfPlane(_:_:)

func IOSurfaceGetElementWidth

func IOSurfaceGetElementWidth(buffer IOSurfaceRef) uintptr

IOSurfaceGetElementWidth returns the width (in pixels) of each element in a particular buffer.

It panics if IOSurfaceGetElementWidth is unavailable at run time; use TryIOSurfaceGetElementWidth to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetElementWidth(_:)

func IOSurfaceGetElementWidthOfPlane

func IOSurfaceGetElementWidthOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr

IOSurfaceGetElementWidthOfPlane returns the width (in pixels) of each element in the specified plane.

It panics if IOSurfaceGetElementWidthOfPlane is unavailable at run time; use TryIOSurfaceGetElementWidthOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetElementWidthOfPlane(_:_:)

func IOSurfaceGetHeight

func IOSurfaceGetHeight(buffer IOSurfaceRef) uintptr

IOSurfaceGetHeight returns the height of the IOSurface buffer in pixels.

It panics if IOSurfaceGetHeight is unavailable at run time; use TryIOSurfaceGetHeight to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetHeight(_:)

func IOSurfaceGetHeightOfPlane

func IOSurfaceGetHeightOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr

IOSurfaceGetHeightOfPlane returns the height of the specified plane (in pixels).

It panics if IOSurfaceGetHeightOfPlane is unavailable at run time; use TryIOSurfaceGetHeightOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetHeightOfPlane(_:_:)

func IOSurfaceGetID

func IOSurfaceGetID(buffer IOSurfaceRef) uint32

IOSurfaceGetID retrieves the unique IOSurfaceID value for an IOSurface.

It panics if IOSurfaceGetID is unavailable at run time; use TryIOSurfaceGetID to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetID(_:)

func IOSurfaceGetNumberOfComponentsOfPlane

func IOSurfaceGetNumberOfComponentsOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr

IOSurfaceGetNumberOfComponentsOfPlane.

It panics if IOSurfaceGetNumberOfComponentsOfPlane is unavailable at run time; use TryIOSurfaceGetNumberOfComponentsOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetNumberOfComponentsOfPlane(_:_:)

func IOSurfaceGetPixelFormat

func IOSurfaceGetPixelFormat(buffer IOSurfaceRef) uint32

IOSurfaceGetPixelFormat returns an unsigned integer that contains the traditional macOS buffer format.

It panics if IOSurfaceGetPixelFormat is unavailable at run time; use TryIOSurfaceGetPixelFormat to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetPixelFormat(_:)

func IOSurfaceGetPlaneCount

func IOSurfaceGetPlaneCount(buffer IOSurfaceRef) uintptr

IOSurfaceGetPlaneCount.

It panics if IOSurfaceGetPlaneCount is unavailable at run time; use TryIOSurfaceGetPlaneCount to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetPlaneCount(_:)

func IOSurfaceGetPropertyAlignment

func IOSurfaceGetPropertyAlignment(property corefoundation.CFStringRef) uintptr

IOSurfaceGetPropertyAlignment returns the alignment requirements for a property (if any).

It panics if IOSurfaceGetPropertyAlignment is unavailable at run time; use TryIOSurfaceGetPropertyAlignment to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetPropertyAlignment(_:)

func IOSurfaceGetPropertyMaximum

func IOSurfaceGetPropertyMaximum(property corefoundation.CFStringRef) uintptr

IOSurfaceGetPropertyMaximum returns the maximum value for a given property that is guaranteed to be compatible with all of the current devices (GPUs, etc.) in the system.

It panics if IOSurfaceGetPropertyMaximum is unavailable at run time; use TryIOSurfaceGetPropertyMaximum to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetPropertyMaximum(_:)

func IOSurfaceGetSeed

func IOSurfaceGetSeed(buffer IOSurfaceRef) uint32

IOSurfaceGetSeed.

It panics if IOSurfaceGetSeed is unavailable at run time; use TryIOSurfaceGetSeed to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetSeed(_:)

func IOSurfaceGetTypeID

func IOSurfaceGetTypeID() uint

IOSurfaceGetTypeID.

It panics if IOSurfaceGetTypeID is unavailable at run time; use TryIOSurfaceGetTypeID to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetTypeID()

func IOSurfaceGetUseCount

func IOSurfaceGetUseCount(buffer IOSurfaceRef) int32

IOSurfaceGetUseCount returns the per-process usage count for an IOSurface.

It panics if IOSurfaceGetUseCount is unavailable at run time; use TryIOSurfaceGetUseCount to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetUseCount(_:)

func IOSurfaceGetWidth

func IOSurfaceGetWidth(buffer IOSurfaceRef) uintptr

IOSurfaceGetWidth returns the width of the IOSurface buffer in pixels.

It panics if IOSurfaceGetWidth is unavailable at run time; use TryIOSurfaceGetWidth to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetWidth(_:)

func IOSurfaceGetWidthOfPlane

func IOSurfaceGetWidthOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr

IOSurfaceGetWidthOfPlane returns the width of the specified plane (in pixels).

It panics if IOSurfaceGetWidthOfPlane is unavailable at run time; use TryIOSurfaceGetWidthOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetWidthOfPlane(_:_:)

func IOSurfaceIncrementUseCount

func IOSurfaceIncrementUseCount(buffer IOSurfaceRef)

IOSurfaceIncrementUseCount increments the per-process usage count for an IOSurface.

It panics if IOSurfaceIncrementUseCount is unavailable at run time; use TryIOSurfaceIncrementUseCount to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceIncrementUseCount(_:)

func IOSurfaceIsInUse

func IOSurfaceIsInUse(buffer IOSurfaceRef) bool

IOSurfaceIsInUse returns true of an IOSurface is in use by any process in the system, otherwise false.

It panics if IOSurfaceIsInUse is unavailable at run time; use TryIOSurfaceIsInUse to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceIsInUse(_:)

func IOSurfaceLock

func IOSurfaceLock(buffer IOSurfaceRef, options IOSurfaceLockOptions, seed *uint32) int32

IOSurfaceLock “Lock” an IOSurface for reading or writing.

It panics if IOSurfaceLock is unavailable at run time; use TryIOSurfaceLock to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceLock(_:_:_:)

func IOSurfaceRemoveAllValues

func IOSurfaceRemoveAllValues(buffer IOSurfaceRef)

IOSurfaceRemoveAllValues.

It panics if IOSurfaceRemoveAllValues is unavailable at run time; use TryIOSurfaceRemoveAllValues to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceRemoveAllValues(_:)

func IOSurfaceRemoveValue

func IOSurfaceRemoveValue(buffer IOSurfaceRef, key corefoundation.CFStringRef)

IOSurfaceRemoveValue deletes a value in the dictionary associated with the buffer.

It panics if IOSurfaceRemoveValue is unavailable at run time; use TryIOSurfaceRemoveValue to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceRemoveValue(_:_:)

func IOSurfaceSetOwnershipIdentity added in v0.2.0

func IOSurfaceSetOwnershipIdentity(buffer IOSurfaceRef, task_id_token kernel.Task_id_token_t, newLedgerTag int32, newLedgerOptions uint32) int32

IOSurfaceSetOwnershipIdentity.

It panics if IOSurfaceSetOwnershipIdentity is unavailable at run time; use TryIOSurfaceSetOwnershipIdentity to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceSetOwnershipIdentity(_:_:_:_:)

func IOSurfaceSetPurgeable

func IOSurfaceSetPurgeable(buffer IOSurfaceRef, newState uint32, oldState *uint32) int32

IOSurfaceSetPurgeable.

It panics if IOSurfaceSetPurgeable is unavailable at run time; use TryIOSurfaceSetPurgeable to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceSetPurgeable(_:_:_:)

func IOSurfaceSetValue

func IOSurfaceSetValue(buffer IOSurfaceRef, key corefoundation.CFStringRef, value corefoundation.CFTypeRef)

IOSurfaceSetValue sets a value in the dictionary associated with the buffer.

It panics if IOSurfaceSetValue is unavailable at run time; use TryIOSurfaceSetValue to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceSetValue(_:_:_:)

func IOSurfaceSetValues

func IOSurfaceSetValues(buffer IOSurfaceRef, keysAndValues corefoundation.CFDictionaryRef)

IOSurfaceSetValues.

It panics if IOSurfaceSetValues is unavailable at run time; use TryIOSurfaceSetValues to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceSetValues(_:_:)

func IOSurfaceUnlock

func IOSurfaceUnlock(buffer IOSurfaceRef, options IOSurfaceLockOptions, seed *uint32) int32

IOSurfaceUnlock “Unlock” an IOSurface for reading or writing.

It panics if IOSurfaceUnlock is unavailable at run time; use TryIOSurfaceUnlock to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceUnlock(_:_:_:)

func SymbolAddress

func SymbolAddress(name string) (uintptr, error)

SymbolAddress returns the address of name in IOSurface, whether or not this package generated a binding for it.

What is generated is bounded by what is documented, and for a private framework that is whatever a manifest happened to enumerate. The dylib usually exports far more. Without this, a symbol nobody wrote down is unreachable from a package that has already loaded the image holding it, and the generated surface becomes a ceiling instead of a floor.

The lookup is scoped to this framework's handle, not RTLD_DEFAULT, so a symbol some other loaded image exports is not reported as this one's.

func TryIOSurfaceAlignProperty

func TryIOSurfaceAlignProperty(property corefoundation.CFStringRef, value uintptr) (uintptr, error)

TryIOSurfaceAlignProperty is like IOSurfaceAlignProperty but returns an error instead of panicking if IOSurfaceAlignProperty is unavailable at run time.

func TryIOSurfaceAllowsPixelSizeCasting

func TryIOSurfaceAllowsPixelSizeCasting(buffer IOSurfaceRef) (bool, error)

TryIOSurfaceAllowsPixelSizeCasting is like IOSurfaceAllowsPixelSizeCasting but returns an error instead of panicking if IOSurfaceAllowsPixelSizeCasting is unavailable at run time.

func TryIOSurfaceCopyAllValues

func TryIOSurfaceCopyAllValues(buffer IOSurfaceRef) (corefoundation.CFDictionaryRef, error)

TryIOSurfaceCopyAllValues is like IOSurfaceCopyAllValues but returns an error instead of panicking if IOSurfaceCopyAllValues is unavailable at run time.

func TryIOSurfaceCopyValue

func TryIOSurfaceCopyValue(buffer IOSurfaceRef, key corefoundation.CFStringRef) (corefoundation.CFTypeRef, error)

TryIOSurfaceCopyValue is like IOSurfaceCopyValue but returns an error instead of panicking if IOSurfaceCopyValue is unavailable at run time.

func TryIOSurfaceCreateMachPort

func TryIOSurfaceCreateMachPort(buffer IOSurfaceRef) (uint32, error)

TryIOSurfaceCreateMachPort is like IOSurfaceCreateMachPort but returns an error instead of panicking if IOSurfaceCreateMachPort is unavailable at run time.

func TryIOSurfaceCreateXPCObject

func TryIOSurfaceCreateXPCObject(aSurface IOSurfaceRef) (xpc.Xpc_object_t, error)

TryIOSurfaceCreateXPCObject is like IOSurfaceCreateXPCObject but returns an error instead of panicking if IOSurfaceCreateXPCObject is unavailable at run time.

func TryIOSurfaceDecrementUseCount

func TryIOSurfaceDecrementUseCount(buffer IOSurfaceRef) error

TryIOSurfaceDecrementUseCount is like IOSurfaceDecrementUseCount but returns an error instead of panicking if IOSurfaceDecrementUseCount is unavailable at run time.

func TryIOSurfaceGetAllocSize

func TryIOSurfaceGetAllocSize(buffer IOSurfaceRef) (uintptr, error)

TryIOSurfaceGetAllocSize is like IOSurfaceGetAllocSize but returns an error instead of panicking if IOSurfaceGetAllocSize is unavailable at run time.

func TryIOSurfaceGetBaseAddress

func TryIOSurfaceGetBaseAddress(buffer IOSurfaceRef) (unsafe.Pointer, error)

TryIOSurfaceGetBaseAddress is like IOSurfaceGetBaseAddress but returns an error instead of panicking if IOSurfaceGetBaseAddress is unavailable at run time.

func TryIOSurfaceGetBaseAddressOfPlane

func TryIOSurfaceGetBaseAddressOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (unsafe.Pointer, error)

TryIOSurfaceGetBaseAddressOfPlane is like IOSurfaceGetBaseAddressOfPlane but returns an error instead of panicking if IOSurfaceGetBaseAddressOfPlane is unavailable at run time.

func TryIOSurfaceGetBitDepthOfComponentOfPlane

func TryIOSurfaceGetBitDepthOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) (uintptr, error)

TryIOSurfaceGetBitDepthOfComponentOfPlane is like IOSurfaceGetBitDepthOfComponentOfPlane but returns an error instead of panicking if IOSurfaceGetBitDepthOfComponentOfPlane is unavailable at run time.

func TryIOSurfaceGetBitOffsetOfComponentOfPlane

func TryIOSurfaceGetBitOffsetOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) (uintptr, error)

TryIOSurfaceGetBitOffsetOfComponentOfPlane is like IOSurfaceGetBitOffsetOfComponentOfPlane but returns an error instead of panicking if IOSurfaceGetBitOffsetOfComponentOfPlane is unavailable at run time.

func TryIOSurfaceGetBytesPerElement

func TryIOSurfaceGetBytesPerElement(buffer IOSurfaceRef) (uintptr, error)

TryIOSurfaceGetBytesPerElement is like IOSurfaceGetBytesPerElement but returns an error instead of panicking if IOSurfaceGetBytesPerElement is unavailable at run time.

func TryIOSurfaceGetBytesPerElementOfPlane

func TryIOSurfaceGetBytesPerElementOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)

TryIOSurfaceGetBytesPerElementOfPlane is like IOSurfaceGetBytesPerElementOfPlane but returns an error instead of panicking if IOSurfaceGetBytesPerElementOfPlane is unavailable at run time.

func TryIOSurfaceGetBytesPerRow

func TryIOSurfaceGetBytesPerRow(buffer IOSurfaceRef) (uintptr, error)

TryIOSurfaceGetBytesPerRow is like IOSurfaceGetBytesPerRow but returns an error instead of panicking if IOSurfaceGetBytesPerRow is unavailable at run time.

func TryIOSurfaceGetBytesPerRowOfPlane

func TryIOSurfaceGetBytesPerRowOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)

TryIOSurfaceGetBytesPerRowOfPlane is like IOSurfaceGetBytesPerRowOfPlane but returns an error instead of panicking if IOSurfaceGetBytesPerRowOfPlane is unavailable at run time.

func TryIOSurfaceGetElementHeight

func TryIOSurfaceGetElementHeight(buffer IOSurfaceRef) (uintptr, error)

TryIOSurfaceGetElementHeight is like IOSurfaceGetElementHeight but returns an error instead of panicking if IOSurfaceGetElementHeight is unavailable at run time.

func TryIOSurfaceGetElementHeightOfPlane

func TryIOSurfaceGetElementHeightOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)

TryIOSurfaceGetElementHeightOfPlane is like IOSurfaceGetElementHeightOfPlane but returns an error instead of panicking if IOSurfaceGetElementHeightOfPlane is unavailable at run time.

func TryIOSurfaceGetElementWidth

func TryIOSurfaceGetElementWidth(buffer IOSurfaceRef) (uintptr, error)

TryIOSurfaceGetElementWidth is like IOSurfaceGetElementWidth but returns an error instead of panicking if IOSurfaceGetElementWidth is unavailable at run time.

func TryIOSurfaceGetElementWidthOfPlane

func TryIOSurfaceGetElementWidthOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)

TryIOSurfaceGetElementWidthOfPlane is like IOSurfaceGetElementWidthOfPlane but returns an error instead of panicking if IOSurfaceGetElementWidthOfPlane is unavailable at run time.

func TryIOSurfaceGetHeight

func TryIOSurfaceGetHeight(buffer IOSurfaceRef) (uintptr, error)

TryIOSurfaceGetHeight is like IOSurfaceGetHeight but returns an error instead of panicking if IOSurfaceGetHeight is unavailable at run time.

func TryIOSurfaceGetHeightOfPlane

func TryIOSurfaceGetHeightOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)

TryIOSurfaceGetHeightOfPlane is like IOSurfaceGetHeightOfPlane but returns an error instead of panicking if IOSurfaceGetHeightOfPlane is unavailable at run time.

func TryIOSurfaceGetID

func TryIOSurfaceGetID(buffer IOSurfaceRef) (uint32, error)

TryIOSurfaceGetID is like IOSurfaceGetID but returns an error instead of panicking if IOSurfaceGetID is unavailable at run time.

func TryIOSurfaceGetNumberOfComponentsOfPlane

func TryIOSurfaceGetNumberOfComponentsOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)

TryIOSurfaceGetNumberOfComponentsOfPlane is like IOSurfaceGetNumberOfComponentsOfPlane but returns an error instead of panicking if IOSurfaceGetNumberOfComponentsOfPlane is unavailable at run time.

func TryIOSurfaceGetPixelFormat

func TryIOSurfaceGetPixelFormat(buffer IOSurfaceRef) (uint32, error)

TryIOSurfaceGetPixelFormat is like IOSurfaceGetPixelFormat but returns an error instead of panicking if IOSurfaceGetPixelFormat is unavailable at run time.

func TryIOSurfaceGetPlaneCount

func TryIOSurfaceGetPlaneCount(buffer IOSurfaceRef) (uintptr, error)

TryIOSurfaceGetPlaneCount is like IOSurfaceGetPlaneCount but returns an error instead of panicking if IOSurfaceGetPlaneCount is unavailable at run time.

func TryIOSurfaceGetPropertyAlignment

func TryIOSurfaceGetPropertyAlignment(property corefoundation.CFStringRef) (uintptr, error)

TryIOSurfaceGetPropertyAlignment is like IOSurfaceGetPropertyAlignment but returns an error instead of panicking if IOSurfaceGetPropertyAlignment is unavailable at run time.

func TryIOSurfaceGetPropertyMaximum

func TryIOSurfaceGetPropertyMaximum(property corefoundation.CFStringRef) (uintptr, error)

TryIOSurfaceGetPropertyMaximum is like IOSurfaceGetPropertyMaximum but returns an error instead of panicking if IOSurfaceGetPropertyMaximum is unavailable at run time.

func TryIOSurfaceGetSeed

func TryIOSurfaceGetSeed(buffer IOSurfaceRef) (uint32, error)

TryIOSurfaceGetSeed is like IOSurfaceGetSeed but returns an error instead of panicking if IOSurfaceGetSeed is unavailable at run time.

func TryIOSurfaceGetTypeID

func TryIOSurfaceGetTypeID() (uint, error)

TryIOSurfaceGetTypeID is like IOSurfaceGetTypeID but returns an error instead of panicking if IOSurfaceGetTypeID is unavailable at run time.

func TryIOSurfaceGetUseCount

func TryIOSurfaceGetUseCount(buffer IOSurfaceRef) (int32, error)

TryIOSurfaceGetUseCount is like IOSurfaceGetUseCount but returns an error instead of panicking if IOSurfaceGetUseCount is unavailable at run time.

func TryIOSurfaceGetWidth

func TryIOSurfaceGetWidth(buffer IOSurfaceRef) (uintptr, error)

TryIOSurfaceGetWidth is like IOSurfaceGetWidth but returns an error instead of panicking if IOSurfaceGetWidth is unavailable at run time.

func TryIOSurfaceGetWidthOfPlane

func TryIOSurfaceGetWidthOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)

TryIOSurfaceGetWidthOfPlane is like IOSurfaceGetWidthOfPlane but returns an error instead of panicking if IOSurfaceGetWidthOfPlane is unavailable at run time.

func TryIOSurfaceIncrementUseCount

func TryIOSurfaceIncrementUseCount(buffer IOSurfaceRef) error

TryIOSurfaceIncrementUseCount is like IOSurfaceIncrementUseCount but returns an error instead of panicking if IOSurfaceIncrementUseCount is unavailable at run time.

func TryIOSurfaceIsInUse

func TryIOSurfaceIsInUse(buffer IOSurfaceRef) (bool, error)

TryIOSurfaceIsInUse is like IOSurfaceIsInUse but returns an error instead of panicking if IOSurfaceIsInUse is unavailable at run time.

func TryIOSurfaceLock

func TryIOSurfaceLock(buffer IOSurfaceRef, options IOSurfaceLockOptions, seed *uint32) (int32, error)

TryIOSurfaceLock is like IOSurfaceLock but returns an error instead of panicking if IOSurfaceLock is unavailable at run time.

func TryIOSurfaceRemoveAllValues

func TryIOSurfaceRemoveAllValues(buffer IOSurfaceRef) error

TryIOSurfaceRemoveAllValues is like IOSurfaceRemoveAllValues but returns an error instead of panicking if IOSurfaceRemoveAllValues is unavailable at run time.

func TryIOSurfaceRemoveValue

func TryIOSurfaceRemoveValue(buffer IOSurfaceRef, key corefoundation.CFStringRef) error

TryIOSurfaceRemoveValue is like IOSurfaceRemoveValue but returns an error instead of panicking if IOSurfaceRemoveValue is unavailable at run time.

func TryIOSurfaceSetOwnershipIdentity

func TryIOSurfaceSetOwnershipIdentity(buffer IOSurfaceRef, task_id_token kernel.Task_id_token_t, newLedgerTag int32, newLedgerOptions uint32) (int32, error)

TryIOSurfaceSetOwnershipIdentity is like IOSurfaceSetOwnershipIdentity but returns an error instead of panicking if IOSurfaceSetOwnershipIdentity is unavailable at run time.

func TryIOSurfaceSetPurgeable

func TryIOSurfaceSetPurgeable(buffer IOSurfaceRef, newState uint32, oldState *uint32) (int32, error)

TryIOSurfaceSetPurgeable is like IOSurfaceSetPurgeable but returns an error instead of panicking if IOSurfaceSetPurgeable is unavailable at run time.

func TryIOSurfaceSetValue

func TryIOSurfaceSetValue(buffer IOSurfaceRef, key corefoundation.CFStringRef, value corefoundation.CFTypeRef) error

TryIOSurfaceSetValue is like IOSurfaceSetValue but returns an error instead of panicking if IOSurfaceSetValue is unavailable at run time.

func TryIOSurfaceSetValues

func TryIOSurfaceSetValues(buffer IOSurfaceRef, keysAndValues corefoundation.CFDictionaryRef) error

TryIOSurfaceSetValues is like IOSurfaceSetValues but returns an error instead of panicking if IOSurfaceSetValues is unavailable at run time.

func TryIOSurfaceUnlock

func TryIOSurfaceUnlock(buffer IOSurfaceRef, options IOSurfaceLockOptions, seed *uint32) (int32, error)

TryIOSurfaceUnlock is like IOSurfaceUnlock but returns an error instead of panicking if IOSurfaceUnlock is unavailable at run time.

Types

type IIOSurface

type IIOSurface interface {
	objectivec.IObject

	InitWithProperties(properties foundation.INSDictionary) IOSurface

	AllocationSize() int
	AllowsPixelSizeCasting() bool
	BaseAddress() unsafe.Pointer
	BytesPerElement() int
	BytesPerRow() int
	ElementHeight() int
	ElementWidth() int
	Height() int
	IsInUse() bool
	LocalUseCount() int32
	PixelFormat() uint32
	PlaneCount() uint
	Seed() uint32
	Width() int
	SurfaceID() uint32

	AllAttachments() foundation.INSDictionary
	AttachmentForKey(key string) objectivec.IObject
	BaseAddressOfPlaneAtIndex(planeIndex uint) unsafe.Pointer
	BytesPerElementOfPlaneAtIndex(planeIndex uint) int
	BytesPerRowOfPlaneAtIndex(planeIndex uint) int
	DecrementUseCount()
	ElementHeightOfPlaneAtIndex(planeIndex uint) int
	ElementWidthOfPlaneAtIndex(planeIndex uint) int
	HeightOfPlaneAtIndex(planeIndex uint) int
	IncrementUseCount()
	LockWithOptionsSeed(options IOSurfaceLockOptions, seed *uint32) int32
	RemoveAllAttachments()
	RemoveAttachmentForKey(key string)
	SetAllAttachments(dict foundation.INSDictionary)
	SetAttachmentForKey(anObject objectivec.IObject, key string)
	SetPurgeableOldState(newState IOSurfacePurgeabilityState, oldState *IOSurfacePurgeabilityState) int32
	UnlockWithOptionsSeed(options IOSurfaceLockOptions, seed *uint32) int32
	WidthOfPlaneAtIndex(planeIndex uint) int

	InitWithCoder(coder foundation.INSCoder) IOSurface
	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the IOSurface class.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/IOSurface/IOSurface

type IIOSurfaceSharedEvent

type IIOSurfaceSharedEvent interface {
	objectivec.IObject
	InitWithOptions(options uint64) IOSurfaceSharedEvent
	InitWithMachPort(port uint32) IOSurfaceSharedEvent
	EventPort() uint32
}

IIOSurfaceSharedEvent is the minimal interface surface needed by callers.

type IOSurface

type IOSurface struct {
	objectivec.Object
}

Data type representing an IOSurface opaque object.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/IOSurface/IOSurface

func IOSurfaceFromID

func IOSurfaceFromID(id objc.ID) IOSurface

IOSurfaceFromID constructs a IOSurface from an objc.ID.

Data type representing an IOSurface opaque object.

func NewIOSurface

func NewIOSurface() IOSurface

NewIOSurface creates a new IOSurface instance.

func NewSurface deprecated

func NewSurface() IOSurface

Deprecated: Use NewIOSurface instead.

func NewSurfaceWithCoder deprecated added in v0.6.10

func NewSurfaceWithCoder(coder foundation.INSCoder) IOSurface

Deprecated: Use NewIOSurfaceWithCoder instead.

func NewSurfaceWithProperties deprecated

func NewSurfaceWithProperties(properties foundation.INSDictionary) IOSurface

Deprecated: Use NewIOSurfaceWithProperties instead.

func (IOSurface) Autorelease

func (s IOSurface) Autorelease() IOSurface

Autorelease adds the receiver to the current autorelease pool.

func (IOSurface) EncodeWithCoder

func (s IOSurface) EncodeWithCoder(coder foundation.INSCoder)

func (IOSurface) Init

func (s IOSurface) Init() IOSurface

Init initializes the instance.

func (IOSurface) IsInUse added in v0.6.5

func (s IOSurface) IsInUse() bool

See: https://developer.apple.com/documentation/IOSurface/IOSurface/isInUse

type IOSurfaceClass

type IOSurfaceClass struct {
	// contains filtered or unexported fields
}

func GetIOSurfaceClass

func GetIOSurfaceClass() IOSurfaceClass

GetIOSurfaceClass returns the class object for IOSurface.

func (IOSurfaceClass) Alloc

func (ic IOSurfaceClass) Alloc() IOSurface

Alloc allocates memory for a new instance of the class.

func (IOSurfaceClass) Class added in v0.5.0

func (ic IOSurfaceClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type IOSurfaceComponentName

type IOSurfaceComponentName int32

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceComponentName

const (
	KIOSurfaceComponentNameAlpha      IOSurfaceComponentName = 1
	KIOSurfaceComponentNameBlue       IOSurfaceComponentName = 4
	KIOSurfaceComponentNameChromaBlue IOSurfaceComponentName = 7
	KIOSurfaceComponentNameChromaRed  IOSurfaceComponentName = 6
	KIOSurfaceComponentNameGreen      IOSurfaceComponentName = 3
	KIOSurfaceComponentNameLuma       IOSurfaceComponentName = 5
	KIOSurfaceComponentNameRed        IOSurfaceComponentName = 2
	KIOSurfaceComponentNameUnknown    IOSurfaceComponentName = 0
)

func IOSurfaceGetNameOfComponentOfPlane

func IOSurfaceGetNameOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) IOSurfaceComponentName

IOSurfaceGetNameOfComponentOfPlane.

It panics if IOSurfaceGetNameOfComponentOfPlane is unavailable at run time; use TryIOSurfaceGetNameOfComponentOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetNameOfComponentOfPlane(_:_:_:)

func TryIOSurfaceGetNameOfComponentOfPlane

func TryIOSurfaceGetNameOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) (IOSurfaceComponentName, error)

TryIOSurfaceGetNameOfComponentOfPlane is like IOSurfaceGetNameOfComponentOfPlane but returns an error instead of panicking if IOSurfaceGetNameOfComponentOfPlane is unavailable at run time.

func (IOSurfaceComponentName) String

func (e IOSurfaceComponentName) String() string

type IOSurfaceComponentRange

type IOSurfaceComponentRange int32

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceComponentRange

const (
	KIOSurfaceComponentRangeFullRange  IOSurfaceComponentRange = 1
	KIOSurfaceComponentRangeUnknown    IOSurfaceComponentRange = 0
	KIOSurfaceComponentRangeVideoRange IOSurfaceComponentRange = 2
	KIOSurfaceComponentRangeWideRange  IOSurfaceComponentRange = 3
)

func IOSurfaceGetRangeOfComponentOfPlane

func IOSurfaceGetRangeOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) IOSurfaceComponentRange

IOSurfaceGetRangeOfComponentOfPlane.

It panics if IOSurfaceGetRangeOfComponentOfPlane is unavailable at run time; use TryIOSurfaceGetRangeOfComponentOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetRangeOfComponentOfPlane(_:_:_:)

func TryIOSurfaceGetRangeOfComponentOfPlane

func TryIOSurfaceGetRangeOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) (IOSurfaceComponentRange, error)

TryIOSurfaceGetRangeOfComponentOfPlane is like IOSurfaceGetRangeOfComponentOfPlane but returns an error instead of panicking if IOSurfaceGetRangeOfComponentOfPlane is unavailable at run time.

func (IOSurfaceComponentRange) String

func (e IOSurfaceComponentRange) String() string

type IOSurfaceComponentType

type IOSurfaceComponentType int32

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceComponentType

const (
	KIOSurfaceComponentTypeFloat            IOSurfaceComponentType = 3
	KIOSurfaceComponentTypeSignedInteger    IOSurfaceComponentType = 2
	KIOSurfaceComponentTypeSignedNormalized IOSurfaceComponentType = 4
	KIOSurfaceComponentTypeUnknown          IOSurfaceComponentType = 0
	KIOSurfaceComponentTypeUnsignedInteger  IOSurfaceComponentType = 1
)

func IOSurfaceGetTypeOfComponentOfPlane

func IOSurfaceGetTypeOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) IOSurfaceComponentType

IOSurfaceGetTypeOfComponentOfPlane.

It panics if IOSurfaceGetTypeOfComponentOfPlane is unavailable at run time; use TryIOSurfaceGetTypeOfComponentOfPlane to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetTypeOfComponentOfPlane(_:_:_:)

func TryIOSurfaceGetTypeOfComponentOfPlane

func TryIOSurfaceGetTypeOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) (IOSurfaceComponentType, error)

TryIOSurfaceGetTypeOfComponentOfPlane is like IOSurfaceGetTypeOfComponentOfPlane but returns an error instead of panicking if IOSurfaceGetTypeOfComponentOfPlane is unavailable at run time.

func (IOSurfaceComponentType) String

func (e IOSurfaceComponentType) String() string

type IOSurfaceID

type IOSurfaceID = uint32

IOSurfaceID is an IOSurface identifier.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceID

type IOSurfaceLockOptions

type IOSurfaceLockOptions uint32

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceLockOptions

const (
	// KIOSurfaceLockAvoidSync: # Discussion
	KIOSurfaceLockAvoidSync IOSurfaceLockOptions = 0x2
	// KIOSurfaceLockReadOnly: # Discussion
	KIOSurfaceLockReadOnly IOSurfaceLockOptions = 0x1
)

func (IOSurfaceLockOptions) String

func (e IOSurfaceLockOptions) String() string

type IOSurfaceMemoryLedgerFlags

type IOSurfaceMemoryLedgerFlags uint32

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceMemoryLedgerFlags

const (
	KIOSurfaceMemoryLedgerFlagNoFootprint IOSurfaceMemoryLedgerFlags = 1
)

func (IOSurfaceMemoryLedgerFlags) String

type IOSurfaceMemoryLedgerTags

type IOSurfaceMemoryLedgerTags int32

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceMemoryLedgerTags

const (
	KIOSurfaceMemoryLedgerTagDefault  IOSurfaceMemoryLedgerTags = 0x1
	KIOSurfaceMemoryLedgerTagGraphics IOSurfaceMemoryLedgerTags = 0x4
	KIOSurfaceMemoryLedgerTagMedia    IOSurfaceMemoryLedgerTags = 0x3
	KIOSurfaceMemoryLedgerTagNetwork  IOSurfaceMemoryLedgerTags = 0x2
	KIOSurfaceMemoryLedgerTagNeural   IOSurfaceMemoryLedgerTags = 0x5
)

func (IOSurfaceMemoryLedgerTags) String

func (e IOSurfaceMemoryLedgerTags) String() string

type IOSurfacePurgeabilityState

type IOSurfacePurgeabilityState uint32

See: https://developer.apple.com/documentation/IOSurface/IOSurfacePurgeabilityState

const (
	KIOSurfacePurgeableEmpty       IOSurfacePurgeabilityState = 2
	KIOSurfacePurgeableKeepCurrent IOSurfacePurgeabilityState = 3
	KIOSurfacePurgeableNonVolatile IOSurfacePurgeabilityState = 0
	KIOSurfacePurgeableVolatile    IOSurfacePurgeabilityState = 1
)

func (IOSurfacePurgeabilityState) String

type IOSurfaceRef

type IOSurfaceRef uintptr

IOSurfaceRef is data type representing an IOSurface opaque object.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceRef

func IOSurfaceCreate

func IOSurfaceCreate(properties corefoundation.CFDictionaryRef) IOSurfaceRef

IOSurfaceCreate creates a brand new IOSurface object

It panics if IOSurfaceCreate is unavailable at run time; use TryIOSurfaceCreate to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceCreate(_:)

func IOSurfaceLookup

func IOSurfaceLookup(csid uint32) IOSurfaceRef

IOSurfaceLookup performs an atomic lookup and retain of an IOSurface by its IOSurfaceID.

It panics if IOSurfaceLookup is unavailable at run time; use TryIOSurfaceLookup to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceLookup(_:)

func IOSurfaceLookupFromMachPort

func IOSurfaceLookupFromMachPort(port uint32) IOSurfaceRef

IOSurfaceLookupFromMachPort recreates an IOSurfaceRef from a mach port.

It panics if IOSurfaceLookupFromMachPort is unavailable at run time; use TryIOSurfaceLookupFromMachPort to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceLookupFromMachPort(_:)

func IOSurfaceLookupFromXPCObject

func IOSurfaceLookupFromXPCObject(xobj xpc.Xpc_object_t) IOSurfaceRef

IOSurfaceLookupFromXPCObject.

It panics if IOSurfaceLookupFromXPCObject is unavailable at run time; use TryIOSurfaceLookupFromXPCObject to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceLookupFromXPCObject(_:)

func TryIOSurfaceCreate

func TryIOSurfaceCreate(properties corefoundation.CFDictionaryRef) (IOSurfaceRef, error)

TryIOSurfaceCreate is like IOSurfaceCreate but returns an error instead of panicking if IOSurfaceCreate is unavailable at run time.

func TryIOSurfaceLookup

func TryIOSurfaceLookup(csid uint32) (IOSurfaceRef, error)

TryIOSurfaceLookup is like IOSurfaceLookup but returns an error instead of panicking if IOSurfaceLookup is unavailable at run time.

func TryIOSurfaceLookupFromMachPort

func TryIOSurfaceLookupFromMachPort(port uint32) (IOSurfaceRef, error)

TryIOSurfaceLookupFromMachPort is like IOSurfaceLookupFromMachPort but returns an error instead of panicking if IOSurfaceLookupFromMachPort is unavailable at run time.

func TryIOSurfaceLookupFromXPCObject

func TryIOSurfaceLookupFromXPCObject(xobj xpc.Xpc_object_t) (IOSurfaceRef, error)

TryIOSurfaceLookupFromXPCObject is like IOSurfaceLookupFromXPCObject but returns an error instead of panicking if IOSurfaceLookupFromXPCObject is unavailable at run time.

type IOSurfaceSharedEvent

type IOSurfaceSharedEvent struct {
	objectivec.Object
}

IOSurfaceSharedEvent is a private IOSurface event object used for cross-process signaling via Mach ports.

func IOSurfaceSharedEventFromID

func IOSurfaceSharedEventFromID(id objc.ID) IOSurfaceSharedEvent

IOSurfaceSharedEventFromID wraps an Objective-C object ID.

func NewIOSurfaceSharedEvent

func NewIOSurfaceSharedEvent() IOSurfaceSharedEvent

NewIOSurfaceSharedEvent allocates and initializes with -new.

func NewIOSurfaceSharedEventWithMachPort

func NewIOSurfaceSharedEventWithMachPort(port uint32) IOSurfaceSharedEvent

NewIOSurfaceSharedEventWithMachPort allocates and initializes from a Mach port.

func NewIOSurfaceSharedEventWithOptions

func NewIOSurfaceSharedEventWithOptions(options uint64) IOSurfaceSharedEvent

NewIOSurfaceSharedEventWithOptions allocates and initializes with options.

func (IOSurfaceSharedEvent) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (IOSurfaceSharedEvent) EncodeWithCoder

func (s IOSurfaceSharedEvent) EncodeWithCoder(coder objectivec.IObject)

EncodeWithCoder encodes this object for keyed/XPC coding.

func (IOSurfaceSharedEvent) EventPort

func (s IOSurfaceSharedEvent) EventPort() uint32

EventPort returns the underlying Mach port name.

func (IOSurfaceSharedEvent) GlobalTraceObjectID

func (s IOSurfaceSharedEvent) GlobalTraceObjectID() uint64

GlobalTraceObjectID returns the trace object identifier.

func (IOSurfaceSharedEvent) Init

Init initializes the instance.

func (IOSurfaceSharedEvent) InitWithMachPort

func (s IOSurfaceSharedEvent) InitWithMachPort(port uint32) IOSurfaceSharedEvent

InitWithMachPort initializes an event from an existing Mach port.

func (IOSurfaceSharedEvent) InitWithOptions

func (s IOSurfaceSharedEvent) InitWithOptions(options uint64) IOSurfaceSharedEvent

InitWithOptions initializes an event and allocates an underlying event port.

func (IOSurfaceSharedEvent) SetSignaledValue

func (s IOSurfaceSharedEvent) SetSignaledValue(value uint64)

SetSignaledValue updates the signaled value.

func (IOSurfaceSharedEvent) SignaledValue

func (s IOSurfaceSharedEvent) SignaledValue() uint64

SignaledValue returns the current signaled value.

func (IOSurfaceSharedEvent) SupportsRollback

func (s IOSurfaceSharedEvent) SupportsRollback() bool

SupportsRollback reports whether rollback is supported.

func (IOSurfaceSharedEvent) WaitUntilSignaledValueTimeoutMS

func (s IOSurfaceSharedEvent) WaitUntilSignaledValueTimeoutMS(value uint64, timeoutMS uint64) bool

WaitUntilSignaledValueTimeoutMS blocks until the event reaches value or timeout.

type IOSurfaceSharedEventClass

type IOSurfaceSharedEventClass struct {
	// contains filtered or unexported fields
}

IOSurfaceSharedEventClass is the class object wrapper.

func GetIOSurfaceSharedEventClass

func GetIOSurfaceSharedEventClass() IOSurfaceSharedEventClass

GetIOSurfaceSharedEventClass returns the Objective-C class object.

func (IOSurfaceSharedEventClass) Alloc

Alloc allocates an IOSurfaceSharedEvent instance.

func (IOSurfaceSharedEventClass) SupportsSecureCoding

func (ic IOSurfaceSharedEventClass) SupportsSecureCoding() bool

SupportsSecureCoding reports class-level NSSecureCoding support.

type IOSurfaceSubsampling

type IOSurfaceSubsampling int32

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceSubsampling

const (
	KIOSurfaceSubsampling411     IOSurfaceSubsampling = 4
	KIOSurfaceSubsampling420     IOSurfaceSubsampling = 3
	KIOSurfaceSubsampling422     IOSurfaceSubsampling = 2
	KIOSurfaceSubsamplingNone    IOSurfaceSubsampling = 1
	KIOSurfaceSubsamplingUnknown IOSurfaceSubsampling = 0
)

func IOSurfaceGetSubsampling

func IOSurfaceGetSubsampling(buffer IOSurfaceRef) IOSurfaceSubsampling

IOSurfaceGetSubsampling.

It panics if IOSurfaceGetSubsampling is unavailable at run time; use TryIOSurfaceGetSubsampling to get an error instead.

See: https://developer.apple.com/documentation/IOSurface/IOSurfaceGetSubsampling(_:)

func TryIOSurfaceGetSubsampling

func TryIOSurfaceGetSubsampling(buffer IOSurfaceRef) (IOSurfaceSubsampling, error)

TryIOSurfaceGetSubsampling is like IOSurfaceGetSubsampling but returns an error instead of panicking if IOSurfaceGetSubsampling is unavailable at run time.

func (IOSurfaceSubsampling) String

func (e IOSurfaceSubsampling) String() string

type KIOSurfaceDefaultCacheConstants

type KIOSurfaceDefaultCacheConstants uint32
const (
	KIOSurfaceCopybackCache      KIOSurfaceDefaultCacheConstants = 3
	KIOSurfaceCopybackInnerCache KIOSurfaceDefaultCacheConstants = 5
	KIOSurfaceDefaultCache       KIOSurfaceDefaultCacheConstants = 0
	KIOSurfaceInhibitCache       KIOSurfaceDefaultCacheConstants = 1
	KIOSurfaceWriteCombineCache  KIOSurfaceDefaultCacheConstants = 4
	KIOSurfaceWriteThruCache     KIOSurfaceDefaultCacheConstants = 2
)

func (KIOSurfaceDefaultCacheConstants) String

type KIOSurfaceMap

type KIOSurfaceMap uint32
const (
	KIOSurfaceMapCacheShift         KIOSurfaceMap = 8
	KIOSurfaceMapCopybackCache      KIOSurfaceMap = 768
	KIOSurfaceMapCopybackInnerCache KIOSurfaceMap = 1280
	KIOSurfaceMapDefaultCache       KIOSurfaceMap = 0
	KIOSurfaceMapInhibitCache       KIOSurfaceMap = 256
	KIOSurfaceMapWriteCombineCache  KIOSurfaceMap = 1024
	KIOSurfaceMapWriteThruCache     KIOSurfaceMap = 512
)

func (KIOSurfaceMap) String

func (e KIOSurfaceMap) String() string

type SurfaceRef

type SurfaceRef = IOSurfaceRef

SurfaceRef is a bare alias for IOSurfaceRef used by dependent frameworks.

Jump to

Keyboard shortcuts

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