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

#include "JSSVGRadialGradientElement.h"

#include "JSSVGAnimatedLength.h"
#include "SVGRadialGradientElement.h"
#include <wtf/GetPtr.h>

using namespace JSC;

namespace WebCore {

/* Hash table */

static const HashTableValue JSSVGRadialGradientElementTableValues[] =
{
    { "cx", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementCx), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    { "cy", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementCy), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    { "r", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementR), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    { "fx", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementFx), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    { "fy", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementFy), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    { "fr", DontDelete | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementFr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    { "constructor", DontEnum | ReadOnly, NoIntrinsic, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsSVGRadialGradientElementConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) },
    { 0, 0, NoIntrinsic, 0, 0 }
};

static const HashTable JSSVGRadialGradientElementTable = { 18, 15, true, JSSVGRadialGradientElementTableValues, 0 };
/* Hash table for constructor */

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

static const HashTable JSSVGRadialGradientElementConstructorTable = { 1, 0, false, JSSVGRadialGradientElementConstructorTableValues, 0 };
const ClassInfo JSSVGRadialGradientElementConstructor::s_info = { "SVGRadialGradientElementConstructor", &Base::s_info, &JSSVGRadialGradientElementConstructorTable, 0, CREATE_METHOD_TABLE(JSSVGRadialGradientElementConstructor) };

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

void JSSVGRadialGradientElementConstructor::finishCreation(VM& vm, JSDOMGlobalObject* globalObject)
{
    Base::finishCreation(vm);
    ASSERT(inherits(info()));
    putDirect(vm, vm.propertyNames->prototype, JSSVGRadialGradientElementPrototype::self(vm, globalObject), DontDelete | ReadOnly);
    putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontDelete | DontEnum);
}

bool JSSVGRadialGradientElementConstructor::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    return getStaticValueSlot<JSSVGRadialGradientElementConstructor, JSDOMWrapper>(exec, JSSVGRadialGradientElementConstructorTable, jsCast<JSSVGRadialGradientElementConstructor*>(object), propertyName, slot);
}

/* Hash table for prototype */

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

static const HashTable JSSVGRadialGradientElementPrototypeTable = { 1, 0, false, JSSVGRadialGradientElementPrototypeTableValues, 0 };
const ClassInfo JSSVGRadialGradientElementPrototype::s_info = { "SVGRadialGradientElementPrototype", &Base::s_info, &JSSVGRadialGradientElementPrototypeTable, 0, CREATE_METHOD_TABLE(JSSVGRadialGradientElementPrototype) };

JSObject* JSSVGRadialGradientElementPrototype::self(VM& vm, JSGlobalObject* globalObject)
{
    return getDOMPrototype<JSSVGRadialGradientElement>(vm, globalObject);
}

const ClassInfo JSSVGRadialGradientElement::s_info = { "SVGRadialGradientElement", &Base::s_info, &JSSVGRadialGradientElementTable, 0 , CREATE_METHOD_TABLE(JSSVGRadialGradientElement) };

JSSVGRadialGradientElement::JSSVGRadialGradientElement(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGRadialGradientElement> impl)
    : JSSVGGradientElement(structure, globalObject, impl)
{
}

void JSSVGRadialGradientElement::finishCreation(VM& vm)
{
    Base::finishCreation(vm);
    ASSERT(inherits(info()));
}

JSObject* JSSVGRadialGradientElement::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
    return JSSVGRadialGradientElementPrototype::create(vm, globalObject, JSSVGRadialGradientElementPrototype::createStructure(vm, globalObject, JSSVGGradientElementPrototype::self(vm, globalObject)));
}

bool JSSVGRadialGradientElement::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    JSSVGRadialGradientElement* thisObject = jsCast<JSSVGRadialGradientElement*>(object);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    return getStaticValueSlot<JSSVGRadialGradientElement, Base>(exec, JSSVGRadialGradientElementTable, thisObject, propertyName, slot);
}

EncodedJSValue jsSVGRadialGradientElementCx(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGRadialGradientElement* castedThis = jsDynamicCast<JSSVGRadialGradientElement*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGRadialGradientElement& impl = castedThis->impl();
    RefPtr<SVGAnimatedLength> obj = impl.cxAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGRadialGradientElementCy(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGRadialGradientElement* castedThis = jsDynamicCast<JSSVGRadialGradientElement*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGRadialGradientElement& impl = castedThis->impl();
    RefPtr<SVGAnimatedLength> obj = impl.cyAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGRadialGradientElementR(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGRadialGradientElement* castedThis = jsDynamicCast<JSSVGRadialGradientElement*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGRadialGradientElement& impl = castedThis->impl();
    RefPtr<SVGAnimatedLength> obj = impl.rAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGRadialGradientElementFx(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGRadialGradientElement* castedThis = jsDynamicCast<JSSVGRadialGradientElement*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGRadialGradientElement& impl = castedThis->impl();
    RefPtr<SVGAnimatedLength> obj = impl.fxAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGRadialGradientElementFy(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGRadialGradientElement* castedThis = jsDynamicCast<JSSVGRadialGradientElement*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGRadialGradientElement& impl = castedThis->impl();
    RefPtr<SVGAnimatedLength> obj = impl.fyAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGRadialGradientElementFr(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSSVGRadialGradientElement* castedThis = jsDynamicCast<JSSVGRadialGradientElement*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    SVGRadialGradientElement& impl = castedThis->impl();
    RefPtr<SVGAnimatedLength> obj = impl.frAnimated();
    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());
    return JSValue::encode(result);
}


EncodedJSValue jsSVGRadialGradientElementConstructor(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue, PropertyName)
{
    JSSVGRadialGradientElement* domObject = jsDynamicCast<JSSVGRadialGradientElement*>(JSValue::decode(thisValue));
    if (!domObject)
        return throwVMTypeError(exec);
    if (!domObject)
        return throwVMTypeError(exec);
    return JSValue::encode(JSSVGRadialGradientElement::getConstructor(exec->vm(), domObject->globalObject()));
}

JSValue JSSVGRadialGradientElement::getConstructor(VM& vm, JSGlobalObject* globalObject)
{
    return getDOMConstructor<JSSVGRadialGradientElementConstructor>(vm, jsCast<JSDOMGlobalObject*>(globalObject));
}


}

#endif // ENABLE(SVG)
