Bug 461810 - Video content menu should operate on .currentSrc, not .src. r=gavin
[wine-gecko.git] / content / base / public / nsIStyleSheetLinkingElement.h
blob6c76d29cd97ebf76ee81d0a8d53d922a4743746f
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
37 #ifndef nsIStyleSheetLinkingElement_h__
38 #define nsIStyleSheetLinkingElement_h__
41 #include "nsISupports.h"
43 class nsIDocument;
44 class nsICSSLoaderObserver;
45 class nsIURI;
47 #define NS_ISTYLESHEETLINKINGELEMENT_IID \
48 { 0xd753c84a, 0x17fd, 0x4d5f, \
49 { 0xb2, 0xe9, 0x63, 0x52, 0x8c, 0x87, 0x99, 0x7a } }
51 class nsIStyleSheet;
53 class nsIStyleSheetLinkingElement : public nsISupports {
54 public:
55 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISTYLESHEETLINKINGELEMENT_IID)
57 /**
58 * Used to make the association between a style sheet and
59 * the element that linked it to the document.
61 * @param aStyleSheet the style sheet associated with this
62 * element.
64 NS_IMETHOD SetStyleSheet(nsIStyleSheet* aStyleSheet) = 0;
66 /**
67 * Used to obtain the style sheet linked in by this element.
69 * @param aStyleSheet out parameter that returns the style
70 * sheet associated with this element.
72 NS_IMETHOD GetStyleSheet(nsIStyleSheet*& aStyleSheet) = 0;
74 /**
75 * Initialize the stylesheet linking element. If aDontLoadStyle is
76 * true the element will ignore the first modification to the
77 * element that would cause a stylesheet to be loaded. Subsequent
78 * modifications to the element will not be ignored.
80 NS_IMETHOD InitStyleLinkElement(PRBool aDontLoadStyle) = 0;
82 /**
83 * Tells this element to update the stylesheet.
85 * @param aObserver observer to notify once the stylesheet is loaded.
86 * This will be passed to the CSSLoader
87 * @param [out] aWillNotify whether aObserver will be notified when the sheet
88 * loads. If this is false, then either we didn't
89 * start the sheet load at all, the load failed, or
90 * this was an inline sheet that completely finished
91 * loading. In the case when the load failed the
92 * failure code will be returned.
93 * @param [out] whether the sheet is an alternate sheet. This value is only
94 * meaningful if aWillNotify is true.
96 NS_IMETHOD UpdateStyleSheet(nsICSSLoaderObserver* aObserver,
97 PRBool *aWillNotify,
98 PRBool *aIsAlternate) = 0;
101 * Tells this element whether to update the stylesheet when the
102 * element's properties change.
104 * @param aEnableUpdates update on changes or not.
106 NS_IMETHOD SetEnableUpdates(PRBool aEnableUpdates) = 0;
109 * Gets the charset that the element claims the style sheet is in
111 * @param aCharset the charset
113 NS_IMETHOD GetCharset(nsAString& aCharset) = 0;
116 * Tells this element to use a different base URI. This is used for
117 * proper loading of xml-stylesheet processing instructions in XUL overlays
118 * and is only currently used by nsXMLStylesheetPI.
120 * @param aNewBaseURI the new base URI, nsnull to use the default base URI.
122 virtual void OverrideBaseURI(nsIURI* aNewBaseURI) = 0;
124 // This doesn't entirely belong here since they only make sense for
125 // some types of linking elements, but it's a better place than
126 // anywhere else.
127 virtual void SetLineNumber(PRUint32 aLineNumber) = 0;
130 NS_DEFINE_STATIC_IID_ACCESSOR(nsIStyleSheetLinkingElement,
131 NS_ISTYLESHEETLINKINGELEMENT_IID)
133 #endif // nsILinkingElement_h__