| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 | 275 |
| 276 // Returns true if the mouse pointer at relative-to-this-Window's-origin | 276 // Returns true if the mouse pointer at relative-to-this-Window's-origin |
| 277 // |local_point| can trigger an event for this Window. | 277 // |local_point| can trigger an event for this Window. |
| 278 // TODO(beng): A Window can supply a hit-test mask to cause some portions of | 278 // TODO(beng): A Window can supply a hit-test mask to cause some portions of |
| 279 // itself to not trigger events, causing the events to fall through to the | 279 // itself to not trigger events, causing the events to fall through to the |
| 280 // Window behind. | 280 // Window behind. |
| 281 bool HitTest(const gfx::Point& local_point); | 281 bool HitTest(const gfx::Point& local_point); |
| 282 | 282 |
| 283 // Returns the Window that most closely encloses |local_point| for the | 283 // Returns the Window that most closely encloses |local_point| for the |
| 284 // purposes of event targeting. | 284 // purposes of event targeting. |
| 285 Window* GetEventHandlerForPoint(const gfx::Point& local_point); | 285 Window* GetEventHandlerForPoint(const gfx::Point& local_point, |
| 286 ui::EventType event_type); |
| 286 | 287 |
| 287 // Returns the topmost Window with a delegate containing |local_point|. | 288 // Returns the topmost Window with a delegate containing |local_point|. |
| 288 Window* GetTopWindowContainingPoint(const gfx::Point& local_point); | 289 Window* GetTopWindowContainingPoint(const gfx::Point& local_point); |
| 289 | 290 |
| 290 // Returns this window's toplevel window (the highest-up-the-tree anscestor | 291 // Returns this window's toplevel window (the highest-up-the-tree anscestor |
| 291 // that has a delegate set). The toplevel window may be |this|. | 292 // that has a delegate set). The toplevel window may be |this|. |
| 292 Window* GetToplevelWindow(); | 293 Window* GetToplevelWindow(); |
| 293 | 294 |
| 294 // Claims or relinquishes the claim to focus. | 295 // Claims or relinquishes the claim to focus. |
| 295 void Focus(); | 296 void Focus(); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // Updates the visible state of the layer, but does not make visible-state | 375 // Updates the visible state of the layer, but does not make visible-state |
| 375 // specific changes. Called from Show()/Hide(). | 376 // specific changes. Called from Show()/Hide(). |
| 376 void SetVisible(bool visible); | 377 void SetVisible(bool visible); |
| 377 | 378 |
| 378 // Schedules a paint for the Window's entire bounds. | 379 // Schedules a paint for the Window's entire bounds. |
| 379 void SchedulePaint(); | 380 void SchedulePaint(); |
| 380 | 381 |
| 381 // Gets a Window (either this one or a subwindow) containing |local_point|. | 382 // Gets a Window (either this one or a subwindow) containing |local_point|. |
| 382 // If |return_tightest| is true, returns the tightest-containing (i.e. | 383 // If |return_tightest| is true, returns the tightest-containing (i.e. |
| 383 // furthest down the hierarchy) Window containing the point; otherwise, | 384 // furthest down the hierarchy) Window containing the point; otherwise, |
| 384 // returns the loosest. If |for_event_handling| is true, then hit-test masks | 385 // returns the loosest. If |event_type| is provided (!ET_UNKNOWN), then |
| 385 // are honored; otherwise, only bounds checks are performed. | 386 // hit-test masks are honored; otherwise, only bounds checks are performed. |
| 386 Window* GetWindowForPoint(const gfx::Point& local_point, | 387 Window* GetWindowForPoint(const gfx::Point& local_point, |
| 387 bool return_tightest, | 388 bool return_tightest, |
| 388 bool for_event_handling); | 389 ui::EventType event_type); |
| 389 | 390 |
| 390 // Implementation of RemoveChild(). If |child| is being removed as the result | 391 // Implementation of RemoveChild(). If |child| is being removed as the result |
| 391 // of an add, |new_parent| is the new parent |child| is going to be parented | 392 // of an add, |new_parent| is the new parent |child| is going to be parented |
| 392 // to. | 393 // to. |
| 393 void RemoveChildImpl(Window* child, Window* new_parent); | 394 void RemoveChildImpl(Window* child, Window* new_parent); |
| 394 | 395 |
| 395 // Called when this window's parent has changed. | 396 // Called when this window's parent has changed. |
| 396 void OnParentChanged(); | 397 void OnParentChanged(); |
| 397 | 398 |
| 398 // Determines the real location for stacking |child| and invokes | 399 // Determines the real location for stacking |child| and invokes |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 }; | 494 }; |
| 494 | 495 |
| 495 std::map<const void*, Value> prop_map_; | 496 std::map<const void*, Value> prop_map_; |
| 496 | 497 |
| 497 DISALLOW_COPY_AND_ASSIGN(Window); | 498 DISALLOW_COPY_AND_ASSIGN(Window); |
| 498 }; | 499 }; |
| 499 | 500 |
| 500 } // namespace aura | 501 } // namespace aura |
| 501 | 502 |
| 502 #endif // UI_AURA_WINDOW_H_ | 503 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |