tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSWebGLFramebuffer.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 JSWebGLFramebuffer_h
22 #define JSWebGLFramebuffer_h
23
24 #if ENABLE(WEBGL)
25
26 #include "JSDOMBinding.h"
27 #include "WebGLFramebuffer.h"
28 #include <runtime/JSGlobalObject.h>
29 #include <runtime/JSObject.h>
30 #include <runtime/ObjectPrototype.h>
31
32 namespace WebCore {
33
34 class JSWebGLFramebuffer : public JSDOMWrapper {
35 public:
36     typedef JSDOMWrapper Base;
37     static JSWebGLFramebuffer* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebGLFramebuffer> impl)
38     {
39         JSWebGLFramebuffer* ptr = new (JSC::allocateCell<JSWebGLFramebuffer>(globalObject->globalData().heap)) JSWebGLFramebuffer(structure, globalObject, impl);
40         ptr->finishCreation(globalObject->globalData());
41         return ptr;
42     }
43
44     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
45     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
46     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
47     static const JSC::ClassInfo s_info;
48
49     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50     {
51         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
52     }
53
54     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
55     WebGLFramebuffer* impl() const { return m_impl; }
56     void releaseImpl() { m_impl->deref(); m_impl = 0; }
57
58 private:
59     WebGLFramebuffer* m_impl;
60 protected:
61     JSWebGLFramebuffer(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<WebGLFramebuffer>);
62     void finishCreation(JSC::JSGlobalData&);
63     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
64 };
65
66 class JSWebGLFramebufferOwner : public JSC::WeakHandleOwner {
67     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
68     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
69 };
70
71 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, WebGLFramebuffer*)
72 {
73     DEFINE_STATIC_LOCAL(JSWebGLFramebufferOwner, jsWebGLFramebufferOwner, ());
74     return &jsWebGLFramebufferOwner;
75 }
76
77 inline void* wrapperContext(DOMWrapperWorld* world, WebGLFramebuffer*)
78 {
79     return world;
80 }
81
82 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, WebGLFramebuffer*);
83 WebGLFramebuffer* toWebGLFramebuffer(JSC::JSValue);
84
85 class JSWebGLFramebufferPrototype : public JSC::JSNonFinalObject {
86 public:
87     typedef JSC::JSNonFinalObject Base;
88     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
89     static JSWebGLFramebufferPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
90     {
91         JSWebGLFramebufferPrototype* ptr = new (JSC::allocateCell<JSWebGLFramebufferPrototype>(globalData.heap)) JSWebGLFramebufferPrototype(globalData, globalObject, structure);
92         ptr->finishCreation(globalData);
93         return ptr;
94     }
95
96     static const JSC::ClassInfo s_info;
97     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
98     {
99         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
100     }
101
102 private:
103     JSWebGLFramebufferPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
104 protected:
105     static const unsigned StructureFlags = Base::StructureFlags;
106 };
107
108 class JSWebGLFramebufferConstructor : public DOMConstructorObject {
109 private:
110     JSWebGLFramebufferConstructor(JSC::Structure*, JSDOMGlobalObject*);
111     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
112
113 public:
114     typedef DOMConstructorObject Base;
115     static JSWebGLFramebufferConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
116     {
117         JSWebGLFramebufferConstructor* ptr = new (JSC::allocateCell<JSWebGLFramebufferConstructor>(*exec->heap())) JSWebGLFramebufferConstructor(structure, globalObject);
118         ptr->finishCreation(exec, globalObject);
119         return ptr;
120     }
121
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)
126     {
127         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
128     }
129 protected:
130     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
131 };
132
133 // Attributes
134
135 JSC::JSValue jsWebGLFramebufferConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
136
137 } // namespace WebCore
138
139 #endif // ENABLE(WEBGL)
140
141 #endif