diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /widget/nsIDragSession.idl | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'widget/nsIDragSession.idl')
-rw-r--r-- | widget/nsIDragSession.idl | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/widget/nsIDragSession.idl b/widget/nsIDragSession.idl new file mode 100644 index 000000000..6b9f603a1 --- /dev/null +++ b/widget/nsIDragSession.idl @@ -0,0 +1,97 @@ +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * 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/. */ + +#include "nsISupports.idl" +#include "nsITransferable.idl" + + +%{ C++ +#include "nsSize.h" +%} + +native nsSize (nsSize); + + +interface nsIDOMDocument; +interface nsIDOMNode; +interface nsIDOMDataTransfer; + +[scriptable, uuid(25bce737-73f0-43c7-bc20-c71044a73c5a)] +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; + + /** + * Indicates if the drop event should be dispatched only to chrome. + */ + attribute boolean onlyChromeDrop; + + /** + * 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; + + /** + * The data transfer object for the current drag. + */ + attribute nsIDOMDataTransfer dataTransfer; + + /** + * 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 ) ; + + 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(); +}; + + +%{ C++ + +%} |