Interface nsIDragServiceType

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

  • aX and aY are in LayoutDevice pixels.

    Parameters

    • aX: number
    • aY: number

    Returns void

  • Tells the Drag Service to end a drag session. This is called when an external drag occurs

    If aDoneDrag is true, the drag has finished, otherwise the drag has just left the window.

    Parameters

    • aDoneDrag: boolean
    • aKeyModifiers: number

    Returns void

  • Fire a drag event at the source of the drag

    Parameters

    • aEventMessage: EventMessage
    • aKeyModifiers: number

    Returns void

  • Returns the current Drag Session

    Returns nsIDragSession

  • Starts a modal drag session with an array of transaferables.

    Note: This method is deprecated for non-native code.

    Parameters

    • aDOMNode: Node
    • aPrincipal: nsIPrincipal

      the triggering principal of the drag, or null if it's from browser chrome or OS

    • aCsp: nsIContentSecurityPolicy

      The csp of the triggering Document

    • aCookieJarSettings: nsICookieJarSettings
    • aTransferables: nsIArray

      an array of transferables to be dragged

    • aActionType: number

      specified which of copy/move/link are allowed

    • aContentPolicyType: nsContentPolicyType

      the contentPolicyType that will be passed to the loadInfo when creating a new channel (defaults to TYPE_OTHER)

    Returns void

  • Starts a modal drag session using an image. The first four arguments are the same as invokeDragSession.

    Note: This method is deprecated for non-native code.

    A custom image may be specified using the aImage argument. If this is supplied, the aImageX and aImageY arguments specify the offset within the image where the cursor would be positioned. That is, when the image is drawn, it is offset up and left the amount so that the cursor appears at that location within the image.

    If aImage is null, aImageX and aImageY are not used and the image is instead determined from the source node aDOMNode, and the offset calculated so that the initial location for the image appears in the same screen position as where the element is located. The node must be within a document.

    Currently, supported images are all DOM nodes. If this is an HTML or , the drag image is taken from the image data. If the element is in a document, it will be rendered at its displayed size, othewise, it will be rendered at its real size. For other types of elements, the element is rendered into an offscreen buffer in the same manner as it is currently displayed. The document selection is hidden while drawing.

    The aDragEvent must be supplied as the current screen coordinates of the event are needed to calculate the image location.

    Parameters

    • aDOMNode: Node
    • aPrincipal: nsIPrincipal
    • aCsp: nsIContentSecurityPolicy
    • aCookieJarSettings: nsICookieJarSettings
    • aTransferableArray: nsIArray
    • aActionType: number
    • aImage: Node
    • aImageX: number
    • aImageY: number
    • aDragEvent: DragEvent
    • aDataTransfer: DataTransferPtr

    Returns void

  • Start a drag session with the data in aDragStartData from a child process. Other arguments are the same as invokeDragSessionWithImage.

    Parameters

    • aDOMNode: Node
    • aPrincipal: nsIPrincipal
    • aCsp: nsIContentSecurityPolicy
    • aCookieJarSettings: nsICookieJarSettings
    • aTransferableArray: nsIArray
    • aActionType: number
    • aDragStartData: RemoteDragStartDataPtr
    • aDragEvent: DragEvent
    • aDataTransfer: DataTransferPtr

    Returns void

  • Start a modal drag session using the selection as the drag image. The aDragEvent must be supplied as the current screen coordinates of the event are needed to calculate the image location.

    Note: This method is deprecated for non-native code.

    Parameters

    • aSelection: Selection
    • aPrincipal: nsIPrincipal
    • aCsp: nsIContentSecurityPolicy
    • aCookieJarSettings: nsICookieJarSettings
    • aTransferableArray: nsIArray
    • aActionType: number
    • aDragEvent: DragEvent
    • aDataTransfer: DataTransferPtr

    Returns void

  • Parameters

    • aChild: ContentParentPtr

    Returns boolean

  • Called when HTMLEditor maybe deleted the source node from the document.

    Parameters

    • aEditingHost: Element

      The editing host when the editor deletes selection.

    Returns void

  • Returns boolean

  • Tells the Drag Service to start a drag session. This is called when an external drag occurs

    Returns void

  • Similar to startDragSession(), automated tests may want to start session for emulating an external drag. At that time, this should be used instead of startDragSession().

    Parameters

    • aAllowedEffect: number

      Set default drag action which means allowed effects in the session and every DnD events are initialized with one of specified value. So, the value can be DRAGDROP_ACTION_NONE, or one or more values of DRAGDROP_ACTION_(MOVE|COPY|LINK).

    Returns void

  • Increase/decrease dragging suppress level by one. If level is greater than one, dragging is disabled.

    Returns void

  • Returns void

Generated using TypeDoc