1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/smil/SMILIntegerType.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef MOZILLA_SMILINTEGERTYPE_H_ 1.10 +#define MOZILLA_SMILINTEGERTYPE_H_ 1.11 + 1.12 +#include "mozilla/Attributes.h" 1.13 +#include "nsISMILType.h" 1.14 + 1.15 +namespace mozilla { 1.16 + 1.17 +class SMILIntegerType : public nsISMILType 1.18 +{ 1.19 +public: 1.20 + virtual void Init(nsSMILValue& aValue) const MOZ_OVERRIDE; 1.21 + virtual void Destroy(nsSMILValue&) const; 1.22 + virtual nsresult Assign(nsSMILValue& aDest, const nsSMILValue& aSrc) const MOZ_OVERRIDE; 1.23 + virtual bool IsEqual(const nsSMILValue& aLeft, 1.24 + const nsSMILValue& aRight) const MOZ_OVERRIDE; 1.25 + virtual nsresult Add(nsSMILValue& aDest, const nsSMILValue& aValueToAdd, 1.26 + uint32_t aCount) const MOZ_OVERRIDE; 1.27 + virtual nsresult ComputeDistance(const nsSMILValue& aFrom, 1.28 + const nsSMILValue& aTo, 1.29 + double& aDistance) const MOZ_OVERRIDE; 1.30 + virtual nsresult Interpolate(const nsSMILValue& aStartVal, 1.31 + const nsSMILValue& aEndVal, 1.32 + double aUnitDistance, 1.33 + nsSMILValue& aResult) const MOZ_OVERRIDE; 1.34 + 1.35 + static SMILIntegerType* 1.36 + Singleton() 1.37 + { 1.38 + static SMILIntegerType sSingleton; 1.39 + return &sSingleton; 1.40 + } 1.41 + 1.42 +private: 1.43 + MOZ_CONSTEXPR SMILIntegerType() {} 1.44 +}; 1.45 + 1.46 +} // namespace mozilla 1.47 + 1.48 +#endif // MOZILLA_SMILINTEGERTYPE_H_