|
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 #include "JSCanvasPattern.h" |
|
24 |
|
25 #include <wtf/GetPtr.h> |
|
26 |
|
27 #include "CanvasPattern.h" |
|
28 |
|
29 using namespace KJS; |
|
30 |
|
31 namespace WebCore { |
|
32 |
|
33 /* Hash table for prototype */ |
|
34 |
|
35 static const HashEntry JSCanvasPatternPrototypeTableEntries[] = |
|
36 { |
|
37 { 0, 0, 0, 0, 0 } |
|
38 }; |
|
39 |
|
40 static const HashTable JSCanvasPatternPrototypeTable = |
|
41 { |
|
42 2, 1, JSCanvasPatternPrototypeTableEntries, 1 |
|
43 }; |
|
44 |
|
45 const ClassInfo JSCanvasPatternPrototype::info = { "CanvasPatternPrototype", 0, &JSCanvasPatternPrototypeTable, 0 }; |
|
46 |
|
47 JSObject* JSCanvasPatternPrototype::self(ExecState* exec) |
|
48 { |
|
49 return KJS::cacheGlobalObject<JSCanvasPatternPrototype>(exec, "[[JSCanvasPattern.prototype]]"); |
|
50 } |
|
51 |
|
52 const ClassInfo JSCanvasPattern::info = { "CanvasPattern", 0, 0, 0 }; |
|
53 |
|
54 JSCanvasPattern::JSCanvasPattern(ExecState* exec, CanvasPattern* impl) |
|
55 : m_impl(impl) |
|
56 { |
|
57 setPrototype(JSCanvasPatternPrototype::self(exec)); |
|
58 } |
|
59 |
|
60 JSCanvasPattern::~JSCanvasPattern() |
|
61 { |
|
62 ScriptInterpreter::forgetDOMObject(m_impl.get()); |
|
63 } |
|
64 |
|
65 KJS::JSValue* toJS(KJS::ExecState* exec, CanvasPattern* obj) |
|
66 { |
|
67 return KJS::cacheDOMObject<CanvasPattern, JSCanvasPattern>(exec, obj); |
|
68 } |
|
69 CanvasPattern* toCanvasPattern(KJS::JSValue* val) |
|
70 { |
|
71 return val->isObject(&JSCanvasPattern::info) ? static_cast<JSCanvasPattern*>(val)->impl() : 0; |
|
72 } |
|
73 |
|
74 } |