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 JSTestEventConstructor_h
22#define JSTestEventConstructor_h
23
24#include "JSDOMBinding.h"
25#include "TestEventConstructor.h"
26#include <runtime/JSGlobalObject.h>
27#include <runtime/JSObject.h>
28#include <runtime/ObjectPrototype.h>
29
30namespace WebCore {
31
32class JSDictionary;
33
34class JSTestEventConstructor : public JSDOMWrapper {
35public:
36    typedef JSDOMWrapper Base;
37    static JSTestEventConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestEventConstructor> impl)
38    {
39        JSTestEventConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructor>(globalObject->vm().heap)) JSTestEventConstructor(structure, globalObject, impl);
40        ptr->finishCreation(globalObject->vm());
41        return ptr;
42    }
43
44    static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
45    static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
46    static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&);
47    static void destroy(JSC::JSCell*);
48    ~JSTestEventConstructor();
49    static const JSC::ClassInfo s_info;
50
51    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
52    {
53        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
54    }
55
56    static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
57    TestEventConstructor* impl() const { return m_impl; }
58    void releaseImpl() { m_impl->deref(); m_impl = 0; }
59
60    void releaseImplIfNotNull()
61    {
62        if (m_impl) {
63            m_impl->deref();
64            m_impl = 0;
65        }
66    }
67
68private:
69    TestEventConstructor* m_impl;
70protected:
71    JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestEventConstructor>);
72    void finishCreation(JSC::VM&);
73    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Base::StructureFlags;
74};
75
76class JSTestEventConstructorOwner : public JSC::WeakHandleOwner {
77public:
78    virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
79    virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
80};
81
82inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestEventConstructor*)
83{
84    DEFINE_STATIC_LOCAL(JSTestEventConstructorOwner, jsTestEventConstructorOwner, ());
85    return &jsTestEventConstructorOwner;
86}
87
88inline void* wrapperContext(DOMWrapperWorld* world, TestEventConstructor*)
89{
90    return world;
91}
92
93JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
94TestEventConstructor* toTestEventConstructor(JSC::JSValue);
95
96class JSTestEventConstructorPrototype : public JSC::JSNonFinalObject {
97public:
98    typedef JSC::JSNonFinalObject Base;
99    static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
100    static JSTestEventConstructorPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
101    {
102        JSTestEventConstructorPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorPrototype>(vm.heap)) JSTestEventConstructorPrototype(vm, globalObject, structure);
103        ptr->finishCreation(vm);
104        return ptr;
105    }
106
107    static const JSC::ClassInfo s_info;
108    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
109    {
110        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
111    }
112
113private:
114    JSTestEventConstructorPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { }
115protected:
116    static const unsigned StructureFlags = Base::StructureFlags;
117};
118
119class JSTestEventConstructorConstructor : public DOMConstructorObject {
120private:
121    JSTestEventConstructorConstructor(JSC::Structure*, JSDOMGlobalObject*);
122    void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
123
124public:
125    typedef DOMConstructorObject Base;
126    static JSTestEventConstructorConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
127    {
128        JSTestEventConstructorConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructorConstructor>(*exec->heap())) JSTestEventConstructorConstructor(structure, globalObject);
129        ptr->finishCreation(exec, globalObject);
130        return ptr;
131    }
132
133    static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&);
134    static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&);
135    static const JSC::ClassInfo s_info;
136    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
137    {
138        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
139    }
140protected:
141    static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
142    static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestEventConstructor(JSC::ExecState*);
143    static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
144};
145
146bool fillTestEventConstructorInit(TestEventConstructorInit&, JSDictionary&);
147
148// Attributes
149
150JSC::JSValue jsTestEventConstructorAttr1(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
151JSC::JSValue jsTestEventConstructorAttr2(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
152JSC::JSValue jsTestEventConstructorConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName);
153
154} // namespace WebCore
155
156#endif
157