summaryrefslogtreecommitdiffstats
path: root/native
Commit message (Collapse)AuthorAgeFilesLines
...
| * Add new glue code for writing native apps.Dianne Hackborn2010-07-087-14/+621
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This factors out the boiler-plate code from the sample app to a common glue code that can be used for everyone writing this style of app: a dedicated app thread that takes care of waiting for events and processing them. As part of doing this, ALooper has a new facility to allow registration of fds that cause ALooper_pollOnce() to return the fd that has data, allowing the app to drive the loop without callbacks. Hopefully this makes some people feel better. :) Also do some other cleanup of the ALooper API, plus some actual documentation. Change-Id: Ic53bd56bdf627e3ba28a3c093faa06a92be522b8
* | am e24901d3: am 68267415: Add new native Looper API.Dianne Hackborn2010-07-076-7/+150
|\ \ | |/ | | | | | | | | | | Merge commit 'e24901d3adb28fff72821d4e8e2ccc25b2184550' * commit 'e24901d3adb28fff72821d4e8e2ccc25b2184550': Add new native Looper API.
| * Add new native Looper API.Dianne Hackborn2010-07-026-7/+150
| | | | | | | | | | | | | | | | | | | | | | This allows us to avoid exposing the file descriptor of the event queue; instead, you attach an event queue to a looper. This will also should allow native apps to be written without the need for a separate thread, by attaching the event queue to the main thread's looper and scheduling their own messages there. Change-Id: I38489282635895ae2cbfacb88599c1b1cad9b239
* | am 39c921c6: am 8ae5a8e7: Get to the point of being able to do native drawing.Dianne Hackborn2010-07-013-8/+31
|\ \ | |/ | | | | | | | | | | Merge commit '39c921c6e5316696d8c61d1ee465f9b5f894c4ed' * commit '39c921c6e5316696d8c61d1ee465f9b5f894c4ed': Get to the point of being able to do native drawing.
| * Get to the point of being able to do native drawing.Dianne Hackborn2010-07-013-8/+31
| | | | | | | | | | | | A little cleanup. Change-Id: I37ef0557abf330d91d6fe47e81d062206b3bc346
* | am 58f35ff4: am 54a181b1: Make real API for native code to get its window.Dianne Hackborn2010-07-014-19/+73
|\ \ | |/ | | | | | | | | | | Merge commit '58f35ff41601769ca4f357575a9385f16c01b991' * commit '58f35ff41601769ca4f357575a9385f16c01b991': Make real API for native code to get its window.
| * Make real API for native code to get its window.Dianne Hackborn2010-07-014-19/+73
| | | | | | | | | | | | | | Added implementation to use ANativeWindow and provide it to a NativeActivity. Change-Id: I890d71b6e15d4af71e6cf81b327961d7061ec1c2
* | am 177c405a: am c6e1d880: Merge "Introduce official public NativeWindow ↵Dianne Hackborn2010-06-301-0/+33
|\ \ | |/ | | | | | | | | | | | | | | type." into gingerbread Merge commit '177c405a242e811b1010bd8382b5807ab8df31a8' * commit '177c405a242e811b1010bd8382b5807ab8df31a8': Introduce official public NativeWindow type.
| * Introduce official public NativeWindow type.Dianne Hackborn2010-06-301-0/+33
| | | | | | | | | | | | | | Not yet hooked up to anything in the NDK, but requires renaming the existing android_native_window_t type everywhere. Change-Id: Iffee6ea39c93b8b34e20fb69e4d2c7c837e5ea2e
* | resolved conflicts for merge of 7f6c6e8f to masterDianne Hackborn2010-06-301-0/+9
|\ \ | |/ | | | | Change-Id: Id9dddb78c51f16ff8c4b60339421c94fde506db2
| * Implement default key handling for native code.Dianne Hackborn2010-06-301-0/+9
| | | | | | | | | | | | | | | | | | The native code now maintains a list of all keys that may use default handling. If the app finishes one of these keys without handling it, the key will be passed back off to Java for default treatment. Change-Id: I6a842a0d728eeafa4de7142fae573f8c11099e18
* | am b5f05d00: am 0934fbb6: Merge "Update native activity & event APIs to ↵Dianne Hackborn2010-06-293-110/+117
|\ \ | |/ | | | | | | | | | | | | | | follow correct conventions." into gingerbread Merge commit 'b5f05d0018d72531e40c2afadfee90e9bc0c8893' * commit 'b5f05d0018d72531e40c2afadfee90e9bc0c8893': Update native activity & event APIs to follow correct conventions.
| * Update native activity & event APIs to follow correct conventions.Dianne Hackborn2010-06-293-110/+117
| | | | | | | | Change-Id: Ie64fb3a9c68bc9c117fa5621b75d1f609e304e0e
* | am e3e2883f: am e24a60aa: Merge "First stab at attaching native event ↵Dianne Hackborn2010-06-235-0/+310
|\ \ | |/ | | | | | | | | | | | | | | dispatching." into gingerbread Merge commit 'e3e2883f2232007174ead562610eb01201890d9b' * commit 'e3e2883f2232007174ead562610eb01201890d9b': First stab at attaching native event dispatching.
| * First stab at attaching native event dispatching.Dianne Hackborn2010-06-225-0/+310
| | | | | | | | | | | | | | | | | | | | | | | | Provides the basic infrastructure for a NativeActivity's native code to get an object representing its event stream that can be used to read input events. Still work to do, probably some API changes, and reasonable default key handling (so that for example back will still work). Change-Id: I6db891bc35dc9683181d7708eaed552b955a077e
* | am 42bb545a: am 5c225b16: Even more native input dispatch work in progress.Jeff Brown2010-06-171-6/+36
|\ \ | |/ | | | | | | | | | | Merge commit '42bb545a54d89f0ddbb230d7a01ea4210c0f6c00' * commit '42bb545a54d89f0ddbb230d7a01ea4210c0f6c00': Even more native input dispatch work in progress.
| * Even more native input dispatch work in progress.Jeff Brown2010-06-171-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | resolved conflicts for merge of 9e660c82 to masterJeff Brown2010-06-132-0/+658
|\ \ | |/ | | | | Change-Id: Ic4bd85cbaa5b9a10dcb474a0dad46490bf967e43
| * Native input dispatch rewrite work in progress.Jeff Brown2010-06-132-0/+658
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old dispatch mechanism has been left in place and continues to be used by default for now. To enable native input dispatch, edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy. Includes part of the new input event NDK API. Some details TBD. To wire up input dispatch, as the ViewRoot adds a window to the window session it receives an InputChannel object as an output argument. The InputChannel encapsulates the file descriptors for a shared memory region and two pipe end-points. The ViewRoot then provides the InputChannel to the InputQueue. Behind the scenes, InputQueue simply attaches handlers to the native PollLoop object that underlies the MessageQueue. This way MessageQueue doesn't need to know anything about input dispatch per-se, it just exposes (in native code) a PollLoop that other components can use to monitor file descriptor state changes. There can be zero or more targets for any given input event. Each input target is specified by its input channel and some parameters including flags, an X/Y coordinate offset, and the dispatch timeout. An input target can request either synchronous dispatch (for foreground apps) or asynchronous dispatch (fire-and-forget for wallpapers and "outside" targets). Currently, finding the appropriate input targets for an event requires a call back into the WindowManagerServer from native code. In the future this will be refactored to avoid most of these callbacks except as required to handle pending focus transitions. End-to-end event dispatch mostly works! To do: event injection, rate limiting, ANRs, testing, optimization, etc. Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
* | Improved native TTS interface header.David 'Digit' Turner2010-06-111-0/+308
|/ | | | | | | | | | | | | | | The purpose of this patch is to add a C-based ABI that can be exposed by the NDK for developers wanting to write a TTS Engine. This replaces the C++ ABI that is currently under frameworks/base/include/tts/TtsEngine.h but is *binary* compatible with it. As a consequence, the svox pico plugin under external/svox/pico/tts/, which links against tts/TtsEngine.h can be loaded by the TTS service properly. Another patch would modify the pico tts to use <android/tts.h>, then we will be able to get rid of <tts/TtsEngine.h> in the source tree. Change-Id: I16844cef9b5b006cc32655a29e4f9f193c8c1a91
* Update NativeActivity to allow direct surface access.Dianne Hackborn2010-05-181-1/+114
| | | | | | No actual native API for using a surface, but it's a step. Change-Id: I627f26b705abc7a05edf9117411abfacf0fae64a
* Add new API to take over a window's Surface.Dianne Hackborn2010-05-181-5/+0
| | | | Change-Id: Iad6245faadc95f19ea63c8e229a1c02e9188f69e
* am 89ad07b0: am 42ee86e6: Merge "For issue #2651381, allow library ↵Dan Bornstein2010-05-061-2/+0
|\ | | | | | | | | | | | | | | | | prelinking." into froyo Merge commit '89ad07b048ff035394596d6a8916f639f3f0b868' into kraken * commit '89ad07b048ff035394596d6a8916f639f3f0b868': For issue #2651381, allow library prelinking.
| * For issue #2651381, allow library prelinking.Dan Bornstein2010-05-051-2/+0
| | | | | | | | Change-Id: I1cb467a158e21fc02cac6af585ac8d27c2bf42de
* | First pass at NativeActivity.Dianne Hackborn2010-05-051-0/+68
|/ | | | | | | | | | | This is a rough sketch of the new pure-native API, which you can use through a NativeActivity in your manifest (no Java code in the .apk needed!). Intentionally no docs yet, the API is still being seriously messed with. But it works. Change-Id: I0e916d58a0d159ecaf3689e41834eb8dc681c0c0
* Move the NDK graphics wrapper (libjnigraphics) to frameworks/base/nativeDima Zavin2010-02-043-0/+209
Change-Id: I2a5adde9f8e4683c4b4526a29ad276c3e581e029 Signed-off-by: Dima Zavin <dima@android.com>