gecko-dev/editor/nsIEditorStyleSheets.idl
Birunthan Mohanathas 4f1864539d Bug 1028565 - Part 5: Flatten editor/{idl,public}/ directories. r=ehsan
--HG--
rename : editor/public/nsEditorCID.h => editor/nsEditorCID.h
rename : editor/idl/nsIContentFilter.idl => editor/nsIContentFilter.idl
rename : editor/idl/nsIDocumentStateListener.idl => editor/nsIDocumentStateListener.idl
rename : editor/idl/nsIEditActionListener.idl => editor/nsIEditActionListener.idl
rename : editor/idl/nsIEditor.idl => editor/nsIEditor.idl
rename : editor/idl/nsIEditorIMESupport.idl => editor/nsIEditorIMESupport.idl
rename : editor/idl/nsIEditorMailSupport.idl => editor/nsIEditorMailSupport.idl
rename : editor/idl/nsIEditorObserver.idl => editor/nsIEditorObserver.idl
rename : editor/idl/nsIEditorSpellCheck.idl => editor/nsIEditorSpellCheck.idl
rename : editor/idl/nsIEditorStyleSheets.idl => editor/nsIEditorStyleSheets.idl
rename : editor/idl/nsIHTMLAbsPosEditor.idl => editor/nsIHTMLAbsPosEditor.idl
rename : editor/idl/nsIHTMLEditor.idl => editor/nsIHTMLEditor.idl
rename : editor/idl/nsIHTMLInlineTableEditor.idl => editor/nsIHTMLInlineTableEditor.idl
rename : editor/idl/nsIHTMLObjectResizeListener.idl => editor/nsIHTMLObjectResizeListener.idl
rename : editor/idl/nsIHTMLObjectResizer.idl => editor/nsIHTMLObjectResizer.idl
rename : editor/idl/nsIPlaintextEditor.idl => editor/nsIPlaintextEditor.idl
rename : editor/idl/nsITableEditor.idl => editor/nsITableEditor.idl
rename : editor/idl/nsIURIRefObject.idl => editor/nsIURIRefObject.idl
rename : editor/idl/nsPIEditorTransaction.idl => editor/nsPIEditorTransaction.idl
2014-07-16 12:02:34 -07:00

94 lines
3.4 KiB
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
%{C++
namespace mozilla {
class CSSStyleSheet;
} // namespace mozilla
%}
[ptr] native CSSStyleSheet(mozilla::CSSStyleSheet);
[scriptable, uuid(4805e682-49b9-11d3-9ce4-ed60bd6cb5bc)]
interface nsIEditorStyleSheets : nsISupports
{
/** Load and apply the style sheet, specified by aURL, to the
* editor's document, replacing the last style sheet added (if any).
* This is always asynchronous, and may cause network I/O.
*
* @param aURL The style sheet to be loaded and applied.
*/
void replaceStyleSheet(in AString aURL);
/** Add the given style sheet to the editor's document,
* on top of any that are already there.
* This is always asynchronous, and may cause network I/O.
*
* @param aURL The style sheet to be loaded and applied.
*/
void addStyleSheet(in AString aURL);
/** Load and apply the override style sheet, specified by aURL, to the
* editor's document, replacing the last override style sheet added (if any).
* This is always synchronous, so aURL should be a local file with only
* local @imports. This action is not undoable. It is not intended for
* "user" style sheets, only for editor developers to add sheets to change
* display behavior for editing (like showing special cursors) that will
* not be affected by loading "document" style sheets with addStyleSheet or
* especially replaceStyleSheet.
*
* @param aURL The style sheet to be loaded and applied.
*/
void replaceOverrideStyleSheet(in AString aURL);
/** Load and apply an override style sheet, specified by aURL, to
* the editor's document, on top of any that are already there.
* This is always synchronous, so the same caveats about local files and no
* non-local @import as replaceOverrideStyleSheet apply here, too.
*
* @param aURL The style sheet to be loaded and applied.
*/
void addOverrideStyleSheet(in AString aURL);
/** Remove the given style sheet from the editor's document
* This is always synchronous
*
* @param aURL The style sheet to be removed
*/
void removeStyleSheet(in AString aURL);
/** Remove the given override style sheet from the editor's document
* This is always synchronous
*
* @param aURL The style sheet to be removed.
*/
void removeOverrideStyleSheet(in AString aURL);
/** Enable or disable the given style sheet from the editor's document
* This is always synchronous
*
* @param aURL The style sheet to be enabled or disabled
* @param aEnable true to enable, or false to disable the style sheet
*/
void enableStyleSheet(in AString aURL, in boolean aEnable);
/** Get the CSSStyleSheet associated with the given URL.
*
* @param aURL The style sheet's URL
* @return the style sheet
*/
[noscript] CSSStyleSheet getStyleSheetForURL(in AString aURL);
/** Get the URL associated with the given CSSStyleSheet.
*
* @param aStyleSheet The style sheet
* @return the style sheet's URL
*/
[noscript] AString getURLForStyleSheet(in CSSStyleSheet aStyleSheet);
};