| 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. |
| 128 }; | 130 }; |
| 129 | 131 |
| 130 // Phase of the event dispatch. | 132 // Phase of the event dispatch. |
| 131 enum EventPhase { | 133 enum EventPhase { |
| 132 EP_PREDISPATCH, | 134 EP_PREDISPATCH, |
| 133 EP_PRETARGET, | 135 EP_PRETARGET, |
| 134 EP_TARGET, | 136 EP_TARGET, |
| 135 EP_POSTTARGET, | 137 EP_POSTTARGET, |
| 136 EP_POSTDISPATCH | 138 EP_POSTDISPATCH |
| 137 }; | 139 }; |
| 138 | 140 |
| 139 // Device ID for Touch and Key Events. | 141 // Device ID for Touch and Key Events. |
| 140 enum EventDeviceId { | 142 enum EventDeviceId { |
| 141 ED_UNKNOWN_DEVICE = -1 | 143 ED_UNKNOWN_DEVICE = -1 |
| 142 }; | 144 }; |
| 143 | 145 |
| 144 } // namespace ui | 146 } // namespace ui |
| 145 | 147 |
| 146 #endif // UI_EVENTS_EVENT_CONSTANTS_H_ | 148 #endif // UI_EVENTS_EVENT_CONSTANTS_H_ |
| OLD | NEW |