#ifndef kjs_css_h
#define kjs_css_h
#include "Color.h"
#include "JSStyleSheet.h"
#include "kjs_binding.h"
namespace WebCore {
class Counter;
class CSSStyleSheet;
class StyleSheet;
class StyleSheetList;
class JSStyleSheetList : public KJS::DOMObject {
public:
JSStyleSheetList(KJS::ExecState*, StyleSheetList*, Document*);
virtual ~JSStyleSheetList();
virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
virtual const KJS::ClassInfo* classInfo() const { return &info; }
static const KJS::ClassInfo info;
enum { Item, Length };
StyleSheetList* impl() const { return m_impl.get(); }
private:
static KJS::JSValue* indexGetter(KJS::ExecState*, KJS::JSObject*, const KJS::Identifier&, const KJS::PropertySlot&);
static KJS::JSValue* nameGetter(KJS::ExecState*, KJS::JSObject*, const KJS::Identifier&, const KJS::PropertySlot&);
RefPtr<StyleSheetList> m_impl;
RefPtr<Document> m_doc;
};
KJS::JSValue* toJS(KJS::ExecState*, StyleSheetList*, Document*);
class JSRGBColor : public KJS::DOMObject {
public:
JSRGBColor(KJS::ExecState*, unsigned color);
~JSRGBColor();
virtual bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&);
KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;
virtual const KJS::ClassInfo* classInfo() const { return &info; }
static const KJS::ClassInfo info;
enum { Red, Green, Blue };
unsigned impl() const { return m_color; }
private:
unsigned m_color;
};
KJS::JSValue* getJSRGBColor(KJS::ExecState*, unsigned color);
}
#endif // kjs_css_h