nsIClipboard

Methods

setData(aTransferable, anOwner, aWhichClipboard)

Given a transferable, set the data on the native clipboard

Parameters

aTransferable The transferable
anOwner The owner of the transferable
aWhichClipboard Specifies the clipboard to which this operation applies. @result NS_Ok if no errors

getData(aTransferable, aWhichClipboard)

Given a transferable, get the clipboard data.

Parameters

aTransferable The transferable
aWhichClipboard Specifies the clipboard to which this operation applies. @result NS_Ok if no errors

emptyClipboard(aWhichClipboard)

This empties the clipboard and notifies the clipboard owner.
This empties the “logical” clipboard. It does not clear the native clipboard.

Parameters

aWhichClipboard Specifies the clipboard to which this operation applies. @result NS_OK if successful.

hasDataMatchingFlavors(aFlavorList, aLength, aWhichClipboard)

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.

Parameters

aFlavorList An array of ASCII strings.
aLength The length of the aFlavorList.
aWhichClipboard Specifies the clipboard to which this operation applies. @outResult - if data is present matching one of @result NS_OK if successful.

supportsSelectionClipboard()

Allows clients to determine if the implementation supports the concept of a
separate clipboard for selection.

@outResult - true if
@result NS_OK if successful.

supportsFindClipboard()

Allows clients to determine if the implementation supports the concept of a
separate clipboard for find search strings.

@result NS_OK if successful.

Constants

kSelectionClipboard

kGlobalClipboard

kFindClipboard