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