summaryrefslogtreecommitdiffstats
path: root/services/input/PointerController.h
Commit message (Collapse)AuthorAgeFilesLines
* frameworks/base refactoring.Mathias Agopian2012-02-171-1/+1
| | | | | | First step. Move libui includes to their new home: androidfw. Change-Id: Ic042b52fdba72f30edc3cc6339bf30b4c1b99662
* am 55cc25c1: am 797dc698: am b92dcf9c: Merge "Simplify spot tracking logic. ↵Jeff Brown2011-06-071-36/+3
|\ | | | | | | | | | | | | Bug: 4124987" into honeycomb-mr2 * commit '55cc25c12c45e8ffb65d2275cc0b6941b68db9df': Simplify spot tracking logic. Bug: 4124987
| * Simplify spot tracking logic.Jeff Brown2011-06-061-36/+3
| | | | | | | | | | | | | | | | | | Bug: 4124987 Since spots are now one-to-one with the touch gesture points, we can eliminate a lot of redundant logic that assumed they weren't. Change-Id: Ic60d8d0898c285317f480bc8fb17fb9797770e69
* | am 3f5b95b0: am a4e74744: am fa574c0e: Merge "Touch pad UX improvements." ↵Jeff Brown2011-05-311-6/+13
|\ \ | |/ | | | | | | | | | | into honeycomb-mr2 * commit '3f5b95b05efcf7ab2e8f193649b841dc1786f2ef': Touch pad UX improvements.
| * Touch pad UX improvements.Jeff Brown2011-05-251-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Fade the pointer spot when swiping or performing a freeform gesture. Support configuring the gesture mode in the device IDC file. Added workaround for devices that report individual finger movements one at a time instead of all at once. Bug: 4124987 Change-Id: I44628b00382ad59306e4ec5c4717d69cc6fbebb8
| * Add tap/drag touchpad gesture. (DO NOT MERGE)Jeff Brown2011-05-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mapper sends a DOWN when the finger is released then starts a short timer. If the finger is not pressed again before the timer elapses, then the mapper sends an UP to complete the tap. If the finger is pressed again then the mapper starts sending MOVEs as part of a drag. Double/triple taps work as intended because we also start watching for a new tap when the finger is pressed again. If a new tap occurs the old tap is also finished. So each individual finger short press/release cycle constitutes a distinct tap. Change-Id: Id0a6ee10dd27e723f6cb04e56b43939abe9e940c
| * Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)Jeff Brown2011-05-251-23/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new PointerIcon API (hidden for now) for loading pointer icons. Fixed a starvation problem in the native Looper's sendMessage implementation which caused new messages to be posted ahead of old messages sent with sendMessageDelayed. Redesigned the touch pad gestures to be defined in terms of more fluid finger / spot movements. The objective is to reinforce the natural mapping between fingers and spots which means there must not be any discontinuities in spot motion relative to the fingers. Removed the SpotController stub and folded its responsibilities into PointerController. Change-Id: Ib647dbd7a57a7f30dd9c6e2c260df51d7bbdd18e
| * Add a sprite controller. (DO NOT MERGE)Jeff Brown2011-05-251-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored PointerController to extract the surface management code to a new component called a SpriteController so that it can be used to move finger tracking spots around the screen as well. The SpriteController is designed to fully decouple the client from any latency introduced by surface transactions and drawing. All sprite updates are performed asynchronously on the Looper using a copy of the sprite state. Added a stub SpotController implementation for touch pad UX. It will be implemented in a subsequent patch. Fixed a little bug in pointer orientation changes when entering DISPLAY_ORIENTATION_90 the x offset was clobbered. Change-Id: I6d59d80df9af61e93af50290e7776337d10c9d5a
* | Add initial API for stylus and mouse buttons.Jeff Brown2011-05-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added the concept of pointer properties in a MotionEvent. This is currently used to track the pointer tool type to enable applications to distinguish finger touches from a stylus. Button states are also reported to application as part of touch events. There are no new actions for detecting changes in button states. The application should instead query the button state from the MotionEvent and take appropriate action as needed. A good time to check the button state is on ACTION_DOWN. As a side-effect, applications that do not support multiple buttons will treat primary, secondary and tertiary buttons identically for all touch events. The back button on the mouse is mapped to KEYCODE_BACK and the forward button is mapped to KEYCODE_FORWARD. Added basic plumbing for the secondary mouse button to invoke the context menu, particularly in lists. Added clamp and split methods on MotionEvent to take care of common filtering operations so we don't have them scattered in multiple places across the framework. Bug: 4260011 Change-Id: Ie992b4d4e00c8f2e76b961da0a902145b27f6d83
* | Add tap/drag touchpad gesture.Jeff Brown2011-04-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mapper sends a DOWN when the finger is released then starts a short timer. If the finger is not pressed again before the timer elapses, then the mapper sends an UP to complete the tap. If the finger is pressed again then the mapper starts sending MOVEs as part of a drag. Double/triple taps work as intended because we also start watching for a new tap when the finger is pressed again. If a new tap occurs the old tap is also finished. So each individual finger short press/release cycle constitutes a distinct tap. Change-Id: Iaa51182edee4378162a66adfd746088e93af2a30
* | Initial checkin of spot presentation for touchpad gestures.Jeff Brown2011-04-191-23/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new PointerIcon API (hidden for now) for loading pointer icons. Fixed a starvation problem in the native Looper's sendMessage implementation which caused new messages to be posted ahead of old messages sent with sendMessageDelayed. Redesigned the touch pad gestures to be defined in terms of more fluid finger / spot movements. The objective is to reinforce the natural mapping between fingers and spots which means there must not be any discontinuities in spot motion relative to the fingers. Removed the SpotController stub and folded its responsibilities into PointerController. Change-Id: I5126b1e69d95252fda7f2a684c9287e239a57163
* | Add a sprite controller.Jeff Brown2011-04-111-19/+7
|/ | | | | | | | | | | | | | | | | | Refactored PointerController to extract the surface management code to a new component called a SpriteController so that it can be used to move finger tracking spots around the screen as well. The SpriteController is designed to fully decouple the client from any latency introduced by surface transactions and drawing. All sprite updates are performed asynchronously on the Looper using a copy of the sprite state. Added a stub SpotController implementation for touch pad UX. It will be implemented in a subsequent patch. Fixed a little bug in pointer orientation changes when entering DISPLAY_ORIENTATION_90 the x offset was clobbered. Change-Id: Ib25d162d577c9b354cb74d5d761c3c9f9f438d42
* Input improvements and bug fixes.Jeff Brown2011-03-091-4/+0
| | | | | | | | | | | | | | | | | | | | | Associate each motion axis with the source from which it comes. It is possible for multiple sources of the same device to define the same axis. This fixes new API that was introduced in MR1. (Bug: 4066146) Fixed a bug that might cause a segfault when using a trackball. Only fade out the mouse pointer when touching the touch screen, ignore other touch pads. Changed the plural "sources" to "source" in several places in the InputReader where we intend to refer to a particular source rather than to a combination of sources. Improved the batching code to support batching events from different sources of the same device in parallel. (Bug: 3391564) Change-Id: I0189e18e464338f126f7bf94370b928e1b1695f2
* Fade out the mouse pointer after inactivity or other events.Jeff Brown2011-03-021-2/+37
| | | | | | | | | | | | | | Fades out the mouse pointer: - after 15 seconds of inactivity normally - after 3 seconds of inactivity in lights out mode - after a non-modifier key down - after a touch down Extended the native Looper to support enqueuing time delayed messages. This is used by the PointerController to control pointer fade timing. Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
* Mouse pointer integration.Jeff Brown2011-01-041-0/+129
Added support for loading the pointer icon from a resource. Moved the system server related bits of the input manager out of libui and into libinput since they do not need to be linked into applications. Change-Id: Iec11e0725b3add2b905c51f8ea2c3b4b0d1a2d67