tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSCSSStyleDeclaration.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 JSCSSStyleDeclaration_h
22 #define JSCSSStyleDeclaration_h
23
24 #include "CSSStyleDeclaration.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 JSCSSStyleDeclaration : public JSDOMWrapper {
33 public:
34     typedef JSDOMWrapper Base;
35     static JSCSSStyleDeclaration* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSStyleDeclaration> impl)
36     {
37         JSCSSStyleDeclaration* ptr = new (JSC::allocateCell<JSCSSStyleDeclaration>(globalObject->globalData().heap)) JSCSSStyleDeclaration(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 bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
46     static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
47     bool putDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSC::PutPropertySlot&);
48     static const JSC::ClassInfo s_info;
49
50     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
51     {
52         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
53     }
54
55     static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
56     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
57     static void visitChildren(JSCell*, JSC::SlotVisitor&);
58
59
60     // Custom functions
61     JSC::JSValue getPropertyCSSValue(JSC::ExecState*);
62     CSSStyleDeclaration* impl() const { return m_impl; }
63     void releaseImpl() { m_impl->deref(); m_impl = 0; }
64
65 private:
66     CSSStyleDeclaration* m_impl;
67 protected:
68     JSCSSStyleDeclaration(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<CSSStyleDeclaration>);
69     void finishCreation(JSC::JSGlobalData&);
70     static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
71     static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);
72 private:
73     static bool canGetItemsForName(JSC::ExecState*, CSSStyleDeclaration*, const JSC::Identifier&);
74     static JSC::JSValue nameGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
75 };
76
77 class JSCSSStyleDeclarationOwner : public JSC::WeakHandleOwner {
78     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
79     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
80 };
81
82 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, CSSStyleDeclaration*)
83 {
84     DEFINE_STATIC_LOCAL(JSCSSStyleDeclarationOwner, jsCSSStyleDeclarationOwner, ());
85     return &jsCSSStyleDeclarationOwner;
86 }
87
88 inline void* wrapperContext(DOMWrapperWorld* world, CSSStyleDeclaration*)
89 {
90     return world;
91 }
92
93 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSStyleDeclaration*);
94 CSSStyleDeclaration* toCSSStyleDeclaration(JSC::JSValue);
95
96 class JSCSSStyleDeclarationPrototype : public JSC::JSNonFinalObject {
97 public:
98     typedef JSC::JSNonFinalObject Base;
99     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
100     static JSCSSStyleDeclarationPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
101     {
102         JSCSSStyleDeclarationPrototype* ptr = new (JSC::allocateCell<JSCSSStyleDeclarationPrototype>(globalData.heap)) JSCSSStyleDeclarationPrototype(globalData, globalObject, structure);
103         ptr->finishCreation(globalData);
104         return ptr;
105     }
106
107     static const JSC::ClassInfo s_info;
108     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
109     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
110     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
111     {
112         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
113     }
114
115 private:
116     JSCSSStyleDeclarationPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
117 protected:
118     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
119 };
120
121 class JSCSSStyleDeclarationConstructor : public DOMConstructorObject {
122 private:
123     JSCSSStyleDeclarationConstructor(JSC::Structure*, JSDOMGlobalObject*);
124     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
125
126 public:
127     typedef DOMConstructorObject Base;
128     static JSCSSStyleDeclarationConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
129     {
130         JSCSSStyleDeclarationConstructor* ptr = new (JSC::allocateCell<JSCSSStyleDeclarationConstructor>(*exec->heap())) JSCSSStyleDeclarationConstructor(structure, globalObject);
131         ptr->finishCreation(exec, globalObject);
132         return ptr;
133     }
134
135     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
136     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
137     static const JSC::ClassInfo s_info;
138     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
139     {
140         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
141     }
142 protected:
143     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
144 };
145
146 // Functions
147
148 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyValue(JSC::ExecState*);
149 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyCSSValue(JSC::ExecState*);
150 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionRemoveProperty(JSC::ExecState*);
151 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyPriority(JSC::ExecState*);
152 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionSetProperty(JSC::ExecState*);
153 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionItem(JSC::ExecState*);
154 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyShorthand(JSC::ExecState*);
155 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionIsPropertyImplicit(JSC::ExecState*);
156 // Attributes
157
158 JSC::JSValue jsCSSStyleDeclarationCssText(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
159 void setJSCSSStyleDeclarationCssText(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
160 JSC::JSValue jsCSSStyleDeclarationLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
161 JSC::JSValue jsCSSStyleDeclarationParentRule(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
162 JSC::JSValue jsCSSStyleDeclarationConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
163
164 } // namespace WebCore
165
166 #endif