| 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_AURA_WINDOW_H_ | 5 #ifndef UI_AURA_WINDOW_H_ |
| 6 #define UI_AURA_WINDOW_H_ | 6 #define UI_AURA_WINDOW_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 // Returns true if the |point_in_root| in root window's coordinate falls | 250 // Returns true if the |point_in_root| in root window's coordinate falls |
| 251 // within this window's bounds. Returns false if the window is detached | 251 // within this window's bounds. Returns false if the window is detached |
| 252 // from root window. | 252 // from root window. |
| 253 bool ContainsPointInRoot(const gfx::Point& point_in_root) const; | 253 bool ContainsPointInRoot(const gfx::Point& point_in_root) const; |
| 254 | 254 |
| 255 // Returns true if relative-to-this-Window's-origin |local_point| falls | 255 // Returns true if relative-to-this-Window's-origin |local_point| falls |
| 256 // within this Window's bounds. | 256 // within this Window's bounds. |
| 257 bool ContainsPoint(const gfx::Point& local_point) const; | 257 bool ContainsPoint(const gfx::Point& local_point) const; |
| 258 | 258 |
| 259 // Returns true if the mouse pointer at relative-to-this-Window's-origin | |
| 260 // |local_point| can trigger an event for this Window. | |
| 261 // TODO(beng): A Window can supply a hit-test mask to cause some portions of | |
| 262 // itself to not trigger events, causing the events to fall through to the | |
| 263 // Window behind. | |
| 264 bool HitTest(const gfx::Point& local_point); | |
| 265 | |
| 266 // Returns the Window that most closely encloses |local_point| for the | 259 // Returns the Window that most closely encloses |local_point| for the |
| 267 // purposes of event targeting. | 260 // purposes of event targeting. |
| 268 Window* GetEventHandlerForPoint(const gfx::Point& local_point); | 261 Window* GetEventHandlerForPoint(const gfx::Point& local_point); |
| 269 | 262 |
| 270 // Returns the topmost Window with a delegate containing |local_point|. | 263 // Returns the topmost Window with a delegate containing |local_point|. |
| 271 Window* GetTopWindowContainingPoint(const gfx::Point& local_point); | 264 Window* GetTopWindowContainingPoint(const gfx::Point& local_point); |
| 272 | 265 |
| 273 // Returns this window's toplevel window (the highest-up-the-tree anscestor | 266 // Returns this window's toplevel window (the highest-up-the-tree anscestor |
| 274 // that has a delegate set). The toplevel window may be |this|. | 267 // that has a delegate set). The toplevel window may be |this|. |
| 275 Window* GetToplevelWindow(); | 268 Window* GetToplevelWindow(); |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 friend class WindowTargeter; | 341 friend class WindowTargeter; |
| 349 | 342 |
| 350 // Called by the public {Set,Get,Clear}Property functions. | 343 // Called by the public {Set,Get,Clear}Property functions. |
| 351 int64 SetPropertyInternal(const void* key, | 344 int64 SetPropertyInternal(const void* key, |
| 352 const char* name, | 345 const char* name, |
| 353 PropertyDeallocator deallocator, | 346 PropertyDeallocator deallocator, |
| 354 int64 value, | 347 int64 value, |
| 355 int64 default_value); | 348 int64 default_value); |
| 356 int64 GetPropertyInternal(const void* key, int64 default_value) const; | 349 int64 GetPropertyInternal(const void* key, int64 default_value) const; |
| 357 | 350 |
| 351 // Returns true if the mouse pointer at relative-to-this-Window's-origin |
| 352 // |local_point| can trigger an event for this Window. |
| 353 // TODO(beng): A Window can supply a hit-test mask to cause some portions of |
| 354 // itself to not trigger events, causing the events to fall through to the |
| 355 // Window behind. |
| 356 bool HitTest(const gfx::Point& local_point); |
| 357 |
| 358 // Changes the bounds of the window without condition. | 358 // Changes the bounds of the window without condition. |
| 359 void SetBoundsInternal(const gfx::Rect& new_bounds); | 359 void SetBoundsInternal(const gfx::Rect& new_bounds); |
| 360 | 360 |
| 361 // Updates the visible state of the layer, but does not make visible-state | 361 // Updates the visible state of the layer, but does not make visible-state |
| 362 // specific changes. Called from Show()/Hide(). | 362 // specific changes. Called from Show()/Hide(). |
| 363 void SetVisible(bool visible); | 363 void SetVisible(bool visible); |
| 364 | 364 |
| 365 // Schedules a paint for the Window's entire bounds. | 365 // Schedules a paint for the Window's entire bounds. |
| 366 void SchedulePaint(); | 366 void SchedulePaint(); |
| 367 | 367 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 }; | 545 }; |
| 546 | 546 |
| 547 std::map<const void*, Value> prop_map_; | 547 std::map<const void*, Value> prop_map_; |
| 548 | 548 |
| 549 DISALLOW_COPY_AND_ASSIGN(Window); | 549 DISALLOW_COPY_AND_ASSIGN(Window); |
| 550 }; | 550 }; |
| 551 | 551 |
| 552 } // namespace aura | 552 } // namespace aura |
| 553 | 553 |
| 554 #endif // UI_AURA_WINDOW_H_ | 554 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |