2008-10-22 14:31:14 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 11:12:37 +00: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/. */
|
2007-07-09 06:19:27 +00:00
|
|
|
|
2013-07-24 07:27:17 +00:00
|
|
|
#ifndef nsICSSRuleList_h
|
|
|
|
#define nsICSSRuleList_h
|
2007-07-09 06:19:27 +00:00
|
|
|
|
2013-07-24 07:27:17 +00:00
|
|
|
#include "nsIDOMCSSRule.h"
|
2008-10-22 14:31:14 +00:00
|
|
|
#include "nsIDOMCSSRuleList.h"
|
2007-07-09 06:19:27 +00:00
|
|
|
|
2008-10-22 14:31:14 +00:00
|
|
|
// IID for the nsICSSRuleList interface
|
|
|
|
#define NS_ICSSRULELIST_IID \
|
2013-07-24 07:27:17 +00:00
|
|
|
{ 0xccc0135a, 0xbcb6, 0x4654, \
|
|
|
|
{ 0x8c, 0x78, 0x74, 0x35, 0x97, 0x9b, 0x88, 0x19 } }
|
2008-10-22 14:31:14 +00:00
|
|
|
|
|
|
|
class nsICSSRuleList : public nsIDOMCSSRuleList
|
2007-07-09 06:19:27 +00:00
|
|
|
{
|
2008-10-22 14:31:14 +00:00
|
|
|
public:
|
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSRULELIST_IID)
|
|
|
|
|
2013-07-24 07:27:17 +00:00
|
|
|
NS_IMETHOD
|
|
|
|
GetLength(uint32_t* aLength) MOZ_OVERRIDE MOZ_FINAL
|
|
|
|
{
|
|
|
|
*aLength = Length();
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
NS_IMETHOD
|
|
|
|
Item(uint32_t aIndex, nsIDOMCSSRule** aReturn) MOZ_OVERRIDE MOZ_FINAL
|
|
|
|
{
|
|
|
|
NS_IF_ADDREF(*aReturn = Item(aIndex));
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
// WebIDL API
|
|
|
|
nsIDOMCSSRule* Item(uint32_t aIndex)
|
|
|
|
{
|
|
|
|
bool unused;
|
|
|
|
return IndexedGetter(aIndex, unused);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual nsIDOMCSSRule* IndexedGetter(uint32_t aIndex, bool& aFound) = 0;
|
|
|
|
virtual uint32_t Length() = 0;
|
2007-07-09 06:19:27 +00:00
|
|
|
};
|
2008-10-22 14:31:14 +00:00
|
|
|
|
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSRuleList, NS_ICSSRULELIST_IID)
|
|
|
|
|
2013-07-24 07:27:17 +00:00
|
|
|
#endif /* nsICSSRuleList_h */
|