chromium/ui/gfx/animation/keyframe/keyframed_animation_curve.h

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_GFX_ANIMATION_KEYFRAME_KEYFRAMED_ANIMATION_CURVE_H_
#define UI_GFX_ANIMATION_KEYFRAME_KEYFRAMED_ANIMATION_CURVE_H_

#include <memory>
#include <utility>
#include <vector>

#include "base/time/time.h"
#include "ui/gfx/animation/keyframe/animation_curve.h"
#include "ui/gfx/animation/keyframe/keyframe_animation_export.h"
#include "ui/gfx/animation/keyframe/timing_function.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/geometry/transform_operations.h"

namespace gfx {

class GFX_KEYFRAME_ANIMATION_EXPORT Keyframe {};

class GFX_KEYFRAME_ANIMATION_EXPORT ColorKeyframe : public Keyframe {};

class GFX_KEYFRAME_ANIMATION_EXPORT FloatKeyframe : public Keyframe {};

class GFX_KEYFRAME_ANIMATION_EXPORT TransformKeyframe : public Keyframe {};

class GFX_KEYFRAME_ANIMATION_EXPORT SizeKeyframe : public Keyframe {};

class GFX_KEYFRAME_ANIMATION_EXPORT RectKeyframe : public Keyframe {};

class GFX_KEYFRAME_ANIMATION_EXPORT KeyframedColorAnimationCurve
    : public ColorAnimationCurve {};

class GFX_KEYFRAME_ANIMATION_EXPORT KeyframedFloatAnimationCurve
    : public FloatAnimationCurve {};

class GFX_KEYFRAME_ANIMATION_EXPORT KeyframedTransformAnimationCurve
    : public TransformAnimationCurve {};

class GFX_KEYFRAME_ANIMATION_EXPORT KeyframedSizeAnimationCurve
    : public SizeAnimationCurve {};

class GFX_KEYFRAME_ANIMATION_EXPORT KeyframedRectAnimationCurve
    : public RectAnimationCurve {};

template <typename T>
struct AnimationTraits {};

#define DEFINE_ANIMATION_TRAITS

DEFINE_ANIMATION_TRAITS;
DEFINE_ANIMATION_TRAITS;
DEFINE_ANIMATION_TRAITS;
DEFINE_ANIMATION_TRAITS;
DEFINE_ANIMATION_TRAITS;

#undef DEFINE_ANIMATION_TRAITS

bool SufficientlyEqual(float lhs, float rhs);
bool SufficientlyEqual(const TransformOperations& lhs,
                       const TransformOperations& rhs);
bool SufficientlyEqual(const SizeF& lhs, const SizeF& rhs);
bool SufficientlyEqual(SkColor lhs, SkColor rhs);
bool SufficientlyEqual(const Rect& lhs, const Rect& rhs);

}  // namespace gfx

#endif  // UI_GFX_ANIMATION_KEYFRAME_KEYFRAMED_ANIMATION_CURVE_H_