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 JSTestMediaQueryListListener_h 22#define JSTestMediaQueryListListener_h 23 24#include "JSDOMBinding.h" 25#include "TestMediaQueryListListener.h" 26#include <runtime/JSGlobalObject.h> 27#include <runtime/JSObject.h> 28#include <runtime/ObjectPrototype.h> 29 30namespace WebCore { 31 32class JSTestMediaQueryListListener : public JSDOMWrapper { 33public: 34 typedef JSDOMWrapper Base; 35 static JSTestMediaQueryListListener* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<TestMediaQueryListListener> impl) 36 { 37 JSTestMediaQueryListListener* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListener>(globalObject->vm().heap)) JSTestMediaQueryListListener(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 destroy(JSC::JSCell*); 46 ~JSTestMediaQueryListListener(); 47 static const JSC::ClassInfo s_info; 48 49 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 50 { 51 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 52 } 53 54 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*); 55 TestMediaQueryListListener* impl() const { return m_impl; } 56 void releaseImpl() { m_impl->deref(); m_impl = 0; } 57 58 void releaseImplIfNotNull() 59 { 60 if (m_impl) { 61 m_impl->deref(); 62 m_impl = 0; 63 } 64 } 65 66private: 67 TestMediaQueryListListener* m_impl; 68protected: 69 JSTestMediaQueryListListener(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<TestMediaQueryListListener>); 70 void finishCreation(JSC::VM&); 71 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | Base::StructureFlags; 72}; 73 74class JSTestMediaQueryListListenerOwner : public JSC::WeakHandleOwner { 75public: 76 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&); 77 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context); 78}; 79 80inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, TestMediaQueryListListener*) 81{ 82 DEFINE_STATIC_LOCAL(JSTestMediaQueryListListenerOwner, jsTestMediaQueryListListenerOwner, ()); 83 return &jsTestMediaQueryListListenerOwner; 84} 85 86inline void* wrapperContext(DOMWrapperWorld* world, TestMediaQueryListListener*) 87{ 88 return world; 89} 90 91JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*); 92TestMediaQueryListListener* toTestMediaQueryListListener(JSC::JSValue); 93 94class JSTestMediaQueryListListenerPrototype : public JSC::JSNonFinalObject { 95public: 96 typedef JSC::JSNonFinalObject Base; 97 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*); 98 static JSTestMediaQueryListListenerPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure) 99 { 100 JSTestMediaQueryListListenerPrototype* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerPrototype>(vm.heap)) JSTestMediaQueryListListenerPrototype(vm, globalObject, structure); 101 ptr->finishCreation(vm); 102 return ptr; 103 } 104 105 static const JSC::ClassInfo s_info; 106 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 107 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 108 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 109 { 110 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 111 } 112 113private: 114 JSTestMediaQueryListListenerPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(vm, structure) { } 115protected: 116 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | Base::StructureFlags; 117}; 118 119class JSTestMediaQueryListListenerConstructor : public DOMConstructorObject { 120private: 121 JSTestMediaQueryListListenerConstructor(JSC::Structure*, JSDOMGlobalObject*); 122 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*); 123 124public: 125 typedef DOMConstructorObject Base; 126 static JSTestMediaQueryListListenerConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject) 127 { 128 JSTestMediaQueryListListenerConstructor* ptr = new (NotNull, JSC::allocateCell<JSTestMediaQueryListListenerConstructor>(*exec->heap())) JSTestMediaQueryListListenerConstructor(structure, globalObject); 129 ptr->finishCreation(exec, globalObject); 130 return ptr; 131 } 132 133 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); 134 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertyDescriptor&); 135 static const JSC::ClassInfo s_info; 136 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) 137 { 138 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info); 139 } 140protected: 141 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags; 142}; 143 144// Functions 145 146JSC::EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod(JSC::ExecState*); 147// Attributes 148 149JSC::JSValue jsTestMediaQueryListListenerConstructor(JSC::ExecState*, JSC::JSValue, JSC::PropertyName); 150 151} // namespace WebCore 152 153#endif 154