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 JSTestTypedefs_h 22#define JSTestTypedefs_h 23 24#include "JSDOMBinding.h" 25#include "TestTypedefs.h" 26#include <runtime/JSGlobalObject.h> 27#include <runtime/JSObject.h> 28#include <runtime/ObjectPrototype.h> 29 30namespace WebCore { 31 32class JSTestTypedefs : public JSDOMWrapper { 33public: 34 typedef JSDOMWrapper Base; 35 static JSTestTypedefs* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestTypedefs> impl) 36 { 37 JSTestTypedefs* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefs>(globalObject->vm().heap)) JSTestTypedefs(structure, globalObject, impl); 38 ptr->finishCreation(globalObject->vm()); 39 return ptr; 40 } 41 42 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*); 43 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 44 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 45 static void put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); 46 static void destroy(JSC::JSCell*); 47 ~JSTestTypedefs(); 48 static const JSC::ClassInfo s_info; 49 50 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 51 { 52 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 53 } 54 55 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); 56 TestTypedefs* impl() const { return m_impl; } 57 void releaseImpl() { m_impl->deref(); m_impl = 0; } 58 59 void releaseImplIfNotNull() 60 { 61 if (m_impl) { 62 m_impl->deref(); 63 m_impl = 0; 64 } 65 } 66 67private: 68 TestTypedefs* m_impl; 69protected: 70 JSTestTypedefs(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestTypedefs>); 71 void finishCreation(JSC::VM&); 72 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Base::StructureFlags; 73}; 74 75class JSTestTypedefsOwner : public JSC::WeakHandleOwner { 76public: 77 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&); 78 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context); 79}; 80 81inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestTypedefs*) 82{ 83 DEFINE_STATIC_LOCAL(JSTestTypedefsOwner, jsTestTypedefsOwner, ()); 84 return &jsTestTypedefsOwner; 85} 86 87inline void* wrapperContext(DOMWrapperWorld* world, TestTypedefs*) 88{ 89 return world; 90} 91 92JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*); 93TestTypedefs* toTestTypedefs(JSC::JSValue); 94 95class JSTestTypedefsPrototype : public JSC::JSNonFinalObject { 96public: 97 typedef JSC::JSNonFinalObject Base; 98 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 99 static JSTestTypedefsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) 100 { 101 JSTestTypedefsPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsPrototype>(vm.heap)) JSTestTypedefsPrototype(vm, globalObject, structure); 102 ptr->finishCreation(vm); 103 return ptr; 104 } 105 106 static const JSC::ClassInfo s_info; 107 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 108 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 109 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 110 { 111 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 112 } 113 114private: 115 JSTestTypedefsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { } 116protected: 117 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 118}; 119 120class JSTestTypedefsConstructor : public DOMConstructorObject { 121private: 122 JSTestTypedefsConstructor(JSC::Structure*, JSDOMGlobalObject*); 123 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*); 124 125public: 126 typedef DOMConstructorObject Base; 127 static JSTestTypedefsConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 128 { 129 JSTestTypedefsConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestTypedefsConstructor>(*exec->heap())) JSTestTypedefsConstructor(structure, globalObject); 130 ptr->finishCreation(exec, globalObject); 131 return ptr; 132 } 133 134 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 135 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 136 static const JSC::ClassInfo s_info; 137 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 138 { 139 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 140 } 141protected: 142 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; 143 static JSC::EncodedJSValue JSC_HOST_CALL constructJSTestTypedefs(JSC::ExecState*); 144 static JSC::ConstructType getConstructData(JSC::JSCell*, JSC::ConstructData&); 145}; 146 147// Functions 148 149JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFunc(JSC::ExecState*); 150JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionSetShadow(JSC::ExecState*); 151JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*); 152JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableArrayArg(JSC::ExecState*); 153JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(JSC::ExecState*); 154JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(JSC::ExecState*); 155JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction(JSC::ExecState*); 156JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2(JSC::ExecState*); 157JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionMethodWithException(JSC::ExecState*); 158// Attributes 159 160JSC::JSValue jsTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 161void setJSTestTypedefsUnsignedLongLongAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 162JSC::JSValue jsTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 163void setJSTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 164JSC::JSValue jsTestTypedefsConstructorTestSubObj(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 165JSC::JSValue jsTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 166void setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 167JSC::JSValue jsTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 168void setJSTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 169JSC::JSValue jsTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 170void setJSTestTypedefsStringAttrWithGetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 171JSC::JSValue jsTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 172void setJSTestTypedefsStringAttrWithSetterException(JSC::ExecState*, JSC::JSObject*, JSC::JSValue); 173JSC::JSValue jsTestTypedefsConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 174 175} // namespace WebCore 176 177#endif 178