<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ParavirtualizedGraphics",
  "identifier" : "/documentation/ParavirtualizedGraphics/PGDisplay",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Paravirtualized Graphics"
    ],
    "preciseIdentifier" : "c:objc(pl)PGDisplay"
  },
  "title" : "PGDisplay"
}
-->

# PGDisplay

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

```
protocol PGDisplay : NSObjectProtocol
```

## Overview

The framework emulates hot-plugging to the display. After you create the display object, set the [`modeList`](/documentation/ParavirtualizedGraphics/PGDisplay/modeList) property to a list of modes you want the display to use. The first time you set the mode list, the framework connects the display to the virtualized graphics card. When you release the display object, the device simulates unplugging the display.

## Topics

### Setting Display Modes

[`modeList`](/documentation/ParavirtualizedGraphics/PGDisplay/modeList)

The list of display modes that the virtual display supports.

### Getting the Guest Cursor Position

[`cursorPosition`](/documentation/ParavirtualizedGraphics/PGDisplay/cursorPosition)

The current cursor location in the guest environment.

### Handling Frame Updates

[`guestPresentCount`](/documentation/ParavirtualizedGraphics/PGDisplay/guestPresentCount)

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

[`hostPresentCount`](/documentation/ParavirtualizedGraphics/PGDisplay/hostPresentCount)

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

[`minimumTextureUsage`](/documentation/ParavirtualizedGraphics/PGDisplay/minimumTextureUsage)

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

[`encodeCurrentFrame(to:texture:region:)`](/documentation/ParavirtualizedGraphics/PGDisplay/encodeCurrentFrame(to:texture:region:))

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

### Inspecting Display Properties

[`name`](/documentation/ParavirtualizedGraphics/PGDisplay/name)

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

[`serialNum`](/documentation/ParavirtualizedGraphics/PGDisplay/serialNum)

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

[`port`](/documentation/ParavirtualizedGraphics/PGDisplay/port)

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

[`sizeInMillimeters`](/documentation/ParavirtualizedGraphics/PGDisplay/sizeInMillimeters)

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

### Inspecting the Display Handlers

[`queue`](/documentation/ParavirtualizedGraphics/PGDisplay/queue)

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

[`cursorGlyphHandler`](/documentation/ParavirtualizedGraphics/PGDisplay/cursorGlyphHandler)

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

[`cursorShowHandler`](/documentation/ParavirtualizedGraphics/PGDisplay/cursorShowHandler)

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

[`modeChangeHandler`](/documentation/ParavirtualizedGraphics/PGDisplay/modeChangeHandler)

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

[`newFrameEventHandler`](/documentation/ParavirtualizedGraphics/PGDisplay/newFrameEventHandler)

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

### Instance Properties

[`cursorMoveHandler`](/documentation/ParavirtualizedGraphics/PGDisplay/cursorMoveHandler)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)