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_WM_CORE_SHADOW_TYPES_H_ | 5 #ifndef UI_WM_CORE_SHADOW_TYPES_H_ |
6 #define UI_WM_CORE_SHADOW_TYPES_H_ | 6 #define UI_WM_CORE_SHADOW_TYPES_H_ |
7 | 7 |
8 #include "ui/aura/window.h" | 8 #include "ui/aura/window.h" |
9 #include "ui/wm/wm_export.h" | 9 #include "ui/wm/wm_export.h" |
10 | 10 |
11 namespace aura { | |
12 class Window; | |
13 } | |
14 | |
15 namespace wm { | 11 namespace wm { |
16 | 12 |
17 // Different types of drop shadows that can be drawn under a window by the | 13 // Different types of drop shadows that can be drawn under a window by the |
18 // shell. Used as a value for the kShadowTypeKey property. The integer value of | 14 // shell. Used as a value for the kShadowTypeKey property. The integer value of |
19 // each entry is directly used for determining the size of the shadow. | 15 // each entry is directly used for determining the size of the shadow. |
20 enum class ShadowElevation { | 16 enum class ShadowElevation { |
21 // Indicates an elevation should be chosen based on the window. This is the | 17 // Indicates an elevation should be chosen based on the window. This is the |
22 // default. | 18 // default. |
23 DEFAULT = -1, | 19 DEFAULT = -1, |
24 NONE = 0, | 20 NONE = 0, |
25 SMALL = 6, | 21 SMALL = 6, |
26 MEDIUM = 8, | 22 MEDIUM = 8, |
27 LARGE = 24, | 23 LARGE = 24, |
28 }; | 24 }; |
29 | 25 |
30 WM_EXPORT void SetShadowElevation(aura::Window* window, | 26 WM_EXPORT void SetShadowElevation(aura::Window* window, |
31 ShadowElevation elevation); | 27 ShadowElevation elevation); |
32 | 28 |
33 // Returns true if |value| is a valid element of ShadowElevation elements. | 29 // Returns true if |value| is a valid element of ShadowElevation elements. |
34 WM_EXPORT bool IsValidShadowElevation(int64_t value); | 30 WM_EXPORT bool IsValidShadowElevation(int64_t value); |
35 | 31 |
36 // A property key describing the drop shadow that should be displayed under the | 32 // A property key describing the drop shadow that should be displayed under the |
37 // window. A null value is interpreted as using the default. | 33 // window. A null value is interpreted as using the default. |
38 WM_EXPORT extern const aura::WindowProperty<ShadowElevation>* const | 34 WM_EXPORT extern const aura::WindowProperty<ShadowElevation>* const |
39 kShadowElevationKey; | 35 kShadowElevationKey; |
40 | 36 |
41 } // namespace wm | 37 } // namespace wm |
42 | 38 |
43 #endif // UI_WM_CORE_SHADOW_TYPES_H_ | 39 #endif // UI_WM_CORE_SHADOW_TYPES_H_ |
OLD | NEW |