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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 // Phase of the event dispatch. | 158 // Phase of the event dispatch. |
159 enum EventPhase { | 159 enum EventPhase { |
160 EP_PREDISPATCH, | 160 EP_PREDISPATCH, |
161 EP_PRETARGET, | 161 EP_PRETARGET, |
162 EP_TARGET, | 162 EP_TARGET, |
163 EP_POSTTARGET, | 163 EP_POSTTARGET, |
164 EP_POSTDISPATCH | 164 EP_POSTDISPATCH |
165 }; | 165 }; |
166 | 166 |
| 167 // Momentum phase information used for a ScrollEvent. |
| 168 enum class EventMomentumPhase { |
| 169 // Event is a non-momentum update to an event stream already begun. |
| 170 NONE, |
| 171 |
| 172 // Event is the beginning of an event stream that may result in momentum. |
| 173 MAY_BEGIN, |
| 174 |
| 175 // Event is an update while in a momentum phase. A "begin" event for the |
| 176 // momentum phase portion of an event stream uses this also, but the scroll |
| 177 // offsets will be zero. |
| 178 INERTIAL_UPDATE, |
| 179 |
| 180 // Event marks the end of the current event stream. Note that this is also set |
| 181 // for events that are not a "stream", but indicate both the start and end of |
| 182 // the event (e.g. a mouse wheel tick). |
| 183 END, |
| 184 }; |
| 185 |
167 // Device ID for Touch and Key Events. | 186 // Device ID for Touch and Key Events. |
168 enum EventDeviceId { | 187 enum EventDeviceId { |
169 ED_UNKNOWN_DEVICE = -1 | 188 ED_UNKNOWN_DEVICE = -1 |
170 }; | 189 }; |
171 | 190 |
172 // Pointing device type. | 191 // Pointing device type. |
173 enum class EventPointerType : int { | 192 enum class EventPointerType : int { |
174 POINTER_TYPE_UNKNOWN = 0, | 193 POINTER_TYPE_UNKNOWN = 0, |
175 POINTER_TYPE_MOUSE, | 194 POINTER_TYPE_MOUSE, |
176 POINTER_TYPE_PEN, | 195 POINTER_TYPE_PEN, |
177 POINTER_TYPE_TOUCH, | 196 POINTER_TYPE_TOUCH, |
178 POINTER_TYPE_ERASER, | 197 POINTER_TYPE_ERASER, |
179 }; | 198 }; |
180 | 199 |
181 // Device type for gesture events. | 200 // Device type for gesture events. |
182 enum class GestureDeviceType : int { | 201 enum class GestureDeviceType : int { |
183 DEVICE_UNKNOWN = 0, | 202 DEVICE_UNKNOWN = 0, |
184 DEVICE_TOUCHPAD, | 203 DEVICE_TOUCHPAD, |
185 DEVICE_TOUCHSCREEN, | 204 DEVICE_TOUCHSCREEN, |
186 }; | 205 }; |
187 | 206 |
188 } // namespace ui | 207 } // namespace ui |
189 | 208 |
190 #endif // UI_EVENTS_EVENT_CONSTANTS_H_ | 209 #endif // UI_EVENTS_EVENT_CONSTANTS_H_ |
OLD | NEW |