summaryrefslogtreecommitdiffstats
path: root/native/include/android/looper.h
Commit message (Collapse)AuthorAgeFilesLines
* Fade out the mouse pointer after inactivity or other events.Jeff Brown2011-03-021-1/+2
| | | | | | | | | | | | | | 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
* Switch Looper back to using poll() instead of epoll().Jeff Brown2010-10-071-0/+9
| | | | | | | | | | | | Added a couple of micro-optimizations to avoid calling wake() unnecessarily and reduce JNI overhead slightly. Fixed a minor issue where we were not clearing the "next" field of Messages returned by the MessageQueue so the Message would hold on to its successor and potentially prevent the GC from collecting it if the message were leaked somehow. Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c
* Replace epoll() with poll() and rename PollLoop to Looper.Jeff Brown2010-09-141-61/+128
| | | | | | | | | | | | | | | As part of this change, consolidated and cleaned up the Looper API so that there are fewer distinctions between the NDK and non-NDK declarations (no need for two callback types, etc.). Removed the dependence on specific constants from sys/poll.h such as POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for the events that it supports. That should help make any future under-the-hood implementation changes easier. Fixed a couple of compiler warnings along the way. Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
* Modify native ALooper to take an explicit ident.Dianne Hackborn2010-09-071-7/+9
| | | | | | | | The ALooper API now uses an explicit "identifier" for the integer that is returned rather than implicitly using the fd. This allows the APIs that had the fd to be a little more sane. Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
* Add new glue code for writing native apps.Dianne Hackborn2010-07-081-4/+130
| | | | | | | | | | | | | | | | | 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
* Add new native Looper API.Dianne Hackborn2010-07-021-0/+51
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