| Index: ui/events/event.h
|
| diff --git a/ui/events/event.h b/ui/events/event.h
|
| index b65c27516ab48f1f6d4e4f1b00a2270524cd2a9a..28d7883d90d64509ed71e9e2ac8c2da88bfd9537 100644
|
| --- a/ui/events/event.h
|
| +++ b/ui/events/event.h
|
| @@ -497,6 +497,8 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
|
| radius_y_(model.radius_y_),
|
| rotation_angle_(model.rotation_angle_),
|
| force_(model.force_),
|
| + tilt_(model.tilt_),
|
| + tiltDirection_(model.tiltDirection_),
|
| may_cause_scrolling_(model.may_cause_scrolling_),
|
| should_remove_native_touch_id_mapping_(false) {}
|
|
|
| @@ -513,7 +515,9 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
|
| float radius_x,
|
| float radius_y,
|
| float angle,
|
| - float force);
|
| + float force,
|
| + float tilt,
|
| + float tiltDirection);
|
|
|
| ~TouchEvent() override;
|
|
|
| @@ -527,6 +531,8 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
|
| float radius_y() const { return radius_y_ > 0 ? radius_y_ : radius_x_; }
|
| float rotation_angle() const { return rotation_angle_; }
|
| float force() const { return force_; }
|
| + float tilt() const { return tilt_; }
|
| + float tiltDirection() const { return tiltDirection_; }
|
|
|
| void set_may_cause_scrolling(bool causes) { may_cause_scrolling_ = causes; }
|
| bool may_cause_scrolling() const { return may_cause_scrolling_; }
|
| @@ -575,6 +581,14 @@ class EVENTS_EXPORT TouchEvent : public LocatedEvent {
|
| // Force (pressure) of the touch. Normalized to be [0, 1]. Default to be 0.0.
|
| float force_;
|
|
|
| + // Tilt angle of the stylus away from the perpendicular to the screen.
|
| + // Default is NaN.
|
| + float tilt_;
|
| +
|
| + // Clockwise angle from the X axis to the XY-projection of the stylus.
|
| + // Range is [-180, 180), default is NaN.
|
| + float tiltDirection_;
|
| +
|
| // Whether the (unhandled) touch event will produce a scroll event (e.g., a
|
| // touchmove that exceeds the platform slop region, or a touchend that
|
| // causes a fling). Defaults to false.
|
|
|