Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1277)

Unified Diff: mojo/services/public/interfaces/view_manager/view_manager_constants.mojom

Issue 772893004: Adds constants and runner for animations (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: tweaks Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | services/view_manager/BUILD.gn » ('j') | services/view_manager/server_view.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/interfaces/view_manager/view_manager_constants.mojom
diff --git a/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom b/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom
index 14bd36348f1a63040d6dd915c6d686d5166eac25..c00bda5641022f1d745b8c7b79937797cc0dfb1b 100644
--- a/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom
+++ b/mojo/services/public/interfaces/view_manager/view_manager_constants.mojom
@@ -4,7 +4,63 @@
module mojo;
+import "mojo/services/public/interfaces/geometry/geometry.mojom";
+
enum OrderDirection {
ABOVE = 1,
BELOW,
};
+
+enum AnimationTweenType {
+ LINEAR,
+ EASE_IN,
+ EASE_OUT,
+ EASE_IN_OUT,
+};
+
+enum AnimationProperty {
+ // Used for pausing.
+ NONE,
+ OPACITY,
+ TRANSFORM,
+};
+
+struct AnimationValue {
Elliot Glaysher 2014/12/03 23:49:59 You may want to have these in a different file; if
sky 2014/12/04 00:21:23 Done.
+ float float_value;
+ Transform transform;
+};
+
+// Identifies how a particular property should be animated between a start and
+// target value.
+struct AnimationElement {
+ AnimationProperty property;
+
+ // Duration is in microseconds.
+ int64 duration;
+
+ AnimationTweenType tween_type;
+
+ // If not specified the start value is taken from either the current value
+ // (for the first element) or the target_value of the previous element.
+ AnimationValue? start_value;
+
+ // target_value may be null when property is NONE.
+ AnimationValue? target_value;
+};
+
+// An AnimationSequence consists of a number of AnimationElements to animate.
+// Each element is animated serially.
+struct AnimationSequence {
+ // Number of times to run the sequence. Value of 0 means run until
+ // explicitly stopped.
+ uint32 cycle_count;
+
+ array<AnimationElement> elements;
+};
+
+// AnimationGroup identifies a view and a set of AnimationSequences to apply
+// to the view. Each sequence is run in parallel.
+struct AnimationGroup {
+ uint32 view_id;
+ array<AnimationSequence> sequences;
+};
« no previous file with comments | « no previous file | services/view_manager/BUILD.gn » ('j') | services/view_manager/server_view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698