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_EVENT_FILTER_H_ | 5 #ifndef UI_AURA_EVENT_FILTER_H_ |
6 #define UI_AURA_EVENT_FILTER_H_ | 6 #define UI_AURA_EVENT_FILTER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ui/aura/aura_export.h" | 9 #include "ui/aura/aura_export.h" |
10 #include "ui/base/events.h" | 10 #include "ui/base/events.h" |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 class GestureEventImpl; | 13 class GestureEventImpl; |
14 class KeyEvent; | 14 class KeyEvent; |
15 class MouseEvent; | 15 class MouseEvent; |
16 class TouchEventImpl; | 16 class TouchEvent; |
17 } | 17 } |
18 | 18 |
19 namespace aura { | 19 namespace aura { |
20 | 20 |
21 class Window; | 21 class Window; |
22 | 22 |
23 // An object that filters events sent to an owner window. The filter can stop | 23 // An object that filters events sent to an owner window. The filter can stop |
24 // further processing of events. | 24 // further processing of events. |
25 // | 25 // |
26 // When the Desktop receives an event, it determines the "target window" for | 26 // When the Desktop receives an event, it determines the "target window" for |
(...skipping 19 matching lines...) Expand all Loading... |
46 // event and further processing is performed. Note that in this case the | 46 // event and further processing is performed. Note that in this case the |
47 // filter may still perform some action, the return value simply indicates | 47 // filter may still perform some action, the return value simply indicates |
48 // that further processing can occur. | 48 // that further processing can occur. |
49 | 49 |
50 virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event) = 0; | 50 virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event) = 0; |
51 virtual bool PreHandleMouseEvent(Window* target, ui::MouseEvent* event) = 0; | 51 virtual bool PreHandleMouseEvent(Window* target, ui::MouseEvent* event) = 0; |
52 | 52 |
53 // Returns a value other than ui::TOUCH_STATUS_UNKNOWN if the event is | 53 // Returns a value other than ui::TOUCH_STATUS_UNKNOWN if the event is |
54 // consumed. | 54 // consumed. |
55 virtual ui::TouchStatus PreHandleTouchEvent(Window* target, | 55 virtual ui::TouchStatus PreHandleTouchEvent(Window* target, |
56 ui::TouchEventImpl* event) = 0; | 56 ui::TouchEvent* event) = 0; |
57 | 57 |
58 // Returns a value other than ui::GESTURE_STATUS_UNKNOWN if the gesture is | 58 // Returns a value other than ui::GESTURE_STATUS_UNKNOWN if the gesture is |
59 // consumed. | 59 // consumed. |
60 virtual ui::GestureStatus PreHandleGestureEvent( | 60 virtual ui::GestureStatus PreHandleGestureEvent( |
61 Window* target, | 61 Window* target, |
62 ui::GestureEventImpl* event) = 0; | 62 ui::GestureEventImpl* event) = 0; |
63 }; | 63 }; |
64 | 64 |
65 } // namespace aura | 65 } // namespace aura |
66 | 66 |
67 #endif // UI_AURA_EVENT_FILTER_H_ | 67 #endif // UI_AURA_EVENT_FILTER_H_ |
OLD | NEW |