OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module ui.mojom; | 5 module ui.mojom; |
6 | 6 |
7 import "ui/gfx/mojo/transform.mojom"; | 7 import "ui/gfx/mojo/transform.mojom"; |
8 | 8 |
9 enum AnimationTweenType { | 9 enum AnimationTweenType { |
10 LINEAR, | 10 LINEAR, |
11 EASE_IN, | 11 EASE_IN, |
12 EASE_OUT, | 12 EASE_OUT, |
13 EASE_IN_OUT, | 13 EASE_IN_OUT, |
14 }; | 14 }; |
15 | 15 |
16 enum AnimationProperty { | 16 enum AnimationProperty { |
17 // Used for pausing. | 17 // Used for pausing. |
18 NONE, | 18 NONE, |
19 OPACITY, | 19 OPACITY, |
20 TRANSFORM, | 20 TRANSFORM, |
21 }; | 21 }; |
22 | 22 |
23 struct AnimationValue { | 23 struct AnimationValue { |
24 float float_value; | 24 float float_value; |
25 gfx.mojom.Transform? transform; | 25 gfx.mojom.Transform transform; |
sky
2016/07/26 21:26:16
This structure is like a union, so we want to supp
yzshen1
2016/07/26 21:32:36
Sure we can do that.
I made this change because th
| |
26 }; | 26 }; |
27 | 27 |
28 // Identifies how a particular property should be animated between a start and | 28 // Identifies how a particular property should be animated between a start and |
29 // target value. | 29 // target value. |
30 struct AnimationElement { | 30 struct AnimationElement { |
31 AnimationProperty property; | 31 AnimationProperty property; |
32 | 32 |
33 // Duration is in microseconds. | 33 // Duration is in microseconds. |
34 int64 duration; | 34 int64 duration; |
35 | 35 |
(...skipping 16 matching lines...) Expand all Loading... | |
52 | 52 |
53 array<AnimationElement> elements; | 53 array<AnimationElement> elements; |
54 }; | 54 }; |
55 | 55 |
56 // AnimationGroup identifies a window and a set of AnimationSequences to apply | 56 // AnimationGroup identifies a window and a set of AnimationSequences to apply |
57 // to the window. Each sequence is run in parallel. | 57 // to the window. Each sequence is run in parallel. |
58 struct AnimationGroup { | 58 struct AnimationGroup { |
59 uint32 window_id; | 59 uint32 window_id; |
60 array<AnimationSequence> sequences; | 60 array<AnimationSequence> sequences; |
61 }; | 61 }; |
OLD | NEW |