Blame editor/nsIEditorStyleSheets.idl

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