nsISupports
Last changed in Gecko 30.0 (Firefox 30.0 / Thunderbird 30.0 / SeaMonkey 2.27)void emptyClipboard(in long aWhichClipboard); |
void forceDataToClipboard(in long aWhichClipboard); Obsolete since Gecko 1.8 |
void getData(in nsITransferable aTransferable, in long aWhichClipboard); |
boolean hasDataMatchingFlavors([array, size_is(aLength)] in string aFlavorList, in unsigned long aLength, in long aWhichClipboard); |
void setData(in nsITransferable aTransferable, in nsIClipboardOwner anOwner, in long aWhichClipboard); |
boolean supportsSelectionClipboard(); |
boolean supportsFindClipboard(); |
Most clipboard operations in Firefox use kGlobalClipboard, which is the one also used by the typical control-C/control-V keyboard shortcuts.
The kSelectionClipboard
is peculiar to the X Windows System, where it refers to the PRIMARY selection, which is the one that simple mouse selection and middle-click paste operations are using.
Constant | Value | Description |
kSelectionClipboard |
0 |
Clipboard for selection. |
kGlobalClipboard |
1 |
Clipboard for global use. |
kFindClipboard |
2 |
Clipboard for find strings. |
This method empties the clipboard and notifies the clipboard owner. It empties the "logical" clipboard. It does not clear the native clipboard.
void emptyClipboard( in long aWhichClipboard );
aWhichClipboard
Some platforms support deferred notification for putting data on the clipboard This method forces the data onto the clipboard in its various formats This may be used if the application going away.
void forceDataToClipboard( in long aWhichClipboard );
aWhichClipboard
This method retrieves data from the clipboard into a transferable.
void getData( in nsITransferable aTransferable, in long aWhichClipboard );
aTransferable
aWhichClipboard
This method provides a way to give correct UI feedback about, for instance, whether a paste should be allowed. It does not actually retrieve 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.
boolean hasDataMatchingFlavors( [array, size_is(aLength)] in string aFlavorList, in unsigned long aLength, in long aWhichClipboard );
aFlavorList
aLength
aFlavorList
.aWhichClipboard
Returns true
, if data is present and it matches the specified flavor. Otherwise it returns false
.
This method sets the data from a transferable on the native clipboard.
void setData( in nsITransferable aTransferable, in nsIClipboardOwner anOwner, in long aWhichClipboard );
aTransferable
anOwner
aWhichClipboard
This method allows clients to determine if the implementation supports the concept of a separate clipboard for selection.
boolean supportsSelectionClipboard();
None.
Returns true
if kSelectionClipboard
is available. Otherwise it returns false
.
This method allows clients to determine if the implementation supports the concept of a separate clipboard for find search strings.
boolean supportsFindClipboard();
None.
Returns true
if the separate clipboard for find search strings is supported. Otherwise it returns false
.