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