| 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_BASE_EVENTS_EVENT_CONSTANTS_H_ | 5 #ifndef UI_BASE_EVENTS_EVENT_CONSTANTS_H_ |
| 6 #define UI_BASE_EVENTS_EVENT_CONSTANTS_H_ | 6 #define UI_BASE_EVENTS_EVENT_CONSTANTS_H_ |
| 7 | 7 |
| 8 #include "base/event_types.h" | 8 #include "base/event_types.h" |
| 9 #include "ui/base/keycodes/keyboard_codes.h" | 9 #include "ui/base/keycodes/keyboard_codes.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 // Result of dispatching an event. | 98 // Result of dispatching an event. |
| 99 enum EventResult { | 99 enum EventResult { |
| 100 ER_UNHANDLED = 0, // The event hasn't been handled. The event can be | 100 ER_UNHANDLED = 0, // The event hasn't been handled. The event can be |
| 101 // propagated to other handlers. | 101 // propagated to other handlers. |
| 102 ER_HANDLED, // The event has already been handled, but it can still be | 102 ER_HANDLED, // The event has already been handled, but it can still be |
| 103 // propagated to other handlers. | 103 // propagated to other handlers. |
| 104 ER_CONSUMED, // The event has been handled, and it should not be | 104 ER_CONSUMED, // The event has been handled, and it should not be |
| 105 // propagated to other handlers. | 105 // propagated to other handlers. |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 // Phase of the event dispatch. |
| 109 enum EventPhase { |
| 110 EP_PREDISPATCH, |
| 111 EP_PRETARGET, |
| 112 EP_TARGET, |
| 113 EP_POSTTARGET, |
| 114 EP_POSTDISPATCH |
| 115 }; |
| 116 |
| 108 enum TouchStatus { | 117 enum TouchStatus { |
| 109 TOUCH_STATUS_UNKNOWN = 0, // Unknown touch status. This is used to indicate | 118 TOUCH_STATUS_UNKNOWN = 0, // Unknown touch status. This is used to indicate |
| 110 // that the touch event was not handled. | 119 // that the touch event was not handled. |
| 111 TOUCH_STATUS_START, // The touch event initiated a touch sequence. | 120 TOUCH_STATUS_START, // The touch event initiated a touch sequence. |
| 112 TOUCH_STATUS_CONTINUE, // The touch event is part of a previously | 121 TOUCH_STATUS_CONTINUE, // The touch event is part of a previously |
| 113 // started touch sequence. | 122 // started touch sequence. |
| 114 TOUCH_STATUS_END, // The touch event ended the touch sequence. | 123 TOUCH_STATUS_END, // The touch event ended the touch sequence. |
| 115 TOUCH_STATUS_SYNTH_MOUSE, // The touch event was not processed, but a | 124 TOUCH_STATUS_SYNTH_MOUSE, // The touch event was not processed, but a |
| 116 // synthetic mouse event generated from the | 125 // synthetic mouse event generated from the |
| 117 // unused touch event was handled. | 126 // unused touch event was handled. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 UI_EXPORT int GetModifiersFromKeyState(); | 231 UI_EXPORT int GetModifiersFromKeyState(); |
| 223 | 232 |
| 224 // Returns true if |message| identifies a mouse event that was generated as the | 233 // Returns true if |message| identifies a mouse event that was generated as the |
| 225 // result of a touch event. | 234 // result of a touch event. |
| 226 UI_EXPORT bool IsMouseEventFromTouch(UINT message); | 235 UI_EXPORT bool IsMouseEventFromTouch(UINT message); |
| 227 #endif | 236 #endif |
| 228 | 237 |
| 229 } // namespace ui | 238 } // namespace ui |
| 230 | 239 |
| 231 #endif // UI_BASE_EVENTS_EVENT_CONSTANTS_H_ | 240 #endif // UI_BASE_EVENTS_EVENT_CONSTANTS_H_ |
| OLD | NEW |