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 "JSDOMWrapper.h"
25#include "TestEventConstructor.h"
26
27namespace WebCore {
28
29class JSDictionary;
30
31class JSTestEventConstructor : public JSDOMWrapper {
32public:
33    typedef JSDOMWrapper Base;
34    static JSTestEventConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestEventConstructor> impl)
35    {
36        JSTestEventConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestEventConstructor>(globalObject->vm().heap)) JSTestEventConstructor(structure, globalObject, impl);
37        ptr->finishCreation(globalObject->vm());
38        return ptr;
39    }
40
41    static JSC::JSObject* createPrototype(JSC::VM&, JSC::JSGlobalObject*);
42    static JSC::JSObject* getPrototype(JSC::VM&, JSC::JSGlobalObject*);
43    static void destroy(JSC::JSCell*);
44    ~JSTestEventConstructor();
45
46    DECLARE_INFO;
47
48    static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
49    {
50        return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
51    }
52
53    static JSC::JSValue getConstructor(JSC::VM&, JSC::JSGlobalObject*);
54    TestEventConstructor& impl() const { return *m_impl; }
55    void releaseImpl() { m_impl->deref(); m_impl = 0; }
56
57    void releaseImplIfNotNull()
58    {
59        if (m_impl) {
60            m_impl->deref();
61            m_impl = 0;
62        }
63    }
64
65private:
66    TestEventConstructor* m_impl;
67protected:
68    JSTestEventConstructor(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestEventConstructor>);
69
70    void finishCreation(JSC::VM& vm)
71    {
72        Base::finishCreation(vm);
73        ASSERT(inherits(info()));
74    }
75
76};
77
78class JSTestEventConstructorOwner : public JSC::WeakHandleOwner {
79public:
80    virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
81    virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
82};
83
84inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, TestEventConstructor*)
85{
86    DEPRECATED_DEFINE_STATIC_LOCAL(JSTestEventConstructorOwner, jsTestEventConstructorOwner, ());
87    return &jsTestEventConstructorOwner;
88}
89
90inline void* wrapperContext(DOMWrapperWorld& world, TestEventConstructor*)
91{
92    return &world;
93}
94
95JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
96TestEventConstructor* toTestEventConstructor(JSC::JSValue);
97
98bool fillTestEventConstructorInit(TestEventConstructorInit&, JSDictionary&);
99
100
101} // namespace WebCore
102
103#endif
104