SVGAnimatedNumber.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef mozilla_dom_SVGAnimatedNumber_h
  6. #define mozilla_dom_SVGAnimatedNumber_h
  7. #include "nsISupports.h"
  8. #include "nsWrapperCache.h"
  9. #include "nsSVGElement.h"
  10. namespace mozilla {
  11. namespace dom {
  12. class SVGAnimatedNumber : public nsISupports
  13. , public nsWrapperCache
  14. {
  15. public:
  16. NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  17. NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGAnimatedNumber)
  18. nsSVGElement* GetParentObject() const
  19. {
  20. return mSVGElement;
  21. }
  22. virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
  23. override final;
  24. virtual float BaseVal() = 0;
  25. virtual void SetBaseVal(float aBaseVal) = 0;
  26. virtual float AnimVal() = 0;
  27. protected:
  28. explicit SVGAnimatedNumber(nsSVGElement* aSVGElement)
  29. : mSVGElement(aSVGElement)
  30. {
  31. }
  32. virtual ~SVGAnimatedNumber() {};
  33. RefPtr<nsSVGElement> mSVGElement;
  34. };
  35. } // namespace dom
  36. } // namespace mozilla
  37. #endif // mozilla_dom_SVGAnimatedNumber_h