widget/nsIClipboardHelper.idl
author arthur.iakab <aiakab@mozilla.com>
Fri, 15 Mar 2019 15:50:20 +0200
changeset 522067 5edbe9b1b82220b07ff446bd4a3b9ff2f7dda508
parent 472394 72c6733416e041bf2109fe1d1ebd38521a99dac9
permissions -rw-r--r--
Backed out 4 changesets (bug 1500713) on request of jcristau for causing Bug 1535603 a=Backout Backed out changeset 5d0cad2c99a4 (bug 1500713) Backed out changeset f96a12eedd89 (bug 1500713) Backed out changeset 2633cea7d119 (bug 1500713) Backed out changeset 49c4cfbf2bee (bug 1500713)

/* -*- 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 "nsIClipboard.idl"

%{ C++
#include "nsString.h" // needed for AString -> nsAString, unfortunately
%}

/**
 * helper service for common uses of nsIClipboard.
 */

[scriptable, uuid(438307fd-0c68-4d79-922a-f6cc9550cd02)]
interface nsIClipboardHelper : nsISupports
{
  /**
   * copy string to given clipboard
   *
   * @param aString, the string to copy to the clipboard
   * @param aClipboardID, the ID of the clipboard to copy to
   *        (eg. kSelectionClipboard -- see nsIClipboard.idl)
   */
  void copyStringToClipboard(in AString aString, in long aClipboardID);

  /**
   * copy string to (default) clipboard
   *
   * @param aString, the string to copy to the clipboard
   */
  void copyString(in AString aString);
};