1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef MOZILLA_SVGVIEWBOXSMILTYPE_H_
8 #define MOZILLA_SVGVIEWBOXSMILTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "nsISMILType.h"
17 class SVGViewBoxSMILType
: public nsISMILType
20 // Singleton for nsSMILValue objects to hold onto.
21 static SVGViewBoxSMILType sSingleton
;
24 // nsISMILType Methods
25 // -------------------
26 virtual void Init(nsSMILValue
& aValue
) const override
;
27 virtual void Destroy(nsSMILValue
&) const override
;
28 virtual nsresult
Assign(nsSMILValue
& aDest
, const nsSMILValue
& aSrc
) const override
;
29 virtual bool IsEqual(const nsSMILValue
& aLeft
,
30 const nsSMILValue
& aRight
) const override
;
31 virtual nsresult
Add(nsSMILValue
& aDest
, const nsSMILValue
& aValueToAdd
,
32 uint32_t aCount
) const override
;
33 virtual nsresult
ComputeDistance(const nsSMILValue
& aFrom
,
34 const nsSMILValue
& aTo
,
35 double& aDistance
) const override
;
36 virtual nsresult
Interpolate(const nsSMILValue
& aStartVal
,
37 const nsSMILValue
& aEndVal
,
39 nsSMILValue
& aResult
) const override
;
42 // Private constructor: prevent instances beyond my singleton.
43 constexpr SVGViewBoxSMILType() {}
46 } // namespace mozilla
48 #endif // MOZILLA_SVGVIEWBOXSMILTYPE_H_