paravirtualizedgraphics

package
v0.6.18 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package paravirtualizedgraphics provides Go bindings for the ParavirtualizedGraphics framework.

Add graphics acceleration to your guest driver stack.

If you have an app that implements hardware-level virtualization, performance inside the virtual machine is critical, particularly for graphics. The ParavirtualizedGraphics framework implements hardware-accelerated graphics for macOS running in a virtual machine, hereafter known as the guest. The operating system provides a graphics driver that runs inside the guest, communicating with the framework in the host operating system to take advantage of Metal-accelerated graphics.

PCI Device Characteristics

  • PGCopyOptionROMURL: Copies the URL of the ROM image to use on the guest graphics device.

Devices

Displays

Functions

Key Types

Code generated from Apple documentation. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var (
	// PGResumeErrorDomain is the error domain for suspend-resume actions.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGResumeErrorDomain
	PGResumeErrorDomain foundation.NSErrorDomain
)
View Source
var (
	// ParavirtualizedGraphicsVersionNumber is the framework’s current version number.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/ParavirtualizedGraphicsVersionNumber
	ParavirtualizedGraphicsVersionNumber float64
)
View Source
var (
	// ParavirtualizedGraphicsVersionString is the framework’s version number expressed as a C string.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/ParavirtualizedGraphicsVersionString
	ParavirtualizedGraphicsVersionString uint8
)

Functions

func NewBitmapImageRepPGDisplayCoord_tBlock

func NewBitmapImageRepPGDisplayCoord_tBlock(handler BitmapImageRepPGDisplayCoord_tHandler) (objc.ID, func())

NewBitmapImageRepPGDisplayCoord_tBlock wraps a Go BitmapImageRepPGDisplayCoord_tHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewBoolUint64Block

func NewBoolUint64Block(handler BoolUint64Handler) (objc.ID, func())

NewBoolUint64Block wraps a Go BoolUint64Handler as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGDestroyTaskBlock

func NewPGDestroyTaskBlock(handler PGDestroyTask) (objc.ID, func())

NewPGDestroyTaskBlock wraps a Go PGDestroyTask as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGDisplayCoord_tUint32Block

func NewPGDisplayCoord_tUint32Block(handler PGDisplayCoord_tUint32Handler) (objc.ID, func())

NewPGDisplayCoord_tUint32Block wraps a Go PGDisplayCoord_tUint32Handler as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGDisplayCursorGlyphHandlerBlock

func NewPGDisplayCursorGlyphHandlerBlock(handler PGDisplayCursorGlyphHandler) (objc.ID, func())

NewPGDisplayCursorGlyphHandlerBlock wraps a Go PGDisplayCursorGlyphHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGDisplayCursorMoveHandlerBlock

func NewPGDisplayCursorMoveHandlerBlock(handler PGDisplayCursorMoveHandler) (objc.ID, func())

NewPGDisplayCursorMoveHandlerBlock wraps a Go PGDisplayCursorMoveHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGDisplayCursorShowBlock

func NewPGDisplayCursorShowBlock(handler PGDisplayCursorShowHandler) (objc.ID, func())

NewPGDisplayCursorShowBlock wraps a Go PGDisplayCursorShowHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGDisplayModeChangeHandlerBlock

func NewPGDisplayModeChangeHandlerBlock(handler PGDisplayModeChangeHandler) (objc.ID, func())

NewPGDisplayModeChangeHandlerBlock wraps a Go PGDisplayModeChangeHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGDisplayNewFrameEventHandlerBlock

func NewPGDisplayNewFrameEventHandlerBlock(handler PGDisplayNewFrameEventHandler) (objc.ID, func())

NewPGDisplayNewFrameEventHandlerBlock wraps a Go PGDisplayNewFrameEventHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGRaiseInterruptBlock

func NewPGRaiseInterruptBlock(handler PGRaiseInterrupt) (objc.ID, func())

NewPGRaiseInterruptBlock wraps a Go PGRaiseInterrupt as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGRemoveTraceRangeBlock

func NewPGRemoveTraceRangeBlock(handler PGRemoveTraceRange) (objc.ID, func())

NewPGRemoveTraceRangeBlock wraps a Go PGRemoveTraceRange as an Objective-C block. The caller must defer the returned cleanup function.

func NewPGTraceRangeHandlerBlock

func NewPGTraceRangeHandlerBlock(handler PGTraceRangeHandler) (objc.ID, func())

NewPGTraceRangeHandlerBlock wraps a Go PGTraceRangeHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewUintptrPGPhysicalMemoryRange_sBlock

func NewUintptrPGPhysicalMemoryRange_sBlock(handler UintptrPGPhysicalMemoryRange_sHandler) (objc.ID, func())

NewUintptrPGPhysicalMemoryRange_sBlock wraps a Go UintptrPGPhysicalMemoryRange_sHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewUintptrUint64Block

func NewUintptrUint64Block(handler UintptrUint64Handler) (objc.ID, func())

NewUintptrUint64Block wraps a Go UintptrUint64Handler as an Objective-C block. The caller must defer the returned cleanup function.

func NewVoidBlock

func NewVoidBlock(handler VoidHandler) (objc.ID, func())

NewVoidBlock wraps a Go VoidHandler as an Objective-C block. The caller must defer the returned cleanup function.

func PGCopyOptionROMURL

func PGCopyOptionROMURL() *foundation.NSURL

PGCopyOptionROMURL copies the URL of the ROM image to use on the guest graphics device.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGCopyOptionROMURL()

Types

type BitmapImageRepPGDisplayCoord_tHandler

type BitmapImageRepPGDisplayCoord_tHandler = func(*appkit.NSBitmapImageRep, PGDisplayCoord_t)

BitmapImageRepPGDisplayCoord_tHandler is the signature for a completion handler block.

type BoolUint64Handler

type BoolUint64Handler = func(uint64, uint64, unsafe.Pointer) bool

BoolUint64Handler handles completion with primitive and object results.

type BoolstructPGTask_sUint32Uint64BoolPGPhysicalMemoryRange_sHandler

type BoolstructPGTask_sUint32Uint64BoolPGPhysicalMemoryRange_sHandler = func(*uintptr, uint32, uint64, bool, *PGPhysicalMemoryRange_s) bool

BoolstructPGTask_sUint32Uint64BoolPGPhysicalMemoryRange_sHandler is the signature for a completion handler block.

type BoolstructPGTask_sUint64Uint64Handler

type BoolstructPGTask_sUint64Uint64Handler = func(*uintptr, uint64, uint64) bool

BoolstructPGTask_sUint64Uint64Handler is the signature for a completion handler block.

type IPGDeviceDescriptor

type IPGDeviceDescriptor interface {
	objectivec.IObject

	// The Metal device object to use to back the virtual graphics device.
	Device() metal.MTLDevice
	SetDevice(value metal.MTLDevice)

	// A handler that the framework calls to create a task object.
	CreateTask() UintptrUint64Handler
	SetCreateTask(value UintptrUint64Handler)
	// A handler that the framework calls to destroy a task object.
	DestroyTask() PGDestroyTask
	SetDestroyTask(value objc.ID)

	// A handler that the framework calls to map memory into the virtual machine.
	MapMemory() PGMapMemory
	SetMapMemory(value objc.ID)
	// A handler that the framework calls to unmap memory from the virtual machine.
	UnmapMemory() PGUnmapMemory
	SetUnmapMemory(value objc.ID)
	// A handler that the framework calls to read data from the guest’s memory.
	ReadMemory() BoolUint64Handler
	SetReadMemory(value BoolUint64Handler)

	// A handler that the framework calls to add a trace range.
	AddTraceRange() UintptrPGPhysicalMemoryRange_sHandler
	SetAddTraceRange(value UintptrPGPhysicalMemoryRange_sHandler)
	// A handler that the framework calls to remove a trace range.
	RemoveTraceRange() PGRemoveTraceRange
	SetRemoveTraceRange(value objc.ID)

	// A handler that the system calls to raise an interrupt in the guest environment.
	RaiseInterrupt() PGRaiseInterrupt
	SetRaiseInterrupt(value PGRaiseInterrupt)

	// The length in bytes of the memory-mapped IO section.
	MmioLength() uintptr
	SetMmioLength(value uintptr)

	DisplayPortCount() uint32
	SetDisplayPortCount(value uint32)
}

An interface definition for the PGDeviceDescriptor class.

Specifying the GPU

Managing Tasks

Managing Memory Operations

Specifying Trace Behavior

Handling Interrupts

Specifying Virtual Device Properties

Instance Properties

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor

type IPGDisplayDescriptor

type IPGDisplayDescriptor interface {
	objectivec.IObject

	// The display’s name as seen in the guest operating environment.
	Name() string
	SetName(value string)
	// The size in millimeters of the virtual display.
	SizeInMillimeters() corefoundation.CGSize
	SetSizeInMillimeters(value corefoundation.CGSize)

	// The queue that the framework uses when dispatching messages to any of the display’s registered handlers.
	Queue() dispatch.Queue
	SetQueue(value dispatch.Queue)

	// A handler that the framework calls to change the cursor’s appearance.
	CursorGlyphHandler() BitmapImageRepPGDisplayCoord_tHandler
	SetCursorGlyphHandler(value BitmapImageRepPGDisplayCoord_tHandler)
	// A handler that the framework calls to change the cursor’s visibility.
	CursorShowHandler() PGDisplayCursorShowHandler
	SetCursorShowHandler(value PGDisplayCursorShowHandler)

	// A handler that the framework calls to change the virtual display’s graphics mode.
	ModeChangeHandler() PGDisplayCoord_tUint32Handler
	SetModeChangeHandler(value PGDisplayCoord_tUint32Handler)

	// A handler that the framework calls when the guest environment has a new frame to display.
	NewFrameEventHandler() VoidHandler
	SetNewFrameEventHandler(value VoidHandler)

	CursorMoveHandler() VoidHandler
	SetCursorMoveHandler(value VoidHandler)
}

An interface definition for the PGDisplayDescriptor class.

Specifying the Display Properties

Setting the Dispatch Queue

Managing Cursor Events

Handling Mode Changes

Handling Frame Events

Instance Properties

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor

type IPGDisplayMode

type IPGDisplayMode interface {
	objectivec.IObject

	// Creates a new display mode.
	InitWithSizeInPixelsRefreshRateInHz(sizeInPixels PGDisplayCoord_t, refreshRateInHz float64) PGDisplayMode

	// The display mode’s dimensions in pixels.
	SizeInPixels() PGDisplayCoord_t
	// The mode’s refresh rate.
	RefreshRate() float64
}

An interface definition for the PGDisplayMode class.

Creating a Display Mode

Inspecting Mode Properties

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayMode

type PGAddTraceRange

type PGAddTraceRange = func(range_ *PGPhysicalMemoryRange_s, handler func(*PGPhysicalMemoryRange_s)) *uintptr

PGAddTraceRange is the block signature for a routine that adds a trace range.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGAddTraceRange

type PGCreateTask

type PGCreateTask = func(vmSize uint64, baseAddress unsafe.Pointer) *uintptr

PGCreateTask is the block signature for a routine that creates a task.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGCreateTask

type PGDestroyTask

type PGDestroyTask = func(task *uintptr)

PGDestroyTask is the block signature for a routine that destroys a task.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDestroyTask

type PGDevice

type PGDevice interface {
	objectivec.IObject

	// Reads data from the virtual graphics device’s memory-mapped I/O region.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/mmioRead(atOffset:)
	MmioReadAtOffset(offset uintptr) uint32

	// Writes data to the virtual graphics device’s memory-mapped I/O region.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/mmioWrite(atOffset:value:)
	MmioWriteAtOffsetValue(offset uintptr, value uint32)

	// Notifies the virtual graphics device to start suspending graphics activities.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/willSuspend()
	WillSuspend()

	// Notifies the virtualized graphics device to finish suspending graphics activities.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/finishSuspend()
	FinishSuspend() foundation.NSData

	// Tells a new device object to load a previously saved device’s suspend state.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/willResume(withSuspendState:error:)
	WillResumeWithSuspendStateError(suspendState foundation.NSData) (bool, error)

	// Tells the device object to finish any remaining work to resume processing of a previously saved device’s suspend state.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/didResume()
	DidResume()

	// Create a display from the specified descriptor and uniquifying parameters.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/newDisplay(with:port:serialNum:)
	NewDisplayWithDescriptorPortSerialNum(descriptor IPGDisplayDescriptor, port uint, serialNum uint32) PGDisplay

	// Pause protocol.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/pause()
	Pause()

	// Reset protocol.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/reset()
	Reset()

	// Stop protocol.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/stop()
	Stop()

	// Unpause protocol.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/unpause()
	Unpause()
}

A paravirtualized GPU device object.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice

type PGDeviceDescriptor

type PGDeviceDescriptor struct {
	objectivec.Object
}

A description of the paravirtualized graphics device to create.

Specifying the GPU

Managing Tasks

Managing Memory Operations

Specifying Trace Behavior

Handling Interrupts

Specifying Virtual Device Properties

Instance Properties

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor

func NewPGDeviceDescriptor

func NewPGDeviceDescriptor() PGDeviceDescriptor

NewPGDeviceDescriptor creates a new PGDeviceDescriptor instance.

func PGDeviceDescriptorFromID

func PGDeviceDescriptorFromID(id objc.ID) PGDeviceDescriptor

PGDeviceDescriptorFromID constructs a PGDeviceDescriptor from an objc.ID.

A description of the paravirtualized graphics device to create.

func (PGDeviceDescriptor) AddTraceRange

A handler that the framework calls to add a trace range.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/addTraceRange

func (PGDeviceDescriptor) Autorelease

func (p PGDeviceDescriptor) Autorelease() PGDeviceDescriptor

Autorelease adds the receiver to the current autorelease pool.

func (PGDeviceDescriptor) CreateTask

A handler that the framework calls to create a task object.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/createTask

func (PGDeviceDescriptor) DestroyTask

func (p PGDeviceDescriptor) DestroyTask() PGDestroyTask

A handler that the framework calls to destroy a task object.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/destroyTask

func (PGDeviceDescriptor) Device

func (p PGDeviceDescriptor) Device() metal.MTLDevice

The Metal device object to use to back the virtual graphics device.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/device

func (PGDeviceDescriptor) Init

Init initializes the instance.

func (PGDeviceDescriptor) MapMemory

func (p PGDeviceDescriptor) MapMemory() PGMapMemory

A handler that the framework calls to map memory into the virtual machine.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/mapMemory

func (PGDeviceDescriptor) MmioLength

func (p PGDeviceDescriptor) MmioLength() uintptr

The length in bytes of the memory-mapped IO section.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/mmioLength

func (PGDeviceDescriptor) RaiseInterrupt

func (p PGDeviceDescriptor) RaiseInterrupt() PGRaiseInterrupt

A handler that the system calls to raise an interrupt in the guest environment.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/raiseInterrupt

func (PGDeviceDescriptor) ReadMemory

func (p PGDeviceDescriptor) ReadMemory() BoolUint64Handler

A handler that the framework calls to read data from the guest’s memory.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/readMemory

func (PGDeviceDescriptor) RemoveTraceRange

func (p PGDeviceDescriptor) RemoveTraceRange() PGRemoveTraceRange

A handler that the framework calls to remove a trace range.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/removeTraceRange

func (PGDeviceDescriptor) SetAddTraceRange

func (PGDeviceDescriptor) SetCreateTask

func (p PGDeviceDescriptor) SetCreateTask(value UintptrUint64Handler)

func (PGDeviceDescriptor) SetDestroyTask

func (p PGDeviceDescriptor) SetDestroyTask(value objc.ID)

func (PGDeviceDescriptor) SetDevice

func (p PGDeviceDescriptor) SetDevice(value metal.MTLDevice)

func (PGDeviceDescriptor) SetDisplayPortCount

func (p PGDeviceDescriptor) SetDisplayPortCount(value uint32)

func (PGDeviceDescriptor) SetMapMemory

func (p PGDeviceDescriptor) SetMapMemory(value objc.ID)

func (PGDeviceDescriptor) SetMmioLength

func (p PGDeviceDescriptor) SetMmioLength(value uintptr)

func (PGDeviceDescriptor) SetRaiseInterrupt

func (p PGDeviceDescriptor) SetRaiseInterrupt(value PGRaiseInterrupt)

func (PGDeviceDescriptor) SetReadMemory

func (p PGDeviceDescriptor) SetReadMemory(value BoolUint64Handler)

func (PGDeviceDescriptor) SetRemoveTraceRange

func (p PGDeviceDescriptor) SetRemoveTraceRange(value objc.ID)

func (PGDeviceDescriptor) SetUnmapMemory

func (p PGDeviceDescriptor) SetUnmapMemory(value objc.ID)

func (PGDeviceDescriptor) UnmapMemory

func (p PGDeviceDescriptor) UnmapMemory() PGUnmapMemory

A handler that the framework calls to unmap memory from the virtual machine.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDeviceDescriptor/unmapMemory

type PGDeviceDescriptorClass

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

func GetPGDeviceDescriptorClass

func GetPGDeviceDescriptorClass() PGDeviceDescriptorClass

GetPGDeviceDescriptorClass returns the class object for PGDeviceDescriptor.

func (PGDeviceDescriptorClass) Alloc

Alloc allocates memory for a new instance of the class.

func (PGDeviceDescriptorClass) Class

func (pc PGDeviceDescriptorClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type PGDeviceObject

type PGDeviceObject struct {
	objectivec.Object
}

PGDeviceObject wraps an existing Objective-C object that conforms to the PGDevice protocol.

func PGDeviceObjectFromID

func PGDeviceObjectFromID(id objc.ID) PGDeviceObject

PGDeviceObjectFromID constructs a PGDeviceObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func PGNewDeviceWithDescriptor

func PGNewDeviceWithDescriptor(descriptor *PGDeviceDescriptor) PGDeviceObject

PGNewDeviceWithDescriptor creates a new paravirtualized graphics device.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGNewDeviceWithDescriptor(_:)

func (PGDeviceObject) BaseObject

func (o PGDeviceObject) BaseObject() objectivec.Object

func (PGDeviceObject) DidResume

func (o PGDeviceObject) DidResume()

Tells the device object to finish any remaining work to resume processing of a previously saved device’s suspend state.

Discussion

After you call this method, the virtualized device can generate new interrupts immediately, even before the call completes. Similarly, guest memory must also be accessible before you call this method.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/didResume()

func (PGDeviceObject) FinishSuspend

func (o PGDeviceObject) FinishSuspend() foundation.NSData

Notifies the virtualized graphics device to finish suspending graphics activities.

Return Value

The suspend state data, or `nil` if an error occurred.

Discussion

This method may take an arbitrary amount of time as the device needs to complete any unfinished GPU work. After this call completes, you can’t perform any further operations on this device object and must release it.

Typically, your app serializes the suspend state data to persistant storage. Pass the suspend state data to a new device object when you want to resume graphics operations.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/finishSuspend()

func (PGDeviceObject) MmioReadAtOffset

func (o PGDeviceObject) MmioReadAtOffset(offset uintptr) uint32

Reads data from the virtual graphics device’s memory-mapped I/O region.

offset: The offset into the MMIO bar to write to.

Return Value

The 32-bit unsigned integer from the MMIO region.

Discussion

Call this method whenever the guest virtual machine reads from the graphics device’s memory-mapped I/O region.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/mmioRead(atOffset:)

func (PGDeviceObject) MmioWriteAtOffsetValue

func (o PGDeviceObject) MmioWriteAtOffsetValue(offset uintptr, value uint32)

Writes data to the virtual graphics device’s memory-mapped I/O region.

offset: The offset into the MMIO bar to write to.

value: The value to write to memory.

Discussion

Call this method whenever the guest virtual machine writes to the graphics device’s memory-mapped I/O region.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/mmioWrite(atOffset:value:)

func (PGDeviceObject) NewDisplayWithDescriptorPortSerialNum

func (o PGDeviceObject) NewDisplayWithDescriptorPortSerialNum(descriptor IPGDisplayDescriptor, port uint, serialNum uint32) PGDisplay

Create a display from the specified descriptor and uniquifying parameters.

descriptor: The description of the new display.

port: The port number on the accelerator for the device to use for the new display. Specify a unique port number for each display.

serialNum: A number that uniquely identifies the display. Ensure that the display persists across multiple launches so that the guest compositor can maintain a consistent display layout.

Return Value

A new display object, or `nil` if an error occurred.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/newDisplay(with:port:serialNum:)

func (PGDeviceObject) WillResumeWithSuspendStateError

func (o PGDeviceObject) WillResumeWithSuspendStateError(suspendState foundation.NSData) (bool, error)

Tells a new device object to load a previously saved device’s suspend state.

suspendState: The suspend data that you previously saved when you suspended an earlier device object.

Return Value

A Boolean value that indicates whether the framework was able to start restoring the graphics data.

Discussion

This method sets up the device to appear in the same state it was in before the suspend. The device object doesn’t access guest memory during the call to this method.

When resuming from an earlier suspended device, this must be the first method that you call on the newly created device object. When you call this method, ensure that the guest CPUs aren’t running.

After you call this method, reattach any suspended displays before calling [DidResume].

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/willResume(withSuspendState:error:)

func (PGDeviceObject) WillSuspend

func (o PGDeviceObject) WillSuspend()

Notifies the virtual graphics device to start suspending graphics activities.

Discussion

The virtualized device stops generating interrupts and won’t accept new commands from the guest. You must halt any guest CPUs within a short interval after you call this method.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDevice/willSuspend()

type PGDisplay

type PGDisplay interface {
	objectivec.IObject

	// Encodes Metal commands to process the current frame and write it to a texture.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/encodeCurrentFrame(to:texture:region:)
	EncodeCurrentFrameToCommandBufferTextureRegion(commandBuffer metal.MTLCommandBuffer, texture metal.MTLTexture, region metal.MTLRegion) bool

	// The list of display modes that the virtual display supports.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/modeList
	ModeList() []PGDisplayMode
	SetModeList(value []PGDisplayMode)

	// The current cursor location in the guest environment.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/cursorPosition
	CursorPosition() PGDisplayCoord_t

	// The number of frame presents that the guest has generated since object creation.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/guestPresentCount
	GuestPresentCount() uint

	// The number of unique frames that the host has encoded since object creation.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/hostPresentCount
	HostPresentCount() uint

	// The Metal texture usage flags necessary for any texture that can be a destination for frame data.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/minimumTextureUsage
	MinimumTextureUsage() metal.MTLTextureUsage

	// The display’s name that you specified at creation time.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/name
	Name() string

	// The display’s serial number that you specified at creation time.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/serialNum
	SerialNum() uint32

	// The display’s accelerator port that you specified at creation time.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/port
	Port() uint

	// The display’s virtual dimensions, in millimeters, that you specified at creation time.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/sizeInMillimeters
	SizeInMillimeters() corefoundation.CGSize

	// The queue that the framework uses when dispatching messages to any of the display’s registered handlers.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/queue
	Queue() dispatch.Queue

	// A handler that the framework calls to change the cursor’s appearance.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/cursorGlyphHandler
	CursorGlyphHandler() PGDisplayCursorGlyphHandler

	// A handler that the framework calls to change the cursor’s visibility.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/cursorShowHandler
	CursorShowHandler() PGDisplayCursorShowHandler

	// A handler that the framework calls to change the virtual display’s graphics mode.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/modeChangeHandler
	ModeChangeHandler() PGDisplayModeChangeHandler

	// A handler that the framework calls when the guest environment has a new frame to display.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/newFrameEventHandler
	NewFrameEventHandler() PGDisplayNewFrameEventHandler

	// cursorMoveHandler protocol.
	//
	// See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/cursorMoveHandler
	CursorMoveHandler() PGDisplayCursorMoveHandler
}

An object that provides display functionality to the guest operating system in a way that the host-side virtual machine app can intercept.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay

type PGDisplayCoord_t

type PGDisplayCoord_t struct {
	X uint16 // The horizontal coordinate value.
	Y uint16 // The vertical coordinate value.

}

PGDisplayCoord_t - Coordinates that describe sizes or offsets within a 2D array of pixels.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayCoord_t

type PGDisplayCoord_tUint32Handler

type PGDisplayCoord_tUint32Handler = func(PGDisplayCoord_t, uint32)

PGDisplayCoord_tUint32Handler handles completion with primitive and object results.

type PGDisplayCursorGlyphHandler

type PGDisplayCursorGlyphHandler = func(glyph appkit.NSBitmapImageRep, hotSpot PGDisplayCoord_t)

PGDisplayCursorGlyphHandler is the block signature for a routine that handles changes to the cursor’s appearance.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayCursorGlyphHandler

type PGDisplayCursorShowHandler

type PGDisplayCursorShowHandler = func(show bool)

PGDisplayCursorShowHandler is the block signature for a routine that handles changes to the cursor’s visibility.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayCursorShowHandler

type PGDisplayDescriptor

type PGDisplayDescriptor struct {
	objectivec.Object
}

A descriptor for a virtual display.

Specifying the Display Properties

Setting the Dispatch Queue

Managing Cursor Events

Handling Mode Changes

Handling Frame Events

Instance Properties

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor

func NewPGDisplayDescriptor

func NewPGDisplayDescriptor() PGDisplayDescriptor

NewPGDisplayDescriptor creates a new PGDisplayDescriptor instance.

func PGDisplayDescriptorFromID

func PGDisplayDescriptorFromID(id objc.ID) PGDisplayDescriptor

PGDisplayDescriptorFromID constructs a PGDisplayDescriptor from an objc.ID.

A descriptor for a virtual display.

func (PGDisplayDescriptor) Autorelease

func (p PGDisplayDescriptor) Autorelease() PGDisplayDescriptor

Autorelease adds the receiver to the current autorelease pool.

func (PGDisplayDescriptor) CursorGlyphHandler

A handler that the framework calls to change the cursor’s appearance.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor/cursorGlyphHandler

func (PGDisplayDescriptor) CursorShowHandler

func (p PGDisplayDescriptor) CursorShowHandler() PGDisplayCursorShowHandler

A handler that the framework calls to change the cursor’s visibility.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor/cursorShowHandler

func (PGDisplayDescriptor) Init

Init initializes the instance.

func (PGDisplayDescriptor) ModeChangeHandler

func (p PGDisplayDescriptor) ModeChangeHandler() PGDisplayCoord_tUint32Handler

A handler that the framework calls to change the virtual display’s graphics mode.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor/modeChangeHandler

func (PGDisplayDescriptor) Name

func (p PGDisplayDescriptor) Name() string

The display’s name as seen in the guest operating environment.

Discussion

The default value is `Apple Virtual`. The framework truncates the name to 13 characters.

The device propagates the display name into the guest environment, so the name may be visible in the guest operating system’s user interface.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor/name

func (PGDisplayDescriptor) NewFrameEventHandler

func (p PGDisplayDescriptor) NewFrameEventHandler() VoidHandler

A handler that the framework calls when the guest environment has a new frame to display.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor/newFrameEventHandler

func (PGDisplayDescriptor) Queue

The queue that the framework uses when dispatching messages to any of the display’s registered handlers.

Discussion

Most often, your app provides a serial queue. If you can benefit from dispatching events out of order, handle the messages on the serial queue and redispatch them to other queues as necessary.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor/queue

func (PGDisplayDescriptor) SetCursorGlyphHandler

func (p PGDisplayDescriptor) SetCursorGlyphHandler(value BitmapImageRepPGDisplayCoord_tHandler)

func (PGDisplayDescriptor) SetCursorMoveHandler

func (p PGDisplayDescriptor) SetCursorMoveHandler(value VoidHandler)

func (PGDisplayDescriptor) SetCursorShowHandler

func (p PGDisplayDescriptor) SetCursorShowHandler(value PGDisplayCursorShowHandler)

func (PGDisplayDescriptor) SetModeChangeHandler

func (p PGDisplayDescriptor) SetModeChangeHandler(value PGDisplayCoord_tUint32Handler)

func (PGDisplayDescriptor) SetName

func (p PGDisplayDescriptor) SetName(value string)

func (PGDisplayDescriptor) SetNewFrameEventHandler

func (p PGDisplayDescriptor) SetNewFrameEventHandler(value VoidHandler)

func (PGDisplayDescriptor) SetQueue

func (p PGDisplayDescriptor) SetQueue(value dispatch.Queue)

func (PGDisplayDescriptor) SetSizeInMillimeters

func (p PGDisplayDescriptor) SetSizeInMillimeters(value corefoundation.CGSize)

func (PGDisplayDescriptor) SizeInMillimeters

func (p PGDisplayDescriptor) SizeInMillimeters() corefoundation.CGSize

The size in millimeters of the virtual display.

Discussion

The device propagates the display size to the guest operating system. The app can scale the resulting screen data to a different size in its user interface.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayDescriptor/sizeInMillimeters

type PGDisplayDescriptorClass

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

func GetPGDisplayDescriptorClass

func GetPGDisplayDescriptorClass() PGDisplayDescriptorClass

GetPGDisplayDescriptorClass returns the class object for PGDisplayDescriptor.

func (PGDisplayDescriptorClass) Alloc

Alloc allocates memory for a new instance of the class.

func (PGDisplayDescriptorClass) Class

func (pc PGDisplayDescriptorClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type PGDisplayMode

type PGDisplayMode struct {
	objectivec.Object
}

A description of a supported display mode.

Creating a Display Mode

Inspecting Mode Properties

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayMode

func NewPGDisplayMode

func NewPGDisplayMode() PGDisplayMode

NewPGDisplayMode creates a new PGDisplayMode instance.

func NewPGDisplayModeWithSizeInPixelsRefreshRateInHz

func NewPGDisplayModeWithSizeInPixelsRefreshRateInHz(sizeInPixels PGDisplayCoord_t, refreshRateInHz float64) PGDisplayMode

Creates a new display mode.

sizeInPixels: The display mode’s dimensions in pixels.

refreshRateInHz: The mode’s refresh rate.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayMode/init(sizeInPixels:refreshRateInHz:)

func PGDisplayModeFromID

func PGDisplayModeFromID(id objc.ID) PGDisplayMode

PGDisplayModeFromID constructs a PGDisplayMode from an objc.ID.

A description of a supported display mode.

func (PGDisplayMode) Autorelease

func (p PGDisplayMode) Autorelease() PGDisplayMode

Autorelease adds the receiver to the current autorelease pool.

func (PGDisplayMode) Init

func (p PGDisplayMode) Init() PGDisplayMode

Init initializes the instance.

func (PGDisplayMode) InitWithSizeInPixelsRefreshRateInHz

func (p PGDisplayMode) InitWithSizeInPixelsRefreshRateInHz(sizeInPixels PGDisplayCoord_t, refreshRateInHz float64) PGDisplayMode

Creates a new display mode.

sizeInPixels: The display mode’s dimensions in pixels.

refreshRateInHz: The mode’s refresh rate.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayMode/init(sizeInPixels:refreshRateInHz:)

func (PGDisplayMode) RefreshRate

func (p PGDisplayMode) RefreshRate() float64

The mode’s refresh rate.

Discussion

Consider supplying only modes that have a refresh rate equal to that of the host environment’s physical display.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayMode/refreshRate

func (PGDisplayMode) SizeInPixels

func (p PGDisplayMode) SizeInPixels() PGDisplayCoord_t

The display mode’s dimensions in pixels.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayMode/sizeInPixels

type PGDisplayModeChangeHandler

type PGDisplayModeChangeHandler = func(sizeInPixels PGDisplayCoord_t, pixelFormat uint32)

PGDisplayModeChangeHandler is the block signature for a routine that handles changes to the display’s graphics mode.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayModeChangeHandler

type PGDisplayModeClass

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

func GetPGDisplayModeClass

func GetPGDisplayModeClass() PGDisplayModeClass

GetPGDisplayModeClass returns the class object for PGDisplayMode.

func (PGDisplayModeClass) Alloc

func (pc PGDisplayModeClass) Alloc() PGDisplayMode

Alloc allocates memory for a new instance of the class.

func (PGDisplayModeClass) Class

func (pc PGDisplayModeClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type PGDisplayNewFrameEventHandler

type PGDisplayNewFrameEventHandler = func()

PGDisplayNewFrameEventHandler is the block signature for a routine that handles frame updates from the guest.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplayNewFrameEventHandler

type PGDisplayObject

type PGDisplayObject struct {
	objectivec.Object
}

PGDisplayObject wraps an existing Objective-C object that conforms to the PGDisplay protocol.

func PGDisplayObjectFromID

func PGDisplayObjectFromID(id objc.ID) PGDisplayObject

PGDisplayObjectFromID constructs a PGDisplayObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func (PGDisplayObject) BaseObject

func (o PGDisplayObject) BaseObject() objectivec.Object

func (PGDisplayObject) CursorGlyphHandler

func (o PGDisplayObject) CursorGlyphHandler() PGDisplayCursorGlyphHandler

A handler that the framework calls to change the cursor’s appearance.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/cursorGlyphHandler

func (PGDisplayObject) CursorPosition

func (o PGDisplayObject) CursorPosition() PGDisplayCoord_t

The current cursor location in the guest environment.

Discussion

If the cursor isn’t on the display, this property’s value is `(0xFFFF, 0xFFFF)`.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/cursorPosition

func (PGDisplayObject) CursorShowHandler

func (o PGDisplayObject) CursorShowHandler() PGDisplayCursorShowHandler

A handler that the framework calls to change the cursor’s visibility.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/cursorShowHandler

func (PGDisplayObject) EncodeCurrentFrameToCommandBufferTextureRegion

func (o PGDisplayObject) EncodeCurrentFrameToCommandBufferTextureRegion(commandBuffer metal.MTLCommandBuffer, texture metal.MTLTexture, region metal.MTLRegion) bool

Encodes Metal commands to process the current frame and write it to a texture.

commandBuffer: The Metal command buffer for encoding the processing of the new frame.

texture: The destination texture.

region: The region within the Metal texture for the frame data to land in.

Return Value

Returns true if the method encoded the commands successfully; otherwise false.

Discussion

This method encodes Metal commands to process the new frame, dealing with color matching, gamma, and other factors. The GPU writes data to a region inside the destination texture, linearly scaled as necessary to fit in the specified region. The encoded commands won’t change any texture data outside the specified region.

The texture and command buffer must share the same Metal device object that you used to create the virtual graphics device. The destination texture must specify all of the usage bits that the display’s [MinimumTextureUsage] property provides, but can specify additional flags.

Typically, you encode frame processing in response to a call to the frame event handler you specified when you created the display object. See PGDisplayDescriptor.NewFrameEventHandler for more information.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/encodeCurrentFrame(to:texture:region:)

func (PGDisplayObject) GuestPresentCount

func (o PGDisplayObject) GuestPresentCount() uint

The number of frame presents that the guest has generated since object creation.

Discussion

This value can exceed the number of times that the framework invokes the PGDisplayDescriptor.NewFrameEventHandler block if the host isn’t encoding frames fast enough to keep up.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/guestPresentCount

func (PGDisplayObject) HostPresentCount

func (o PGDisplayObject) HostPresentCount() uint

The number of unique frames that the host has encoded since object creation.

Discussion

The value of this property can be smaller than the number of times you’ve called the [EncodeCurrentFrameToCommandBufferTextureRegion] method if you encode the same frame multiple times.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/hostPresentCount

func (PGDisplayObject) MinimumTextureUsage

func (o PGDisplayObject) MinimumTextureUsage() metal.MTLTextureUsage

The Metal texture usage flags necessary for any texture that can be a destination for frame data.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/minimumTextureUsage

func (PGDisplayObject) ModeChangeHandler

func (o PGDisplayObject) ModeChangeHandler() PGDisplayModeChangeHandler

A handler that the framework calls to change the virtual display’s graphics mode.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/modeChangeHandler

func (PGDisplayObject) ModeList

func (o PGDisplayObject) ModeList() []PGDisplayMode

The list of display modes that the virtual display supports.

Discussion

The maximum number of display modes is `128`. Setting this property updates the virtual graphics device’s supported mode list, and potentially forces it to change its current mode. The first time you set this property, the device simulates hot-plugging the display to the graphics device.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/modeList

func (PGDisplayObject) Name

func (o PGDisplayObject) Name() string

The display’s name that you specified at creation time.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/name

func (PGDisplayObject) NewFrameEventHandler

func (o PGDisplayObject) NewFrameEventHandler() PGDisplayNewFrameEventHandler

A handler that the framework calls when the guest environment has a new frame to display.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/newFrameEventHandler

func (PGDisplayObject) Port

func (o PGDisplayObject) Port() uint

The display’s accelerator port that you specified at creation time.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/port

func (PGDisplayObject) Queue

func (o PGDisplayObject) Queue() dispatch.Queue

The queue that the framework uses when dispatching messages to any of the display’s registered handlers.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/queue

func (PGDisplayObject) SerialNum

func (o PGDisplayObject) SerialNum() uint32

The display’s serial number that you specified at creation time.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/serialNum

func (PGDisplayObject) SetModeList

func (o PGDisplayObject) SetModeList(value []PGDisplayMode)

func (PGDisplayObject) SizeInMillimeters

func (o PGDisplayObject) SizeInMillimeters() corefoundation.CGSize

The display’s virtual dimensions, in millimeters, that you specified at creation time.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGDisplay/sizeInMillimeters

type PGMapMemory

type PGMapMemory = func(task *uintptr, rangeCount uint32, virtualOffset uint64, readOnly bool, ranges *PGPhysicalMemoryRange_s) bool

PGMapMemory is the block signature for a routine that maps guest physical memory into a task.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGMapMemory

type PGPhysicalMemoryRange

type PGPhysicalMemoryRange = PGPhysicalMemoryRange_t

PGPhysicalMemoryRange is a Go-name alias for PGPhysicalMemoryRange_t.

type PGPhysicalMemoryRange_s

type PGPhysicalMemoryRange_s struct {
	PhysicalAddress uint64 // The starting address of the range in physical memory.
	PhysicalLength  uint64 // The length of the range.

}

PGPhysicalMemoryRange_s - A range in the guest virtual machine’s physical memory address space.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGPhysicalMemoryRange_s

type PGRaiseInterrupt

type PGRaiseInterrupt = func(vector uint32)

PGRaiseInterrupt is the block signature for a routine that raises interrupts in the guest environment.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGRaiseInterrupt

type PGReadMemory

type PGReadMemory = func(physicalAddress uint64, length uint64, dst unsafe.Pointer) bool

PGReadMemory is the block signature for a routine that copies data from guest physical memory into host memory.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGReadMemory

type PGRemoveTraceRange

type PGRemoveTraceRange = func(range_ *uintptr)

PGRemoveTraceRange is the block signature for a routine that removes a trace range.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGRemoveTraceRange

type PGResumeErrorCode

type PGResumeErrorCode uint

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGResumeErrorCode

const (
	// PGResumeErrorCodeIncompatibleDevice: The resume device is missing capabilities that the suspended device provided.
	PGResumeErrorCodeIncompatibleDevice PGResumeErrorCode = 4
	// PGResumeErrorCodeInternalFault: An internal error occurred.
	PGResumeErrorCodeInternalFault PGResumeErrorCode = 0
	// PGResumeErrorCodeInvalidContent: The content of the suspend state or the guest memory isn’t valid.
	PGResumeErrorCodeInvalidContent          PGResumeErrorCode = 2
	PGResumeErrorCodeInvalidDisplayPortCount PGResumeErrorCode = 5
	// PGResumeErrorCodeInvalidGuestVersion: The guest version is incompatible with this framework version.
	PGResumeErrorCodeInvalidGuestVersion PGResumeErrorCode = 3
	// PGResumeErrorCodeInvalidSuspendStateVersion: The suspend state version is incompatible with this framework version.
	PGResumeErrorCodeInvalidSuspendStateVersion PGResumeErrorCode = 1
)

func (PGResumeErrorCode) String

func (e PGResumeErrorCode) String() string

type PGTask

type PGTask = PGTask_t

PGTask is a Go-name alias for PGTask_t.

type PGTask_t

type PGTask_t unsafe.Pointer

PGTask_t is an opaque data pointer representing a specific virtual task.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGTask_t PGTask_t is an unresolved C aggregate typedef.

type PGTraceRange

type PGTraceRange = PGTraceRange_t

PGTraceRange is a Go-name alias for PGTraceRange_t.

type PGTraceRangeHandler

type PGTraceRangeHandler = func(dirty *PGPhysicalMemoryRange_s)

PGTraceRangeHandler is the block signature for a routine that handles trace requests.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGTraceRangeHandler

type PGTraceRange_t

type PGTraceRange_t unsafe.Pointer

PGTraceRange_t is an opaque data pointer representing a specific trace.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGTraceRange_t PGTraceRange_t is an unresolved C aggregate typedef.

type PGUnmapMemory

type PGUnmapMemory = func(task *uintptr, virtualOffset uint64, length uint64) bool

PGUnmapMemory is the block signature for a routine that unmaps guest physical memory from a task.

See: https://developer.apple.com/documentation/ParavirtualizedGraphics/PGUnmapMemory

type UintptrPGPhysicalMemoryRange_sHandler

type UintptrPGPhysicalMemoryRange_sHandler = func(*PGPhysicalMemoryRange_s) *uintptr

UintptrPGPhysicalMemoryRange_sHandler handles a primitive value and returns a primitive value.

type UintptrUint64Handler

type UintptrUint64Handler = func(uint64) *uintptr

UintptrUint64Handler handles a primitive value and returns a primitive value.

type VoidHandler

type VoidHandler = func()

VoidHandler is the signature for a completion handler block.

Jump to

Keyboard shortcuts

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