| 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_EVENTS_EVENT_CONSTANTS_H_ | 5 #ifndef UI_EVENTS_EVENT_CONSTANTS_H_ |
| 6 #define UI_EVENTS_EVENT_CONSTANTS_H_ | 6 #define UI_EVENTS_EVENT_CONSTANTS_H_ |
| 7 | 7 |
| 8 namespace ui { | 8 namespace ui { |
| 9 | 9 |
| 10 // Event types. (prefixed because of a conflict with windows headers) | 10 // Event types. (prefixed because of a conflict with windows headers) |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 EF_IS_TRIPLE_CLICK = 1 << 17, | 112 EF_IS_TRIPLE_CLICK = 1 << 17, |
| 113 EF_IS_NON_CLIENT = 1 << 18, | 113 EF_IS_NON_CLIENT = 1 << 18, |
| 114 EF_FROM_TOUCH = 1 << 19, // Indicates this mouse event is generated | 114 EF_FROM_TOUCH = 1 << 19, // Indicates this mouse event is generated |
| 115 // from an unconsumed touch/gesture event. | 115 // from an unconsumed touch/gesture event. |
| 116 EF_TOUCH_ACCESSIBILITY = 1 << 20, // Indicates this event was generated from | 116 EF_TOUCH_ACCESSIBILITY = 1 << 20, // Indicates this event was generated from |
| 117 // touch accessibility mode. | 117 // touch accessibility mode. |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 // Result of dispatching an event. | 120 // Result of dispatching an event. |
| 121 enum EventResult { | 121 enum EventResult { |
| 122 ER_UNHANDLED = 0, // The event hasn't been handled. The event can be | 122 ER_UNHANDLED = 0, // The event hasn't been handled. The event can be |
| 123 // propagated to other handlers. | 123 // propagated to other handlers. |
| 124 ER_HANDLED = 1 << 0, // The event has already been handled, but it can | 124 ER_HANDLED = 1 << 0, // The event has already been handled, but it can |
| 125 // still be propagated to other handlers. | 125 // still be propagated to other handlers. |
| 126 ER_CONSUMED = 1 << 1, // The event has been handled, and it should not be | 126 ER_CONSUMED = 1 << 1, // The event has been handled, and it should not be |
| 127 // propagated to other handlers. | 127 // propagated to other handlers. |
| 128 ER_DISABLE_SYNC_HANDLING = |
| 129 1 << 2, // The event shouldn't be handled synchronously. This |
| 130 // happens if the event is being handled |
| 131 // asynchronously, or if the event is invalid and |
| 132 // shouldn't be handled at all. |
| 128 }; | 133 }; |
| 129 | 134 |
| 130 // Phase of the event dispatch. | 135 // Phase of the event dispatch. |
| 131 enum EventPhase { | 136 enum EventPhase { |
| 132 EP_PREDISPATCH, | 137 EP_PREDISPATCH, |
| 133 EP_PRETARGET, | 138 EP_PRETARGET, |
| 134 EP_TARGET, | 139 EP_TARGET, |
| 135 EP_POSTTARGET, | 140 EP_POSTTARGET, |
| 136 EP_POSTDISPATCH | 141 EP_POSTDISPATCH |
| 137 }; | 142 }; |
| 138 | 143 |
| 139 // Device ID for Touch and Key Events. | 144 // Device ID for Touch and Key Events. |
| 140 enum EventDeviceId { | 145 enum EventDeviceId { |
| 141 ED_UNKNOWN_DEVICE = -1 | 146 ED_UNKNOWN_DEVICE = -1 |
| 142 }; | 147 }; |
| 143 | 148 |
| 144 } // namespace ui | 149 } // namespace ui |
| 145 | 150 |
| 146 #endif // UI_EVENTS_EVENT_CONSTANTS_H_ | 151 #endif // UI_EVENTS_EVENT_CONSTANTS_H_ |
| OLD | NEW |