michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* internal interface for observing CSS style sheet loads */ michael@0: michael@0: #ifndef nsICSSLoaderObserver_h___ michael@0: #define nsICSSLoaderObserver_h___ michael@0: michael@0: #include "nsISupports.h" michael@0: michael@0: #define NS_ICSSLOADEROBSERVER_IID \ michael@0: { 0x7eb90c74, 0xea0c, 0x4df5, \ michael@0: {0xa1, 0x5f, 0x95, 0xf0, 0x6a, 0x98, 0xb9, 0x40} } michael@0: michael@0: class nsCSSStyleSheet; michael@0: michael@0: class nsICSSLoaderObserver : public nsISupports { michael@0: public: michael@0: NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSLOADEROBSERVER_IID) michael@0: michael@0: /** michael@0: * StyleSheetLoaded is called after aSheet is marked complete and before any michael@0: * load events associated with aSheet are fired. michael@0: * @param aSheet the sheet that was loaded. Guaranteed to always be michael@0: * non-null, even if aStatus indicates failure. michael@0: * @param aWasAlternate whether the sheet was an alternate. This will always michael@0: * match the value LoadStyleLink or LoadInlineStyle returned in michael@0: * aIsAlternate if one of those methods were used to load the sheet, michael@0: * and will always be false otherwise. michael@0: * @param aStatus is a success code if the sheet loaded successfully and a michael@0: * failure code otherwise. Note that successful load of aSheet michael@0: * doesn't indicate anything about whether the data actually parsed michael@0: * as CSS, and doesn't indicate anything about the status of any child michael@0: * sheets of aSheet. michael@0: */ michael@0: NS_IMETHOD StyleSheetLoaded(nsCSSStyleSheet* aSheet, bool aWasAlternate, michael@0: nsresult aStatus) = 0; michael@0: }; michael@0: michael@0: NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSLoaderObserver, NS_ICSSLOADEROBSERVER_IID) michael@0: michael@0: #endif // nsICSSLoaderObserver_h___