Struct xpcom::interfaces::nsIDragService [] [src]

#[repr(C)]
pub struct nsIDragService { /* fields omitted */ }

interface nsIDragService : nsISupports

Methods

impl nsIDragService
[src]

[src]

Cast this nsIDragService to one of its base interfaces.

impl nsIDragService
[src]

DRAGDROP_ACTION_NONE: i64 = 0

DRAGDROP_ACTION_COPY: i64 = 1

DRAGDROP_ACTION_MOVE: i64 = 2
DRAGDROP_ACTION_LINK: i64 = 4

DRAGDROP_ACTION_UNINITIALIZED: i64 = 64

[src]

/**
    * Starts a modal drag session with an array of transaferables.
    *
    * Note: This method is deprecated for non-native code.
    *
    * @param  aTransferables - an array of transferables to be dragged
    * @param  aRegion - a region containing rectangles for cursor feedback,
    *            in window coordinates.
    * @param  aActionType - specified which of copy/move/link are allowed
    * @param  aContentPolicyType - the contentPolicyType that will be
    *           passed to the loadInfo when creating a new channel
    *           (defaults to TYPE_OTHER)
    */

void invokeDragSession (in nsIDOMNode aDOMNode, in nsIArray aTransferables, in nsIScriptableRegion aRegion, in unsigned long aActionType, [optional] in nsContentPolicyType aContentPolicyType);

[src]

/**
   * 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 <image> or
   * <canvas>, 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.
   */

void invokeDragSessionWithImage (in nsIDOMNode aDOMNode, in nsIArray aTransferableArray, in nsIScriptableRegion aRegion, in unsigned long aActionType, in nsIDOMNode aImage, in long aImageX, in long aImageY, in nsIDOMDragEvent aDragEvent, in nsIDOMDataTransfer aDataTransfer);

[src]

/**
   * 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.
   */

void invokeDragSessionWithSelection (in nsISelection aSelection, in nsIArray aTransferableArray, in unsigned long aActionType, in nsIDOMDragEvent aDragEvent, in nsIDOMDataTransfer aDataTransfer);

[src]

/**
    * Returns the current Drag Session
    */

nsIDragSession getCurrentSession ();

[src]

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

void startDragSession ();

[src]

/**
    * 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.
    */

void endDragSession (in boolean aDoneDrag, [optional] in unsigned long aKeyModifiers);

[src]

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

void suppress ();

[src]

void unsuppress ();

[src]

/**
    * aX and aY are in LayoutDevice pixels.
    */

[noscript] void dragMoved (in long aX, in long aY);

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIDragService
[src]

IID: nsIID = nsID(3956716450, 44822, 17327, [166, 152, 48, 145, 160, 135, 221, 98])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIDragService
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIDragService
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.