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 ¶
- Variables
- func BindFunc(fptr any, name string) (err error)
- func IOSurfaceAlignProperty(property corefoundation.CFStringRef, value uintptr) uintptr
- func IOSurfaceAllowsPixelSizeCasting(buffer IOSurfaceRef) bool
- func IOSurfaceCopyAllValues(buffer IOSurfaceRef) corefoundation.CFDictionaryRef
- func IOSurfaceCopyValue(buffer IOSurfaceRef, key corefoundation.CFStringRef) corefoundation.CFTypeRef
- func IOSurfaceCreateMachPort(buffer IOSurfaceRef) uint32
- func IOSurfaceCreateXPCObject(aSurface IOSurfaceRef) xpc.Xpc_object_t
- func IOSurfaceDecrementUseCount(buffer IOSurfaceRef)
- func IOSurfaceGetAllocSize(buffer IOSurfaceRef) uintptr
- func IOSurfaceGetBaseAddress(buffer IOSurfaceRef) unsafe.Pointer
- func IOSurfaceGetBaseAddressOfPlane(buffer IOSurfaceRef, planeIndex uintptr) unsafe.Pointer
- func IOSurfaceGetBitDepthOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) uintptr
- func IOSurfaceGetBitOffsetOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) uintptr
- func IOSurfaceGetBytesPerElement(buffer IOSurfaceRef) uintptr
- func IOSurfaceGetBytesPerElementOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr
- func IOSurfaceGetBytesPerRow(buffer IOSurfaceRef) uintptr
- func IOSurfaceGetBytesPerRowOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr
- func IOSurfaceGetElementHeight(buffer IOSurfaceRef) uintptr
- func IOSurfaceGetElementHeightOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr
- func IOSurfaceGetElementWidth(buffer IOSurfaceRef) uintptr
- func IOSurfaceGetElementWidthOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr
- func IOSurfaceGetHeight(buffer IOSurfaceRef) uintptr
- func IOSurfaceGetHeightOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr
- func IOSurfaceGetID(buffer IOSurfaceRef) uint32
- func IOSurfaceGetNumberOfComponentsOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr
- func IOSurfaceGetPixelFormat(buffer IOSurfaceRef) uint32
- func IOSurfaceGetPlaneCount(buffer IOSurfaceRef) uintptr
- func IOSurfaceGetPropertyAlignment(property corefoundation.CFStringRef) uintptr
- func IOSurfaceGetPropertyMaximum(property corefoundation.CFStringRef) uintptr
- func IOSurfaceGetSeed(buffer IOSurfaceRef) uint32
- func IOSurfaceGetTypeID() uint
- func IOSurfaceGetUseCount(buffer IOSurfaceRef) int32
- func IOSurfaceGetWidth(buffer IOSurfaceRef) uintptr
- func IOSurfaceGetWidthOfPlane(buffer IOSurfaceRef, planeIndex uintptr) uintptr
- func IOSurfaceIncrementUseCount(buffer IOSurfaceRef)
- func IOSurfaceIsInUse(buffer IOSurfaceRef) bool
- func IOSurfaceLock(buffer IOSurfaceRef, options IOSurfaceLockOptions, seed *uint32) int32
- func IOSurfaceRemoveAllValues(buffer IOSurfaceRef)
- func IOSurfaceRemoveValue(buffer IOSurfaceRef, key corefoundation.CFStringRef)
- func IOSurfaceSetOwnershipIdentity(buffer IOSurfaceRef, task_id_token kernel.Task_id_token_t, newLedgerTag int32, ...) int32
- func IOSurfaceSetPurgeable(buffer IOSurfaceRef, newState uint32, oldState *uint32) int32
- func IOSurfaceSetValue(buffer IOSurfaceRef, key corefoundation.CFStringRef, ...)
- func IOSurfaceSetValues(buffer IOSurfaceRef, keysAndValues corefoundation.CFDictionaryRef)
- func IOSurfaceUnlock(buffer IOSurfaceRef, options IOSurfaceLockOptions, seed *uint32) int32
- func SymbolAddress(name string) (uintptr, error)
- func TryIOSurfaceAlignProperty(property corefoundation.CFStringRef, value uintptr) (uintptr, error)
- func TryIOSurfaceAllowsPixelSizeCasting(buffer IOSurfaceRef) (bool, error)
- func TryIOSurfaceCopyAllValues(buffer IOSurfaceRef) (corefoundation.CFDictionaryRef, error)
- func TryIOSurfaceCopyValue(buffer IOSurfaceRef, key corefoundation.CFStringRef) (corefoundation.CFTypeRef, error)
- func TryIOSurfaceCreateMachPort(buffer IOSurfaceRef) (uint32, error)
- func TryIOSurfaceCreateXPCObject(aSurface IOSurfaceRef) (xpc.Xpc_object_t, error)
- func TryIOSurfaceDecrementUseCount(buffer IOSurfaceRef) error
- func TryIOSurfaceGetAllocSize(buffer IOSurfaceRef) (uintptr, error)
- func TryIOSurfaceGetBaseAddress(buffer IOSurfaceRef) (unsafe.Pointer, error)
- func TryIOSurfaceGetBaseAddressOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (unsafe.Pointer, error)
- func TryIOSurfaceGetBitDepthOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) (uintptr, error)
- func TryIOSurfaceGetBitOffsetOfComponentOfPlane(buffer IOSurfaceRef, planeIndex uintptr, componentIndex uintptr) (uintptr, error)
- func TryIOSurfaceGetBytesPerElement(buffer IOSurfaceRef) (uintptr, error)
- func TryIOSurfaceGetBytesPerElementOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)
- func TryIOSurfaceGetBytesPerRow(buffer IOSurfaceRef) (uintptr, error)
- func TryIOSurfaceGetBytesPerRowOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)
- func TryIOSurfaceGetElementHeight(buffer IOSurfaceRef) (uintptr, error)
- func TryIOSurfaceGetElementHeightOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)
- func TryIOSurfaceGetElementWidth(buffer IOSurfaceRef) (uintptr, error)
- func TryIOSurfaceGetElementWidthOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)
- func TryIOSurfaceGetHeight(buffer IOSurfaceRef) (uintptr, error)
- func TryIOSurfaceGetHeightOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)
- func TryIOSurfaceGetID(buffer IOSurfaceRef) (uint32, error)
- func TryIOSurfaceGetNumberOfComponentsOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)
- func TryIOSurfaceGetPixelFormat(buffer IOSurfaceRef) (uint32, error)
- func TryIOSurfaceGetPlaneCount(buffer IOSurfaceRef) (uintptr, error)
- func TryIOSurfaceGetPropertyAlignment(property corefoundation.CFStringRef) (uintptr, error)
- func TryIOSurfaceGetPropertyMaximum(property corefoundation.CFStringRef) (uintptr, error)
- func TryIOSurfaceGetSeed(buffer IOSurfaceRef) (uint32, error)
- func TryIOSurfaceGetTypeID() (uint, error)
- func TryIOSurfaceGetUseCount(buffer IOSurfaceRef) (int32, error)
- func TryIOSurfaceGetWidth(buffer IOSurfaceRef) (uintptr, error)
- func TryIOSurfaceGetWidthOfPlane(buffer IOSurfaceRef, planeIndex uintptr) (uintptr, error)
- func TryIOSurfaceIncrementUseCount(buffer IOSurfaceRef) error
- func TryIOSurfaceIsInUse(buffer IOSurfaceRef) (bool, error)
- func TryIOSurfaceLock(buffer IOSurfaceRef, options IOSurfaceLockOptions, seed *uint32) (int32, error)
- func TryIOSurfaceRemoveAllValues(buffer IOSurfaceRef) error
- func TryIOSurfaceRemoveValue(buffer IOSurfaceRef, key corefoundation.CFStringRef) error
- func TryIOSurfaceSetOwnershipIdentity(buffer IOSurfaceRef, task_id_token kernel.Task_id_token_t, newLedgerTag int32, ...) (int32, error)
- func TryIOSurfaceSetPurgeable(buffer IOSurfaceRef, newState uint32, oldState *uint32) (int32, error)
- func TryIOSurfaceSetValue(buffer IOSurfaceRef, key corefoundation.CFStringRef, ...) error
- func TryIOSurfaceSetValues(buffer IOSurfaceRef, keysAndValues corefoundation.CFDictionaryRef) error
- func TryIOSurfaceUnlock(buffer IOSurfaceRef, options IOSurfaceLockOptions, seed *uint32) (int32, error)
- type IIOSurface
- type IIOSurfaceSharedEvent
- type IOSurface
- func IOSurfaceFromID(id objc.ID) IOSurface
- func NewIOSurface() IOSurface
- func NewIOSurfaceWithCoder(coder foundation.INSCoder) IOSurface
- func NewIOSurfaceWithProperties(properties foundation.INSDictionary) IOSurface
- func NewSurface() IOSurfacedeprecated
- func NewSurfaceWithCoder(coder foundation.INSCoder) IOSurfacedeprecated
- func NewSurfaceWithProperties(properties foundation.INSDictionary) IOSurfacedeprecated
- func (s IOSurface) AllAttachments() foundation.INSDictionary
- func (s IOSurface) AllocationSize() int
- func (s IOSurface) AllowsPixelSizeCasting() bool
- func (s IOSurface) AttachmentForKey(key string) objectivec.IObject
- func (s IOSurface) Autorelease() IOSurface
- func (s IOSurface) BaseAddress() unsafe.Pointer
- func (s IOSurface) BaseAddressOfPlaneAtIndex(planeIndex uint) unsafe.Pointer
- func (s IOSurface) BytesPerElement() int
- func (s IOSurface) BytesPerElementOfPlaneAtIndex(planeIndex uint) int
- func (s IOSurface) BytesPerRow() int
- func (s IOSurface) BytesPerRowOfPlaneAtIndex(planeIndex uint) int
- func (s IOSurface) DecrementUseCount()
- func (s IOSurface) ElementHeight() int
- func (s IOSurface) ElementHeightOfPlaneAtIndex(planeIndex uint) int
- func (s IOSurface) ElementWidth() int
- func (s IOSurface) ElementWidthOfPlaneAtIndex(planeIndex uint) int
- func (s IOSurface) EncodeWithCoder(coder foundation.INSCoder)
- func (s IOSurface) Height() int
- func (s IOSurface) HeightOfPlaneAtIndex(planeIndex uint) int
- func (s IOSurface) IncrementUseCount()
- func (s IOSurface) Init() IOSurface
- func (s IOSurface) InitWithCoder(coder foundation.INSCoder) IOSurface
- func (s IOSurface) InitWithProperties(properties foundation.INSDictionary) IOSurface
- func (s IOSurface) IsInUse() bool
- func (s IOSurface) LocalUseCount() int32
- func (s IOSurface) LockWithOptionsSeed(options IOSurfaceLockOptions, seed *uint32) int32
- func (s IOSurface) PixelFormat() uint32
- func (s IOSurface) PlaneCount() uint
- func (s IOSurface) RemoveAllAttachments()
- func (s IOSurface) RemoveAttachmentForKey(key string)
- func (s IOSurface) Seed() uint32
- func (s IOSurface) SetAllAttachments(dict foundation.INSDictionary)
- func (s IOSurface) SetAttachmentForKey(anObject objectivec.IObject, key string)
- func (s IOSurface) SetPurgeableOldState(newState IOSurfacePurgeabilityState, oldState *IOSurfacePurgeabilityState) int32
- func (s IOSurface) SurfaceID() uint32
- func (s IOSurface) UnlockWithOptionsSeed(options IOSurfaceLockOptions, seed *uint32) int32
- func (s IOSurface) Width() int
- func (s IOSurface) WidthOfPlaneAtIndex(planeIndex uint) int
- type IOSurfaceClass
- type IOSurfaceComponentName
- type IOSurfaceComponentRange
- type IOSurfaceComponentType
- type IOSurfaceID
- type IOSurfaceLockOptions
- type IOSurfaceMemoryLedgerFlags
- type IOSurfaceMemoryLedgerTags
- type IOSurfacePropertyKey
- type IOSurfacePurgeabilityState
- type IOSurfaceRef
- func IOSurfaceCreate(properties corefoundation.CFDictionaryRef) IOSurfaceRef
- func IOSurfaceLookup(csid uint32) IOSurfaceRef
- func IOSurfaceLookupFromMachPort(port uint32) IOSurfaceRef
- func IOSurfaceLookupFromXPCObject(xobj xpc.Xpc_object_t) IOSurfaceRef
- func TryIOSurfaceCreate(properties corefoundation.CFDictionaryRef) (IOSurfaceRef, error)
- func TryIOSurfaceLookup(csid uint32) (IOSurfaceRef, error)
- func TryIOSurfaceLookupFromMachPort(port uint32) (IOSurfaceRef, error)
- func TryIOSurfaceLookupFromXPCObject(xobj xpc.Xpc_object_t) (IOSurfaceRef, error)
- type IOSurfaceSharedEvent
- func (s IOSurfaceSharedEvent) Autorelease() IOSurfaceSharedEvent
- func (s IOSurfaceSharedEvent) EncodeWithCoder(coder objectivec.IObject)
- func (s IOSurfaceSharedEvent) EventPort() uint32
- func (s IOSurfaceSharedEvent) GlobalTraceObjectID() uint64
- func (s IOSurfaceSharedEvent) Init() IOSurfaceSharedEvent
- func (s IOSurfaceSharedEvent) InitWithMachPort(port uint32) IOSurfaceSharedEvent
- func (s IOSurfaceSharedEvent) InitWithOptions(options uint64) IOSurfaceSharedEvent
- func (s IOSurfaceSharedEvent) SetSignaledValue(value uint64)
- func (s IOSurfaceSharedEvent) SignaledValue() uint64
- func (s IOSurfaceSharedEvent) SupportsRollback() bool
- func (s IOSurfaceSharedEvent) WaitUntilSignaledValueTimeoutMS(value uint64, timeoutMS uint64) bool
- type IOSurfaceSharedEventClass
- type IOSurfaceSubsampling
- type KIOSurfaceDefaultCacheConstants
- type KIOSurfaceMap
- type SurfaceRef
Constants ¶
This section is empty.
Variables ¶
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 )
var ( // // Deprecated: Deprecated since macOS 10.14. // // See: https://developer.apple.com/documentation/IOSurface/IOSurfacePropertyKey/allocSizeKey IOSurfacePropertyAllocSizeKey string )
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 ¶
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 ¶
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 ¶
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 ¶
- IIOSurface.AllocationSize
- IIOSurface.AllowsPixelSizeCasting
- IIOSurface.BaseAddress
- IIOSurface.BytesPerElement
- IIOSurface.BytesPerRow
- IIOSurface.ElementHeight
- IIOSurface.ElementWidth
- IIOSurface.Height
- IIOSurface.IsInUse
- 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
}
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 ¶
- IOSurface.AllocationSize
- IOSurface.AllowsPixelSizeCasting
- IOSurface.BaseAddress
- IOSurface.BytesPerElement
- IOSurface.BytesPerRow
- IOSurface.ElementHeight
- IOSurface.ElementWidth
- IOSurface.Height
- IOSurface.IsInUse
- IOSurface.LocalUseCount
- IOSurface.PixelFormat
- IOSurface.PlaneCount
- IOSurface.Seed
- IOSurface.Width
- IOSurface.SurfaceID
Instance Methods ¶
- IOSurface.AllAttachments
- IOSurface.AttachmentForKey
- IOSurface.BaseAddressOfPlaneAtIndex
- IOSurface.BytesPerElementOfPlaneAtIndex
- IOSurface.BytesPerRowOfPlaneAtIndex
- IOSurface.DecrementUseCount
- IOSurface.ElementHeightOfPlaneAtIndex
- IOSurface.ElementWidthOfPlaneAtIndex
- IOSurface.HeightOfPlaneAtIndex
- IOSurface.IncrementUseCount
- IOSurface.LockWithOptionsSeed
- IOSurface.RemoveAllAttachments
- IOSurface.RemoveAttachmentForKey
- IOSurface.SetAllAttachments
- IOSurface.SetAttachmentForKey
- IOSurface.SetPurgeableOldState
- IOSurface.UnlockWithOptionsSeed
- IOSurface.WidthOfPlaneAtIndex
See: https://developer.apple.com/documentation/IOSurface/IOSurface
func IOSurfaceFromID ¶
IOSurfaceFromID constructs a IOSurface from an objc.ID.
Data type representing an IOSurface opaque object.
func NewIOSurfaceWithCoder ¶
func NewIOSurfaceWithCoder(coder foundation.INSCoder) IOSurface
See: https://developer.apple.com/documentation/IOSurface/IOSurface/init(coder:)
func NewIOSurfaceWithProperties ¶
func NewIOSurfaceWithProperties(properties foundation.INSDictionary) IOSurface
See: https://developer.apple.com/documentation/IOSurface/IOSurface/init(properties:)
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) AllAttachments ¶
func (s IOSurface) AllAttachments() foundation.INSDictionary
See: https://developer.apple.com/documentation/IOSurface/IOSurface/allAttachments()
func (IOSurface) AllocationSize ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/allocationSize
func (IOSurface) AllowsPixelSizeCasting ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/allowsPixelSizeCasting
func (IOSurface) AttachmentForKey ¶
func (s IOSurface) AttachmentForKey(key string) objectivec.IObject
See: https://developer.apple.com/documentation/IOSurface/IOSurface/attachment(forKey:)
func (IOSurface) Autorelease ¶
Autorelease adds the receiver to the current autorelease pool.
func (IOSurface) BaseAddress ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/baseAddress
func (IOSurface) BaseAddressOfPlaneAtIndex ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/baseAddressOfPlane(at:)
func (IOSurface) BytesPerElement ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/bytesPerElement
func (IOSurface) BytesPerElementOfPlaneAtIndex ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/bytesPerElementOfPlane(at:)
func (IOSurface) BytesPerRow ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/bytesPerRow
func (IOSurface) BytesPerRowOfPlaneAtIndex ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/bytesPerRowOfPlane(at:)
func (IOSurface) DecrementUseCount ¶
func (s IOSurface) DecrementUseCount()
See: https://developer.apple.com/documentation/IOSurface/IOSurface/decrementUseCount()
func (IOSurface) ElementHeight ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/elementHeight
func (IOSurface) ElementHeightOfPlaneAtIndex ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/elementHeightOfPlane(at:)
func (IOSurface) ElementWidth ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/elementWidth
func (IOSurface) ElementWidthOfPlaneAtIndex ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/elementWidthOfPlane(at:)
func (IOSurface) EncodeWithCoder ¶
func (s IOSurface) EncodeWithCoder(coder foundation.INSCoder)
func (IOSurface) Height ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/height
func (IOSurface) HeightOfPlaneAtIndex ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/heightOfPlane(at:)
func (IOSurface) IncrementUseCount ¶
func (s IOSurface) IncrementUseCount()
See: https://developer.apple.com/documentation/IOSurface/IOSurface/incrementUseCount()
func (IOSurface) InitWithCoder ¶ added in v0.6.10
func (s IOSurface) InitWithCoder(coder foundation.INSCoder) IOSurface
See: https://developer.apple.com/documentation/IOSurface/IOSurface/init(coder:)
func (IOSurface) InitWithProperties ¶
func (s IOSurface) InitWithProperties(properties foundation.INSDictionary) IOSurface
See: https://developer.apple.com/documentation/IOSurface/IOSurface/init(properties:)
func (IOSurface) IsInUse ¶ added in v0.6.5
See: https://developer.apple.com/documentation/IOSurface/IOSurface/isInUse
func (IOSurface) LocalUseCount ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/localUseCount
func (IOSurface) LockWithOptionsSeed ¶
func (s IOSurface) LockWithOptionsSeed(options IOSurfaceLockOptions, seed *uint32) int32
See: https://developer.apple.com/documentation/IOSurface/IOSurface/lock(options:seed:)
func (IOSurface) PixelFormat ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/pixelFormat
func (IOSurface) PlaneCount ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/planeCount
func (IOSurface) RemoveAllAttachments ¶
func (s IOSurface) RemoveAllAttachments()
See: https://developer.apple.com/documentation/IOSurface/IOSurface/removeAllAttachments()
func (IOSurface) RemoveAttachmentForKey ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/removeAttachment(forKey:)
func (IOSurface) Seed ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/seed
func (IOSurface) SetAllAttachments ¶
func (s IOSurface) SetAllAttachments(dict foundation.INSDictionary)
See: https://developer.apple.com/documentation/IOSurface/IOSurface/setAllAttachments(_:)
func (IOSurface) SetAttachmentForKey ¶
func (s IOSurface) SetAttachmentForKey(anObject objectivec.IObject, key string)
See: https://developer.apple.com/documentation/IOSurface/IOSurface/setAttachment(_:forKey:)
func (IOSurface) SetPurgeableOldState ¶
func (s IOSurface) SetPurgeableOldState(newState IOSurfacePurgeabilityState, oldState *IOSurfacePurgeabilityState) int32
See: https://developer.apple.com/documentation/IOSurface/IOSurface/setPurgeable(_:oldState:)
func (IOSurface) SurfaceID ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/surfaceID
func (IOSurface) UnlockWithOptionsSeed ¶
func (s IOSurface) UnlockWithOptionsSeed(options IOSurfaceLockOptions, seed *uint32) int32
See: https://developer.apple.com/documentation/IOSurface/IOSurface/unlock(options:seed:)
func (IOSurface) Width ¶
See: https://developer.apple.com/documentation/IOSurface/IOSurface/width
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 ¶
func (e IOSurfaceMemoryLedgerFlags) String() 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 IOSurfacePropertyKey ¶
type IOSurfacePropertyKey = string
See: https://developer.apple.com/documentation/IOSurface/IOSurfacePropertyKey
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 ¶
func (e IOSurfacePurgeabilityState) String() 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 {
}
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 ¶
func (s IOSurfaceSharedEvent) Autorelease() IOSurfaceSharedEvent
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 ¶
func (s IOSurfaceSharedEvent) Init() IOSurfaceSharedEvent
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 ¶
func (ic IOSurfaceSharedEventClass) Alloc() IOSurfaceSharedEvent
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 ¶
func (e KIOSurfaceDefaultCacheConstants) String() 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.