|
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 #include "config.h" |
|
22 |
|
23 #if ENABLE(3D_CANVAS) |
|
24 |
|
25 #include "JSWebGLUniformLocation.h" |
|
26 |
|
27 #include "WebGLUniformLocation.h" |
|
28 #include <wtf/GetPtr.h> |
|
29 |
|
30 using namespace JSC; |
|
31 |
|
32 namespace WebCore { |
|
33 |
|
34 ASSERT_CLASS_FITS_IN_CELL(JSWebGLUniformLocation); |
|
35 |
|
36 /* Hash table for prototype */ |
|
37 #if ENABLE(JIT) |
|
38 #define THUNK_GENERATOR(generator) , generator |
|
39 #else |
|
40 #define THUNK_GENERATOR(generator) |
|
41 #endif |
|
42 |
|
43 static const HashTableValue JSWebGLUniformLocationPrototypeTableValues[1] = |
|
44 { |
|
45 { 0, 0, 0, 0 THUNK_GENERATOR(0) } |
|
46 }; |
|
47 |
|
48 #undef THUNK_GENERATOR |
|
49 static JSC_CONST_HASHTABLE HashTable JSWebGLUniformLocationPrototypeTable = { 1, 0, JSWebGLUniformLocationPrototypeTableValues, 0 }; |
|
50 const ClassInfo JSWebGLUniformLocationPrototype::s_info = { "WebGLUniformLocationPrototype", 0, &JSWebGLUniformLocationPrototypeTable, 0 }; |
|
51 |
|
52 JSObject* JSWebGLUniformLocationPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
|
53 { |
|
54 return getDOMPrototype<JSWebGLUniformLocation>(exec, globalObject); |
|
55 } |
|
56 |
|
57 const ClassInfo JSWebGLUniformLocation::s_info = { "WebGLUniformLocation", 0, 0, 0 }; |
|
58 |
|
59 JSWebGLUniformLocation::JSWebGLUniformLocation(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<WebGLUniformLocation> impl) |
|
60 : DOMObjectWithGlobalPointer(structure, globalObject) |
|
61 , m_impl(impl) |
|
62 { |
|
63 } |
|
64 |
|
65 JSWebGLUniformLocation::~JSWebGLUniformLocation() |
|
66 { |
|
67 forgetDOMObject(this, impl()); |
|
68 } |
|
69 |
|
70 JSObject* JSWebGLUniformLocation::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
|
71 { |
|
72 return new (exec) JSWebGLUniformLocationPrototype(globalObject, JSWebGLUniformLocationPrototype::createStructure(globalObject->objectPrototype())); |
|
73 } |
|
74 |
|
75 JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, WebGLUniformLocation* object) |
|
76 { |
|
77 return getDOMObjectWrapper<JSWebGLUniformLocation>(exec, globalObject, object); |
|
78 } |
|
79 WebGLUniformLocation* toWebGLUniformLocation(JSC::JSValue value) |
|
80 { |
|
81 return value.inherits(&JSWebGLUniformLocation::s_info) ? static_cast<JSWebGLUniformLocation*>(asObject(value))->impl() : 0; |
|
82 } |
|
83 |
|
84 } |
|
85 |
|
86 #endif // ENABLE(3D_CANVAS) |