Chromium Code Reviews| Index: ui/events/event.h |
| diff --git a/ui/events/event.h b/ui/events/event.h |
| index 20e02626b872b087633488bf4e2e0d8c17e35cd5..7a184303fa072033d1b96a7d8253f1bd049995ec 100644 |
| --- a/ui/events/event.h |
| +++ b/ui/events/event.h |
| @@ -417,7 +417,9 @@ struct EVENTS_EXPORT PointerDetails { |
| float radius_y, |
| float force, |
| float tilt_x, |
| - float tilt_y) |
| + float tilt_y, |
| + float tangentialPressure, |
|
sadrul
2017/01/26 02:24:08
tangential_pressure (everywhere else in this CL)
lanwei
2017/01/26 15:53:52
Done, thanks for catching this!
|
| + int twist) |
|
sadrul
2017/01/26 02:24:08
Can these have default values now?
lanwei
2017/01/26 15:53:52
Done.
|
| : pointer_type(pointer_type), |
| // If we aren't provided with a radius on one axis, use the |
| // information from the other axis. |
| @@ -425,7 +427,9 @@ struct EVENTS_EXPORT PointerDetails { |
| radius_y(radius_y > 0 ? radius_y : radius_x), |
| force(force), |
| tilt_x(tilt_x), |
| - tilt_y(tilt_y) {} |
| + tilt_y(tilt_y), |
| + tangentialPressure(tangentialPressure), |
| + twist(twist) {} |
| PointerDetails(EventPointerType pointer_type, const gfx::Vector2d& offset) |
| : pointer_type(pointer_type), |
| force(std::numeric_limits<float>::quiet_NaN()), |
| @@ -437,7 +441,8 @@ struct EVENTS_EXPORT PointerDetails { |
| (force == other.force || |
| (std::isnan(force) && std::isnan(other.force))) && |
| tilt_x == other.tilt_x && tilt_y == other.tilt_y && |
| - offset == other.offset; |
| + tangentialPressure == other.tangentialPressure && |
| + twist == other.twist && offset == other.offset; |
| } |
| // The type of pointer device. |
| @@ -459,6 +464,16 @@ struct EVENTS_EXPORT PointerDetails { |
| float tilt_x = 0.0; |
| float tilt_y = 0.0; |
| + // The normalized tangential pressure (or barrel pressure), typically set by |
| + // an additional control of the stylus, which has a range of [-1,1], where 0 |
| + // is the neutral position of the control. Always 0 if the device does not |
| + // support it. |
| + float tangentialPressure = 0.0; |
|
sadrul
2017/01/26 02:24:08
tangential_pressure
|
| + |
| + // The clockwise rotation of a pen stylus around its own major axis, in |
| + // degrees in the range [0,359]. Always 0 if the device does not support it. |
| + int twist = 0; |
| + |
| // Only used by mouse wheel events. The amount to scroll. This is in multiples |
| // of kWheelDelta. |
| // Note: offset_.x() > 0/offset_.y() > 0 means scroll left/up. |