OLD | NEW |
| (Empty) |
1 // Copyright 2014 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 [DartPackage="mojo_services"] | |
6 module mojo; | |
7 | |
8 import "geometry/interfaces/geometry.mojom"; | |
9 | |
10 enum AnimationTweenType { | |
11 LINEAR, | |
12 EASE_IN, | |
13 EASE_OUT, | |
14 EASE_IN_OUT, | |
15 }; | |
16 | |
17 enum AnimationProperty { | |
18 // Used for pausing. | |
19 NONE, | |
20 OPACITY, | |
21 TRANSFORM, | |
22 }; | |
23 | |
24 struct AnimationValue { | |
25 float float_value; | |
26 Transform transform; | |
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 view and a set of AnimationSequences to apply | |
58 // to the view. Each sequence is run in parallel. | |
59 struct AnimationGroup { | |
60 uint32 view_id; | |
61 array<AnimationSequence> sequences; | |
62 }; | |
OLD | NEW |