OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 // so the values can be cast between the enumerations. static_asserts | 195 // so the values can be cast between the enumerations. static_asserts |
196 // checking this are in web/WebInputEventConversion.cpp. | 196 // checking this are in web/WebInputEventConversion.cpp. |
197 enum DispatchType { | 197 enum DispatchType { |
198 // Event can be canceled. | 198 // Event can be canceled. |
199 Blocking, | 199 Blocking, |
200 // Event can not be canceled. | 200 // Event can not be canceled. |
201 EventNonBlocking, | 201 EventNonBlocking, |
202 // All listeners are passive; not cancelable. | 202 // All listeners are passive; not cancelable. |
203 ListenersNonBlockingPassive, | 203 ListenersNonBlockingPassive, |
204 // This value represents a state which would have normally blocking | 204 // This value represents a state which would have normally blocking |
205 // but was forced to be non-blocking; not cancelable. | 205 // but was forced to be non-blocking during fling; not cancelable. |
206 ListenersForcedNonBlockingPassive, | 206 ListenersForcedNonBlockingDueToFling, |
207 }; | 207 }; |
208 | 208 |
209 // The rail mode for a wheel event specifies the axis on which scrolling is | 209 // The rail mode for a wheel event specifies the axis on which scrolling is |
210 // expected to stick. If this axis is set to Free, then scrolling is not | 210 // expected to stick. If this axis is set to Free, then scrolling is not |
211 // stuck to any axis. | 211 // stuck to any axis. |
212 enum RailsMode { | 212 enum RailsMode { |
213 RailsModeFree = 0, | 213 RailsModeFree = 0, |
214 RailsModeHorizontal = 1, | 214 RailsModeHorizontal = 1, |
215 RailsModeVertical = 2, | 215 RailsModeVertical = 2, |
216 }; | 216 }; |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 | 617 |
618 // For a single touch, this is true after the touch-point has moved beyond | 618 // For a single touch, this is true after the touch-point has moved beyond |
619 // the platform slop region. For a multitouch, this is true after any | 619 // the platform slop region. For a multitouch, this is true after any |
620 // touch-point has moved (by whatever amount). | 620 // touch-point has moved (by whatever amount). |
621 bool movedBeyondSlopRegion; | 621 bool movedBeyondSlopRegion; |
622 | 622 |
623 // Whether there was an active fling animation when the event was | 623 // Whether there was an active fling animation when the event was |
624 // dispatched. | 624 // dispatched. |
625 bool dispatchedDuringFling; | 625 bool dispatchedDuringFling; |
626 | 626 |
| 627 // Whether this touch event is a touchstart or a first touchmove event per s
croll. |
| 628 bool touchStartOrFirstTouchMove; |
| 629 |
627 // A unique identifier for the touch event. Valid ids start at one and | 630 // A unique identifier for the touch event. Valid ids start at one and |
628 // increase monotonically. Zero means an unknown id. | 631 // increase monotonically. Zero means an unknown id. |
629 uint32_t uniqueTouchEventId; | 632 uint32_t uniqueTouchEventId; |
630 | 633 |
631 WebTouchEvent() | 634 WebTouchEvent() |
632 : WebInputEvent(sizeof(WebTouchEvent)) | 635 : WebInputEvent(sizeof(WebTouchEvent)) |
633 , touchesLength(0) | 636 , touchesLength(0) |
634 , dispatchType(Blocking) | 637 , dispatchType(Blocking) |
635 , movedBeyondSlopRegion(false) | 638 , movedBeyondSlopRegion(false) |
636 , dispatchedDuringFling(false) | 639 , dispatchedDuringFling(false) |
| 640 , touchStartOrFirstTouchMove(false) |
637 , uniqueTouchEventId(0) | 641 , uniqueTouchEventId(0) |
638 { | 642 { |
639 } | 643 } |
640 }; | 644 }; |
641 | 645 |
642 #pragma pack(pop) | 646 #pragma pack(pop) |
643 | 647 |
644 } // namespace blink | 648 } // namespace blink |
645 | 649 |
646 #endif | 650 #endif |
OLD | NEW |