# IDisplay Interface Reference

The IDisplay interface represents the virtual machine's display. More...

List of all members.

## Public Member Functions
void | setupInternalFramebuffer (in unsigned long depth)
| Prepares an internally managed framebuffer.
void | lockFramebuffer ([retval] out octetPtr address)
| Requests access to the internal framebuffer.
void | unlockFramebuffer ()
| Releases access to the internal framebuffer.
void | registerExternalFramebuffer (in IFramebuffer framebuffer)
| Registers an external framebuffer.
void | setFramebuffer (in unsigned long screenId, in IFramebuffer framebuffer)
| Sets the framebuffer for given screen.
void | getFramebuffer (in unsigned long screenId, out IFramebuffer framebuffer, out long xOrigin, out long yOrigin)
| Queries the framebuffer for given screen.
void | setVideoModeHint (in unsigned long width, in unsigned long height, in unsigned long bitsPerPixel, in unsigned long display)
| Asks VirtualBox to request the given video mode from the guest.
void | setSeamlessMode (in boolean enabled)
| Enables or disables seamless guest display rendering (seamless desktop integration) mode.
void | takeScreenShot (in octetPtr address, in unsigned long width, in unsigned long height)
| Takes a screen shot of the requested size and copies it to the 32-bpp buffer allocated by the caller.
void | drawToScreen (in octetPtr address, in unsigned long x, in unsigned long y, in unsigned long width, in unsigned long height)
| Draws a 32-bpp image of the specified size from the given buffer to the given point on the VM display.
void | invalidateAndUpdate ()
| Does a full invalidation of the VM display and instructs the VM to update it.
void | resizeCompleted (in unsigned long screenId)
| Signals that a framebuffer has completed the resize operation.
void | updateCompleted ()
| Signals that a framebuffer has completed the update operation.
## Public Attributes
readonly attribute unsigned long | width
| Current display width.
readonly attribute unsigned long | height
| Current display height.
readonly attribute unsigned long | bitsPerPixel
| Current guest display color depth.

## Detailed Description

The IDisplay interface represents the virtual machine's display.

The object implementing this interface is contained in each IConsole::display attribute and represents the visual output of the virtual machine.

The virtual display supports pluggable output targets represented by the IFramebuffer interface. Examples of the output target are a window on the host computer or an RDP sessoin's display on a remote computer.

Interface ID:
  `{09789F63-4525-48E5-A5E4-1080453B0EAB}`

## Member Function Documentation

void IDisplay::setupInternalFramebuffer | ( | in unsigned long | depth | ) |

Prepares an internally managed framebuffer.

void IDisplay::lockFramebuffer | ( | [retval] out octetPtr | address | ) |

Requests access to the internal framebuffer.

Warning:
  This method is non-scriptable. In particluar, this also means that an attempt to call it from a process other than the process that has created and owns the object will most likely fail or crash your application.

void IDisplay::unlockFramebuffer | ( |  | ) |

Releases access to the internal framebuffer.

void IDisplay::registerExternalFramebuffer | ( | in IFramebuffer | framebuffer | ) |

Registers an external framebuffer.

void IDisplay::setFramebuffer | ( | in unsigned long | screenId,
|  | in IFramebuffer | framebuffer |
| ) |  |  |

Sets the framebuffer for given screen.

void IDisplay::getFramebuffer | ( | in unsigned long | screenId,
|  | out IFramebuffer | framebuffer,
|  | out long | xOrigin,
|  | out long | yOrigin |
| ) |  |  |

Queries the framebuffer for given screen.

void IDisplay::setVideoModeHint | ( | in unsigned long | width,
|  | in unsigned long | height,
|  | in unsigned long | bitsPerPixel,
|  | in unsigned long | display |
| ) |  |  |

Asks VirtualBox to request the given video mode from the guest.

This is just a hint and it cannot be guaranteed that the requested resolution will be used. Guest Additions are required for the request to be seen by guests. The caller should issue the request and wait for a resolution change and after a timeout retry.

Specifying `0` for either width, height or bitsPerPixel parameters means that the corresponding values should be taken from the current video mode (i.e. left unchanged).

If the guest OS supports multi-monitor configuration then the display parameter specifies the number of the guest display to send the hint to: `0` is the primary display, `1` is the first secondary and so on. If the multi-monitor configuration is not supported, display must be `0`.

void IDisplay::setSeamlessMode | ( | in boolean | enabled | ) |

Enables or disables seamless guest display rendering (seamless desktop integration) mode.

Note:
  Calling this method has no effect if IGuest::supportsSeamless returns `false`.

void IDisplay::takeScreenShot | ( | in octetPtr | address,
|  | in unsigned long | width,
|  | in unsigned long | height |
| ) |  |  |

Takes a screen shot of the requested size and copies it to the 32-bpp buffer allocated by the caller.

Warning:
  This method is non-scriptable. In particluar, this also means that an attempt to call it from a process other than the process that has created and owns the object will most likely fail or crash your application.

void IDisplay::drawToScreen | ( | in octetPtr | address,
|  | in unsigned long | x,
|  | in unsigned long | y,
|  | in unsigned long | width,
|  | in unsigned long | height |
| ) |  |  |

Draws a 32-bpp image of the specified size from the given buffer to the given point on the VM display.

Warning:
  This method is non-scriptable. In particluar, this also means that an attempt to call it from a process other than the process that has created and owns the object will most likely fail or crash your application.

void IDisplay::invalidateAndUpdate | ( |  | ) |

Does a full invalidation of the VM display and instructs the VM to update it.

void IDisplay::resizeCompleted | ( | in unsigned long | screenId | ) |

Signals that a framebuffer has completed the resize operation.

void IDisplay::updateCompleted | ( |  | ) |

Signals that a framebuffer has completed the update operation.

## Member Data Documentation

readonly attribute unsigned long IDisplay::width

Current display width.

readonly attribute unsigned long IDisplay::height

Current display height.

readonly attribute unsigned long IDisplay::bitsPerPixel

Current guest display color depth.

Note that this may differ from IFramebuffer::bitsPerPixel.