diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp | 289 |
1 files changed, 289 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp new file mode 100644 index 0000000..105b916 --- /dev/null +++ b/src/3rdparty/webkit/WebCore/generated/JSDataGridColumn.cpp @@ -0,0 +1,289 @@ +/* + 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" +#include "JSDataGridColumn.h" + +#include "DataGridColumn.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(JSDataGridColumn); + +/* Hash table */ + +static const HashTableValue JSDataGridColumnTableValues[8] = +{ + { "id", DontDelete, (intptr_t)jsDataGridColumnId, (intptr_t)setJSDataGridColumnId }, + { "label", DontDelete, (intptr_t)jsDataGridColumnLabel, (intptr_t)setJSDataGridColumnLabel }, + { "type", DontDelete, (intptr_t)jsDataGridColumnType, (intptr_t)setJSDataGridColumnType }, + { "sortable", DontDelete, (intptr_t)jsDataGridColumnSortable, (intptr_t)setJSDataGridColumnSortable }, + { "sortDirection", DontDelete, (intptr_t)jsDataGridColumnSortDirection, (intptr_t)setJSDataGridColumnSortDirection }, + { "primary", DontDelete, (intptr_t)jsDataGridColumnPrimary, (intptr_t)setJSDataGridColumnPrimary }, + { "constructor", DontEnum|ReadOnly, (intptr_t)jsDataGridColumnConstructor, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static const HashTable JSDataGridColumnTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 63, JSDataGridColumnTableValues, 0 }; +#else + { 17, 15, JSDataGridColumnTableValues, 0 }; +#endif + +/* Hash table for constructor */ + +static const HashTableValue JSDataGridColumnConstructorTableValues[7] = +{ + { "NEVER_SORTED", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnNEVER_SORTED, (intptr_t)0 }, + { "ALWAYS_SORTED", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnALWAYS_SORTED, (intptr_t)0 }, + { "SOMETIMES_SORTED", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnSOMETIMES_SORTED, (intptr_t)0 }, + { "NATURAL_SORT", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnNATURAL_SORT, (intptr_t)0 }, + { "SORT_ASCENDING", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnSORT_ASCENDING, (intptr_t)0 }, + { "SORC_DESCENDING", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnSORC_DESCENDING, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static const HashTable JSDataGridColumnConstructorTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 31, JSDataGridColumnConstructorTableValues, 0 }; +#else + { 17, 15, JSDataGridColumnConstructorTableValues, 0 }; +#endif + +class JSDataGridColumnConstructor : public DOMObject { +public: + JSDataGridColumnConstructor(ExecState* exec) + : DOMObject(JSDataGridColumnConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype())) + { + putDirect(exec->propertyNames().prototype, JSDataGridColumnPrototype::self(exec, exec->lexicalGlobalObject()), None); + } + virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); + virtual const ClassInfo* classInfo() const { return &s_info; } + static const ClassInfo s_info; + + static PassRefPtr<Structure> createStructure(JSValue proto) + { + return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); + } +}; + +const ClassInfo JSDataGridColumnConstructor::s_info = { "DataGridColumnConstructor", 0, &JSDataGridColumnConstructorTable, 0 }; + +bool JSDataGridColumnConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSDataGridColumnConstructor, DOMObject>(exec, &JSDataGridColumnConstructorTable, this, propertyName, slot); +} + +/* Hash table for prototype */ + +static const HashTableValue JSDataGridColumnPrototypeTableValues[7] = +{ + { "NEVER_SORTED", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnNEVER_SORTED, (intptr_t)0 }, + { "ALWAYS_SORTED", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnALWAYS_SORTED, (intptr_t)0 }, + { "SOMETIMES_SORTED", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnSOMETIMES_SORTED, (intptr_t)0 }, + { "NATURAL_SORT", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnNATURAL_SORT, (intptr_t)0 }, + { "SORT_ASCENDING", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnSORT_ASCENDING, (intptr_t)0 }, + { "SORC_DESCENDING", DontDelete|ReadOnly, (intptr_t)jsDataGridColumnSORC_DESCENDING, (intptr_t)0 }, + { 0, 0, 0, 0 } +}; + +static const HashTable JSDataGridColumnPrototypeTable = +#if ENABLE(PERFECT_HASH_SIZE) + { 31, JSDataGridColumnPrototypeTableValues, 0 }; +#else + { 17, 15, JSDataGridColumnPrototypeTableValues, 0 }; +#endif + +const ClassInfo JSDataGridColumnPrototype::s_info = { "DataGridColumnPrototype", 0, &JSDataGridColumnPrototypeTable, 0 }; + +JSObject* JSDataGridColumnPrototype::self(ExecState* exec, JSGlobalObject* globalObject) +{ + return getDOMPrototype<JSDataGridColumn>(exec, globalObject); +} + +bool JSDataGridColumnPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSDataGridColumnPrototype, JSObject>(exec, &JSDataGridColumnPrototypeTable, this, propertyName, slot); +} + +const ClassInfo JSDataGridColumn::s_info = { "DataGridColumn", 0, &JSDataGridColumnTable, 0 }; + +JSDataGridColumn::JSDataGridColumn(PassRefPtr<Structure> structure, PassRefPtr<DataGridColumn> impl) + : DOMObject(structure) + , m_impl(impl) +{ +} + +JSDataGridColumn::~JSDataGridColumn() +{ + forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get()); +} + +JSObject* JSDataGridColumn::createPrototype(ExecState* exec, JSGlobalObject* globalObject) +{ + return new (exec) JSDataGridColumnPrototype(JSDataGridColumnPrototype::createStructure(globalObject->objectPrototype())); +} + +bool JSDataGridColumn::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) +{ + return getStaticValueSlot<JSDataGridColumn, Base>(exec, &JSDataGridColumnTable, this, propertyName, slot); +} + +JSValue jsDataGridColumnId(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + UNUSED_PARAM(exec); + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + return jsString(exec, imp->id()); +} + +JSValue jsDataGridColumnLabel(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + UNUSED_PARAM(exec); + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + return jsString(exec, imp->label()); +} + +JSValue jsDataGridColumnType(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + UNUSED_PARAM(exec); + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + return jsString(exec, imp->type()); +} + +JSValue jsDataGridColumnSortable(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + UNUSED_PARAM(exec); + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + return jsNumber(exec, imp->sortable()); +} + +JSValue jsDataGridColumnSortDirection(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + UNUSED_PARAM(exec); + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + return jsNumber(exec, imp->sortDirection()); +} + +JSValue jsDataGridColumnPrimary(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + UNUSED_PARAM(exec); + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->impl()); + return jsBoolean(imp->primary()); +} + +JSValue jsDataGridColumnConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot) +{ + return static_cast<JSDataGridColumn*>(asObject(slot.slotBase()))->getConstructor(exec); +} +void JSDataGridColumn::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) +{ + lookupPut<JSDataGridColumn, Base>(exec, propertyName, value, &JSDataGridColumnTable, this, slot); +} + +void setJSDataGridColumnId(ExecState* exec, JSObject* thisObject, JSValue value) +{ + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(thisObject)->impl()); + imp->setId(value.toString(exec)); +} + +void setJSDataGridColumnLabel(ExecState* exec, JSObject* thisObject, JSValue value) +{ + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(thisObject)->impl()); + imp->setLabel(value.toString(exec)); +} + +void setJSDataGridColumnType(ExecState* exec, JSObject* thisObject, JSValue value) +{ + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(thisObject)->impl()); + imp->setType(value.toString(exec)); +} + +void setJSDataGridColumnSortable(ExecState* exec, JSObject* thisObject, JSValue value) +{ + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(thisObject)->impl()); + imp->setSortable(value.toInt32(exec)); +} + +void setJSDataGridColumnSortDirection(ExecState* exec, JSObject* thisObject, JSValue value) +{ + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(thisObject)->impl()); + imp->setSortDirection(value.toInt32(exec)); +} + +void setJSDataGridColumnPrimary(ExecState* exec, JSObject* thisObject, JSValue value) +{ + DataGridColumn* imp = static_cast<DataGridColumn*>(static_cast<JSDataGridColumn*>(thisObject)->impl()); + imp->setPrimary(value.toBoolean(exec)); +} + +JSValue JSDataGridColumn::getConstructor(ExecState* exec) +{ + return getDOMConstructor<JSDataGridColumnConstructor>(exec); +} + +// Constant getters + +JSValue jsDataGridColumnNEVER_SORTED(ExecState* exec, const Identifier&, const PropertySlot&) +{ + return jsNumber(exec, static_cast<int>(0)); +} + +JSValue jsDataGridColumnALWAYS_SORTED(ExecState* exec, const Identifier&, const PropertySlot&) +{ + return jsNumber(exec, static_cast<int>(1)); +} + +JSValue jsDataGridColumnSOMETIMES_SORTED(ExecState* exec, const Identifier&, const PropertySlot&) +{ + return jsNumber(exec, static_cast<int>(2)); +} + +JSValue jsDataGridColumnNATURAL_SORT(ExecState* exec, const Identifier&, const PropertySlot&) +{ + return jsNumber(exec, static_cast<int>(0)); +} + +JSValue jsDataGridColumnSORT_ASCENDING(ExecState* exec, const Identifier&, const PropertySlot&) +{ + return jsNumber(exec, static_cast<int>(1)); +} + +JSValue jsDataGridColumnSORC_DESCENDING(ExecState* exec, const Identifier&, const PropertySlot&) +{ + return jsNumber(exec, static_cast<int>(2)); +} + +JSC::JSValue toJS(JSC::ExecState* exec, DataGridColumn* object) +{ + return getDOMObjectWrapper<JSDataGridColumn>(exec, object); +} +DataGridColumn* toDataGridColumn(JSC::JSValue value) +{ + return value.isObject(&JSDataGridColumn::s_info) ? static_cast<JSDataGridColumn*>(asObject(value))->impl() : 0; +} + +} |