User:VladVukicevic/Android Notes
Jump to navigation
Jump to search
- Rendering is easy
- frameworks/base/cmds/bootanimation has a simple native command that shows how to connect to SurfaceComposer, create a Surface (which has move/etc. functions on ISurface), and draw to it.
- Events are all java side
- the core pieces are IWindowManager and IWindow. See IWindowManager.aidl, IWindow.aidl, IWindowSession.aidl in frameworks/base/core/java/android/view. Also core is WindowManagerService in frameworks/base/services/java/com/android/server/WindowManagerService.java . The service seems to be the piece that we need to interact with; we need to have an IWindow and call addWindow on the service. It dispatches events to windows that it knows about, as best I can tell, using the IWindow interface.
- For exploration
- create a java shim that would basically bridge all the java pieces back to native code; essentially, in the end, part of widget/src/android would be implemented in java (and a simple java launcher). We should create that shim and some native rendering/event handling code first (ignoring gecko entirely) to see what that would look like.