docshell/base/nsIClipboardCommands.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     2  *
     3  * This Source Code Form is subject to the terms of the Mozilla Public
     4  * License, v. 2.0. If a copy of the MPL was not distributed with this
     5  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #include "nsISupports.idl"
     9 /**
    10  * An interface for embedding clients who wish to interact with
    11  * the system-wide OS clipboard. Mozilla does not use a private
    12  * clipboard, instead it places its data directly onto the system 
    13  * clipboard. The webshell implements this interface.
    14  */
    16 [scriptable, uuid(b8100c90-73be-11d2-92a5-00105a1b0d64)]
    17 interface nsIClipboardCommands : nsISupports {
    19   /**
    20    * Returns whether there is a selection and it is not read-only.
    21    *
    22    * @return <code>true</code> if the current selection can be cut,
    23    *          <code>false</code> otherwise.
    24    */
    25   boolean canCutSelection();
    27   /**
    28    * Returns whether there is a selection and it is copyable.
    29    *
    30    * @return <code>true</code> if there is a selection,
    31    *          <code>false</code> otherwise.
    32    */
    33   boolean canCopySelection();
    35   /**
    36    * Returns whether we can copy a link location.
    37    *
    38    * @return <code>true</code> if a link is selected,
    39    *           <code>false</code> otherwise.
    40    */
    41   boolean canCopyLinkLocation();
    43   /**
    44    * Returns whether we can copy an image location.
    45    *
    46    * @return <code>true</code> if an image is selected,
    47               <code>false</code> otherwise.
    48    */
    49   boolean canCopyImageLocation();
    51   /**
    52    * Returns whether we can copy an image's contents.
    53    *
    54    * @return <code>true</code> if an image is selected,
    55    *          <code>false</code> otherwise
    56    */
    57   boolean canCopyImageContents();
    59   /**
    60    * Returns whether the current contents of the clipboard can be
    61    * pasted and if the current selection is not read-only.
    62    *
    63    * @return <code>true</code> there is data to paste on the clipboard
    64    *          and the current selection is not read-only,
    65    *          <code>false</code> otherwise
    66    */
    67   boolean canPaste();
    69   /**
    70    * Cut the current selection onto the clipboard.
    71    */
    72   void cutSelection();
    74   /**
    75    * Copy the current selection onto the clipboard.
    76    */
    77   void copySelection();
    79   /**
    80    * Copy the link location of the current selection (e.g.,
    81    * the |href| attribute of a selected |a| tag).
    82    */
    83   void copyLinkLocation();
    85   /**
    86    * Copy the location of the selected image.
    87    */
    88   void copyImageLocation();
    90   /**
    91    * Copy the contents of the selected image.
    92    */
    93   void copyImageContents();
    95   /**
    96    * Paste the contents of the clipboard into the current selection.
    97    */
    98   void paste();
   100   /**
   101    * Select the entire contents.
   102    */
   103   void selectAll();
   105   /**
   106    * Clear the current selection (if any). Insertion point ends up
   107    * at beginning of current selection.
   108    */
   109   void selectNone();
   111 };

mercurial