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