OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef UI_VIEWS_COREWM_WINDOW_ANIMATIONS_H_ | 5 #ifndef UI_VIEWS_COREWM_WINDOW_ANIMATIONS_H_ |
6 #define UI_VIEWS_COREWM_WINDOW_ANIMATIONS_H_ | 6 #define UI_VIEWS_COREWM_WINDOW_ANIMATIONS_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ui/views/views_export.h" | 10 #include "ui/views/views_export.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 VIEWS_EXPORT int GetWindowVisibilityAnimationType(aura::Window* window); | 63 VIEWS_EXPORT int GetWindowVisibilityAnimationType(aura::Window* window); |
64 | 64 |
65 VIEWS_EXPORT void SetWindowVisibilityAnimationTransition( | 65 VIEWS_EXPORT void SetWindowVisibilityAnimationTransition( |
66 aura::Window* window, | 66 aura::Window* window, |
67 WindowVisibilityAnimationTransition transition); | 67 WindowVisibilityAnimationTransition transition); |
68 | 68 |
69 VIEWS_EXPORT bool HasWindowVisibilityAnimationTransition( | 69 VIEWS_EXPORT bool HasWindowVisibilityAnimationTransition( |
70 aura::Window* window, | 70 aura::Window* window, |
71 WindowVisibilityAnimationTransition transition); | 71 WindowVisibilityAnimationTransition transition); |
72 | 72 |
73 // Sets the duration of |window|'s show animation. | 73 VIEWS_EXPORT void SetWindowVisibilityAnimationDuration( |
74 VIEWS_EXPORT void SetWindowShowAnimationDuration( | |
75 aura::Window* window, | 74 aura::Window* window, |
76 const base::TimeDelta& duration); | 75 const base::TimeDelta& duration); |
77 | 76 |
78 // Sets the duration of |window|'s hide animation. | |
79 VIEWS_EXPORT void SetWindowHideAnimationDuration( | |
80 aura::Window* window, | |
81 const base::TimeDelta& duration); | |
82 | |
83 // Returns the duration of |window|'s show animation if it is set and | |
84 // |default_duration| otherwise. | |
85 VIEWS_EXPORT base::TimeDelta GetWindowShowAnimationDuration( | |
86 aura::Window* window, | |
87 const base::TimeDelta& default_duration); | |
88 | |
89 // Returns the duration of |window|'s hide animation duration if it is set and | |
90 // |default_duration| otherwise. | |
91 VIEWS_EXPORT base::TimeDelta GetWindowHideAnimationDuration( | |
92 aura::Window* window, | |
93 const base::TimeDelta& default_duration); | |
94 | |
95 VIEWS_EXPORT void SetWindowVisibilityAnimationVerticalPosition( | 77 VIEWS_EXPORT void SetWindowVisibilityAnimationVerticalPosition( |
96 aura::Window* window, | 78 aura::Window* window, |
97 float position); | 79 float position); |
98 | 80 |
99 // Creates an ImplicitAnimationObserver that takes ownership of the layers | 81 // Creates an ImplicitAnimationObserver that takes ownership of the layers |
100 // associated with a Window so that the animation can continue after the Window | 82 // associated with a Window so that the animation can continue after the Window |
101 // has been destroyed. | 83 // has been destroyed. |
102 // The returned object deletes itself when the animations are done. | 84 // The returned object deletes itself when the animations are done. |
103 VIEWS_EXPORT ui::ImplicitAnimationObserver* CreateHidingWindowAnimationObserver( | 85 VIEWS_EXPORT ui::ImplicitAnimationObserver* CreateHidingWindowAnimationObserver( |
104 aura::Window* window); | 86 aura::Window* window); |
105 | 87 |
106 // Returns false if the |window| didn't animate. | 88 // Returns false if the |window| didn't animate. |
107 VIEWS_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, | 89 VIEWS_EXPORT bool AnimateOnChildWindowVisibilityChanged(aura::Window* window, |
108 bool visible); | 90 bool visible); |
109 VIEWS_EXPORT bool AnimateWindow(aura::Window* window, WindowAnimationType type); | 91 VIEWS_EXPORT bool AnimateWindow(aura::Window* window, WindowAnimationType type); |
110 | 92 |
111 // Returns true if window animations are disabled for |window|. Window | 93 // Returns true if window animations are disabled for |window|. Window |
112 // animations are enabled by default. If |window| is NULL, this just checks | 94 // animations are enabled by default. If |window| is NULL, this just checks |
113 // if the global flag disabling window animations is present. | 95 // if the global flag disabling window animations is present. |
114 VIEWS_EXPORT bool WindowAnimationsDisabled(aura::Window* window); | 96 VIEWS_EXPORT bool WindowAnimationsDisabled(aura::Window* window); |
115 | 97 |
116 } // namespace corewm | 98 } // namespace corewm |
117 } // namespace views | 99 } // namespace views |
118 | 100 |
119 #endif // UI_VIEWS_COREWM_WINDOW_ANIMATIONS_H_ | 101 #endif // UI_VIEWS_COREWM_WINDOW_ANIMATIONS_H_ |
OLD | NEW |