nsITransferable
| IID: | 8B5314BC-DB01-11d2-96CE-0060B0FB9956 |
| Inherits From: | nsISupports |
This interface is intended to be used as an instance. To create an object implementing this interface:
var obj = Components.classes["@mozilla.org/widget/transferable;1"].
createInstance(Components.interfaces.nsITransferable);This interface is implemented by the following components:
Constants
| PRInt32 | kFlavorHasDataProvider | = 0 |
Properties
nsIFormatConverter converter
Methods
void addDataFlavor ( char* dataFlavor )
nsISupportsArray flavorsTransferableCanExport ( )
nsISupportsArray flavorsTransferableCanImport ( )
void getAnyTransferData ( out char* flavor , out nsISupports data , out PRUint32 dataLen )
void getTransferData ( char* flavor , out nsISupports data , out PRUint32 dataLen )
PRBool isLargeDataSet ( )
void removeDataFlavor ( char* dataFlavor )
void setTransferData ( char* flavor , nsISupports data , PRUint32 dataLen )
void addDataFlavor ( char* dataFlavor )
Add the data flavor, indicating that this transferable can receive this type of flavor
- Arguments:
- dataFlavor: a new data flavor to handle
nsISupportsArray flavorsTransferableCanExport ( )
Computes a list of flavors (mime types as nsISupportsCString) that the transferable can export, either through intrinsic knowledge or output data converters.
nsISupportsArray flavorsTransferableCanImport ( )
Computes a list of flavors (mime types as nsISupportsCString) that the transferable can accept into it, either through intrinsic knowledge or input data converters.
void getAnyTransferData ( out char* flavor , out nsISupports data , out PRUint32 dataLen )
Returns the best flavor in the transferable, given those that have been added to it with AddFlavor()
- Arguments:
- flavor: (out parameter) the flavor of data that was retrieved
- data: the data. Some variant of class in nsISupportsPrimitives.idl
- dataLen: the length of the data
void getTransferData ( char* flavor , out nsISupports data , out PRUint32 dataLen )
Given a flavor retrieve the data.
- Arguments:
- flavor: (in parameter) the flavor of data to retrieve
- data: the data. Some variant of class in nsISupportsPrimitives.idl
- dataLen: the length of the data
void removeDataFlavor ( char* dataFlavor )
Removes the data flavor matching the given one (string compare) and the data that goes along with it.
- Arguments:
- dataFlavor: a data flavor to remove
void setTransferData ( char* flavor , nsISupports data , PRUint32 dataLen )
Sets the data in the transferable with the specified flavor. The transferable will maintain its own copy the data, so it is not necessary to do that beforehand.
- Arguments:
- flavor: the flavor of data that is being set
- data: the data, some variant of class in nsISupportsPrimitives.idl, or an nsIFlavorDataProvider (see above)
- dataLen: the length of the data, or 0 if passing a nsIFlavorDataProvider
References
This interface is passed as an argument to the following methods:
nsIClipboard.getData, nsIClipboard.setData, nsIClipboardDragDropHooks.onCopyOrDrag, nsIClipboardDragDropHooks.onPasteOrDrop, nsIClipboardOwner.LosingOwnership, nsIDragSession.getData, nsIFlavorDataProvider.getFlavorData
Reference documentation is generated from Mozilla's source.
