nsIClipboard
IID: | 8B5314BA-DB01-11d2-96CE-0060B0FB9956 |
Inherits From: | nsISupports |
This interface is intended to be used as a service. To create an object implementing this interface:
var obj = Components.classes["@mozilla.org/widget/clipboard;1"]. getService(Components.interfaces.nsIClipboard);
This interface is implemented by the following components:
Constants
PRInt32 | kSelectionClipboard | = 0 |
PRInt32 | kGlobalClipboard | = 1 |
Methods
void emptyClipboard ( PRInt32 whichClipboard )
void getData ( nsITransferable transferable , PRInt32 whichClipboard )
PRBool hasDataMatchingFlavors ( nsISupportsArray flavorList , PRInt32 whichClipboard )
void setData ( nsITransferable transferable , nsIClipboardOwner anOwner , PRInt32 whichClipboard )
PRBool supportsSelectionClipboard ( )
void emptyClipboard ( PRInt32 whichClipboard )
This empties the clipboard and notifies the clipboard owner. This empties the "logical" clipboard. It does not clear the native clipboard.
- Arguments:
- whichClipboard: Specifies the clipboard to which this operation applies.
void getData ( nsITransferable transferable , PRInt32 whichClipboard )
Given a transferable, get the clipboard data.
- Arguments:
- transferable: The transferable
- whichClipboard: Specifies the clipboard to which this operation applies.
PRBool hasDataMatchingFlavors ( nsISupportsArray flavorList , PRInt32 whichClipboard )
This provides a way to give correct UI feedback about, for instance, a paste should be allowed. It does _NOT_ actually retreive the data and should be a very inexpensive call. All it does is check if there is data on the clipboard matching any of the flavors in the given list.
- Arguments:
- flavorList
- whichClipboard: Specifies the clipboard to which this operation applies.
void setData ( nsITransferable transferable , nsIClipboardOwner anOwner , PRInt32 whichClipboard )
Given a transferable, set the data on the native clipboard
- Arguments:
- transferable: The transferable
- anOwner: The owner of the transferable
- whichClipboard: Specifies the clipboard to which this operation applies.
PRBool supportsSelectionClipboard ( )
Allows clients to determine if the implementation supports the concept of a separate clipboard for selection.
Reference documentation is generated from Mozilla's source.