2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsITransferable.idl"
|
|
|
|
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
#include "nsSize.h"
|
|
|
|
%}
|
|
|
|
|
|
|
|
native nsSize (nsSize);
|
|
|
|
|
|
|
|
|
|
|
|
interface nsIDOMDocument;
|
|
|
|
interface nsIDOMNode;
|
2008-08-27 05:07:27 -07:00
|
|
|
interface nsIDOMDataTransfer;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2015-04-08 10:52:21 -07:00
|
|
|
[scriptable, uuid(fde41f6a-c710-46f8-a0a8-1ff76ca4ff57)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIDragSession : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Set the current state of the drag, whether it can be dropped or not.
|
|
|
|
* usually the target "frame" sets this so the native system can render the correct feedback
|
|
|
|
*/
|
|
|
|
attribute boolean canDrop;
|
2009-10-29 04:11:02 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates if the drop event should be dispatched only to chrome.
|
|
|
|
*/
|
|
|
|
attribute boolean onlyChromeDrop;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the action (copy, move, link, et.c) for the current drag
|
|
|
|
*/
|
|
|
|
attribute unsigned long dragAction;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the current width and height of the drag target area.
|
|
|
|
* It will contain the current size of the Frame that the drag is currently in
|
|
|
|
*/
|
|
|
|
[noscript] attribute nsSize targetSize;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the number of items that were dropped
|
|
|
|
*/
|
|
|
|
readonly attribute unsigned long numDropItems;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The document where the drag was started, which will be null if the
|
|
|
|
* drag originated outside the application. Useful for determining if a drop
|
|
|
|
* originated in the same document.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIDOMDocument sourceDocument;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The dom node that was originally dragged to start the session, which will be null if the
|
|
|
|
* drag originated outside the application.
|
|
|
|
*/
|
|
|
|
readonly attribute nsIDOMNode sourceNode;
|
|
|
|
|
2008-08-27 05:07:27 -07:00
|
|
|
/**
|
|
|
|
* The data transfer object for the current drag.
|
|
|
|
*/
|
|
|
|
attribute nsIDOMDataTransfer dataTransfer;
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
/**
|
|
|
|
* Get data from a Drag&Drop. Can be called while the drag is in process
|
|
|
|
* or after the drop has completed.
|
|
|
|
*
|
|
|
|
* @param aTransferable the transferable for the data to be put into
|
|
|
|
* @param aItemIndex which of multiple drag items, zero-based
|
|
|
|
*/
|
|
|
|
void getData ( in nsITransferable aTransferable, in unsigned long aItemIndex ) ;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Check to set if any of the native data on the clipboard matches this data flavor
|
|
|
|
*/
|
|
|
|
boolean isDataFlavorSupported ( in string aDataFlavor ) ;
|
2015-04-08 10:52:21 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
|
|
|
|
%}
|