summaryrefslogtreecommitdiffstats
path: root/native/include/android/input.h
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-02-24 20:55:35 -0800
committerJeff Brown <jeffbrown@google.com>2011-02-25 17:06:07 -0800
commit33bbfd2232ea9eaae9a9d87a05a95a430f09bd83 (patch)
tree88e8e2513676dccf07b9764522a681aae370f020 /native/include/android/input.h
parentd752c3b3e6c576ed1f18e86a7b18c33dc7c65791 (diff)
downloadframeworks_base-33bbfd2232ea9eaae9a9d87a05a95a430f09bd83.zip
frameworks_base-33bbfd2232ea9eaae9a9d87a05a95a430f09bd83.tar.gz
frameworks_base-33bbfd2232ea9eaae9a9d87a05a95a430f09bd83.tar.bz2
Add support for mouse hover and scroll wheel.
Dispatch ACTION_HOVER_MOVE and ACTION_SCROLL through the View hierarchy as onGenericTouchEvent. Pointer events dispatched this way are delivered to the view under the pointer. Non-pointer events continue to be delivered to the focused view. Added scroll wheel support to AbsListView, ScrollView, HorizontalScrollView and WebView. Shift+VSCROLL is translated to HSCROLL as appropriate. Added logging of new pointer events in PointerLocationView. Fixed a problem in EventHub when a USB device is removed that resulted in a long stream of ENODEV errors being logged until INotify noticed the device was gone. Note that the new events are not supported by wallpapers at this time because the wallpaper engine only delivers touch events. Make all mouse buttons behave identically. (Effectively we only support one button.) Change-Id: I9ab445ffb63c813fcb07db6693987b02475f3756
Diffstat (limited to 'native/include/android/input.h')
-rw-r--r--native/include/android/input.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/native/include/android/input.h b/native/include/android/input.h
index d516037..f19e8be 100644
--- a/native/include/android/input.h
+++ b/native/include/android/input.h
@@ -288,6 +288,15 @@ enum {
* the last hover move event.
*/
AMOTION_EVENT_ACTION_HOVER_MOVE = 7,
+
+ /* The motion event contains relative vertical and/or horizontal scroll offsets.
+ * Use getAxisValue to retrieve the information from AMOTION_EVENT_AXIS_VSCROLL
+ * and AMOTION_EVENT_AXIS_HSCROLL.
+ * The pointer may or may not be down when this event is dispatched.
+ * This action is always delivered to the winder under the pointer, which
+ * may not be the window currently touched.
+ */
+ AMOTION_EVENT_ACTION_SCROLL = 8,
};
/*