15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/* 25c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright (C) Research In Motion Limited 2010. All rights reserved. 35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * This library is free software; you can redistribute it and/or 55c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * modify it under the terms of the GNU Library General Public 65c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * License as published by the Free Software Foundation; either 75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * version 2 of the License, or (at your option) any later version. 85c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 95c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * This library is distributed in the hope that it will be useful, 105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * but WITHOUT ANY WARRANTY; without even the implied warranty of 115c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 125c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Library General Public License for more details. 135c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 145c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * You should have received a copy of the GNU Library General Public License 155c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * along with this library; see the file COPYING.LIB. If not, write to 165c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Boston, MA 02110-1301, USA. 185c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */ 195c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 205c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifndef SVGAnimatedNumberList_h 215c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define SVGAnimatedNumberList_h 225c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 2353e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#include "core/svg/SVGAnimatedTypeAnimator.h" 2453e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#include "core/svg/SVGNumberList.h" 2553e740f4a82e17f3ae59772501622dc354e42336Torne (Richard Coles)#include "core/svg/properties/SVGAnimatedListPropertyTearOff.h" 265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 275c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)namespace WebCore { 285c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)typedef SVGAnimatedListPropertyTearOff<SVGNumberList> SVGAnimatedNumberList; 305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 315c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)// Helper macros to declare/define a SVGAnimatedNumberList object 325c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define DECLARE_ANIMATED_NUMBER_LIST(UpperProperty, LowerProperty) \ 335c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)DECLARE_ANIMATED_LIST_PROPERTY(SVGAnimatedNumberList, SVGNumberList, UpperProperty, LowerProperty) 345c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 355c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define DEFINE_ANIMATED_NUMBER_LIST(OwnerType, DOMAttribute, UpperProperty, LowerProperty) \ 3681a5157921f1d2a7ff6aae115bfe3c139b38a5c8Torne (Richard Coles)DEFINE_ANIMATED_PROPERTY(AnimatedNumberList, OwnerType, DOMAttribute, DOMAttribute.localName(), UpperProperty, LowerProperty, SVGAnimatedNumberList, SVGNumberList) 375c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 385c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class SVGAnimationElement; 395c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 405c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)class SVGAnimatedNumberListAnimator : public SVGAnimatedTypeAnimator { 415c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)public: 425c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) SVGAnimatedNumberListAnimator(SVGAnimationElement*, SVGElement*); 435c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual ~SVGAnimatedNumberListAnimator() { } 4402772c6a72f1ee0b226341a4f4439970c29fc861Ben Murdoch 455c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual PassOwnPtr<SVGAnimatedType> constructFromString(const String&); 465c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual PassOwnPtr<SVGAnimatedType> startAnimValAnimation(const SVGElementAnimatedPropertyList&); 475c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual void stopAnimValAnimation(const SVGElementAnimatedPropertyList&); 485c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual void resetAnimValToBaseVal(const SVGElementAnimatedPropertyList&, SVGAnimatedType*); 495c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual void animValWillChange(const SVGElementAnimatedPropertyList&); 505c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual void animValDidChange(const SVGElementAnimatedPropertyList&); 515c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 525c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual void addAnimatedTypes(SVGAnimatedType*, SVGAnimatedType*); 535c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*); 545c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) virtual float calculateDistance(const String& fromString, const String& toString); 555c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)}; 565c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 575c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)} // namespace WebCore 585c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 595c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#endif 60