VirtualBox Main API

Public Member Functions | List of all members
IDnDSource Interface Reference

Abstract interface for handling drag'n drop sources. More...

Inheritance diagram for IDnDSource:

## Public Member Functions
void | dragIsPending (in unsigned long screenId, out wstring[] formats, out DnDAction[] allowedActions, [retval] out DnDAction defaultAction)
| Ask the source if there is any drag and drop operation pending. More...
void | drop (in wstring format, in DnDAction action, [retval] out IProgress progress)
| Informs the source that a drop event occurred for a pending drag and drop operation. More...
void | receiveData ([retval] out octet[] data)
| Receive the data of a previously drag and drop event from the source. More...
Public Member Functions inherited from IDnDBase
void | isFormatSupported (in wstring format, [retval] out boolean supported)
| Checks if a specific drag'n drop MIME / Content-type format is supported. More...
void | addFormats (in wstring[] formats)
| Adds MIME / Content-type formats to the supported formats. More...
void | removeFormats (in wstring[] formats)
| Removes MIME / Content-type formats from the supported formats. More...

## Additional Inherited Members
Public Attributes inherited from IDnDBase
readonly attribute wstring [] | formats
| Returns all supported drag'n drop formats. More...
readonly attribute unsigned long | protocolVersion
| Returns the protocol version which is used to communicate with the guest. More...

## Detailed Description

Abstract interface for handling drag'n drop sources.

Interface ID:
  `{D23A9CA3-42DA-C94B-8AEC-21968E08355D}`

## Member Function Documentation

## ◆ dragIsPending()

void IDnDSource::dragIsPending | ( | in unsigned long | screenId,
|  | out wstring [] | formats,
|  | out DnDAction [] | allowedActions,
|  | [retval] out DnDAction | defaultAction
| ) |  |

Ask the source if there is any drag and drop operation pending.

If no drag and drop operation is pending currently, DnDAction_Ignore is returned.

Parameters

  screenId | The screen ID where the drag and drop event occurred.
  formats | On return the supported mime types.
  allowedActions | On return the actions which are allowed.
  defaultAction | On return the default action to use.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.

## ◆ drop()

void IDnDSource::drop | ( | in wstring | format,
|  | in DnDAction | action,
|  | [retval] out IProgress | progress
| ) |  |

Informs the source that a drop event occurred for a pending drag and drop operation.

Parameters

  format | The mime type the data must be in.
  action | The action to use.
  progress | Progress object to track the operation completion.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.

## ◆ receiveData()

void IDnDSource::receiveData | ( | [retval] out octet [] | data | ) |

Receive the data of a previously drag and drop event from the source.

Parameters

  data | The actual data.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.