diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-06-16 01:53:36 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2010-06-17 13:27:16 -0700 |
commit | 5c225b1680e696ae8bbf505a1997d6f720672f74 (patch) | |
tree | 932326fd02ee91d8a64adfcc9415027646c56563 /native/include | |
parent | 3a0146cd29fae3c5bc29d8d535d67826284f8cc9 (diff) | |
download | frameworks_base-5c225b1680e696ae8bbf505a1997d6f720672f74.zip frameworks_base-5c225b1680e696ae8bbf505a1997d6f720672f74.tar.gz frameworks_base-5c225b1680e696ae8bbf505a1997d6f720672f74.tar.bz2 |
Even more native input dispatch work in progress.
Added more tests.
Fixed a regression in Vector.
Fixed bugs in pointer tracking.
Fixed a starvation issue in PollLoop when setting or removing callbacks.
Fixed a couple of policy nits.
Modified the internal representation of MotionEvent to be more
efficient and more consistent.
Added code to skip/cancel virtual key processing when there are multiple
pointers down. This helps to better disambiguate virtual key presses
from stray touches (such as cheek presses).
Change-Id: I2a7d2cce0195afb9125b23378baa94fd2fc6671c
Diffstat (limited to 'native/include')
-rw-r--r-- | native/include/android/input.h | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/native/include/android/input.h b/native/include/android/input.h index ee2f664..193cbf3 100644 --- a/native/include/android/input.h +++ b/native/include/android/input.h @@ -394,6 +394,18 @@ int64_t motion_event_get_down_time(const input_event_t* motion_event); * in the java.lang.System.nanoTime() time base. */ int64_t motion_event_get_event_time(const input_event_t* motion_event); +/* Get the X coordinate offset. + * For touch events on the screen, this is the delta that was added to the raw + * screen coordinates to adjust for the absolute position of the containing windows + * and views. */ +float motion_event_get_x_offset(const input_event_t* motion_event); + +/* Get the precision of the Y coordinates being reported. + * For touch events on the screen, this is the delta that was added to the raw + * screen coordinates to adjust for the absolute position of the containing windows + * and views. */ +float motion_event_get_y_offset(const input_event_t* motion_event); + /* Get the precision of the X coordinates being reported. * You can multiply this number with an X coordinate sample to find the * actual hardware value of the X coordinate. */ @@ -414,17 +426,17 @@ size_t motion_event_get_pointer_count(const input_event_t* motion_event); * going up and down since the start of the current gesture. */ int32_t motion_event_get_pointer_id(const input_event_t* motion_event, size_t pointer_index); -/* Get the original raw X coordinate of this event. For touch - * events on the screen, this is the original location of the event +/* Get the original raw X coordinate of this event. + * For touch events on the screen, this is the original location of the event * on the screen, before it had been adjusted for the containing window * and views. */ -float motion_event_get_raw_x(const input_event_t* motion_event); +float motion_event_get_raw_x(const input_event_t* motion_event, size_t pointer_index); -/* Get the original raw X coordinate of this event. For touch - * events on the screen, this is the original location of the event +/* Get the original raw X coordinate of this event. + * For touch events on the screen, this is the original location of the event * on the screen, before it had been adjusted for the containing window * and views. */ -float motion_event_get_raw_y(const input_event_t* motion_event); +float motion_event_get_raw_y(const input_event_t* motion_event, size_t pointer_index); /* Get the current X coordinate of this event for the given pointer index. * Whole numbers are pixels; the value may have a fraction for input devices @@ -461,6 +473,24 @@ size_t motion_event_get_history_size(const input_event_t* motion_event); int64_t motion_event_get_historical_event_time(input_event_t* motion_event, size_t history_index); +/* Get the historical raw X coordinate of this event for the given pointer index that + * occurred between this event and the previous motion event. + * For touch events on the screen, this is the original location of the event + * on the screen, before it had been adjusted for the containing window + * and views. + * Whole numbers are pixels; the value may have a fraction for input devices + * that are sub-pixel precise. */ +float motion_event_get_historical_raw_x(const input_event_t* motion_event, size_t pointer_index); + +/* Get the historical raw Y coordinate of this event for the given pointer index that + * occurred between this event and the previous motion event. + * For touch events on the screen, this is the original location of the event + * on the screen, before it had been adjusted for the containing window + * and views. + * Whole numbers are pixels; the value may have a fraction for input devices + * that are sub-pixel precise. */ +float motion_event_get_historical_raw_y(const input_event_t* motion_event, size_t pointer_index); + /* Get the historical X coordinate of this event for the given pointer index that * occurred between this event and the previous motion event. * Whole numbers are pixels; the value may have a fraction for input devices |