2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
21 #ifndef JSCanvasGradient_h
22 #define JSCanvasGradient_h
24 #include "CanvasGradient.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
32 class JSCanvasGradient : public JSDOMWrapper {
34 typedef JSDOMWrapper Base;
35 static JSCanvasGradient* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<CanvasGradient> impl)
37 JSCanvasGradient* ptr = new (JSC::allocateCell<JSCanvasGradient>(globalObject->globalData().heap)) JSCanvasGradient(structure, globalObject, impl);
38 ptr->finishCreation(globalObject->globalData());
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 const JSC::ClassInfo s_info;
47 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
49 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
52 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
53 CanvasGradient* impl() const { return m_impl; }
54 void releaseImpl() { m_impl->deref(); m_impl = 0; }
57 CanvasGradient* m_impl;
59 JSCanvasGradient(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<CanvasGradient>);
60 void finishCreation(JSC::JSGlobalData&);
61 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
64 class JSCanvasGradientOwner : public JSC::WeakHandleOwner {
65 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
66 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
69 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, CanvasGradient*)
71 DEFINE_STATIC_LOCAL(JSCanvasGradientOwner, jsCanvasGradientOwner, ());
72 return &jsCanvasGradientOwner;
75 inline void* wrapperContext(DOMWrapperWorld* world, CanvasGradient*)
80 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CanvasGradient*);
81 CanvasGradient* toCanvasGradient(JSC::JSValue);
83 class JSCanvasGradientPrototype : public JSC::JSNonFinalObject {
85 typedef JSC::JSNonFinalObject Base;
86 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
87 static JSCanvasGradientPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
89 JSCanvasGradientPrototype* ptr = new (JSC::allocateCell<JSCanvasGradientPrototype>(globalData.heap)) JSCanvasGradientPrototype(globalData, globalObject, structure);
90 ptr->finishCreation(globalData);
94 static const JSC::ClassInfo s_info;
95 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
96 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
97 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
99 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
103 JSCanvasGradientPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
105 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
108 class JSCanvasGradientConstructor : public DOMConstructorObject {
110 JSCanvasGradientConstructor(JSC::Structure*, JSDOMGlobalObject*);
111 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
114 typedef DOMConstructorObject Base;
115 static JSCanvasGradientConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
117 JSCanvasGradientConstructor* ptr = new (JSC::allocateCell<JSCanvasGradientConstructor>(*exec->heap())) JSCanvasGradientConstructor(structure, globalObject);
118 ptr->finishCreation(exec, globalObject);
122 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
123 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
124 static const JSC::ClassInfo s_info;
125 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
127 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
130 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
135 JSC::EncodedJSValue JSC_HOST_CALL jsCanvasGradientPrototypeFunctionAddColorStop(JSC::ExecState*);
138 JSC::JSValue jsCanvasGradientConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
140 } // namespace WebCore