OLD | NEW |
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium OS 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 __PLATFORM_WINDOW_MANAGER_SHADOW_H__ | 5 #ifndef WINDOW_MANAGER_SHADOW_H_ |
6 #define __PLATFORM_WINDOW_MANAGER_SHADOW_H__ | 6 #define WINDOW_MANAGER_SHADOW_H_ |
7 | 7 |
8 #include <gtest/gtest_prod.h> // for FRIEND_TEST() macro | 8 #include <gtest/gtest_prod.h> // for FRIEND_TEST() macro |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
12 #include "window_manager/clutter_interface.h" | 12 #include "window_manager/clutter_interface.h" |
13 #include "window_manager/util.h" | 13 #include "window_manager/util.h" |
14 | 14 |
15 namespace chromeos { | 15 namespace window_manager { |
16 | 16 |
17 // This class displays a drop shadow that can be positioned under a window. | 17 // This class displays a drop shadow that can be positioned under a window. |
18 // | 18 // |
19 // This is a bit trickier than just scaling a single textured Clutter | 19 // This is a bit trickier than just scaling a single textured Clutter |
20 // actor. We want shadows to have the same weight regardless of their | 20 // actor. We want shadows to have the same weight regardless of their |
21 // dimensions, so we arrange eight actors (corners and top/bottom/sides) | 21 // dimensions, so we arrange eight actors (corners and top/bottom/sides) |
22 // around the window, scaling the top/bottom/sides as needed. A group | 22 // around the window, scaling the top/bottom/sides as needed. A group |
23 // containing all of the shadow's actors is exposed for adding to | 23 // containing all of the shadow's actors is exposed for adding to |
24 // containers or restacking. | 24 // containers or restacking. |
25 class Shadow { | 25 class Shadow { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 scoped_ptr<ClutterInterface::Actor> left_actor_; | 95 scoped_ptr<ClutterInterface::Actor> left_actor_; |
96 scoped_ptr<ClutterInterface::Actor> right_actor_; | 96 scoped_ptr<ClutterInterface::Actor> right_actor_; |
97 scoped_ptr<ClutterInterface::Actor> tl_actor_; | 97 scoped_ptr<ClutterInterface::Actor> tl_actor_; |
98 scoped_ptr<ClutterInterface::Actor> tr_actor_; | 98 scoped_ptr<ClutterInterface::Actor> tr_actor_; |
99 scoped_ptr<ClutterInterface::Actor> bl_actor_; | 99 scoped_ptr<ClutterInterface::Actor> bl_actor_; |
100 scoped_ptr<ClutterInterface::Actor> br_actor_; | 100 scoped_ptr<ClutterInterface::Actor> br_actor_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(Shadow); | 102 DISALLOW_COPY_AND_ASSIGN(Shadow); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace chromeos | 105 } // namespace window_manager |
106 | 106 |
107 #endif | 107 #endif |
OLD | NEW |