tizen beta release
[profile/ivi/webkit-efl.git] / DerivedSources / WebCore / JSInt16Array.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 JSInt16Array_h
22 #define JSInt16Array_h
23
24 #include "JSArrayBufferView.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSObject.h>
27 #include <wtf/Int16Array.h>
28
29 namespace WebCore {
30
31 class JSInt16Array : public JSArrayBufferView {
32 public:
33     typedef JSArrayBufferView Base;
34     static JSInt16Array* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<Int16Array> impl)
35     {
36         JSInt16Array* ptr = new (JSC::allocateCell<JSInt16Array>(globalObject->globalData().heap)) JSInt16Array(structure, globalObject, impl);
37         ptr->finishCreation(globalObject->globalData());
38         return ptr;
39     }
40
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;
48
49     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
50     {
51         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
52     }
53
54     static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
55     static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
56
57     // Custom functions
58     JSC::JSValue set(JSC::ExecState*);
59     Int16Array* impl() const
60     {
61         return static_cast<Int16Array*>(Base::impl());
62     }
63     static const JSC::TypedArrayType TypedArrayStorageType = JSC::TypedArrayInt16;
64     intptr_t m_storageLength;
65     void* m_storage;
66 protected:
67     JSInt16Array(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<Int16Array>);
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);
72 };
73
74 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, Int16Array*);
75 Int16Array* toInt16Array(JSC::JSValue);
76
77 class JSInt16ArrayPrototype : public JSC::JSNonFinalObject {
78 public:
79     typedef JSC::JSNonFinalObject Base;
80     static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
81     static JSInt16ArrayPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
82     {
83         JSInt16ArrayPrototype* ptr = new (JSC::allocateCell<JSInt16ArrayPrototype>(globalData.heap)) JSInt16ArrayPrototype(globalData, globalObject, structure);
84         ptr->finishCreation(globalData);
85         return ptr;
86     }
87
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)
92     {
93         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
94     }
95
96 private:
97     JSInt16ArrayPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
98 protected:
99     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags;
100 };
101
102 class JSInt16ArrayConstructor : public DOMConstructorObject {
103 private:
104     JSInt16ArrayConstructor(JSC::Structure*, JSDOMGlobalObject*);
105     void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
106
107 public:
108     typedef DOMConstructorObject Base;
109     static JSInt16ArrayConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
110     {
111         JSInt16ArrayConstructor* ptr = new (JSC::allocateCell<JSInt16ArrayConstructor>(*exec->heap())) JSInt16ArrayConstructor(structure, globalObject);
112         ptr->finishCreation(exec, globalObject);
113         return ptr;
114     }
115
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)
120     {
121         return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
122     }
123 protected:
124     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
125     static JSC::EncodedJSValue JSC_HOST_CALL constructJSInt16Array(JSC::ExecState*);
126     static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&);
127 };
128
129 // Functions
130
131 JSC::EncodedJSValue JSC_HOST_CALL jsInt16ArrayPrototypeFunctionSubarray(JSC::ExecState*);
132 JSC::EncodedJSValue JSC_HOST_CALL jsInt16ArrayPrototypeFunctionSet(JSC::ExecState*);
133 // Attributes
134
135 JSC::JSValue jsInt16ArrayLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
136 JSC::JSValue jsInt16ArrayConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
137 // Constants
138
139 JSC::JSValue jsInt16ArrayBYTES_PER_ELEMENT(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
140
141 } // namespace WebCore
142
143 #endif