|
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/. */ |
|
6 |
|
7 #include "nsISupports.idl" |
|
8 #include "nsIClipboard.idl" |
|
9 |
|
10 %{ C++ |
|
11 #include "nsString.h" // needed for AString -> nsAString, unfortunately |
|
12 %} |
|
13 |
|
14 interface nsIDOMDocument; |
|
15 |
|
16 /** |
|
17 * helper service for common uses of nsIClipboard. |
|
18 */ |
|
19 |
|
20 [scriptable, uuid(c9d5a750-c3a8-11e1-9b21-0800200c9a66)] |
|
21 interface nsIClipboardHelper : nsISupports |
|
22 { |
|
23 |
|
24 /** |
|
25 * copy string to given clipboard |
|
26 * |
|
27 * @param aString, the string to copy to the clipboard |
|
28 * @param aDoc, the source document for the string, if available |
|
29 * @param aClipboardID, the ID of the clipboard to copy to |
|
30 * (eg. kSelectionClipboard -- see nsIClipboard.idl) |
|
31 */ |
|
32 void copyStringToClipboard(in AString aString, in long aClipboardID, [optional] in nsIDOMDocument aDoc); |
|
33 |
|
34 /** |
|
35 * copy string to (default) clipboard |
|
36 * |
|
37 * @param aString, the string to copy to the clipboard |
|
38 * @param aDoc, the source document for the string, if available |
|
39 */ |
|
40 void copyString(in AString aString, [optional] in nsIDOMDocument aDoc); |
|
41 |
|
42 }; |