VirtualBox Main API

Public Member Functions | List of all members
IDnDTarget Interface Reference

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

Inheritance diagram for IDnDTarget:

## Public Member Functions
void | enter (in unsigned long screenId, in unsigned long y, in unsigned long x, in DnDAction defaultAction, in DnDAction[] allowedActions, in wstring[] formats, [retval] out DnDAction resultAction)
| Informs the target about a drag and drop enter event.
void | move (in unsigned long screenId, in unsigned long x, in unsigned long y, in DnDAction defaultAction, in DnDAction[] allowedActions, in wstring[] formats, [retval] out DnDAction resultAction)
| Informs the target about a drag and drop move event.
void | leave (in unsigned long screenId)
| Informs the target about a drag and drop leave event.
void | drop (in unsigned long screenId, in unsigned long x, in unsigned long y, in DnDAction defaultAction, in DnDAction[] allowedActions, in wstring[] formats, out wstring format, [retval] out DnDAction resultAction)
| Informs the target about a drop event.
void | sendData (in unsigned long screenId, in wstring format, in octet[] data, [retval] out IProgress progress)
| Initiates sending data to the target.
void | cancel ([retval] out boolean veto)
| Requests cancelling the current operation.
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.
void | addFormats (in wstring[] formats)
| Adds MIME / Content-type formats to the supported formats.
void | removeFormats (in wstring[] formats)
| Removes MIME / Content-type formats from the supported formats.

## Additional Inherited Members
Public Attributes inherited from IDnDBase
readonly attribute wstring[] | formats
| Returns all supported drag'n drop formats.

## Detailed Description

Abstract interface for handling drag'n drop targets.

Interface ID:
  `{FF5BEFC3-4BA3-7903-2AA4-43988BA11554}`

## Member Function Documentation

## ◆ enter()

void IDnDTarget::enter | ( | in unsigned long | screenId,
|  | in unsigned long | y,
|  | in unsigned long | x,
|  | in DnDAction | defaultAction,
|  | in DnDAction[] | allowedActions,
|  | in wstring[] | formats,
|  | [retval] out DnDAction | resultAction
| ) |  |

Informs the target about a drag and drop enter event.

Parameters

  screenId | The screen ID where the drag and drop event occurred.
  y | Y-position of the event.
  x | X-position of the event.
  defaultAction | The default action to use.
  allowedActions | The actions which are allowed.
  formats | The supported MIME types.
  resultAction | The resulting action of this event.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.

## ◆ move()

void IDnDTarget::move | ( | in unsigned long | screenId,
|  | in unsigned long | x,
|  | in unsigned long | y,
|  | in DnDAction | defaultAction,
|  | in DnDAction[] | allowedActions,
|  | in wstring[] | formats,
|  | [retval] out DnDAction | resultAction
| ) |  |

Informs the target about a drag and drop move event.

Parameters

  screenId | The screen ID where the drag and drop event occurred.
  x | X-position of the event.
  y | Y-position of the event.
  defaultAction | The default action to use.
  allowedActions | The actions which are allowed.
  formats | The supported MIME types.
  resultAction | The resulting action of this event.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.

## ◆ leave()

void IDnDTarget::leave | ( | in unsigned long | screenId | ) |

Informs the target about a drag and drop leave event.

Parameters

  screenId | The screen ID where the drag and drop event occurred.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.

## ◆ drop()

void IDnDTarget::drop | ( | in unsigned long | screenId,
|  | in unsigned long | x,
|  | in unsigned long | y,
|  | in DnDAction | defaultAction,
|  | in DnDAction[] | allowedActions,
|  | in wstring[] | formats,
|  | out wstring | format,
|  | [retval] out DnDAction | resultAction
| ) |  |

Informs the target about a drop event.

Parameters

  screenId | The screen ID where the Drag and Drop event occurred.
  x | X-position of the event.
  y | Y-position of the event.
  defaultAction | The default action to use.
  allowedActions | The actions which are allowed.
  formats | The supported MIME types.
  format | The resulting format of this event.
  resultAction | The resulting action of this event.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.

## ◆ sendData()

void IDnDTarget::sendData | ( | in unsigned long | screenId,
|  | in wstring | format,
|  | in octet[] | data,
|  | [retval] out IProgress | progress
| ) |  |

Initiates sending data to the target.

Parameters

  screenId | The screen ID where the drag and drop event occurred.
  format | The MIME type the data is in.
  data | The actual data.
  progress | Progress object to track the operation completion.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.

## ◆ cancel()

void IDnDTarget::cancel | ( | [retval] out boolean | veto | ) |

Requests cancelling the current operation.

The target can veto the request in case the operation is not cancelable at the moment.

Parameters

  veto | Whether the target has vetoed cancelling the operation.

Expected result codes:

  VBOX_E_VM_ERROR | VMM device is not available.