aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/skottie/src/SkottieAnimator.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/skottie/src/SkottieAnimator.h')
-rw-r--r--modules/skottie/src/SkottieAnimator.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/skottie/src/SkottieAnimator.h b/modules/skottie/src/SkottieAnimator.h
new file mode 100644
index 0000000000..6dc8f6c759
--- /dev/null
+++ b/modules/skottie/src/SkottieAnimator.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2017 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkottieAnimator_DEFINED
+#define SkottieAnimator_DEFINED
+
+#include "SkSGScene.h"
+
+#include <functional>
+
+namespace skottie {
+
+namespace json { class ValueRef; }
+
+// This is the workhorse for property binding: depending on whether the property is animated,
+// it will either apply immediately or instantiate and attach a keyframe animator.
+template <typename T>
+bool BindProperty(const json::ValueRef&,
+ sksg::AnimatorList*,
+ std::function<void(const T&)>&&,
+ const T* noop = nullptr);
+
+} // namespace skottie
+
+#endif // SkottieAnimator_DEFINED