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
63
64
|
// 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_WINDOW_ANIMATIONS_H_
#define ASH_WM_WINDOW_ANIMATIONS_H_
#pragma once
#include "ash/ash_export.h"
#include "base/time.h"
namespace aura {
class Window;
}
namespace ash {
// A variety of canned animations for window transitions.
enum WindowVisibilityAnimationType {
WINDOW_VISIBILITY_ANIMATION_TYPE_DEFAULT = 0, // Default. Lets the system
// decide based on window
// type.
WINDOW_VISIBILITY_ANIMATION_TYPE_DROP, // Window shrinks in.
WINDOW_VISIBILITY_ANIMATION_TYPE_VERTICAL, // Vertical Glenimation.
WINDOW_VISIBILITY_ANIMATION_TYPE_FADE, // Fades in/out.
WINDOW_VISIBILITY_ANIMATION_TYPE_WORKSPACE_SHOW, // Windows are scaled and
// fade in.
WINDOW_VISIBILITY_ANIMATION_TYPE_WORKSPACE_HIDE, // Inverse of SHOW.
WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE, // Window scale/rotates down
// to its launcher icon.
};
// Type of visibility change transition that a window should animate.
// Default behavior is to animate both show and hide.
enum WindowVisibilityAnimationTransition {
// 0 is used as default.
ANIMATE_SHOW = 0x1,
ANIMATE_HIDE = 0x2,
ANIMATE_BOTH = ANIMATE_SHOW | ANIMATE_HIDE,
ANIMATE_NONE = 0x4,
};
void ASH_EXPORT SetWindowVisibilityAnimationType(
aura::Window* window,
WindowVisibilityAnimationType type);
void ASH_EXPORT SetWindowVisibilityAnimationTransition(
aura::Window* window,
WindowVisibilityAnimationTransition transition);
void ASH_EXPORT SetWindowVisibilityAnimationDuration(
aura::Window* window,
const base::TimeDelta& duration);
namespace internal {
// Returns false if the |window| didn't animate.
bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, bool visible);
} // namespace internal
} // namespace ash
#endif // ASH_WM_WINDOW_ANIMATIONS_H_
|