1 /* 2 * Copyright 2017 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkottieAnimator_DEFINED 9 #define SkottieAnimator_DEFINED 10 11 #include "SkSGScene.h" 12 13 #include <functional> 14 15 namespace Json { class Value; } 16 17 namespace skottie { 18 19 // This is the workhorse for property binding: depending on whether the property is animated, 20 // it will either apply immediately or instantiate and attach a keyframe animator. 21 template <typename T> 22 bool BindProperty(const Json::Value&, 23 sksg::AnimatorList*, 24 std::function<void(const T&)>&&, 25 const T* noop = nullptr); 26 27 } // namespace skottie 28 29 #endif // SkottieAnimator_DEFINED 30