diff options
author | Ben Murdoch <benm@google.com> | 2023-02-13 18:35:59 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-02-13 18:35:59 +0000 |
commit | bf92cd653f063aa750c019bf861da67300e60758 (patch) | |
tree | 2f70f51eb0c32d15ae67dc1bd74623f05b812d72 | |
parent | d1b107efe68c271b10e16bf08d899042ca27fb33 (diff) | |
parent | 5b030381fd98f6e262341f9cb73ab209d0a18cdd (diff) | |
download | libchrome-gestures-bf92cd653f063aa750c019bf861da67300e60758.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into merge am: 402ba203f4 am: 6b6f1324bc am: 5b030381fd
Original change: https://android-review.googlesource.com/c/platform/external/libchrome-gestures/+/2430752
Change-Id: I05a38ba56d3f11e40414e10a647c466fec88dc01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | METADATA.android | 4 | ||||
-rw-r--r-- | include/gestures.h | 42 | ||||
-rw-r--r-- | src/immediate_interpreter_unittest.cc | 2 |
3 files changed, 39 insertions, 9 deletions
diff --git a/METADATA.android b/METADATA.android index 8df3226..d9478a9 100644 --- a/METADATA.android +++ b/METADATA.android @@ -6,7 +6,7 @@ third_party { type: GIT value: "https://chromium.googlesource.com/chromiumos/platform/gestures/" } - version: "10ca30a7497231a1c978264f4220c863f5d35727" - last_upgrade_date { year: 2023 month: 01 day: 13 } + version: "ebe1f3fed44b84cc60294d76a680bb741876b3bd" + last_upgrade_date { year: 2023 month: 02 day: 10 } license_type: NOTICE } diff --git a/include/gestures.h b/include/gestures.h index 5a1acc9..e4f7cc2 100644 --- a/include/gestures.h +++ b/include/gestures.h @@ -261,13 +261,23 @@ struct HardwareState { // the ordinal_* fields. typedef struct { - float dx, dy; + // The movement in the X axis. Positive values indicate motion to the right. + float dx; + // The movement in the Y axis. Positive values indicate downwards motion. + float dy; float ordinal_dx, ordinal_dy; } GestureMove; // Represents scroll gestures on a touch device. typedef struct{ - float dx, dy; + // The scroll movement in the X axis. Unlike with move gestures, *negative* + // values indicate the fingers moving to the right, unless the "Australian + // Scrolling" or "Invert Scrolling" properties are set. + float dx; + // The scroll movement in the Y axis. Unlike with move gestures, *negative* + // values indicate the fingers moving downwards, unless the "Australian + // Scrolling" or "Invert Scrolling" properties are set. + float dy; float ordinal_dx, ordinal_dy; // If set, stop_fling means that this scroll should stop flinging, thus // if an interpreter suppresses it for any reason (e.g., rounds the size @@ -293,19 +303,39 @@ typedef struct { } GestureButtonsChange; typedef struct { - // fling velocity (valid when fling_state is GESTURES_FLING_START): - float vx, vy; + // The fling velocity in the X axis, only valid when fling_state is + // GESTURES_FLING_START. Unlike with move gestures, *negative* values indicate + // the fingers moving to the right, unless the "Australian Scrolling" or + // "Invert Scrolling" properties are set. + float vx; + // The fling velocity in the Y axis, only valid when fling_state is + // GESTURES_FLING_START. Unlike with move gestures, *negative* values indicate + // the fingers moving downwards, unless the "Australian Scrolling" or "Invert + // Scrolling" properties are set. + float vy; float ordinal_vx, ordinal_vy; unsigned fling_state:1; // GESTURES_FLING_START or GESTURES_FLING_TAP_DOWN } GestureFling; typedef struct { - float dx, dy; + // The swipe movement in the X axis. Positive values indicate motion to the + // right. + float dx; + // The swipe movement in the Y axis. Unlike with move gestures, *negative* + // values indicate downwards motion, unless the "Australian Scrolling" + // property is set. + float dy; float ordinal_dx, ordinal_dy; } GestureSwipe; typedef struct { - float dx, dy; + // The swipe movement in the X axis. Positive values indicate motion to the + // right. + float dx; + // The swipe movement in the Y axis. Unlike with move gestures, *negative* + // values indicate downwards motion, unless the "Australian Scrolling" + // property is set. + float dy; float ordinal_dx, ordinal_dy; } GestureFourFingerSwipe; diff --git a/src/immediate_interpreter_unittest.cc b/src/immediate_interpreter_unittest.cc index f5dd9a0..239cb27 100644 --- a/src/immediate_interpreter_unittest.cc +++ b/src/immediate_interpreter_unittest.cc @@ -2985,7 +2985,7 @@ TEST(ImmediateInterpreterTest, PinchTests) { {make_hwstate(2.01, 0, 2, 2, &finger_states[22]), kAny}, {make_hwstate(2.02, 0, 2, 2, &finger_states[26]), kAny}, {make_hwstate(2.03, 0, 2, 2, &finger_states[30]), kAny}, - {make_hwstate(2.04, 0, 2, 2, &finger_states[32]), kNoPinch}, + {make_hwstate(2.04, 0, 2, 2, &finger_states[30]), kNoPinch}, {make_hwstate(2.05, 0, 0, 0, NULL), kAny}, |