1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #ifndef InputData_h__ 7 #define InputData_h__ 8 9 #include "nsDebug.h" 10 #include "nsIDOMWheelEvent.h" 11 #include "nsIScrollableFrame.h" 12 #include "nsPoint.h" 13 #include "nsTArray.h" 14 #include "Units.h" 15 #include "mozilla/EventForwards.h" 16 #include "mozilla/TimeStamp.h" 17 #include "mozilla/gfx/MatrixFwd.h" 18 19 template<class E> struct already_AddRefed; 20 class nsIWidget; 21 22 namespace mozilla { 23 24 namespace layers { 25 class PAPZCTreeManagerParent; 26 class APZCTreeManagerChild; 27 } 28 29 namespace dom { 30 class Touch; 31 } // namespace dom 32 33 enum InputType 34 { 35 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 36 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 37 MULTITOUCH_INPUT, 38 MOUSE_INPUT, 39 PANGESTURE_INPUT, 40 PINCHGESTURE_INPUT, 41 TAPGESTURE_INPUT, 42 SCROLLWHEEL_INPUT, 43 44 // Used as an upper bound for ContiguousEnumSerializer 45 SENTINEL_INPUT, 46 }; 47 48 class MultiTouchInput; 49 class MouseInput; 50 class PanGestureInput; 51 class PinchGestureInput; 52 class TapGestureInput; 53 class ScrollWheelInput; 54 55 // This looks unnecessary now, but as we add more and more classes that derive 56 // from InputType (eventually probably almost as many as *Events.h has), it 57 // will be more and more clear what's going on with a macro that shortens the 58 // definition of the RTTI functions. 59 #define INPUTDATA_AS_CHILD_TYPE(type, enumID) \ 60 const type& As##type() const \ 61 { \ 62 MOZ_ASSERT(mInputType == enumID, "Invalid cast of InputData."); \ 63 return (const type&) *this; \ 64 } \ 65 type& As##type() \ 66 { \ 67 MOZ_ASSERT(mInputType == enumID, "Invalid cast of InputData."); \ 68 return (type&) *this; \ 69 } 70 71 /** Base input data class. Should never be instantiated. */ 72 class InputData 73 { 74 public: 75 // Warning, this class is serialized and sent over IPC. Any change to its 76 // fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h 77 InputType mInputType; 78 // Time in milliseconds that this data is relevant to. This only really 79 // matters when this data is used as an event. We use uint32_t instead of 80 // TimeStamp because it is easier to convert from WidgetInputEvent. The time 81 // is platform-specific but it in the case of B2G and Fennec it is since 82 // startup. 83 uint32_t mTime; 84 // Set in parallel to mTime until we determine it is safe to drop 85 // platform-specific event times (see bug 77992). 86 TimeStamp mTimeStamp; 87 88 Modifiers modifiers; 89 90 INPUTDATA_AS_CHILD_TYPE(MultiTouchInput, MULTITOUCH_INPUT) 91 INPUTDATA_AS_CHILD_TYPE(MouseInput, MOUSE_INPUT) 92 INPUTDATA_AS_CHILD_TYPE(PanGestureInput, PANGESTURE_INPUT) 93 INPUTDATA_AS_CHILD_TYPE(PinchGestureInput, PINCHGESTURE_INPUT) 94 INPUTDATA_AS_CHILD_TYPE(TapGestureInput, TAPGESTURE_INPUT) 95 INPUTDATA_AS_CHILD_TYPE(ScrollWheelInput, SCROLLWHEEL_INPUT) 96 97 virtual ~InputData(); 98 explicit InputData(InputType aInputType); 99 100 protected: 101 InputData(InputType aInputType, uint32_t aTime, TimeStamp aTimeStamp, 102 Modifiers aModifiers); 103 }; 104 105 /** 106 * Data container for a single touch input. Similar to dom::Touch, but used in 107 * off-main-thread situations. This is more for just storing touch data, whereas 108 * dom::Touch is more useful for dispatching through the DOM (which can only 109 * happen on the main thread). dom::Touch also bears the problem of storing 110 * pointers to nsIWidget instances which can only be used on the main thread, 111 * so if instead we used dom::Touch and ever set these pointers 112 * off-main-thread, Bad Things Can Happen(tm). 113 * 114 * Note that this doesn't inherit from InputData because this itself is not an 115 * event. It is only a container/struct that should have any number of instances 116 * within a MultiTouchInput. 117 * 118 * fixme/bug 775746: Make dom::Touch inherit from this class. 119 */ 120 class SingleTouchData 121 { 122 public: 123 // Construct a SingleTouchData from a Screen point. 124 // mLocalScreenPoint remains (0,0) unless it's set later. 125 SingleTouchData(int32_t aIdentifier, 126 ScreenIntPoint aScreenPoint, 127 ScreenSize aRadius, 128 float aRotationAngle, 129 float aForce); 130 131 // Construct a SingleTouchData from a ParentLayer point. 132 // mScreenPoint remains (0,0) unless it's set later. 133 // Note: if APZ starts using the radius for anything, we should add a local 134 // version of that too, and have this constructor take it as a ParentLayerSize. 135 SingleTouchData(int32_t aIdentifier, 136 ParentLayerPoint aLocalScreenPoint, 137 ScreenSize aRadius, 138 float aRotationAngle, 139 float aForce); 140 141 SingleTouchData(); 142 143 already_AddRefed<dom::Touch> ToNewDOMTouch() const; 144 145 // Warning, this class is serialized and sent over IPC. Any change to its 146 // fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h 147 148 // A unique number assigned to each SingleTouchData within a MultiTouchInput so 149 // that they can be easily distinguished when handling a touch start/move/end. 150 int32_t mIdentifier; 151 152 // Point on the screen that the touch hit, in device pixels. They are 153 // coordinates on the screen. 154 ScreenIntPoint mScreenPoint; 155 156 // |mScreenPoint| transformed to the local coordinates of the APZC targeted 157 // by the hit. This is set and used by APZ. 158 ParentLayerPoint mLocalScreenPoint; 159 160 // Radius that the touch covers, i.e. if you're using your thumb it will 161 // probably be larger than using your pinky, even with the same force. 162 // Radius can be different along x and y. For example, if you press down with 163 // your entire finger vertically, the y radius will be much larger than the x 164 // radius. 165 ScreenSize mRadius; 166 167 float mRotationAngle; 168 169 // How hard the screen is being pressed. 170 float mForce; 171 }; 172 173 /** 174 * Similar to WidgetTouchEvent, but for use off-main-thread. Also only stores a 175 * screen touch point instead of the many different coordinate spaces 176 * WidgetTouchEvent stores its touch point in. This includes a way to initialize 177 * itself from a WidgetTouchEvent by copying all relevant data over. Note that 178 * this copying from WidgetTouchEvent functionality can only be used on the main 179 * thread. 180 * 181 * Stores an array of SingleTouchData. 182 */ 183 class MultiTouchInput : public InputData 184 { 185 public: 186 enum MultiTouchType 187 { 188 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 189 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 190 MULTITOUCH_START, 191 MULTITOUCH_MOVE, 192 MULTITOUCH_END, 193 MULTITOUCH_CANCEL, 194 195 // Used as an upper bound for ContiguousEnumSerializer 196 MULTITOUCH_SENTINEL, 197 }; 198 199 MultiTouchInput(MultiTouchType aType, uint32_t aTime, TimeStamp aTimeStamp, 200 Modifiers aModifiers); 201 MultiTouchInput(); 202 MultiTouchInput(const MultiTouchInput& aOther); 203 explicit MultiTouchInput(const WidgetTouchEvent& aTouchEvent); 204 // This conversion from WidgetMouseEvent to MultiTouchInput is needed because 205 // on the B2G emulator we can only receive mouse events, but we need to be 206 // able to pan correctly. To do this, we convert the events into a format that 207 // the panning code can handle. This code is very limited and only supports 208 // SingleTouchData. It also sends garbage for the identifier, radius, force 209 // and rotation angle. 210 explicit MultiTouchInput(const WidgetMouseEvent& aMouseEvent); 211 212 WidgetTouchEvent ToWidgetTouchEvent(nsIWidget* aWidget) const; 213 WidgetMouseEvent ToWidgetMouseEvent(nsIWidget* aWidget) const; 214 215 // Return the index into mTouches of the SingleTouchData with the given 216 // identifier, or -1 if there is no such SingleTouchData. 217 int32_t IndexOfTouch(int32_t aTouchIdentifier); 218 219 bool TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform); 220 221 // Warning, this class is serialized and sent over IPC. Any change to its 222 // fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h 223 MultiTouchType mType; 224 nsTArray<SingleTouchData> mTouches; 225 bool mHandledByAPZ; 226 }; 227 228 class MouseInput : public InputData 229 { 230 protected: 231 friend mozilla::layers::PAPZCTreeManagerParent; 232 friend mozilla::layers::APZCTreeManagerChild; 233 234 MouseInput(); 235 236 public: 237 enum MouseType 238 { 239 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 240 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 241 MOUSE_NONE, 242 MOUSE_MOVE, 243 MOUSE_DOWN, 244 MOUSE_UP, 245 MOUSE_DRAG_START, 246 MOUSE_DRAG_END, 247 MOUSE_WIDGET_ENTER, 248 MOUSE_WIDGET_EXIT, 249 250 // Used as an upper bound for ContiguousEnumSerializer 251 MOUSE_SENTINEL, 252 }; 253 254 enum ButtonType 255 { 256 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 257 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 258 LEFT_BUTTON, 259 MIDDLE_BUTTON, 260 RIGHT_BUTTON, 261 NONE, 262 263 // Used as an upper bound for ContiguousEnumSerializer 264 BUTTON_SENTINEL, 265 }; 266 267 MouseInput(MouseType aType, ButtonType aButtonType, uint16_t aInputSource, 268 int16_t aButtons, const ScreenPoint& aPoint, uint32_t aTime, 269 TimeStamp aTimeStamp, Modifiers aModifiers); 270 explicit MouseInput(const WidgetMouseEventBase& aMouseEvent); 271 272 bool IsLeftButton() const; 273 274 bool TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform); 275 WidgetMouseEvent ToWidgetMouseEvent(nsIWidget* aWidget) const; 276 277 // Warning, this class is serialized and sent over IPC. Any change to its 278 // fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h 279 MouseType mType; 280 ButtonType mButtonType; 281 uint16_t mInputSource; 282 int16_t mButtons; 283 ScreenPoint mOrigin; 284 ParentLayerPoint mLocalOrigin; 285 bool mHandledByAPZ; 286 }; 287 288 /** 289 * Encapsulation class for pan events, can be used off-main-thread. 290 * These events are currently only used for scrolling on desktop. 291 */ 292 class PanGestureInput : public InputData 293 { 294 protected: 295 friend mozilla::layers::PAPZCTreeManagerParent; 296 friend mozilla::layers::APZCTreeManagerChild; 297 298 PanGestureInput(); 299 300 public: 301 enum PanGestureType 302 { 303 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 304 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 305 306 // MayStart: Dispatched before any actual panning has occurred but when a 307 // pan gesture is probably about to start, for example when the user 308 // starts touching the touchpad. Should interrupt any ongoing APZ 309 // animation and can be used to trigger scrollability indicators (e.g. 310 // flashing overlay scrollbars). 311 PANGESTURE_MAYSTART, 312 313 // Cancelled: Dispatched after MayStart when no pan gesture is going to 314 // happen after all, for example when the user lifts their fingers from a 315 // touchpad without having done any scrolling. 316 PANGESTURE_CANCELLED, 317 318 // Start: A pan gesture is starting. 319 // For devices that do not support the MayStart event type, this event can 320 // be used to interrupt ongoing APZ animations. 321 PANGESTURE_START, 322 323 // Pan: The actual pan motion by mPanDisplacement. 324 PANGESTURE_PAN, 325 326 // End: The pan gesture has ended, for example because the user has lifted 327 // their fingers from a touchpad after scrolling. 328 // Any potential momentum events fire after this event. 329 PANGESTURE_END, 330 331 // The following momentum event types are used in order to control the pan 332 // momentum animation. Using these instead of our own animation ensures 333 // that the animation curve is OS native and that the animation stops 334 // reliably if it is cancelled by the user. 335 336 // MomentumStart: Dispatched between the End event of the actual 337 // user-controlled pan, and the first MomentumPan event of the momentum 338 // animation. 339 PANGESTURE_MOMENTUMSTART, 340 341 // MomentumPan: The actual momentum motion by mPanDisplacement. 342 PANGESTURE_MOMENTUMPAN, 343 344 // MomentumEnd: The momentum animation has ended, for example because the 345 // momentum velocity has gone below the stopping threshold, or because the 346 // user has stopped the animation by putting their fingers on a touchpad. 347 PANGESTURE_MOMENTUMEND, 348 349 // Used as an upper bound for ContiguousEnumSerializer 350 PANGESTURE_SENTINEL, 351 }; 352 353 PanGestureInput(PanGestureType aType, 354 uint32_t aTime, 355 TimeStamp aTimeStamp, 356 const ScreenPoint& aPanStartPoint, 357 const ScreenPoint& aPanDisplacement, 358 Modifiers aModifiers); 359 360 bool IsMomentum() const; 361 362 WidgetWheelEvent ToWidgetWheelEvent(nsIWidget* aWidget) const; 363 364 bool TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform); 365 366 ScreenPoint UserMultipliedPanDisplacement() const; 367 ParentLayerPoint UserMultipliedLocalPanDisplacement() const; 368 369 // Warning, this class is serialized and sent over IPC. Any change to its 370 // fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h 371 PanGestureType mType; 372 ScreenPoint mPanStartPoint; 373 374 // The delta. This can be non-zero on any type of event. 375 ScreenPoint mPanDisplacement; 376 377 // Versions of |mPanStartPoint| and |mPanDisplacement| in the local 378 // coordinates of the APZC receiving the pan. These are set and used by APZ. 379 ParentLayerPoint mLocalPanStartPoint; 380 ParentLayerPoint mLocalPanDisplacement; 381 382 // See lineOrPageDeltaX/Y on WidgetWheelEvent. 383 int32_t mLineOrPageDeltaX; 384 int32_t mLineOrPageDeltaY; 385 386 // User-set delta multipliers. 387 double mUserDeltaMultiplierX; 388 double mUserDeltaMultiplierY; 389 390 bool mHandledByAPZ; 391 392 // true if this is a PANGESTURE_END event that will be followed by a 393 // PANGESTURE_MOMENTUMSTART event. 394 bool mFollowedByMomentum; 395 396 // If this is true, and this event started a new input block that couldn't 397 // find a scrollable target which is scrollable in the horizontal component 398 // of the scroll start direction, then this input block needs to be put on 399 // hold until a content response has arrived, even if the block has a 400 // confirmed target. 401 // This is used by events that can result in a swipe instead of a scroll. 402 bool mRequiresContentResponseIfCannotScrollHorizontallyInStartDirection; 403 }; 404 405 /** 406 * Encapsulation class for pinch events. In general, these will be generated by 407 * a gesture listener by looking at SingleTouchData/MultiTouchInput instances and 408 * determining whether or not the user was trying to do a gesture. 409 */ 410 class PinchGestureInput : public InputData 411 { 412 protected: 413 friend mozilla::layers::PAPZCTreeManagerParent; 414 friend mozilla::layers::APZCTreeManagerChild; 415 416 PinchGestureInput(); 417 418 public: 419 enum PinchGestureType 420 { 421 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 422 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 423 PINCHGESTURE_START, 424 PINCHGESTURE_SCALE, 425 PINCHGESTURE_END, 426 427 // Used as an upper bound for ContiguousEnumSerializer 428 PINCHGESTURE_SENTINEL, 429 }; 430 431 // Construct a pinch gesture from a ParentLayer point. 432 // mFocusPoint remains (0,0) unless it's set later. 433 PinchGestureInput(PinchGestureType aType, uint32_t aTime, TimeStamp aTimeStamp, 434 const ParentLayerPoint& aLocalFocusPoint, 435 ParentLayerCoord aCurrentSpan, 436 ParentLayerCoord aPreviousSpan, Modifiers aModifiers); 437 438 bool TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform); 439 440 // Warning, this class is serialized and sent over IPC. Any change to its 441 // fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h 442 PinchGestureType mType; 443 444 // Center point of the pinch gesture. That is, if there are two fingers on the 445 // screen, it is their midpoint. In the case of more than two fingers, the 446 // point is implementation-specific, but can for example be the midpoint 447 // between the very first and very last touch. This is in device pixels and 448 // are the coordinates on the screen of this midpoint. 449 // For PINCHGESTURE_END events, this instead will hold the coordinates of 450 // the remaining finger, if there is one. If there isn't one then it will 451 // store -1, -1. 452 ScreenPoint mFocusPoint; 453 454 // |mFocusPoint| transformed to the local coordinates of the APZC targeted 455 // by the hit. This is set and used by APZ. 456 ParentLayerPoint mLocalFocusPoint; 457 458 // The distance between the touches responsible for the pinch gesture. 459 ParentLayerCoord mCurrentSpan; 460 461 // The previous |mCurrentSpan| in the PinchGestureInput preceding this one. 462 // This is only really relevant during a PINCHGESTURE_SCALE because when it is 463 // of this type then there must have been a history of spans. 464 ParentLayerCoord mPreviousSpan; 465 }; 466 467 /** 468 * Encapsulation class for tap events. In general, these will be generated by 469 * a gesture listener by looking at SingleTouchData/MultiTouchInput instances and 470 * determining whether or not the user was trying to do a gesture. 471 */ 472 class TapGestureInput : public InputData 473 { 474 protected: 475 friend mozilla::layers::PAPZCTreeManagerParent; 476 friend mozilla::layers::APZCTreeManagerChild; 477 478 TapGestureInput(); 479 480 public: 481 enum TapGestureType 482 { 483 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 484 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 485 TAPGESTURE_LONG, 486 TAPGESTURE_LONG_UP, 487 TAPGESTURE_UP, 488 TAPGESTURE_CONFIRMED, 489 TAPGESTURE_DOUBLE, 490 TAPGESTURE_SECOND, // See GeckoContentController::TapType::eSecondTap 491 TAPGESTURE_CANCEL, 492 493 // Used as an upper bound for ContiguousEnumSerializer 494 TAPGESTURE_SENTINEL, 495 }; 496 497 // Construct a tap gesture from a Screen point. 498 // mLocalPoint remains (0,0) unless it's set later. 499 TapGestureInput(TapGestureType aType, uint32_t aTime, TimeStamp aTimeStamp, 500 const ScreenIntPoint& aPoint, Modifiers aModifiers); 501 502 // Construct a tap gesture from a ParentLayer point. 503 // mPoint remains (0,0) unless it's set later. 504 TapGestureInput(TapGestureType aType, uint32_t aTime, TimeStamp aTimeStamp, 505 const ParentLayerPoint& aLocalPoint, Modifiers aModifiers); 506 507 bool TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform); 508 509 // Warning, this class is serialized and sent over IPC. Any change to its 510 // fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h 511 TapGestureType mType; 512 513 // The location of the tap in screen pixels. 514 ScreenIntPoint mPoint; 515 516 // The location of the tap in the local coordinates of the APZC receiving it. 517 // This is set and used by APZ. 518 ParentLayerPoint mLocalPoint; 519 }; 520 521 // Encapsulation class for scroll-wheel events. These are generated by mice 522 // with physical scroll wheels, and on Windows by most touchpads when using 523 // scroll gestures. 524 class ScrollWheelInput : public InputData 525 { 526 protected: 527 friend mozilla::layers::PAPZCTreeManagerParent; 528 friend mozilla::layers::APZCTreeManagerChild; 529 530 ScrollWheelInput(); 531 532 public: 533 enum ScrollDeltaType 534 { 535 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 536 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 537 538 // There are three kinds of scroll delta modes in Gecko: "page", "line" and 539 // "pixel". 540 SCROLLDELTA_LINE, 541 SCROLLDELTA_PAGE, 542 SCROLLDELTA_PIXEL, 543 544 // Used as an upper bound for ContiguousEnumSerializer 545 SCROLLDELTA_SENTINEL, 546 }; 547 548 enum ScrollMode 549 { 550 // Warning, this enum is serialized and sent over IPC. If you reorder, add, 551 // or remove a value, you need to update its ParamTraits<> in nsGUIEventIPC.h 552 553 SCROLLMODE_INSTANT, 554 SCROLLMODE_SMOOTH, 555 556 // Used as an upper bound for ContiguousEnumSerializer 557 SCROLLMODE_SENTINEL, 558 }; 559 560 ScrollWheelInput(uint32_t aTime, TimeStamp aTimeStamp, Modifiers aModifiers, 561 ScrollMode aScrollMode, ScrollDeltaType aDeltaType, 562 const ScreenPoint& aOrigin, double aDeltaX, double aDeltaY, 563 bool aAllowToOverrideSystemScrollSpeed); 564 explicit ScrollWheelInput(const WidgetWheelEvent& aEvent); 565 566 static ScrollDeltaType DeltaTypeForDeltaMode(uint32_t aDeltaMode); 567 static uint32_t DeltaModeForDeltaType(ScrollDeltaType aDeltaType); 568 static nsIScrollableFrame::ScrollUnit ScrollUnitForDeltaType(ScrollDeltaType aDeltaType); 569 570 WidgetWheelEvent ToWidgetWheelEvent(nsIWidget* aWidget) const; 571 bool TransformToLocal(const ScreenToParentLayerMatrix4x4& aTransform); 572 573 bool IsCustomizedByUserPrefs() const; 574 575 // Warning, this class is serialized and sent over IPC. Any change to its 576 // fields must be reflected in its ParamTraits<>, in nsGUIEventIPC.h 577 ScrollDeltaType mDeltaType; 578 ScrollMode mScrollMode; 579 ScreenPoint mOrigin; 580 581 bool mHandledByAPZ; 582 583 // Deltas are in units corresponding to the delta type. For line deltas, they 584 // are the number of line units to scroll. The number of device pixels for a 585 // horizontal and vertical line unit are in FrameMetrics::mLineScrollAmount. 586 // For pixel deltas, these values are in ScreenCoords. 587 // 588 // The horizontal (X) delta is > 0 for scrolling right and < 0 for scrolling 589 // left. The vertical (Y) delta is < 0 for scrolling up and > 0 for 590 // scrolling down. 591 double mDeltaX; 592 double mDeltaY; 593 594 // The location of the scroll in local coordinates. This is set and used by 595 // APZ. 596 ParentLayerPoint mLocalOrigin; 597 598 // See lineOrPageDeltaX/Y on WidgetWheelEvent. 599 int32_t mLineOrPageDeltaX; 600 int32_t mLineOrPageDeltaY; 601 602 // Indicates the order in which this event was added to a transaction. The 603 // first event is 1; if not a member of a transaction, this is 0. 604 uint32_t mScrollSeriesNumber; 605 606 // User-set delta multipliers. 607 double mUserDeltaMultiplierX; 608 double mUserDeltaMultiplierY; 609 610 bool mMayHaveMomentum; 611 bool mIsMomentum; 612 bool mAllowToOverrideSystemScrollSpeed; 613 }; 614 615 } // namespace mozilla 616 617 #endif // InputData_h__ 618