iosurface

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2026 License: MIT Imports: 9 Imported by: 0

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

  • kIOSurfaceContentHeadroom
  • kIOSurfaceCopybackCache
  • kIOSurfaceCopybackInnerCache
  • kIOSurfaceDefaultCache
  • kIOSurfaceInhibitCache
  • kIOSurfaceMapCacheShift
  • kIOSurfaceMapCopybackCache
  • kIOSurfaceMapCopybackInnerCache
  • kIOSurfaceMapDefaultCache
  • kIOSurfaceMapInhibitCache
  • kIOSurfaceMapWriteCombineCache
  • kIOSurfaceMapWriteThruCache
  • kIOSurfaceWriteCombineCache
  • kIOSurfaceWriteThruCache

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
	// 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 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 IOSurfaceAlignProperty

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

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

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

func IOSurfaceAllowsPixelSizeCasting

func IOSurfaceAllowsPixelSizeCasting(buffer IOSurfaceRef) bool

IOSurfaceAllowsPixelSizeCasting.

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

func IOSurfaceCopyValue

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

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

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.

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

func IOSurfaceCreateXPCObject

func IOSurfaceCreateXPCObject(aSurface IOSurfaceRef) unsafe.Pointer

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

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

func IOSurfaceDecrementUseCount

func IOSurfaceDecrementUseCount(buffer IOSurfaceRef)

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

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.

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.

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.

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

func IOSurfaceGetBitDepthOfComponentOfPlane

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

IOSurfaceGetBitDepthOfComponentOfPlane.

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

func IOSurfaceGetBitOffsetOfComponentOfPlane

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

IOSurfaceGetBitOffsetOfComponentOfPlane.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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).

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

func IOSurfaceGetID

func IOSurfaceGetID(buffer IOSurfaceRef) uint32

IOSurfaceGetID retrieves the unique IOSurfaceID value for an IOSurface.

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

func IOSurfaceGetNumberOfComponentsOfPlane

func IOSurfaceGetNumberOfComponentsOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr

IOSurfaceGetNumberOfComponentsOfPlane.

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.

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

func IOSurfaceGetPropertyAlignment

func IOSurfaceGetPropertyAlignment(property corefoundation.CFStringRef) uintptr

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

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.

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

func IOSurfaceGetUseCount

func IOSurfaceGetUseCount(buffer IOSurfaceRef) int32

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

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.

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).

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

func IOSurfaceIncrementUseCount

func IOSurfaceIncrementUseCount(buffer IOSurfaceRef)

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

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.

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.

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

func IOSurfaceRemoveAllValues

func IOSurfaceRemoveAllValues(buffer IOSurfaceRef)

IOSurfaceRemoveAllValues.

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.

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

func IOSurfaceSetOwnershipIdentity added in v0.2.0

func IOSurfaceSetOwnershipIdentity(buffer IOSurfaceRef, task_id_token uintptr, newLedgerTag int, newLedgerOptions uint32) int32

IOSurfaceSetOwnershipIdentity.

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

func IOSurfaceSetPurgeable

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

IOSurfaceSetPurgeable.

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.

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

func IOSurfaceUnlock

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

IOSurfaceUnlock “Unlock” an IOSurface for reading or writing.

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

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
	InUse() 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 unsafe.Pointer) 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 unsafe.Pointer) int32
	WidthOfPlaneAtIndex(planeIndex uint) int

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the IOSurface class.

Initializers

  • [IIOSurface.InitWithProperties]

Instance Properties

  • [IIOSurface.AllocationSize]
  • [IIOSurface.AllowsPixelSizeCasting]
  • [IIOSurface.BaseAddress]
  • [IIOSurface.BytesPerElement]
  • [IIOSurface.BytesPerRow]
  • [IIOSurface.ElementHeight]
  • [IIOSurface.ElementWidth]
  • [IIOSurface.Height]
  • [IIOSurface.InUse]
  • [IIOSurface.LocalUseCount]
  • [IIOSurface.PixelFormat]
  • [IIOSurface.PlaneCount]
  • [IIOSurface.Seed]
  • [IIOSurface.Width]
  • [IIOSurface.SurfaceID]

Instance Methods

  • [IIOSurface.AllAttachments]
  • [IIOSurface.AttachmentForKey]
  • [IIOSurface.BaseAddressOfPlaneAtIndex]
  • [IIOSurface.BytesPerElementOfPlaneAtIndex]
  • [IIOSurface.BytesPerRowOfPlaneAtIndex]
  • [IIOSurface.DecrementUseCount]
  • [IIOSurface.ElementHeightOfPlaneAtIndex]
  • [IIOSurface.ElementWidthOfPlaneAtIndex]
  • [IIOSurface.HeightOfPlaneAtIndex]
  • [IIOSurface.IncrementUseCount]
  • [IIOSurface.LockWithOptionsSeed]
  • [IIOSurface.RemoveAllAttachments]
  • [IIOSurface.RemoveAttachmentForKey]
  • [IIOSurface.SetAllAttachments]
  • [IIOSurface.SetAttachmentForKey]
  • [IIOSurface.SetPurgeableOldState]
  • [IIOSurface.UnlockWithOptionsSeed]
  • [IIOSurface.WidthOfPlaneAtIndex]

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 (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.

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.

type IOSurfaceComponentName

type IOSurfaceComponentName int

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.

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

func (IOSurfaceComponentName) String

func (e IOSurfaceComponentName) String() string

type IOSurfaceComponentRange

type IOSurfaceComponentRange int

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.

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

func (IOSurfaceComponentRange) String

func (e IOSurfaceComponentRange) String() string

type IOSurfaceComponentType

type IOSurfaceComponentType int

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.

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

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 int

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

const (
	// KIOSurfaceLockAvoidSync: # Discussion
	KIOSurfaceLockAvoidSync IOSurfaceLockOptions = 2
	// KIOSurfaceLockReadOnly: # Discussion
	KIOSurfaceLockReadOnly IOSurfaceLockOptions = 1
)

func (IOSurfaceLockOptions) String

func (e IOSurfaceLockOptions) String() string

type IOSurfaceMemoryLedgerFlags

type IOSurfaceMemoryLedgerFlags int

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

const (
	KIOSurfaceMemoryLedgerFlagNoFootprint IOSurfaceMemoryLedgerFlags = 1
)

func (IOSurfaceMemoryLedgerFlags) String

type IOSurfaceMemoryLedgerTags

type IOSurfaceMemoryLedgerTags int

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

const (
	KIOSurfaceMemoryLedgerTagDefault  IOSurfaceMemoryLedgerTags = 1
	KIOSurfaceMemoryLedgerTagGraphics IOSurfaceMemoryLedgerTags = 4
	KIOSurfaceMemoryLedgerTagMedia    IOSurfaceMemoryLedgerTags = 3
	KIOSurfaceMemoryLedgerTagNetwork  IOSurfaceMemoryLedgerTags = 2
	KIOSurfaceMemoryLedgerTagNeural   IOSurfaceMemoryLedgerTags = 5
)

func (IOSurfaceMemoryLedgerTags) String

func (e IOSurfaceMemoryLedgerTags) String() string

type IOSurfacePurgeabilityState

type IOSurfacePurgeabilityState int

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

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.

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

func IOSurfaceLookupFromMachPort

func IOSurfaceLookupFromMachPort(port uint32) IOSurfaceRef

IOSurfaceLookupFromMachPort recreates an IOSurfaceRef from a mach port.

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

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 int

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 (IOSurfaceSubsampling) String

func (e IOSurfaceSubsampling) String() string

type KIOSurface

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

func (KIOSurface) String

func (e KIOSurface) String() string

type KIOSurfaceMap

type KIOSurfaceMap uint
const (
	KIOSurfaceMapCacheShift         KIOSurfaceMap = 8
	KIOSurfaceMapCopybackCache      KIOSurfaceMap = 3
	KIOSurfaceMapCopybackInnerCache KIOSurfaceMap = 5
	KIOSurfaceMapDefaultCache       KIOSurfaceMap = 0
	KIOSurfaceMapInhibitCache       KIOSurfaceMap = 1
	KIOSurfaceMapWriteCombineCache  KIOSurfaceMap = 4
	KIOSurfaceMapWriteThruCache     KIOSurfaceMap = 2
)

func (KIOSurfaceMap) String

func (e KIOSurfaceMap) String() string

type SurfaceRef

type SurfaceRef = IOSurfaceRef

Jump to

Keyboard shortcuts

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