platform_system_core/include/utils
Jeff Brown 66db68948c Native input dispatch rewrite work in progress.
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
2013-07-30 13:56:53 -07:00
..
ashmem.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
Asset.h Fix issue #2048263: More debugging information 2013-07-30 13:56:52 -07:00
AssetDir.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
AssetManager.h Don't re-parse the framework resources all the time. 2013-07-30 13:56:51 -07:00
Atomic.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
BackupHelpers.h Only report "unknown metadata" once per restore helper 2013-07-30 13:56:51 -07:00
BitSet.h Native input dispatch rewrite work in progress. 2013-07-30 13:56:53 -07:00
BufferedTextOutput.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
ByteOrder.h Implement the C++ class to write the backed up file data. 2013-07-30 13:56:50 -07:00
CallStack.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
Debug.h Support for marshalling pointers / intptr_t in Parcel. 2013-07-30 13:56:52 -07:00
Endian.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
Errors.h fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly 2013-07-30 13:56:52 -07:00
FileMap.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
Flattenable.h remove a dependency of GraphicBuffer (libui) on Parcel (libbinder). 2013-07-30 13:56:52 -07:00
KeyedVector.h fix KeyedVector::replaceValueAt, which wouldn't even compile if used. 2013-07-30 13:56:49 -07:00
List.h Fix sim build. 2013-07-30 13:56:51 -07:00
Log.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
misc.h get rid of utils.h 2013-07-30 13:56:50 -07:00
PollLoop.h Native input dispatch rewrite work in progress. 2013-07-30 13:56:53 -07:00
Pool.h Native input dispatch rewrite work in progress. 2013-07-30 13:56:53 -07:00
RefBase.h update surfaceflinger, libui and libagl to the new gralloc api 2013-07-30 13:56:49 -07:00
ResourceTypes.h New xlarge screen size. 2013-07-30 13:56:53 -07:00
SharedBuffer.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
Singleton.h Fix a typo in Singleton<> 2013-07-30 13:56:53 -07:00
SortedVector.h improve Vector<> with types that can be trivially moved and remove some unused code. 2013-07-30 13:56:50 -07:00
StopWatch.h Native input dispatch rewrite work in progress. 2013-07-30 13:56:53 -07:00
String8.h Optional use of UTF-8 strings in resource bundles 2013-07-30 13:56:52 -07:00
String16.h Optional use of UTF-8 strings in resource bundles 2013-07-30 13:56:52 -07:00
StringArray.h rename string_array.h to StringArray.h and move the implementation from the header file to a new cpp file. 2013-07-30 13:56:50 -07:00
SystemClock.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00
TextOutput.h some work to try to reduce the code size of some native libraries 2013-07-30 13:56:50 -07:00
threads.h added RWLock C++ wrapper 2013-07-30 13:56:53 -07:00
Timers.h get rid of sleepForInterval() which didn't seem to be used anywhere in the source tree. Also get rid of ported.h which seem to be used only (possibly) in the sim. moved the implementation there. 2013-07-30 13:56:50 -07:00
TypeHelpers.h improve Vector<> with types that can be trivially moved and remove some unused code. 2013-07-30 13:56:50 -07:00
Vector.h Native input dispatch rewrite work in progress. 2013-07-30 13:56:53 -07:00
VectorImpl.h Native input dispatch rewrite work in progress. 2013-07-30 13:56:53 -07:00
ZipFileCRO.h ZipUtilsRO rewrite based on Dalvik Zip rewrite 2013-07-30 13:56:53 -07:00
ZipFileRO.h ZipUtilsRO rewrite based on Dalvik Zip rewrite 2013-07-30 13:56:53 -07:00
ZipUtils.h auto import from //depot/cupcake/@135843 2013-07-30 13:56:49 -07:00