2005-01-15 03:10:19 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* 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/. */
|
2005-01-15 03:10:19 +03:00
|
|
|
|
2006-03-30 09:56:38 +04:00
|
|
|
/* interface for managing user and user-agent style sheets */
|
|
|
|
|
2005-01-15 03:10:19 +03:00
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIURI;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* nsIStyleSheetService allows extensions or embeddors to add to the
|
|
|
|
* built-in list of user or agent style sheets.
|
|
|
|
*/
|
|
|
|
|
2006-06-20 08:21:56 +04:00
|
|
|
[scriptable, uuid(1f42a6a2-ab0a-45d4-8a96-396f58ea6c6d)]
|
2005-01-15 03:10:19 +03:00
|
|
|
interface nsIStyleSheetService : nsISupports
|
|
|
|
{
|
|
|
|
const unsigned long AGENT_SHEET = 0;
|
|
|
|
const unsigned long USER_SHEET = 1;
|
2012-10-16 23:45:50 +04:00
|
|
|
const unsigned long AUTHOR_SHEET = 2;
|
2005-01-15 03:10:19 +03:00
|
|
|
|
|
|
|
/**
|
2005-03-23 05:34:30 +03:00
|
|
|
* Synchronously loads a style sheet from |sheetURI| and adds it to the list
|
2005-01-15 03:10:19 +03:00
|
|
|
* of user or agent style sheets.
|
2005-08-20 05:24:00 +04:00
|
|
|
*
|
|
|
|
* A user sheet loaded via this API will come before userContent.css and
|
|
|
|
* userChrome.css in the cascade (so the rules in it will have lower
|
|
|
|
* precedence than rules in those sheets).
|
|
|
|
*
|
|
|
|
* An agent sheet loaded via this API will come after ua.css in the cascade
|
|
|
|
* (so the rules in it will have higher precedence than rules in ua.css).
|
|
|
|
*
|
|
|
|
* The relative ordering of two user or two agent sheets loaded via
|
|
|
|
* this API is undefined.
|
2006-06-08 18:32:20 +04:00
|
|
|
*
|
|
|
|
* Sheets added via this API take effect on all documents, including
|
|
|
|
* already-loaded ones, immediately.
|
2005-01-15 03:10:19 +03:00
|
|
|
*/
|
|
|
|
void loadAndRegisterSheet(in nsIURI sheetURI, in unsigned long type);
|
2005-03-23 05:34:30 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if a style sheet at |sheetURI| has previously been
|
|
|
|
* added to the list of style sheets specified by |type|.
|
|
|
|
*/
|
|
|
|
boolean sheetRegistered(in nsIURI sheetURI, in unsigned long type);
|
|
|
|
|
|
|
|
/**
|
2006-06-08 18:32:20 +04:00
|
|
|
* Remove the style sheet at |sheetURI| from the list of style sheets
|
|
|
|
* specified by |type|. The removal takes effect immediately, even for
|
|
|
|
* already-loaded documents.
|
2005-03-23 05:34:30 +03:00
|
|
|
*/
|
|
|
|
void unregisterSheet(in nsIURI sheetURI, in unsigned long type);
|
2005-01-15 03:10:19 +03:00
|
|
|
};
|