| /* |
| This file is part of the WebKit open source project. |
| This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
| |
| This library is free software; you can redistribute it and/or |
| modify it under the terms of the GNU Library General Public |
| License as published by the Free Software Foundation; either |
| version 2 of the License, or (at your option) any later version. |
| |
| This library is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| Library General Public License for more details. |
| |
| You should have received a copy of the GNU Library General Public License |
| along with this library; see the file COPYING.LIB. If not, write to |
| the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| Boston, MA 02110-1301, USA. |
| */ |
| |
| #include "config.h" |
| |
| #if ENABLE(3D_CANVAS) |
| |
| #include "JSCanvasActiveInfo.h" |
| |
| #include "CanvasActiveInfo.h" |
| #include "KURL.h" |
| #include <runtime/JSNumberCell.h> |
| #include <runtime/JSString.h> |
| #include <wtf/GetPtr.h> |
| |
| using namespace JSC; |
| |
| namespace WebCore { |
| |
| ASSERT_CLASS_FITS_IN_CELL(JSCanvasActiveInfo); |
| |
| /* Hash table */ |
| |
| static const HashTableValue JSCanvasActiveInfoTableValues[4] = |
| { |
| { "size", DontDelete|ReadOnly, (intptr_t)jsCanvasActiveInfoSize, (intptr_t)0 }, |
| { "type", DontDelete|ReadOnly, (intptr_t)jsCanvasActiveInfoType, (intptr_t)0 }, |
| { "name", DontDelete|ReadOnly, (intptr_t)jsCanvasActiveInfoName, (intptr_t)0 }, |
| { 0, 0, 0, 0 } |
| }; |
| |
| static JSC_CONST_HASHTABLE HashTable JSCanvasActiveInfoTable = |
| #if ENABLE(PERFECT_HASH_SIZE) |
| { 3, JSCanvasActiveInfoTableValues, 0 }; |
| #else |
| { 8, 7, JSCanvasActiveInfoTableValues, 0 }; |
| #endif |
| |
| /* Hash table for prototype */ |
| |
| static const HashTableValue JSCanvasActiveInfoPrototypeTableValues[1] = |
| { |
| { 0, 0, 0, 0 } |
| }; |
| |
| static JSC_CONST_HASHTABLE HashTable JSCanvasActiveInfoPrototypeTable = |
| #if ENABLE(PERFECT_HASH_SIZE) |
| { 0, JSCanvasActiveInfoPrototypeTableValues, 0 }; |
| #else |
| { 1, 0, JSCanvasActiveInfoPrototypeTableValues, 0 }; |
| #endif |
| |
| const ClassInfo JSCanvasActiveInfoPrototype::s_info = { "CanvasActiveInfoPrototype", 0, &JSCanvasActiveInfoPrototypeTable, 0 }; |
| |
| JSObject* JSCanvasActiveInfoPrototype::self(ExecState* exec, JSGlobalObject* globalObject) |
| { |
| return getDOMPrototype<JSCanvasActiveInfo>(exec, globalObject); |
| } |
| |
| const ClassInfo JSCanvasActiveInfo::s_info = { "CanvasActiveInfo", 0, &JSCanvasActiveInfoTable, 0 }; |
| |
| JSCanvasActiveInfo::JSCanvasActiveInfo(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CanvasActiveInfo> impl) |
| : DOMObjectWithGlobalPointer(structure, globalObject) |
| , m_impl(impl) |
| { |
| } |
| |
| JSCanvasActiveInfo::~JSCanvasActiveInfo() |
| { |
| forgetDOMObject(this, impl()); |
| } |
| |
| JSObject* JSCanvasActiveInfo::createPrototype(ExecState* exec, JSGlobalObject* globalObject) |
| { |
| return new (exec) JSCanvasActiveInfoPrototype(JSCanvasActiveInfoPrototype::createStructure(globalObject->objectPrototype())); |
| } |
| |
| bool JSCanvasActiveInfo::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
| { |
| return getStaticValueSlot<JSCanvasActiveInfo, Base>(exec, &JSCanvasActiveInfoTable, this, propertyName, slot); |
| } |
| |
| bool JSCanvasActiveInfo::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor) |
| { |
| return getStaticValueDescriptor<JSCanvasActiveInfo, Base>(exec, &JSCanvasActiveInfoTable, this, propertyName, descriptor); |
| } |
| |
| JSValue jsCanvasActiveInfoSize(ExecState* exec, const Identifier&, const PropertySlot& slot) |
| { |
| JSCanvasActiveInfo* castedThis = static_cast<JSCanvasActiveInfo*>(asObject(slot.slotBase())); |
| UNUSED_PARAM(exec); |
| CanvasActiveInfo* imp = static_cast<CanvasActiveInfo*>(castedThis->impl()); |
| return jsNumber(exec, imp->size()); |
| } |
| |
| JSValue jsCanvasActiveInfoType(ExecState* exec, const Identifier&, const PropertySlot& slot) |
| { |
| JSCanvasActiveInfo* castedThis = static_cast<JSCanvasActiveInfo*>(asObject(slot.slotBase())); |
| UNUSED_PARAM(exec); |
| CanvasActiveInfo* imp = static_cast<CanvasActiveInfo*>(castedThis->impl()); |
| return jsNumber(exec, imp->type()); |
| } |
| |
| JSValue jsCanvasActiveInfoName(ExecState* exec, const Identifier&, const PropertySlot& slot) |
| { |
| JSCanvasActiveInfo* castedThis = static_cast<JSCanvasActiveInfo*>(asObject(slot.slotBase())); |
| UNUSED_PARAM(exec); |
| CanvasActiveInfo* imp = static_cast<CanvasActiveInfo*>(castedThis->impl()); |
| return jsString(exec, imp->name()); |
| } |
| |
| JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, CanvasActiveInfo* object) |
| { |
| return getDOMObjectWrapper<JSCanvasActiveInfo>(exec, globalObject, object); |
| } |
| CanvasActiveInfo* toCanvasActiveInfo(JSC::JSValue value) |
| { |
| return value.inherits(&JSCanvasActiveInfo::s_info) ? static_cast<JSCanvasActiveInfo*>(asObject(value))->impl() : 0; |
| } |
| |
| } |
| |
| #endif // ENABLE(3D_CANVAS) |