editor/idl/nsIEditorStyleSheets.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 class nsCSSStyleSheet;
    10 %}
    12 [ptr] native nsCSSStyleSheet(nsCSSStyleSheet);
    14 [scriptable, uuid(4805e682-49b9-11d3-9ce4-ed60bd6cb5bc)]
    16 interface nsIEditorStyleSheets : nsISupports
    17 {
    18   /** Load and apply the style sheet, specified by aURL, to the
    19     * editor's document, replacing the last style sheet added (if any).
    20     * This is always asynchronous, and may cause network I/O.
    21     * 
    22     * @param aURL The style sheet to be loaded and applied.
    23     */
    24   void replaceStyleSheet(in AString aURL);
    26   /** Add the given style sheet to the editor's document,
    27     * on top of any that are already there.
    28     * This is always asynchronous, and may cause network I/O.
    29     *
    30     * @param aURL The style sheet to be loaded and applied.
    31     */
    32   void addStyleSheet(in AString aURL);
    34   /** Load and apply the override style sheet, specified by aURL, to the
    35     * editor's document, replacing the last override style sheet added (if any).
    36     * This is always synchronous, so aURL should be a local file with only
    37     * local @imports. This action is not undoable. It is not intended for
    38     * "user" style sheets, only for editor developers to add sheets to change
    39     * display behavior for editing (like showing special cursors) that will
    40     * not be affected by loading "document" style sheets with addStyleSheet or
    41     * especially replaceStyleSheet.
    42     * 
    43     * @param aURL The style sheet to be loaded and applied.
    44     */
    45   void replaceOverrideStyleSheet(in AString aURL);
    47   /** Load and apply an override style sheet, specified by aURL, to
    48     * the editor's document, on top of any that are already there.
    49     * This is always synchronous, so the same caveats about local files and no
    50     * non-local @import as replaceOverrideStyleSheet apply here, too.
    51     *
    52     * @param aURL The style sheet to be loaded and applied.
    53     */
    54   void addOverrideStyleSheet(in AString aURL);
    56   /** Remove the given style sheet from the editor's document
    57     * This is always synchronous
    58     *
    59     * @param aURL The style sheet to be removed
    60     */
    61   void removeStyleSheet(in AString aURL);
    63   /** Remove the given override style sheet from the editor's document
    64     * This is always synchronous
    65     *
    66     * @param aURL The style sheet to be removed.
    67     */
    68   void removeOverrideStyleSheet(in AString aURL);
    70   /** Enable or disable the given style sheet from the editor's document
    71     * This is always synchronous
    72     *
    73     * @param aURL  The style sheet to be enabled or disabled
    74     * @param aEnable true to enable, or false to disable the style sheet
    75     */
    76   void enableStyleSheet(in AString aURL, in boolean aEnable);
    78   /** Get the nsCSSStyleSheet associated with the given URL.
    79     *
    80     * @param aURL         The style sheet's URL
    81     * @return             the style sheet
    82     */
    83   [noscript] nsCSSStyleSheet getStyleSheetForURL(in AString aURL);
    85   /** Get the URL associated with the given nsCSSStyleSheet.
    86     *
    87     * @param aStyleSheet  The style sheet
    88     * @return             the style sheet's URL
    89     */
    90   [noscript] AString getURLForStyleSheet(in nsCSSStyleSheet aStyleSheet);
    91 };

mercurial