OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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 #ifndef ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_ | |
6 #define ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_ | |
7 | |
8 #include "ash/ash_export.h" | |
9 #include "base/time/time.h" | |
10 | |
11 namespace aura { | |
12 class Window; | |
13 } | |
14 | |
15 // Collection of functions and types needed for animating workspaces. | |
16 | |
17 namespace ash { | |
18 namespace internal { | |
19 | |
20 // Indicates the direction the workspace should appear to go. | |
21 enum WorkspaceAnimationDirection { | |
22 WORKSPACE_ANIMATE_UP, | |
23 WORKSPACE_ANIMATE_DOWN, | |
24 }; | |
25 | |
26 // The details of this dictate how the show/hide should be animated. | |
27 struct WorkspaceAnimationDetails { | |
28 WorkspaceAnimationDetails(); | |
29 ~WorkspaceAnimationDetails(); | |
30 | |
31 // Direction to animate. | |
32 WorkspaceAnimationDirection direction; | |
33 | |
34 // Whether to animate. If false the show/hide is immediate, otherwise it | |
35 // animates. | |
36 bool animate; | |
37 | |
38 // Whether the opacity should be animated. | |
39 bool animate_opacity; | |
40 | |
41 // Whether the scale should be animated. | |
42 bool animate_scale; | |
43 | |
44 // The duration of the animation. If empty the default is used. | |
45 base::TimeDelta duration; | |
46 | |
47 // Amount of time (in milliseconds) to pause before animating. | |
48 int pause_time_ms; | |
49 }; | |
50 | |
51 // Amount of time for the workspace switch animation. | |
52 extern const int kWorkspaceSwitchTimeMS; | |
53 | |
54 // Shows or hides the workspace animating based on |details|. | |
55 ASH_EXPORT void ShowWorkspace(aura::Window* window, | |
56 const WorkspaceAnimationDetails& details); | |
57 ASH_EXPORT void HideWorkspace(aura::Window* window, | |
58 const WorkspaceAnimationDetails& details); | |
59 } // namespace internal | |
60 } // namespace ash | |
61 | |
62 #endif // ASH_WM_WORKSPACE_WORKSPACE_ANIMATIONS_H_ | |
OLD | NEW |