tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebCore / JSClipboard.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 JSClipboard_h
22 #define JSClipboard_h
23
24 #include "Clipboard.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
29
30 namespace WebCore {
31
32 class JSClipboard : public JSDOMWrapper {
33 public:
34     typedef JSDOMWrapper Base;
35     static JSClipboard* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<Clipboard> impl)
36     {
37         JSClipboard* ptr = new (JSC::allocateCell<JSClipboard>(globalObject->globalData().heap)) JSClipboard(structure, globalObject, impl);
38         ptr->finishCreation(globalObject->globalData());
39         return ptr;
40     }
41
42     static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
43     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
44     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
45     static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
46     static const JSC::ClassInfo s_info;
47
48     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
49     {
50         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
51     }
52
53     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
54
55     // Custom attributes
56     JSC::JSValue types(JSC::ExecState*) const;
57
58     // Custom functions
59     JSC::JSValue clearData(JSC::ExecState*);
60     JSC::JSValue getData(JSC::ExecState*);
61     JSC::JSValue setDragImage(JSC::ExecState*);
62     Clipboard* impl() const { return m_impl; }
63     void releaseImpl() { m_impl->deref(); m_impl = 0; }
64
65 private:
66     Clipboard* m_impl;
67 protected:
68     JSClipboard(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Clipboard>);
69     void finishCreation(JSC::JSGlobalData&);
70     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
71 };
72
73 class JSClipboardOwner : public JSC::WeakHandleOwner {
74     virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
75     virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
76 };
77
78 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, Clipboard*)
79 {
80     DEFINE_STATIC_LOCAL(JSClipboardOwner, jsClipboardOwner, ());
81     return &jsClipboardOwner;
82 }
83
84 inline void* wrapperContext(DOMWrapperWorld* world, Clipboard*)
85 {
86     return world;
87 }
88
89 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Clipboard*);
90 Clipboard* toClipboard(JSC::JSValue);
91
92 class JSClipboardPrototype : public JSC::JSNonFinalObject {
93 public:
94     typedef JSC::JSNonFinalObject Base;
95     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
96     static JSClipboardPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
97     {
98         JSClipboardPrototype* ptr = new (JSC::allocateCell<JSClipboardPrototype>(globalData.heap)) JSClipboardPrototype(globalData, globalObject, structure);
99         ptr->finishCreation(globalData);
100         return ptr;
101     }
102
103     static const JSC::ClassInfo s_info;
104     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
105     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
106     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
107     {
108         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
109     }
110
111 private:
112     JSClipboardPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
113 protected:
114     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
115 };
116
117 class JSClipboardConstructor : public DOMConstructorObject {
118 private:
119     JSClipboardConstructor(JSC::Structure*, JSDOMGlobalObject*);
120     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
121
122 public:
123     typedef DOMConstructorObject Base;
124     static JSClipboardConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
125     {
126         JSClipboardConstructor* ptr = new (JSC::allocateCell<JSClipboardConstructor>(*exec->heap())) JSClipboardConstructor(structure, globalObject);
127         ptr->finishCreation(exec, globalObject);
128         return ptr;
129     }
130
131     static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
132     static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
133     static const JSC::ClassInfo s_info;
134     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
135     {
136         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
137     }
138 protected:
139     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
140 };
141
142 // Functions
143
144 JSC::EncodedJSValue JSC_HOST_CALL jsClipboardPrototypeFunctionClearData(JSC::ExecState*);
145 JSC::EncodedJSValue JSC_HOST_CALL jsClipboardPrototypeFunctionGetData(JSC::ExecState*);
146 JSC::EncodedJSValue JSC_HOST_CALL jsClipboardPrototypeFunctionSetData(JSC::ExecState*);
147 JSC::EncodedJSValue JSC_HOST_CALL jsClipboardPrototypeFunctionSetDragImage(JSC::ExecState*);
148 // Attributes
149
150 JSC::JSValue jsClipboardDropEffect(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
151 void setJSClipboardDropEffect(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
152 JSC::JSValue jsClipboardEffectAllowed(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
153 void setJSClipboardEffectAllowed(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
154 JSC::JSValue jsClipboardTypes(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
155 JSC::JSValue jsClipboardFiles(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
156 JSC::JSValue jsClipboardItems(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
157 JSC::JSValue jsClipboardConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
158
159 } // namespace WebCore
160
161 #endif