Interface nsIClipboardType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Filters the flavors aTransferable can import (see nsITransferable::flavorsTransferableCanImport) and gets the data for the first flavor. That data is set for aTransferable.

    Returns

    MozPromise The returned promise will resolve when the data is ready or reject if any error occurs.

    Parameters

    • aTransferable: nsITransferable

      The transferable

    • aWhichClipboard: number

      Specifies the clipboard to which this operation applies.

    Returns AsyncGetDataPromise

  • Check if there is data on the clipboard matching each of the flavors in the given list.

    Returns

    MozPromise The returned promise will resolve with the list of matched flavors when the check is completed or reject if any error occurs.

    Parameters

    • aFlavorList: invalid

      An array of ASCII strings.

    • aWhichClipboard: number

      Specifies the clipboard to which this operation applies.

    Returns AsyncDataFlavorsPromise

  • This empties the clipboard and notifies the clipboard owner. This empties the "logical" clipboard. It does not clear the native clipboard.

    Result

    NS_OK if successful.

    Parameters

    • aWhichClipboard: number

      Specifies the clipboard to which this operation applies.

    Returns void

  • Filters the flavors aTransferable can import (see nsITransferable::flavorsTransferableCanImport) and gets the data for the first flavor. That data is set for aTransferable.

    Result

    NS_OK if no errors

    Parameters

    • aTransferable: nsITransferable

      The transferable

    • aWhichClipboard: number

      Specifies the clipboard to which this operation applies.

    Returns void

  • 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.

    Out Result

    • if data is present matching one of

    Result

    NS_OK if successful.

    Parameters

    • aFlavorList: invalid

      An array of ASCII strings.

    • aWhichClipboard: number

      Specifies the clipboard to which this operation applies.

    Returns boolean

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

    Out Result

    true if the implementaion supports specific clipboard type.

    Result

    NS_OK if successful.

    Parameters

    • aWhichClipboard: number

      Specifies the clipboard to which this operation applies.

    Returns boolean

  • Given a transferable, set the data on the native clipboard

    Result

    NS_Ok if no errors

    Parameters

    • aTransferable: nsITransferable

      The transferable

    • anOwner: nsIClipboardOwner

      The owner of the transferable

    • aWhichClipboard: number

      Specifies the clipboard to which this operation applies.

    Returns void

Generated using TypeDoc