Bug 1795723 - Unified extensions UI should support High Contrast Mode. r=ayeddi,deskt...
[gecko.git] / dom / smil / SMILIntegerType.h
blob5e50ae8be1da60b163489efb990b341eeb48fc6c
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 DOM_SMIL_SMILINTEGERTYPE_H_
8 #define DOM_SMIL_SMILINTEGERTYPE_H_
10 #include "mozilla/Attributes.h"
11 #include "mozilla/SMILType.h"
13 namespace mozilla {
15 class SMILIntegerType : public SMILType {
16 public:
17 virtual void Init(SMILValue& aValue) const override;
18 virtual void Destroy(SMILValue& aValue) const override;
19 virtual nsresult Assign(SMILValue& aDest,
20 const SMILValue& aSrc) const override;
21 virtual bool IsEqual(const SMILValue& aLeft,
22 const SMILValue& aRight) const override;
23 virtual nsresult Add(SMILValue& aDest, const SMILValue& aValueToAdd,
24 uint32_t aCount) const override;
25 virtual nsresult ComputeDistance(const SMILValue& aFrom, const SMILValue& aTo,
26 double& aDistance) const override;
27 virtual nsresult Interpolate(const SMILValue& aStartVal,
28 const SMILValue& aEndVal, double aUnitDistance,
29 SMILValue& aResult) const override;
31 static SMILIntegerType* Singleton() {
32 static SMILIntegerType sSingleton;
33 return &sSingleton;
36 private:
37 constexpr SMILIntegerType() = default;
40 } // namespace mozilla
42 #endif // DOM_SMIL_SMILINTEGERTYPE_H_