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_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/base/events.h" | 9 #include "ui/base/events.h" |
10 #include "ui/views/views_export.h" | 10 #include "ui/views/views_export.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Canvas; | 13 class Canvas; |
| 14 class Path; |
14 class Point; | 15 class Point; |
15 class Size; | 16 class Size; |
16 } | 17 } |
17 | 18 |
18 namespace views { | 19 namespace views { |
19 class InputMethod; | 20 class InputMethod; |
20 class GestureEvent; | 21 class GestureEvent; |
21 class KeyEvent; | 22 class KeyEvent; |
22 class MouseEvent; | 23 class MouseEvent; |
23 class TouchEvent; | 24 class TouchEvent; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) = 0; | 107 virtual ui::GestureStatus OnGestureEvent(const GestureEvent& event) = 0; |
107 | 108 |
108 // Runs the specified native command. Returns true if the command is handled. | 109 // Runs the specified native command. Returns true if the command is handled. |
109 virtual bool ExecuteCommand(int command_id) = 0; | 110 virtual bool ExecuteCommand(int command_id) = 0; |
110 | 111 |
111 // Returns the input method of the widget this delegate is associated with. | 112 // Returns the input method of the widget this delegate is associated with. |
112 // Note that this does not use the top level widget, so may return NULL | 113 // Note that this does not use the top level widget, so may return NULL |
113 // if the widget doesn't have input method. | 114 // if the widget doesn't have input method. |
114 virtual InputMethod* GetInputMethodDirect() = 0; | 115 virtual InputMethod* GetInputMethodDirect() = 0; |
115 | 116 |
| 117 // Returns true if window has a hit-test mask. |
| 118 virtual bool HasHitTestMask() const = 0; |
| 119 |
| 120 // Provides the hit-test mask if HasHitTestMask above returns true. |
| 121 virtual void GetHitTestMask(gfx::Path* mask) const = 0; |
| 122 |
116 // | 123 // |
117 virtual Widget* AsWidget() = 0; | 124 virtual Widget* AsWidget() = 0; |
118 virtual const Widget* AsWidget() const = 0; | 125 virtual const Widget* AsWidget() const = 0; |
119 }; | 126 }; |
120 | 127 |
121 } // namespace internal | 128 } // namespace internal |
122 } // namespace views | 129 } // namespace views |
123 | 130 |
124 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ | 131 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_ |
OLD | NEW |