2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
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.
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.
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.
24 #include "Clipboard.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
32 class JSClipboard : public JSDOMWrapper {
34 typedef JSDOMWrapper Base;
35 static JSClipboard* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<Clipboard> impl)
37 JSClipboard* ptr = new (JSC::allocateCell<JSClipboard>(globalObject->globalData().heap)) JSClipboard(structure, globalObject, impl);
38 ptr->finishCreation(globalObject->globalData());
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;
48 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
53 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
56 JSC::JSValue types(JSC::ExecState*) const;
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; }
68 JSClipboard(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Clipboard>);
69 void finishCreation(JSC::JSGlobalData&);
70 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
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);
78 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, Clipboard*)
80 DEFINE_STATIC_LOCAL(JSClipboardOwner, jsClipboardOwner, ());
81 return &jsClipboardOwner;
84 inline void* wrapperContext(DOMWrapperWorld* world, Clipboard*)
89 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Clipboard*);
90 Clipboard* toClipboard(JSC::JSValue);
92 class JSClipboardPrototype : public JSC::JSNonFinalObject {
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)
98 JSClipboardPrototype* ptr = new (JSC::allocateCell<JSClipboardPrototype>(globalData.heap)) JSClipboardPrototype(globalData, globalObject, structure);
99 ptr->finishCreation(globalData);
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)
108 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
112 JSClipboardPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
114 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
117 class JSClipboardConstructor : public DOMConstructorObject {
119 JSClipboardConstructor(JSC::Structure*, JSDOMGlobalObject*);
120 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
123 typedef DOMConstructorObject Base;
124 static JSClipboardConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
126 JSClipboardConstructor* ptr = new (JSC::allocateCell<JSClipboardConstructor>(*exec->heap())) JSClipboardConstructor(structure, globalObject);
127 ptr->finishCreation(exec, globalObject);
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)
136 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
139 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
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*);
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&);
159 } // namespace WebCore