/*
    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 {

ASSERT_CLASS_FITS_IN_CELL(JSSVGRadialGradientElement);

/* Hash table */

static const HashTableValue JSSVGRadialGradientElementTableValues[6] =
{
    { "cx", DontDelete|ReadOnly, (intptr_t)jsSVGRadialGradientElementCx, (intptr_t)0 },
    { "cy", DontDelete|ReadOnly, (intptr_t)jsSVGRadialGradientElementCy, (intptr_t)0 },
    { "r", DontDelete|ReadOnly, (intptr_t)jsSVGRadialGradientElementR, (intptr_t)0 },
    { "fx", DontDelete|ReadOnly, (intptr_t)jsSVGRadialGradientElementFx, (intptr_t)0 },
    { "fy", DontDelete|ReadOnly, (intptr_t)jsSVGRadialGradientElementFy, (intptr_t)0 },
    { 0, 0, 0, 0 }
};

static JSC_CONST_HASHTABLE HashTable JSSVGRadialGradientElementTable =
#if ENABLE(PERFECT_HASH_SIZE)
    { 255, JSSVGRadialGradientElementTableValues, 0 };
#else
    { 18, 15, JSSVGRadialGradientElementTableValues, 0 };
#endif

/* Hash table for prototype */

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

static JSC_CONST_HASHTABLE HashTable JSSVGRadialGradientElementPrototypeTable =
#if ENABLE(PERFECT_HASH_SIZE)
    { 0, JSSVGRadialGradientElementPrototypeTableValues, 0 };
#else
    { 1, 0, JSSVGRadialGradientElementPrototypeTableValues, 0 };
#endif

const ClassInfo JSSVGRadialGradientElementPrototype::s_info = { "SVGRadialGradientElementPrototype", 0, &JSSVGRadialGradientElementPrototypeTable, 0 };

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

const ClassInfo JSSVGRadialGradientElement::s_info = { "SVGRadialGradientElement", &JSSVGGradientElement::s_info, &JSSVGRadialGradientElementTable, 0 };

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

JSObject* JSSVGRadialGradientElement::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
{
    return new (exec) JSSVGRadialGradientElementPrototype(JSSVGRadialGradientElementPrototype::createStructure(JSSVGGradientElementPrototype::self(exec, globalObject)));
}

bool JSSVGRadialGradientElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot)
{
    return getStaticValueSlot<JSSVGRadialGradientElement, Base>(exec, &JSSVGRadialGradientElementTable, this, propertyName, slot);
}

bool JSSVGRadialGradientElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
{
    return getStaticValueDescriptor<JSSVGRadialGradientElement, Base>(exec, &JSSVGRadialGradientElementTable, this, propertyName, descriptor);
}

JSValue jsSVGRadialGradientElementCx(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = imp->cxAnimated();
    return toJS(exec, castedThis->globalObject(), obj.get(), imp);
}

JSValue jsSVGRadialGradientElementCy(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = imp->cyAnimated();
    return toJS(exec, castedThis->globalObject(), obj.get(), imp);
}

JSValue jsSVGRadialGradientElementR(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = imp->rAnimated();
    return toJS(exec, castedThis->globalObject(), obj.get(), imp);
}

JSValue jsSVGRadialGradientElementFx(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = imp->fxAnimated();
    return toJS(exec, castedThis->globalObject(), obj.get(), imp);
}

JSValue jsSVGRadialGradientElementFy(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSSVGRadialGradientElement* castedThis = static_cast<JSSVGRadialGradientElement*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    SVGRadialGradientElement* imp = static_cast<SVGRadialGradientElement*>(castedThis->impl());
    RefPtr<SVGAnimatedLength> obj = imp->fyAnimated();
    return toJS(exec, castedThis->globalObject(), obj.get(), imp);
}


}

#endif // ENABLE(SVG)
