VirtualBox Main API

Public Attributes | List of all members
IMousePointerShape Interface Reference

The guest mouse pointer description. More...

Inheritance diagram for IMousePointerShape:

## Public Attributes
readonly attribute boolean | visible
| Flag whether the pointer is visible. More...
readonly attribute boolean | alpha
| Flag whether the pointer has an alpha channel. More...
readonly attribute unsigned long | hotX
| The pointer hot spot X coordinate. More...
readonly attribute unsigned long | hotY
| The pointer hot spot Y coordinate. More...
readonly attribute unsigned long | width
| Width of the pointer shape in pixels. More...
readonly attribute unsigned long | height
| Height of the pointer shape in pixels. More...
readonly attribute octet [] | shape
| Shape bitmaps. More...

## Detailed Description

The guest mouse pointer description.

Interface ID:
  `{E04E5545-4A0F-F9D2-5BEF-F9B25B6557ED}`

## Member Data Documentation

## ◆ visible

readonly attribute boolean IMousePointerShape::visible

Flag whether the pointer is visible.

## ◆ alpha

readonly attribute boolean IMousePointerShape::alpha

Flag whether the pointer has an alpha channel.

## ◆ hotX

readonly attribute unsigned long IMousePointerShape::hotX

The pointer hot spot X coordinate.

## ◆ hotY

readonly attribute unsigned long IMousePointerShape::hotY

The pointer hot spot Y coordinate.

## ◆ width

readonly attribute unsigned long IMousePointerShape::width

Width of the pointer shape in pixels.

## ◆ height

readonly attribute unsigned long IMousePointerShape::height

Height of the pointer shape in pixels.

## ◆ shape

readonly attribute octet [] IMousePointerShape::shape

Shape bitmaps.

The shape buffer contains a 1bpp (bits per pixel) AND mask followed by a 32bpp XOR (color) mask.

For pointers without alpha channel the XOR mask pixels are 32 bit values: (lsb)BGR0(msb). For pointers with alpha channel the XOR mask consists of (lsb)BGRA(msb) 32 bit values.

An AND mask is provided for pointers with alpha channel, so if the client does not support alpha, the pointer could be displayed as a normal color pointer.

The AND mask is a 1bpp bitmap with byte aligned scanlines. The size of the AND mask therefore is `cbAnd = (width + 7) / 8 * height`. The padding bits at the end of each scanline are undefined.

The XOR mask follows the AND mask on the next 4-byte aligned offset: `uint8_t *pu8Xor = pu8And + (cbAnd + 3) & ~3`. Bytes in the gap between the AND and the XOR mask are undefined. The XOR mask scanlines have no gap between them and the size of the XOR mask is: `cbXor = width * 4 * height`.

Note
  If shape size is 0, then the shape is not known or did not change. This can happen if only the pointer visibility is changed.