Bumping manifests a=b2g-bump
[gecko.git] / docshell / base / nsIClipboardCommands.idl
blob9dcb1401fc2049d92a156308f7dbfd6771c8dfe1
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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.
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.
22 * @return <code>true</code> if the current selection can be cut,
23 * <code>false</code> otherwise.
25 boolean canCutSelection();
27 /**
28 * Returns whether there is a selection and it is copyable.
30 * @return <code>true</code> if there is a selection,
31 * <code>false</code> otherwise.
33 boolean canCopySelection();
35 /**
36 * Returns whether we can copy a link location.
38 * @return <code>true</code> if a link is selected,
39 * <code>false</code> otherwise.
41 boolean canCopyLinkLocation();
43 /**
44 * Returns whether we can copy an image location.
46 * @return <code>true</code> if an image is selected,
47 <code>false</code> otherwise.
49 boolean canCopyImageLocation();
51 /**
52 * Returns whether we can copy an image's contents.
54 * @return <code>true</code> if an image is selected,
55 * <code>false</code> otherwise
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.
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
67 boolean canPaste();
69 /**
70 * Cut the current selection onto the clipboard.
72 void cutSelection();
74 /**
75 * Copy the current selection onto the clipboard.
77 void copySelection();
79 /**
80 * Copy the link location of the current selection (e.g.,
81 * the |href| attribute of a selected |a| tag).
83 void copyLinkLocation();
85 /**
86 * Copy the location of the selected image.
88 void copyImageLocation();
90 /**
91 * Copy the contents of the selected image.
93 void copyImageContents();
95 /**
96 * Paste the contents of the clipboard into the current selection.
98 void paste();
101 * Select the entire contents.
103 void selectAll();
106 * Clear the current selection (if any). Insertion point ends up
107 * at beginning of current selection.
109 void selectNone();