Public Member Functions | Public Attributes

nsIDragSession Interface Reference

import "nsIDragSession.idl";

Collaboration diagram for nsIDragSession:

List of all members.

Public Member Functions

void getData (in nsITransferable aTransferable, in unsigned long aItemIndex)
 Get data from a Drag&Drop.
boolean isDataFlavorSupported (in string aDataFlavor)
 Check to set if any of the native data on the clipboard matches this data flavor.

Public Attributes

attribute boolean canDrop
 Set the current state of the drag, whether it can be dropped or not.
attribute boolean onlyChromeDrop
 Indicates if the drop event should be dispatched only to chrome.
attribute unsigned long dragAction
 Sets the action (copy, move, link, et.c) for the current drag.
attribute nsSize targetSize
 Sets the current width and height of the drag target area.
readonly attribute unsigned long numDropItems
 Get the number of items that were dropped.
readonly attribute nsIDOMDocument sourceDocument
 The document where the drag was started, which will be null if the drag originated outside the application.
readonly attribute nsIDOMNode sourceNode
 The dom node that was originally dragged to start the session, which will be null if the drag originated outside the application.
attribute nsIDOMDataTransfer dataTransfer
 The data transfer object for the current drag.

Member Function Documentation

void nsIDragSession::getData ( in nsITransferable  aTransferable,
in unsigned long  aItemIndex 
)

Get data from a Drag&Drop.

Can be called while the drag is in process or after the drop has completed.

Parameters:
aTransferable the transferable for the data to be put into
aItemIndex which of multiple drag items, zero-based
boolean nsIDragSession::isDataFlavorSupported ( in string  aDataFlavor  ) 

Check to set if any of the native data on the clipboard matches this data flavor.


Member Data Documentation

Set the current state of the drag, whether it can be dropped or not.

usually the target "frame" sets this so the native system can render the correct feedback

The data transfer object for the current drag.

attribute unsigned long nsIDragSession::dragAction

Sets the action (copy, move, link, et.c) for the current drag.

readonly attribute unsigned long nsIDragSession::numDropItems

Get the number of items that were dropped.

Indicates if the drop event should be dispatched only to chrome.

The document where the drag was started, which will be null if the drag originated outside the application.

Useful for determining if a drop originated in the same document.

The dom node that was originally dragged to start the session, which will be null if the drag originated outside the application.

Sets the current width and height of the drag target area.

It will contain the current size of the Frame that the drag is currently in


The documentation for this interface was generated from the following file: