/*
    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(FILTERS) && ENABLE(SVG)

#include "JSSVGFETileElement.h"

#include "JSSVGAnimatedString.h"
#include "SVGFETileElement.h"
#include <wtf/GetPtr.h>

#if ENABLE(SVG)
#include "JSSVGAnimatedLength.h"
#endif

using namespace JSC;

namespace WebCore {

/* Hash table */

static const HashTableValue JSSVGFETileElementTableValues[] =
{
    { "in1", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementIn1), (intptr_t)0, NoIntrinsic },
#if ENABLE(SVG)
    { "x", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementX), (intptr_t)0, NoIntrinsic },
#endif
#if ENABLE(SVG)
    { "y", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementY), (intptr_t)0, NoIntrinsic },
#endif
#if ENABLE(SVG)
    { "width", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementWidth), (intptr_t)0, NoIntrinsic },
#endif
#if ENABLE(SVG)
    { "height", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementHeight), (intptr_t)0, NoIntrinsic },
#endif
#if ENABLE(SVG)
    { "result", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementResult), (intptr_t)0, NoIntrinsic },
#endif
    { "constructor", DontEnum | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGFETileElementConstructor), (intptr_t)0, NoIntrinsic },
    { 0, 0, 0, 0, NoIntrinsic }
};

static const HashTable JSSVGFETileElementTable = { 18, 15, JSSVGFETileElementTableValues, 0 };
/* Hash table for constructor */

static const HashTableValue JSSVGFETileElementConstructorTableValues[] =
{
    { 0, 0, 0, 0, NoIntrinsic }
};

static const HashTable JSSVGFETileElementConstructorTable = { 1, 0, JSSVGFETileElementConstructorTableValues, 0 };
const ClassInfo JSSVGFETileElementConstructor::s_info = { "SVGFETileElementConstructor", &Base::s_info, &JSSVGFETileElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGFETileElementConstructor) };

JSSVGFETileElementConstructor::JSSVGFETileElementConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
    : DOMConstructorObject(structure, globalObject)
{
}

void JSSVGFETileElementConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
{
    Base::finishCreation(exec->vm());
    ASSERT(inherits(&s_info));
    putDirect(exec->vm(), exec->propertyNames().prototype, JSSVGFETileElementPrototype::self(exec, globalObject), DontDelete | ReadOnly);
    putDirect(exec->vm(), exec->propertyNames().length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}

bool JSSVGFETileElementConstructor::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    return getStaticValueSlot<JSSVGFETileElementConstructor, JSDOMWrapper>(exec, &JSSVGFETileElementConstructorTable, jsCast<JSSVGFETileElementConstructor*>(cell), propertyName, slot);
}

bool JSSVGFETileElementConstructor::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
{
    return getStaticValueDescriptor<JSSVGFETileElementConstructor, JSDOMWrapper>(exec, &JSSVGFETileElementConstructorTable, jsCast<JSSVGFETileElementConstructor*>(object), propertyName, descriptor);
}

/* Hash table for prototype */

static const HashTableValue JSSVGFETileElementPrototypeTableValues[] =
{
    { 0, 0, 0, 0, NoIntrinsic }
};

static const HashTable JSSVGFETileElementPrototypeTable = { 1, 0, JSSVGFETileElementPrototypeTableValues, 0 };
const ClassInfo JSSVGFETileElementPrototype::s_info = { "SVGFETileElementPrototype", &Base::s_info, &JSSVGFETileElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGFETileElementPrototype) };

JSObject* JSSVGFETileElementPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
{
    return getDOMPrototype<JSSVGFETileElement>(exec, globalObject);
}

const ClassInfo JSSVGFETileElement::s_info = { "SVGFETileElement", &Base::s_info, &JSSVGFETileElementTable, 0 , CREATE_METHOD_TABLE(JSSVGFETileElement) };

JSSVGFETileElement::JSSVGFETileElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGFETileElement> impl)
    : JSSVGStyledElement(structure, globalObject, impl)
{
}

void JSSVGFETileElement::finishCreation(VM& vm)
{
    Base::finishCreation(vm);
    ASSERT(inherits(&s_info));
}

JSObject* JSSVGFETileElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
    return JSSVGFETileElementPrototype::create(exec->vm(), globalObject, JSSVGFETileElementPrototype::createStructure(exec->vm(), globalObject, JSSVGStyledElementPrototype::self(exec, globalObject)));
}

bool JSSVGFETileElement::getOwnPropertySlot(JSCell* cell, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    JSSVGFETileElement* thisObject = jsCast<JSSVGFETileElement*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
    return getStaticValueSlot<JSSVGFETileElement, Base>(exec, &JSSVGFETileElementTable, thisObject, propertyName, slot);
}

bool JSSVGFETileElement::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, PropertyName propertyName, PropertyDescriptor& descriptor)
{
    JSSVGFETileElement* thisObject = jsCast<JSSVGFETileElement*>(object);
    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
    return getStaticValueDescriptor<JSSVGFETileElement, Base>(exec, &JSSVGFETileElementTable, thisObject, propertyName, descriptor);
}

JSValue jsSVGFETileElementIn1(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGFETileElement* castedThis = jsCast<JSSVGFETileElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGFETileElement* impl = static_cast<SVGFETileElement*>(castedThis->impl());
    RefPtr<SVGAnimatedString> obj = impl->in1Animated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return result;
}


#if ENABLE(SVG)
JSValue jsSVGFETileElementX(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGFETileElement* castedThis = jsCast<JSSVGFETileElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGFETileElement* impl = static_cast<SVGFETileElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = impl->xAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return result;
}

#endif

#if ENABLE(SVG)
JSValue jsSVGFETileElementY(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGFETileElement* castedThis = jsCast<JSSVGFETileElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGFETileElement* impl = static_cast<SVGFETileElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = impl->yAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return result;
}

#endif

#if ENABLE(SVG)
JSValue jsSVGFETileElementWidth(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGFETileElement* castedThis = jsCast<JSSVGFETileElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGFETileElement* impl = static_cast<SVGFETileElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = impl->widthAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return result;
}

#endif

#if ENABLE(SVG)
JSValue jsSVGFETileElementHeight(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGFETileElement* castedThis = jsCast<JSSVGFETileElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGFETileElement* impl = static_cast<SVGFETileElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = impl->heightAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return result;
}

#endif

#if ENABLE(SVG)
JSValue jsSVGFETileElementResult(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGFETileElement* castedThis = jsCast<JSSVGFETileElement*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    SVGFETileElement* impl = static_cast<SVGFETileElement*>(castedThis->impl());
    RefPtr<SVGAnimatedString> obj = impl->resultAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return result;
}

#endif

JSValue jsSVGFETileElementConstructor(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSSVGFETileElement* domObject = jsCast<JSSVGFETileElement*>(asObject(slotBase));
    return JSSVGFETileElement::getConstructor(exec, domObject->globalObject());
}

JSValue JSSVGFETileElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
{
    return getDOMConstructor<JSSVGFETileElementConstructor>(exec, jsCast<JSDOMGlobalObject*>(globalObject));
}


}

#endif // ENABLE(FILTERS) && ENABLE(SVG)
