author Mike Hommey <mh+mozilla@glandium.org>
Fri, 11 Jan 2019 16:01:15 +0000
changeset 453570 daf50f25895db073e44d50fecf2e4f6fe873865d
parent 452502 32f94b7a8db69e3ab86135182fe8e43ea6926767
child 475212 020c8c871c0d3b3920fe95935cfef06501976c0f
permissions -rw-r--r--
Bug 1519307 - Add a new project to build useful parts of breakpad independently. r=froydnj With `ac_add_options --enable-project=tools/crashreporter` in a mozconfig, `./mach build` builds minidump_stackwalk, dump_syms and fileid. One caveat is that due to limitation in how the build system works currently, it's cumbersome to keep dump_syms as a host program for Gecko, and to make it a target program for this project. For now, keep it as a host program. We're not going to use it on automation, but it's still convenient to have for quick local builds (I've had to resort to awful hacks downstream). Differential Revision: https://phabricator.services.mozilla.com/D16299

/* -*- 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);

webidl DataTransfer;
webidl Document;
webidl Node;

[scriptable, builtinclass, 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;
    * 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 Document 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 Node sourceNode;

   * the triggering principal.  This may be different than sourceNode's
   * principal when sourceNode is xul:browser and the drag is
   * triggered in a browsing context inside it.
  attribute nsIPrincipal triggeringPrincipal;

   * The data transfer object for the current drag.
  attribute DataTransfer dataTransfer;
  [notxpcom, nostdcall] DataTransfer getDataTransfer();
  [notxpcom, nostdcall] void setDataTransfer(in DataTransfer aDataTransfer);

    * 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();

  // Change the drag image, using similar arguments as
  // nsIDragService::InvokeDragSessionWithImage.
  void updateDragImage(in Node aImage, in long aImageX, in long aImageY);

%{ C++