Bumping manifests a=b2g-bump
[gecko.git] / editor / nsIEditorStyleSheets.idl
blob70b7b1398ddc6898e1f5753273c051d9f69085b4
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 %{C++
9 namespace mozilla {
10 class CSSStyleSheet;
11 } // namespace mozilla
14 [ptr] native CSSStyleSheet(mozilla::CSSStyleSheet);
16 [scriptable, uuid(4805e682-49b9-11d3-9ce4-ed60bd6cb5bc)]
18 interface nsIEditorStyleSheets : nsISupports
20 /** Load and apply the style sheet, specified by aURL, to the
21 * editor's document, replacing the last style sheet added (if any).
22 * This is always asynchronous, and may cause network I/O.
24 * @param aURL The style sheet to be loaded and applied.
26 void replaceStyleSheet(in AString aURL);
28 /** Add the given style sheet to the editor's document,
29 * on top of any that are already there.
30 * This is always asynchronous, and may cause network I/O.
32 * @param aURL The style sheet to be loaded and applied.
34 void addStyleSheet(in AString aURL);
36 /** Load and apply the override style sheet, specified by aURL, to the
37 * editor's document, replacing the last override style sheet added (if any).
38 * This is always synchronous, so aURL should be a local file with only
39 * local @imports. This action is not undoable. It is not intended for
40 * "user" style sheets, only for editor developers to add sheets to change
41 * display behavior for editing (like showing special cursors) that will
42 * not be affected by loading "document" style sheets with addStyleSheet or
43 * especially replaceStyleSheet.
45 * @param aURL The style sheet to be loaded and applied.
47 void replaceOverrideStyleSheet(in AString aURL);
49 /** Load and apply an override style sheet, specified by aURL, to
50 * the editor's document, on top of any that are already there.
51 * This is always synchronous, so the same caveats about local files and no
52 * non-local @import as replaceOverrideStyleSheet apply here, too.
54 * @param aURL The style sheet to be loaded and applied.
56 void addOverrideStyleSheet(in AString aURL);
58 /** Remove the given style sheet from the editor's document
59 * This is always synchronous
61 * @param aURL The style sheet to be removed
63 void removeStyleSheet(in AString aURL);
65 /** Remove the given override style sheet from the editor's document
66 * This is always synchronous
68 * @param aURL The style sheet to be removed.
70 void removeOverrideStyleSheet(in AString aURL);
72 /** Enable or disable the given style sheet from the editor's document
73 * This is always synchronous
75 * @param aURL The style sheet to be enabled or disabled
76 * @param aEnable true to enable, or false to disable the style sheet
78 void enableStyleSheet(in AString aURL, in boolean aEnable);
80 /** Get the CSSStyleSheet associated with the given URL.
82 * @param aURL The style sheet's URL
83 * @return the style sheet
85 [noscript] CSSStyleSheet getStyleSheetForURL(in AString aURL);
87 /** Get the URL associated with the given CSSStyleSheet.
89 * @param aStyleSheet The style sheet
90 * @return the style sheet's URL
92 [noscript] AString getURLForStyleSheet(in CSSStyleSheet aStyleSheet);