| 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 "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/aura/aura_export.h" | 10 #include "ui/aura/aura_export.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // For all PreHandle*() functions that return a bool, return true if the | 45 // For all PreHandle*() functions that return a bool, return true if the |
| 46 // filter consumes the event and further processing (by the target, for | 46 // filter consumes the event and further processing (by the target, for |
| 47 // example) is not performed. Return false if the filter does not consume the | 47 // example) is not performed. Return false if the filter does not consume the |
| 48 // event and further processing is performed. Note that in this case the | 48 // event and further processing is performed. Note that in this case the |
| 49 // filter may still perform some action, the return value simply indicates | 49 // filter may still perform some action, the return value simply indicates |
| 50 // that further processing can occur. | 50 // that further processing can occur. |
| 51 | 51 |
| 52 virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event); | 52 virtual bool PreHandleKeyEvent(Window* target, ui::KeyEvent* event); |
| 53 virtual bool PreHandleMouseEvent(Window* target, ui::MouseEvent* event); | 53 virtual bool PreHandleMouseEvent(Window* target, ui::MouseEvent* event); |
| 54 | 54 |
| 55 // Returns a value other than ui::TOUCH_STATUS_UNKNOWN if the event is | 55 // Returns a value other than ui::ER_UNHANDLED if the event is |
| 56 // consumed. | 56 // consumed. |
| 57 virtual ui::TouchStatus PreHandleTouchEvent(Window* target, | 57 virtual ui::EventResult PreHandleTouchEvent(Window* target, |
| 58 ui::TouchEvent* event); | 58 ui::TouchEvent* event); |
| 59 | 59 |
| 60 // Returns a value other than ui::ER_UNHANDLED if the gesture is | 60 // Returns a value other than ui::ER_UNHANDLED if the gesture is |
| 61 // consumed. | 61 // consumed. |
| 62 virtual ui::EventResult PreHandleGestureEvent(Window* target, | 62 virtual ui::EventResult PreHandleGestureEvent(Window* target, |
| 63 ui::GestureEvent* event); | 63 ui::GestureEvent* event); |
| 64 | 64 |
| 65 // Overridden from ui::EventHandler. | 65 // Overridden from ui::EventHandler. |
| 66 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | 66 virtual ui::EventResult OnKeyEvent(ui::KeyEvent* event) OVERRIDE; |
| 67 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 67 virtual ui::EventResult OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
| 68 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 68 virtual ui::EventResult OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
| 69 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 69 virtual ui::EventResult OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
| 70 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* e) OVERRIDE; | 70 virtual ui::EventResult OnGestureEvent(ui::GestureEvent* e) OVERRIDE; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace aura | 73 } // namespace aura |
| 74 | 74 |
| 75 #endif // UI_AURA_EVENT_FILTER_H_ | 75 #endif // UI_AURA_EVENT_FILTER_H_ |
| OLD | NEW |