summaryrefslogtreecommitdiffstats
path: root/include/ui
Commit message (Collapse)AuthorAgeFilesLines
* get rid of dependency on copybit HAL moduleMathias Agopian2011-04-281-23/+0
| | | | Change-Id: Ia608099a2426c11a91d33063ba53c93e1eccb428
* Initial checkin of spot presentation for touchpad gestures.Jeff Brown2011-04-191-0/+5
| | | | | | | | | | | | | | | | | | | | 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
* Merge "Add a little input event consistency verifier."Jeff Brown2011-04-011-4/+12
|\
| * Add a little input event consistency verifier.Jeff Brown2011-03-311-4/+12
| | | | | | | | | | | | | | The idea is to assist with debugging by identifying cases in which the input event stream is corrupted. Change-Id: I0a00e52bbe2716be1b3dfc7c02a754492d8e7f1f
* | Merge "Add input filter mechanism for accessibility."Jeff Brown2011-03-301-0/+6
|\ \ | |/
| * Add input filter mechanism for accessibility.Jeff Brown2011-03-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a mechanism for capturing, filtering, transforming and injecting input events at a very low level before the input dispatcher attempts to deliver them to applications. At this time, the mechanism is only intended to be used by the accessibility system to implement built-in system-level accessibility affordances. The accessibility input filter is currently just a stub. It logs the input events receives and reinjects them unchanged, except that it transforms KEYCODE_Q into KEYCODE_Z. Currently, the accessibility input filter is installed whenever accessibility is enabled. We'll probably want to change that so it only enables the input filter when a screen reader is installed and we want touch exploration. Change-Id: I35764fdf75522b69d09ebd78c9766eb7593c1afe
* | Revert "retire android_native_window_t"Mathias Agopian2011-03-301-0/+3
|/ | | | | | | this type is still used by partner's source trees. we will get rid of it in next release's timeframe. This reverts commit 7b49b976277cb3538242151e7dbd24681ddec73e.
* retire android_native_window_tIliyan Malchev2011-03-231-3/+0
| | | | | Change-Id: I232c526168e1a93977d1c2d0fa74c8937cdeb23b Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "Add support for timestamps into SurfaceTexture."Eino-Ville Talvala2011-03-171-3/+29
|\
| * Add support for timestamps into SurfaceTexture.Eino-Ville Talvala2011-03-171-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API addition: The timestamps are represented as nanoseconds from some arbitrary time point. Like the SurfaceTexture transform matrix, the timestamp retrieved by getTimestamp is for the last frame sent to the GL texture using updateTexImage(). Camera HAL change: Expect vendors to set these timestamps using native_window_set_buffers_timestamp(). For now, they are autogenerated by SurfaceTextureClient if set_buffers_timestamp() is never called, but such timing is likely not accurate enough to pass a CTS test. bug:3300707 Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
* | Add 3D mode key and others.Jeff Brown2011-03-161-0/+3
|/ | | | | | Related to an AOSP change request. Change-Id: I3f4f84b56a1af626a8783f5ecbb823eb12ba9fbe
* Merge "Improve VelocityTracker numerical stability."Jeff Brown2011-03-151-3/+26
|\
| * Improve VelocityTracker numerical stability.Jeff Brown2011-03-151-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced VelocityTracker with a faster and more accurate native implementation. This avoids the duplicate maintenance overhead of having two implementations. The new algorithm requires that the sample duration be at least 10ms in order to contribute to the velocity calculation. This ensures that the velocity is not severely overestimated when samples arrive in bursts. The new algorithm computes the exponentially weighted moving average using weights based on the relative duration of successive sample periods. The new algorithm is also more careful about how it handles individual pointers going down or up and their effects on the collected movement traces. The intent is to preserve the last known velocity of pointers as they go up while also ensuring that other motion samples do not count twice in that case. Bug: 4086785 Change-Id: I2632321232c64d6b8faacdb929e33f60e64dcdd3
* | am ceb7cb14: am 02805a40: Merge "ANativeWindow: add query for the concrete ↵Jamie Gennis2011-03-151-0/+15
|\ \ | |/ |/| | | | | | | | | type." into honeycomb-mr1 * commit 'ceb7cb1460484eda1a3cb9cd271d7caf3a3dcbd1': ANativeWindow: add query for the concrete type.
| * ANativeWindow: add query for the concrete type.Jamie Gennis2011-03-141-0/+15
| | | | | | | | | | | | | | | | This change adds a query to the ANativeWindow interface for getting the concrete type of the ANativeWindow. Bug: 4086509 Change-Id: I64aa86d72fbca3b52a98e1fc35608737781a3178
* | Use touch pad gestures to manipulate the pointer.Jeff Brown2011-03-141-0/+55
|/ | | | | | | | | | | | | | | | | | | | 1. Single finger tap performs a click. 2. Single finger movement moves the pointer (hovers). 3. Button press plus movement performs click or drag. While dragging, the pointer follows the finger that is moving fastest. This is important if there are additional fingers down on the touch pad for the purpose of applying force to an integrated button underneath. 4. Two fingers near each other moving in the same direction are coalesced as a swipe gesture under the pointer. 5. Two or more fingers moving in arbitrary directions are transformed into touches in the vicinity of the pointer. This makes scale/zoom and rotate gestures possible. Added a native VelocityTracker implementation to enable intelligent switching of the active pointer during drags. Change-Id: I5ada57e7f2bdb9b0a791843eb354a8c706b365dc
* Input improvements and bug fixes.Jeff Brown2011-03-091-5/+16
| | | | | | | | | | | | | | | | | | | | | 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
* Merge "ANativeWindow: add queues-to-window-composer check." into honeycomb-mr1Jamie Gennis2011-03-091-0/+15
|\
| * ANativeWindow: add queues-to-window-composer check.Jamie Gennis2011-03-081-0/+15
| | | | | | | | | | | | | | | | | | This change adds a new 'method' to the ANativeWindow interface to check whether buffers queued to the window will be sent directly to the system window compositor. Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d Bug: 3495535
* | Joystick tweaks. (DO NOT MERGE)Jeff Brown2011-03-042-2/+37
|/ | | | | | | | | | | | | | | | | | Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions even when noise filtering is applied. (Bug: 3514510) Add support for a few more standard axes. Add additional mapping modes for axes. Some axes are inverted from standard interpretation or are actually intended to be split into two distict axes such as left/right trigger controls or accelerator/brake. Add key layout file for a G25 racing wheel and XBox 360 controller to tweak behavior. They work fine without them but the axis mappings are not ideal. Change-Id: I0fddd90309af4dc14d35f34fe99ed6e521c0b7c7
* Wake screen from external HID peripherals.Jeff Brown2011-03-021-0/+5
| | | | | | | | | | | | | | | | | | Added some plumbing to enable the policy to intercept motion events when the screen is off to handle wakeup if needed. Added a basic concept of an external device to limit the scope of the wakeup policy to external devices only. The wakeup policy for internal devices should be based on explicit rules such as policy flags in key layout files. Moved isTouchEvent to native. Ensure the dispatcher sends the right event type to userActivity for non-touch pointer events like HOVER_MOVE and SCROLL. Bug: 3193114 Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
* Fade out the mouse pointer after inactivity or other events.Jeff Brown2011-03-022-0/+13
| | | | | | | | | | | | | | 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
* Add the MIN_UNDEQUEUED_BUFFERS query to ANW.Jamie Gennis2011-02-281-0/+20
| | | | | | | | | This change adds a new query to ANativeWindow for getting the minimum number of buffers that must be left un-dequeued during the steady-state operation of the ANativeWindow. Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551 Related-Bug: 3356050
* Add new axes for joysticks and mouse wheels.Jeff Brown2011-02-194-41/+68
| | | | | | | | | | | | | | | | | | Added API on InputDevice to query the set of axes available. Added API on KeyEvent and MotionEvent to convert keycodes and axes to symbolic name strings for diagnostic purposes. Added API on KeyEvent to query if a given key code is a gamepad button. Added a new "axis" element to key layout files to specify the mapping between raw absolute axis values and motion axis ids. Expanded the axis bitfield to 64bits to allow for future growth. Modified the Makefile for keyboard prebuilts to run the keymap validation tool during the build. Added layouts for two game controllers. Added default actions for game pad button keys. Added more tests. Fixed a bunch of bugs. Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
* Fix a regression with MotionEvent parceling.Jeff Brown2011-02-171-25/+26
| | | | | | Also added some more unit tests. Change-Id: I413654294d1a998eec056884e6df5eaa50f3daf4
* Add support for arbitrary axes in MotionEvents.Jeff Brown2011-02-151-47/+135
| | | | | | | | | | | This change makes it possible to extend the set of axes that are reported in MotionEvents by defining new axis constants. The MotionEvent object is now backed by its C++ counterpart to avoid having to maintain multiple representations of the same data. Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
* am 09443aeb: am 62884505: Merge "Reset ANativeWindow crop on buffer geometry ↵Jamie Gennis2011-01-301-0/+2
|\ | | | | | | | | | | | | changes." into honeycomb * commit '09443aeb6470d66f5bc1938b70d74b3e2f9bbbb9': Reset ANativeWindow crop on buffer geometry changes.
| * Reset ANativeWindow crop on buffer geometry changes.Jamie Gennis2011-01-281-0/+2
| | | | | | | | | | | | | | | | | | This changes the ANativeWindow API and the two implementations to reset the window's crop rectangle to be uncropped when the window's buffer geometry is changed. Bug: 3359604 Change-Id: I64283dc8382ae687787ec0bebe6a5d5b4a0dcd6b
* | Protected surface APIGlenn Kasten2011-01-281-2/+4
| | | | | | | | | | | | To be used by DRM framework, implemented by display HAL Change-Id: I054a07a94f4d5dbe792f3a597e2e49a100d90eb2
* | am 12b2dc90: am b1e0a870: Merge "Fix crashes caused by some input devices." ↵Jeff Brown2011-01-251-1/+3
|\ \ | |/ | | | | | | | | | | into honeycomb * commit '12b2dc90883ef4f930a17907acdef3677b0598a5': Fix crashes caused by some input devices.
| * Fix crashes caused by some input devices.Jeff Brown2011-01-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The touch screen sometimes reports more than 10 pointers even though that's all we asked for. When this happens, we start dropping events with more than 10 pointers. This confuses applications and causes them to crash. Raised the limit to 16 pointers. Bug: 3331247 The default behavior was to identify all touch devices as touch screens. External devices that are plugged in are more likely to be touch pads not attached to a screen. Changed the default to be a touch pad and renamed some internal constants to avoid confusion. A certain mouse happens to also behave like a touch pad. That caused problems because we would see multiple concurrent traces of motion events coming from the same input device so we would batch them up. Added code to ensure that we don't batch events unless they come from the same *source* in addition to coming from the same *device*. Due to batching or misbehaving drivers, it's possible for the set of pointer ids to be different from what we expect when it comes time to split motion events across windows. As a result, we can generate motion events with 0 pointers. When we try to deliver those events, we cause an error in the InputTransport so we tear down the InputChannel and kill the application. Added code to check out assumption about pointer ids and drop the event gracefully instead. Patched up the tests to take into account the change in default behavior for identifying touch screens and touch pads. Change-Id: Ic364bd4cb4cc6335d4a1213a26d6bdadc7e33505
* | am 5f668c6e: am 8b9df978: Merge "Fix getSwitchState." into honeycombJeff Brown2011-01-191-0/+9
|\ \ | |/ | | | | | | * commit '5f668c6e6bb2515325632691a804a7c8f24ebb09': Fix getSwitchState.
| * Fix getSwitchState.Jeff Brown2011-01-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN because SwitchInputMapper::getSources() returns 0 which cannot match any source mask including AINPUT_SOURCE_ANY. As a result initial lid switch detection is broken. This change adds a new source constant AINPUT_SOURCE_SWITCH that indicates that the source has switches. Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
* | Add joystick support to framework.Jeff Brown2011-01-171-0/+16
|/ | | | Change-Id: I95374436708752e1a9cff3f85c5b9bc3e0987961
* Add the SurfaceTexture C++ implementation.Jamie Gennis2011-01-061-0/+1
| | | | | | | | | | This change adds the C++ implementation of SurfaceTexture and related classes. The goal of this is for a SurfaceTexture to be passed to camera service or Stagefright in place of a Surface to allow camera preview or decoded video frames to be streamed to an OpenGL ES texture that an application can use. Change-Id: I55c83a7017f1ecb81c9c9e3252cbd118b914296c
* Mouse pointer integration.Jeff Brown2011-01-046-2568/+9
| | | | | | | | | | 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
* Add initial support for cursor-based pointing devices.Jeff Brown2010-12-293-5/+83
| | | | | | | Some parts stubbed out but you can plug in a mouse and move a green cursor around to interact with the UI. Change-Id: I80d597a7f11d3bd92041890f74b3c77326975e6e
* remove support for PUSH_BUFFER surfaces and overlaysMathias Agopian2010-12-082-172/+0
| | | | | | | the same functionality is now supported through the h/w composer HAL, and YUV support in the GPU. Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
* surfaceflinger: add support for gralloc dump hooksErik Gilling2010-12-081-1/+4
| | | | Change-Id: Ib6f539ed0132b70d040d653c03d52cc04249ac3c
* Add support for fallback keycodes.Jeff Brown2010-12-075-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | This change enables the framework to synthesize key events to implement default behavior when an application does not handle a key. For example, this change enables numeric keypad keys to perform their associated special function when numlock is off. The application is informed that it is processing a fallback keypress so it can choose to ignore it. Added a new keycode for switching applications. Added ALT key deadkeys. New default key mappings: - ESC -> BACK - Meta+ESC -> HOME - Alt+ESC -> MENU - Meta+Space -> SEARCH - Meta+Tab -> APP_SWITCH Fixed some comments. Fixed some tests. Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe
* am 48f42f8c: am 4153bf3a: Merge "[3171580] don\'t automatically log ↵Mathias Agopian2010-12-072-1/+5
|\ | | | | | | | | | | | | GraphicBuffer allocation failures" into gingerbread * commit '48f42f8c3fbd33b2f46c6290ff5963dd58938cf9': [3171580] don't automatically log GraphicBuffer allocation failures
| * am 4153bf3a: Merge "[3171580] don\'t automatically log GraphicBuffer ↵Mathias Agopian2010-12-072-1/+5
| |\ | | | | | | | | | | | | | | | | | | allocation failures" into gingerbread * commit '4153bf3a259624a2f2dc497b77b225a1fb517abc': [3171580] don't automatically log GraphicBuffer allocation failures
| | * [3171580] don't automatically log GraphicBuffer allocation failuresMathias Agopian2010-12-032-1/+5
| | | | | | | | | | | | | | | | | | | | | some of these failures are not fatal and even expected in some cases so they should not emit a dump in the log in those cases. Change-Id: Idcfa252e3bfa9d74e27fe4ad8f8623aa01aa9c5e
* | | Improve support for external keyboards.Jeff Brown2010-12-025-83/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Vendor ID, Product ID and optionally the Version to locate keymaps and configuration files for external devices. Moved virtual key definition parsing to native code so that EventHub can identify touch screens with virtual keys and load the appropriate key layout file. Cleaned up a lot of old code in EventHub. Fixed a regression in ViewRoot's fallback event handling. Fixed a minor bug in FileMap that caused it to try to munmap or close invalid handled when released if the attempt to map the file failed. Added a couple of new String8 conveniences for formatting strings. Modified Tokenizer to fall back to open+read when mmap fails since we can't mmap sysfs files as needed to open the virtual key definition files in /sys/board_properties/. Change-Id: I6ca5e5f9547619fd082ddac47e87ce185da69ee6
* | | Ensure the ShortcutManager uses the correct key character map.Jeff Brown2010-11-302-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ShortcutManager used to only receive the key code of the key event that triggered the shortcut. This change now provides the shortcut manager with the whole key event so it can look up the associated character using the correct key character map. To make this more efficient, added a mechanism for recycling key events. At the moment it is only used by key events owned by the system process, since clients of the existing API (such as Views) might continue to hold on to key events after dispatch has finished so they would break if the key event were recycled by the framework. Deprecated KeyCharacterMap.BUILT_IN_KEYBOARD. Change-Id: I4313725dd63f2be01c350c005a41c7fde9bc67e8
* | | Support non-orientation aware keyboards and other devices.Jeff Brown2010-11-304-37/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a bug with dpad keys on external keyboards being rotated according to the display orientation by adding a new input device configuration property called "keyboard.orientationAware". Added a mechanism for overriding the key layout and key character map in the input device configuration file using the new "keyboard.layout" and "keyboard.characterMap" properties. Also added "trackball.orientationAware", "touch.orientationAware" and "touch.deviceType" configuration properties. Rewrote the configuration property reading code in native code so that it can be used by EventHub and other components. Added basic support for installable idc, kl, and kcm files in /data/system/devices. However, there is no provision for copying files there yet. Disabled long-press character pickers on full keyboards so that key repeating works as expected. Change-Id: I1bd9f0c3d344421db444e7d271eb09bc8bab4791
* | | Allow status bar panels to be on top of the status bar.Joe Onorato2010-11-241-1/+3
| | | | | | | | | | | | Change-Id: I3c74ece5f7042e6302717f4263746d59d5447ec9
* | | Added support for full PC-style keyboards.Jeff Brown2010-11-184-43/+302
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BREAKING CHANGE: Redesigned the key character map format to accomodate full keyboards with more comprehensive suite of modifiers. Old key character maps will not work anymore and must be updated. The new format is plain text only and it not compiled to a binary file (so the "kcm" tool will be removed in a subsequent check-in). Added FULL keyboard type to support full PC-style keyboards. Added SPECIAL_FUNCTION keyboard type to support special function keypads that do not have any printable keys suitable for typing and only have keys like HOME and POWER Added a special VIRTUAL_KEYBOARD device id convention that maps to a virtual keyboard with a fixed known layout. This is designed to work around issues injecting input events on devices whose built-in keyboard does not have a useful key character map (ie. when the built-in keyboard is a special function keyboard only.) Modified several places where events were being synthesized to use the virtual keyboard. Removed support for the "qwerty" default layout. The new default layout is "Generic". For the most part "qwerty" was being used as a backstop in case the built-in keyboard did not have a key character map (probably because it was a special function keypad) and the framework needed to be able to inject key events anyways. The latter issue is resolved by using the special VIRTUAL_KEYBOARD device instead of BUILT_IN_KEYBOARD. Added the concept of a key modifier behavior so that MetaKeyKeyListener can distinguish between keyboards that use chorded vs. toggled modifiers. Wrote more robust key layout and key character map parsers to enable support for new keyboard features and user installable key maps. Fixed a bug in InputReader generating key ups when keys are released out of sequence. Updated tons of documentation. Currently QwertyKeyListener is being used for full keyboards with autotext and capitalization disabled. This mostly works but causes some problems with character pickers, etc. These issues will be resolved in subsequent changes. Change-Id: Ica48f6097a551141c215bc0d2c6f7b3fb634d354
* | | am 5e069074: am a15e4886: Merge "Framebuffer: Support variable number of ↵Jean-Baptiste Queru2010-11-171-1/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | framebuffers in the UI" * commit '5e0690745a45f99d12d940dd4aaae814b00a429e': Framebuffer: Support variable number of framebuffers in the UI
| * | am a15e4886: Merge "Framebuffer: Support variable number of framebuffers in ↵Jean-Baptiste Queru2010-11-171-1/+2
| |\ \ | | |/ | |/| | | | | | | | | | | | | the UI" * commit 'a15e4886de8f75f3cb137f51743d330414c910e8': Framebuffer: Support variable number of framebuffers in the UI