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.
21 #ifndef JSUint16Array_h
22 #define JSUint16Array_h
24 #include "JSArrayBufferView.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSObject.h>
27 #include <wtf/Uint16Array.h>
31 class JSUint16Array : public JSArrayBufferView {
33 typedef JSArrayBufferView Base;
34 static JSUint16Array* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<Uint16Array> impl)
36 JSUint16Array* ptr = new (JSC::allocateCell<JSUint16Array>(globalObject->globalData().heap)) JSUint16Array(structure, globalObject, impl);
37 ptr->finishCreation(globalObject->globalData());
41 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
42 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
43 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
44 static bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
45 static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
46 static void putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue);
47 static const JSC::ClassInfo s_info;
49 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
51 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
54 static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
55 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
58 JSC::JSValue set(JSC::ExecState*);
59 Uint16Array* impl() const
61 return static_cast<Uint16Array*>(Base::impl());
63 static const JSC::TypedArrayType TypedArrayStorageType = JSC::TypedArrayUint16;
64 intptr_t m_storageLength;
67 JSUint16Array(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Uint16Array>);
68 void finishCreation(JSC::JSGlobalData&);
69 static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
70 JSC::JSValue getByIndex(JSC::ExecState*, unsigned index);
71 void indexSetter(JSC::ExecState*, unsigned index, JSC::JSValue);
74 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Uint16Array*);
75 Uint16Array* toUint16Array(JSC::JSValue);
77 class JSUint16ArrayPrototype : public JSC::JSNonFinalObject {
79 typedef JSC::JSNonFinalObject Base;
80 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
81 static JSUint16ArrayPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
83 JSUint16ArrayPrototype* ptr = new (JSC::allocateCell<JSUint16ArrayPrototype>(globalData.heap)) JSUint16ArrayPrototype(globalData, globalObject, structure);
84 ptr->finishCreation(globalData);
88 static const JSC::ClassInfo s_info;
89 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
90 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
91 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
93 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
97 JSUint16ArrayPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
99 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
102 class JSUint16ArrayConstructor : public DOMConstructorObject {
104 JSUint16ArrayConstructor(JSC::Structure*, JSDOMGlobalObject*);
105 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
108 typedef DOMConstructorObject Base;
109 static JSUint16ArrayConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
111 JSUint16ArrayConstructor* ptr = new (JSC::allocateCell<JSUint16ArrayConstructor>(*exec->heap())) JSUint16ArrayConstructor(structure, globalObject);
112 ptr->finishCreation(exec, globalObject);
116 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
117 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
118 static const JSC::ClassInfo s_info;
119 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
121 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
124 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
125 static JSC::EncodedJSValue JSC_HOST_CALL constructJSUint16Array(JSC::ExecState*);
126 static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
131 JSC::EncodedJSValue JSC_HOST_CALL jsUint16ArrayPrototypeFunctionSubarray(JSC::ExecState*);
132 JSC::EncodedJSValue JSC_HOST_CALL jsUint16ArrayPrototypeFunctionSet(JSC::ExecState*);
135 JSC::JSValue jsUint16ArrayLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
136 JSC::JSValue jsUint16ArrayConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
139 JSC::JSValue jsUint16ArrayBYTES_PER_ELEMENT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
141 } // namespace WebCore