Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / widget / nsIClipboardHelper.idl
blob370c652b317ef998f61dc35d712baac82aa6fb39
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"
8 #include "nsIClipboard.idl"
10 %{ C++
11 #include "nsString.h" // needed for AString -> nsAString, unfortunately
14 /**
15 * helper service for common uses of nsIClipboard.
18 [scriptable, uuid(438307fd-0c68-4d79-922a-f6cc9550cd02)]
19 interface nsIClipboardHelper : nsISupports
21 cenum SensitiveData : 8 {
22 NotSensitive = 0,
23 Sensitive = 1,
26 /**
27 * copy string to given clipboard
29 * @param aString, the string to copy to the clipboard
30 * @param aClipboardID, the ID of the clipboard to copy to
31 * (eg. kSelectionClipboard -- see nsIClipboard.idl)
32 * @param aSettingWindowContext
33 * The window context that is setting the clipboard, if any. This is used
34 * to possibly bypass Content Analysis if a set clipboard and get clipboard
35 * operation are done on the same page.
36 * @param aSensitive, optional flag to indicate that data is sensitive, like a password.
37 * That will exclude data from Cloud Clipboard/Clipboard History on Windows.
39 void copyStringToClipboard(in AString aString, in long aClipboardID,
40 [optional] in WindowContext aSettingWindowContext,
41 [optional, default(NotSensitive)] in nsIClipboardHelper_SensitiveData aSensitive);
43 /**
44 * copy string to (default) clipboard
46 * @param aString, the string to copy to the clipboard
47 * @param aSettingWindowContext
48 * The window context that is setting the clipboard, if any. This is used
49 * to possibly bypass Content Analysis if a set clipboard and get clipboard
50 * operation are done on the same page.
51 * @param aSensitive, optional flag to indicate that data is sensitive, like a password.
52 * That will exclude data from Cloud Clipboard/Clipboard History on Windows.
54 void copyString(in AString aString,
55 [optional] in WindowContext aSettingWindowContext,
56 [optional, default(NotSensitive)] in nsIClipboardHelper_SensitiveData aSensitive);