tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSCSSRule.h
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14
15     You should have received a copy of the GNU Library General Public License
16     along with this library; see the file COPYING.LIB.  If not, write to
17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19 */
20
21 #ifndef JSCSSRule_h
22 #define JSCSSRule_h
23
24 #include "CSSRule.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
29
30 namespace WebCore {
31
32 class JSCSSRule : public JSDOMWrapper {
33 public:
34     typedef JSDOMWrapper Base;
35     static JSCSSRule* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSRule> impl)
36     {
37         JSCSSRule* ptr = new (JSC::allocateCell<JSCSSRule>(globalObject->globalData().heap)) JSCSSRule(structure, globalObject, impl);
38         ptr->finishCreation(globalObject->globalData());
39         return ptr;
40     }
41
42     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
43     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
44     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
45     static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
46     static const JSC::ClassInfo s_info;
47
48     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
49     {
50         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
51     }
52
53     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
54     static void visitChildren(JSCell*, JSC::SlotVisitor&);
55
56     CSSRule* impl() const { return m_impl; }
57     void releaseImpl() { m_impl->deref(); m_impl = 0; }
58
59 private:
60     CSSRule* m_impl;
61 protected:
62     JSCSSRule(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<CSSRule>);
63     void finishCreation(JSC::JSGlobalData&);
64     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
65 };
66
67 class JSCSSRuleOwner : public JSC::WeakHandleOwner {
68     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
69     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
70 };
71
72 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, CSSRule*)
73 {
74     DEFINE_STATIC_LOCAL(JSCSSRuleOwner, jsCSSRuleOwner, ());
75     return &jsCSSRuleOwner;
76 }
77
78 inline void* wrapperContext(DOMWrapperWorld* world, CSSRule*)
79 {
80     return world;
81 }
82
83 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSRule*);
84 CSSRule* toCSSRule(JSC::JSValue);
85
86 class JSCSSRulePrototype : public JSC::JSNonFinalObject {
87 public:
88     typedef JSC::JSNonFinalObject Base;
89     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
90     static JSCSSRulePrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
91     {
92         JSCSSRulePrototype* ptr = new (JSC::allocateCell<JSCSSRulePrototype>(globalData.heap)) JSCSSRulePrototype(globalData, globalObject, structure);
93         ptr->finishCreation(globalData);
94         return ptr;
95     }
96
97     static const JSC::ClassInfo s_info;
98     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
99     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
100     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
101     {
102         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
103     }
104
105 private:
106     JSCSSRulePrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
107 protected:
108     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
109 };
110
111 class JSCSSRuleConstructor : public DOMConstructorObject {
112 private:
113     JSCSSRuleConstructor(JSC::Structure*, JSDOMGlobalObject*);
114     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
115
116 public:
117     typedef DOMConstructorObject Base;
118     static JSCSSRuleConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
119     {
120         JSCSSRuleConstructor* ptr = new (JSC::allocateCell<JSCSSRuleConstructor>(*exec->heap())) JSCSSRuleConstructor(structure, globalObject);
121         ptr->finishCreation(exec, globalObject);
122         return ptr;
123     }
124
125     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
126     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
127     static const JSC::ClassInfo s_info;
128     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
129     {
130         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
131     }
132 protected:
133     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
134 };
135
136 // Attributes
137
138 JSC::JSValue jsCSSRuleType(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
139 JSC::JSValue jsCSSRuleCssText(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
140 void setJSCSSRuleCssText(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
141 JSC::JSValue jsCSSRuleParentStyleSheet(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
142 JSC::JSValue jsCSSRuleParentRule(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
143 JSC::JSValue jsCSSRuleConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
144 // Constants
145
146 JSC::JSValue jsCSSRuleUNKNOWN_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
147 JSC::JSValue jsCSSRuleSTYLE_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
148 JSC::JSValue jsCSSRuleCHARSET_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
149 JSC::JSValue jsCSSRuleIMPORT_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
150 JSC::JSValue jsCSSRuleMEDIA_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
151 JSC::JSValue jsCSSRuleFONT_FACE_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
152 JSC::JSValue jsCSSRulePAGE_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
153 JSC::JSValue jsCSSRuleWEBKIT_KEYFRAMES_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
154 JSC::JSValue jsCSSRuleWEBKIT_KEYFRAME_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
155 JSC::JSValue jsCSSRuleWEBKIT_REGION_STYLE_RULE(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
156
157 } // namespace WebCore
158
159 #endif