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 JSHTMLCanvasElement_h
22 #define JSHTMLCanvasElement_h
23 
24 #include "HTMLCanvasElement.h"
25 #include "JSHTMLElement.h"
26 #include <runtime/JSObjectWithGlobalObject.h>
27 
28 namespace WebCore {
29 
30 class HTMLCanvasElement;
31 
32 class JSHTMLCanvasElement : public JSHTMLElement {
33     typedef JSHTMLElement Base;
34 public:
35     JSHTMLCanvasElement(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<HTMLCanvasElement>);
36     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
37     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
38     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
39     virtual void put(JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
40     static const JSC::ClassInfo s_info;
41 
createStructure(JSC::JSGlobalData & globalData,JSC::JSValue prototype)42     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
43     {
44         return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
45     }
46 
47     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
48 
49     // Custom functions
50     JSC::JSValue toDataURL(JSC::ExecState*);
51     JSC::JSValue getContext(JSC::ExecState*);
impl()52     HTMLCanvasElement* impl() const
53     {
54         return static_cast<HTMLCanvasElement*>(Base::impl());
55     }
56 protected:
57     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
58 };
59 
60 HTMLCanvasElement* toHTMLCanvasElement(JSC::JSValue);
61 
62 class JSHTMLCanvasElementPrototype : public JSC::JSObjectWithGlobalObject {
63     typedef JSC::JSObjectWithGlobalObject Base;
64 public:
65     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
66     static const JSC::ClassInfo s_info;
67     virtual bool getOwnPropertySlot(JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
68     virtual bool getOwnPropertyDescriptor(JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
createStructure(JSC::JSGlobalData & globalData,JSC::JSValue prototype)69     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype)
70     {
71         return JSC::Structure::create(globalData, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
72     }
JSHTMLCanvasElementPrototype(JSC::JSGlobalData & globalData,JSC::JSGlobalObject * globalObject,JSC::Structure * structure)73     JSHTMLCanvasElementPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) : JSC::JSObjectWithGlobalObject(globalData, globalObject, structure) { }
74 protected:
75     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
76 };
77 
78 // Functions
79 
80 JSC::EncodedJSValue JSC_HOST_CALL jsHTMLCanvasElementPrototypeFunctionToDataURL(JSC::ExecState*);
81 JSC::EncodedJSValue JSC_HOST_CALL jsHTMLCanvasElementPrototypeFunctionGetContext(JSC::ExecState*);
82 // Attributes
83 
84 JSC::JSValue jsHTMLCanvasElementWidth(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
85 void setJSHTMLCanvasElementWidth(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
86 JSC::JSValue jsHTMLCanvasElementHeight(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
87 void setJSHTMLCanvasElementHeight(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
88 JSC::JSValue jsHTMLCanvasElementConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
89 
90 } // namespace WebCore
91 
92 #endif
93