1999-08-30 21:54:23 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
1999-08-25 08:34:46 +00:00
|
|
|
*
|
2012-05-21 11:12:37 +00: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/. */
|
1999-08-25 08:34:46 +00:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsITransferable.idl"
|
2000-06-22 08:40:37 +00:00
|
|
|
|
1999-08-25 08:34:46 +00:00
|
|
|
|
|
|
|
%{ C++
|
|
|
|
#include "nsSize.h"
|
|
|
|
%}
|
|
|
|
|
|
|
|
native nsSize (nsSize);
|
|
|
|
|
|
|
|
|
2000-07-31 20:51:42 +00:00
|
|
|
interface nsIDOMDocument;
|
2001-05-20 05:58:25 +00:00
|
|
|
interface nsIDOMNode;
|
2008-08-27 12:07:27 +00:00
|
|
|
interface nsIDOMDataTransfer;
|
2000-07-31 20:51:42 +00:00
|
|
|
|
2015-04-08 18:48:11 +00:00
|
|
|
[scriptable, uuid(25bce737-73f0-43c7-bc20-c71044a73c5a)]
|
1999-08-25 08:34:46 +00:00
|
|
|
interface nsIDragSession : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
2006-09-22 17:08:17 +00:00
|
|
|
* Set the current state of the drag, whether it can be dropped or not.
|
1999-08-25 08:34:46 +00:00
|
|
|
* usually the target "frame" sets this so the native system can render the correct feedback
|
|
|
|
*/
|
1999-08-30 21:54:23 +00:00
|
|
|
attribute boolean canDrop;
|
2009-10-29 11:11:02 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates if the drop event should be dispatched only to chrome.
|
|
|
|
*/
|
|
|
|
attribute boolean onlyChromeDrop;
|
1999-08-25 08:34:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the action (copy, move, link, et.c) for the current drag
|
|
|
|
*/
|
1999-08-30 21:54:23 +00:00
|
|
|
attribute unsigned long dragAction;
|
1999-08-25 08:34:46 +00:00
|
|
|
|
|
|
|
/**
|
2006-09-22 17:08:17 +00:00
|
|
|
* Sets the current width and height of the drag target area.
|
1999-08-25 08:34:46 +00:00
|
|
|
* It will contain the current size of the Frame that the drag is currently in
|
|
|
|
*/
|
2000-03-17 23:47:48 +00:00
|
|
|
[noscript] attribute nsSize targetSize;
|
1999-08-25 08:34:46 +00:00
|
|
|
|
|
|
|
/**
|
2006-09-22 17:08:17 +00:00
|
|
|
* Get the number of items that were dropped
|
1999-08-25 08:34:46 +00:00
|
|
|
*/
|
1999-08-30 21:54:23 +00:00
|
|
|
readonly attribute unsigned long numDropItems;
|
2000-07-31 20:51:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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;
|
1999-08-25 08:34:46 +00:00
|
|
|
|
2001-05-20 05:58:25 +00:00
|
|
|
/**
|
|
|
|
* 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 12:07:27 +00:00
|
|
|
/**
|
|
|
|
* The data transfer object for the current drag.
|
|
|
|
*/
|
|
|
|
attribute nsIDOMDataTransfer dataTransfer;
|
|
|
|
|
1999-08-25 08:34:46 +00: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
|
|
|
|
*/
|
1999-08-30 21:54:23 +00:00
|
|
|
void getData ( in nsITransferable aTransferable, in unsigned long aItemIndex ) ;
|
1999-08-25 08:34:46 +00:00
|
|
|
|
|
|
|
/**
|
2006-09-22 17:08:17 +00:00
|
|
|
* Check to set if any of the native data on the clipboard matches this data flavor
|
1999-08-25 08:34:46 +00:00
|
|
|
*/
|
1999-08-30 21:54:23 +00:00
|
|
|
boolean isDataFlavorSupported ( in string aDataFlavor ) ;
|
2015-04-08 18:48:11 +00:00
|
|
|
|
|
|
|
void userCancelled();
|
|
|
|
|
|
|
|
void dragEventDispatchedToChildProcess();
|
|
|
|
|
|
|
|
// Called when nsIDragSession implementation should update the UI for the
|
|
|
|
// drag-and-drop based on the data got from the child process in response to
|
|
|
|
// NS_DRAGDROP_OVER sent from parent process to child process.
|
|
|
|
void updateDragEffect();
|
1999-08-25 08:34:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
|
|
|
|
%}
|