Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module mus.mojom; | |
| 6 | |
| 7 import "ui/gfx/mojo/transform.mojom"; | |
| 8 | |
| 9 enum AnimationTweenType { | |
| 10 LINEAR, | |
| 11 EASE_IN, | |
| 12 EASE_OUT, | |
| 13 EASE_IN_OUT, | |
| 14 }; | |
| 15 //import "ui/gfx/geometry/mojo/geometry.mojom"; | |
|
sky
2016/06/16 16:36:33
?
mfomitchev
2016/06/22 21:59:35
Done.
| |
| 16 | |
| 17 enum AnimationProperty { | |
| 18 // Used for pausing. | |
| 19 NONE, | |
| 20 OPACITY, | |
| 21 TRANSFORM, | |
| 22 }; | |
| 23 | |
| 24 struct AnimationValue { | |
| 25 float float_value; | |
| 26 gfx.mojom.Transform transform; | |
|
sky
2016/06/16 16:36:33
Shouldn't this be a ? as it isn't applicable to al
mfomitchev
2016/06/22 21:59:35
Done. Note that we still always return true for tr
| |
| 27 }; | |
| 28 | |
| 29 // Identifies how a particular property should be animated between a start and | |
| 30 // target value. | |
| 31 struct AnimationElement { | |
| 32 AnimationProperty property; | |
| 33 | |
| 34 // Duration is in microseconds. | |
| 35 int64 duration; | |
| 36 | |
| 37 AnimationTweenType tween_type; | |
| 38 | |
| 39 // If not specified the start value is taken from either the current value | |
| 40 // (for the first element) or the target_value of the previous element. | |
| 41 AnimationValue? start_value; | |
| 42 | |
| 43 // target_value may be null when property is NONE. | |
| 44 AnimationValue? target_value; | |
| 45 }; | |
| 46 | |
| 47 // An AnimationSequence consists of a number of AnimationElements to animate. | |
| 48 // Each element is animated serially. | |
| 49 struct AnimationSequence { | |
| 50 // Number of times to run the sequence. Value of 0 means run until | |
| 51 // explicitly stopped. | |
| 52 uint32 cycle_count; | |
| 53 | |
| 54 array<AnimationElement> elements; | |
| 55 }; | |
| 56 | |
| 57 // AnimationGroup identifies a window and a set of AnimationSequences to apply | |
| 58 // to the window. Each sequence is run in parallel. | |
| 59 struct AnimationGroup { | |
| 60 uint32 window_id; | |
| 61 array<AnimationSequence> sequences; | |
| 62 }; | |
| OLD | NEW |